vxe-table 4.2.0-beta.0 → 4.2.0-beta.4
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/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/export/index.js +2 -2
- package/es/filter/index.js +1 -1
- package/es/footer/index.js +1 -1
- package/es/form/index.js +1 -1
- package/es/form/src/form-item.js +2 -2
- package/es/form/src/form.js +13 -28
- package/es/form/src/render.js +15 -10
- 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/header/index.js +1 -1
- package/es/input/index.js +1 -1
- package/es/list/index.js +1 -1
- package/es/menu/index.js +1 -1
- package/es/modal/index.js +1 -1
- package/es/optgroup/index.js +1 -1
- package/es/option/index.js +1 -1
- package/es/pager/index.js +1 -1
- 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/src/select.js +14 -3
- 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/cell.js +3 -3
- package/es/table/src/column.js +3 -1
- package/es/table/src/columnInfo.js +1 -0
- package/es/table/src/emits.js +5 -1
- package/es/table/src/props.js +1 -1
- package/es/table/src/table.js +43 -56
- package/es/table/src/util.js +1 -1
- package/es/textarea/index.js +1 -1
- package/es/toolbar/index.js +1 -1
- package/es/tools/log.js +1 -1
- package/es/tooltip/index.js +1 -1
- package/es/tooltip/src/tooltip.js +47 -28
- package/es/tooltip/style.css +1 -1
- package/es/v-x-e-table/index.js +1 -1
- package/es/v-x-e-table/src/conf.js +12 -7
- 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/export/index.js +5 -4
- package/lib/export/index.min.js +1 -1
- package/lib/filter/index.js +3 -2
- package/lib/filter/index.min.js +1 -1
- package/lib/footer/index.js +3 -2
- package/lib/footer/index.min.js +1 -1
- package/lib/form/index.js +3 -2
- package/lib/form/index.min.js +1 -1
- package/lib/form/src/form-item.js +2 -2
- package/lib/form/src/form-item.min.js +1 -1
- package/lib/form/src/form.js +14 -34
- 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-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/header/index.js +3 -2
- package/lib/header/index.min.js +1 -1
- package/lib/index.umd.js +205 -190
- package/lib/index.umd.min.js +1 -1
- package/lib/input/index.js +3 -2
- package/lib/input/index.min.js +1 -1
- 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/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/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/src/select.js +14 -3
- package/lib/select/src/select.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/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 +1 -0
- 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 +1 -1
- package/lib/table/src/table.js +49 -60
- package/lib/table/src/table.min.js +1 -1
- package/lib/table/src/util.js +1 -1
- 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/tools/log.js +1 -1
- package/lib/tools/log.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 +55 -32
- 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 -1
- 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/package.json +3 -3
- 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/export/index.ts +3 -2
- package/packages/filter/index.ts +2 -1
- package/packages/footer/index.ts +2 -1
- package/packages/form/index.ts +2 -1
- package/packages/form/src/form-item.ts +2 -2
- package/packages/form/src/form.ts +14 -31
- package/packages/form/src/render.ts +8 -6
- 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/header/index.ts +2 -1
- package/packages/input/index.ts +2 -1
- package/packages/list/index.ts +2 -1
- package/packages/menu/index.ts +2 -1
- package/packages/modal/index.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/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/select/src/select.ts +15 -3
- package/packages/switch/index.ts +2 -1
- package/packages/table/index.ts +2 -1
- package/packages/table/src/cell.ts +3 -3
- package/packages/table/src/column.ts +3 -1
- package/packages/table/src/columnInfo.ts +1 -0
- package/packages/table/src/emits.ts +5 -1
- package/packages/table/src/props.ts +1 -1
- package/packages/table/src/table.ts +46 -56
- package/packages/table/src/util.ts +1 -1
- package/packages/textarea/index.ts +2 -1
- package/packages/toolbar/index.ts +2 -1
- package/packages/tooltip/index.ts +2 -1
- package/packages/tooltip/src/tooltip.ts +48 -28
- package/packages/v-x-e-table/src/conf.ts +12 -7
- 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 +131 -132
- 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 +62 -62
- package/types/plugins/pro.d.ts +247 -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 +98 -82
- package/types/switch.d.ts +40 -40
- package/types/table.d.ts +1380 -1336
- package/types/textarea.d.ts +71 -71
- package/types/toolbar.d.ts +65 -65
- package/types/tooltip.d.ts +50 -48
- 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 +44 -44
- 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/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/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/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/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/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;
|
package/es/form/src/form-item.js
CHANGED
|
@@ -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
|
@@ -119,7 +119,6 @@ export default defineComponent({
|
|
|
119
119
|
});
|
|
120
120
|
var internalData = reactive({
|
|
121
121
|
tooltipTimeout: null,
|
|
122
|
-
tooltipActive: false,
|
|
123
122
|
tooltipStore: {
|
|
124
123
|
item: null,
|
|
125
124
|
visible: false
|
|
@@ -131,22 +130,8 @@ export default defineComponent({
|
|
|
131
130
|
var computeValidOpts = computed(function () {
|
|
132
131
|
return Object.assign({}, GlobalConfig.form.validConfig, props.validConfig);
|
|
133
132
|
});
|
|
134
|
-
var computeTooltipOpts =
|
|
135
|
-
|
|
136
|
-
var tooltipOpts = computeTooltipOpts.value;
|
|
137
|
-
setTimeout(function () {
|
|
138
|
-
if (!internalData.tooltipActive) {
|
|
139
|
-
formMethods.closeTooltip();
|
|
140
|
-
}
|
|
141
|
-
}, tooltipOpts.leaveDelay);
|
|
142
|
-
return false;
|
|
143
|
-
};
|
|
144
|
-
computeTooltipOpts = computed(function () {
|
|
145
|
-
var opts = Object.assign({ leaveDelay: 300 }, GlobalConfig.form.tooltipConfig, props.tooltipConfig);
|
|
146
|
-
if (opts.enterable) {
|
|
147
|
-
opts.leaveMethod = handleTooltipLeaveMethod;
|
|
148
|
-
}
|
|
149
|
-
return opts;
|
|
133
|
+
var computeTooltipOpts = computed(function () {
|
|
134
|
+
return Object.assign({}, GlobalConfig.tooltip, GlobalConfig.form.tooltipConfig, props.tooltipConfig);
|
|
150
135
|
});
|
|
151
136
|
var refMaps = {
|
|
152
137
|
refElem: refElem
|
|
@@ -443,7 +428,7 @@ export default defineComponent({
|
|
|
443
428
|
}
|
|
444
429
|
return nextTick();
|
|
445
430
|
};
|
|
446
|
-
var
|
|
431
|
+
var triggerTitleTipEvent = function (evnt, params) {
|
|
447
432
|
var item = params.item;
|
|
448
433
|
var tooltipStore = internalData.tooltipStore;
|
|
449
434
|
var $tooltip = refTooltip.value;
|
|
@@ -451,8 +436,9 @@ export default defineComponent({
|
|
|
451
436
|
var content = (overflowElem.textContent || '').trim();
|
|
452
437
|
var isCellOverflow = overflowElem.scrollWidth > overflowElem.clientWidth;
|
|
453
438
|
clearTimeout(internalData.tooltipTimeout);
|
|
454
|
-
|
|
455
|
-
|
|
439
|
+
if (tooltipStore.item !== item) {
|
|
440
|
+
closeTooltip();
|
|
441
|
+
}
|
|
456
442
|
if (content && isCellOverflow) {
|
|
457
443
|
Object.assign(tooltipStore, {
|
|
458
444
|
item: item,
|
|
@@ -463,10 +449,9 @@ export default defineComponent({
|
|
|
463
449
|
}
|
|
464
450
|
}
|
|
465
451
|
};
|
|
466
|
-
var
|
|
452
|
+
var handleTitleTipLeaveEvent = function () {
|
|
467
453
|
var tooltipOpts = computeTooltipOpts.value;
|
|
468
454
|
var $tooltip = refTooltip.value;
|
|
469
|
-
internalData.tooltipActive = false;
|
|
470
455
|
if ($tooltip) {
|
|
471
456
|
$tooltip.setActived(false);
|
|
472
457
|
}
|
|
@@ -508,7 +493,7 @@ export default defineComponent({
|
|
|
508
493
|
var data = props.data, rules = props.rules, allTitleOverflow = props.titleOverflow;
|
|
509
494
|
var collapseAll = reactData.collapseAll;
|
|
510
495
|
var validOpts = computeValidOpts.value;
|
|
511
|
-
return itemList.map(function (item
|
|
496
|
+
return itemList.map(function (item) {
|
|
512
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;
|
|
513
498
|
var compConf = isEnableConf(itemRender) ? VXETable.renderer.get(itemRender.name) : null;
|
|
514
499
|
var defaultSlot = slots ? slots.default : null;
|
|
@@ -578,9 +563,9 @@ export default defineComponent({
|
|
|
578
563
|
}
|
|
579
564
|
var ons = showTooltip ? {
|
|
580
565
|
onMouseenter: function (evnt) {
|
|
581
|
-
|
|
566
|
+
triggerTitleTipEvent(evnt, params);
|
|
582
567
|
},
|
|
583
|
-
onMouseleave:
|
|
568
|
+
onMouseleave: handleTitleTipLeaveEvent
|
|
584
569
|
} : {};
|
|
585
570
|
return h('div', {
|
|
586
571
|
class: ['vxe-form--item', item.id, span ? "vxe-col--" + span + " is--span" : '', className ? (XEUtils.isFunction(className) ? className(params) : className) : '', {
|
|
@@ -590,7 +575,7 @@ export default defineComponent({
|
|
|
590
575
|
'is--active': !itemVisibleMethod || itemVisibleMethod(params),
|
|
591
576
|
'is--error': showError
|
|
592
577
|
}],
|
|
593
|
-
key:
|
|
578
|
+
key: item.id
|
|
594
579
|
}, [
|
|
595
580
|
h('div', {
|
|
596
581
|
class: 'vxe-form--item-inner'
|
|
@@ -624,8 +609,8 @@ export default defineComponent({
|
|
|
624
609
|
var formPrivateMethods = {
|
|
625
610
|
callSlot: callSlot,
|
|
626
611
|
toggleCollapseEvent: toggleCollapseEvent,
|
|
627
|
-
|
|
628
|
-
|
|
612
|
+
triggerTitleTipEvent: triggerTitleTipEvent,
|
|
613
|
+
handleTitleTipLeaveEvent: handleTitleTipLeaveEvent
|
|
629
614
|
};
|
|
630
615
|
Object.assign($xeform, formMethods, formPrivateMethods);
|
|
631
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-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;
|
package/es/header/index.js
CHANGED
|
@@ -2,8 +2,8 @@ import VxeTableHeader from './src/header';
|
|
|
2
2
|
import { dynamicApp } from '../dynamics';
|
|
3
3
|
export var Header = Object.assign(VxeTableHeader, {
|
|
4
4
|
install: function (app) {
|
|
5
|
-
dynamicApp.component(VxeTableHeader.name, VxeTableHeader);
|
|
6
5
|
app.component(VxeTableHeader.name, VxeTableHeader);
|
|
7
6
|
}
|
|
8
7
|
});
|
|
8
|
+
dynamicApp.component(VxeTableHeader.name, VxeTableHeader);
|
|
9
9
|
export default Header;
|
package/es/input/index.js
CHANGED
|
@@ -2,8 +2,8 @@ import VxeInputConstructor from './src/input';
|
|
|
2
2
|
import { dynamicApp } from '../dynamics';
|
|
3
3
|
export var Input = Object.assign(VxeInputConstructor, {
|
|
4
4
|
install: function (app) {
|
|
5
|
-
dynamicApp.component(VxeInputConstructor.name, VxeInputConstructor);
|
|
6
5
|
app.component(VxeInputConstructor.name, VxeInputConstructor);
|
|
7
6
|
}
|
|
8
7
|
});
|
|
8
|
+
dynamicApp.component(VxeInputConstructor.name, VxeInputConstructor);
|
|
9
9
|
export default Input;
|
package/es/list/index.js
CHANGED
|
@@ -2,8 +2,8 @@ import VxeListComponent from './src/list';
|
|
|
2
2
|
import { dynamicApp } from '../dynamics';
|
|
3
3
|
export var List = Object.assign(VxeListComponent, {
|
|
4
4
|
install: function (app) {
|
|
5
|
-
dynamicApp.component(VxeListComponent.name, VxeListComponent);
|
|
6
5
|
app.component(VxeListComponent.name, VxeListComponent);
|
|
7
6
|
}
|
|
8
7
|
});
|
|
8
|
+
dynamicApp.component(VxeListComponent.name, VxeListComponent);
|
|
9
9
|
export default List;
|
package/es/menu/index.js
CHANGED
|
@@ -6,8 +6,8 @@ export var Menu = {
|
|
|
6
6
|
Panel: PanelComponent,
|
|
7
7
|
install: function (app) {
|
|
8
8
|
VXETable.hooks.add('$tableMenu', menuHook);
|
|
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 Menu;
|
package/es/modal/index.js
CHANGED
|
@@ -98,9 +98,9 @@ var ModalController = {
|
|
|
98
98
|
export var modal = ModalController;
|
|
99
99
|
export var Modal = Object.assign(VxeModalComponent, {
|
|
100
100
|
install: function (app) {
|
|
101
|
-
dynamicApp.component(VxeModalComponent.name, VxeModalComponent);
|
|
102
101
|
app.component(VxeModalComponent.name, VxeModalComponent);
|
|
103
102
|
VXETable.modal = ModalController;
|
|
104
103
|
}
|
|
105
104
|
});
|
|
105
|
+
dynamicApp.component(VxeModalComponent.name, VxeModalComponent);
|
|
106
106
|
export default Modal;
|
package/es/optgroup/index.js
CHANGED
|
@@ -2,8 +2,8 @@ import VxeOptgroupComponent from '../select/src/optgroup';
|
|
|
2
2
|
import { dynamicApp } from '../dynamics';
|
|
3
3
|
export var Optgroup = Object.assign(VxeOptgroupComponent, {
|
|
4
4
|
install: function (app) {
|
|
5
|
-
dynamicApp.component(VxeOptgroupComponent.name, VxeOptgroupComponent);
|
|
6
5
|
app.component(VxeOptgroupComponent.name, VxeOptgroupComponent);
|
|
7
6
|
}
|
|
8
7
|
});
|
|
8
|
+
dynamicApp.component(VxeOptgroupComponent.name, VxeOptgroupComponent);
|
|
9
9
|
export default Optgroup;
|
package/es/option/index.js
CHANGED
|
@@ -2,8 +2,8 @@ import VxeOptionComponent from '../select/src/option';
|
|
|
2
2
|
import { dynamicApp } from '../dynamics';
|
|
3
3
|
export var Option = Object.assign(VxeOptionComponent, {
|
|
4
4
|
install: function (app) {
|
|
5
|
-
dynamicApp.component(VxeOptionComponent.name, VxeOptionComponent);
|
|
6
5
|
app.component(VxeOptionComponent.name, VxeOptionComponent);
|
|
7
6
|
}
|
|
8
7
|
});
|
|
8
|
+
dynamicApp.component(VxeOptionComponent.name, VxeOptionComponent);
|
|
9
9
|
export default Option;
|
package/es/pager/index.js
CHANGED
|
@@ -2,8 +2,8 @@ import VxePagerComponent from './src/pager';
|
|
|
2
2
|
import { dynamicApp } from '../dynamics';
|
|
3
3
|
export var Pager = Object.assign(VxePagerComponent, {
|
|
4
4
|
install: function (app) {
|
|
5
|
-
dynamicApp.component(VxePagerComponent.name, VxePagerComponent);
|
|
6
5
|
app.component(VxePagerComponent.name, VxePagerComponent);
|
|
7
6
|
}
|
|
8
7
|
});
|
|
8
|
+
dynamicApp.component(VxePagerComponent.name, VxePagerComponent);
|
|
9
9
|
export default Pager;
|
package/es/pulldown/index.js
CHANGED
|
@@ -2,8 +2,8 @@ import VxePulldownComponent from './src/pulldown';
|
|
|
2
2
|
import { dynamicApp } from '../dynamics';
|
|
3
3
|
export var Pulldown = Object.assign(VxePulldownComponent, {
|
|
4
4
|
install: function (app) {
|
|
5
|
-
dynamicApp.component(VxePulldownComponent.name, VxePulldownComponent);
|
|
6
5
|
app.component(VxePulldownComponent.name, VxePulldownComponent);
|
|
7
6
|
}
|
|
8
7
|
});
|
|
8
|
+
dynamicApp.component(VxePulldownComponent.name, VxePulldownComponent);
|
|
9
9
|
export default Pulldown;
|
package/es/radio/index.js
CHANGED
|
@@ -2,8 +2,8 @@ import VxeRadioComponent from './src/radio';
|
|
|
2
2
|
import { dynamicApp } from '../dynamics';
|
|
3
3
|
export var Radio = Object.assign(VxeRadioComponent, {
|
|
4
4
|
install: function (app) {
|
|
5
|
-
dynamicApp.component(VxeRadioComponent.name, VxeRadioComponent);
|
|
6
5
|
app.component(VxeRadioComponent.name, VxeRadioComponent);
|
|
7
6
|
}
|
|
8
7
|
});
|
|
8
|
+
dynamicApp.component(VxeRadioComponent.name, VxeRadioComponent);
|
|
9
9
|
export default Radio;
|
package/es/radio-button/index.js
CHANGED
|
@@ -2,8 +2,8 @@ import VxeRadioButtonComponent from '../radio/src/button';
|
|
|
2
2
|
import { dynamicApp } from '../dynamics';
|
|
3
3
|
export var RadioButton = Object.assign(VxeRadioButtonComponent, {
|
|
4
4
|
install: function (app) {
|
|
5
|
-
dynamicApp.component(VxeRadioButtonComponent.name, VxeRadioButtonComponent);
|
|
6
5
|
app.component(VxeRadioButtonComponent.name, VxeRadioButtonComponent);
|
|
7
6
|
}
|
|
8
7
|
});
|
|
8
|
+
dynamicApp.component(VxeRadioButtonComponent.name, VxeRadioButtonComponent);
|
|
9
9
|
export default RadioButton;
|
package/es/radio-group/index.js
CHANGED
|
@@ -2,8 +2,8 @@ import VxeRadioGroupComponent from '../radio/src/group';
|
|
|
2
2
|
import { dynamicApp } from '../dynamics';
|
|
3
3
|
export var RadioGroup = Object.assign(VxeRadioGroupComponent, {
|
|
4
4
|
install: function (app) {
|
|
5
|
-
dynamicApp.component(VxeRadioGroupComponent.name, VxeRadioGroupComponent);
|
|
6
5
|
app.component(VxeRadioGroupComponent.name, VxeRadioGroupComponent);
|
|
7
6
|
}
|
|
8
7
|
});
|
|
8
|
+
dynamicApp.component(VxeRadioGroupComponent.name, VxeRadioGroupComponent);
|
|
9
9
|
export default RadioGroup;
|
package/es/select/index.js
CHANGED
|
@@ -2,8 +2,8 @@ import VxeSelectComponent from './src/select';
|
|
|
2
2
|
import { dynamicApp } from '../dynamics';
|
|
3
3
|
export var Select = Object.assign(VxeSelectComponent, {
|
|
4
4
|
install: function (app) {
|
|
5
|
-
dynamicApp.component(VxeSelectComponent.name, VxeSelectComponent);
|
|
6
5
|
app.component(VxeSelectComponent.name, VxeSelectComponent);
|
|
7
6
|
}
|
|
8
7
|
});
|
|
8
|
+
dynamicApp.component(VxeSelectComponent.name, VxeSelectComponent);
|
|
9
9
|
export default Select;
|
package/es/select/src/select.js
CHANGED
|
@@ -27,10 +27,13 @@ export default defineComponent({
|
|
|
27
27
|
optionProps: Object,
|
|
28
28
|
optionGroups: Array,
|
|
29
29
|
optionGroupProps: Object,
|
|
30
|
+
optionConfig: Object,
|
|
30
31
|
className: [String, Function],
|
|
31
32
|
size: { type: String, default: function () { return GlobalConfig.select.size || GlobalConfig.size; } },
|
|
32
33
|
emptyText: String,
|
|
34
|
+
// 已废弃,被 option-config.keyField 替换
|
|
33
35
|
optionId: { type: String, default: function () { return GlobalConfig.select.optionId; } },
|
|
36
|
+
// 已废弃,被 option-config.useKey 替换
|
|
34
37
|
optionKey: Boolean,
|
|
35
38
|
transfer: { type: Boolean, default: function () { return GlobalConfig.select.transfer; } }
|
|
36
39
|
},
|
|
@@ -95,6 +98,9 @@ export default defineComponent({
|
|
|
95
98
|
var groupPropsOpts = computeGroupPropsOpts.value;
|
|
96
99
|
return groupPropsOpts.options || 'options';
|
|
97
100
|
});
|
|
101
|
+
var computeOptionOpts = computed(function () {
|
|
102
|
+
return Object.assign({}, GlobalConfig.select.optionConfig, props.optionConfig);
|
|
103
|
+
});
|
|
98
104
|
var computeIsGroup = computed(function () {
|
|
99
105
|
return reactData.fullGroupList.some(function (item) { return item.options && item.options.length; });
|
|
100
106
|
});
|
|
@@ -151,7 +157,8 @@ export default defineComponent({
|
|
|
151
157
|
return getSelectLabel(modelValue);
|
|
152
158
|
});
|
|
153
159
|
var getOptkey = function () {
|
|
154
|
-
|
|
160
|
+
var optionOpts = computeOptionOpts.value;
|
|
161
|
+
return optionOpts.keyField || props.optionId || '_X_OPTION_KEY';
|
|
155
162
|
};
|
|
156
163
|
var getOptid = function (option) {
|
|
157
164
|
var optid = option[getOptkey()];
|
|
@@ -537,9 +544,11 @@ export default defineComponent({
|
|
|
537
544
|
var renderOption = function (list, group) {
|
|
538
545
|
var optionKey = props.optionKey, modelValue = props.modelValue, multiple = props.multiple;
|
|
539
546
|
var currentValue = reactData.currentValue;
|
|
547
|
+
var optionOpts = computeOptionOpts.value;
|
|
540
548
|
var labelField = computeLabelField.value;
|
|
541
549
|
var valueField = computeValueField.value;
|
|
542
550
|
var isGroup = computeIsGroup.value;
|
|
551
|
+
var useKey = optionOpts.useKey;
|
|
543
552
|
return list.map(function (option, cIndex) {
|
|
544
553
|
var slots = option.slots, className = option.className;
|
|
545
554
|
var isVisible = !isGroup || isOptionVisible(option);
|
|
@@ -548,7 +557,7 @@ export default defineComponent({
|
|
|
548
557
|
var optid = getOptid(option);
|
|
549
558
|
var defaultSlot = slots ? slots.default : null;
|
|
550
559
|
return isVisible ? h('div', {
|
|
551
|
-
key: optionKey ? optid : cIndex,
|
|
560
|
+
key: useKey || optionKey ? optid : cIndex,
|
|
552
561
|
class: ['vxe-select-option', className ? (XEUtils.isFunction(className) ? className({ option: option, $select: $xeselect }) : className) : '', {
|
|
553
562
|
'is--disabled': isDisabled,
|
|
554
563
|
'is--selected': multiple ? (modelValue && modelValue.indexOf(optionValue) > -1) : modelValue === optionValue,
|
|
@@ -579,15 +588,17 @@ export default defineComponent({
|
|
|
579
588
|
var renderOptgroup = function () {
|
|
580
589
|
var optionKey = props.optionKey;
|
|
581
590
|
var visibleGroupList = reactData.visibleGroupList;
|
|
591
|
+
var optionOpts = computeOptionOpts.value;
|
|
582
592
|
var groupLabelField = computeGroupLabelField.value;
|
|
583
593
|
var groupOptionsField = computeGroupOptionsField.value;
|
|
594
|
+
var useKey = optionOpts.useKey;
|
|
584
595
|
return visibleGroupList.map(function (group, gIndex) {
|
|
585
596
|
var slots = group.slots, className = group.className;
|
|
586
597
|
var optid = getOptid(group);
|
|
587
598
|
var isGroupDisabled = group.disabled;
|
|
588
599
|
var defaultSlot = slots ? slots.default : null;
|
|
589
600
|
return h('div', {
|
|
590
|
-
key: optionKey ? optid : gIndex,
|
|
601
|
+
key: useKey || optionKey ? optid : gIndex,
|
|
591
602
|
class: ['vxe-optgroup', className ? (XEUtils.isFunction(className) ? className({ option: group, $select: $xeselect }) : className) : '', {
|
|
592
603
|
'is--disabled': isGroupDisabled
|
|
593
604
|
}],
|