https://www.npmjs.com/package/vue-model
以上代码的示例在我的环境中不起作用:
vue:^2.2.1,
vue-模型“:0.0.3,
Vue.models.register('customer', {
baseRoute: '/customers'
});
在通过上面的例子注册客户模型之后,我认为可以引用customer对象,
customer.$.update()
但是错误回来了,
未定义http://eslint.org/docs/rules/no-undef 'customer‘ /Users/murotanimari/my-project/src/components/Scene1.vue:19:1 customer.$.update() ^
我想vue模型的注册失败了..。有人知道这次失败的原因吗?
发布于 2017-05-21 10:09:43
我认为这个库不支持vue2。你可以试试vue-资源。它不支持像操作这样的模型,但非常方便使用。
https://stackoverflow.com/questions/42731742
复制相似问题