vxe-table 4.2.6-beta.3 → 4.2.6-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/README.md +1 -1
- package/README.zh-TW.md +0 -4
- package/es/edit/src/hook.js +2 -2
- package/es/export/src/export-panel.js +19 -19
- package/es/export/src/import-panel.js +9 -9
- package/es/filter/src/hook.js +5 -5
- package/es/form/src/form-item.js +1 -1
- package/es/form/src/render.js +1 -1
- package/es/locale/lang/en-US.js +2 -0
- package/es/locale/lang/ja-JP.js +2 -0
- package/es/locale/lang/zh-CN.js +2 -0
- package/es/locale/lang/zh-TC.js +2 -0
- package/es/menu/src/hooks.js +0 -6
- package/es/select/src/select.js +145 -15
- package/es/select/style.css +17 -3
- package/es/style.css +1 -1
- package/es/style.min.css +1 -1
- package/es/table/src/body.js +1 -1
- package/es/table/src/cell.js +3 -3
- package/es/table/src/columnInfo.js +1 -1
- package/es/table/src/table.js +59 -47
- package/es/table/src/util.js +2 -2
- package/es/toolbar/style.css +11 -9
- package/es/tools/log.js +1 -1
- package/es/v-x-e-table/index.js +1 -1
- package/lib/edit/src/hook.js +2 -2
- package/lib/filter/src/hook.js +8 -5
- package/lib/filter/src/hook.min.js +1 -1
- package/lib/form/src/form-item.js +1 -0
- package/lib/form/src/form-item.min.js +1 -1
- package/lib/form/src/render.js +1 -0
- package/lib/form/src/render.min.js +1 -1
- package/lib/index.umd.js +288 -92
- package/lib/index.umd.min.js +1 -1
- package/lib/locale/lang/en-US.js +2 -0
- package/lib/locale/lang/en-US.min.js +1 -1
- package/lib/locale/lang/en-US.umd.js +2 -0
- package/lib/locale/lang/ja-JP.js +2 -0
- package/lib/locale/lang/ja-JP.min.js +1 -1
- package/lib/locale/lang/ja-JP.umd.js +2 -0
- package/lib/locale/lang/zh-CN.js +2 -0
- package/lib/locale/lang/zh-CN.min.js +1 -1
- package/lib/locale/lang/zh-CN.umd.js +2 -0
- package/lib/locale/lang/zh-HK.min.js +1 -1
- package/lib/locale/lang/zh-HK.umd.js +2 -0
- package/lib/locale/lang/zh-MO.min.js +1 -1
- package/lib/locale/lang/zh-MO.umd.js +2 -0
- package/lib/locale/lang/zh-TC.js +2 -0
- package/lib/locale/lang/zh-TC.min.js +1 -1
- package/lib/locale/lang/zh-TC.umd.js +2 -0
- package/lib/locale/lang/zh-TW.min.js +1 -1
- package/lib/locale/lang/zh-TW.umd.js +2 -0
- package/lib/menu/src/hooks.js +0 -6
- package/lib/select/src/select.js +194 -16
- package/lib/select/src/select.min.js +1 -1
- package/lib/select/style/style.css +17 -3
- package/lib/select/style/style.min.css +1 -1
- package/lib/style.css +1 -1
- package/lib/style.min.css +1 -1
- package/lib/table/src/body.js +1 -1
- 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/columnInfo.js +1 -1
- package/lib/table/src/columnInfo.min.js +1 -1
- package/lib/table/src/table.js +66 -51
- package/lib/table/src/table.min.js +1 -1
- package/lib/table/src/util.js +2 -2
- package/lib/table/src/util.min.js +1 -1
- package/lib/toolbar/style/style.css +11 -9
- package/lib/toolbar/style/style.min.css +1 -1
- package/lib/tools/log.js +1 -1
- package/lib/tools/log.min.js +1 -1
- package/lib/v-x-e-table/index.js +1 -1
- package/lib/v-x-e-table/index.min.js +1 -1
- package/package.json +1 -1
- package/packages/edit/src/hook.ts +2 -2
- package/packages/export/src/export-panel.ts +19 -19
- package/packages/export/src/import-panel.ts +9 -9
- package/packages/filter/src/hook.ts +7 -7
- package/packages/form/src/form-item.ts +1 -1
- package/packages/form/src/render.ts +1 -1
- package/packages/locale/lang/en-US.ts +2 -0
- package/packages/locale/lang/ja-JP.ts +2 -0
- package/packages/locale/lang/zh-CN.ts +2 -0
- package/packages/locale/lang/zh-TC.ts +2 -0
- package/packages/menu/src/hooks.ts +0 -6
- package/packages/select/src/select.ts +146 -16
- package/packages/table/src/body.ts +1 -1
- package/packages/table/src/cell.ts +3 -3
- package/packages/table/src/columnInfo.ts +1 -1
- package/packages/table/src/table.ts +61 -49
- package/packages/table/src/util.ts +4 -4
- package/styles/select.scss +24 -5
- package/styles/toolbar.scss +9 -5
- package/styles/variable.scss +0 -4
- package/types/form-item.d.ts +16 -1
- package/types/form.d.ts +1 -1
- package/types/select.d.ts +19 -4
- package/types/table.d.ts +2 -0
package/README.md
CHANGED
package/README.zh-TW.md
CHANGED
|
@@ -25,10 +25,6 @@
|
|
|
25
25
|
* [x] v3.0 基於 vue2.6+,支持現代瀏覽器並保留相容IE11,提升渲染效能
|
|
26
26
|
* [x] v4.0 基于 vue3.0+,只支持現代瀏覽器,不支持IE
|
|
27
27
|
|
|
28
|
-
## QQ 交流群
|
|
29
|
-
|
|
30
|
-

