vxe-table 4.2.8 → 4.3.0-beta.0
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/src/button.js +14 -14
- package/es/button/style.css +1 -58
- package/es/checkbox/src/checkbox.js +1 -1
- package/es/edit/src/hook.js +29 -13
- package/es/export/src/export-panel.js +1 -1
- package/es/export/src/hook.js +45 -45
- package/es/export/src/import-panel.js +2 -2
- package/es/export/src/util.js +7 -7
- package/es/filter/src/hook.js +5 -5
- package/es/filter/src/panel.js +1 -1
- package/es/footer/src/footer.js +15 -15
- package/es/form/src/form-config-item.js +8 -7
- package/es/form/src/form-item.js +8 -7
- package/es/form/src/form.js +8 -6
- package/es/form/style.css +0 -3
- package/es/grid/src/grid.js +18 -13
- package/es/grid/style.css +1 -1
- package/es/header/src/header.js +18 -18
- package/es/header/style.css +0 -95
- package/es/icon/style.css +371 -495
- package/es/input/src/input.js +26 -26
- package/es/input/style.css +13 -4
- package/es/keyboard/src/hook.js +7 -7
- package/es/list/src/list.js +5 -5
- package/es/loading/src/loading.js +1 -1
- package/es/menu/src/hooks.js +9 -9
- package/es/menu/src/panel.js +2 -2
- package/es/modal/src/modal.js +52 -51
- package/es/modal/style.css +2 -3
- package/es/pager/src/pager.js +3 -3
- package/es/pager/style.css +4 -2
- package/es/pulldown/src/pulldown.js +7 -7
- package/es/radio/src/button.js +1 -1
- package/es/radio/src/radio.js +1 -1
- package/es/select/src/select.js +13 -12
- package/es/select/style.css +1 -0
- package/es/style.css +1 -1
- package/es/style.min.css +1 -1
- package/es/switch/src/switch.js +1 -1
- package/es/table/src/body.js +38 -34
- package/es/table/src/cell.js +12 -8
- package/es/table/src/columnInfo.js +4 -4
- package/es/table/src/table.js +63 -58
- package/es/table/src/util.js +2 -2
- package/es/table/style.css +98 -0
- package/es/textarea/src/textarea.js +5 -5
- package/es/toolbar/src/toolbar.js +7 -6
- package/es/toolbar/style.css +1 -1
- package/es/tools/dom.js +2 -2
- package/es/tools/log.js +1 -1
- package/es/tools/vn.js +7 -0
- package/es/tooltip/src/tooltip.js +22 -10
- package/es/v-x-e-table/index.js +1 -1
- package/es/v-x-e-table/src/conf.js +38 -38
- package/es/v-x-e-table/src/interceptor.js +1 -1
- package/es/v-x-e-table/src/renderer.js +19 -15
- package/es/v-x-e-table/style.css +359 -459
- package/lib/button/src/button.js +10 -10
- package/lib/button/src/button.min.js +1 -1
- package/lib/button/style/style.css +1 -58
- package/lib/button/style/style.min.css +1 -1
- package/lib/checkbox/src/checkbox.js +1 -1
- package/lib/checkbox/src/checkbox.min.js +1 -1
- package/lib/edit/src/hook.js +14 -13
- package/lib/edit/src/hook.min.js +1 -1
- package/lib/export/src/export-panel.js +1 -1
- package/lib/export/src/export-panel.min.js +1 -1
- package/lib/export/src/hook.js +50 -50
- package/lib/export/src/hook.min.js +1 -1
- package/lib/export/src/import-panel.js +3 -3
- package/lib/export/src/import-panel.min.js +1 -1
- package/lib/export/src/util.js +4 -4
- package/lib/export/src/util.min.js +1 -1
- package/lib/filter/src/hook.js +5 -5
- package/lib/filter/src/hook.min.js +1 -1
- package/lib/filter/src/panel.js +1 -1
- package/lib/filter/src/panel.min.js +1 -1
- package/lib/footer/src/footer.js +14 -14
- package/lib/footer/src/footer.min.js +1 -1
- package/lib/form/src/form-config-item.js +9 -7
- package/lib/form/src/form-config-item.min.js +1 -1
- package/lib/form/src/form-item.js +9 -7
- package/lib/form/src/form-item.min.js +1 -1
- package/lib/form/src/form.js +9 -6
- package/lib/form/src/form.min.js +1 -1
- package/lib/form/style/style.css +0 -3
- package/lib/form/style/style.min.css +1 -1
- package/lib/grid/src/grid.js +17 -13
- package/lib/grid/src/grid.min.js +1 -1
- package/lib/grid/style/style.css +1 -1
- package/lib/grid/style/style.min.css +1 -1
- package/lib/header/src/header.js +17 -17
- package/lib/header/src/header.min.js +1 -1
- package/lib/header/style/style.css +0 -95
- package/lib/header/style/style.min.css +0 -1
- package/lib/icon/style/style.css +371 -495
- package/lib/icon/style/style.min.css +1 -1
- package/lib/index.umd.js +113 -88
- package/lib/index.umd.min.js +1 -1
- package/lib/input/src/input.js +23 -23
- package/lib/input/src/input.min.js +1 -1
- package/lib/input/style/style.css +13 -4
- package/lib/input/style/style.min.css +1 -1
- package/lib/keyboard/src/hook.js +7 -7
- package/lib/keyboard/src/hook.min.js +1 -1
- package/lib/list/src/list.js +5 -5
- package/lib/list/src/list.min.js +1 -1
- package/lib/loading/src/loading.js +1 -1
- package/lib/loading/src/loading.min.js +1 -1
- package/lib/menu/src/hooks.js +9 -9
- package/lib/menu/src/hooks.min.js +1 -1
- package/lib/menu/src/panel.js +2 -2
- package/lib/menu/src/panel.min.js +1 -1
- package/lib/modal/src/modal.js +55 -53
- package/lib/modal/src/modal.min.js +1 -1
- package/lib/modal/style/style.css +2 -3
- package/lib/modal/style/style.min.css +1 -1
- package/lib/pager/src/pager.js +2 -2
- package/lib/pager/src/pager.min.js +1 -1
- package/lib/pager/style/style.css +4 -2
- package/lib/pager/style/style.min.css +1 -1
- package/lib/pulldown/src/pulldown.js +7 -7
- package/lib/pulldown/src/pulldown.min.js +1 -1
- package/lib/radio/src/button.js +1 -1
- package/lib/radio/src/button.min.js +1 -1
- package/lib/radio/src/radio.js +1 -1
- package/lib/radio/src/radio.min.js +1 -1
- package/lib/select/src/select.js +14 -12
- package/lib/select/src/select.min.js +1 -1
- package/lib/select/style/style.css +1 -0
- 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/src/switch.js +1 -1
- package/lib/switch/src/switch.min.js +1 -1
- package/lib/table/src/body.js +36 -34
- package/lib/table/src/body.min.js +1 -1
- package/lib/table/src/cell.js +17 -11
- package/lib/table/src/cell.min.js +1 -1
- package/lib/table/src/columnInfo.js +4 -4
- package/lib/table/src/columnInfo.min.js +1 -1
- package/lib/table/src/table.js +63 -59
- 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/table/style/style.css +98 -0
- package/lib/table/style/style.min.css +1 -1
- package/lib/textarea/src/textarea.js +6 -6
- package/lib/textarea/src/textarea.min.js +1 -1
- package/lib/toolbar/src/toolbar.js +10 -8
- package/lib/toolbar/src/toolbar.min.js +1 -1
- package/lib/toolbar/style/style.css +1 -1
- package/lib/toolbar/style/style.min.css +1 -1
- package/lib/tools/dom.js +2 -2
- package/lib/tools/dom.min.js +1 -1
- package/lib/tools/log.js +1 -1
- package/lib/tools/log.min.js +1 -1
- package/lib/tools/vn.js +13 -0
- package/lib/tools/vn.min.js +1 -1
- package/lib/tooltip/src/tooltip.js +22 -8
- package/lib/tooltip/src/tooltip.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/lib/v-x-e-table/src/conf.js +38 -38
- package/lib/v-x-e-table/src/conf.min.js +1 -1
- package/lib/v-x-e-table/src/interceptor.js +1 -1
- package/lib/v-x-e-table/src/interceptor.min.js +1 -1
- package/lib/v-x-e-table/src/renderer.js +18 -16
- package/lib/v-x-e-table/src/renderer.min.js +1 -1
- package/lib/v-x-e-table/style/style.css +359 -459
- package/lib/v-x-e-table/style/style.min.css +1 -1
- package/package.json +5 -5
- package/packages/edit/src/hook.ts +18 -6
- package/packages/form/src/form-config-item.ts +4 -3
- package/packages/form/src/form-item.ts +4 -3
- package/packages/form/src/form.ts +6 -4
- package/packages/grid/src/grid.ts +2 -1
- package/packages/input/src/input.ts +3 -3
- package/packages/modal/src/modal.ts +5 -4
- package/packages/select/src/select.ts +2 -1
- package/packages/table/src/cell.ts +14 -10
- package/packages/table/src/table.ts +9 -8
- package/packages/toolbar/src/toolbar.ts +4 -3
- package/packages/tools/vn.ts +10 -0
- package/packages/tooltip/src/tooltip.ts +8 -4
- package/packages/v-x-e-table/src/conf.ts +38 -38
- package/styles/button.scss +1 -43
- package/styles/form.scss +0 -3
- package/styles/header.scss +0 -134
- package/styles/icon.scss +507 -713
- package/styles/input.scss +8 -0
- package/styles/modal.scss +0 -1
- package/styles/pager.scss +2 -0
- package/styles/select.scss +1 -0
- package/styles/table.scss +136 -0
- package/styles/variable.scss +1 -1
- package/types/all.d.ts +6 -0
- package/types/column.d.ts +11 -11
- package/types/component.d.ts +3 -1
- package/types/form-item.d.ts +1 -0
- package/types/form.d.ts +6 -2
- package/types/grid.d.ts +4 -4
- package/types/table.d.ts +2 -2
- package/types/v-x-e-table/renderer.d.ts +3 -2
package/es/tools/vn.js
CHANGED
|
@@ -9,12 +9,22 @@ var __assign = (this && this.__assign) || function () {
|
|
|
9
9
|
};
|
|
10
10
|
return __assign.apply(this, arguments);
|
|
11
11
|
};
|
|
12
|
+
var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {
|
|
13
|
+
if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {
|
|
14
|
+
if (ar || !(i in from)) {
|
|
15
|
+
if (!ar) ar = Array.prototype.slice.call(from, 0, i);
|
|
16
|
+
ar[i] = from[i];
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
return to.concat(ar || Array.prototype.slice.call(from));
|
|
20
|
+
};
|
|
12
21
|
import { defineComponent, h, ref, nextTick, onBeforeUnmount, onMounted, reactive, watch } from 'vue';
|
|
13
22
|
import XEUtils from 'xe-utils';
|
|
14
23
|
import GlobalConfig from '../../v-x-e-table/src/conf';
|
|
15
24
|
import { useSize } from '../../hooks/size';
|
|
16
25
|
import { getLastZIndex, nextZIndex, formatText } from '../../tools/utils';
|
|
17
26
|
import { getAbsolutePos, getDomNode } from '../../tools/dom';
|
|
27
|
+
import { getSlotVNs } from '../../tools/vn';
|
|
18
28
|
export default defineComponent({
|
|
19
29
|
name: 'VxeTooltip',
|
|
20
30
|
props: {
|
|
@@ -82,9 +92,9 @@ export default defineComponent({
|
|
|
82
92
|
tipStore.placement = 'bottom';
|
|
83
93
|
tipTop = top_1 + tipTarget.offsetHeight + marginSize;
|
|
84
94
|
}
|
|
85
|
-
tipStore.style.top = tipTop
|
|
86
|
-
tipStore.style.left = tipLeft
|
|
87
|
-
tipStore.arrowStyle.left = left - tipLeft + tipTarget.offsetWidth / 2
|
|
95
|
+
tipStore.style.top = "".concat(tipTop, "px");
|
|
96
|
+
tipStore.style.left = "".concat(tipLeft, "px");
|
|
97
|
+
tipStore.arrowStyle.left = "".concat(left - tipLeft + tipTarget.offsetWidth / 2, "px");
|
|
88
98
|
}
|
|
89
99
|
};
|
|
90
100
|
var updateValue = function (value) {
|
|
@@ -282,11 +292,12 @@ export default defineComponent({
|
|
|
282
292
|
var renderContent = function () {
|
|
283
293
|
var useHTML = props.useHTML;
|
|
284
294
|
var tipContent = reactData.tipContent;
|
|
285
|
-
|
|
295
|
+
var contentSlot = slots.content;
|
|
296
|
+
if (contentSlot) {
|
|
286
297
|
return h('div', {
|
|
287
298
|
key: 1,
|
|
288
299
|
class: 'vxe-table--tooltip-content'
|
|
289
|
-
},
|
|
300
|
+
}, getSlotVNs(contentSlot({})));
|
|
290
301
|
}
|
|
291
302
|
if (useHTML) {
|
|
292
303
|
return h('div', {
|
|
@@ -304,6 +315,7 @@ export default defineComponent({
|
|
|
304
315
|
var _a;
|
|
305
316
|
var theme = props.theme, isArrow = props.isArrow, enterable = props.enterable;
|
|
306
317
|
var tipActive = reactData.tipActive, visible = reactData.visible, tipStore = reactData.tipStore;
|
|
318
|
+
var defaultSlot = slots.default;
|
|
307
319
|
var vSize = computeSize.value;
|
|
308
320
|
var ons;
|
|
309
321
|
if (enterable) {
|
|
@@ -312,20 +324,20 @@ export default defineComponent({
|
|
|
312
324
|
onMouseleave: wrapperMouseleaveEvent
|
|
313
325
|
};
|
|
314
326
|
}
|
|
315
|
-
return h('div', __assign({ ref: refElem, class: ['vxe-table--tooltip-wrapper', "theme--"
|
|
316
|
-
_a["size--"
|
|
317
|
-
_a["placement--"
|
|
327
|
+
return h('div', __assign({ ref: refElem, class: ['vxe-table--tooltip-wrapper', "theme--".concat(theme), (_a = {},
|
|
328
|
+
_a["size--".concat(vSize)] = vSize,
|
|
329
|
+
_a["placement--".concat(tipStore.placement)] = tipStore.placement,
|
|
318
330
|
_a['is--enterable'] = enterable,
|
|
319
331
|
_a['is--visible'] = visible,
|
|
320
332
|
_a['is--arrow'] = isArrow,
|
|
321
333
|
_a['is--actived'] = tipActive,
|
|
322
|
-
_a)], style: tipStore.style }, ons), [
|
|
334
|
+
_a)], style: tipStore.style }, ons), __spreadArray([
|
|
323
335
|
renderContent(),
|
|
324
336
|
h('div', {
|
|
325
337
|
class: 'vxe-table--tooltip-arrow',
|
|
326
338
|
style: tipStore.arrowStyle
|
|
327
339
|
})
|
|
328
|
-
]
|
|
340
|
+
], (defaultSlot ? getSlotVNs(defaultSlot({})) : []), true));
|
|
329
341
|
};
|
|
330
342
|
$xetooltip.renderVN = renderVN;
|
|
331
343
|
return $xetooltip;
|
package/es/v-x-e-table/index.js
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
var iconPrefix = 'vxe-icon
|
|
1
|
+
var iconPrefix = 'vxe-icon-';
|
|
2
2
|
var GlobalConfig = {
|
|
3
3
|
size: null,
|
|
4
4
|
zIndex: 999,
|
|
5
5
|
version: 0,
|
|
6
6
|
// resizeInterval: 500,
|
|
7
7
|
emptyCell: ' ',
|
|
8
|
-
loadingText: null,
|
|
8
|
+
// loadingText: null, // 自定义loading提示内容,如果为null则不显示文本
|
|
9
9
|
table: {
|
|
10
10
|
fit: true,
|
|
11
11
|
showHeader: true,
|
|
@@ -124,65 +124,65 @@ var GlobalConfig = {
|
|
|
124
124
|
},
|
|
125
125
|
icon: {
|
|
126
126
|
// loading
|
|
127
|
-
|
|
127
|
+
LOADING: iconPrefix + 'spinner roll vxe-loading--default-icon',
|
|
128
128
|
// table
|
|
129
|
-
TABLE_SORT_ASC: iconPrefix + 'caret-
|
|
130
|
-
TABLE_SORT_DESC: iconPrefix + 'caret-
|
|
129
|
+
TABLE_SORT_ASC: iconPrefix + 'caret-up',
|
|
130
|
+
TABLE_SORT_DESC: iconPrefix + 'caret-down',
|
|
131
131
|
TABLE_FILTER_NONE: iconPrefix + 'funnel',
|
|
132
132
|
TABLE_FILTER_MATCH: iconPrefix + 'funnel',
|
|
133
|
-
TABLE_EDIT: iconPrefix + 'edit
|
|
134
|
-
TABLE_HELP: iconPrefix + 'question',
|
|
135
|
-
TABLE_TREE_LOADED: iconPrefix + '
|
|
133
|
+
TABLE_EDIT: iconPrefix + 'edit',
|
|
134
|
+
TABLE_HELP: iconPrefix + 'question-circle-fill',
|
|
135
|
+
TABLE_TREE_LOADED: iconPrefix + 'spinner roll',
|
|
136
136
|
TABLE_TREE_OPEN: iconPrefix + 'caret-right rotate90',
|
|
137
137
|
TABLE_TREE_CLOSE: iconPrefix + 'caret-right',
|
|
138
|
-
TABLE_EXPAND_LOADED: iconPrefix + '
|
|
138
|
+
TABLE_EXPAND_LOADED: iconPrefix + 'spinner roll',
|
|
139
139
|
TABLE_EXPAND_OPEN: iconPrefix + 'arrow-right rotate90',
|
|
140
140
|
TABLE_EXPAND_CLOSE: iconPrefix + 'arrow-right',
|
|
141
141
|
// button
|
|
142
|
-
BUTTON_DROPDOWN: iconPrefix + 'arrow-
|
|
143
|
-
BUTTON_LOADING: iconPrefix + '
|
|
142
|
+
BUTTON_DROPDOWN: iconPrefix + 'arrow-down',
|
|
143
|
+
BUTTON_LOADING: iconPrefix + 'spinner roll',
|
|
144
144
|
// select
|
|
145
|
-
SELECT_LOADED: iconPrefix + '
|
|
146
|
-
SELECT_OPEN: iconPrefix + 'caret-
|
|
147
|
-
SELECT_CLOSE: iconPrefix + 'caret-
|
|
145
|
+
SELECT_LOADED: iconPrefix + 'spinner roll',
|
|
146
|
+
SELECT_OPEN: iconPrefix + 'caret-down rotate180',
|
|
147
|
+
SELECT_CLOSE: iconPrefix + 'caret-down',
|
|
148
148
|
// pager
|
|
149
|
-
PAGER_JUMP_PREV: iconPrefix + '
|
|
150
|
-
PAGER_JUMP_NEXT: iconPrefix + '
|
|
149
|
+
PAGER_JUMP_PREV: iconPrefix + 'arrow-double-left',
|
|
150
|
+
PAGER_JUMP_NEXT: iconPrefix + 'arrow-double-right',
|
|
151
151
|
PAGER_PREV_PAGE: iconPrefix + 'arrow-left',
|
|
152
152
|
PAGER_NEXT_PAGE: iconPrefix + 'arrow-right',
|
|
153
|
-
PAGER_JUMP_MORE: iconPrefix + '
|
|
153
|
+
PAGER_JUMP_MORE: iconPrefix + 'ellipsis-h',
|
|
154
154
|
// input
|
|
155
|
-
INPUT_CLEAR: iconPrefix + '
|
|
156
|
-
INPUT_PWD: iconPrefix + 'eye-
|
|
157
|
-
INPUT_SHOW_PWD: iconPrefix + 'eye',
|
|
158
|
-
INPUT_PREV_NUM: iconPrefix + 'caret-
|
|
159
|
-
INPUT_NEXT_NUM: iconPrefix + 'caret-
|
|
155
|
+
INPUT_CLEAR: iconPrefix + 'error-circle-fill',
|
|
156
|
+
INPUT_PWD: iconPrefix + 'eye-fill',
|
|
157
|
+
INPUT_SHOW_PWD: iconPrefix + 'eye-fill-close',
|
|
158
|
+
INPUT_PREV_NUM: iconPrefix + 'caret-up',
|
|
159
|
+
INPUT_NEXT_NUM: iconPrefix + 'caret-down',
|
|
160
160
|
INPUT_DATE: iconPrefix + 'calendar',
|
|
161
161
|
INPUT_SEARCH: iconPrefix + 'search',
|
|
162
162
|
// modal
|
|
163
163
|
MODAL_ZOOM_IN: iconPrefix + 'square',
|
|
164
|
-
MODAL_ZOOM_OUT: iconPrefix + '
|
|
164
|
+
MODAL_ZOOM_OUT: iconPrefix + 'maximize',
|
|
165
165
|
MODAL_CLOSE: iconPrefix + 'close',
|
|
166
|
-
MODAL_INFO: iconPrefix + 'info',
|
|
167
|
-
MODAL_SUCCESS: iconPrefix + 'success',
|
|
168
|
-
MODAL_WARNING: iconPrefix + '
|
|
169
|
-
MODAL_ERROR: iconPrefix + 'error',
|
|
170
|
-
MODAL_QUESTION: iconPrefix + 'question',
|
|
171
|
-
MODAL_LOADING: iconPrefix + '
|
|
166
|
+
MODAL_INFO: iconPrefix + 'info-circle-fill',
|
|
167
|
+
MODAL_SUCCESS: iconPrefix + 'success-circle-fill',
|
|
168
|
+
MODAL_WARNING: iconPrefix + 'warnion-circle-fill',
|
|
169
|
+
MODAL_ERROR: iconPrefix + 'error-circle-fill',
|
|
170
|
+
MODAL_QUESTION: iconPrefix + 'question-circle-fill',
|
|
171
|
+
MODAL_LOADING: iconPrefix + 'spinner roll',
|
|
172
172
|
// toolbar
|
|
173
|
-
TOOLBAR_TOOLS_REFRESH: iconPrefix + '
|
|
174
|
-
TOOLBAR_TOOLS_REFRESH_LOADING: iconPrefix + '
|
|
173
|
+
TOOLBAR_TOOLS_REFRESH: iconPrefix + 'repeat',
|
|
174
|
+
TOOLBAR_TOOLS_REFRESH_LOADING: iconPrefix + 'repeat roll',
|
|
175
175
|
TOOLBAR_TOOLS_IMPORT: iconPrefix + 'upload',
|
|
176
176
|
TOOLBAR_TOOLS_EXPORT: iconPrefix + 'download',
|
|
177
177
|
TOOLBAR_TOOLS_PRINT: iconPrefix + 'print',
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
TOOLBAR_TOOLS_CUSTOM: iconPrefix + '
|
|
178
|
+
TOOLBAR_TOOLS_FULLSCREEN: iconPrefix + 'fullscreen',
|
|
179
|
+
TOOLBAR_TOOLS_MINIMIZE: iconPrefix + 'minimize',
|
|
180
|
+
TOOLBAR_TOOLS_CUSTOM: iconPrefix + 'custom-column',
|
|
181
181
|
// form
|
|
182
|
-
FORM_PREFIX: iconPrefix + 'question',
|
|
183
|
-
FORM_SUFFIX: iconPrefix + 'question',
|
|
184
|
-
FORM_FOLDING: iconPrefix + 'arrow-
|
|
185
|
-
FORM_UNFOLDING: iconPrefix + 'arrow-
|
|
182
|
+
FORM_PREFIX: iconPrefix + 'question-circle-fill',
|
|
183
|
+
FORM_SUFFIX: iconPrefix + 'question-circle-fill',
|
|
184
|
+
FORM_FOLDING: iconPrefix + 'arrow-up rotate180',
|
|
185
|
+
FORM_UNFOLDING: iconPrefix + 'arrow-up'
|
|
186
186
|
},
|
|
187
187
|
grid: {
|
|
188
188
|
// size: null,
|
|
@@ -14,7 +14,7 @@ export var interceptor = {
|
|
|
14
14
|
if (process.env.NODE_ENV === 'development') {
|
|
15
15
|
var eventTypes = ['created', 'mounted', 'activated', 'beforeUnmount', 'unmounted', 'event.clearActived', 'event.clearFilter', 'event.clearAreas', 'event.showMenu', 'event.keydown', 'event.export', 'event.import'];
|
|
16
16
|
if (eventTypes.indexOf(type) === -1) {
|
|
17
|
-
warnLog('vxe.error.errProp', ["Interceptor."
|
|
17
|
+
warnLog('vxe.error.errProp', ["Interceptor.".concat(type), eventTypes.join('|')]);
|
|
18
18
|
}
|
|
19
19
|
}
|
|
20
20
|
if (callback) {
|
|
@@ -9,10 +9,14 @@ var __assign = (this && this.__assign) || function () {
|
|
|
9
9
|
};
|
|
10
10
|
return __assign.apply(this, arguments);
|
|
11
11
|
};
|
|
12
|
-
var __spreadArray = (this && this.__spreadArray) || function (to, from) {
|
|
13
|
-
for (var i = 0,
|
|
14
|
-
|
|
15
|
-
|
|
12
|
+
var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {
|
|
13
|
+
if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {
|
|
14
|
+
if (ar || !(i in from)) {
|
|
15
|
+
if (!ar) ar = Array.prototype.slice.call(from, 0, i);
|
|
16
|
+
ar[i] = from[i];
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
return to.concat(ar || Array.prototype.slice.call(from));
|
|
16
20
|
};
|
|
17
21
|
import { h, resolveComponent } from 'vue';
|
|
18
22
|
import XEUtils from 'xe-utils';
|
|
@@ -49,10 +53,10 @@ function getFormatDate(value, props, defaultFormat) {
|
|
|
49
53
|
return XEUtils.toDateString(parseDate(value, props), dateConfig.labelFormat || defaultFormat);
|
|
50
54
|
}
|
|
51
55
|
function getLabelFormatDate(value, props) {
|
|
52
|
-
return getFormatDate(value, props, GlobalConfig.i18n("vxe.input.date.labelFormat."
|
|
56
|
+
return getFormatDate(value, props, GlobalConfig.i18n("vxe.input.date.labelFormat.".concat(props.type)));
|
|
53
57
|
}
|
|
54
58
|
function getComponentName(name) {
|
|
55
|
-
return "vxe-"
|
|
59
|
+
return "vxe-".concat(name.replace('$', ''));
|
|
56
60
|
}
|
|
57
61
|
function getDefaultComponent(_a) {
|
|
58
62
|
var name = _a.name;
|
|
@@ -130,7 +134,7 @@ function getElementOns(renderOpts, params, modelFunc, changeFunc) {
|
|
|
130
134
|
for (var _i = 0; _i < arguments.length; _i++) {
|
|
131
135
|
args[_i] = arguments[_i];
|
|
132
136
|
}
|
|
133
|
-
func.apply(void 0, __spreadArray([params], args));
|
|
137
|
+
func.apply(void 0, __spreadArray([params], args, false));
|
|
134
138
|
};
|
|
135
139
|
});
|
|
136
140
|
}
|
|
@@ -153,7 +157,7 @@ function getElementOns(renderOpts, params, modelFunc, changeFunc) {
|
|
|
153
157
|
}
|
|
154
158
|
changeFunc.apply(void 0, args);
|
|
155
159
|
if (events && events[changeEvent]) {
|
|
156
|
-
events[changeEvent].apply(events, __spreadArray([params], args));
|
|
160
|
+
events[changeEvent].apply(events, __spreadArray([params], args, false));
|
|
157
161
|
}
|
|
158
162
|
};
|
|
159
163
|
}
|
|
@@ -177,7 +181,7 @@ function getComponentOns(renderOpts, params, modelFunc, changeFunc) {
|
|
|
177
181
|
for (var _i = 0; _i < arguments.length; _i++) {
|
|
178
182
|
args[_i] = arguments[_i];
|
|
179
183
|
}
|
|
180
|
-
func.apply(void 0, __spreadArray([params], args));
|
|
184
|
+
func.apply(void 0, __spreadArray([params], args, false));
|
|
181
185
|
};
|
|
182
186
|
});
|
|
183
187
|
if (modelFunc) {
|
|
@@ -196,7 +200,7 @@ function getComponentOns(renderOpts, params, modelFunc, changeFunc) {
|
|
|
196
200
|
}
|
|
197
201
|
changeFunc.apply(void 0, args);
|
|
198
202
|
if (events && events[changeEvent]) {
|
|
199
|
-
events[changeEvent].apply(events, __spreadArray([params], args));
|
|
203
|
+
events[changeEvent].apply(events, __spreadArray([params], args, false));
|
|
200
204
|
}
|
|
201
205
|
};
|
|
202
206
|
}
|
|
@@ -294,7 +298,7 @@ function nativeEditRender(renderOpts, params) {
|
|
|
294
298
|
var name = renderOpts.name;
|
|
295
299
|
var cellValue = isImmediateCell(renderOpts, params) ? getCellValue(row, column) : column.model.value;
|
|
296
300
|
return [
|
|
297
|
-
h(name, __assign(__assign(__assign({ class: "vxe-default-"
|
|
301
|
+
h(name, __assign(__assign(__assign({ class: "vxe-default-".concat(name) }, getNativeAttrs(renderOpts)), { value: cellValue }), getNativeEditOns(renderOpts, params)))
|
|
298
302
|
];
|
|
299
303
|
}
|
|
300
304
|
function defaultEditRender(renderOpts, params) {
|
|
@@ -348,7 +352,7 @@ function nativeFilterRender(renderOpts, params) {
|
|
|
348
352
|
var name = renderOpts.name;
|
|
349
353
|
var attrs = getNativeAttrs(renderOpts);
|
|
350
354
|
return column.filters.map(function (option, oIndex) {
|
|
351
|
-
return h(name, __assign(__assign(__assign({ key: oIndex, class: "vxe-default-"
|
|
355
|
+
return h(name, __assign(__assign(__assign({ key: oIndex, class: "vxe-default-".concat(name) }, attrs), { value: option.data }), getNativeFilterOns(renderOpts, params, option)));
|
|
352
356
|
});
|
|
353
357
|
}
|
|
354
358
|
function defaultFilterRender(renderOpts, params) {
|
|
@@ -414,7 +418,7 @@ function nativeItemRender(renderOpts, params) {
|
|
|
414
418
|
var attrs = getNativeAttrs(renderOpts);
|
|
415
419
|
var itemValue = XEUtils.get(data, property);
|
|
416
420
|
return [
|
|
417
|
-
h(name, __assign(__assign(__assign({ class: "vxe-default-"
|
|
421
|
+
h(name, __assign(__assign(__assign({ class: "vxe-default-".concat(name) }, attrs), { value: attrs && name === 'input' && (attrs.type === 'submit' || attrs.type === 'reset') ? null : itemValue }), getNativeItemOns(renderOpts, params)))
|
|
418
422
|
];
|
|
419
423
|
}
|
|
420
424
|
function defaultItemRender(renderOpts, params) {
|
|
@@ -471,7 +475,7 @@ function defaultFormItemRadioAndCheckboxRender(renderOpts, params) {
|
|
|
471
475
|
// 如果是分组
|
|
472
476
|
if (options) {
|
|
473
477
|
return [
|
|
474
|
-
h(resolveComponent(compName
|
|
478
|
+
h(resolveComponent("".concat(compName, "-group")), __assign(__assign({}, getComponentFormItemProps(renderOpts, params, itemValue)), getItemOns(renderOpts, params)), {
|
|
475
479
|
default: function () {
|
|
476
480
|
return options.map(function (item, index) {
|
|
477
481
|
return h(resolveComponent(compName), {
|
|
@@ -626,7 +630,7 @@ export var renderer = {
|
|
|
626
630
|
if (process.env.NODE_ENV === 'development') {
|
|
627
631
|
XEUtils.each(options, function (val, key) {
|
|
628
632
|
if (!XEUtils.eqNull(renders_1[key]) && renders_1[key] !== val) {
|
|
629
|
-
warnLog('vxe.error.coverProp', ["Renderer."
|
|
633
|
+
warnLog('vxe.error.coverProp', ["Renderer.".concat(name), key]);
|
|
630
634
|
}
|
|
631
635
|
});
|
|
632
636
|
}
|