foreasydata
v1.0.27
Published
EasyData for Web Utils.
Readme
EasyData
EasyData for Web Utils.
Install
npm i easydata //or yarn add easydataCDN
<script src="https://unpkg.com/foreasydata/dist/index.min.js"></script>
<script>
</script>Usage
import EasyData from 'foreasydata'
let ez = new EasyData('模板编码')- init() 初始化业务模型
await ez.init()- add() 新增数据
await ez.add()- del() 删除数据
await ez.del()- update() 更新数据
await ez.update()- getList() 获取列表数据
await ez.getList()- getDetail(id) 获取详情
- id:主键ID
await ez.getDetail(1)- initStats() 初始化统计模型
await ez.initStats()- getStats(params={}) 获取统计数据
- params:查询参数
await ez.getStats({startDate:'2023-01-01',endDate:'2023-12-31'})