美文网首页
vue+typescript Property 'toggleR

vue+typescript Property 'toggleR

作者: Computer_计算机 | 来源:发表于2021-05-18 17:11 被阅读0次

    看一下写法,会报错

    TIM截图20210518170858.png
    private toggleSelection(rows: any) {
            rows.forEach((row: any) => {
            this.$refs.articleTable.toggleRowSelection(row);
            })
        }
    
    

    修改为以下

    private toggleSelection(rows: any) {
            const form = this.$refs.articleTable as ElTable
            rows.forEach((row: any) => {
                form.toggleRowSelection(row);
            })
        }
    
    

    相关文章

      网友评论

          本文标题:vue+typescript Property 'toggleR

          本文链接:https://www.haomeiwen.com/subject/sxryjltx.html