|
|
31
|
-
|
|
32
28
|
## 瀏覽器支持
|
|
33
29
|
|
|
34
30
|
 |  |  |  | 
|
package/es/edit/src/hook.js
CHANGED
|
@@ -267,7 +267,7 @@ var editHook = {
|
|
|
267
267
|
var treeOpts = computeTreeOpts.value;
|
|
268
268
|
var transform = treeOpts.transform;
|
|
269
269
|
var actived = editStore.actived, removeList = editStore.removeList, insertList = editStore.insertList;
|
|
270
|
-
var
|
|
270
|
+
var checkField = checkboxOpts.checkField;
|
|
271
271
|
var rest = [];
|
|
272
272
|
if (!rows) {
|
|
273
273
|
rows = tableFullData;
|
|
@@ -282,7 +282,7 @@ var editHook = {
|
|
|
282
282
|
}
|
|
283
283
|
});
|
|
284
284
|
// 如果绑定了多选属性,则更新状态
|
|
285
|
-
if (!
|
|
285
|
+
if (!checkField) {
|
|
286
286
|
rows.forEach(function (row) {
|
|
287
287
|
var sIndex = $xetable.findRowIndexOf(selection, row);
|
|
288
288
|
if (sIndex > -1) {
|
|
@@ -2,11 +2,11 @@ import { defineComponent, h, createCommentVNode, ref, computed, reactive, inject
|
|
|
2
2
|
import XEUtils from 'xe-utils';
|
|
3
3
|
import GlobalConfig from '../../v-x-e-table/src/conf';
|
|
4
4
|
import { formatText } from '../../tools/utils';
|
|
5
|
-
import
|
|
6
|
-
import
|
|
7
|
-
import
|
|
8
|
-
import
|
|
9
|
-
import
|
|
5
|
+
import VxeModalComponent from '../../modal/src/modal';
|
|
6
|
+
import VxeInputComponent from '../../input/src/input';
|
|
7
|
+
import VxeCheckboxComponent from '../../checkbox/src/checkbox';
|
|
8
|
+
import VxeSelectComponent from '../../select/src/select';
|
|
9
|
+
import VxeButtonComponent from '../../button/src/button';
|
|
10
10
|
export default defineComponent({
|
|
11
11
|
name: 'VxeExportPanel',
|
|
12
12
|
props: {
|
|
@@ -173,7 +173,7 @@ export default defineComponent({
|
|
|
173
173
|
}, colTitle)
|
|
174
174
|
]));
|
|
175
175
|
});
|
|
176
|
-
return h(
|
|
176
|
+
return h(VxeModalComponent, {
|
|
177
177
|
modelValue: storeData.visible,
|
|
178
178
|
title: GlobalConfig.i18n(isPrint ? 'vxe.export.printTitle' : 'vxe.export.expTitle'),
|
|
179
179
|
width: 660,
|
|
@@ -202,7 +202,7 @@ export default defineComponent({
|
|
|
202
202
|
isPrint ? createCommentVNode() : h('tr', [
|
|
203
203
|
h('td', GlobalConfig.i18n('vxe.export.expName')),
|
|
204
204
|
h('td', [
|
|
205
|
-
h(
|
|
205
|
+
h(VxeInputComponent, {
|
|
206
206
|
ref: xInputFilename,
|
|
207
207
|
modelValue: defaultOptions.filename,
|
|
208
208
|
type: 'text',
|
|
@@ -217,7 +217,7 @@ export default defineComponent({
|
|
|
217
217
|
isPrint ? createCommentVNode() : h('tr', [
|
|
218
218
|
h('td', GlobalConfig.i18n('vxe.export.expType')),
|
|
219
219
|
h('td', [
|
|
220
|
-
h(
|
|
220
|
+
h(VxeSelectComponent, {
|
|
221
221
|
modelValue: defaultOptions.type,
|
|
222
222
|
options: storeData.typeList.map(function (item) {
|
|
223
223
|
return {
|
|
@@ -234,7 +234,7 @@ export default defineComponent({
|
|
|
234
234
|
isPrint || showSheet ? h('tr', [
|
|
235
235
|
h('td', GlobalConfig.i18n('vxe.export.expSheetName')),
|
|
236
236
|
h('td', [
|
|
237
|
-
h(
|
|
237
|
+
h(VxeInputComponent, {
|
|
238
238
|
ref: xInputSheetname,
|
|
239
239
|
modelValue: defaultOptions.sheetName,
|
|
240
240
|
type: 'text',
|
|
@@ -249,7 +249,7 @@ export default defineComponent({
|
|
|
249
249
|
h('tr', [
|
|
250
250
|
h('td', GlobalConfig.i18n('vxe.export.expMode')),
|
|
251
251
|
h('td', [
|
|
252
|
-
h(
|
|
252
|
+
h(VxeSelectComponent, {
|
|
253
253
|
modelValue: defaultOptions.mode,
|
|
254
254
|
options: storeData.modeList.map(function (item) {
|
|
255
255
|
return {
|
|
@@ -306,7 +306,7 @@ export default defineComponent({
|
|
|
306
306
|
h('div', {
|
|
307
307
|
class: 'vxe-export--panel-option-row'
|
|
308
308
|
}, [
|
|
309
|
-
h(
|
|
309
|
+
h(VxeCheckboxComponent, {
|
|
310
310
|
modelValue: defaultOptions.isHeader,
|
|
311
311
|
title: GlobalConfig.i18n('vxe.export.expHeaderTitle'),
|
|
312
312
|
content: GlobalConfig.i18n('vxe.export.expOptHeader'),
|
|
@@ -314,7 +314,7 @@ export default defineComponent({
|
|
|
314
314
|
defaultOptions.isHeader = value;
|
|
315
315
|
}
|
|
316
316
|
}),
|
|
317
|
-
h(
|
|
317
|
+
h(VxeCheckboxComponent, {
|
|
318
318
|
modelValue: defaultOptions.isFooter,
|
|
319
319
|
disabled: !storeData.hasFooter,
|
|
320
320
|
title: GlobalConfig.i18n('vxe.export.expFooterTitle'),
|
|
@@ -323,7 +323,7 @@ export default defineComponent({
|
|
|
323
323
|
defaultOptions.isFooter = value;
|
|
324
324
|
}
|
|
325
325
|
}),
|
|
326
|
-
h(
|
|
326
|
+
h(VxeCheckboxComponent, {
|
|
327
327
|
modelValue: defaultOptions.original,
|
|
328
328
|
title: GlobalConfig.i18n('vxe.export.expOriginalTitle'),
|
|
329
329
|
content: GlobalConfig.i18n('vxe.export.expOptOriginal'),
|
|
@@ -335,7 +335,7 @@ export default defineComponent({
|
|
|
335
335
|
h('div', {
|
|
336
336
|
class: 'vxe-export--panel-option-row'
|
|
337
337
|
}, [
|
|
338
|
-
h(
|
|
338
|
+
h(VxeCheckboxComponent, {
|
|
339
339
|
modelValue: isHeader && hasColgroup && supportMerge ? defaultOptions.isColgroup : false,
|
|
340
340
|
title: GlobalConfig.i18n('vxe.export.expColgroupTitle'),
|
|
341
341
|
disabled: !isHeader || !hasColgroup || !supportMerge,
|
|
@@ -344,7 +344,7 @@ export default defineComponent({
|
|
|
344
344
|
defaultOptions.isColgroup = value;
|
|
345
345
|
}
|
|
346
346
|
}),
|
|
347
|
-
h(
|
|
347
|
+
h(VxeCheckboxComponent, {
|
|
348
348
|
modelValue: hasMerge && supportMerge && checkedAll ? defaultOptions.isMerge : false,
|
|
349
349
|
title: GlobalConfig.i18n('vxe.export.expMergeTitle'),
|
|
350
350
|
disabled: !hasMerge || !supportMerge || !checkedAll,
|
|
@@ -353,7 +353,7 @@ export default defineComponent({
|
|
|
353
353
|
defaultOptions.isMerge = value;
|
|
354
354
|
}
|
|
355
355
|
}),
|
|
356
|
-
isPrint ? createCommentVNode() : h(
|
|
356
|
+
isPrint ? createCommentVNode() : h(VxeCheckboxComponent, {
|
|
357
357
|
modelValue: supportStyle ? defaultOptions.useStyle : false,
|
|
358
358
|
disabled: !supportStyle,
|
|
359
359
|
title: GlobalConfig.i18n('vxe.export.expUseStyleTitle'),
|
|
@@ -362,7 +362,7 @@ export default defineComponent({
|
|
|
362
362
|
defaultOptions.useStyle = value;
|
|
363
363
|
}
|
|
364
364
|
}),
|
|
365
|
-
h(
|
|
365
|
+
h(VxeCheckboxComponent, {
|
|
366
366
|
modelValue: hasTree ? defaultOptions.isAllExpand : false,
|
|
367
367
|
disabled: !hasTree,
|
|
368
368
|
title: GlobalConfig.i18n('vxe.export.expAllExpandTitle'),
|
|
@@ -380,11 +380,11 @@ export default defineComponent({
|
|
|
380
380
|
h('div', {
|
|
381
381
|
class: 'vxe-export--panel-btns'
|
|
382
382
|
}, [
|
|
383
|
-
h(
|
|
383
|
+
h(VxeButtonComponent, {
|
|
384
384
|
content: GlobalConfig.i18n('vxe.export.expCancel'),
|
|
385
385
|
onClick: cancelEvent
|
|
386
386
|
}),
|
|
387
|
-
h(
|
|
387
|
+
h(VxeButtonComponent, {
|
|
388
388
|
ref: xButtonConfirm,
|
|
389
389
|
status: 'primary',
|
|
390
390
|
content: GlobalConfig.i18n(isPrint ? 'vxe.export.expPrint' : 'vxe.export.expConfirm'),
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { defineComponent, h, ref, computed, inject, reactive, nextTick } from 'vue';
|
|
2
2
|
import XEUtils from 'xe-utils';
|
|
3
3
|
import GlobalConfig from '../../v-x-e-table/src/conf';
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
import
|
|
7
|
-
import
|
|
4
|
+
import VxeModalComponent from '../../modal/src/modal';
|
|
5
|
+
import VxeRadioGroupComponent from '../../radio/src/group';
|
|
6
|
+
import VxeRadioComponent from '../../radio/src/radio';
|
|
7
|
+
import VxeButtonComponent from '../../button/src/button';
|
|
8
8
|
import { parseFile } from '../../tools/utils';
|
|
9
9
|
export default defineComponent({
|
|
10
10
|
name: 'VxeImportPanel',
|
|
@@ -79,7 +79,7 @@ export default defineComponent({
|
|
|
79
79
|
var selectName = computeSelectName.value;
|
|
80
80
|
var hasFile = computeHasFile.value;
|
|
81
81
|
var parseTypeLabel = computeParseTypeLabel.value;
|
|
82
|
-
return h(
|
|
82
|
+
return h(VxeModalComponent, {
|
|
83
83
|
modelValue: storeData.visible,
|
|
84
84
|
title: GlobalConfig.i18n('vxe.import.impTitle'),
|
|
85
85
|
width: 440,
|
|
@@ -130,13 +130,13 @@ export default defineComponent({
|
|
|
130
130
|
h('tr', [
|
|
131
131
|
h('td', GlobalConfig.i18n('vxe.import.impOpts')),
|
|
132
132
|
h('td', [
|
|
133
|
-
h(
|
|
133
|
+
h(VxeRadioGroupComponent, {
|
|
134
134
|
modelValue: defaultOptions.mode,
|
|
135
135
|
'onUpdate:modelValue': function (value) {
|
|
136
136
|
defaultOptions.mode = value;
|
|
137
137
|
}
|
|
138
138
|
}, {
|
|
139
|
-
default: function () { return storeData.modeList.map(function (item) { return h(
|
|
139
|
+
default: function () { return storeData.modeList.map(function (item) { return h(VxeRadioComponent, { label: item.value, content: GlobalConfig.i18n(item.label) }); }); }
|
|
140
140
|
})
|
|
141
141
|
])
|
|
142
142
|
])
|
|
@@ -145,11 +145,11 @@ export default defineComponent({
|
|
|
145
145
|
h('div', {
|
|
146
146
|
class: 'vxe-export--panel-btns'
|
|
147
147
|
}, [
|
|
148
|
-
h(
|
|
148
|
+
h(VxeButtonComponent, {
|
|
149
149
|
content: GlobalConfig.i18n('vxe.import.impCancel'),
|
|
150
150
|
onClick: cancelEvent
|
|
151
151
|
}),
|
|
152
|
-
h(
|
|
152
|
+
h(VxeButtonComponent, {
|
|
153
153
|
status: 'primary',
|
|
154
154
|
disabled: !hasFile,
|
|
155
155
|
content: GlobalConfig.i18n('vxe.import.impConfirm'),
|
package/es/filter/src/hook.js
CHANGED
|
@@ -120,7 +120,7 @@ var tableFilterHook = {
|
|
|
120
120
|
filterStore.maxHeight = maxHeight;
|
|
121
121
|
});
|
|
122
122
|
}
|
|
123
|
-
$xetable.dispatchEvent('filter-visible', { column: column, property: column.
|
|
123
|
+
$xetable.dispatchEvent('filter-visible', { column: column, field: column.field, property: column.field, filterList: $xetable.getCheckedFilters(), visible: filterStore.visible }, evnt);
|
|
124
124
|
},
|
|
125
125
|
handleClearFilter: function (column) {
|
|
126
126
|
if (column) {
|
|
@@ -150,7 +150,7 @@ var tableFilterHook = {
|
|
|
150
150
|
var filterStore = reactData.filterStore, oldScrollXLoad = reactData.scrollXLoad, oldScrollYLoad = reactData.scrollYLoad;
|
|
151
151
|
var filterOpts = computeFilterOpts.value;
|
|
152
152
|
var column = filterStore.column;
|
|
153
|
-
var
|
|
153
|
+
var field = column.field;
|
|
154
154
|
var values = [];
|
|
155
155
|
var datas = [];
|
|
156
156
|
column.filters.forEach(function (item) {
|
|
@@ -165,7 +165,7 @@ var tableFilterHook = {
|
|
|
165
165
|
$xetable.handleTableData(true);
|
|
166
166
|
$xetable.checkSelectionStatus();
|
|
167
167
|
}
|
|
168
|
-
$xetable.dispatchEvent('filter-change', { column: column, property:
|
|
168
|
+
$xetable.dispatchEvent('filter-change', { column: column, field: field, property: field, values: values, datas: datas, filters: filterList, filterList: filterList }, evnt);
|
|
169
169
|
$xetable.closeFilter();
|
|
170
170
|
$xetable.updateFooter().then(function () {
|
|
171
171
|
var scrollXLoad = reactData.scrollXLoad, scrollYLoad = reactData.scrollYLoad;
|
|
@@ -259,7 +259,7 @@ var tableFilterHook = {
|
|
|
259
259
|
var tableFullColumn = internalData.tableFullColumn;
|
|
260
260
|
var filterList = [];
|
|
261
261
|
tableFullColumn.filter(function (column) {
|
|
262
|
-
var
|
|
262
|
+
var field = column.field, filters = column.filters;
|
|
263
263
|
var valueList = [];
|
|
264
264
|
var dataList = [];
|
|
265
265
|
if (filters && filters.length) {
|
|
@@ -270,7 +270,7 @@ var tableFilterHook = {
|
|
|
270
270
|
}
|
|
271
271
|
});
|
|
272
272
|
if (valueList.length) {
|
|
273
|
-
filterList.push({ column: column, property:
|
|
273
|
+
filterList.push({ column: column, field: field, property: field, values: valueList, datas: dataList });
|
|
274
274
|
}
|
|
275
275
|
}
|
|
276
276
|
});
|
package/es/form/src/form-item.js
CHANGED
|
@@ -84,7 +84,7 @@ export default defineComponent({
|
|
|
84
84
|
var showTooltip = itemOverflow === true || itemOverflow === 'tooltip';
|
|
85
85
|
var hasEllipsis = showTitle || showTooltip || showEllipsis;
|
|
86
86
|
var itemVisibleMethod = visibleMethod;
|
|
87
|
-
var params = { data: data, property: field, item: item, $form: $xeform };
|
|
87
|
+
var params = { data: data, field: field, property: field, item: item, $form: $xeform };
|
|
88
88
|
var isRequired = false;
|
|
89
89
|
if (rules) {
|
|
90
90
|
var itemRules = rules[field];
|
package/es/form/src/render.js
CHANGED
|
@@ -37,7 +37,7 @@ export function renderTitle($xeform, item) {
|
|
|
37
37
|
var slots = item.slots, field = item.field, itemRender = item.itemRender, titlePrefix = item.titlePrefix, titleSuffix = item.titleSuffix;
|
|
38
38
|
var tooltipOpts = computeTooltipOpts.value;
|
|
39
39
|
var compConf = isEnableConf(itemRender) ? VXETable.renderer.get(itemRender.name) : null;
|
|
40
|
-
var params = { data: data, property: field, item: item, $form: $xeform };
|
|
40
|
+
var params = { data: data, field: field, property: field, item: item, $form: $xeform };
|
|
41
41
|
var titleSlot = slots ? slots.title : null;
|
|
42
42
|
var contVNs = [];
|
|
43
43
|
var titVNs = [];
|
package/es/locale/lang/en-US.js
CHANGED
package/es/locale/lang/ja-JP.js
CHANGED
package/es/locale/lang/zh-CN.js
CHANGED
package/es/locale/lang/zh-TC.js
CHANGED
package/es/menu/src/hooks.js
CHANGED
|
@@ -117,12 +117,6 @@ var tableMenuHook = {
|
|
|
117
117
|
menuPrivateMethods = {
|
|
118
118
|
/**
|
|
119
119
|
* 处理菜单的移动
|
|
120
|
-
* @param evnt
|
|
121
|
-
* @param ctxMenuStore
|
|
122
|
-
* @param property
|
|
123
|
-
* @param hasOper
|
|
124
|
-
* @param operRest
|
|
125
|
-
* @param menuList
|
|
126
120
|
*/
|
|
127
121
|
moveCtxMenu: function (evnt, ctxMenuStore, property, hasOper, operRest, menuList) {
|
|
128
122
|
var selectItem;
|