美文网首页
Vue Error in render function: "T

Vue Error in render function: "T

作者: wuli见见 | 来源:发表于2018-04-27 10:56 被阅读0次

Vue+el标签使用v-if ,v-else 进行切换的时候报错

Error in render function: "TypeError: _self.$scopedSlots.default is not a function

TypeError: _self.$scopedSlots.default is not a function

    at renderCell (element-ui.common.js:10738)

    at Proxy.column.renderCell (element-ui.common.js:10753)

    at element-ui.common.js:8846

    at Proxy.renderList (vue.esm.js:3910)

    at element-ui.common.js:8834

    at Proxy.renderList (vue.esm.js:3910)

    at Proxy.render (element-ui.common.js:8809)

    at VueComponent.Vue._render (vue.esm.js:4195)

    at VueComponent.updateComponent (vue.esm.js:2574)

    at Watcher.get (vue.esm.js:2917)

解决办法:

在使用v-if和v-else的标签上加上一个唯一标识key

例如:

<section  v-if="visible"  key="key1">  

</section>

<section  v-else  key="key2">

</section>

其中key1和key2都是唯一标识。

相关文章

网友评论

      本文标题:Vue Error in render function: "T

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