类: Table
约 525 字大约 2 分钟
2024-05-03
构建固件和导入到JS
Table 类由 lv 模块提供:
import { Table } from 'lv'简介
表格控件
按行列排布显示文本的表格
该类是对 LVGL Widget
lv_table_t的封装,具体用法请参考 LVGL 文档
继承自 Obj,拥有 Obj 的全部属性、方法和事件。
示例:
import * as lv from "lv"
const obj = new lv.Table(lv.screen())类属性
属性 rowCount
类型: number
访问: 可读, 可写
该属性是对 LVGL C API
lv_table_get_row_count,lv_table_set_row_count的封装, 具体用法请参考 LVGL文档
属性 columnCount
类型: number
访问: 可读, 可写
该属性是对 LVGL C API
lv_table_get_column_count,lv_table_set_column_count的封装, 具体用法请参考 LVGL文档
类方法
方法 setCellValue
原型: setCellValue ()
该方法是对 LVGL C API
lv_table_set_cell_value的封装,具体用法请参考 LVGL文档
返回值:
undefined
方法 setColumnWidth
原型: setColumnWidth ()
该方法是对 LVGL C API
lv_table_set_column_width的封装,具体用法请参考 LVGL文档
返回值:
undefined
方法 addCellCtrl
原型: addCellCtrl ()
该方法是对 LVGL C API
lv_table_add_cell_ctrl的封装,具体用法请参考 LVGL文档
返回值:
undefined
方法 clearCellCtrl
原型: clearCellCtrl ()
该方法是对 LVGL C API
lv_table_clear_cell_ctrl的封装,具体用法请参考 LVGL文档
返回值:
undefined
方法 getColumnWidth
原型: getColumnWidth ()
该方法是对 LVGL C API
lv_table_get_column_width的封装,具体用法请参考 LVGL文档
返回值:
undefined
方法 hasCellCtrl
原型: hasCellCtrl ()
该方法是对 LVGL C API
lv_table_has_cell_ctrl的封装,具体用法请参考 LVGL文档
返回值:
undefined
