【文件属性】:
文件名称:vue-model
文件大小:134KB
文件格式:ZIP
更新时间:2021-03-06 16:25:39
JavaScript
Vue模型
从Vue应用程序使用
npm install --save https://github.com/taras-m0/vue-model.git OR yarn add -D https://github.com/taras-m0/vue-model.git
创建MyModel.js
import Model from "Model" ;
class MyModel extends Model {
prop1 = String
prop2 = Boolean
}
在vue组件中使用
< template>
< input v-model = " MyModel . prop1 " />
template>
< script >
import MyModel from ' MyModel.js '
export default {
data (){
【文件预览】:
vue-model-main
----public()
--------index.html(611B)
--------favicon.ico(4KB)
----src()
--------Model.js(3KB)
----babel.config.js(73B)
----example()
--------main.js(136B)
--------components()
--------App.vue(710B)
--------assets()
--------Model()
--------api.js(410B)
----LICENSE(1KB)
----jest.config.js(936B)
----README.md(705B)
----tests()
--------unit()
----.gitignore(231B)
----package-lock.json(456KB)
----package.json(1KB)