V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
wisej
V2EX  ›  Vue.js

关于 Vue 的 UI 框架 mint-ui 中组件 checklist 的问题?

  •  1
     
  •   wisej · 2017-08-30 23:53:53 +08:00 · 2389 次点击
    这是一个创建于 2429 天前的主题,其中的信息可能已经有所发展或是发生改变。

    无法使用组件 checklist,报错信息:

    TypeError: Cannot read property 'length' of undefined
        at Proxy.render (eval at <anonymous> (build.js:805), <anonymous>:9092:46)
        at VueComponent.Vue._render (eval at <anonymous> (build.js:768), <anonymous>:2216:22)
        at VueComponent.updateComponent (eval at <anonymous> (build.js:768), <anonymous>:2609:21)
        at Watcher.get (eval at <anonymous> (build.js:768), <anonymous>:2934:27)
        at new Watcher (eval at <anonymous> (build.js:768), <anonymous>:2926:12)
        at VueComponent.Vue._mount (eval at <anonymous> (build.js:768), <anonymous>:2608:19)
        at VueComponent.Vue$3.$mount (eval at <anonymous> (build.js:768), <anonymous>:6178:15)
        at VueComponent.Vue$3.$mount (eval at <anonymous> (build.js:768), <anonymous>:8549:16)
        at init (eval at <anonymous> (build.js:768), <anonymous>:1740:11)
        at createComponent (eval at <anonymous> (build.js:768), <anonymous>:4174:9)
    

    我在仓库搜这个 issue,有三个跟我一样的问题,可惜只有问题描述就都关闭了。 从报错信息看,是有个变量(应该就是) undefined 却用到了。而且这个变量应该就是 checklist 绑定用到的数组。

    <mt-checklist
        title=""
        v-model="item_answer"
        :options="choices_item">
        </mt-checklist>
    

    choices_item 是一个 computed。想问问懂的大佬,为什么会出现 undefined 的情况呢?

    目前尚无回复
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   我们的愿景   ·   实用小工具   ·   1145 人在线   最高记录 6543   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 31ms · UTC 23:07 · PVG 07:07 · LAX 16:07 · JFK 19:07
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.