Error in beforeMount hook: “TypeError: Cannot read property ‘length’ of undefined” 原因是没有双向绑定 在原代码基础上加个双向绑定就好了