vxe-table 4.1.20 → 4.2.0-beta.2
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 +2 -4
- package/README.md +2 -3
- package/README.zh-TW.md +2 -4
- package/es/button/index.js +1 -1
- package/es/checkbox/index.js +1 -1
- package/es/checkbox-group/index.js +1 -1
- package/es/colgroup/index.js +3 -2
- package/es/column/index.js +3 -2
- package/es/edit/src/hook.js +2 -1
- package/es/export/index.js +2 -2
- package/es/export/src/hook.js +2 -1
- package/es/export/src/util.js +3 -5
- package/es/filter/index.js +1 -1
- package/es/filter/src/hook.js +17 -10
- package/es/footer/index.js +1 -1
- package/es/footer/src/footer.js +3 -2
- package/es/form/index.js +1 -1
- package/es/form/src/form-gather.js +3 -3
- package/es/form/src/form-item.js +4 -4
- package/es/form/src/form.js +36 -43
- package/es/form/src/render.js +15 -10
- package/es/form/src/util.js +6 -0
- package/es/form-gather/index.js +1 -1
- package/es/form-item/index.js +1 -1
- package/es/grid/index.js +1 -1
- package/es/grid/src/grid.js +2 -1
- package/es/header/index.js +1 -1
- package/es/header/src/header.js +1 -1
- package/es/input/index.js +1 -1
- package/es/input/src/date.js +41 -0
- package/es/input/src/input.js +4 -51
- package/es/input/src/number.js +10 -0
- package/es/list/index.js +1 -1
- package/es/menu/index.js +1 -1
- package/es/modal/index.js +1 -1
- package/es/modal/src/modal.js +2 -1
- package/es/optgroup/index.js +1 -1
- package/es/option/index.js +1 -1
- package/es/pager/index.js +1 -1
- package/es/pager/src/pager.js +13 -2
- package/es/pulldown/index.js +1 -1
- package/es/radio/index.js +1 -1
- package/es/radio-button/index.js +1 -1
- package/es/radio-group/index.js +1 -1
- package/es/select/index.js +1 -1
- package/es/select/style.css +1 -1
- package/es/style.css +1 -1
- package/es/style.min.css +1 -1
- package/es/switch/index.js +1 -1
- package/es/table/index.js +1 -1
- package/es/table/src/body.js +32 -11
- package/es/table/src/cell.js +3 -3
- package/es/table/src/column.js +3 -1
- package/es/table/src/columnInfo.js +5 -4
- package/es/table/src/emits.js +5 -1
- package/es/table/src/props.js +5 -2
- package/es/table/src/table.js +120 -86
- package/es/table/src/util.js +5 -3
- package/es/textarea/index.js +1 -1
- package/es/toolbar/index.js +1 -1
- package/es/toolbar/src/toolbar.js +2 -1
- package/es/tools/dom.js +9 -0
- package/es/tools/log.js +13 -0
- package/es/tools/utils.js +0 -12
- package/es/tooltip/index.js +1 -1
- package/es/tooltip/src/tooltip.js +85 -45
- package/es/tooltip/style.css +1 -1
- package/es/v-x-e-table/index.js +1 -0
- package/es/v-x-e-table/src/conf.js +12 -7
- package/es/v-x-e-table/src/interceptor.js +1 -1
- package/es/v-x-e-table/src/renderer.js +2 -1
- package/es/v-x-e-table/src/store.js +1 -1
- package/helper/vetur/attributes.json +31 -11
- package/helper/vetur/tags.json +8 -3
- package/lib/button/index.js +3 -2
- package/lib/button/index.min.js +1 -1
- package/lib/checkbox/index.js +3 -2
- package/lib/checkbox/index.min.js +1 -1
- package/lib/checkbox-group/index.js +3 -2
- package/lib/checkbox-group/index.min.js +1 -1
- package/lib/colgroup/index.js +6 -4
- package/lib/colgroup/index.min.js +1 -1
- package/lib/column/index.js +6 -4
- package/lib/column/index.min.js +1 -1
- package/lib/edit/src/hook.js +7 -5
- package/lib/edit/src/hook.min.js +1 -1
- package/lib/export/index.js +5 -4
- package/lib/export/index.min.js +1 -1
- package/lib/export/src/hook.js +14 -12
- package/lib/export/src/hook.min.js +1 -1
- package/lib/export/src/util.js +7 -9
- package/lib/export/src/util.min.js +1 -1
- package/lib/filter/index.js +3 -2
- package/lib/filter/index.min.js +1 -1
- package/lib/filter/src/hook.js +24 -13
- package/lib/filter/src/hook.min.js +1 -1
- package/lib/footer/index.js +3 -2
- package/lib/footer/index.min.js +1 -1
- package/lib/footer/src/footer.js +7 -3
- package/lib/footer/src/footer.min.js +1 -1
- package/lib/form/index.js +3 -2
- package/lib/form/index.min.js +1 -1
- package/lib/form/src/form-gather.js +3 -3
- package/lib/form/src/form-gather.min.js +1 -1
- package/lib/form/src/form-item.js +3 -3
- package/lib/form/src/form-item.min.js +1 -1
- package/lib/form/src/form.js +45 -58
- package/lib/form/src/form.min.js +1 -1
- package/lib/form/src/render.js +24 -10
- package/lib/form/src/render.min.js +1 -1
- package/lib/form/src/util.js +11 -0
- package/lib/form/src/util.min.js +1 -1
- package/lib/form-gather/index.js +3 -2
- package/lib/form-gather/index.min.js +1 -1
- package/lib/form-item/index.js +3 -2
- package/lib/form-item/index.min.js +1 -1
- package/lib/grid/index.js +3 -2
- package/lib/grid/index.min.js +1 -1
- package/lib/grid/src/grid.js +16 -14
- package/lib/grid/src/grid.min.js +1 -1
- package/lib/header/index.js +3 -2
- package/lib/header/index.min.js +1 -1
- package/lib/header/src/header.js +1 -1
- package/lib/header/src/header.min.js +1 -1
- package/lib/index.umd.js +584 -415
- package/lib/index.umd.min.js +1 -2
- package/lib/input/index.js +3 -2
- package/lib/input/index.min.js +1 -1
- package/lib/input/src/date.js +56 -0
- package/lib/input/src/date.min.js +1 -0
- package/lib/input/src/input.js +13 -67
- package/lib/input/src/input.min.js +1 -1
- package/lib/input/src/number.js +23 -0
- package/lib/input/src/number.min.js +1 -0
- package/lib/list/index.js +3 -2
- package/lib/list/index.min.js +1 -1
- package/lib/menu/index.js +3 -2
- package/lib/menu/index.min.js +1 -1
- package/lib/modal/index.js +3 -2
- package/lib/modal/index.min.js +1 -1
- package/lib/modal/src/modal.js +3 -1
- package/lib/modal/src/modal.min.js +1 -1
- package/lib/optgroup/index.js +3 -2
- package/lib/optgroup/index.min.js +1 -1
- package/lib/option/index.js +3 -2
- package/lib/option/index.min.js +1 -1
- package/lib/pager/index.js +3 -2
- package/lib/pager/index.min.js +1 -1
- package/lib/pager/src/pager.js +15 -1
- package/lib/pager/src/pager.min.js +1 -1
- package/lib/pulldown/index.js +3 -2
- package/lib/pulldown/index.min.js +1 -1
- package/lib/radio/index.js +3 -2
- package/lib/radio/index.min.js +1 -1
- package/lib/radio-button/index.js +3 -2
- package/lib/radio-button/index.min.js +1 -1
- package/lib/radio-group/index.js +3 -2
- package/lib/radio-group/index.min.js +1 -1
- package/lib/select/index.js +3 -2
- package/lib/select/index.min.js +1 -1
- package/lib/select/style/style.css +1 -1
- package/lib/select/style/style.min.css +1 -1
- package/lib/style.css +1 -1
- package/lib/style.min.css +1 -1
- package/lib/switch/index.js +3 -2
- package/lib/switch/index.min.js +1 -1
- package/lib/table/index.js +3 -2
- package/lib/table/index.min.js +1 -1
- package/lib/table/src/body.js +32 -11
- package/lib/table/src/body.min.js +1 -1
- package/lib/table/src/cell.js +3 -3
- package/lib/table/src/cell.min.js +1 -1
- package/lib/table/src/column.js +3 -1
- package/lib/table/src/column.min.js +1 -1
- package/lib/table/src/columnInfo.js +13 -9
- package/lib/table/src/columnInfo.min.js +1 -1
- package/lib/table/src/emits.js +1 -1
- package/lib/table/src/emits.min.js +1 -1
- package/lib/table/src/props.js +5 -2
- package/lib/table/src/table.js +187 -148
- package/lib/table/src/table.min.js +1 -1
- package/lib/table/src/util.js +5 -3
- package/lib/table/src/util.min.js +1 -1
- package/lib/textarea/index.js +3 -2
- package/lib/textarea/index.min.js +1 -1
- package/lib/toolbar/index.js +3 -2
- package/lib/toolbar/index.min.js +1 -1
- package/lib/toolbar/src/toolbar.js +4 -2
- package/lib/toolbar/src/toolbar.min.js +1 -1
- package/lib/tools/dom.js +12 -1
- package/lib/tools/dom.min.js +1 -1
- package/lib/tools/log.js +29 -0
- package/lib/tools/log.min.js +1 -0
- package/lib/tools/utils.js +0 -20
- package/lib/tools/utils.min.js +1 -1
- package/lib/tooltip/index.js +3 -3
- package/lib/tooltip/index.min.js +1 -1
- package/lib/tooltip/src/tooltip.js +114 -60
- package/lib/tooltip/src/tooltip.min.js +1 -1
- package/lib/tooltip/style/style.css +1 -1
- package/lib/tooltip/style/style.min.css +1 -1
- package/lib/v-x-e-table/index.js +1 -0
- package/lib/v-x-e-table/index.min.js +1 -1
- package/lib/v-x-e-table/src/conf.js +12 -7
- package/lib/v-x-e-table/src/conf.min.js +1 -1
- package/lib/v-x-e-table/src/interceptor.js +3 -3
- package/lib/v-x-e-table/src/interceptor.min.js +1 -1
- package/lib/v-x-e-table/src/renderer.js +3 -1
- package/lib/v-x-e-table/src/renderer.min.js +1 -1
- package/lib/v-x-e-table/src/store.js +2 -2
- package/lib/v-x-e-table/src/store.min.js +1 -1
- package/package.json +4 -4
- package/packages/button/index.ts +2 -1
- package/packages/checkbox/index.ts +2 -1
- package/packages/checkbox-group/index.ts +2 -1
- package/packages/colgroup/index.ts +4 -2
- package/packages/column/index.ts +4 -2
- package/packages/edit/src/hook.ts +2 -1
- package/packages/export/index.ts +3 -2
- package/packages/export/src/hook.ts +2 -1
- package/packages/export/src/util.ts +4 -6
- package/packages/filter/index.ts +2 -1
- package/packages/filter/src/hook.ts +17 -10
- package/packages/footer/index.ts +2 -1
- package/packages/footer/src/footer.ts +3 -2
- package/packages/form/index.ts +2 -1
- package/packages/form/src/form-gather.ts +3 -3
- package/packages/form/src/form-item.ts +4 -4
- package/packages/form/src/form.ts +38 -46
- package/packages/form/src/render.ts +8 -6
- package/packages/form/src/util.ts +8 -1
- package/packages/form-gather/index.ts +2 -1
- package/packages/form-item/index.ts +2 -1
- package/packages/grid/index.ts +2 -1
- package/packages/grid/src/grid.ts +2 -1
- package/packages/header/index.ts +2 -1
- package/packages/header/src/header.ts +1 -1
- package/packages/input/index.ts +2 -1
- package/packages/input/src/date.ts +42 -0
- package/packages/input/src/input.ts +3 -51
- package/packages/input/src/number.ts +12 -0
- package/packages/list/index.ts +2 -1
- package/packages/menu/index.ts +2 -1
- package/packages/modal/index.ts +2 -1
- package/packages/modal/src/modal.ts +2 -1
- package/packages/optgroup/index.ts +2 -1
- package/packages/option/index.ts +2 -1
- package/packages/pager/index.ts +2 -1
- package/packages/pager/src/pager.ts +17 -3
- package/packages/pulldown/index.ts +2 -1
- package/packages/radio/index.ts +2 -1
- package/packages/radio-button/index.ts +2 -1
- package/packages/radio-group/index.ts +2 -1
- package/packages/select/index.ts +2 -1
- package/packages/switch/index.ts +2 -1
- package/packages/table/index.ts +2 -1
- package/packages/table/src/body.ts +33 -12
- package/packages/table/src/cell.ts +3 -3
- package/packages/table/src/column.ts +3 -1
- package/packages/table/src/columnInfo.ts +5 -3
- package/packages/table/src/emits.ts +5 -1
- package/packages/table/src/props.ts +5 -2
- package/packages/table/src/table.ts +120 -84
- package/packages/table/src/util.ts +5 -3
- package/packages/textarea/index.ts +2 -1
- package/packages/toolbar/index.ts +2 -1
- package/packages/toolbar/src/toolbar.ts +2 -1
- package/packages/tools/dom.ts +11 -0
- package/packages/tools/log.ts +16 -0
- package/packages/tools/utils.ts +0 -15
- package/packages/tooltip/index.ts +2 -1
- package/packages/tooltip/src/tooltip.ts +87 -46
- package/packages/v-x-e-table/index.ts +1 -0
- package/packages/v-x-e-table/src/conf.ts +12 -7
- package/packages/v-x-e-table/src/interceptor.ts +1 -1
- package/packages/v-x-e-table/src/renderer.ts +2 -1
- package/packages/v-x-e-table/src/store.ts +1 -1
- package/styles/select.scss +1 -1
- package/styles/tooltip.scss +1 -1
- package/types/all.d.ts +2 -2
- package/types/button.d.ts +54 -54
- package/types/checkbox-group.d.ts +21 -21
- package/types/checkbox.d.ts +30 -30
- package/types/colgroup.d.ts +16 -16
- package/types/column.d.ts +172 -161
- package/types/component.d.ts +9 -9
- package/types/edit.d.ts +35 -35
- package/types/export.d.ts +101 -101
- package/types/filter.d.ts +19 -19
- package/types/footer.d.ts +1 -1
- package/types/form-gather.d.ts +3 -3
- package/types/form-item.d.ts +68 -66
- package/types/form.d.ts +136 -131
- package/types/grid.d.ts +257 -257
- package/types/header.d.ts +1 -1
- package/types/icon.d.ts +1 -1
- package/types/input.d.ts +162 -162
- package/types/keyboard.d.ts +6 -6
- package/types/list.d.ts +54 -54
- package/types/menu.d.ts +33 -33
- package/types/modal.d.ts +160 -160
- package/types/optgroup.d.ts +5 -5
- package/types/option.d.ts +19 -19
- package/types/pager.d.ts +65 -61
- package/types/plugins/pro.d.ts +245 -215
- package/types/pulldown.d.ts +36 -36
- package/types/radio-button.d.ts +25 -25
- package/types/radio-group.d.ts +20 -20
- package/types/radio.d.ts +27 -27
- package/types/select.d.ts +82 -82
- package/types/switch.d.ts +40 -40
- package/types/table.d.ts +1422 -1336
- package/types/textarea.d.ts +71 -71
- package/types/toolbar.d.ts +65 -65
- package/types/tooltip.d.ts +50 -44
- package/types/v-x-e-table/commands.d.ts +12 -12
- package/types/v-x-e-table/formats.d.ts +10 -10
- package/types/v-x-e-table/hooks.d.ts +9 -9
- package/types/v-x-e-table/index.d.ts +51 -43
- package/types/v-x-e-table/interceptor.d.ts +26 -26
- package/types/v-x-e-table/menus.d.ts +13 -13
- package/types/v-x-e-table/renderer.d.ts +128 -128
- package/types/v-x-e-table/setup.d.ts +55 -55
- package/types/validator.d.ts +28 -28
package/README.en.md
CHANGED
|
@@ -29,7 +29,7 @@ A [vue](https://www.npmjs.com/package/vue) based PC form component, support add,
|
|
|
29
29
|
|
|
30
30
|
 |  |  |  | 
|
|
31
31
|
--- | --- | --- | --- | --- |
|
|
32
|
-
Latest ✔ | Latest ✔ | Latest ✔ | Latest ✔ |
|
|
32
|
+
Latest ✔ | Latest ✔ | Latest ✔ | Latest ✔ | Latest ✔ |
|
|
33
33
|
|
|
34
34
|
## Features
|
|
35
35
|
|
|
@@ -151,9 +151,7 @@ export default defineComponent({
|
|
|
151
151
|
|
|
152
152
|
## Docs
|
|
153
153
|
|
|
154
|
-
|
|
155
|
-
👉 [View example](https://x-extends.github.io/vxe-table/#/table/base/basic)
|
|
156
|
-
👉 [View API](https://x-extends.github.io/vxe-table/#/table/api)
|
|
154
|
+
👉 [Document](https://vxetable.cn)
|
|
157
155
|
|
|
158
156
|
## Run the project
|
|
159
157
|
|
package/README.md
CHANGED
|
@@ -34,7 +34,7 @@
|
|
|
34
34
|
|
|
35
35
|
 |  |  |  | 
|
|
36
36
|
--- | --- | --- | --- | --- |
|
|
37
|
-
|
|
37
|
+
80+ ✔ | 80+ ✔ | 90+ ✔ | 75+ ✔ | 10+ ✔ |
|
|
38
38
|
|
|
39
39
|
## 功能点
|
|
40
40
|
|
|
@@ -157,8 +157,7 @@ export default defineComponent({
|
|
|
157
157
|
## 文档
|
|
158
158
|
|
|
159
159
|
💡 [使用指南](https://github.com/xuliangzhan/vxe-table-demo)
|
|
160
|
-
👉 [
|
|
161
|
-
👉 [查看文档](https://xuliangzhan_admin.gitee.io/vxe-table/#/table/api) [👀备用地址](https://x-extends.github.io/vxe-table/#/table/api)
|
|
160
|
+
👉 [查看文档](https://vxetable.cn)
|
|
162
161
|
|
|
163
162
|
## 运行项目
|
|
164
163
|
|
package/README.zh-TW.md
CHANGED
|
@@ -33,7 +33,7 @@
|
|
|
33
33
|
|
|
34
34
|
 |  |  |  | 
|
|
35
35
|
--- | --- | --- | --- | --- |
|
|
36
|
-
Latest ✔ | Latest ✔ | Latest ✔ | Latest ✔ |
|
|
36
|
+
Latest ✔ | Latest ✔ | Latest ✔ | Latest ✔ | Latest ✔ |
|
|
37
37
|
|
|
38
38
|
## 功能點
|
|
39
39
|
|
|
@@ -154,9 +154,7 @@ export default defineComponent({
|
|
|
154
154
|
|
|
155
155
|
## 檔案
|
|
156
156
|
|
|
157
|
-
|
|
158
|
-
👉 [查看檔案](https://xuliangzhan_admin.gitee.io/vxe-table/) [👀備用地址1](https://x-extends.github.io/vxe-table/#/table/base/basic)
|
|
159
|
-
👉 [查看檔案](https://xuliangzhan_admin.gitee.io/vxe-table/#/table/api) [👀備用地址1](https://x-extends.github.io/vxe-table/#/table/api)
|
|
157
|
+
👉 [查看檔案](https://vxetable.cn)
|
|
160
158
|
|
|
161
159
|
## 運行項目
|
|
162
160
|
|
package/es/button/index.js
CHANGED
|
@@ -2,8 +2,8 @@ import VxeButtonComponent from './src/button';
|
|
|
2
2
|
import { dynamicApp } from '../dynamics';
|
|
3
3
|
export var Button = Object.assign(VxeButtonComponent, {
|
|
4
4
|
install: function (app) {
|
|
5
|
-
dynamicApp.component(VxeButtonComponent.name, VxeButtonComponent);
|
|
6
5
|
app.component(VxeButtonComponent.name, VxeButtonComponent);
|
|
7
6
|
}
|
|
8
7
|
});
|
|
8
|
+
dynamicApp.component(VxeButtonComponent.name, VxeButtonComponent);
|
|
9
9
|
export default Button;
|
package/es/checkbox/index.js
CHANGED
|
@@ -2,8 +2,8 @@ import VxeCheckboxComponent from './src/checkbox';
|
|
|
2
2
|
import { dynamicApp } from '../dynamics';
|
|
3
3
|
export var Checkbox = Object.assign(VxeCheckboxComponent, {
|
|
4
4
|
install: function (app) {
|
|
5
|
-
dynamicApp.component(VxeCheckboxComponent.name, VxeCheckboxComponent);
|
|
6
5
|
app.component(VxeCheckboxComponent.name, VxeCheckboxComponent);
|
|
7
6
|
}
|
|
8
7
|
});
|
|
8
|
+
dynamicApp.component(VxeCheckboxComponent.name, VxeCheckboxComponent);
|
|
9
9
|
export default Checkbox;
|
|
@@ -2,8 +2,8 @@ import VxeCheckboxGroupComponent from '../checkbox/src/group';
|
|
|
2
2
|
import { dynamicApp } from '../dynamics';
|
|
3
3
|
export var CheckboxGroup = Object.assign(VxeCheckboxGroupComponent, {
|
|
4
4
|
install: function (app) {
|
|
5
|
-
dynamicApp.component(VxeCheckboxGroupComponent.name, VxeCheckboxGroupComponent);
|
|
6
5
|
app.component(VxeCheckboxGroupComponent.name, VxeCheckboxGroupComponent);
|
|
7
6
|
}
|
|
8
7
|
});
|
|
8
|
+
dynamicApp.component(VxeCheckboxGroupComponent.name, VxeCheckboxGroupComponent);
|
|
9
9
|
export default CheckboxGroup;
|
package/es/colgroup/index.js
CHANGED
|
@@ -2,11 +2,12 @@ import VxeTableColgroupComponent from '../table/src/group';
|
|
|
2
2
|
import { dynamicApp } from '../dynamics';
|
|
3
3
|
export var Colgroup = Object.assign(VxeTableColgroupComponent, {
|
|
4
4
|
install: function (app) {
|
|
5
|
-
dynamicApp.component(VxeTableColgroupComponent.name, VxeTableColgroupComponent);
|
|
6
5
|
app.component(VxeTableColgroupComponent.name, VxeTableColgroupComponent);
|
|
7
6
|
// 兼容旧用法
|
|
8
|
-
dynamicApp.component('VxeTableColgroup', VxeTableColgroupComponent);
|
|
9
7
|
app.component('VxeTableColgroup', VxeTableColgroupComponent);
|
|
10
8
|
}
|
|
11
9
|
});
|
|
10
|
+
dynamicApp.component(VxeTableColgroupComponent.name, VxeTableColgroupComponent);
|
|
11
|
+
// 兼容旧用法
|
|
12
|
+
dynamicApp.component('VxeTableColgroup', VxeTableColgroupComponent);
|
|
12
13
|
export default Colgroup;
|
package/es/column/index.js
CHANGED
|
@@ -2,11 +2,12 @@ import VxeTableColumnComponent from '../table/src/column';
|
|
|
2
2
|
import { dynamicApp } from '../dynamics';
|
|
3
3
|
export var Column = Object.assign(VxeTableColumnComponent, {
|
|
4
4
|
install: function (app) {
|
|
5
|
-
dynamicApp.component(VxeTableColumnComponent.name, VxeTableColumnComponent);
|
|
6
5
|
app.component(VxeTableColumnComponent.name, VxeTableColumnComponent);
|
|
7
6
|
// 兼容旧用法
|
|
8
|
-
dynamicApp.component('VxeTableColumn', VxeTableColumnComponent);
|
|
9
7
|
app.component('VxeTableColumn', VxeTableColumnComponent);
|
|
10
8
|
}
|
|
11
9
|
});
|
|
10
|
+
dynamicApp.component(VxeTableColumnComponent.name, VxeTableColumnComponent);
|
|
11
|
+
// 兼容旧用法
|
|
12
|
+
dynamicApp.component('VxeTableColumn', VxeTableColumnComponent);
|
|
12
13
|
export default Column;
|
package/es/edit/src/hook.js
CHANGED
|
@@ -17,9 +17,10 @@ var __spreadArray = (this && this.__spreadArray) || function (to, from) {
|
|
|
17
17
|
import { nextTick } from 'vue';
|
|
18
18
|
import XEUtils from 'xe-utils';
|
|
19
19
|
import { renderer } from '../../v-x-e-table';
|
|
20
|
-
import {
|
|
20
|
+
import { isEnableConf } from '../../tools/utils';
|
|
21
21
|
import { getCellValue, setCellValue, getRowid } from '../../table/src/util';
|
|
22
22
|
import { browse, removeClass, addClass } from '../../tools/dom';
|
|
23
|
+
import { warnLog, errLog, getLog } from '../../tools/log';
|
|
23
24
|
var tableEditMethodKeys = ['insert', 'insertAt', 'remove', 'removeCheckboxRow', 'removeRadioRow', 'removeCurrentRow', 'getRecordset', 'getInsertRecords', 'getRemoveRecords', 'getUpdateRecords', 'getActiveRecord', 'getSelectedCell', 'clearActived', 'clearSelected', 'isActiveByRow', 'setActiveRow', 'setActiveCell', 'setSelectCell'];
|
|
24
25
|
var editHook = {
|
|
25
26
|
setupTable: function ($xetable) {
|
package/es/export/index.js
CHANGED
|
@@ -29,10 +29,10 @@ export var Export = {
|
|
|
29
29
|
}
|
|
30
30
|
});
|
|
31
31
|
VXETable.hooks.add('$tableExport', exportHook);
|
|
32
|
-
dynamicApp.component(ExportPanelComponent.name, ExportPanelComponent);
|
|
33
|
-
dynamicApp.component(ImportPanelComponent.name, ImportPanelComponent);
|
|
34
32
|
app.component(ExportPanelComponent.name, ExportPanelComponent);
|
|
35
33
|
app.component(ImportPanelComponent.name, ImportPanelComponent);
|
|
36
34
|
}
|
|
37
35
|
};
|
|
36
|
+
dynamicApp.component(ExportPanelComponent.name, ExportPanelComponent);
|
|
37
|
+
dynamicApp.component(ImportPanelComponent.name, ImportPanelComponent);
|
|
38
38
|
export default Export;
|
package/es/export/src/hook.js
CHANGED
|
@@ -3,7 +3,8 @@ import XEUtils from 'xe-utils';
|
|
|
3
3
|
import GlobalConfig from '../../v-x-e-table/src/conf';
|
|
4
4
|
import { VXETable } from '../../v-x-e-table';
|
|
5
5
|
import { isColumnInfo, mergeBodyMethod, getCellValue } from '../../table/src/util';
|
|
6
|
-
import {
|
|
6
|
+
import { parseFile, formatText } from '../../tools/utils';
|
|
7
|
+
import { warnLog, errLog } from '../../tools/log';
|
|
7
8
|
import { readLocalFile, handlePrint, saveLocalFile, createHtmlPage, getExportBlobByContent } from './util';
|
|
8
9
|
var htmlCellElem;
|
|
9
10
|
var csvBOM = '\ufeff';
|
package/es/export/src/util.js
CHANGED
|
@@ -2,7 +2,8 @@ import XEUtils from 'xe-utils';
|
|
|
2
2
|
import GlobalConfig from '../../v-x-e-table/src/conf';
|
|
3
3
|
import { VXETable } from '../../v-x-e-table';
|
|
4
4
|
import { browse } from '../../tools/dom';
|
|
5
|
-
import {
|
|
5
|
+
import { parseFile } from '../../tools/utils';
|
|
6
|
+
import { errLog, getLog } from '../../tools/log';
|
|
6
7
|
// 导入
|
|
7
8
|
var fileForm;
|
|
8
9
|
var fileInput;
|
|
@@ -16,10 +17,7 @@ export function createFrame() {
|
|
|
16
17
|
return frame;
|
|
17
18
|
}
|
|
18
19
|
export function getExportBlobByContent(content, options) {
|
|
19
|
-
|
|
20
|
-
return new Blob([content], { type: "text/" + options.type + ";charset=utf-8;" });
|
|
21
|
-
}
|
|
22
|
-
return null;
|
|
20
|
+
return new Blob([content], { type: "text/" + options.type + ";charset=utf-8;" });
|
|
23
21
|
}
|
|
24
22
|
export function createHtmlPage(opts, content) {
|
|
25
23
|
var style = opts.style;
|
package/es/filter/index.js
CHANGED
|
@@ -6,8 +6,8 @@ export var Filter = {
|
|
|
6
6
|
Panel: PanelComponent,
|
|
7
7
|
install: function (app) {
|
|
8
8
|
VXETable.hooks.add('$tableFilter', filterHook);
|
|
9
|
-
dynamicApp.component(PanelComponent.name, PanelComponent);
|
|
10
9
|
app.component(PanelComponent.name, PanelComponent);
|
|
11
10
|
}
|
|
12
11
|
};
|
|
12
|
+
dynamicApp.component(PanelComponent.name, PanelComponent);
|
|
13
13
|
export default Filter;
|
package/es/filter/src/hook.js
CHANGED
|
@@ -147,7 +147,7 @@ var tableFilterHook = {
|
|
|
147
147
|
* @param {Event} evnt 事件
|
|
148
148
|
*/
|
|
149
149
|
confirmFilterEvent: function (evnt) {
|
|
150
|
-
var filterStore = reactData.filterStore,
|
|
150
|
+
var filterStore = reactData.filterStore, oldScrollXLoad = reactData.scrollXLoad, oldScrollYLoad = reactData.scrollYLoad;
|
|
151
151
|
var filterOpts = computeFilterOpts.value;
|
|
152
152
|
var column = filterStore.column;
|
|
153
153
|
var property = column.property;
|
|
@@ -164,19 +164,26 @@ var tableFilterHook = {
|
|
|
164
164
|
if (!filterOpts.remote) {
|
|
165
165
|
$xetable.handleTableData(true);
|
|
166
166
|
$xetable.checkSelectionStatus();
|
|
167
|
-
$xetable.updateFooter();
|
|
168
|
-
if (scrollXLoad || scrollYLoad) {
|
|
169
|
-
$xetable.clearScroll();
|
|
170
|
-
if (scrollYLoad) {
|
|
171
|
-
$xetable.updateScrollYSpace();
|
|
172
|
-
}
|
|
173
|
-
}
|
|
174
167
|
}
|
|
175
168
|
$xetable.dispatchEvent('filter-change', { column: column, property: property, values: values, datas: datas, filters: filterList, filterList: filterList }, evnt);
|
|
176
169
|
$xetable.closeFilter();
|
|
177
|
-
|
|
178
|
-
|
|
170
|
+
$xetable.updateFooter().then(function () {
|
|
171
|
+
var scrollXLoad = reactData.scrollXLoad, scrollYLoad = reactData.scrollYLoad;
|
|
172
|
+
if ((oldScrollXLoad || scrollXLoad) || (oldScrollYLoad || scrollYLoad)) {
|
|
173
|
+
if (oldScrollXLoad || scrollXLoad) {
|
|
174
|
+
$xetable.updateScrollXSpace();
|
|
175
|
+
}
|
|
176
|
+
if (oldScrollYLoad || scrollYLoad) {
|
|
177
|
+
$xetable.updateScrollYSpace();
|
|
178
|
+
}
|
|
179
|
+
return $xetable.refreshScroll();
|
|
180
|
+
}
|
|
181
|
+
}).then(function () {
|
|
179
182
|
$xetable.updateCellAreas();
|
|
183
|
+
return $xetable.recalculate(true);
|
|
184
|
+
}).then(function () {
|
|
185
|
+
// 存在滚动行为未结束情况
|
|
186
|
+
setTimeout(function () { return $xetable.recalculate(); }, 50);
|
|
180
187
|
});
|
|
181
188
|
}
|
|
182
189
|
};
|
package/es/footer/index.js
CHANGED
|
@@ -2,8 +2,8 @@ import VxeTableFooterComponent from './src/footer';
|
|
|
2
2
|
import { dynamicApp } from '../dynamics';
|
|
3
3
|
export var Footer = Object.assign(VxeTableFooterComponent, {
|
|
4
4
|
install: function (app) {
|
|
5
|
-
dynamicApp.component(VxeTableFooterComponent.name, VxeTableFooterComponent);
|
|
6
5
|
app.component(VxeTableFooterComponent.name, VxeTableFooterComponent);
|
|
7
6
|
}
|
|
8
7
|
});
|
|
8
|
+
dynamicApp.component(VxeTableFooterComponent.name, VxeTableFooterComponent);
|
|
9
9
|
export default Footer;
|
package/es/footer/src/footer.js
CHANGED
|
@@ -39,7 +39,7 @@ export default defineComponent({
|
|
|
39
39
|
var $xetable = inject('$xetable', {});
|
|
40
40
|
var xID = $xetable.xID, tableProps = $xetable.props, tableReactData = $xetable.reactData, tableInternalData = $xetable.internalData;
|
|
41
41
|
var _a = $xetable.getRefMaps(), refTableHeader = _a.refTableHeader, refTableBody = _a.refTableBody, refValidTooltip = _a.refValidTooltip;
|
|
42
|
-
var
|
|
42
|
+
var _b = $xetable.getComputeMaps(), computeTooltipOpts = _b.computeTooltipOpts, computeColumnOpts = _b.computeColumnOpts;
|
|
43
43
|
var refElem = ref();
|
|
44
44
|
var refFooterTable = ref();
|
|
45
45
|
var refFooterColgroup = ref();
|
|
@@ -106,6 +106,7 @@ export default defineComponent({
|
|
|
106
106
|
var visibleColumn = tableInternalData.visibleColumn;
|
|
107
107
|
var scrollYLoad = tableReactData.scrollYLoad, overflowX = tableReactData.overflowX, scrollbarWidth = tableReactData.scrollbarWidth, currentColumn = tableReactData.currentColumn, mergeFooterList = tableReactData.mergeFooterList;
|
|
108
108
|
var tooltipOpts = computeTooltipOpts.value;
|
|
109
|
+
var columnOpts = computeColumnOpts.value;
|
|
109
110
|
// 如果是使用优化模式
|
|
110
111
|
if (fixedType) {
|
|
111
112
|
if (scrollYLoad || allColumnFooterOverflow) {
|
|
@@ -244,7 +245,7 @@ export default defineComponent({
|
|
|
244
245
|
_a['fixed--hidden'] = fixedHiddenColumn,
|
|
245
246
|
_a['col--ellipsis'] = hasEllipsis,
|
|
246
247
|
_a['col--current'] = currentColumn === column,
|
|
247
|
-
_a), getPropClass(footerClassName, params), getPropClass(footerCellClassName, params)] }, attrs), { style: footerCellStyle ? (XEUtils.isFunction(footerCellStyle) ? footerCellStyle(params) : footerCellStyle) : null }), tfOns), { key: columnKey ? column.id : $columnIndex }), [
|
|
248
|
+
_a), getPropClass(footerClassName, params), getPropClass(footerCellClassName, params)] }, attrs), { style: footerCellStyle ? (XEUtils.isFunction(footerCellStyle) ? footerCellStyle(params) : footerCellStyle) : null }), tfOns), { key: columnKey || columnOpts.useKey ? column.id : $columnIndex }), [
|
|
248
249
|
h('div', {
|
|
249
250
|
class: ['vxe-cell', {
|
|
250
251
|
'c--title': showTitle,
|
package/es/form/index.js
CHANGED
|
@@ -2,8 +2,8 @@ import VxeFormComponent from './src/form';
|
|
|
2
2
|
import { dynamicApp } from '../dynamics';
|
|
3
3
|
export var Form = Object.assign(VxeFormComponent, {
|
|
4
4
|
install: function (app) {
|
|
5
|
-
dynamicApp.component(VxeFormComponent.name, VxeFormComponent);
|
|
6
5
|
app.component(VxeFormComponent.name, VxeFormComponent);
|
|
7
6
|
}
|
|
8
7
|
});
|
|
8
|
+
dynamicApp.component(VxeFormComponent.name, VxeFormComponent);
|
|
9
9
|
export default Form;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { defineComponent, h, onUnmounted, inject, ref, onMounted, provide, nextTick } from 'vue';
|
|
2
|
-
import { errLog } from '../../tools/
|
|
1
|
+
import { defineComponent, h, onUnmounted, inject, ref, reactive, onMounted, provide, nextTick } from 'vue';
|
|
2
|
+
import { errLog } from '../../tools/log';
|
|
3
3
|
import { createItem, watchItem, destroyItem, assemItem } from './util';
|
|
4
4
|
import { formItemProps } from './form-item';
|
|
5
5
|
export default defineComponent({
|
|
@@ -11,7 +11,7 @@ export default defineComponent({
|
|
|
11
11
|
var $xeform = inject('$xeform', {});
|
|
12
12
|
var formGather = inject('xeformgather', null);
|
|
13
13
|
var defaultSlot = slots.default;
|
|
14
|
-
var formItem = createItem($xeform, props);
|
|
14
|
+
var formItem = reactive(createItem($xeform, props));
|
|
15
15
|
var xeformitem = { formItem: formItem };
|
|
16
16
|
formItem.children = [];
|
|
17
17
|
provide('xeformgather', xeformitem);
|
package/es/form/src/form-item.js
CHANGED
|
@@ -9,7 +9,7 @@ var __assign = (this && this.__assign) || function () {
|
|
|
9
9
|
};
|
|
10
10
|
return __assign.apply(this, arguments);
|
|
11
11
|
};
|
|
12
|
-
import { defineComponent, h, onUnmounted, inject, ref, onMounted } from 'vue';
|
|
12
|
+
import { defineComponent, h, onUnmounted, inject, ref, onMounted, reactive } from 'vue';
|
|
13
13
|
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';
|
|
@@ -42,7 +42,7 @@ export default defineComponent({
|
|
|
42
42
|
var refElem = ref();
|
|
43
43
|
var $xeform = inject('$xeform', {});
|
|
44
44
|
var formGather = inject('xeformgather', null);
|
|
45
|
-
var formItem = createItem($xeform, props);
|
|
45
|
+
var formItem = reactive(createItem($xeform, props));
|
|
46
46
|
formItem.slots = slots;
|
|
47
47
|
watchItem(props, formItem);
|
|
48
48
|
onMounted(function () {
|
|
@@ -115,9 +115,9 @@ export default defineComponent({
|
|
|
115
115
|
}
|
|
116
116
|
var ons = showTooltip ? {
|
|
117
117
|
onMouseenter: function (evnt) {
|
|
118
|
-
$xeform.
|
|
118
|
+
$xeform.triggerTitleTipEvent(evnt, params);
|
|
119
119
|
},
|
|
120
|
-
onMouseleave: $xeform.
|
|
120
|
+
onMouseleave: $xeform.handleTitleTipLeaveEvent
|
|
121
121
|
} : {};
|
|
122
122
|
return h('div', {
|
|
123
123
|
ref: refElem,
|
package/es/form/src/form.js
CHANGED
|
@@ -13,9 +13,10 @@ import { defineComponent, h, ref, resolveComponent, createCommentVNode, provide,
|
|
|
13
13
|
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
|
-
import {
|
|
16
|
+
import { getFuncText, isEnableConf, eqEmptyValue } from '../../tools/utils';
|
|
17
|
+
import { errLog } from '../../tools/log';
|
|
17
18
|
import { scrollToView } from '../../tools/dom';
|
|
18
|
-
import { createItem } from './util';
|
|
19
|
+
import { createItem, handleFieldOrItem } from './util';
|
|
19
20
|
import { renderTitle } from './render';
|
|
20
21
|
import { useSize } from '../../hooks/size';
|
|
21
22
|
var Rule = /** @class */ (function () {
|
|
@@ -118,7 +119,6 @@ export default defineComponent({
|
|
|
118
119
|
});
|
|
119
120
|
var internalData = reactive({
|
|
120
121
|
tooltipTimeout: null,
|
|
121
|
-
tooltipActive: false,
|
|
122
122
|
tooltipStore: {
|
|
123
123
|
item: null,
|
|
124
124
|
visible: false
|
|
@@ -130,22 +130,8 @@ export default defineComponent({
|
|
|
130
130
|
var computeValidOpts = computed(function () {
|
|
131
131
|
return Object.assign({}, GlobalConfig.form.validConfig, props.validConfig);
|
|
132
132
|
});
|
|
133
|
-
var computeTooltipOpts =
|
|
134
|
-
|
|
135
|
-
var tooltipOpts = computeTooltipOpts.value;
|
|
136
|
-
setTimeout(function () {
|
|
137
|
-
if (!internalData.tooltipActive) {
|
|
138
|
-
formMethods.closeTooltip();
|
|
139
|
-
}
|
|
140
|
-
}, tooltipOpts.leaveDelay);
|
|
141
|
-
return false;
|
|
142
|
-
};
|
|
143
|
-
computeTooltipOpts = computed(function () {
|
|
144
|
-
var opts = Object.assign({ leaveDelay: 300 }, GlobalConfig.form.tooltipConfig, props.tooltipConfig);
|
|
145
|
-
if (opts.enterable) {
|
|
146
|
-
opts.leaveMethod = handleTooltipLeaveMethod;
|
|
147
|
-
}
|
|
148
|
-
return opts;
|
|
133
|
+
var computeTooltipOpts = computed(function () {
|
|
134
|
+
return Object.assign({}, GlobalConfig.tooltip, GlobalConfig.form.tooltipConfig, props.tooltipConfig);
|
|
149
135
|
});
|
|
150
136
|
var refMaps = {
|
|
151
137
|
refElem: refElem
|
|
@@ -200,6 +186,10 @@ export default defineComponent({
|
|
|
200
186
|
}, { children: 'children' });
|
|
201
187
|
return itemList;
|
|
202
188
|
};
|
|
189
|
+
var getItemByField = function (field) {
|
|
190
|
+
var rest = XEUtils.findTree(reactData.formItems, function (item) { return item.field === field; }, { children: 'children' });
|
|
191
|
+
return rest ? rest.item : null;
|
|
192
|
+
};
|
|
203
193
|
var getCollapseStatus = function () {
|
|
204
194
|
return reactData.collapseAll;
|
|
205
195
|
};
|
|
@@ -215,16 +205,15 @@ export default defineComponent({
|
|
|
215
205
|
formMethods.dispatchEvent('toggle-collapse', { status: status, collapse: status, data: props.data }, evnt);
|
|
216
206
|
formMethods.dispatchEvent('collapse', { status: status, collapse: status, data: props.data }, evnt);
|
|
217
207
|
};
|
|
218
|
-
var clearValidate = function (
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
var item = itemList.find(function (item) { return item.field === field; });
|
|
208
|
+
var clearValidate = function (fieldOrItem) {
|
|
209
|
+
if (fieldOrItem) {
|
|
210
|
+
var item = handleFieldOrItem($xeform, fieldOrItem);
|
|
222
211
|
if (item) {
|
|
223
212
|
item.showError = false;
|
|
224
213
|
}
|
|
225
214
|
}
|
|
226
215
|
else {
|
|
227
|
-
|
|
216
|
+
getItems().forEach(function (item) {
|
|
228
217
|
item.showError = false;
|
|
229
218
|
});
|
|
230
219
|
}
|
|
@@ -255,10 +244,9 @@ export default defineComponent({
|
|
|
255
244
|
formMethods.dispatchEvent('reset', { data: props.data }, evnt);
|
|
256
245
|
};
|
|
257
246
|
var handleFocus = function (fields) {
|
|
258
|
-
var itemList = getItems();
|
|
259
247
|
var el = refElem.value;
|
|
260
248
|
fields.some(function (property, index) {
|
|
261
|
-
var item =
|
|
249
|
+
var item = getItemByField(property);
|
|
262
250
|
if (item && isEnableConf(item.itemRender)) {
|
|
263
251
|
var itemRender = item.itemRender;
|
|
264
252
|
var compConf = VXETable.renderer.get(itemRender.name);
|
|
@@ -411,8 +399,9 @@ export default defineComponent({
|
|
|
411
399
|
clearValidate();
|
|
412
400
|
return beginValidate(getItems(), '', callback);
|
|
413
401
|
};
|
|
414
|
-
var validateField = function (
|
|
415
|
-
|
|
402
|
+
var validateField = function (fieldOrItem, callback) {
|
|
403
|
+
var item = handleFieldOrItem($xeform, fieldOrItem);
|
|
404
|
+
return beginValidate(item ? [item] : [], '', callback);
|
|
416
405
|
};
|
|
417
406
|
var submitEvent = function (evnt) {
|
|
418
407
|
evnt.preventDefault();
|
|
@@ -439,7 +428,7 @@ export default defineComponent({
|
|
|
439
428
|
}
|
|
440
429
|
return nextTick();
|
|
441
430
|
};
|
|
442
|
-
var
|
|
431
|
+
var triggerTitleTipEvent = function (evnt, params) {
|
|
443
432
|
var item = params.item;
|
|
444
433
|
var tooltipStore = internalData.tooltipStore;
|
|
445
434
|
var $tooltip = refTooltip.value;
|
|
@@ -447,8 +436,9 @@ export default defineComponent({
|
|
|
447
436
|
var content = (overflowElem.textContent || '').trim();
|
|
448
437
|
var isCellOverflow = overflowElem.scrollWidth > overflowElem.clientWidth;
|
|
449
438
|
clearTimeout(internalData.tooltipTimeout);
|
|
450
|
-
|
|
451
|
-
|
|
439
|
+
if (tooltipStore.item !== item) {
|
|
440
|
+
closeTooltip();
|
|
441
|
+
}
|
|
452
442
|
if (content && isCellOverflow) {
|
|
453
443
|
Object.assign(tooltipStore, {
|
|
454
444
|
item: item,
|
|
@@ -459,13 +449,16 @@ export default defineComponent({
|
|
|
459
449
|
}
|
|
460
450
|
}
|
|
461
451
|
};
|
|
462
|
-
var
|
|
452
|
+
var handleTitleTipLeaveEvent = function () {
|
|
463
453
|
var tooltipOpts = computeTooltipOpts.value;
|
|
464
|
-
|
|
454
|
+
var $tooltip = refTooltip.value;
|
|
455
|
+
if ($tooltip) {
|
|
456
|
+
$tooltip.setActived(false);
|
|
457
|
+
}
|
|
465
458
|
if (tooltipOpts.enterable) {
|
|
466
459
|
internalData.tooltipTimeout = setTimeout(function () {
|
|
467
|
-
|
|
468
|
-
if ($tooltip && !$tooltip.
|
|
460
|
+
$tooltip = refTooltip.value;
|
|
461
|
+
if ($tooltip && !$tooltip.isActived()) {
|
|
469
462
|
closeTooltip();
|
|
470
463
|
}
|
|
471
464
|
}, tooltipOpts.leaveDelay);
|
|
@@ -488,8 +481,7 @@ export default defineComponent({
|
|
|
488
481
|
})
|
|
489
482
|
.catch(function (_a) {
|
|
490
483
|
var rule = _a.rule;
|
|
491
|
-
var
|
|
492
|
-
var item = itemList.find(function (item) { return item.field === property; });
|
|
484
|
+
var item = getItemByField(property);
|
|
493
485
|
if (item) {
|
|
494
486
|
item.showError = true;
|
|
495
487
|
item.errRule = rule;
|
|
@@ -501,7 +493,7 @@ export default defineComponent({
|
|
|
501
493
|
var data = props.data, rules = props.rules, allTitleOverflow = props.titleOverflow;
|
|
502
494
|
var collapseAll = reactData.collapseAll;
|
|
503
495
|
var validOpts = computeValidOpts.value;
|
|
504
|
-
return itemList.map(function (item
|
|
496
|
+
return itemList.map(function (item) {
|
|
505
497
|
var slots = item.slots, title = item.title, visible = item.visible, folding = item.folding, visibleMethod = item.visibleMethod, field = item.field, collapseNode = item.collapseNode, itemRender = item.itemRender, showError = item.showError, errRule = item.errRule, className = item.className, titleOverflow = item.titleOverflow, children = item.children;
|
|
506
498
|
var compConf = isEnableConf(itemRender) ? VXETable.renderer.get(itemRender.name) : null;
|
|
507
499
|
var defaultSlot = slots ? slots.default : null;
|
|
@@ -571,9 +563,9 @@ export default defineComponent({
|
|
|
571
563
|
}
|
|
572
564
|
var ons = showTooltip ? {
|
|
573
565
|
onMouseenter: function (evnt) {
|
|
574
|
-
|
|
566
|
+
triggerTitleTipEvent(evnt, params);
|
|
575
567
|
},
|
|
576
|
-
onMouseleave:
|
|
568
|
+
onMouseleave: handleTitleTipLeaveEvent
|
|
577
569
|
} : {};
|
|
578
570
|
return h('div', {
|
|
579
571
|
class: ['vxe-form--item', item.id, span ? "vxe-col--" + span + " is--span" : '', className ? (XEUtils.isFunction(className) ? className(params) : className) : '', {
|
|
@@ -583,7 +575,7 @@ export default defineComponent({
|
|
|
583
575
|
'is--active': !itemVisibleMethod || itemVisibleMethod(params),
|
|
584
576
|
'is--error': showError
|
|
585
577
|
}],
|
|
586
|
-
key:
|
|
578
|
+
key: item.id
|
|
587
579
|
}, [
|
|
588
580
|
h('div', {
|
|
589
581
|
class: 'vxe-form--item-inner'
|
|
@@ -611,13 +603,14 @@ export default defineComponent({
|
|
|
611
603
|
updateStatus: updateStatus,
|
|
612
604
|
toggleCollapse: toggleCollapse,
|
|
613
605
|
getItems: getItems,
|
|
606
|
+
getItemByField: getItemByField,
|
|
614
607
|
closeTooltip: closeTooltip
|
|
615
608
|
};
|
|
616
609
|
var formPrivateMethods = {
|
|
617
610
|
callSlot: callSlot,
|
|
618
611
|
toggleCollapseEvent: toggleCollapseEvent,
|
|
619
|
-
|
|
620
|
-
|
|
612
|
+
triggerTitleTipEvent: triggerTitleTipEvent,
|
|
613
|
+
handleTitleTipLeaveEvent: handleTitleTipLeaveEvent
|
|
621
614
|
};
|
|
622
615
|
Object.assign($xeform, formMethods, formPrivateMethods);
|
|
623
616
|
watch(function () { return reactData.staticItems; }, function (value) {
|
package/es/form/src/render.js
CHANGED
|
@@ -1,3 +1,14 @@
|
|
|
1
|
+
var __assign = (this && this.__assign) || function () {
|
|
2
|
+
__assign = Object.assign || function(t) {
|
|
3
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
4
|
+
s = arguments[i];
|
|
5
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
6
|
+
t[p] = s[p];
|
|
7
|
+
}
|
|
8
|
+
return t;
|
|
9
|
+
};
|
|
10
|
+
return __assign.apply(this, arguments);
|
|
11
|
+
};
|
|
1
12
|
import { h, resolveComponent } from 'vue';
|
|
2
13
|
import GlobalConfig from '../../v-x-e-table/src/conf';
|
|
3
14
|
import { VXETable } from '../../v-x-e-table';
|
|
@@ -22,7 +33,9 @@ function renderSuffixIcon(titleSuffix) {
|
|
|
22
33
|
}
|
|
23
34
|
export function renderTitle($xeform, item) {
|
|
24
35
|
var data = $xeform.props.data;
|
|
36
|
+
var computeTooltipOpts = $xeform.getComputeMaps().computeTooltipOpts;
|
|
25
37
|
var slots = item.slots, field = item.field, itemRender = item.itemRender, titlePrefix = item.titlePrefix, titleSuffix = item.titleSuffix;
|
|
38
|
+
var tooltipOpts = computeTooltipOpts.value;
|
|
26
39
|
var compConf = isEnableConf(itemRender) ? VXETable.renderer.get(itemRender.name) : null;
|
|
27
40
|
var params = { data: data, property: field, item: item, $form: $xeform };
|
|
28
41
|
var titleSlot = slots ? slots.title : null;
|
|
@@ -30,11 +43,7 @@ export function renderTitle($xeform, item) {
|
|
|
30
43
|
var titVNs = [];
|
|
31
44
|
if (titlePrefix) {
|
|
32
45
|
titVNs.push((titlePrefix.content || titlePrefix.message)
|
|
33
|
-
? h(resolveComponent('vxe-tooltip'), {
|
|
34
|
-
content: getFuncText(titlePrefix.content || titlePrefix.message),
|
|
35
|
-
enterable: titlePrefix.enterable,
|
|
36
|
-
theme: titlePrefix.theme
|
|
37
|
-
}, {
|
|
46
|
+
? h(resolveComponent('vxe-tooltip'), __assign(__assign(__assign({}, tooltipOpts), titlePrefix), { content: getFuncText(titlePrefix.content || titlePrefix.message) }), {
|
|
38
47
|
default: function () { return renderPrefixIcon(titlePrefix); }
|
|
39
48
|
})
|
|
40
49
|
: renderPrefixIcon(titlePrefix));
|
|
@@ -48,11 +57,7 @@ export function renderTitle($xeform, item) {
|
|
|
48
57
|
var fixVNs = [];
|
|
49
58
|
if (titleSuffix) {
|
|
50
59
|
fixVNs.push((titleSuffix.content || titleSuffix.message)
|
|
51
|
-
? h(resolveComponent('vxe-tooltip'), {
|
|
52
|
-
content: getFuncText(titleSuffix.content || titleSuffix.message),
|
|
53
|
-
enterable: titleSuffix.enterable,
|
|
54
|
-
theme: titleSuffix.theme
|
|
55
|
-
}, {
|
|
60
|
+
? h(resolveComponent('vxe-tooltip'), __assign(__assign(__assign({}, tooltipOpts), titleSuffix), { content: getFuncText(titleSuffix.content || titleSuffix.message) }), {
|
|
56
61
|
default: function () { return renderSuffixIcon(titleSuffix); }
|
|
57
62
|
})
|
|
58
63
|
: renderSuffixIcon(titleSuffix));
|
package/es/form/src/util.js
CHANGED
|
@@ -7,6 +7,12 @@ export function isFormItem(item) {
|
|
|
7
7
|
export function createItem($xeform, _vm) {
|
|
8
8
|
return isFormItem(_vm) ? _vm : new ItemInfo($xeform, _vm);
|
|
9
9
|
}
|
|
10
|
+
export var handleFieldOrItem = function ($xeform, fieldOrItem) {
|
|
11
|
+
if (fieldOrItem) {
|
|
12
|
+
return XEUtils.isString(fieldOrItem) ? $xeform.getItemByField(fieldOrItem) : fieldOrItem;
|
|
13
|
+
}
|
|
14
|
+
return null;
|
|
15
|
+
};
|
|
10
16
|
export function watchItem(props, formItem) {
|
|
11
17
|
Object.keys(props).forEach(function (name) {
|
|
12
18
|
watch(function () { return props[name]; }, function (value) {
|
package/es/form-gather/index.js
CHANGED
|
@@ -2,8 +2,8 @@ import VxeFormGatherComponent from '../form/src/form-gather';
|
|
|
2
2
|
import { dynamicApp } from '../dynamics';
|
|
3
3
|
export var FormGather = Object.assign(VxeFormGatherComponent, {
|
|
4
4
|
install: function (app) {
|
|
5
|
-
dynamicApp.component(VxeFormGatherComponent.name, VxeFormGatherComponent);
|
|
6
5
|
app.component(VxeFormGatherComponent.name, VxeFormGatherComponent);
|
|
7
6
|
}
|
|
8
7
|
});
|
|
8
|
+
dynamicApp.component(VxeFormGatherComponent.name, VxeFormGatherComponent);
|
|
9
9
|
export default FormGather;
|
package/es/form-item/index.js
CHANGED
|
@@ -2,8 +2,8 @@ import VxeFormItemComponent from '../form/src/form-item';
|
|
|
2
2
|
import { dynamicApp } from '../dynamics';
|
|
3
3
|
export var FormItem = Object.assign(VxeFormItemComponent, {
|
|
4
4
|
install: function (app) {
|
|
5
|
-
dynamicApp.component(VxeFormItemComponent.name, VxeFormItemComponent);
|
|
6
5
|
app.component(VxeFormItemComponent.name, VxeFormItemComponent);
|
|
7
6
|
}
|
|
8
7
|
});
|
|
8
|
+
dynamicApp.component(VxeFormItemComponent.name, VxeFormItemComponent);
|
|
9
9
|
export default FormItem;
|
package/es/grid/index.js
CHANGED
|
@@ -2,8 +2,8 @@ import VxeGridComponent from './src/grid';
|
|
|
2
2
|
import { dynamicApp } from '../dynamics';
|
|
3
3
|
export var Grid = Object.assign(VxeGridComponent, {
|
|
4
4
|
install: function (app) {
|
|
5
|
-
dynamicApp.component(VxeGridComponent.name, VxeGridComponent);
|
|
6
5
|
app.component(VxeGridComponent.name, VxeGridComponent);
|
|
7
6
|
}
|
|
8
7
|
});
|
|
8
|
+
dynamicApp.component(VxeGridComponent.name, VxeGridComponent);
|
|
9
9
|
export default Grid;
|