网站首页 >> 牛刀云小程序开发 >> 附录 >> 系统API >> 组件API

5.3.3.1 data组件基类

1、this.comp(“compID”).refreshData() 刷新数据

2、this.comp(“compID”).loadData(JSON,Boolean,Any,Integer) 加载数据

3、this.comp(“compID”).newData(JSON) 新增数据 ,支持多行新增

4、this.comp(“compID”).saveData() 保存数据

5、this.comp(“compID”).deleteAllData() 删除所有数据

6、this.comp(“compID”).deleteData(Any) 删除数据

7、this.comp(“compID”).toJSON() 获取datajson格式序列化对象

8、this.comp(“compID”).find(Array,Array,Boolean,Boolean,Boolean)数据查找

9、this.comp(“compID”).count() 获取数据的记录数

10、this.comp(“compID”).setFilter(String,String) 设置指定名称的过滤表达式

11、this.comp(“compID”).getRowByID(String) 根据行ID获取Row

12、this.comp(“compID”).getValueByID(String,String) 通过列名和行ID获取列的值

13、this.comp(“compID”).getCurrentRow() 获取数据当前的行

14、this.comp(“compID”).getCurrentRowID() 获取数据当前的行ID

15、this.comp(“compID”).bof() 当前是否第一行

16、this.comp(“compID”).eof() 当前是否最后行

17、this.comp(“compID”).first() 移动到第一条

18、this.comp(“compID”).last() 移动到最后一条

19、this.comp(“compID”).next() 移动到下一条

20、this.comp(“compID”).pre()  移动到前一条

21、this.comp(“compID”).getFirstRow()  获取数据的第一行,没有数据时返回null

22、this.comp(“compID”).getLastRow()  获取数据的最后一行,没有数据时返回null

23、this.comp(“compID”).getRowID(Any) 获取data的行Id,默认获取当前行的id

24、this.comp(“compID”).getIDs() 获取data所有数据行Id

25、this.comp(“compID”).getCount()  获取data记录数

26、this.comp(“compID”).setOrderBy(Stringinteger)  设置排序

27、this.comp(“compID”).getTotal()  返回data的全部记录数,包括分页没有加载的记录数

28、this.comp(“compID”).getValue(String,JSON)  通过列名和行获取列的值

29、this.comp(“compID”).setValue(String,Any,JSON)  设置列值