@@ -52,8 +52,8 @@ const page = reactive({ current: 1, limit: 10, total: 100 });
52
52
53
53
const columns = ref ([
54
54
{ title: " 选项" , width: " 55px" , type: " checkbox" , fixed: " left" },
55
- { title: " 编号" , width: " 80px" , key: " id" , fixed: " left" , sort: " desc " },
56
- { title: " 姓名" , width: " 80px" , key: " name" , sort: " desc " },
55
+ { title: " 编号" , width: " 80px" , key: " id" , fixed: " left" , sort: true },
56
+ { title: " 姓名" , width: " 80px" , key: " name" , sort: true },
57
57
{ title: " 状态" , width: " 180px" , key: " status" , customSlot: " status" },
58
58
{ title: " 邮箱" , width: " 120px" , key: " email" },
59
59
{ title: " 性别" , width: " 80px" , key: " sex" },
@@ -152,7 +152,7 @@ const loadDataSource = (page, pageSize) => {
152
152
import { ref } from ' vue'
153
153
154
154
const columns2 = [
155
- { title: " 编号" , width: " 80px" , key: " id" , fixed: " left" , sort: " desc " },
155
+ { title: " 编号" , width: " 80px" , key: " id" , fixed: " left" , sort: true },
156
156
{ title: " 姓名" , width: " 80px" , key: " name" },
157
157
{ title: " 班级" , width: " 120px" , key: " classes" },
158
158
{ title: " 语文" , width: " 80px" , key: " chinese" },
@@ -787,7 +787,7 @@ const dataSource9 = ref([
787
787
import { ref } from ' vue'
788
788
789
789
const columns2 = [
790
- { title: " 编号" , width: " 80px" , key: " id" , fixed: " left" , sort: " desc " },
790
+ { title: " 编号" , width: " 80px" , key: " id" , fixed: " left" , sort: true },
791
791
{ title: " 姓名" , width: " 80px" , key: " name" },
792
792
{ title: " 班级" , width: " 120px" , key: " classes" },
793
793
{
@@ -847,7 +847,7 @@ const defaultExpandAll2 = ref(false)
847
847
import { ref } from ' vue'
848
848
849
849
const columns11 = [
850
- { title: " 编号" , width: " 80px" , key: " id" , fixed: " left" , sort: " desc " },
850
+ { title: " 编号" , width: " 80px" , key: " id" , fixed: " left" , sort: true },
851
851
{ title: " 姓名" , width: " 80px" , key: " name" },
852
852
]
853
853
@@ -926,7 +926,7 @@ const defaultToolbars = [
926
926
| row-contextmenu | 行右击 | { row: 当前行数据 } |
927
927
| cell-double | 单元格双击 | data:当前单元格信息, event |
928
928
| change | 分页事件。<span style="color: red;">将在未来版本废弃,请替换为` page .change ` </span> | { current: 当前页码, limit: 每页数量 } |
929
- | sort-change | 排序事件 | sort: string |
929
+ | sort-change | 点击排序事件 | key: 当前column.key, nextSort: 排序字段 |
930
930
| expand-change ` 2.18 .0 ` | 行展开/收起 | data:当前单元格信息, event |
931
931
| checkbox ` 2.22 .0 ` | 单行 checkbox 事件 | state: 是否选中, data: 点击行数据源 |
932
932
| checkbox-all ` 2.22 .0 ` | 全选 checkbox 事件 | selectedKeys: 选中数据 |
@@ -974,7 +974,7 @@ const defaultToolbars = [
974
974
| customSlot | 自定义插槽 | ` string` ` function ` 参数{row, data, column, rowIndex, columnIndex} | -- | -- | `2.17.2`新增`function ` |
975
975
| width | 宽度 | -- | -- | -- | -- |
976
976
| minWidth | 最小宽度 | -- | `100px` | -- | -- |
977
- | sort | 排序 ,当值为字符串 `custom` 可通过 `sort-change` 事件自定义/服务端设置排序解结果 | `boolean`/ `string ` | `false` | -- | -- |
977
+ | sort | 是否排序 ,当值为字符串 `custom` 不会触发内部排序逻辑, 可通过 `sort-change` 事件自定义/服务端设置排序解结果 | `boolean`/ `custom ` | `false` | -- | -- |
978
978
| titleSlot | 标题自定义插槽 | `string` `function ` 参数{column, columnIndex} | -- | -- | `2.22.1`新增`function ` |
979
979
| align | 对齐方式 | `string` | `left` | `left` `right` `center` | -- |
980
980
| ellipsisTooltip | 当内容过长被隐藏时显示 tooltip | `boolean` | `false` | `true` `false` | -- |
0 commit comments