vxe-table 4.5.0-beta.2 → 4.5.0-beta.20
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/README.en.md +10 -8
- package/README.md +17 -13
- package/README.zh-TW.md +10 -8
- package/es/button/src/button.js +5 -4
- package/es/edit/src/hook.js +30 -21
- package/es/export/src/hook.js +2 -1
- package/es/filter/src/hook.js +9 -3
- package/es/footer/src/footer.js +5 -1
- package/es/form/src/form.js +31 -6
- package/es/grid/src/grid.js +70 -36
- package/es/icon/style.css +1 -1
- package/es/input/src/input.js +10 -1
- package/es/locale/lang/en-US.js +8 -0
- package/es/locale/lang/es-ES.js +8 -0
- package/es/locale/lang/ja-JP.js +8 -0
- package/es/locale/lang/pt-BR.d.ts +2 -0
- package/es/locale/lang/pt-BR.js +323 -0
- package/es/locale/lang/zh-CN.js +8 -0
- package/es/locale/lang/zh-TC.js +8 -0
- package/es/menu/src/hooks.js +3 -3
- package/es/pulldown/src/pulldown.js +5 -3
- package/es/select/src/select.js +7 -3
- package/es/style.css +1 -1
- package/es/style.min.css +1 -1
- package/es/table/src/body.js +20 -14
- package/es/table/src/cell.js +23 -17
- package/es/table/src/columnInfo.js +9 -9
- package/es/table/src/props.js +2 -0
- package/es/table/src/table.js +370 -241
- package/es/table/style.css +50 -3
- package/es/textarea/src/textarea.js +4 -1
- package/es/toolbar/src/toolbar.js +26 -6
- package/es/tools/log.js +1 -1
- package/es/tooltip/src/tooltip.js +3 -2
- package/es/tooltip/style.css +0 -6
- package/es/v-x-e-table/index.js +4 -1
- package/es/v-x-e-table/src/commands.js +51 -2
- package/es/v-x-e-table/src/conf.js +7 -4
- package/es/v-x-e-table/src/formats.js +51 -2
- package/es/v-x-e-table/src/menus.js +51 -2
- package/es/v-x-e-table/src/renderer.js +6 -1
- package/es/v-x-e-table/src/store.js +4 -1
- package/es/v-x-e-table/src/validators.js +5 -0
- package/es/validator/src/hook.js +110 -22
- package/es/vxe-table/style.css +50 -3
- package/es/vxe-tooltip/style.css +0 -6
- package/helper/vetur/attributes.json +26 -6
- package/helper/vetur/tags.json +5 -0
- package/lib/button/src/button.js +9 -3
- package/lib/button/src/button.min.js +1 -1
- package/lib/edit/src/hook.js +30 -24
- package/lib/edit/src/hook.min.js +1 -1
- package/lib/export/src/hook.js +2 -1
- package/lib/export/src/hook.min.js +1 -1
- package/lib/filter/src/hook.js +20 -9
- package/lib/filter/src/hook.min.js +1 -1
- package/lib/footer/src/footer.js +6 -1
- package/lib/footer/src/footer.min.js +1 -1
- package/lib/form/src/form.js +27 -5
- package/lib/form/src/form.min.js +1 -1
- package/lib/grid/src/grid.js +75 -41
- package/lib/grid/src/grid.min.js +1 -1
- package/lib/icon/style/style.css +1 -1
- package/lib/icon/style/style.min.css +1 -1
- package/lib/index.umd.js +997 -430
- package/lib/index.umd.min.js +1 -1
- package/lib/input/src/input.js +12 -1
- package/lib/input/src/input.min.js +1 -1
- package/lib/locale/lang/en-US.js +8 -0
- package/lib/locale/lang/en-US.min.js +1 -1
- package/lib/locale/lang/en-US.umd.js +8 -0
- package/lib/locale/lang/es-ES.js +8 -0
- package/lib/locale/lang/es-ES.min.js +1 -1
- package/lib/locale/lang/es-ES.umd.js +8 -0
- package/lib/locale/lang/ja-JP.js +8 -0
- package/lib/locale/lang/ja-JP.min.js +1 -1
- package/lib/locale/lang/ja-JP.umd.js +8 -0
- package/lib/locale/lang/pt-BR.d.ts +2 -0
- package/lib/locale/lang/pt-BR.js +330 -0
- package/lib/locale/lang/pt-BR.min.js +1 -0
- package/lib/locale/lang/pt-BR.umd.js +344 -0
- package/lib/locale/lang/zh-CN.js +8 -0
- package/lib/locale/lang/zh-CN.min.js +1 -1
- package/lib/locale/lang/zh-CN.umd.js +8 -0
- package/lib/locale/lang/zh-HK.min.js +1 -1
- package/lib/locale/lang/zh-HK.umd.js +8 -0
- package/lib/locale/lang/zh-MO.min.js +1 -1
- package/lib/locale/lang/zh-MO.umd.js +8 -0
- package/lib/locale/lang/zh-TC.js +8 -0
- package/lib/locale/lang/zh-TC.min.js +1 -1
- package/lib/locale/lang/zh-TC.umd.js +8 -0
- package/lib/locale/lang/zh-TW.min.js +1 -1
- package/lib/locale/lang/zh-TW.umd.js +8 -0
- package/lib/menu/src/hooks.js +3 -3
- package/lib/menu/src/hooks.min.js +1 -1
- package/lib/pulldown/src/pulldown.js +11 -3
- package/lib/pulldown/src/pulldown.min.js +1 -1
- package/lib/select/src/select.js +11 -2
- package/lib/select/src/select.min.js +1 -1
- package/lib/style.css +1 -1
- package/lib/style.min.css +1 -1
- package/lib/table/src/body.js +23 -15
- package/lib/table/src/body.min.js +1 -1
- package/lib/table/src/cell.js +25 -21
- package/lib/table/src/cell.min.js +1 -1
- package/lib/table/src/columnInfo.js +9 -9
- package/lib/table/src/columnInfo.min.js +1 -1
- package/lib/table/src/props.js +7 -0
- package/lib/table/src/props.min.js +1 -1
- package/lib/table/src/table.js +393 -276
- package/lib/table/src/table.min.js +1 -1
- package/lib/table/style/style.css +50 -3
- package/lib/table/style/style.min.css +1 -1
- package/lib/textarea/src/textarea.js +6 -1
- package/lib/textarea/src/textarea.min.js +1 -1
- package/lib/toolbar/src/toolbar.js +24 -6
- package/lib/toolbar/src/toolbar.min.js +1 -1
- package/lib/tools/log.js +1 -1
- package/lib/tools/log.min.js +1 -1
- package/lib/tooltip/src/tooltip.js +6 -2
- package/lib/tooltip/src/tooltip.min.js +1 -1
- package/lib/tooltip/style/style.css +0 -6
- package/lib/tooltip/style/style.min.css +1 -1
- package/lib/v-x-e-table/index.js +14 -1
- package/lib/v-x-e-table/index.min.js +1 -1
- package/lib/v-x-e-table/src/commands.js +51 -2
- package/lib/v-x-e-table/src/commands.min.js +1 -1
- package/lib/v-x-e-table/src/conf.js +7 -4
- package/lib/v-x-e-table/src/conf.min.js +1 -1
- package/lib/v-x-e-table/src/formats.js +51 -2
- package/lib/v-x-e-table/src/formats.min.js +1 -1
- package/lib/v-x-e-table/src/menus.js +51 -2
- package/lib/v-x-e-table/src/menus.min.js +1 -1
- package/lib/v-x-e-table/src/renderer.js +5 -0
- package/lib/v-x-e-table/src/renderer.min.js +1 -1
- package/lib/v-x-e-table/src/store.js +4 -1
- package/lib/v-x-e-table/src/store.min.js +1 -1
- package/lib/v-x-e-table/src/validators.js +15 -0
- package/lib/v-x-e-table/src/validators.min.js +1 -0
- package/lib/validator/src/hook.js +104 -20
- package/lib/validator/src/hook.min.js +1 -1
- package/lib/vxe-table/style/style.css +50 -3
- package/lib/vxe-table/style/style.min.css +1 -1
- package/lib/vxe-tooltip/style/style.css +0 -6
- package/lib/vxe-tooltip/style/style.min.css +1 -1
- package/package.json +2 -2
- package/packages/button/src/button.ts +5 -4
- package/packages/edit/src/hook.ts +30 -21
- package/packages/export/src/hook.ts +2 -1
- package/packages/filter/src/hook.ts +9 -3
- package/packages/footer/src/footer.ts +5 -1
- package/packages/form/src/form-item.ts +1 -1
- package/packages/form/src/form.ts +27 -6
- package/packages/grid/src/grid.ts +69 -36
- package/packages/input/src/input.ts +10 -1
- package/packages/locale/lang/en-US.ts +8 -0
- package/packages/locale/lang/es-ES.ts +8 -0
- package/packages/locale/lang/ja-JP.ts +8 -0
- package/packages/locale/lang/pt-BR.ts +323 -0
- package/packages/locale/lang/zh-CN.ts +8 -0
- package/packages/locale/lang/zh-TC.ts +8 -0
- package/packages/menu/src/hooks.ts +3 -3
- package/packages/pulldown/src/pulldown.ts +5 -3
- package/packages/select/src/select.ts +7 -3
- package/packages/table/src/body.ts +20 -14
- package/packages/table/src/cell.ts +23 -17
- package/packages/table/src/columnInfo.ts +9 -9
- package/packages/table/src/props.ts +2 -0
- package/packages/table/src/table.ts +367 -230
- package/packages/textarea/src/textarea.ts +4 -1
- package/packages/toolbar/src/toolbar.ts +24 -6
- package/packages/tooltip/src/tooltip.ts +3 -2
- package/packages/v-x-e-table/index.ts +3 -0
- package/packages/v-x-e-table/src/commands.ts +55 -2
- package/packages/v-x-e-table/src/conf.ts +10 -7
- package/packages/v-x-e-table/src/formats.ts +55 -2
- package/packages/v-x-e-table/src/menus.ts +55 -2
- package/packages/v-x-e-table/src/renderer.ts +6 -1
- package/packages/v-x-e-table/src/setup.ts +2 -2
- package/packages/v-x-e-table/src/store.ts +3 -1
- package/packages/v-x-e-table/src/validators.ts +9 -0
- package/packages/validator/src/hook.ts +127 -36
- package/styles/all.scss +30 -0
- package/styles/css-variable.scss +272 -0
- package/styles/cssvar.scss +2 -273
- package/styles/default.scss +2 -0
- package/styles/index.scss +2 -0
- package/styles/modules.scss +4 -1
- package/styles/table.scss +79 -6
- package/styles/tooltip.scss +0 -8
- package/styles/variable.scss +1 -2
- package/types/all.d.ts +2 -2
- package/types/button.d.ts +3 -1
- package/types/edit.d.ts +27 -27
- package/types/export.d.ts +9 -9
- package/types/filter.d.ts +11 -11
- package/types/form.d.ts +9 -12
- package/types/grid.d.ts +22 -0
- package/types/input.d.ts +4 -0
- package/types/keyboard.d.ts +6 -5
- package/types/menu.d.ts +7 -6
- package/types/plugins/pro.d.ts +32 -12
- package/types/pulldown.d.ts +5 -1
- package/types/select.d.ts +2 -0
- package/types/table.d.ts +588 -87
- package/types/toolbar.d.ts +3 -3
- package/types/tooltip.d.ts +2 -0
- package/types/v-x-e-table/commands.d.ts +15 -13
- package/types/v-x-e-table/formats.d.ts +12 -10
- package/types/v-x-e-table/hooks.d.ts +2 -2
- package/types/v-x-e-table/index.d.ts +11 -4
- package/types/v-x-e-table/interceptor.d.ts +7 -7
- package/types/v-x-e-table/menus.d.ts +8 -11
- package/types/v-x-e-table/setup.d.ts +25 -35
- package/types/v-x-e-table/validators.d.ts +30 -0
- package/types/validator.d.ts +18 -6
- /package/es/icon/style/{iconfont.1689121467376.ttf → iconfont.1691021992606.ttf} +0 -0
- /package/es/icon/style/{iconfont.1689121467376.woff → iconfont.1691021992606.woff} +0 -0
- /package/es/icon/style/{iconfont.1689121467376.woff2 → iconfont.1691021992606.woff2} +0 -0
- /package/es/{iconfont.1689121467376.ttf → iconfont.1691021992606.ttf} +0 -0
- /package/es/{iconfont.1689121467376.woff → iconfont.1691021992606.woff} +0 -0
- /package/es/{iconfont.1689121467376.woff2 → iconfont.1691021992606.woff2} +0 -0
- /package/lib/icon/style/{iconfont.1689121467376.ttf → iconfont.1691021992606.ttf} +0 -0
- /package/lib/icon/style/{iconfont.1689121467376.woff → iconfont.1691021992606.woff} +0 -0
- /package/lib/icon/style/{iconfont.1689121467376.woff2 → iconfont.1691021992606.woff2} +0 -0
- /package/lib/{iconfont.1689121467376.ttf → iconfont.1691021992606.ttf} +0 -0
- /package/lib/{iconfont.1689121467376.woff → iconfont.1691021992606.woff} +0 -0
- /package/lib/{iconfont.1689121467376.woff2 → iconfont.1691021992606.woff2} +0 -0
package/README.en.md
CHANGED
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
[](https://github.com/x-extends/vxe-table/pulls?q=is%3Apr+is%3Aclosed)
|
|
13
13
|
[](LICENSE)
|
|
14
14
|
|
|
15
|
-
A [vue](https://www.npmjs.com/package/vue) based PC form component, support add, delete, change, virtual list, virtual tree, lazy load, shortcut menu, data validation, print export, form rendering, data paging, modal window, custom template, renderer,
|
|
15
|
+
A [vue](https://www.npmjs.com/package/vue) based PC form component, support add, delete, change, virtual list, virtual tree, lazy load, shortcut menu, data validation, print export, form rendering, data paging, modal window, custom template, renderer, JSON configuration designed for zero code...
|
|
16
16
|
|
|
17
17
|
* Design concept
|
|
18
18
|
* Efficient and concise API design for modern browsers.
|
|
@@ -20,10 +20,10 @@ A [vue](https://www.npmjs.com/package/vue) based PC form component, support add,
|
|
|
20
20
|
* Designed for single row table editing, supports addition, deletion, modification and query as well as more expansion, with powerful functions and performance at the same time.
|
|
21
21
|
|
|
22
22
|
* Plan
|
|
23
|
-
* [x] ~~v1.0 Based on vue2.6
|
|
24
|
-
* [x] ~~v2.0 Based on vue2.6
|
|
25
|
-
* [x] v3.0 Based on vue2.6
|
|
26
|
-
* [x] v4.0 Based on vue3.2
|
|
23
|
+
* [x] ~~v1.0 Based on vue2.6 < 3, Support for all major browsers.~~
|
|
24
|
+
* [x] ~~v2.0 Based on vue2.6 < 3, Support for all major browsers.~~
|
|
25
|
+
* [x] v3.0 Based on vue2.6 < 3, supports modern browsers and retains compatibility with IE11.
|
|
26
|
+
* [x] v4.0 Based on vue3.2 < 4, Only support modern browser, not IE.
|
|
27
27
|
|
|
28
28
|
## Browser Support
|
|
29
29
|
|
|
@@ -34,12 +34,14 @@ Latest ✔ | Latest ✔ | Latest ✔ | Latest ✔ | Latest ✔ |
|
|
|
34
34
|
## Features
|
|
35
35
|
|
|
36
36
|
* [x] Basic table
|
|
37
|
-
* [x]
|
|
37
|
+
* [x] Configuration grid
|
|
38
|
+
* [x] Base form
|
|
39
|
+
* [x] Configuration form
|
|
38
40
|
* [x] Striped
|
|
39
41
|
* [x] Table with border
|
|
40
42
|
* [x] Cell style
|
|
41
43
|
* [x] Column resizing
|
|
42
|
-
* [x]
|
|
44
|
+
* [x] Minimum/maximum height
|
|
43
45
|
* [x] Resize height & width
|
|
44
46
|
* [x] Fixed column
|
|
45
47
|
* [x] Grouping table header
|
|
@@ -63,7 +65,6 @@ Latest ✔ | Latest ✔ | Latest ✔ | Latest ✔ | Latest ✔ |
|
|
|
63
65
|
* [x] Context menu
|
|
64
66
|
* [x] Detail - Expandable row
|
|
65
67
|
* [x] Pager
|
|
66
|
-
* [x] Form
|
|
67
68
|
* [x] Toolbar
|
|
68
69
|
* [x] Pulldown
|
|
69
70
|
* [x] Virtual list
|
|
@@ -76,6 +77,7 @@ Latest ✔ | Latest ✔ | Latest ✔ | Latest ✔ | Latest ✔ |
|
|
|
76
77
|
* [x] VxeGlobalRenderer
|
|
77
78
|
* [x] Virtual scroller
|
|
78
79
|
* [x] Virtual merger
|
|
80
|
+
* [x] CSS Variable Theme
|
|
79
81
|
* [x] (pro) Cell area selection
|
|
80
82
|
* [x] (pro) Cell copy & paste
|
|
81
83
|
* [x] (pro) Cell find and replace
|
package/README.md
CHANGED
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
[](https://github.com/x-extends/vxe-table/pulls?q=is%3Apr+is%3Aclosed)
|
|
13
13
|
[](LICENSE)
|
|
14
14
|
|
|
15
|
-
一个基于 [vue](https://www.npmjs.com/package/vue) 的 PC
|
|
15
|
+
一个基于 [vue](https://www.npmjs.com/package/vue) 的 PC 端表单/表格组件,支持增删改查、虚拟列表、虚拟树、懒加载、快捷菜单、数据校验、打印导出、表单渲染、数据分页、弹窗、自定义模板、渲染器、JSON 配置式为零代码而设计...
|
|
16
16
|
|
|
17
17
|
* 设计理念
|
|
18
18
|
* 面向现代浏览器,高效的简洁 API 设计
|
|
@@ -20,15 +20,11 @@
|
|
|
20
20
|
* 为单行编辑表格而设计,支持增删改查及更多扩展,强大的功能的同时兼具性能
|
|
21
21
|
|
|
22
22
|
* 计划
|
|
23
|
-
* [x] ~~v1.0 基于 vue2.6
|
|
24
|
-
* [x] ~~v2.0 基于 vue2.6
|
|
25
|
-
* [x] v3.0 基于 vue2.6
|
|
26
|
-
* [x] v4.0 基于 vue3.2
|
|
27
|
-
* [ ] 下一阶段:sticky
|
|
28
|
-
|
|
29
|
-
## QQ 交流群
|
|
30
|
-
|
|
31
|
-

|
|
23
|
+
* [x] ~~v1.0 基于 vue2.6 < 3,支持所有主流的浏览器,实现表格的一切实用的功能~~
|
|
24
|
+
* [x] ~~v2.0 基于 vue2.6 < 3,支持所有主流的浏览器,同时兼具功能与性能~~
|
|
25
|
+
* [x] v3.0 基于 vue2.6 < 3,支持现代浏览器并保留兼容 IE11
|
|
26
|
+
* [x] v4.0 基于 vue3.2 < 4,只支持现代浏览器,不支持 IE
|
|
27
|
+
* [ ] 下一阶段:sticky 渲染模式、将虚拟滚动提升到极致、虚拟滚动动态行高、数据图表可视化
|
|
32
28
|
|
|
33
29
|
## 浏览器支持
|
|
34
30
|
|
|
@@ -39,12 +35,14 @@
|
|
|
39
35
|
## 功能点
|
|
40
36
|
|
|
41
37
|
* [x] 基础表格
|
|
42
|
-
* [x]
|
|
38
|
+
* [x] 配置式表格
|
|
39
|
+
* [x] 基础表单
|
|
40
|
+
* [x] 配置式表单
|
|
43
41
|
* [x] 斑马线条纹
|
|
44
42
|
* [x] 多种边框
|
|
45
43
|
* [x] 单元格样式
|
|
46
44
|
* [x] 列宽拖动
|
|
47
|
-
* [x]
|
|
45
|
+
* [x] 最小/最大高度
|
|
48
46
|
* [x] 自适应宽高
|
|
49
47
|
* [x] 固定列
|
|
50
48
|
* [x] 多级表头
|
|
@@ -68,7 +66,6 @@
|
|
|
68
66
|
* [x] 快捷菜单
|
|
69
67
|
* [x] 展开行
|
|
70
68
|
* [x] 分页
|
|
71
|
-
* [x] 表单
|
|
72
69
|
* [x] 工具栏
|
|
73
70
|
* [x] 下拉容器
|
|
74
71
|
* [x] 虚拟列表
|
|
@@ -81,6 +78,7 @@
|
|
|
81
78
|
* [x] 渲染器
|
|
82
79
|
* [x] 虚拟滚动
|
|
83
80
|
* [x] 虚拟合并
|
|
81
|
+
* [x] CSS 变量主题
|
|
84
82
|
* [x] (pro) 单元格区域选取
|
|
85
83
|
* [x] (pro) 单元格复制/粘贴
|
|
86
84
|
* [x] (pro) 单元格查找和替换
|
|
@@ -154,6 +152,12 @@ const tableData = ref([
|
|
|
154
152
|
|
|
155
153
|
💡 [官网文档源码](https://github.com/x-extends/vxe-table-docs)
|
|
156
154
|
|
|
155
|
+
## QQ 交流群
|
|
156
|
+
|
|
157
|
+
该群供大家交流問題,如果群人数已满,将会不定期剔除不活跃的。
|
|
158
|
+
|
|
159
|
+

|
|
160
|
+
|
|
157
161
|
## 运行项目
|
|
158
162
|
|
|
159
163
|
安装依赖
|
package/README.zh-TW.md
CHANGED
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
[](https://github.com/x-extends/vxe-table/pulls?q=is%3Apr+is%3Aclosed)
|
|
13
13
|
[](LICENSE)
|
|
14
14
|
|
|
15
|
-
一個基於 [vue](https://www.npmjs.com/package/vue) 的PC
|
|
15
|
+
一個基於 [vue](https://www.npmjs.com/package/vue) 的PC端表格組件,支持增删改查、虛擬清單、虛擬樹、懶加載、快捷選單、數據校驗、列印匯出、表單渲染、數據分頁、彈窗、自定義範本、渲染器、JSON 配置式爲零代碼而設計…
|
|
16
16
|
|
|
17
17
|
* 設計理念
|
|
18
18
|
* 面向現代瀏覽器,高效的簡潔 API 設計
|
|
@@ -20,10 +20,10 @@
|
|
|
20
20
|
* 為單行編輯表格而設計,支持增删改查及更多擴展,强大的功能的同時兼具效能
|
|
21
21
|
|
|
22
22
|
* 計劃
|
|
23
|
-
* [x] ~~v1.0 基於 vue2.6
|
|
24
|
-
* [x] ~~v2.0 基於 vue2.6
|
|
25
|
-
* [x] v3.0 基於 vue2.6
|
|
26
|
-
* [x] v4.0 基于 vue3.2
|
|
23
|
+
* [x] ~~v1.0 基於 vue2.6 < 3,支持所有主流的瀏覽器,實現表格的一切實用的功能~~
|
|
24
|
+
* [x] ~~v2.0 基於 vue2.6 < 3,支持所有主流的瀏覽器,同時兼具功能與效能~~
|
|
25
|
+
* [x] v3.0 基於 vue2.6 < 3,支持現代瀏覽器並保留相容IE11
|
|
26
|
+
* [x] v4.0 基于 vue3.2 < 4,只支持現代瀏覽器,不支持IE
|
|
27
27
|
|
|
28
28
|
## 瀏覽器支持
|
|
29
29
|
|
|
@@ -34,12 +34,14 @@ Latest ✔ | Latest ✔ | Latest ✔ | Latest ✔ | Latest ✔ |
|
|
|
34
34
|
## 功能點
|
|
35
35
|
|
|
36
36
|
* [x] 基礎表格
|
|
37
|
-
* [x]
|
|
37
|
+
* [x] 配置式表格
|
|
38
|
+
* [x] 基礎表單
|
|
39
|
+
* [x] 配置式表單
|
|
38
40
|
* [x] 斑馬線條紋
|
|
39
41
|
* [x] 多種邊框
|
|
40
42
|
* [x] 儲存格樣式
|
|
41
43
|
* [x] 列寬拖動
|
|
42
|
-
* [x]
|
|
44
|
+
* [x] 最小/最大高度
|
|
43
45
|
* [x] 自我調整寬高
|
|
44
46
|
* [x] 固定列
|
|
45
47
|
* [x] 多級表頭
|
|
@@ -63,7 +65,6 @@ Latest ✔ | Latest ✔ | Latest ✔ | Latest ✔ | Latest ✔ |
|
|
|
63
65
|
* [x] 快捷選單
|
|
64
66
|
* [x] 展開行
|
|
65
67
|
* [x] 分頁
|
|
66
|
-
* [x] 表單
|
|
67
68
|
* [x] 工具列
|
|
68
69
|
* [x] 下拉容器
|
|
69
70
|
* [x] 虛擬清單
|
|
@@ -75,6 +76,7 @@ Latest ✔ | Latest ✔ | Latest ✔ | Latest ✔ | Latest ✔ |
|
|
|
75
76
|
* [x] 渲染器
|
|
76
77
|
* [x] 虛擬滾動
|
|
77
78
|
* [x] 虛擬合併
|
|
79
|
+
* [x] CSS 變量主題
|
|
78
80
|
* [x] (pro) 儲存格區域選取
|
|
79
81
|
* [x] (pro) 儲存格複製/粘貼
|
|
80
82
|
* [x] (pro) 儲存格查找和替換
|
package/es/button/src/button.js
CHANGED
|
@@ -12,7 +12,8 @@ export default defineComponent({
|
|
|
12
12
|
* 按钮类型
|
|
13
13
|
*/
|
|
14
14
|
type: String,
|
|
15
|
-
className: String,
|
|
15
|
+
className: [String, Function],
|
|
16
|
+
popupClassName: [String, Function],
|
|
16
17
|
/**
|
|
17
18
|
* 按钮尺寸
|
|
18
19
|
*/
|
|
@@ -330,7 +331,7 @@ export default defineComponent({
|
|
|
330
331
|
});
|
|
331
332
|
var renderVN = function () {
|
|
332
333
|
var _a, _b, _c, _d;
|
|
333
|
-
var className = props.className, transfer = props.transfer, type = props.type, round = props.round, circle = props.circle, destroyOnClose = props.destroyOnClose, status = props.status, name = props.name, disabled = props.disabled, loading = props.loading;
|
|
334
|
+
var className = props.className, popupClassName = props.popupClassName, transfer = props.transfer, type = props.type, round = props.round, circle = props.circle, destroyOnClose = props.destroyOnClose, status = props.status, name = props.name, disabled = props.disabled, loading = props.loading;
|
|
334
335
|
var inited = reactData.inited, showPanel = reactData.showPanel;
|
|
335
336
|
var isFormBtn = computeIsFormBtn.value;
|
|
336
337
|
var btnType = computeBtnType.value;
|
|
@@ -338,7 +339,7 @@ export default defineComponent({
|
|
|
338
339
|
if (slots.dropdowns) {
|
|
339
340
|
return h('div', {
|
|
340
341
|
ref: refElem,
|
|
341
|
-
class: ['vxe-button--dropdown', className, (_a = {},
|
|
342
|
+
class: ['vxe-button--dropdown', className ? (XEUtils.isFunction(className) ? className({ $button: $xebutton }) : className) : '', (_a = {},
|
|
342
343
|
_a["size--".concat(vSize)] = vSize,
|
|
343
344
|
_a['is--active'] = showPanel,
|
|
344
345
|
_a)]
|
|
@@ -370,7 +371,7 @@ export default defineComponent({
|
|
|
370
371
|
}, [
|
|
371
372
|
h('div', {
|
|
372
373
|
ref: refBtnPanel,
|
|
373
|
-
class: ['vxe-button--dropdown-panel', (_c = {},
|
|
374
|
+
class: ['vxe-button--dropdown-panel', popupClassName ? (XEUtils.isFunction(popupClassName) ? popupClassName({ $button: $xebutton }) : popupClassName) : '', (_c = {},
|
|
374
375
|
_c["size--".concat(vSize)] = vSize,
|
|
375
376
|
_c['animat--leave'] = reactData.animatVisible,
|
|
376
377
|
_c['animat--enter'] = showPanel,
|
package/es/edit/src/hook.js
CHANGED
|
@@ -20,6 +20,7 @@ var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {
|
|
|
20
20
|
};
|
|
21
21
|
import { nextTick } from 'vue';
|
|
22
22
|
import XEUtils from 'xe-utils';
|
|
23
|
+
import GlobalConfig from '../../v-x-e-table/src/conf';
|
|
23
24
|
import { renderer } from '../../v-x-e-table';
|
|
24
25
|
import { isEnableConf } from '../../tools/utils';
|
|
25
26
|
import { getCellValue, setCellValue, getRowid } from '../../table/src/util';
|
|
@@ -74,19 +75,20 @@ var editHook = {
|
|
|
74
75
|
function insertTreeRow(newRecords, isAppend) {
|
|
75
76
|
var tableFullTreeData = internalData.tableFullTreeData, afterFullData = internalData.afterFullData, fullDataRowIdData = internalData.fullDataRowIdData, fullAllDataRowIdData = internalData.fullAllDataRowIdData;
|
|
76
77
|
var treeOpts = computeTreeOpts.value;
|
|
77
|
-
var rowField = treeOpts.rowField, parentField = treeOpts.parentField,
|
|
78
|
+
var rowField = treeOpts.rowField, parentField = treeOpts.parentField, mapChildrenField = treeOpts.mapChildrenField;
|
|
79
|
+
var childrenField = treeOpts.children || treeOpts.childrenField;
|
|
78
80
|
var funcName = isAppend ? 'push' : 'unshift';
|
|
79
81
|
newRecords.forEach(function (item) {
|
|
80
82
|
var parentRowId = item[parentField];
|
|
81
83
|
var rowid = getRowid($xetable, item);
|
|
82
|
-
var matchObj = parentRowId ? XEUtils.findTree(tableFullTreeData, function (item) { return parentRowId === item[rowField]; }, { children:
|
|
84
|
+
var matchObj = parentRowId ? XEUtils.findTree(tableFullTreeData, function (item) { return parentRowId === item[rowField]; }, { children: mapChildrenField }) : null;
|
|
83
85
|
if (matchObj) {
|
|
84
86
|
var parentRow = matchObj.item;
|
|
85
87
|
var parentRest = fullAllDataRowIdData[getRowid($xetable, parentRow)];
|
|
86
88
|
var parentLevel = parentRest ? parentRest.level : 0;
|
|
87
|
-
var parentChilds = parentRow[
|
|
89
|
+
var parentChilds = parentRow[childrenField];
|
|
88
90
|
if (!XEUtils.isArray(parentChilds)) {
|
|
89
|
-
parentChilds = parentRow[
|
|
91
|
+
parentChilds = parentRow[childrenField] = [];
|
|
90
92
|
}
|
|
91
93
|
parentChilds[funcName](item);
|
|
92
94
|
var rest = { row: item, rowid: rowid, seq: -1, index: -1, _index: -1, $index: -1, items: parentChilds, parent: parent, level: parentLevel + 1 };
|
|
@@ -129,7 +131,7 @@ var editHook = {
|
|
|
129
131
|
var mergeList = reactData.mergeList, editStore = reactData.editStore;
|
|
130
132
|
var tableFullTreeData = internalData.tableFullTreeData, afterFullData = internalData.afterFullData, tableFullData = internalData.tableFullData, fullDataRowIdData = internalData.fullDataRowIdData, fullAllDataRowIdData = internalData.fullAllDataRowIdData;
|
|
131
133
|
var treeOpts = computeTreeOpts.value;
|
|
132
|
-
var transform = treeOpts.transform, rowField = treeOpts.rowField,
|
|
134
|
+
var transform = treeOpts.transform, rowField = treeOpts.rowField, mapChildrenField = treeOpts.mapChildrenField;
|
|
133
135
|
if (!XEUtils.isArray(records)) {
|
|
134
136
|
records = [records];
|
|
135
137
|
}
|
|
@@ -172,7 +174,7 @@ var editHook = {
|
|
|
172
174
|
else {
|
|
173
175
|
// 如果为虚拟树
|
|
174
176
|
if (treeConfig && transform) {
|
|
175
|
-
var matchObj_1 = XEUtils.findTree(tableFullTreeData, function (item) { return row[rowField] === item[rowField]; }, { children:
|
|
177
|
+
var matchObj_1 = XEUtils.findTree(tableFullTreeData, function (item) { return row[rowField] === item[rowField]; }, { children: mapChildrenField });
|
|
176
178
|
if (matchObj_1) {
|
|
177
179
|
var parentRow_1 = matchObj_1.parent;
|
|
178
180
|
var parentChilds_1 = matchObj_1.items;
|
|
@@ -235,12 +237,11 @@ var editHook = {
|
|
|
235
237
|
}
|
|
236
238
|
}
|
|
237
239
|
}
|
|
238
|
-
var
|
|
240
|
+
var insertMaps = editStore.insertMaps;
|
|
239
241
|
newRecords.forEach(function (newRow) {
|
|
240
242
|
var rowid = getRowid($xetable, newRow);
|
|
241
243
|
insertMaps[rowid] = newRow;
|
|
242
244
|
});
|
|
243
|
-
insertList.unshift.apply(insertList, newRecords);
|
|
244
245
|
$xetable.cacheRowMap();
|
|
245
246
|
$xetable.updateScrollYStatus();
|
|
246
247
|
$xetable.handleTableData(treeConfig && transform);
|
|
@@ -270,12 +271,12 @@ var editHook = {
|
|
|
270
271
|
*/
|
|
271
272
|
remove: function (rows) {
|
|
272
273
|
var treeConfig = props.treeConfig;
|
|
273
|
-
var mergeList = reactData.mergeList, editStore = reactData.editStore,
|
|
274
|
+
var mergeList = reactData.mergeList, editStore = reactData.editStore, selectCheckboxRows = reactData.selectCheckboxRows;
|
|
274
275
|
var tableFullTreeData = internalData.tableFullTreeData, afterFullData = internalData.afterFullData, tableFullData = internalData.tableFullData;
|
|
275
276
|
var checkboxOpts = computeCheckboxOpts.value;
|
|
276
277
|
var treeOpts = computeTreeOpts.value;
|
|
277
278
|
var transform = treeOpts.transform;
|
|
278
|
-
var actived = editStore.actived,
|
|
279
|
+
var actived = editStore.actived, removeMaps = editStore.removeMaps, insertMaps = editStore.insertMaps;
|
|
279
280
|
var checkField = checkboxOpts.checkField;
|
|
280
281
|
var rest = [];
|
|
281
282
|
if (!rows) {
|
|
@@ -287,15 +288,16 @@ var editHook = {
|
|
|
287
288
|
// 如果是新增,则保存记录
|
|
288
289
|
rows.forEach(function (row) {
|
|
289
290
|
if (!$xetable.isInsertByRow(row)) {
|
|
290
|
-
|
|
291
|
+
var rowid = getRowid($xetable, row);
|
|
292
|
+
removeMaps[rowid] = row;
|
|
291
293
|
}
|
|
292
294
|
});
|
|
293
295
|
// 如果绑定了多选属性,则更新状态
|
|
294
296
|
if (!checkField) {
|
|
295
297
|
rows.forEach(function (row) {
|
|
296
|
-
var sIndex = $xetable.findRowIndexOf(
|
|
298
|
+
var sIndex = $xetable.findRowIndexOf(selectCheckboxRows, row);
|
|
297
299
|
if (sIndex > -1) {
|
|
298
|
-
|
|
300
|
+
selectCheckboxRows.splice(sIndex, 1);
|
|
299
301
|
}
|
|
300
302
|
});
|
|
301
303
|
}
|
|
@@ -353,11 +355,9 @@ var editHook = {
|
|
|
353
355
|
// 从新增中移除已删除的数据
|
|
354
356
|
rows.forEach(function (row) {
|
|
355
357
|
var rowid = getRowid($xetable, row);
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
insertList.splice(iIndex, 1);
|
|
358
|
+
if (insertMaps[rowid]) {
|
|
359
|
+
delete insertMaps[rowid];
|
|
359
360
|
}
|
|
360
|
-
delete insertMaps[rowid];
|
|
361
361
|
});
|
|
362
362
|
$xetable.updateFooter();
|
|
363
363
|
$xetable.cacheRowMap();
|
|
@@ -421,10 +421,9 @@ var editHook = {
|
|
|
421
421
|
getInsertRecords: function () {
|
|
422
422
|
var editStore = reactData.editStore;
|
|
423
423
|
var fullAllDataRowIdData = internalData.fullAllDataRowIdData;
|
|
424
|
-
var
|
|
424
|
+
var insertMaps = editStore.insertMaps;
|
|
425
425
|
var insertRecords = [];
|
|
426
|
-
|
|
427
|
-
var rowid = getRowid($xetable, row);
|
|
426
|
+
XEUtils.each(insertMaps, function (row, rowid) {
|
|
428
427
|
if (fullAllDataRowIdData[rowid]) {
|
|
429
428
|
insertRecords.push(row);
|
|
430
429
|
}
|
|
@@ -436,7 +435,12 @@ var editHook = {
|
|
|
436
435
|
*/
|
|
437
436
|
getRemoveRecords: function () {
|
|
438
437
|
var editStore = reactData.editStore;
|
|
439
|
-
|
|
438
|
+
var removeMaps = editStore.removeMaps;
|
|
439
|
+
var removeRecords = [];
|
|
440
|
+
XEUtils.each(removeMaps, function (row) {
|
|
441
|
+
removeRecords.push(row);
|
|
442
|
+
});
|
|
443
|
+
return removeRecords;
|
|
440
444
|
},
|
|
441
445
|
/**
|
|
442
446
|
* 获取更新数据
|
|
@@ -509,6 +513,11 @@ var editHook = {
|
|
|
509
513
|
$columnIndex: $xetable.getVMColumnIndex(column)
|
|
510
514
|
}, evnt || null);
|
|
511
515
|
}
|
|
516
|
+
if (GlobalConfig.cellVaildMode === 'obsolete') {
|
|
517
|
+
if ($xetable.clearValidate) {
|
|
518
|
+
return $xetable.clearValidate();
|
|
519
|
+
}
|
|
520
|
+
}
|
|
512
521
|
return nextTick();
|
|
513
522
|
},
|
|
514
523
|
/**
|
package/es/export/src/hook.js
CHANGED
|
@@ -261,7 +261,8 @@ var tableExportHook = {
|
|
|
261
261
|
var $xegrid = inject('$xegrid', null);
|
|
262
262
|
var hasTreeChildren = function (row) {
|
|
263
263
|
var treeOpts = computeTreeOpts.value;
|
|
264
|
-
|
|
264
|
+
var childrenField = treeOpts.children || treeOpts.childrenField;
|
|
265
|
+
return row[childrenField] && row[childrenField].length;
|
|
265
266
|
};
|
|
266
267
|
var getSeq = function (row, $rowIndex, column, $columnIndex) {
|
|
267
268
|
var seqOpts = computeSeqOpts.value;
|
package/es/filter/src/hook.js
CHANGED
|
@@ -17,9 +17,9 @@ import { getDomNode, triggerEvent } from '../../tools/dom';
|
|
|
17
17
|
var tableFilterMethodKeys = ['setFilter', 'clearFilter', 'getCheckedFilters'];
|
|
18
18
|
var tableFilterHook = {
|
|
19
19
|
setupTable: function ($xetable) {
|
|
20
|
-
var reactData = $xetable.reactData, internalData = $xetable.internalData;
|
|
20
|
+
var props = $xetable.props, reactData = $xetable.reactData, internalData = $xetable.internalData;
|
|
21
21
|
var _a = $xetable.getRefMaps(), refTableBody = _a.refTableBody, refTableFilter = _a.refTableFilter;
|
|
22
|
-
var
|
|
22
|
+
var _b = $xetable.getComputeMaps(), computeFilterOpts = _b.computeFilterOpts, computeMouseOpts = _b.computeMouseOpts;
|
|
23
23
|
var filterPrivateMethods = {
|
|
24
24
|
checkFilterOptions: function () {
|
|
25
25
|
var filterStore = reactData.filterStore;
|
|
@@ -147,8 +147,10 @@ var tableFilterHook = {
|
|
|
147
147
|
* @param {Event} evnt 事件
|
|
148
148
|
*/
|
|
149
149
|
confirmFilterEvent: function (evnt) {
|
|
150
|
+
var mouseConfig = props.mouseConfig;
|
|
150
151
|
var filterStore = reactData.filterStore, oldScrollXLoad = reactData.scrollXLoad, oldScrollYLoad = reactData.scrollYLoad;
|
|
151
152
|
var filterOpts = computeFilterOpts.value;
|
|
153
|
+
var mouseOpts = computeMouseOpts.value;
|
|
152
154
|
var column = filterStore.column;
|
|
153
155
|
var field = column.field;
|
|
154
156
|
var values = [];
|
|
@@ -160,12 +162,16 @@ var tableFilterHook = {
|
|
|
160
162
|
}
|
|
161
163
|
});
|
|
162
164
|
var filterList = $xetable.getCheckedFilters();
|
|
165
|
+
var params = { $table: $xetable, $event: evnt, column: column, field: field, property: field, values: values, datas: datas, filters: filterList, filterList: filterList };
|
|
163
166
|
// 如果是服务端筛选,则跳过本地筛选处理
|
|
164
167
|
if (!filterOpts.remote) {
|
|
165
168
|
$xetable.handleTableData(true);
|
|
166
169
|
$xetable.checkSelectionStatus();
|
|
167
170
|
}
|
|
168
|
-
|
|
171
|
+
if (mouseConfig && mouseOpts.area && $xetable.handleFilterEvent) {
|
|
172
|
+
$xetable.handleFilterEvent(evnt, params);
|
|
173
|
+
}
|
|
174
|
+
$xetable.dispatchEvent('filter-change', params, evnt);
|
|
169
175
|
$xetable.closeFilter();
|
|
170
176
|
$xetable.updateFooter().then(function () {
|
|
171
177
|
var scrollXLoad = reactData.scrollXLoad, scrollYLoad = reactData.scrollYLoad;
|
package/es/footer/src/footer.js
CHANGED
|
@@ -37,7 +37,7 @@ export default defineComponent({
|
|
|
37
37
|
setup: function (props) {
|
|
38
38
|
var $xetable = inject('$xetable', {});
|
|
39
39
|
var xID = $xetable.xID, tableProps = $xetable.props, tableReactData = $xetable.reactData, tableInternalData = $xetable.internalData;
|
|
40
|
-
var _a = $xetable.getRefMaps(), refTableHeader = _a.refTableHeader, refTableBody = _a.refTableBody;
|
|
40
|
+
var _a = $xetable.getRefMaps(), refTableHeader = _a.refTableHeader, refTableBody = _a.refTableBody, refValidTooltip = _a.refValidTooltip;
|
|
41
41
|
var _b = $xetable.getComputeMaps(), computeTooltipOpts = _b.computeTooltipOpts, computeColumnOpts = _b.computeColumnOpts;
|
|
42
42
|
var refElem = ref();
|
|
43
43
|
var refFooterTable = ref();
|
|
@@ -53,6 +53,7 @@ export default defineComponent({
|
|
|
53
53
|
var fixedType = props.fixedType;
|
|
54
54
|
var scrollXLoad = tableReactData.scrollXLoad;
|
|
55
55
|
var lastScrollLeft = tableInternalData.lastScrollLeft;
|
|
56
|
+
var validTip = refValidTooltip.value;
|
|
56
57
|
var tableHeader = refTableHeader.value;
|
|
57
58
|
var tableBody = refTableBody.value;
|
|
58
59
|
var headerElem = tableHeader ? tableHeader.$el : null;
|
|
@@ -71,6 +72,9 @@ export default defineComponent({
|
|
|
71
72
|
if (scrollXLoad && isX) {
|
|
72
73
|
$xetable.triggerScrollXEvent(evnt);
|
|
73
74
|
}
|
|
75
|
+
if (isX && validTip && validTip.reactData.visible) {
|
|
76
|
+
validTip.updatePlacement();
|
|
77
|
+
}
|
|
74
78
|
$xetable.dispatchEvent('scroll', { type: renderType, fixed: fixedType, scrollTop: bodyElem.scrollTop, scrollLeft: scrollLeft, isX: isX, isY: false }, evnt);
|
|
75
79
|
};
|
|
76
80
|
onMounted(function () {
|
package/es/form/src/form.js
CHANGED
|
@@ -14,7 +14,7 @@ import XEUtils from 'xe-utils';
|
|
|
14
14
|
import GlobalConfig from '../../v-x-e-table/src/conf';
|
|
15
15
|
import { VXETable } from '../../v-x-e-table';
|
|
16
16
|
import { getFuncText, isEnableConf, eqEmptyValue } from '../../tools/utils';
|
|
17
|
-
import { errLog } from '../../tools/log';
|
|
17
|
+
import { errLog, warnLog } from '../../tools/log';
|
|
18
18
|
import { scrollToView } from '../../tools/dom';
|
|
19
19
|
import { createItem, handleFieldOrItem, isHiddenItem, isActivetem } from './util';
|
|
20
20
|
import { useSize } from '../../hooks/size';
|
|
@@ -312,10 +312,10 @@ export default defineComponent({
|
|
|
312
312
|
if (rules_1) {
|
|
313
313
|
var itemValue_1 = XEUtils.isUndefined(val) ? XEUtils.get(data, property) : val;
|
|
314
314
|
rules_1.forEach(function (rule) {
|
|
315
|
-
var type = rule.type, trigger = rule.trigger, required = rule.required;
|
|
315
|
+
var type = rule.type, trigger = rule.trigger, required = rule.required, validator = rule.validator;
|
|
316
316
|
if (validType === 'all' || !trigger || validType === trigger) {
|
|
317
|
-
if (
|
|
318
|
-
var
|
|
317
|
+
if (validator) {
|
|
318
|
+
var validParams = {
|
|
319
319
|
itemValue: itemValue_1,
|
|
320
320
|
rule: rule,
|
|
321
321
|
rules: rules_1,
|
|
@@ -323,7 +323,29 @@ export default defineComponent({
|
|
|
323
323
|
field: property,
|
|
324
324
|
property: property,
|
|
325
325
|
$form: $xeform
|
|
326
|
-
}
|
|
326
|
+
};
|
|
327
|
+
var customValid = void 0;
|
|
328
|
+
if (XEUtils.isString(validator)) {
|
|
329
|
+
var gvItem = VXETable.validators.get(validator);
|
|
330
|
+
if (gvItem) {
|
|
331
|
+
if (gvItem.itemValidatorMethod) {
|
|
332
|
+
customValid = gvItem.itemValidatorMethod(validParams);
|
|
333
|
+
}
|
|
334
|
+
else {
|
|
335
|
+
if (process.env.NODE_ENV === 'development') {
|
|
336
|
+
warnLog('vxe.error.notValidators', [validator]);
|
|
337
|
+
}
|
|
338
|
+
}
|
|
339
|
+
}
|
|
340
|
+
else {
|
|
341
|
+
if (process.env.NODE_ENV === 'development') {
|
|
342
|
+
errLog('vxe.error.notValidators', [validator]);
|
|
343
|
+
}
|
|
344
|
+
}
|
|
345
|
+
}
|
|
346
|
+
else {
|
|
347
|
+
customValid = validator(validParams);
|
|
348
|
+
}
|
|
327
349
|
if (customValid) {
|
|
328
350
|
if (XEUtils.isError(customValid)) {
|
|
329
351
|
errorRules.push(new Rule({ type: 'custom', trigger: trigger, content: customValid.message, rule: new Rule(rule) }));
|
|
@@ -441,7 +463,10 @@ export default defineComponent({
|
|
|
441
463
|
};
|
|
442
464
|
var validateField = function (fieldOrItem, callback) {
|
|
443
465
|
var fields = [];
|
|
444
|
-
if (
|
|
466
|
+
if (XEUtils.isArray(fieldOrItem)) {
|
|
467
|
+
fields = fieldOrItem;
|
|
468
|
+
}
|
|
469
|
+
else {
|
|
445
470
|
fields = [fieldOrItem];
|
|
446
471
|
}
|
|
447
472
|
return beginValidate(fields.map(function (field) { return handleFieldOrItem($xeform, field); }), '', callback);
|