vxe-pc-ui 3.15.2 → 3.15.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/backtop/src/backtop.js +8 -7
- package/es/button/src/button.js +3 -2
- package/es/calendar/src/calendar.js +2 -1
- package/es/cascader/src/cascader.js +75 -35
- package/es/checkbox/src/group.js +16 -7
- package/es/context-menu/src/context-menu.js +2 -6
- package/es/date-panel/src/util.js +27 -16
- package/es/date-picker/src/date-picker.js +616 -88
- package/es/date-range-picker/src/date-range-picker.js +7 -4
- package/es/drawer/src/drawer.js +3 -0
- package/es/form/render/index.js +3 -2
- package/es/form/src/form.js +11 -12
- package/es/form/src/itemInfo.js +6 -5
- package/es/image/src/image.js +5 -6
- package/es/input/src/input.js +2 -1
- package/es/layout-body/src/layout-body.js +13 -6
- package/es/list/src/list.js +3 -6
- package/es/menu/src/menu.js +2 -1
- package/es/modal/src/modal.js +5 -1
- package/es/pager/src/pager.js +4 -3
- package/es/radio/src/group.js +11 -8
- package/es/select/src/select.js +34 -30
- package/es/splitter/src/splitter.js +6 -5
- package/es/table-select/src/table-select.js +27 -22
- package/es/tabs/src/tabs.js +4 -3
- package/es/textarea/src/textarea.js +2 -1
- package/es/tree/src/tree.js +6 -11
- package/es/tree-select/src/tree-select.js +27 -33
- package/es/ui/index.js +4 -1
- package/es/ui/src/log.js +14 -4
- package/es/upload/src/upload.js +11 -9
- package/lib/backtop/src/backtop.js +10 -6
- package/lib/backtop/src/backtop.min.js +1 -1
- package/lib/button/src/button.js +3 -1
- package/lib/button/src/button.min.js +1 -1
- package/lib/calendar/src/calendar.js +3 -1
- package/lib/calendar/src/calendar.min.js +1 -1
- package/lib/cascader/src/cascader.js +87 -34
- package/lib/cascader/src/cascader.min.js +1 -1
- package/lib/checkbox/src/group.js +18 -6
- package/lib/checkbox/src/group.min.js +1 -1
- package/lib/context-menu/src/context-menu.js +3 -4
- package/lib/context-menu/src/context-menu.min.js +1 -1
- package/lib/date-panel/src/util.js +37 -18
- package/lib/date-panel/src/util.min.js +1 -1
- package/lib/date-picker/src/date-picker.js +659 -86
- package/lib/date-picker/src/date-picker.min.js +1 -1
- package/lib/date-range-picker/src/date-range-picker.js +7 -3
- package/lib/date-range-picker/src/date-range-picker.min.js +1 -1
- package/lib/drawer/src/drawer.js +3 -0
- package/lib/drawer/src/drawer.min.js +1 -1
- package/lib/form/render/index.js +3 -1
- package/lib/form/render/index.min.js +1 -1
- package/lib/form/src/form.js +12 -8
- package/lib/form/src/form.min.js +1 -1
- package/lib/form/src/itemInfo.js +6 -4
- package/lib/form/src/itemInfo.min.js +1 -1
- package/lib/image/src/image.js +7 -5
- package/lib/image/src/image.min.js +1 -1
- package/lib/index.umd.js +1140 -287
- package/lib/index.umd.min.js +1 -1
- package/lib/input/src/input.js +5 -3
- package/lib/input/src/input.min.js +1 -1
- package/lib/layout-body/src/layout-body.js +13 -4
- package/lib/layout-body/src/layout-body.min.js +1 -1
- package/lib/list/src/list.js +4 -5
- package/lib/list/src/list.min.js +1 -1
- package/lib/menu/src/menu.js +3 -1
- package/lib/menu/src/menu.min.js +1 -1
- package/lib/modal/src/modal.js +8 -2
- package/lib/modal/src/modal.min.js +1 -1
- package/lib/pager/src/pager.js +5 -2
- package/lib/pager/src/pager.min.js +1 -1
- package/lib/radio/src/group.js +13 -6
- package/lib/radio/src/group.min.js +1 -1
- package/lib/select/src/select.js +36 -29
- package/lib/select/src/select.min.js +1 -1
- package/lib/splitter/src/splitter.js +9 -6
- package/lib/splitter/src/splitter.min.js +1 -1
- package/lib/table-select/src/table-select.js +27 -19
- package/lib/table-select/src/table-select.min.js +1 -1
- package/lib/tabs/src/tabs.js +6 -3
- package/lib/tabs/src/tabs.min.js +1 -1
- package/lib/textarea/src/textarea.js +3 -1
- package/lib/textarea/src/textarea.min.js +1 -1
- package/lib/tree/src/tree.js +9 -8
- package/lib/tree/src/tree.min.js +1 -1
- package/lib/tree-select/src/tree-select.js +17 -15
- package/lib/tree-select/src/tree-select.min.js +1 -1
- package/lib/ui/index.js +4 -1
- package/lib/ui/index.min.js +1 -1
- package/lib/ui/src/log.js +14 -3
- package/lib/ui/src/log.min.js +1 -1
- package/lib/upload/src/upload.js +22 -7
- package/lib/upload/src/upload.min.js +1 -1
- package/package.json +1 -1
- package/packages/backtop/src/backtop.ts +11 -3
- package/packages/button/src/button.ts +4 -2
- package/packages/calendar/src/calendar.ts +3 -1
- package/packages/cascader/src/cascader.ts +77 -32
- package/packages/checkbox/src/group.ts +22 -5
- package/packages/context-menu/src/context-menu.ts +5 -2
- package/packages/date-panel/src/util.ts +28 -16
- package/packages/date-picker/src/date-picker.ts +630 -89
- package/packages/date-range-picker/src/date-range-picker.ts +8 -4
- package/packages/drawer/src/drawer.ts +3 -0
- package/packages/form/render/index.ts +4 -2
- package/packages/form/src/form.ts +14 -7
- package/packages/form/src/itemInfo.ts +7 -5
- package/packages/image/src/image.ts +9 -3
- package/packages/input/src/input.ts +3 -1
- package/packages/layout-body/src/layout-body.ts +16 -2
- package/packages/list/src/list.ts +6 -3
- package/packages/menu/src/menu.ts +3 -1
- package/packages/modal/src/modal.ts +6 -1
- package/packages/pager/src/pager.ts +5 -3
- package/packages/radio/src/group.ts +16 -5
- package/packages/select/src/select.ts +41 -29
- package/packages/splitter/src/splitter.ts +7 -5
- package/packages/table-select/src/table-select.ts +31 -20
- package/packages/tabs/src/tabs.ts +5 -3
- package/packages/textarea/src/textarea.ts +3 -1
- package/packages/tree/src/tree.ts +9 -4
- package/packages/tree-select/src/tree-select.ts +31 -30
- package/packages/ui/index.ts +3 -0
- package/packages/ui/src/log.ts +16 -4
- package/packages/upload/src/upload.ts +16 -6
- package/types/components/cascader.d.ts +4 -0
- package/types/components/date-picker.d.ts +14 -6
- package/types/components/drawer.d.ts +2 -0
- package/types/components/modal.d.ts +2 -0
- package/types/components/upload.d.ts +28 -1
- /package/es/icon/{iconfont.1781753586592.ttf → iconfont.1781876590487.ttf} +0 -0
- /package/es/icon/{iconfont.1781753586592.woff → iconfont.1781876590487.woff} +0 -0
- /package/es/icon/{iconfont.1781753586592.woff2 → iconfont.1781876590487.woff2} +0 -0
- /package/es/{iconfont.1781753586592.ttf → iconfont.1781876590487.ttf} +0 -0
- /package/es/{iconfont.1781753586592.woff → iconfont.1781876590487.woff} +0 -0
- /package/es/{iconfont.1781753586592.woff2 → iconfont.1781876590487.woff2} +0 -0
- /package/lib/icon/style/{iconfont.1781753586592.ttf → iconfont.1781876590487.ttf} +0 -0
- /package/lib/icon/style/{iconfont.1781753586592.woff → iconfont.1781876590487.woff} +0 -0
- /package/lib/icon/style/{iconfont.1781753586592.woff2 → iconfont.1781876590487.woff2} +0 -0
- /package/lib/{iconfont.1781753586592.ttf → iconfont.1781876590487.ttf} +0 -0
- /package/lib/{iconfont.1781753586592.woff → iconfont.1781876590487.woff} +0 -0
- /package/lib/{iconfont.1781753586592.woff2 → iconfont.1781876590487.woff2} +0 -0
|
@@ -5,10 +5,11 @@ import { getFuncText, getLastZIndex, nextZIndex, isEnableConf } from '../../ui/s
|
|
|
5
5
|
import { updatePanelPlacement, getEventTargetNode } from '../../ui/src/dom';
|
|
6
6
|
import { parseDateString, parseDateObj, getRangeDateByCode, handleValueFormat } from '../../date-panel/src/util';
|
|
7
7
|
import { getSlotVNs } from '../../ui/src/vn';
|
|
8
|
-
import {
|
|
8
|
+
import { createComponentLog } from '../../ui/src/log';
|
|
9
9
|
import VxeDatePanelComponent from '../../date-panel/src/date-panel';
|
|
10
10
|
import VxeButtonComponent from '../../button/src/button';
|
|
11
11
|
import VxeButtonGroupComponent from '../../button/src/button-group';
|
|
12
|
+
const { errLog } = createComponentLog('date-range-picker');
|
|
12
13
|
export default {
|
|
13
14
|
name: 'VxeDateRangePicker',
|
|
14
15
|
mixins: [
|
|
@@ -923,9 +924,11 @@ export default {
|
|
|
923
924
|
const btnTransfer = $xeDateRangePicker.computeBtnTransfer;
|
|
924
925
|
const panelElem = $xeDateRangePicker.$refs.refInputPanel;
|
|
925
926
|
if (!isDisabled && !visiblePanel) {
|
|
926
|
-
if (!reactData.initialized
|
|
927
|
+
if (!reactData.initialized) {
|
|
927
928
|
reactData.initialized = true;
|
|
928
|
-
|
|
929
|
+
if (btnTransfer && panelElem) {
|
|
930
|
+
document.body.appendChild(panelElem);
|
|
931
|
+
}
|
|
929
932
|
}
|
|
930
933
|
if (internalData.hpTimeout) {
|
|
931
934
|
clearTimeout(internalData.hpTimeout);
|
|
@@ -1020,7 +1023,7 @@ export default {
|
|
|
1020
1023
|
break;
|
|
1021
1024
|
}
|
|
1022
1025
|
default:
|
|
1023
|
-
errLog('vxe.error.notCommands', [
|
|
1026
|
+
errLog('vxe.error.notCommands', [code]);
|
|
1024
1027
|
break;
|
|
1025
1028
|
}
|
|
1026
1029
|
}
|
package/es/drawer/src/drawer.js
CHANGED
|
@@ -92,6 +92,7 @@ export default {
|
|
|
92
92
|
type: Boolean,
|
|
93
93
|
default: () => getConfig().drawer.showTitleOverflow
|
|
94
94
|
},
|
|
95
|
+
preload: Boolean,
|
|
95
96
|
width: [Number, String],
|
|
96
97
|
height: [Number, String],
|
|
97
98
|
resize: {
|
|
@@ -708,6 +709,8 @@ export default {
|
|
|
708
709
|
mounted() {
|
|
709
710
|
const $xeDrawer = this;
|
|
710
711
|
const props = $xeDrawer;
|
|
712
|
+
const reactData = $xeDrawer.reactData;
|
|
713
|
+
reactData.initialized = !!props.preload;
|
|
711
714
|
$xeDrawer.$nextTick(() => {
|
|
712
715
|
if (props.value) {
|
|
713
716
|
$xeDrawer.openDrawer();
|
package/es/form/render/index.js
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import XEUtils from 'xe-utils';
|
|
2
2
|
import { renderer, getComponent } from '../../ui';
|
|
3
3
|
import { getOnName, getModelEvent, getChangeEvent } from '../../ui/src/vn';
|
|
4
|
-
import {
|
|
4
|
+
import { createComponentLog } from '../../ui/src/log';
|
|
5
|
+
const { errLog } = createComponentLog('form');
|
|
5
6
|
const componentDefaultModelProp = 'value';
|
|
6
7
|
/**
|
|
7
8
|
* 已废弃
|
|
@@ -87,7 +88,7 @@ function getComponentOns(renderOpts, params, eFns, eventOns) {
|
|
|
87
88
|
XEUtils.objectEach(events, (func, key) => {
|
|
88
89
|
ons[getOnName(key)] = function (...args) {
|
|
89
90
|
if (!XEUtils.isFunction(func)) {
|
|
90
|
-
errLog('vxe.error.errFunc', [
|
|
91
|
+
errLog('vxe.error.errFunc', [func]);
|
|
91
92
|
}
|
|
92
93
|
func(params, ...args);
|
|
93
94
|
};
|
package/es/form/src/form.js
CHANGED
|
@@ -8,8 +8,9 @@ import VxeTooltipComponent from '../../tooltip';
|
|
|
8
8
|
import VxeFormConfigItem from './form-config-item';
|
|
9
9
|
import VxeLoadingComponent from '../../loading';
|
|
10
10
|
import { getSlotVNs } from '../../ui/src/vn';
|
|
11
|
-
import {
|
|
11
|
+
import { createComponentLog } from '../../ui/src/log';
|
|
12
12
|
import '../render';
|
|
13
|
+
const { warnLog, errLog } = createComponentLog('form');
|
|
13
14
|
class Rule {
|
|
14
15
|
constructor(rule) {
|
|
15
16
|
Object.assign(this, {
|
|
@@ -267,13 +268,8 @@ export default {
|
|
|
267
268
|
data() {
|
|
268
269
|
const xID = XEUtils.uniqueId();
|
|
269
270
|
const reactData = createReactData();
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
xID,
|
|
273
|
-
reactData,
|
|
274
|
-
internalData,
|
|
275
|
-
recalcFlag: 0
|
|
276
|
-
};
|
|
271
|
+
return Object.assign(Object.assign({}, {}), { xID,
|
|
272
|
+
reactData, recalcFlag: 0 });
|
|
277
273
|
},
|
|
278
274
|
computed: Object.assign(Object.assign({}, {}), { computeValidOpts() {
|
|
279
275
|
const $xeForm = this;
|
|
@@ -344,7 +340,7 @@ export default {
|
|
|
344
340
|
XEUtils.each(item.slots, (func) => {
|
|
345
341
|
if (!XEUtils.isFunction(func)) {
|
|
346
342
|
if (!slots[func]) {
|
|
347
|
-
errLog('vxe.error.notSlot', [
|
|
343
|
+
errLog('vxe.error.notSlot', [func]);
|
|
348
344
|
}
|
|
349
345
|
}
|
|
350
346
|
});
|
|
@@ -597,11 +593,11 @@ export default {
|
|
|
597
593
|
customValid = validatorMethod(validParams);
|
|
598
594
|
}
|
|
599
595
|
else {
|
|
600
|
-
warnLog('vxe.error.notValidators', [
|
|
596
|
+
warnLog('vxe.error.notValidators', [validator]);
|
|
601
597
|
}
|
|
602
598
|
}
|
|
603
599
|
else {
|
|
604
|
-
errLog('vxe.error.notValidators', [
|
|
600
|
+
errLog('vxe.error.notValidators', [validator]);
|
|
605
601
|
}
|
|
606
602
|
}
|
|
607
603
|
else {
|
|
@@ -986,6 +982,7 @@ export default {
|
|
|
986
982
|
const $xeForm = this;
|
|
987
983
|
const props = $xeForm;
|
|
988
984
|
const reactData = $xeForm.reactData;
|
|
985
|
+
$xeForm.internalData = createInternalData();
|
|
989
986
|
reactData.collapseAll = !!props.collapseStatus;
|
|
990
987
|
},
|
|
991
988
|
mounted() {
|
|
@@ -996,15 +993,17 @@ export default {
|
|
|
996
993
|
}
|
|
997
994
|
$xeForm.$nextTick(() => {
|
|
998
995
|
if (props.customLayout && props.items) {
|
|
999
|
-
errLog('vxe.error.errConflicts', ['
|
|
996
|
+
errLog('vxe.error.errConflicts', ['custom-layout', 'items']);
|
|
1000
997
|
}
|
|
1001
998
|
});
|
|
1002
999
|
globalEvents.on($xeForm, 'resize', $xeForm.handleGlobalResizeEvent);
|
|
1003
1000
|
},
|
|
1004
1001
|
destroyed() {
|
|
1005
1002
|
const $xeForm = this;
|
|
1003
|
+
const reactData = $xeForm.reactData;
|
|
1006
1004
|
const internalData = $xeForm.internalData;
|
|
1007
1005
|
globalEvents.off($xeForm, 'resize');
|
|
1006
|
+
XEUtils.assign(reactData, createReactData());
|
|
1008
1007
|
XEUtils.assign(internalData, createInternalData());
|
|
1009
1008
|
},
|
|
1010
1009
|
render(h) {
|
package/es/form/src/itemInfo.js
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { formats } from '../../ui';
|
|
2
2
|
import XEUtils from 'xe-utils';
|
|
3
|
-
import {
|
|
3
|
+
import { createComponentLog } from '../../ui/src/log';
|
|
4
|
+
const { errLog } = createComponentLog('form');
|
|
4
5
|
export class ItemInfo {
|
|
5
6
|
constructor($xeForm, item) {
|
|
6
7
|
const { field, itemRender, formatter } = item;
|
|
@@ -8,22 +9,22 @@ export class ItemInfo {
|
|
|
8
9
|
if (XEUtils.isString(formatter)) {
|
|
9
10
|
const gFormatOpts = formats.get(formatter);
|
|
10
11
|
if (!gFormatOpts || !gFormatOpts.formItemFormatMethod) {
|
|
11
|
-
errLog('vxe.error.notFormats', [
|
|
12
|
+
errLog('vxe.error.notFormats', [formatter]);
|
|
12
13
|
}
|
|
13
14
|
}
|
|
14
15
|
else if (XEUtils.isArray(formatter)) {
|
|
15
16
|
const gFormatOpts = formats.get(formatter[0]);
|
|
16
17
|
if (!gFormatOpts || !gFormatOpts.formItemFormatMethod) {
|
|
17
|
-
errLog('vxe.error.notFormats', [
|
|
18
|
+
errLog('vxe.error.notFormats', [formatter[0]]);
|
|
18
19
|
}
|
|
19
20
|
}
|
|
20
21
|
}
|
|
21
22
|
if (field && itemRender) {
|
|
22
23
|
if (itemRender.startField && `${itemRender.startField}`.indexOf(field) >= 0) {
|
|
23
|
-
errLog('vxe.error.modelConflicts', [`
|
|
24
|
+
errLog('vxe.error.modelConflicts', [`field=${field}`, `item-render.startField=${itemRender.startField}`]);
|
|
24
25
|
}
|
|
25
26
|
if (itemRender.endField && `${itemRender.endField}`.indexOf(field) >= 0) {
|
|
26
|
-
errLog('vxe.error.modelConflicts', [`
|
|
27
|
+
errLog('vxe.error.modelConflicts', [`field=${field}`, `item-render.endField=${itemRender.endField}`]);
|
|
27
28
|
}
|
|
28
29
|
}
|
|
29
30
|
Object.assign(this, {
|
package/es/image/src/image.js
CHANGED
|
@@ -58,13 +58,8 @@ export default {
|
|
|
58
58
|
getThumbnailUrlMethod: Function
|
|
59
59
|
},
|
|
60
60
|
data() {
|
|
61
|
-
const internalData = createInternalData();
|
|
62
61
|
const reactData = createReactData();
|
|
63
|
-
return {
|
|
64
|
-
xID: XEUtils.uniqueId(),
|
|
65
|
-
reactData,
|
|
66
|
-
internalData
|
|
67
|
-
};
|
|
62
|
+
return Object.assign(Object.assign({}, {}), { xID: XEUtils.uniqueId(), reactData });
|
|
68
63
|
},
|
|
69
64
|
computed: Object.assign(Object.assign({}, {}), { computeWrapperStyle() {
|
|
70
65
|
const $xeImage = this;
|
|
@@ -262,6 +257,10 @@ export default {
|
|
|
262
257
|
]);
|
|
263
258
|
}
|
|
264
259
|
},
|
|
260
|
+
created() {
|
|
261
|
+
const $xeImage = this;
|
|
262
|
+
$xeImage.internalData = createInternalData();
|
|
263
|
+
},
|
|
265
264
|
beforeDestroy() {
|
|
266
265
|
const $xeImage = this;
|
|
267
266
|
const reactData = $xeImage.reactData;
|
package/es/input/src/input.js
CHANGED
|
@@ -6,7 +6,8 @@ import { hasClass, getAbsolutePos, getEventTargetNode, hasControlKey } from '../
|
|
|
6
6
|
import { toStringTimeDate, getDateQuarter } from '../../date-panel/src/util';
|
|
7
7
|
import { handleNumber, toFloatValueFixed } from '../../number-input/src/util';
|
|
8
8
|
import { getSlotVNs } from '../../ui/src/vn';
|
|
9
|
-
import {
|
|
9
|
+
import { createComponentLog } from '../../ui/src/log';
|
|
10
|
+
const { warnLog } = createComponentLog('input');
|
|
10
11
|
export default {
|
|
11
12
|
name: 'VxeInput',
|
|
12
13
|
mixins: [
|
|
@@ -30,14 +30,10 @@ export default {
|
|
|
30
30
|
data() {
|
|
31
31
|
const xID = XEUtils.uniqueId();
|
|
32
32
|
const backtopId = `vxe_layout_body_backtop_${xID}`;
|
|
33
|
-
const internalData = createInternalData();
|
|
34
33
|
const reactData = createReactData();
|
|
35
|
-
return {
|
|
36
|
-
xID,
|
|
34
|
+
return Object.assign(Object.assign({}, {}), { xID,
|
|
37
35
|
backtopId,
|
|
38
|
-
|
|
39
|
-
reactData
|
|
40
|
-
};
|
|
36
|
+
reactData });
|
|
41
37
|
},
|
|
42
38
|
computed: Object.assign(Object.assign({}, {}), { computeBacktopOpts() {
|
|
43
39
|
const $xeLayoutBody = this;
|
|
@@ -114,6 +110,17 @@ export default {
|
|
|
114
110
|
]);
|
|
115
111
|
}
|
|
116
112
|
},
|
|
113
|
+
created() {
|
|
114
|
+
const $xeLayoutBody = this;
|
|
115
|
+
$xeLayoutBody.internalData = createInternalData();
|
|
116
|
+
},
|
|
117
|
+
beforeDestroy() {
|
|
118
|
+
const $xeLayoutBody = this;
|
|
119
|
+
const reactData = $xeLayoutBody.reactData;
|
|
120
|
+
const internalData = $xeLayoutBody.internalData;
|
|
121
|
+
XEUtils.assign(reactData, createReactData());
|
|
122
|
+
XEUtils.assign(internalData, createInternalData());
|
|
123
|
+
},
|
|
117
124
|
render(h) {
|
|
118
125
|
return this.renderVN(h);
|
|
119
126
|
}
|
package/es/list/src/list.js
CHANGED
|
@@ -57,12 +57,8 @@ export default {
|
|
|
57
57
|
data() {
|
|
58
58
|
const xID = XEUtils.uniqueId();
|
|
59
59
|
const reactData = createReactData();
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
xID,
|
|
63
|
-
reactData,
|
|
64
|
-
internalData
|
|
65
|
-
};
|
|
60
|
+
return Object.assign(Object.assign({}, {}), { xID,
|
|
61
|
+
reactData });
|
|
66
62
|
},
|
|
67
63
|
computed: Object.assign(Object.assign({}, {}), { computeSYOpts() {
|
|
68
64
|
const $xeList = this;
|
|
@@ -416,6 +412,7 @@ export default {
|
|
|
416
412
|
created() {
|
|
417
413
|
const $xeList = this;
|
|
418
414
|
const props = $xeList;
|
|
415
|
+
$xeList.internalData = createInternalData();
|
|
419
416
|
$xeList.loadData(props.data || []);
|
|
420
417
|
},
|
|
421
418
|
mounted() {
|
package/es/menu/src/menu.js
CHANGED
|
@@ -4,8 +4,9 @@ import { VxeUI, createEvent, permission, globalMixins, globalEvents, renderEmpty
|
|
|
4
4
|
import { toCssUnit } from '../../ui/src/dom';
|
|
5
5
|
import { getLastZIndex, nextZIndex, isEnableConf } from '../../ui/src/utils';
|
|
6
6
|
import { getSlotVNs } from '../../ui/src/vn';
|
|
7
|
-
import {
|
|
7
|
+
import { createComponentLog } from '../../ui/src/log';
|
|
8
8
|
import VxeLoadingComponent from '../../loading';
|
|
9
|
+
const { errLog } = createComponentLog('menu');
|
|
9
10
|
const { menus, getConfig, getIcon } = VxeUI;
|
|
10
11
|
export default {
|
|
11
12
|
name: 'VxeMenu',
|
package/es/modal/src/modal.js
CHANGED
|
@@ -6,7 +6,8 @@ import { getLastZIndex, nextZIndex, getSubLastZIndex, nextSubZIndex, getFuncText
|
|
|
6
6
|
import VxeButtonComponent from '../../button/src/button';
|
|
7
7
|
import VxeLoadingComponent from '../../loading/index';
|
|
8
8
|
import { getSlotVNs } from '../../ui/src/vn';
|
|
9
|
-
import {
|
|
9
|
+
import { createComponentLog } from '../../ui/src/log';
|
|
10
|
+
const { warnLog, errLog } = createComponentLog('modal');
|
|
10
11
|
export const allActiveModals = [];
|
|
11
12
|
const msgQueue = [];
|
|
12
13
|
const notifyQueue = [];
|
|
@@ -97,6 +98,7 @@ export default {
|
|
|
97
98
|
type: Boolean,
|
|
98
99
|
default: () => getConfig().modal.showFooter
|
|
99
100
|
},
|
|
101
|
+
preload: Boolean,
|
|
100
102
|
showZoom: Boolean,
|
|
101
103
|
zoomConfig: Object,
|
|
102
104
|
showMaximize: {
|
|
@@ -1571,9 +1573,11 @@ export default {
|
|
|
1571
1573
|
const $xeModal = this;
|
|
1572
1574
|
const slots = $xeModal.$scopedSlots;
|
|
1573
1575
|
const props = $xeModal;
|
|
1576
|
+
const reactData = $xeModal.reactData;
|
|
1574
1577
|
if (props.type === 'modal' && props.showFooter && !(props.showConfirmButton || props.showCancelButton || slots.footer)) {
|
|
1575
1578
|
warnLog('vxe.modal.footPropErr');
|
|
1576
1579
|
}
|
|
1580
|
+
reactData.initialized = !!props.preload;
|
|
1577
1581
|
$xeModal.$nextTick(() => {
|
|
1578
1582
|
if (props.storage && !props.id) {
|
|
1579
1583
|
errLog('vxe.error.reqProp', ['[modal] id']);
|
package/es/pager/src/pager.js
CHANGED
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import { defineVxeComponent } from '../../ui/src/comp';
|
|
2
2
|
import XEUtils from 'xe-utils';
|
|
3
3
|
import { getIcon, getConfig, getI18n, globalEvents, GLOBAL_EVENT_KEYS, createEvent, globalMixins } from '../../ui';
|
|
4
|
-
import {
|
|
4
|
+
import { createComponentLog } from '../../ui/src/log';
|
|
5
5
|
import VxeSelectComponent from '../../select/src/select';
|
|
6
6
|
import VxeNumberInputComponent from '../../number-input/src/number-input';
|
|
7
|
+
const { warnLog, errLog } = createComponentLog('pager');
|
|
7
8
|
export default {
|
|
8
9
|
name: 'VxePager',
|
|
9
10
|
mixins: [
|
|
@@ -228,7 +229,7 @@ export default {
|
|
|
228
229
|
*/
|
|
229
230
|
jumpPage(currentPage) {
|
|
230
231
|
const $xePager = this;
|
|
231
|
-
warnLog('vxe.error.delFunc', ['
|
|
232
|
+
warnLog('vxe.error.delFunc', ['jumpPage', 'setCurrentPage']);
|
|
232
233
|
return $xePager.setCurrentPage(currentPage);
|
|
233
234
|
},
|
|
234
235
|
getPageCount(total, size) {
|
|
@@ -798,7 +799,7 @@ export default {
|
|
|
798
799
|
childNodes.push(renderFn(h));
|
|
799
800
|
}
|
|
800
801
|
else {
|
|
801
|
-
errLog('vxe.error.notProp', [`
|
|
802
|
+
errLog('vxe.error.notProp', [`layouts -> ${name}`]);
|
|
802
803
|
}
|
|
803
804
|
});
|
|
804
805
|
if (slots.right) {
|
package/es/radio/src/group.js
CHANGED
|
@@ -3,6 +3,9 @@ import XEUtils from 'xe-utils';
|
|
|
3
3
|
import { getConfig, createEvent, globalMixins } from '../../ui';
|
|
4
4
|
import VxeRadioComponent from './radio';
|
|
5
5
|
import VxeRadioButtonComponent from './button';
|
|
6
|
+
function createReactData() {
|
|
7
|
+
return {};
|
|
8
|
+
}
|
|
6
9
|
function createInternalData() {
|
|
7
10
|
return {
|
|
8
11
|
// isLoaded: false
|
|
@@ -53,14 +56,8 @@ export default {
|
|
|
53
56
|
};
|
|
54
57
|
},
|
|
55
58
|
data() {
|
|
56
|
-
const reactData =
|
|
57
|
-
|
|
58
|
-
return {
|
|
59
|
-
xID: XEUtils.uniqueId(),
|
|
60
|
-
name: XEUtils.uniqueId('xe_group_'),
|
|
61
|
-
reactData,
|
|
62
|
-
internalData
|
|
63
|
-
};
|
|
59
|
+
const reactData = createReactData();
|
|
60
|
+
return Object.assign(Object.assign({}, {}), { xID: XEUtils.uniqueId(), name: XEUtils.uniqueId('xe_group_'), reactData });
|
|
64
61
|
},
|
|
65
62
|
computed: Object.assign(Object.assign({}, {}), { computeIsReadonly() {
|
|
66
63
|
const $xeRadioGroup = this;
|
|
@@ -215,6 +212,10 @@ export default {
|
|
|
215
212
|
$xeRadioGroup.loadData(val);
|
|
216
213
|
}
|
|
217
214
|
},
|
|
215
|
+
created() {
|
|
216
|
+
const $xeRadioGroup = this;
|
|
217
|
+
$xeRadioGroup.internalData = createInternalData();
|
|
218
|
+
},
|
|
218
219
|
mounted() {
|
|
219
220
|
const $xeRadioGroup = this;
|
|
220
221
|
const props = $xeRadioGroup;
|
|
@@ -227,8 +228,10 @@ export default {
|
|
|
227
228
|
},
|
|
228
229
|
beforeDestroy() {
|
|
229
230
|
const $xeRadioGroup = this;
|
|
231
|
+
const reactData = $xeRadioGroup.reactData;
|
|
230
232
|
const internalData = $xeRadioGroup.internalData;
|
|
231
233
|
XEUtils.assign(internalData, createInternalData());
|
|
234
|
+
XEUtils.assign(reactData, createReactData());
|
|
232
235
|
},
|
|
233
236
|
render(h) {
|
|
234
237
|
return this.renderVN(h);
|
package/es/select/src/select.js
CHANGED
|
@@ -4,15 +4,37 @@ import { VxeUI, getConfig, getIcon, getI18n, globalEvents, GLOBAL_EVENT_KEYS, cr
|
|
|
4
4
|
import { getEventTargetNode, toCssUnit, updatePanelPlacement } from '../../ui/src/dom';
|
|
5
5
|
import { getLastZIndex, nextZIndex, getFuncText, eqEmptyValue } from '../../ui/src/utils';
|
|
6
6
|
import { getSlotVNs } from '../../ui/src/vn';
|
|
7
|
-
import {
|
|
7
|
+
import { createComponentLog } from '../../ui/src/log';
|
|
8
8
|
import VxeInputComponent from '../../input/src/input';
|
|
9
9
|
import VxeButtonComponent from '../../button/src/button';
|
|
10
|
+
const { errLog } = createComponentLog('select');
|
|
10
11
|
function isOptionVisible(option) {
|
|
11
12
|
return option.visible !== false;
|
|
12
13
|
}
|
|
13
14
|
function getOptUniqueId() {
|
|
14
15
|
return XEUtils.uniqueId('opt_');
|
|
15
16
|
}
|
|
17
|
+
function createReactData() {
|
|
18
|
+
return {
|
|
19
|
+
initialized: false,
|
|
20
|
+
scrollYLoad: false,
|
|
21
|
+
bodyHeight: 0,
|
|
22
|
+
topSpaceHeight: 0,
|
|
23
|
+
optList: [],
|
|
24
|
+
staticOptions: [],
|
|
25
|
+
reactFlag: 0,
|
|
26
|
+
currentOption: null,
|
|
27
|
+
searchValue: '',
|
|
28
|
+
searchLoading: false,
|
|
29
|
+
panelIndex: 0,
|
|
30
|
+
panelStyle: {},
|
|
31
|
+
panelPlacement: null,
|
|
32
|
+
triggerFocusPanel: false,
|
|
33
|
+
visiblePanel: false,
|
|
34
|
+
isAniVisible: false,
|
|
35
|
+
isActivated: false
|
|
36
|
+
};
|
|
37
|
+
}
|
|
16
38
|
function createInternalData() {
|
|
17
39
|
return {
|
|
18
40
|
// isLoaded: false,
|
|
@@ -194,31 +216,9 @@ export default {
|
|
|
194
216
|
},
|
|
195
217
|
data() {
|
|
196
218
|
const xID = XEUtils.uniqueId();
|
|
197
|
-
const reactData =
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
bodyHeight: 0,
|
|
201
|
-
topSpaceHeight: 0,
|
|
202
|
-
optList: [],
|
|
203
|
-
staticOptions: [],
|
|
204
|
-
reactFlag: 1,
|
|
205
|
-
currentOption: null,
|
|
206
|
-
searchValue: '',
|
|
207
|
-
searchLoading: false,
|
|
208
|
-
panelIndex: 0,
|
|
209
|
-
panelStyle: {},
|
|
210
|
-
panelPlacement: null,
|
|
211
|
-
triggerFocusPanel: false,
|
|
212
|
-
visiblePanel: false,
|
|
213
|
-
isAniVisible: false,
|
|
214
|
-
isActivated: false
|
|
215
|
-
};
|
|
216
|
-
const internalData = createInternalData();
|
|
217
|
-
return {
|
|
218
|
-
xID,
|
|
219
|
-
reactData,
|
|
220
|
-
internalData
|
|
221
|
-
};
|
|
219
|
+
const reactData = createReactData();
|
|
220
|
+
return Object.assign(Object.assign({}, {}), { xID,
|
|
221
|
+
reactData });
|
|
222
222
|
},
|
|
223
223
|
computed: Object.assign(Object.assign({}, {}), { computeFormReadonly() {
|
|
224
224
|
const $xeSelect = this;
|
|
@@ -785,10 +785,8 @@ export default {
|
|
|
785
785
|
reactData.initialized = true;
|
|
786
786
|
const btnTransfer = $xeSelect.computeBtnTransfer;
|
|
787
787
|
const panelElem = $xeSelect.$refs.refOptionPanel;
|
|
788
|
-
if (btnTransfer) {
|
|
789
|
-
|
|
790
|
-
document.body.appendChild(panelElem);
|
|
791
|
-
}
|
|
788
|
+
if (btnTransfer && panelElem) {
|
|
789
|
+
document.body.appendChild(panelElem);
|
|
792
790
|
}
|
|
793
791
|
}
|
|
794
792
|
reactData.isActivated = true;
|
|
@@ -2020,6 +2018,10 @@ export default {
|
|
|
2020
2018
|
$xeSelect.loadData(val);
|
|
2021
2019
|
}
|
|
2022
2020
|
},
|
|
2021
|
+
created() {
|
|
2022
|
+
const $xeSelect = this;
|
|
2023
|
+
$xeSelect.internalData = createInternalData();
|
|
2024
|
+
},
|
|
2023
2025
|
mounted() {
|
|
2024
2026
|
const $xeSelect = this;
|
|
2025
2027
|
const props = $xeSelect;
|
|
@@ -2052,7 +2054,9 @@ export default {
|
|
|
2052
2054
|
},
|
|
2053
2055
|
destroyed() {
|
|
2054
2056
|
const $xeSelect = this;
|
|
2057
|
+
const reactData = $xeSelect.reactData;
|
|
2055
2058
|
const internalData = $xeSelect.internalData;
|
|
2059
|
+
XEUtils.assign(reactData, createReactData());
|
|
2056
2060
|
XEUtils.assign(internalData, createInternalData());
|
|
2057
2061
|
},
|
|
2058
2062
|
render(h) {
|
|
@@ -4,7 +4,8 @@ import { getConfig, getIcon, createEvent, globalEvents, globalMixins, globalResi
|
|
|
4
4
|
import { getSlotVNs } from '../../ui/src/vn';
|
|
5
5
|
import { toCssUnit, isScale, addClass, removeClass } from '../../ui/src/dom';
|
|
6
6
|
import { getGlobalDefaultConfig } from '../../ui/src/utils';
|
|
7
|
-
import {
|
|
7
|
+
import { createComponentLog } from '../../ui/src/log';
|
|
8
|
+
const { warnLog, errLog } = createComponentLog('splitter');
|
|
8
9
|
export default {
|
|
9
10
|
name: 'VxeSplitter',
|
|
10
11
|
mixins: [
|
|
@@ -150,11 +151,11 @@ export default {
|
|
|
150
151
|
}
|
|
151
152
|
reactData.itemList = reactData.staticItems || [];
|
|
152
153
|
if ((showPrevButton || showNextButton) && reactData.itemList.length > 2) {
|
|
153
|
-
errLog('vxe.error.modelConflicts', ['
|
|
154
|
+
errLog('vxe.error.modelConflicts', ['action-config.showPrevButton | action-config.showNextButton', '<vxe-splitter-panel ...> Only supports 2 panel']);
|
|
154
155
|
}
|
|
155
156
|
reactData.itemList.forEach(item => {
|
|
156
157
|
if (item.showAction) {
|
|
157
|
-
warnLog('vxe.error.removeProp', ['
|
|
158
|
+
warnLog('vxe.error.removeProp', ['show-action']);
|
|
158
159
|
}
|
|
159
160
|
});
|
|
160
161
|
$xeSplitter.recalculate();
|
|
@@ -213,7 +214,7 @@ export default {
|
|
|
213
214
|
XEUtils.each(item.slots, (func) => {
|
|
214
215
|
if (!XEUtils.isFunction(func)) {
|
|
215
216
|
if (!slots[func]) {
|
|
216
|
-
errLog('vxe.error.notSlot', [
|
|
217
|
+
errLog('vxe.error.notSlot', [func]);
|
|
217
218
|
}
|
|
218
219
|
}
|
|
219
220
|
});
|
|
@@ -982,7 +983,7 @@ export default {
|
|
|
982
983
|
}
|
|
983
984
|
const actionOpts = $xeSplitter.computeActionOpts;
|
|
984
985
|
if (actionOpts.direction) {
|
|
985
|
-
errLog('vxe.error.delProp', ['
|
|
986
|
+
errLog('vxe.error.delProp', ['action-config.direction', 'action-config.showPrevButton | action-config.showNextButton']);
|
|
986
987
|
}
|
|
987
988
|
$xeSplitter.$nextTick(() => {
|
|
988
989
|
$xeSplitter.recalculate();
|
|
@@ -4,11 +4,26 @@ import { VxeUI, getConfig, getIcon, globalEvents, getI18n, createEvent, renderEm
|
|
|
4
4
|
import { getEventTargetNode, updatePanelPlacement, toCssUnit } from '../../ui/src/dom';
|
|
5
5
|
import { getOnName } from '../../ui/src/vn';
|
|
6
6
|
import { getLastZIndex, nextZIndex } from '../../ui/src/utils';
|
|
7
|
-
import {
|
|
7
|
+
import { createComponentLog } from '../../ui/src/log';
|
|
8
8
|
import VxeInputComponent from '../../input/src/input';
|
|
9
|
+
const { errLog } = createComponentLog('table-select');
|
|
9
10
|
export function getRowUniqueId() {
|
|
10
11
|
return XEUtils.uniqueId('row_');
|
|
11
12
|
}
|
|
13
|
+
function createReactData() {
|
|
14
|
+
return {
|
|
15
|
+
initialized: false,
|
|
16
|
+
tableColumns: [],
|
|
17
|
+
fullOptionList: [],
|
|
18
|
+
panelIndex: 0,
|
|
19
|
+
panelStyle: {},
|
|
20
|
+
panelPlacement: null,
|
|
21
|
+
triggerFocusPanel: false,
|
|
22
|
+
visiblePanel: false,
|
|
23
|
+
isAniVisible: false,
|
|
24
|
+
isActivated: false
|
|
25
|
+
};
|
|
26
|
+
}
|
|
12
27
|
function createInternalData() {
|
|
13
28
|
return {
|
|
14
29
|
// hpTimeout: undefined,
|
|
@@ -90,26 +105,11 @@ export default {
|
|
|
90
105
|
},
|
|
91
106
|
data() {
|
|
92
107
|
const xID = XEUtils.uniqueId();
|
|
93
|
-
const reactData =
|
|
94
|
-
initialized: false,
|
|
95
|
-
tableColumns: [],
|
|
96
|
-
fullOptionList: [],
|
|
97
|
-
panelIndex: 0,
|
|
98
|
-
panelStyle: {},
|
|
99
|
-
panelPlacement: null,
|
|
100
|
-
triggerFocusPanel: false,
|
|
101
|
-
visiblePanel: false,
|
|
102
|
-
isAniVisible: false,
|
|
103
|
-
isActivated: false
|
|
104
|
-
};
|
|
105
|
-
const internalData = createInternalData();
|
|
108
|
+
const reactData = createReactData();
|
|
106
109
|
const gridEvents = {};
|
|
107
|
-
return {
|
|
108
|
-
xID,
|
|
110
|
+
return Object.assign(Object.assign({}, {}), { xID,
|
|
109
111
|
reactData,
|
|
110
|
-
|
|
111
|
-
gridEvents
|
|
112
|
-
};
|
|
112
|
+
gridEvents });
|
|
113
113
|
},
|
|
114
114
|
computed: Object.assign(Object.assign({}, {}), { computeFormReadonly() {
|
|
115
115
|
const $xeTableSelect = this;
|
|
@@ -390,12 +390,12 @@ export default {
|
|
|
390
390
|
rowid = getRowUniqueId();
|
|
391
391
|
}
|
|
392
392
|
if (keyMaps[rowid]) {
|
|
393
|
-
errLog('vxe.error.repeatKey', [
|
|
393
|
+
errLog('vxe.error.repeatKey', [rowKeyField, rowid]);
|
|
394
394
|
}
|
|
395
395
|
keyMaps[rowid] = true;
|
|
396
396
|
const value = item[valueField];
|
|
397
397
|
if (rowMaps[value]) {
|
|
398
|
-
errLog('vxe.error.repeatKey', [
|
|
398
|
+
errLog('vxe.error.repeatKey', [valueField, value]);
|
|
399
399
|
}
|
|
400
400
|
rowMaps[value] = { item, index, items, parent: null, nodes: [] };
|
|
401
401
|
});
|
|
@@ -781,6 +781,7 @@ export default {
|
|
|
781
781
|
created() {
|
|
782
782
|
const $xeTableSelect = this;
|
|
783
783
|
const props = $xeTableSelect;
|
|
784
|
+
$xeTableSelect.internalData = createInternalData();
|
|
784
785
|
const gridEventKeys = [
|
|
785
786
|
'form-submit',
|
|
786
787
|
'form-reset',
|
|
@@ -803,7 +804,7 @@ export default {
|
|
|
803
804
|
const VxeTableGridComponent = VxeUI.getComponent('vxe-grid');
|
|
804
805
|
$xeTableSelect.$nextTick(() => {
|
|
805
806
|
if (!VxeTableGridComponent) {
|
|
806
|
-
errLog('vxe.error.reqComp', ['
|
|
807
|
+
errLog('vxe.error.reqComp', ['vxe-grid']);
|
|
807
808
|
}
|
|
808
809
|
});
|
|
809
810
|
const { gridConfig } = props;
|
|
@@ -819,6 +820,8 @@ export default {
|
|
|
819
820
|
},
|
|
820
821
|
beforeDestroy() {
|
|
821
822
|
const $xeTableSelect = this;
|
|
823
|
+
const reactData = $xeTableSelect.reactData;
|
|
824
|
+
const internalData = $xeTableSelect.internalData;
|
|
822
825
|
const panelElem = $xeTableSelect.$refs.refOptionPanel;
|
|
823
826
|
if (panelElem && panelElem.parentNode) {
|
|
824
827
|
panelElem.parentNode.removeChild(panelElem);
|
|
@@ -827,6 +830,8 @@ export default {
|
|
|
827
830
|
globalEvents.off($xeTableSelect, 'mousedown');
|
|
828
831
|
globalEvents.off($xeTableSelect, 'blur');
|
|
829
832
|
globalEvents.off($xeTableSelect, 'resize');
|
|
833
|
+
XEUtils.assign(reactData, createReactData());
|
|
834
|
+
XEUtils.assign(internalData, createInternalData());
|
|
830
835
|
},
|
|
831
836
|
render(h) {
|
|
832
837
|
return this.renderVN(h);
|