data-model
js 简单的数据模型
安装
在项目中执行 npm install q-data-model --save
或者 yarn add q-data-model
使用
; ; // 定义 service { return axios;} { return axios;} { return axios;} // 定义模型 { return } { superprops ; } anonymousCount = undefined; { ifthisanonymousCount !== undefined return thisanonymousCount; thisanonymousCount = 0; for let user of thisdata if!user thisanonymousCount++; return thisanonymousCount; } /*** userData 类似:{ id: 1, avatar: 'avatar url', name: 'qbhy', gender: 1, others fields}*/ ;
更多高级使用和扩展功能可以在 issues 跟我讨论