diff --git a/docs/component/table.md b/docs/component/table.md index 84d768cc..ef2afa4d 100644 --- a/docs/component/table.md +++ b/docs/component/table.md @@ -2,6 +2,10 @@ 用于展示多条结构类似的数据, 可对数据进行排序等操作。 +::: warning 提示 +`$LOWEST_VERSION$`后取消了`height`的默认值,需要自行设置,最好设置为`number`类型,方便未来适配虚拟列表。 +::: + ## 基础用法 通过`data`设置表格数据。 @@ -9,7 +13,7 @@ ::: details 基础用法 ```html - + @@ -46,7 +50,7 @@ const dataList = reactive([ ::: ```html - + @@ -58,7 +62,7 @@ const dataList = reactive([ 通过`index`设置表格是否显示序号列,默认为`false`。同时也可以传入对象对序号列进行配置,参数同`TableColumnProps` ```html - + @@ -76,7 +80,7 @@ const dataList = reactive([ 通过`stripe`设置表格是否展示斑马纹,默认`true`。 ```html - + @@ -88,7 +92,7 @@ const dataList = reactive([ 通过`border`设置表格是否展示边框,默认`true`。 ```html - + @@ -97,10 +101,10 @@ const dataList = reactive([ ## 表格高度 -通过`height`设置表格高度,默认为`80vh`。 +通过`height`设置表格高度,设置高度后会自动固定表头。 ```html - + @@ -112,7 +116,7 @@ const dataList = reactive([ 当存在列参与排序时,点击会触发`sort-method`排序事件。 ```html - + @@ -133,7 +137,7 @@ function handleSort(e) { ::: details 查看自定义列模版 demo ```html - +