@yidun/antd-super-table 0.1.12 → 0.1.14
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +87 -0
- package/README.md +58 -77
- package/dist/SuperTable.vue.d.ts +59 -4
- package/dist/components/EllipsisElement.vue.d.ts +73 -1
- package/dist/components/FormSearchParams.vue.d.ts +220 -1
- package/dist/index.js +2019 -1814
- package/dist/interface.d.ts +33 -0
- package/dist/utils/index.d.ts +5 -0
- package/example/formItems.ts +1 -0
- package/example/index.vue +233 -134
- package/example/tableColumns.ts +12 -0
- package/package.json +3 -2
package/CHANGELOG.md
ADDED
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
All notable changes to `@yidun/antd-super-table` will be documented in this file.
|
|
4
|
+
|
|
5
|
+
## 0.1.14
|
|
6
|
+
|
|
7
|
+
- ✨ 查询条件操作区新增插槽 `searchActionsExtra`:与内置查询/重置/高级筛选/展开同一行右侧,作用域参数 `loading` / `search` / `reset`
|
|
8
|
+
- 🐛 修复关闭「展开/收起」时,若本地缓存为收起态导致仅显示第一行查询条件的问题
|
|
9
|
+
- 🐛 修复 `type: 'component'` 查询项误走 input-group 从而在左侧展示 label 的问题(与 `showLabel` 语义一致)
|
|
10
|
+
- 🔧 修复构建:`SuperTable.vue` 补充 `SuperTableDataItem` 类型导入,保证 `vue-tsc` 生成声明通过
|
|
11
|
+
- 📚 类型:`SuperTableSearchActionsExtraSlotProps`、`SuperTableSlots.searchActionsExtra`
|
|
12
|
+
- 📚 文档:`README` 补充 `searchOnFormItemChange`、`showExpandButton`、`showResetButton` 及插槽示例(修正 `toolBar` → `toolBarExtra`)
|
|
13
|
+
|
|
14
|
+
## 0.1.13
|
|
15
|
+
|
|
16
|
+
- 🔧 `addonAfter` 展示条件收紧:仅在显式配置非空对象且表单项类型为 `input`(支持 antd Input 的 `addonAfter` 插槽)时渲染;空配置 `{}` 不展示
|
|
17
|
+
|
|
18
|
+
## 0.1.12
|
|
19
|
+
|
|
20
|
+
- ✨ 查询项 `input` 新增 `addonAfter` 能力:
|
|
21
|
+
- 支持 `link + small` 按钮
|
|
22
|
+
- 支持 `text / className / show / disabled / onClick` 配置
|
|
23
|
+
- 兼容历史错拼字段 `addonAffter`、`addonAter`
|
|
24
|
+
- 🧩 查询项视觉与交互优化:
|
|
25
|
+
- `FormFieldItem` 拼接样式优化,减少 label 与输入组件边框断点和缝隙
|
|
26
|
+
- ✨ 请求行为增强:
|
|
27
|
+
- 新增 `autoSearch`,支持关闭自动请求并保留手动查询能力
|
|
28
|
+
- `customQueryParams` 在请求阶段持续合并,切换场景后依然生效
|
|
29
|
+
- ✨ 新增 `enableAdvancedFilter`:
|
|
30
|
+
- 支持 `enableScene=false` 时独立使用“高级筛选”弹窗
|
|
31
|
+
- 不开场景时可按 `fixed/selected` 控制默认展示项
|
|
32
|
+
- 📚 文档与示例更新:
|
|
33
|
+
- 更新 `README` API/用法说明
|
|
34
|
+
- 更新 `example`:新增独立高级筛选开关示例
|
|
35
|
+
|
|
36
|
+
## 0.1.10
|
|
37
|
+
|
|
38
|
+
- ✨ 支持通过列配置 `slotName` 渲染自定义单元格插槽:
|
|
39
|
+
- 当 `column.slotName` 命中外层具名插槽时,优先使用插槽渲染
|
|
40
|
+
- 未命中时保持原有 `table-cell-content` 渲染逻辑(`type/component` 等)不变
|
|
41
|
+
- ✨ 新增自定义单元格插槽类型声明:
|
|
42
|
+
- `SuperTableColumn` 新增 `slotName?: string`
|
|
43
|
+
- `SuperTableSlots` 支持动态具名插槽索引签名
|
|
44
|
+
- 💄 插槽单元格样式增强:
|
|
45
|
+
- 自定义插槽分支新增独立容器样式
|
|
46
|
+
- 对插槽内容设置 `white-space: normal`,避免受单行文本策略影响
|
|
47
|
+
- 📚 示例更新:
|
|
48
|
+
- `example/tableColumns.ts` 增加 `slotName` 列示例
|
|
49
|
+
- `example/index.vue` 增加多行列表 + 非纯文本元素(badge/button/tag)插槽示例
|
|
50
|
+
- ✨ 查询条件新增 `tooltip`(`string | number`):
|
|
51
|
+
- 主页面查询条件标签支持 icon + tooltip(默认 `placement="top"`)
|
|
52
|
+
- 场景弹窗筛选条件行支持 icon + tooltip(默认 `placement="top"`)
|
|
53
|
+
- 🎯 布局一致性优化:
|
|
54
|
+
- 查询条件标签区域按 tooltip 图标预留宽度,避免输入区域换行或遮挡
|
|
55
|
+
- 场景弹窗统一预留 tooltip 占位,无 tooltip 时不展示 icon 但保留宽度
|
|
56
|
+
|
|
57
|
+
## 0.1.6
|
|
58
|
+
|
|
59
|
+
- 🐛 修复依赖问题:将 `jsonpath-plus` 从 `optionalDependencies` 移到 `dependencies`,解决其他项目使用 `npm ci` 时的依赖缺失问题
|
|
60
|
+
- ✨ 优化场景初始化:当没有选中过场景 code 且有默认场景时,自动选中默认场景并触发查询
|
|
61
|
+
- 📝 示例代码优化:添加默认场景配置示例,新增清空缓存功能,场景功能默认开启
|
|
62
|
+
|
|
63
|
+
## 0.1.2
|
|
64
|
+
|
|
65
|
+
- 新增 `tableWrapperStyle` 属性,支持自定义表格容器样式
|
|
66
|
+
- 修复 `toolBarExtra` 插槽在未提供 `tableHead` 时无法展示的问题
|
|
67
|
+
- 修复 `rowKey` 为函数时构建声明文件的类型错误
|
|
68
|
+
|
|
69
|
+
## 0.0.7
|
|
70
|
+
|
|
71
|
+
- 🔄 **重构场景管理 API**:`sceneRequestUrls` 重构为 `sceneRequest`,由 URL 字符串改为请求函数,便于自定义逻辑与错误处理
|
|
72
|
+
- 🔧 **错误处理**:`sceneStorageType` 为 `api` 但未配置 `sceneRequest` 时给出明确提示并降级
|
|
73
|
+
- 🗑️ **架构**:移除 `apiSceneService` 中间层,直接使用 `sceneRequest`
|
|
74
|
+
- 📚 **文档**:补充本地 / API 两种存储模式说明与示例
|
|
75
|
+
- 🖼️ **文档资源**:示例图改为 CDN,修复 npm 包内图片无法展示的问题
|
|
76
|
+
|
|
77
|
+
## 0.0.6
|
|
78
|
+
|
|
79
|
+
- 🐛 修复场景管理相关问题
|
|
80
|
+
- 🐛 修复表格列配置缓存问题
|
|
81
|
+
- 💄 优化 UI 样式与交互
|
|
82
|
+
|
|
83
|
+
## 0.0.2
|
|
84
|
+
|
|
85
|
+
- ✨ 表格拖拽排序、表格配置、自定义查询参数、多种插槽、级联/树形选择等能力
|
|
86
|
+
- 🐛 场景与列配置相关问题修复
|
|
87
|
+
- 📚 TypeScript 类型与文档示例完善
|
package/README.md
CHANGED
|
@@ -445,8 +445,12 @@ export const createFormItems = () => {
|
|
|
445
445
|
| tooltip | string/boolean/function | - | 内容提示信息 |
|
|
446
446
|
| component | Component | - | 自定义组件(type为component时必填) |
|
|
447
447
|
| props | object/function | {} | 传递给组件的属性 |
|
|
448
|
+
| dataIndex | string | - | 数据字段路径(与 customRender 组合时优先于 content) |
|
|
449
|
+
| customRender | function | - | 自定义渲染(优先级高于 content) |
|
|
448
450
|
| width | number | 120 | 列宽度 |
|
|
449
451
|
| visible | boolean | true | 是否可见 |
|
|
452
|
+
| showInExpand | boolean | true | 当 visible=false 且开启 showHiddenColumnsInExpand 时,是否展示在展开区 |
|
|
453
|
+
| expandItemProps | object | {} | 透传给 `a-descriptions-item` 的属性(如 label/span/style) |
|
|
450
454
|
| fixed | string | - | 固定列位置,可选 'left' 或 'right' |
|
|
451
455
|
| copyable | boolean | false | 是否可复制 |
|
|
452
456
|
| ellipsis | boolean | true | 是否超出显示省略号 |
|
|
@@ -639,6 +643,29 @@ const onRowSortEnd = newData => {
|
|
|
639
643
|
</template>
|
|
640
644
|
```
|
|
641
645
|
|
|
646
|
+
### 自定义 locale / theme
|
|
647
|
+
|
|
648
|
+
```vue
|
|
649
|
+
<script setup lang="ts">
|
|
650
|
+
import enUS from 'ant-design-vue/es/locale/en_US'
|
|
651
|
+
</script>
|
|
652
|
+
|
|
653
|
+
<template>
|
|
654
|
+
<SuperTable
|
|
655
|
+
:form-items="formItems"
|
|
656
|
+
:columns="columns"
|
|
657
|
+
:request="onRequest"
|
|
658
|
+
:locale="enUS"
|
|
659
|
+
:theme="{
|
|
660
|
+
token: {
|
|
661
|
+
colorPrimary: '#1677ff',
|
|
662
|
+
borderRadius: 6,
|
|
663
|
+
},
|
|
664
|
+
}"
|
|
665
|
+
/>
|
|
666
|
+
</template>
|
|
667
|
+
```
|
|
668
|
+
|
|
642
669
|
### 关闭场景,仅使用高级筛选
|
|
643
670
|
|
|
644
671
|
```vue
|
|
@@ -653,6 +680,20 @@ const onRowSortEnd = newData => {
|
|
|
653
680
|
</template>
|
|
654
681
|
```
|
|
655
682
|
|
|
683
|
+
### 隐藏列在展开区展示
|
|
684
|
+
|
|
685
|
+
```vue
|
|
686
|
+
<template>
|
|
687
|
+
<SuperTable
|
|
688
|
+
:form-items="formItems"
|
|
689
|
+
:columns="columns"
|
|
690
|
+
:request="onRequest"
|
|
691
|
+
:show-hidden-columns-in-expand="true"
|
|
692
|
+
:expand-descriptions-props="{ bordered: true, column: 2, labelStyle: { width: '150px' } }"
|
|
693
|
+
/>
|
|
694
|
+
</template>
|
|
695
|
+
```
|
|
696
|
+
|
|
656
697
|
### 插槽使用
|
|
657
698
|
|
|
658
699
|
```vue
|
|
@@ -673,11 +714,17 @@ const onRowSortEnd = newData => {
|
|
|
673
714
|
<h3>用户列表</h3>
|
|
674
715
|
</template>
|
|
675
716
|
|
|
676
|
-
<!--
|
|
677
|
-
<template #
|
|
717
|
+
<!-- 工具栏额外区域 -->
|
|
718
|
+
<template #toolBarExtra>
|
|
678
719
|
<a-button type="primary">新增用户</a-button>
|
|
679
720
|
</template>
|
|
680
721
|
|
|
722
|
+
<!-- 查询条件行操作区扩展(与查询/重置/展开等同一行右侧,`enableScene=false` 时常见) -->
|
|
723
|
+
<template #searchActionsExtra="{ search, reset, loading }">
|
|
724
|
+
<a-button :loading="loading" @click="search">扩展查询</a-button>
|
|
725
|
+
<a-button @click="reset">扩展重置</a-button>
|
|
726
|
+
</template>
|
|
727
|
+
|
|
681
728
|
<!-- 表格底部 -->
|
|
682
729
|
<template #tableFoot>
|
|
683
730
|
<div>总计: {{ total }} 条数据</div>
|
|
@@ -711,13 +758,20 @@ const onRowSortEnd = newData => {
|
|
|
711
758
|
| debounceWait | 查询防抖时间(ms) | `number` | `100` |
|
|
712
759
|
| refreshDeps | 依赖刷新选项 | `any[]` | `[]` |
|
|
713
760
|
| tableProps | 表格属性 | `TableProps` | `{}` |
|
|
761
|
+
| locale | ConfigProvider locale 配置 | `object` | `zhCN` |
|
|
762
|
+
| theme | ConfigProvider theme 配置 | `object` | `{ token: { borderRadius: 2 } }` |
|
|
714
763
|
| formatDataSource | 转换表格数据 | `(data: any[]) => any[]` | `(data) => data` |
|
|
715
764
|
| sortable | 是否可排序 | `boolean` | `false` |
|
|
716
765
|
| wrapperStyle | 容器样式 | `object` | `{}` |
|
|
717
766
|
| tableWrapperStyle | 表格容器样式 | `object` | `{}` |
|
|
718
767
|
| customQueryParams | 默认查询条件 | `object` | `{}` |
|
|
719
768
|
| autoSearch | 是否自动发起查询 | `boolean` | `true` |
|
|
720
|
-
|
|
|
769
|
+
| searchOnFormItemChange | 表单项变更后是否自动触发查询(`quiet` 项除外) | `boolean` | `true` |
|
|
770
|
+
| showHiddenColumnsInExpand | 是否将隐藏列展示在展开区域 | `boolean` | `false` |
|
|
771
|
+
| expandDescriptionsProps | 展开区域 `a-descriptions` 属性透传 | `object` | `{}` |
|
|
772
|
+
| showRefreshButton | 展示刷新按钮(依赖场景区域) | `boolean` | `false` |
|
|
773
|
+
| showExpandButton | 查询条件是否展示展开/收起 | `boolean` | `false` |
|
|
774
|
+
| showResetButton | 是否展示重置(仅 `enableScene=false` 时生效;未传时非场景下默认展示) | `boolean \| undefined` | `undefined` |
|
|
721
775
|
| enableTableConfig | 开启表格设置 | `boolean` | `true` |
|
|
722
776
|
|
|
723
777
|
### Events
|
|
@@ -1046,77 +1100,4 @@ export interface SuperTableAntdProps extends TableProps {
|
|
|
1046
1100
|
|
|
1047
1101
|
## 更新日志
|
|
1048
1102
|
|
|
1049
|
-
|
|
1050
|
-
|
|
1051
|
-
- ✨ 查询项 `input` 新增 `addonAfter`:支持 `link + small` 按钮、`className` 和点击回调
|
|
1052
|
-
- ⚙️ 新增 `autoSearch`:支持在 `enableScene=false` 时关闭自动请求,仅手动查询
|
|
1053
|
-
- 🔒 `customQueryParams` 行为增强:切换场景后仍在请求阶段持续生效
|
|
1054
|
-
- 🧩 新增 `enableAdvancedFilter`:支持不开场景时独立使用“高级筛选”弹窗
|
|
1055
|
-
- 💄 查询项拼接边框样式优化:减少 `label + input/inputNumber` 的视觉缝隙
|
|
1056
|
-
- 📝 详细变更记录见 [CHANGELOG.md](./CHANGELOG.md)
|
|
1057
|
-
|
|
1058
|
-
### v0.1.10
|
|
1059
|
-
|
|
1060
|
-
- ✨ 新增列级自定义单元格插槽能力:支持在列配置中通过 `slotName` 指定外层具名插槽渲染
|
|
1061
|
-
- 🔁 渲染优先级优化:命中 `slotName` 时优先插槽渲染,未命中时继续使用原有 `type/component` 渲染
|
|
1062
|
-
- 🎨 样式优化:自定义插槽单元格新增容器,并默认 `white-space: normal` 以支持多行内容展示
|
|
1063
|
-
- ✨ 查询条件新增 `tooltip`(`string | number`)能力:主页面与场景弹窗均支持 icon 悬浮提示(默认 top)
|
|
1064
|
-
- 🎯 场景弹窗 tooltip 区域宽度统一预留:无 tooltip 时不展示 icon,但保留占位,避免布局抖动
|
|
1065
|
-
- 🧩 示例补充:新增 `slotName` 列配置与多行列表插槽示例(含 badge/button/tag 等非纯文本元素)
|
|
1066
|
-
- 📝 详细变更记录见 [CHANGELOG.md](./CHANGELOG.md)
|
|
1067
|
-
|
|
1068
|
-
### v0.0.7
|
|
1069
|
-
|
|
1070
|
-
- 🔄 **重构场景管理API**:
|
|
1071
|
-
- 将 `sceneRequestUrls` 重构为 `sceneRequest`
|
|
1072
|
-
- 从传递URL字符串改为传递请求函数,提供更大的灵活性
|
|
1073
|
-
- 支持自定义请求逻辑、错误处理和认证机制
|
|
1074
|
-
- 🔧 **优化错误处理**:
|
|
1075
|
-
- 当 `sceneStorageType` 为 `'api'` 但未提供 `sceneRequest` 时,提供清晰的错误提示
|
|
1076
|
-
- 实现优雅降级,避免应用崩溃
|
|
1077
|
-
- 🗑️ **移除冗余代码**:
|
|
1078
|
-
- 删除 `apiSceneService` 中间层,直接使用 `sceneRequest`
|
|
1079
|
-
- 简化架构,提高代码可维护性
|
|
1080
|
-
- 📚 **完善文档**:
|
|
1081
|
-
- 更新API文档和类型定义
|
|
1082
|
-
- 添加详细的配置示例和错误处理说明
|
|
1083
|
-
- 提供本地存储和API存储两种模式的完整示例
|
|
1084
|
-
- 🖼️ **修复文档图片**:
|
|
1085
|
-
- 修复 npm 包中示例图片无法显示的问题
|
|
1086
|
-
- 使用 CDN 方式确保图片在不同平台都能正确显示
|
|
1087
|
-
|
|
1088
|
-
### v0.0.6
|
|
1089
|
-
|
|
1090
|
-
- 🐛 修复场景管理相关问题
|
|
1091
|
-
- 🐛 修复表格列配置缓存问题
|
|
1092
|
-
- 💄 优化UI样式和交互体验
|
|
1093
|
-
|
|
1094
|
-
### v0.0.2
|
|
1095
|
-
|
|
1096
|
-
- ✨ 新增表格拖拽排序功能
|
|
1097
|
-
- ✨ 新增表格配置功能
|
|
1098
|
-
- ✨ 新增自定义查询参数支持
|
|
1099
|
-
- ✨ 新增多种插槽支持
|
|
1100
|
-
- ✨ 新增级联选择和树形选择组件
|
|
1101
|
-
- 🐛 修复场景管理相关问题
|
|
1102
|
-
- 🐛 修复表格列配置缓存问题
|
|
1103
|
-
- 💄 优化UI样式和交互体验
|
|
1104
|
-
- 📚 完善TypeScript类型定义
|
|
1105
|
-
- 📚 更新文档和示例代码
|
|
1106
|
-
|
|
1107
|
-
## 更新记录
|
|
1108
|
-
|
|
1109
|
-
### 0.1.6
|
|
1110
|
-
|
|
1111
|
-
- 🐛 **修复依赖问题**:将 `jsonpath-plus` 从 `optionalDependencies` 移到 `dependencies`,解决其他项目使用 `npm ci` 时的依赖缺失问题
|
|
1112
|
-
- ✨ **优化场景初始化**:当没有选中过场景 code 且有默认场景时,自动选中默认场景并触发查询
|
|
1113
|
-
- 📝 **示例代码优化**:
|
|
1114
|
-
- 添加默认场景配置示例
|
|
1115
|
-
- 新增清空缓存功能
|
|
1116
|
-
- 场景功能默认开启
|
|
1117
|
-
|
|
1118
|
-
### 0.1.2
|
|
1119
|
-
|
|
1120
|
-
- 新增 `tableWrapperStyle` 属性,支持自定义表格容器样式。
|
|
1121
|
-
- 修复 `toolBarExtra` 插槽在未提供 `tableHead` 时无法展示的问题。
|
|
1122
|
-
- 修复 `rowKey` 为函数时构建声明文件的类型错误。
|
|
1103
|
+
版本与变更说明统一在 **[CHANGELOG.md](./CHANGELOG.md)** 维护;发版时请更新该文件,避免与本文重复。
|
package/dist/SuperTable.vue.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import 'dayjs/locale/zh-cn';
|
|
2
2
|
import type { PropType } from 'vue';
|
|
3
3
|
import type { TableProps } from 'ant-design-vue';
|
|
4
|
-
import type { SuperTableFormItem, SuperTableColumn, SuperTableRequestFunction, SuperTableDefaultSceneConfig, SuperTableSceneRequestConfig, SuperTableSlots } from './interface';
|
|
4
|
+
import type { SuperTableFormItem, SuperTableColumn, SuperTableDataItem, SuperTableRequestFunction, SuperTableDefaultSceneConfig, SuperTableSceneRequestConfig, SuperTableSlots } from './interface';
|
|
5
5
|
type __VLS_Slots = SuperTableSlots;
|
|
6
6
|
declare const __VLS_component: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
|
|
7
7
|
/**
|
|
@@ -27,6 +27,11 @@ declare const __VLS_component: import("vue").DefineComponent<import("vue").Extra
|
|
|
27
27
|
type: NumberConstructor;
|
|
28
28
|
default: number;
|
|
29
29
|
};
|
|
30
|
+
/** 表单项变更后是否自动触发搜索(未配置时沿用 enableScene 行为) */
|
|
31
|
+
searchOnFormItemChange: {
|
|
32
|
+
type: BooleanConstructor;
|
|
33
|
+
default: boolean;
|
|
34
|
+
};
|
|
30
35
|
/** 查询条件配置 */
|
|
31
36
|
formItems: {
|
|
32
37
|
type: PropType<SuperTableFormItem[]>;
|
|
@@ -62,6 +67,16 @@ declare const __VLS_component: import("vue").DefineComponent<import("vue").Extra
|
|
|
62
67
|
type: PropType<TableProps>;
|
|
63
68
|
default: () => {};
|
|
64
69
|
};
|
|
70
|
+
/** ConfigProvider locale 配置 */
|
|
71
|
+
locale: {
|
|
72
|
+
type: PropType<Record<string, any>>;
|
|
73
|
+
default: undefined;
|
|
74
|
+
};
|
|
75
|
+
/** ConfigProvider theme 配置 */
|
|
76
|
+
theme: {
|
|
77
|
+
type: PropType<Record<string, any>>;
|
|
78
|
+
default: undefined;
|
|
79
|
+
};
|
|
65
80
|
/** 转换表格数据 */
|
|
66
81
|
formatDataSource: {
|
|
67
82
|
type: PropType<(data: any[]) => any[]>;
|
|
@@ -102,6 +117,16 @@ declare const __VLS_component: import("vue").DefineComponent<import("vue").Extra
|
|
|
102
117
|
type: BooleanConstructor;
|
|
103
118
|
default: boolean;
|
|
104
119
|
};
|
|
120
|
+
/** 是否将隐藏列自动展示在展开区域 */
|
|
121
|
+
showHiddenColumnsInExpand: {
|
|
122
|
+
type: BooleanConstructor;
|
|
123
|
+
default: boolean;
|
|
124
|
+
};
|
|
125
|
+
/** 展开区域 Descriptions 组件属性 */
|
|
126
|
+
expandDescriptionsProps: {
|
|
127
|
+
type: PropType<Record<string, any>>;
|
|
128
|
+
default: () => {};
|
|
129
|
+
};
|
|
105
130
|
/**
|
|
106
131
|
* 是否显示展开/收起按钮
|
|
107
132
|
* 默认 false,可通过开关控制,不受 enableScene 影响
|
|
@@ -144,9 +169,9 @@ declare const __VLS_component: import("vue").DefineComponent<import("vue").Extra
|
|
|
144
169
|
onRefresh: (force?: boolean) => void;
|
|
145
170
|
onResetForm: () => void;
|
|
146
171
|
isInitialized: import("vue").Ref<boolean, boolean>;
|
|
147
|
-
getTableData():
|
|
148
|
-
setTableData(data:
|
|
149
|
-
setTableDataItem(index: number, data: Partial<
|
|
172
|
+
getTableData(): SuperTableDataItem[];
|
|
173
|
+
setTableData(data: SuperTableDataItem[]): void;
|
|
174
|
+
setTableDataItem(index: number, data: Partial<SuperTableDataItem>): void;
|
|
150
175
|
getFormItem(name: string): SuperTableFormItem | undefined;
|
|
151
176
|
setFormItem(name: string, keyPath: string, newConfig: any): void;
|
|
152
177
|
getFormValues(name?: string | string[]): Record<string, any>;
|
|
@@ -186,6 +211,11 @@ declare const __VLS_component: import("vue").DefineComponent<import("vue").Extra
|
|
|
186
211
|
type: NumberConstructor;
|
|
187
212
|
default: number;
|
|
188
213
|
};
|
|
214
|
+
/** 表单项变更后是否自动触发搜索(未配置时沿用 enableScene 行为) */
|
|
215
|
+
searchOnFormItemChange: {
|
|
216
|
+
type: BooleanConstructor;
|
|
217
|
+
default: boolean;
|
|
218
|
+
};
|
|
189
219
|
/** 查询条件配置 */
|
|
190
220
|
formItems: {
|
|
191
221
|
type: PropType<SuperTableFormItem[]>;
|
|
@@ -221,6 +251,16 @@ declare const __VLS_component: import("vue").DefineComponent<import("vue").Extra
|
|
|
221
251
|
type: PropType<TableProps>;
|
|
222
252
|
default: () => {};
|
|
223
253
|
};
|
|
254
|
+
/** ConfigProvider locale 配置 */
|
|
255
|
+
locale: {
|
|
256
|
+
type: PropType<Record<string, any>>;
|
|
257
|
+
default: undefined;
|
|
258
|
+
};
|
|
259
|
+
/** ConfigProvider theme 配置 */
|
|
260
|
+
theme: {
|
|
261
|
+
type: PropType<Record<string, any>>;
|
|
262
|
+
default: undefined;
|
|
263
|
+
};
|
|
224
264
|
/** 转换表格数据 */
|
|
225
265
|
formatDataSource: {
|
|
226
266
|
type: PropType<(data: any[]) => any[]>;
|
|
@@ -261,6 +301,16 @@ declare const __VLS_component: import("vue").DefineComponent<import("vue").Extra
|
|
|
261
301
|
type: BooleanConstructor;
|
|
262
302
|
default: boolean;
|
|
263
303
|
};
|
|
304
|
+
/** 是否将隐藏列自动展示在展开区域 */
|
|
305
|
+
showHiddenColumnsInExpand: {
|
|
306
|
+
type: BooleanConstructor;
|
|
307
|
+
default: boolean;
|
|
308
|
+
};
|
|
309
|
+
/** 展开区域 Descriptions 组件属性 */
|
|
310
|
+
expandDescriptionsProps: {
|
|
311
|
+
type: PropType<Record<string, any>>;
|
|
312
|
+
default: () => {};
|
|
313
|
+
};
|
|
264
314
|
/**
|
|
265
315
|
* 是否显示展开/收起按钮
|
|
266
316
|
* 默认 false,可通过开关控制,不受 enableScene 影响
|
|
@@ -310,7 +360,9 @@ declare const __VLS_component: import("vue").DefineComponent<import("vue").Extra
|
|
|
310
360
|
"onResize-column"?: ((width: number, column: SuperTableColumn) => any) | undefined;
|
|
311
361
|
}>, {
|
|
312
362
|
columns: SuperTableColumn[];
|
|
363
|
+
theme: Record<string, any>;
|
|
313
364
|
sortable: boolean;
|
|
365
|
+
locale: Record<string, any>;
|
|
314
366
|
formItems: SuperTableFormItem[];
|
|
315
367
|
formItemColSpan: number;
|
|
316
368
|
enableScene: boolean;
|
|
@@ -319,6 +371,7 @@ declare const __VLS_component: import("vue").DefineComponent<import("vue").Extra
|
|
|
319
371
|
sceneType: string;
|
|
320
372
|
maxSceneCount: number;
|
|
321
373
|
debounceWait: number;
|
|
374
|
+
searchOnFormItemChange: boolean;
|
|
322
375
|
refreshDeps: unknown[];
|
|
323
376
|
autoSearch: boolean;
|
|
324
377
|
tableProps: TableProps<any>;
|
|
@@ -328,6 +381,8 @@ declare const __VLS_component: import("vue").DefineComponent<import("vue").Extra
|
|
|
328
381
|
customQueryParams: Record<string, any>;
|
|
329
382
|
showRefreshButton: boolean;
|
|
330
383
|
enableAdvancedFilter: boolean;
|
|
384
|
+
showHiddenColumnsInExpand: boolean;
|
|
385
|
+
expandDescriptionsProps: Record<string, any>;
|
|
331
386
|
defaultScene: SuperTableDefaultSceneConfig | SuperTableDefaultSceneConfig[];
|
|
332
387
|
sceneStorageType: "local" | "api";
|
|
333
388
|
sceneRequest: SuperTableSceneRequestConfig;
|
|
@@ -2,6 +2,7 @@ import { DownOutlined } from '@ant-design/icons-vue';
|
|
|
2
2
|
import { SuperTableColumnTypeEnum } from '../config';
|
|
3
3
|
import type { PropType } from 'vue';
|
|
4
4
|
import type { SuperTableDataItem, SuperTableColumnType } from '../interface';
|
|
5
|
+
declare const resolvedFlexDirection: import("vue").ComputedRef<"row" | "column">;
|
|
5
6
|
/**
|
|
6
7
|
* 展示出来的节点列表
|
|
7
8
|
* @returns {Record<string, any>[]} 可见的节点列表
|
|
@@ -34,14 +35,22 @@ declare const __VLS_ctx: {
|
|
|
34
35
|
"elementItem": string;
|
|
35
36
|
} & {
|
|
36
37
|
"ellipsisElementHasGap": string;
|
|
38
|
+
} & {
|
|
39
|
+
"ellipsisElementVertical": string;
|
|
40
|
+
} & {
|
|
41
|
+
"elementItem": string;
|
|
37
42
|
} & {
|
|
38
43
|
"flexWrap": string;
|
|
39
44
|
} & {
|
|
40
45
|
"ellipsisTag": string;
|
|
46
|
+
} & {
|
|
47
|
+
"ellipsisTagAutoWidth": string;
|
|
41
48
|
} & {
|
|
42
49
|
"imageEllipsisTag": string;
|
|
43
50
|
} & {
|
|
44
51
|
"ellipsisList": string;
|
|
52
|
+
} & {
|
|
53
|
+
"ellipsisListVertical": string;
|
|
45
54
|
}>;
|
|
46
55
|
$: import("vue").ComponentInternalInstance;
|
|
47
56
|
$data: {};
|
|
@@ -52,6 +61,8 @@ declare const __VLS_ctx: {
|
|
|
52
61
|
maxCount: number;
|
|
53
62
|
displayType: string;
|
|
54
63
|
trigger: string | unknown[];
|
|
64
|
+
flexDirection: "row" | "column";
|
|
65
|
+
layout: "horizontal" | "vertical";
|
|
55
66
|
}> & Omit<{
|
|
56
67
|
readonly type: SuperTableColumnType;
|
|
57
68
|
readonly record: SuperTableDataItem;
|
|
@@ -60,7 +71,9 @@ declare const __VLS_ctx: {
|
|
|
60
71
|
readonly maxCount: number;
|
|
61
72
|
readonly displayType: string;
|
|
62
73
|
readonly trigger: string | unknown[];
|
|
63
|
-
|
|
74
|
+
readonly flexDirection: "row" | "column";
|
|
75
|
+
readonly layout?: "horizontal" | "vertical" | undefined;
|
|
76
|
+
} & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, "type" | "cellWidth" | "list" | "maxCount" | "displayType" | "trigger" | "flexDirection" | "layout">;
|
|
64
77
|
$attrs: {
|
|
65
78
|
[x: string]: unknown;
|
|
66
79
|
};
|
|
@@ -138,9 +151,27 @@ declare const __VLS_ctx: {
|
|
|
138
151
|
type: (StringConstructor | ArrayConstructor)[];
|
|
139
152
|
default: string;
|
|
140
153
|
};
|
|
154
|
+
/**
|
|
155
|
+
* 列表排布方向
|
|
156
|
+
* @type {'row' | 'column'}
|
|
157
|
+
* @default 'row'
|
|
158
|
+
*/
|
|
159
|
+
flexDirection: {
|
|
160
|
+
type: PropType<"row" | "column">;
|
|
161
|
+
default: string;
|
|
162
|
+
};
|
|
163
|
+
/**
|
|
164
|
+
* 兼容字段(不推荐)
|
|
165
|
+
* @deprecated 请使用 flexDirection
|
|
166
|
+
*/
|
|
167
|
+
layout: {
|
|
168
|
+
type: PropType<"horizontal" | "vertical">;
|
|
169
|
+
default: undefined;
|
|
170
|
+
};
|
|
141
171
|
}>> & Readonly<{}>, {
|
|
142
172
|
DownOutlined: typeof DownOutlined;
|
|
143
173
|
SuperTableColumnTypeEnum: typeof SuperTableColumnTypeEnum;
|
|
174
|
+
resolvedFlexDirection: typeof resolvedFlexDirection;
|
|
144
175
|
visibleList: typeof visibleList;
|
|
145
176
|
ellipsisList: typeof ellipsisList;
|
|
146
177
|
ellipsisMenuItems: typeof ellipsisMenuItems;
|
|
@@ -152,6 +183,8 @@ declare const __VLS_ctx: {
|
|
|
152
183
|
maxCount: number;
|
|
153
184
|
displayType: string;
|
|
154
185
|
trigger: string | unknown[];
|
|
186
|
+
flexDirection: "row" | "column";
|
|
187
|
+
layout: "horizontal" | "vertical";
|
|
155
188
|
}, {}, string, {}, import("vue").GlobalComponents, import("vue").GlobalDirectives, string, import("vue").ComponentProvideOptions> & {
|
|
156
189
|
beforeCreate?: (() => void) | (() => void)[];
|
|
157
190
|
created?: (() => void) | (() => void)[];
|
|
@@ -178,9 +211,12 @@ declare const __VLS_ctx: {
|
|
|
178
211
|
maxCount: number;
|
|
179
212
|
displayType: string;
|
|
180
213
|
trigger: string | unknown[];
|
|
214
|
+
flexDirection: "row" | "column";
|
|
215
|
+
layout: "horizontal" | "vertical";
|
|
181
216
|
record: SuperTableDataItem;
|
|
182
217
|
DownOutlined: typeof DownOutlined;
|
|
183
218
|
SuperTableColumnTypeEnum: typeof SuperTableColumnTypeEnum;
|
|
219
|
+
resolvedFlexDirection: "row" | "column";
|
|
184
220
|
visibleList: Record<string, any>[];
|
|
185
221
|
ellipsisList: Record<string, any>[];
|
|
186
222
|
ellipsisMenuItems: {
|
|
@@ -267,6 +303,23 @@ declare const __VLS_component: import("vue").DefineComponent<import("vue").Extra
|
|
|
267
303
|
type: (StringConstructor | ArrayConstructor)[];
|
|
268
304
|
default: string;
|
|
269
305
|
};
|
|
306
|
+
/**
|
|
307
|
+
* 列表排布方向
|
|
308
|
+
* @type {'row' | 'column'}
|
|
309
|
+
* @default 'row'
|
|
310
|
+
*/
|
|
311
|
+
flexDirection: {
|
|
312
|
+
type: PropType<"row" | "column">;
|
|
313
|
+
default: string;
|
|
314
|
+
};
|
|
315
|
+
/**
|
|
316
|
+
* 兼容字段(不推荐)
|
|
317
|
+
* @deprecated 请使用 flexDirection
|
|
318
|
+
*/
|
|
319
|
+
layout: {
|
|
320
|
+
type: PropType<"horizontal" | "vertical">;
|
|
321
|
+
default: undefined;
|
|
322
|
+
};
|
|
270
323
|
}>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
271
324
|
/**
|
|
272
325
|
* 当前行数据
|
|
@@ -330,6 +383,23 @@ declare const __VLS_component: import("vue").DefineComponent<import("vue").Extra
|
|
|
330
383
|
type: (StringConstructor | ArrayConstructor)[];
|
|
331
384
|
default: string;
|
|
332
385
|
};
|
|
386
|
+
/**
|
|
387
|
+
* 列表排布方向
|
|
388
|
+
* @type {'row' | 'column'}
|
|
389
|
+
* @default 'row'
|
|
390
|
+
*/
|
|
391
|
+
flexDirection: {
|
|
392
|
+
type: PropType<"row" | "column">;
|
|
393
|
+
default: string;
|
|
394
|
+
};
|
|
395
|
+
/**
|
|
396
|
+
* 兼容字段(不推荐)
|
|
397
|
+
* @deprecated 请使用 flexDirection
|
|
398
|
+
*/
|
|
399
|
+
layout: {
|
|
400
|
+
type: PropType<"horizontal" | "vertical">;
|
|
401
|
+
default: undefined;
|
|
402
|
+
};
|
|
333
403
|
}>> & Readonly<{}>, {
|
|
334
404
|
type: SuperTableColumnType;
|
|
335
405
|
cellWidth: number;
|
|
@@ -337,6 +407,8 @@ declare const __VLS_component: import("vue").DefineComponent<import("vue").Extra
|
|
|
337
407
|
maxCount: number;
|
|
338
408
|
displayType: string;
|
|
339
409
|
trigger: string | unknown[];
|
|
410
|
+
flexDirection: "row" | "column";
|
|
411
|
+
layout: "horizontal" | "vertical";
|
|
340
412
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
341
413
|
declare const _default: __VLS_WithSlots<typeof __VLS_component, __VLS_Slots>;
|
|
342
414
|
export default _default;
|