vxe-pc-ui 3.15.1 → 3.15.3
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 +5 -7
- 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 -4
- package/es/date-picker/src/date-picker.js +656 -57
- package/es/date-range-picker/src/date-range-picker.js +23 -8
- 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/number-input/src/number-input.js +2 -3
- 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 +12 -6
- 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 +5 -7
- package/es/ui/index.js +1 -1
- package/es/ui/src/log.js +7 -1
- 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 +7 -6
- 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 -5
- package/lib/date-panel/src/util.min.js +1 -1
- package/lib/date-picker/src/date-picker.js +698 -55
- package/lib/date-picker/src/date-picker.min.js +1 -1
- package/lib/date-range-picker/src/date-range-picker.js +21 -7
- 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 +1051 -217
- 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/number-input/src/number-input.js +2 -3
- 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 +15 -7
- 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 +10 -8
- package/lib/tree-select/src/tree-select.min.js +1 -1
- package/lib/ui/index.js +1 -1
- package/lib/ui/index.min.js +1 -1
- package/lib/ui/src/log.js +8 -1
- 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 +9 -4
- 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 -3
- package/packages/date-picker/src/date-picker.ts +673 -60
- package/packages/date-range-picker/src/date-range-picker.ts +22 -8
- 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/number-input/src/number-input.ts +2 -6
- 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 +13 -6
- 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 +9 -4
- package/packages/ui/src/log.ts +7 -0
- package/packages/upload/src/upload.ts +16 -6
- package/types/components/date-picker.d.ts +27 -1
- package/types/components/date-range-picker.d.ts +4 -0
- package/types/components/drawer.d.ts +2 -0
- package/types/components/modal.d.ts +2 -0
- package/types/components/splitter.d.ts +1 -0
- package/types/components/table.d.ts +33 -4
- package/types/components/upload.d.ts +28 -1
- /package/es/icon/{iconfont.1781675403709.ttf → iconfont.1781852732213.ttf} +0 -0
- /package/es/icon/{iconfont.1781675403709.woff → iconfont.1781852732213.woff} +0 -0
- /package/es/icon/{iconfont.1781675403709.woff2 → iconfont.1781852732213.woff2} +0 -0
- /package/es/{iconfont.1781675403709.ttf → iconfont.1781852732213.ttf} +0 -0
- /package/es/{iconfont.1781675403709.woff → iconfont.1781852732213.woff} +0 -0
- /package/es/{iconfont.1781675403709.woff2 → iconfont.1781852732213.woff2} +0 -0
- /package/lib/icon/style/{iconfont.1781675403709.ttf → iconfont.1781852732213.ttf} +0 -0
- /package/lib/icon/style/{iconfont.1781675403709.woff → iconfont.1781852732213.woff} +0 -0
- /package/lib/icon/style/{iconfont.1781675403709.woff2 → iconfont.1781852732213.woff2} +0 -0
- /package/lib/{iconfont.1781675403709.ttf → iconfont.1781852732213.ttf} +0 -0
- /package/lib/{iconfont.1781675403709.woff → iconfont.1781852732213.woff} +0 -0
- /package/lib/{iconfont.1781675403709.woff2 → iconfont.1781852732213.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: [
|
|
@@ -533,6 +534,9 @@ export default {
|
|
|
533
534
|
if (!trigger || trigger === 'default') {
|
|
534
535
|
$xeDateRangePicker.dateRangePickerOpenEvent(evnt);
|
|
535
536
|
}
|
|
537
|
+
else if (trigger === 'icon') {
|
|
538
|
+
$xeDateRangePicker.hidePanel();
|
|
539
|
+
}
|
|
536
540
|
$xeDateRangePicker.triggerEvent(evnt);
|
|
537
541
|
},
|
|
538
542
|
clickPrefixEvent(evnt) {
|
|
@@ -891,6 +895,9 @@ export default {
|
|
|
891
895
|
const { panelIndex } = reactData;
|
|
892
896
|
const targetElem = $xeDateRangePicker.$refs.refInputTarget;
|
|
893
897
|
const panelElem = $xeDateRangePicker.$refs.refInputPanel;
|
|
898
|
+
if (!panelElem) {
|
|
899
|
+
return $xeDateRangePicker.$nextTick();
|
|
900
|
+
}
|
|
894
901
|
const btnTransfer = $xeDateRangePicker.computeBtnTransfer;
|
|
895
902
|
const popupOpts = $xeDateRangePicker.computePopupOpts;
|
|
896
903
|
const handleStyle = () => {
|
|
@@ -919,10 +926,8 @@ export default {
|
|
|
919
926
|
if (!isDisabled && !visiblePanel) {
|
|
920
927
|
if (!reactData.initialized) {
|
|
921
928
|
reactData.initialized = true;
|
|
922
|
-
if (btnTransfer) {
|
|
923
|
-
|
|
924
|
-
document.body.appendChild(panelElem);
|
|
925
|
-
}
|
|
929
|
+
if (btnTransfer && panelElem) {
|
|
930
|
+
document.body.appendChild(panelElem);
|
|
926
931
|
}
|
|
927
932
|
}
|
|
928
933
|
if (internalData.hpTimeout) {
|
|
@@ -951,10 +956,17 @@ export default {
|
|
|
951
956
|
},
|
|
952
957
|
clickIconEvent(evnt) {
|
|
953
958
|
const $xeDateRangePicker = this;
|
|
959
|
+
const reactData = $xeDateRangePicker.reactData;
|
|
960
|
+
const { visiblePanel } = reactData;
|
|
954
961
|
const popupOpts = $xeDateRangePicker.computePopupOpts;
|
|
955
962
|
const { trigger } = popupOpts;
|
|
956
963
|
if (!trigger || trigger === 'default' || trigger === 'icon') {
|
|
957
|
-
|
|
964
|
+
if (visiblePanel) {
|
|
965
|
+
$xeDateRangePicker.hidePanel();
|
|
966
|
+
}
|
|
967
|
+
else {
|
|
968
|
+
$xeDateRangePicker.dateRangePickerOpenEvent(evnt);
|
|
969
|
+
}
|
|
958
970
|
}
|
|
959
971
|
},
|
|
960
972
|
clickEvent(evnt) {
|
|
@@ -1011,7 +1023,7 @@ export default {
|
|
|
1011
1023
|
break;
|
|
1012
1024
|
}
|
|
1013
1025
|
default:
|
|
1014
|
-
errLog('vxe.error.notCommands', [
|
|
1026
|
+
errLog('vxe.error.notCommands', [code]);
|
|
1015
1027
|
break;
|
|
1016
1028
|
}
|
|
1017
1029
|
}
|
|
@@ -1095,6 +1107,10 @@ export default {
|
|
|
1095
1107
|
const props = $xeDateRangePicker;
|
|
1096
1108
|
const slots = $xeDateRangePicker.$scopedSlots;
|
|
1097
1109
|
const reactData = $xeDateRangePicker.reactData;
|
|
1110
|
+
const popupOpts = $xeDateRangePicker.computePopupOpts;
|
|
1111
|
+
if (popupOpts.enabled === false) {
|
|
1112
|
+
return renderEmptyElement($xeDateRangePicker);
|
|
1113
|
+
}
|
|
1098
1114
|
const { type, separator, autoClose, showConfirmButton, showClearButton } = props;
|
|
1099
1115
|
const { initialized, isAniVisible, visiblePanel, panelPlacement, panelStyle, startValue, endValue } = reactData;
|
|
1100
1116
|
const vSize = $xeDateRangePicker.computeSize;
|
|
@@ -1107,7 +1123,6 @@ export default {
|
|
|
1107
1123
|
const defaultDates = $xeDateRangePicker.computeDefaultDates;
|
|
1108
1124
|
const defaultTimes = $xeDateRangePicker.computeDefaultTimes;
|
|
1109
1125
|
const timeOpts = $xeDateRangePicker.computeTimeOpts;
|
|
1110
|
-
const popupOpts = $xeDateRangePicker.computePopupOpts;
|
|
1111
1126
|
const { startLabel, endLabel } = panelLabelObj;
|
|
1112
1127
|
const { position } = shortcutOpts;
|
|
1113
1128
|
const headerSlot = slots.header;
|
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']);
|
|
@@ -59,7 +59,6 @@ export default {
|
|
|
59
59
|
type: String,
|
|
60
60
|
default: () => getConfig().numberInput.size || getConfig().size
|
|
61
61
|
},
|
|
62
|
-
// number、integer、float
|
|
63
62
|
min: {
|
|
64
63
|
type: [String, Number],
|
|
65
64
|
default: null
|
|
@@ -82,12 +81,12 @@ export default {
|
|
|
82
81
|
default: () => getConfig().numberInput.currencySymbol
|
|
83
82
|
},
|
|
84
83
|
controlConfig: Object,
|
|
85
|
-
// float
|
|
84
|
+
// number、float、amount
|
|
86
85
|
roundingMode: {
|
|
87
86
|
type: String,
|
|
88
87
|
default: () => getConfig().numberInput.roundingMode
|
|
89
88
|
},
|
|
90
|
-
// float
|
|
89
|
+
// float、amount
|
|
91
90
|
digits: {
|
|
92
91
|
type: [String, Number],
|
|
93
92
|
default: null
|
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: [
|
|
@@ -45,7 +46,8 @@ export default {
|
|
|
45
46
|
staticItems: [],
|
|
46
47
|
itemList: [],
|
|
47
48
|
barWidth: 0,
|
|
48
|
-
barHeight: 0
|
|
49
|
+
barHeight: 0,
|
|
50
|
+
resizeFlag: 0
|
|
49
51
|
};
|
|
50
52
|
const internalData = {
|
|
51
53
|
wrapperWidth: 0,
|
|
@@ -149,11 +151,11 @@ export default {
|
|
|
149
151
|
}
|
|
150
152
|
reactData.itemList = reactData.staticItems || [];
|
|
151
153
|
if ((showPrevButton || showNextButton) && reactData.itemList.length > 2) {
|
|
152
|
-
errLog('vxe.error.modelConflicts', ['
|
|
154
|
+
errLog('vxe.error.modelConflicts', ['action-config.showPrevButton | action-config.showNextButton', '<vxe-splitter-panel ...> Only supports 2 panel']);
|
|
153
155
|
}
|
|
154
156
|
reactData.itemList.forEach(item => {
|
|
155
157
|
if (item.showAction) {
|
|
156
|
-
warnLog('vxe.error.removeProp', ['
|
|
158
|
+
warnLog('vxe.error.removeProp', ['show-action']);
|
|
157
159
|
}
|
|
158
160
|
});
|
|
159
161
|
$xeSplitter.recalculate();
|
|
@@ -212,7 +214,7 @@ export default {
|
|
|
212
214
|
XEUtils.each(item.slots, (func) => {
|
|
213
215
|
if (!XEUtils.isFunction(func)) {
|
|
214
216
|
if (!slots[func]) {
|
|
215
|
-
errLog('vxe.error.notSlot', [
|
|
217
|
+
errLog('vxe.error.notSlot', [func]);
|
|
216
218
|
}
|
|
217
219
|
}
|
|
218
220
|
});
|
|
@@ -572,6 +574,7 @@ export default {
|
|
|
572
574
|
document.onmousemove = (evnt) => {
|
|
573
575
|
evnt.preventDefault();
|
|
574
576
|
handleDrag(evnt);
|
|
577
|
+
reactData.resizeFlag++;
|
|
575
578
|
};
|
|
576
579
|
document.onmouseup = (evnt) => {
|
|
577
580
|
document.onmousemove = null;
|
|
@@ -583,6 +586,7 @@ export default {
|
|
|
583
586
|
removeClass(el, 'is--drag');
|
|
584
587
|
$xeSplitter.dispatchEvent('resize-end', { prevItem, nextItem, offsetHeight: targetOffsetHeight, offsetWidth: targetOffsetWidth }, evnt);
|
|
585
588
|
$xeSplitter.recalculate();
|
|
589
|
+
reactData.resizeFlag++;
|
|
586
590
|
};
|
|
587
591
|
if (rsSplitterLineEl) {
|
|
588
592
|
rsSplitterLineEl.style.display = 'block';
|
|
@@ -595,6 +599,7 @@ export default {
|
|
|
595
599
|
handleItemActionEvent(evnt, prevItem, nextItem, isNext) {
|
|
596
600
|
const $xeSplitter = this;
|
|
597
601
|
const props = $xeSplitter;
|
|
602
|
+
const reactData = $xeSplitter.reactData;
|
|
598
603
|
const { vertical } = props;
|
|
599
604
|
let expanded = false;
|
|
600
605
|
let item = prevItem;
|
|
@@ -639,6 +644,7 @@ export default {
|
|
|
639
644
|
$xeSplitter.dispatchEvent('toggle-expand', { prevItem, nextItem, expanded, item }, evnt);
|
|
640
645
|
}
|
|
641
646
|
$xeSplitter.recalculate();
|
|
647
|
+
reactData.resizeFlag++;
|
|
642
648
|
},
|
|
643
649
|
handlePrevActionDblclickEvent(evnt) {
|
|
644
650
|
const $xeSplitter = this;
|
|
@@ -977,7 +983,7 @@ export default {
|
|
|
977
983
|
}
|
|
978
984
|
const actionOpts = $xeSplitter.computeActionOpts;
|
|
979
985
|
if (actionOpts.direction) {
|
|
980
|
-
errLog('vxe.error.delProp', ['
|
|
986
|
+
errLog('vxe.error.delProp', ['action-config.direction', 'action-config.showPrevButton | action-config.showNextButton']);
|
|
981
987
|
}
|
|
982
988
|
$xeSplitter.$nextTick(() => {
|
|
983
989
|
$xeSplitter.recalculate();
|