vxe-pc-ui 4.15.2 → 4.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/dist/all.esm.js +866 -257
- package/es/backtop/src/backtop.js +2 -1
- package/es/button/src/button.js +3 -2
- package/es/calendar/src/calendar.js +2 -1
- package/es/cascader/src/cascader.js +72 -29
- package/es/checkbox/src/group.js +5 -1
- package/es/date-panel/src/util.js +27 -16
- package/es/date-picker/src/date-picker.js +572 -74
- package/es/date-range-picker/src/date-range-picker.js +3 -2
- package/es/drawer/src/drawer.js +2 -0
- package/es/form/render/index.js +3 -2
- package/es/form/src/form.js +6 -5
- package/es/form/src/itemInfo.js +6 -5
- package/es/input/src/input.js +2 -1
- package/es/menu/src/menu.js +2 -1
- package/es/modal/src/modal.js +5 -2
- package/es/pager/src/pager.js +4 -3
- package/es/radio/src/group.js +5 -1
- package/es/select/src/select.js +25 -20
- package/es/splitter/src/splitter.js +7 -6
- package/es/table-select/src/table-select.js +21 -16
- package/es/tabs/src/tabs.js +4 -3
- package/es/textarea/src/textarea.js +2 -1
- package/es/tree/src/tree.js +3 -2
- package/es/tree-select/src/tree-select.js +16 -19
- package/es/ui/index.js +4 -1
- package/es/ui/src/log.js +14 -4
- package/es/upload/src/upload.js +12 -3
- package/lib/backtop/src/backtop.js +5 -2
- package/lib/backtop/src/backtop.min.js +1 -1
- package/lib/button/src/button.js +4 -1
- package/lib/button/src/button.min.js +1 -1
- package/lib/calendar/src/calendar.js +4 -1
- package/lib/calendar/src/calendar.min.js +1 -1
- package/lib/cascader/src/cascader.js +80 -30
- package/lib/cascader/src/cascader.min.js +1 -1
- package/lib/checkbox/src/group.js +5 -1
- package/lib/checkbox/src/group.min.js +1 -1
- package/lib/date-panel/src/util.js +37 -19
- package/lib/date-panel/src/util.min.js +1 -1
- package/lib/date-picker/src/date-picker.js +620 -77
- package/lib/date-picker/src/date-picker.min.js +1 -1
- package/lib/date-range-picker/src/date-range-picker.js +4 -1
- package/lib/date-range-picker/src/date-range-picker.min.js +1 -1
- package/lib/drawer/src/drawer.js +2 -0
- package/lib/drawer/src/drawer.min.js +1 -1
- package/lib/form/render/index.js +4 -1
- package/lib/form/render/index.min.js +1 -1
- package/lib/form/src/form.js +8 -4
- package/lib/form/src/form.min.js +1 -1
- package/lib/form/src/itemInfo.js +7 -4
- package/lib/form/src/itemInfo.min.js +1 -1
- package/lib/index.umd.js +941 -215
- package/lib/index.umd.min.js +1 -1
- package/lib/input/src/input.js +6 -3
- package/lib/input/src/input.min.js +1 -1
- package/lib/menu/src/menu.js +4 -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 +6 -2
- package/lib/pager/src/pager.min.js +1 -1
- package/lib/radio/src/group.js +5 -1
- package/lib/radio/src/group.min.js +1 -1
- package/lib/select/src/select.js +27 -20
- package/lib/select/src/select.min.js +1 -1
- package/lib/splitter/src/splitter.js +12 -8
- package/lib/splitter/src/splitter.min.js +1 -1
- package/lib/table-select/src/table-select.js +22 -15
- package/lib/table-select/src/table-select.min.js +1 -1
- package/lib/tabs/src/tabs.js +7 -3
- package/lib/tabs/src/tabs.min.js +1 -1
- package/lib/textarea/src/textarea.js +4 -1
- package/lib/textarea/src/textarea.min.js +1 -1
- package/lib/tree/src/tree.js +7 -4
- package/lib/tree/src/tree.min.js +1 -1
- package/lib/tree-select/src/tree-select.js +14 -10
- 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 +16 -3
- package/lib/ui/src/log.min.js +1 -1
- package/lib/upload/src/upload.js +20 -3
- package/lib/upload/src/upload.min.js +1 -1
- package/package.json +1 -1
- package/packages/backtop/src/backtop.ts +3 -1
- package/packages/button/src/button.ts +4 -2
- package/packages/calendar/src/calendar.ts +3 -1
- package/packages/cascader/src/cascader.ts +71 -29
- package/packages/checkbox/src/group.ts +6 -2
- package/packages/date-panel/src/util.ts +28 -16
- package/packages/date-picker/src/date-picker.ts +583 -75
- package/packages/date-range-picker/src/date-range-picker.ts +4 -2
- package/packages/drawer/src/drawer.ts +2 -0
- package/packages/form/render/index.ts +4 -2
- package/packages/form/src/form.ts +7 -5
- package/packages/form/src/itemInfo.ts +7 -5
- package/packages/input/src/input.ts +3 -1
- package/packages/menu/src/menu.ts +3 -1
- package/packages/modal/src/modal.ts +6 -2
- package/packages/pager/src/pager.ts +5 -3
- package/packages/radio/src/group.ts +6 -2
- package/packages/select/src/select.ts +29 -22
- package/packages/splitter/src/splitter.ts +8 -6
- package/packages/table-select/src/table-select.ts +24 -17
- package/packages/tabs/src/tabs.ts +5 -3
- package/packages/textarea/src/textarea.ts +3 -1
- package/packages/tree/src/tree.ts +4 -2
- package/packages/tree-select/src/tree-select.ts +17 -19
- package/packages/ui/index.ts +3 -0
- package/packages/ui/src/log.ts +16 -4
- package/packages/upload/src/upload.ts +14 -3
- 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.1781753592499.ttf → iconfont.1781876596706.ttf} +0 -0
- /package/es/icon/{iconfont.1781753592499.woff → iconfont.1781876596706.woff} +0 -0
- /package/es/icon/{iconfont.1781753592499.woff2 → iconfont.1781876596706.woff2} +0 -0
- /package/es/{iconfont.1781753592499.ttf → iconfont.1781876596706.ttf} +0 -0
- /package/es/{iconfont.1781753592499.woff → iconfont.1781876596706.woff} +0 -0
- /package/es/{iconfont.1781753592499.woff2 → iconfont.1781876596706.woff2} +0 -0
- /package/lib/icon/style/{iconfont.1781753592499.ttf → iconfont.1781876596706.ttf} +0 -0
- /package/lib/icon/style/{iconfont.1781753592499.woff → iconfont.1781876596706.woff} +0 -0
- /package/lib/icon/style/{iconfont.1781753592499.woff2 → iconfont.1781876596706.woff2} +0 -0
- /package/lib/{iconfont.1781753592499.ttf → iconfont.1781876596706.ttf} +0 -0
- /package/lib/{iconfont.1781753592499.woff → iconfont.1781876596706.woff} +0 -0
- /package/lib/{iconfont.1781753592499.woff2 → iconfont.1781876596706.woff2} +0 -0
|
@@ -6,10 +6,11 @@ import { getFuncText, getLastZIndex, nextZIndex, isEnableConf } from '../../ui/s
|
|
|
6
6
|
import { updatePanelPlacement, getEventTargetNode } from '../../ui/src/dom';
|
|
7
7
|
import { parseDateString, parseDateObj, getRangeDateByCode, handleValueFormat } from '../../date-panel/src/util';
|
|
8
8
|
import { getSlotVNs } from '../../ui/src/vn';
|
|
9
|
-
import {
|
|
9
|
+
import { createComponentLog } from '../../ui/src/log';
|
|
10
10
|
import VxeDatePanelComponent from '../../date-panel/src/date-panel';
|
|
11
11
|
import VxeButtonComponent from '../../button/src/button';
|
|
12
12
|
import VxeButtonGroupComponent from '../../button/src/button-group';
|
|
13
|
+
const { errLog } = createComponentLog('date-range-picker');
|
|
13
14
|
export default defineVxeComponent({
|
|
14
15
|
name: 'VxeDateRangePicker',
|
|
15
16
|
props: {
|
|
@@ -887,7 +888,7 @@ export default defineVxeComponent({
|
|
|
887
888
|
break;
|
|
888
889
|
}
|
|
889
890
|
default:
|
|
890
|
-
errLog('vxe.error.notCommands', [
|
|
891
|
+
errLog('vxe.error.notCommands', [code]);
|
|
891
892
|
break;
|
|
892
893
|
}
|
|
893
894
|
}
|
package/es/drawer/src/drawer.js
CHANGED
|
@@ -89,6 +89,7 @@ export default defineVxeComponent({
|
|
|
89
89
|
type: Boolean,
|
|
90
90
|
default: () => getConfig().drawer.showTitleOverflow
|
|
91
91
|
},
|
|
92
|
+
preload: Boolean,
|
|
92
93
|
width: [Number, String],
|
|
93
94
|
height: [Number, String],
|
|
94
95
|
resize: {
|
|
@@ -595,6 +596,7 @@ export default defineVxeComponent({
|
|
|
595
596
|
}
|
|
596
597
|
});
|
|
597
598
|
onMounted(() => {
|
|
599
|
+
reactData.initialized = !!props.preload;
|
|
598
600
|
nextTick(() => {
|
|
599
601
|
if (props.modelValue) {
|
|
600
602
|
openDrawer();
|
package/es/form/render/index.js
CHANGED
|
@@ -2,7 +2,8 @@ import { h, resolveComponent } from 'vue';
|
|
|
2
2
|
import XEUtils from 'xe-utils';
|
|
3
3
|
import { renderer, getComponent } from '../../ui';
|
|
4
4
|
import { getOnName, getModelEvent, getChangeEvent } from '../../ui/src/vn';
|
|
5
|
-
import {
|
|
5
|
+
import { createComponentLog } from '../../ui/src/log';
|
|
6
|
+
const { errLog } = createComponentLog('form');
|
|
6
7
|
const componentDefaultModelProp = 'modelValue';
|
|
7
8
|
/**
|
|
8
9
|
* 已废弃
|
|
@@ -89,7 +90,7 @@ function getComponentOns(renderOpts, params, eFns, eventOns) {
|
|
|
89
90
|
XEUtils.objectEach(events, (func, key) => {
|
|
90
91
|
ons[getOnName(key)] = function (...args) {
|
|
91
92
|
if (!XEUtils.isFunction(func)) {
|
|
92
|
-
errLog('vxe.error.errFunc', [
|
|
93
|
+
errLog('vxe.error.errFunc', [func]);
|
|
93
94
|
}
|
|
94
95
|
func(params, ...args);
|
|
95
96
|
};
|
package/es/form/src/form.js
CHANGED
|
@@ -9,8 +9,9 @@ import VxeTooltipComponent from '../../tooltip';
|
|
|
9
9
|
import VxeFormConfigItem from './form-config-item';
|
|
10
10
|
import VxeLoadingComponent from '../../loading';
|
|
11
11
|
import { getSlotVNs } from '../../ui/src/vn';
|
|
12
|
-
import {
|
|
12
|
+
import { createComponentLog } from '../../ui/src/log';
|
|
13
13
|
import '../render';
|
|
14
|
+
const { warnLog, errLog } = createComponentLog('form');
|
|
14
15
|
class Rule {
|
|
15
16
|
constructor(rule) {
|
|
16
17
|
Object.assign(this, {
|
|
@@ -319,7 +320,7 @@ export default defineVxeComponent({
|
|
|
319
320
|
XEUtils.each(item.slots, (func) => {
|
|
320
321
|
if (!XEUtils.isFunction(func)) {
|
|
321
322
|
if (!slots[func]) {
|
|
322
|
-
errLog('vxe.error.notSlot', [
|
|
323
|
+
errLog('vxe.error.notSlot', [func]);
|
|
323
324
|
}
|
|
324
325
|
}
|
|
325
326
|
});
|
|
@@ -542,11 +543,11 @@ export default defineVxeComponent({
|
|
|
542
543
|
customValid = validatorMethod(validParams);
|
|
543
544
|
}
|
|
544
545
|
else {
|
|
545
|
-
warnLog('vxe.error.notValidators', [
|
|
546
|
+
warnLog('vxe.error.notValidators', [validator]);
|
|
546
547
|
}
|
|
547
548
|
}
|
|
548
549
|
else {
|
|
549
|
-
errLog('vxe.error.notValidators', [
|
|
550
|
+
errLog('vxe.error.notValidators', [validator]);
|
|
550
551
|
}
|
|
551
552
|
}
|
|
552
553
|
else {
|
|
@@ -936,7 +937,7 @@ export default defineVxeComponent({
|
|
|
936
937
|
onMounted(() => {
|
|
937
938
|
nextTick(() => {
|
|
938
939
|
if (props.customLayout && props.items) {
|
|
939
|
-
errLog('vxe.error.errConflicts', ['
|
|
940
|
+
errLog('vxe.error.errConflicts', ['custom-layout', 'items']);
|
|
940
941
|
}
|
|
941
942
|
});
|
|
942
943
|
globalEvents.on($xeForm, 'resize', handleGlobalResizeEvent);
|
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/input/src/input.js
CHANGED
|
@@ -7,7 +7,8 @@ import { hasClass, getAbsolutePos, getEventTargetNode, hasControlKey } from '../
|
|
|
7
7
|
import { toStringTimeDate, getDateQuarter } from '../../date-panel/src/util';
|
|
8
8
|
import { handleNumber, toFloatValueFixed } from '../../number-input/src/util';
|
|
9
9
|
import { getSlotVNs } from '../../ui/src/vn';
|
|
10
|
-
import {
|
|
10
|
+
import { createComponentLog } from '../../ui/src/log';
|
|
11
|
+
const { warnLog } = createComponentLog('input');
|
|
11
12
|
export default defineVxeComponent({
|
|
12
13
|
name: 'VxeInput',
|
|
13
14
|
props: {
|
package/es/menu/src/menu.js
CHANGED
|
@@ -5,8 +5,9 @@ import { VxeUI, createEvent, permission, useSize, globalEvents, renderEmptyEleme
|
|
|
5
5
|
import { toCssUnit } from '../../ui/src/dom';
|
|
6
6
|
import { getLastZIndex, nextZIndex, isEnableConf } from '../../ui/src/utils';
|
|
7
7
|
import { getSlotVNs } from '../../ui/src/vn';
|
|
8
|
-
import {
|
|
8
|
+
import { createComponentLog } from '../../ui/src/log';
|
|
9
9
|
import VxeLoadingComponent from '../../loading';
|
|
10
|
+
const { errLog } = createComponentLog('menu');
|
|
10
11
|
const { menus, getConfig, getIcon } = VxeUI;
|
|
11
12
|
export default defineVxeComponent({
|
|
12
13
|
name: 'VxeMenu',
|
package/es/modal/src/modal.js
CHANGED
|
@@ -7,7 +7,8 @@ import { VxeUI, getConfig, getIcon, getI18n, globalEvents, GLOBAL_EVENT_KEYS, cr
|
|
|
7
7
|
import VxeButtonComponent from '../../button/src/button';
|
|
8
8
|
import VxeLoadingComponent from '../../loading/index';
|
|
9
9
|
import { getSlotVNs } from '../../ui/src/vn';
|
|
10
|
-
import {
|
|
10
|
+
import { createComponentLog } from '../../ui/src/log';
|
|
11
|
+
const { warnLog, errLog } = createComponentLog('modal');
|
|
11
12
|
export const allActiveModals = [];
|
|
12
13
|
const msgQueue = [];
|
|
13
14
|
const notifyQueue = [];
|
|
@@ -94,6 +95,7 @@ export default defineVxeComponent({
|
|
|
94
95
|
type: Boolean,
|
|
95
96
|
default: () => getConfig().modal.showFooter
|
|
96
97
|
},
|
|
98
|
+
preload: Boolean,
|
|
97
99
|
showZoom: Boolean,
|
|
98
100
|
zoomConfig: Object,
|
|
99
101
|
showMaximize: {
|
|
@@ -1395,9 +1397,10 @@ export default defineVxeComponent({
|
|
|
1395
1397
|
if (props.type === 'modal' && props.showFooter && !(props.showConfirmButton || props.showCancelButton || slots.footer)) {
|
|
1396
1398
|
warnLog('vxe.modal.footPropErr');
|
|
1397
1399
|
}
|
|
1400
|
+
reactData.initialized = !!props.preload;
|
|
1398
1401
|
nextTick(() => {
|
|
1399
1402
|
if (props.storage && !props.id) {
|
|
1400
|
-
errLog('vxe.error.reqProp', ['
|
|
1403
|
+
errLog('vxe.error.reqProp', ['id']);
|
|
1401
1404
|
}
|
|
1402
1405
|
if (props.modelValue) {
|
|
1403
1406
|
openModal();
|
package/es/pager/src/pager.js
CHANGED
|
@@ -2,9 +2,10 @@ import { h, computed, inject, ref, reactive, nextTick, watch } from 'vue';
|
|
|
2
2
|
import { defineVxeComponent } from '../../ui/src/comp';
|
|
3
3
|
import XEUtils from 'xe-utils';
|
|
4
4
|
import { getIcon, getConfig, getI18n, globalEvents, GLOBAL_EVENT_KEYS, createEvent, useSize } from '../../ui';
|
|
5
|
-
import {
|
|
5
|
+
import { createComponentLog } from '../../ui/src/log';
|
|
6
6
|
import VxeSelectComponent from '../../select/src/select';
|
|
7
7
|
import VxeNumberInputComponent from '../../number-input/src/number-input';
|
|
8
|
+
const { warnLog, errLog } = createComponentLog('pager');
|
|
8
9
|
export default defineVxeComponent({
|
|
9
10
|
name: 'VxePager',
|
|
10
11
|
props: {
|
|
@@ -606,7 +607,7 @@ export default defineVxeComponent({
|
|
|
606
607
|
* @deprecated
|
|
607
608
|
*/
|
|
608
609
|
jumpPage(currentPage) {
|
|
609
|
-
warnLog('vxe.error.delFunc', ['
|
|
610
|
+
warnLog('vxe.error.delFunc', ['jumpPage', 'setCurrentPage']);
|
|
610
611
|
return $xePager.setCurrentPage(currentPage);
|
|
611
612
|
}
|
|
612
613
|
};
|
|
@@ -677,7 +678,7 @@ export default defineVxeComponent({
|
|
|
677
678
|
childNodes.push(renderFn());
|
|
678
679
|
}
|
|
679
680
|
else {
|
|
680
|
-
errLog('vxe.error.notProp', [`
|
|
681
|
+
errLog('vxe.error.notProp', [`layouts -> ${name}`]);
|
|
681
682
|
}
|
|
682
683
|
});
|
|
683
684
|
if (slots.right) {
|
package/es/radio/src/group.js
CHANGED
|
@@ -4,6 +4,9 @@ import XEUtils from 'xe-utils';
|
|
|
4
4
|
import { getConfig, createEvent, useSize } from '../../ui';
|
|
5
5
|
import VxeRadioComponent from './radio';
|
|
6
6
|
import VxeRadioButtonComponent from './button';
|
|
7
|
+
function createReactData() {
|
|
8
|
+
return {};
|
|
9
|
+
}
|
|
7
10
|
function createInternalData() {
|
|
8
11
|
return {
|
|
9
12
|
// isLoaded: false
|
|
@@ -45,7 +48,7 @@ export default defineVxeComponent({
|
|
|
45
48
|
const formItemInfo = inject('xeFormItemInfo', null);
|
|
46
49
|
const xID = XEUtils.uniqueId();
|
|
47
50
|
const { computeSize } = useSize(props);
|
|
48
|
-
const reactData = reactive(
|
|
51
|
+
const reactData = reactive(createReactData());
|
|
49
52
|
const internalData = createInternalData();
|
|
50
53
|
const computeIsReadonly = computed(() => {
|
|
51
54
|
const { readonly } = props;
|
|
@@ -182,6 +185,7 @@ export default defineVxeComponent({
|
|
|
182
185
|
});
|
|
183
186
|
});
|
|
184
187
|
onUnmounted(() => {
|
|
188
|
+
XEUtils.assign(reactData, createReactData());
|
|
185
189
|
XEUtils.assign(internalData, createInternalData());
|
|
186
190
|
});
|
|
187
191
|
provide('$xeRadioGroup', $xeRadioGroup);
|
package/es/select/src/select.js
CHANGED
|
@@ -5,15 +5,37 @@ import { VxeUI, getConfig, getIcon, getI18n, globalEvents, GLOBAL_EVENT_KEYS, cr
|
|
|
5
5
|
import { getEventTargetNode, toCssUnit, updatePanelPlacement } from '../../ui/src/dom';
|
|
6
6
|
import { getLastZIndex, nextZIndex, getFuncText, eqEmptyValue } from '../../ui/src/utils';
|
|
7
7
|
import { getSlotVNs } from '../../ui/src/vn';
|
|
8
|
-
import {
|
|
8
|
+
import { createComponentLog } from '../../ui/src/log';
|
|
9
9
|
import VxeInputComponent from '../../input/src/input';
|
|
10
10
|
import VxeButtonComponent from '../../button/src/button';
|
|
11
|
+
const { errLog } = createComponentLog('select');
|
|
11
12
|
function isOptionVisible(option) {
|
|
12
13
|
return option.visible !== false;
|
|
13
14
|
}
|
|
14
15
|
function getOptUniqueId() {
|
|
15
16
|
return XEUtils.uniqueId('opt_');
|
|
16
17
|
}
|
|
18
|
+
function createReactData() {
|
|
19
|
+
return {
|
|
20
|
+
initialized: false,
|
|
21
|
+
scrollYLoad: false,
|
|
22
|
+
bodyHeight: 0,
|
|
23
|
+
topSpaceHeight: 0,
|
|
24
|
+
optList: [],
|
|
25
|
+
staticOptions: [],
|
|
26
|
+
reactFlag: 0,
|
|
27
|
+
currentOption: null,
|
|
28
|
+
searchValue: '',
|
|
29
|
+
searchLoading: false,
|
|
30
|
+
panelIndex: 0,
|
|
31
|
+
panelStyle: {},
|
|
32
|
+
panelPlacement: null,
|
|
33
|
+
triggerFocusPanel: false,
|
|
34
|
+
visiblePanel: false,
|
|
35
|
+
isAniVisible: false,
|
|
36
|
+
isActivated: false
|
|
37
|
+
};
|
|
38
|
+
}
|
|
17
39
|
function createInternalData() {
|
|
18
40
|
return {
|
|
19
41
|
// isLoaded: false,
|
|
@@ -189,25 +211,7 @@ export default defineVxeComponent({
|
|
|
189
211
|
const refOptionPanel = ref();
|
|
190
212
|
const refVirtualBody = ref();
|
|
191
213
|
const { computeSize } = useSize(props);
|
|
192
|
-
const reactData = reactive(
|
|
193
|
-
initialized: false,
|
|
194
|
-
scrollYLoad: false,
|
|
195
|
-
bodyHeight: 0,
|
|
196
|
-
topSpaceHeight: 0,
|
|
197
|
-
optList: [],
|
|
198
|
-
staticOptions: [],
|
|
199
|
-
reactFlag: 0,
|
|
200
|
-
currentOption: null,
|
|
201
|
-
searchValue: '',
|
|
202
|
-
searchLoading: false,
|
|
203
|
-
panelIndex: 0,
|
|
204
|
-
panelStyle: {},
|
|
205
|
-
panelPlacement: null,
|
|
206
|
-
triggerFocusPanel: false,
|
|
207
|
-
visiblePanel: false,
|
|
208
|
-
isAniVisible: false,
|
|
209
|
-
isActivated: false
|
|
210
|
-
});
|
|
214
|
+
const reactData = reactive(createReactData());
|
|
211
215
|
const internalData = createInternalData();
|
|
212
216
|
const refMaps = {
|
|
213
217
|
refElem
|
|
@@ -1729,6 +1733,7 @@ export default defineVxeComponent({
|
|
|
1729
1733
|
globalEvents.off($xeSelect, 'keydown');
|
|
1730
1734
|
globalEvents.off($xeSelect, 'blur');
|
|
1731
1735
|
globalEvents.off($xeSelect, 'resize');
|
|
1736
|
+
XEUtils.assign(reactData, createReactData());
|
|
1732
1737
|
XEUtils.assign(internalData, createInternalData());
|
|
1733
1738
|
});
|
|
1734
1739
|
provide('$xeSelect', $xeSelect);
|
|
@@ -4,8 +4,9 @@ import { getConfig, getIcon, createEvent, globalEvents, globalResize, useSize, r
|
|
|
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
8
|
import XEUtils from 'xe-utils';
|
|
9
|
+
const { warnLog, errLog } = createComponentLog('splitter');
|
|
9
10
|
export default defineVxeComponent({
|
|
10
11
|
name: 'VxeSplitter',
|
|
11
12
|
props: {
|
|
@@ -205,13 +206,13 @@ export default defineVxeComponent({
|
|
|
205
206
|
};
|
|
206
207
|
reactData.itemList = list.map(item => {
|
|
207
208
|
if (item.showAction) {
|
|
208
|
-
warnLog('vxe.error.removeProp', ['
|
|
209
|
+
warnLog('vxe.error.removeProp', ['show-action']);
|
|
209
210
|
}
|
|
210
211
|
if (item.slots) {
|
|
211
212
|
XEUtils.each(item.slots, (func) => {
|
|
212
213
|
if (!XEUtils.isFunction(func)) {
|
|
213
214
|
if (!slots[func]) {
|
|
214
|
-
errLog('vxe.error.notSlot', [
|
|
215
|
+
errLog('vxe.error.notSlot', [func]);
|
|
215
216
|
}
|
|
216
217
|
}
|
|
217
218
|
});
|
|
@@ -914,11 +915,11 @@ export default defineVxeComponent({
|
|
|
914
915
|
}
|
|
915
916
|
reactData.itemList = val || [];
|
|
916
917
|
if ((showPrevButton || showNextButton) && reactData.itemList.length > 2) {
|
|
917
|
-
errLog('vxe.error.modelConflicts', ['
|
|
918
|
+
errLog('vxe.error.modelConflicts', ['action-config.showPrevButton | action-config.showNextButton', '<vxe-splitter-panel ...> Only supports 2 panel']);
|
|
918
919
|
}
|
|
919
920
|
reactData.itemList.forEach(item => {
|
|
920
921
|
if (item.showAction) {
|
|
921
|
-
warnLog('vxe.error.removeProp', ['
|
|
922
|
+
warnLog('vxe.error.removeProp', ['showAction']);
|
|
922
923
|
}
|
|
923
924
|
});
|
|
924
925
|
recalculate();
|
|
@@ -937,7 +938,7 @@ export default defineVxeComponent({
|
|
|
937
938
|
}
|
|
938
939
|
const actionOpts = computeActionOpts.value;
|
|
939
940
|
if (actionOpts.direction) {
|
|
940
|
-
errLog('vxe.error.delProp', ['
|
|
941
|
+
errLog('vxe.error.delProp', ['action-config.direction', 'action-config.showPrevButton | action-config.showNextButton']);
|
|
941
942
|
}
|
|
942
943
|
globalEvents.on($xeSplitter, 'resize', handleGlobalResizeEvent);
|
|
943
944
|
});
|
|
@@ -5,11 +5,26 @@ import { VxeUI, getConfig, getIcon, globalEvents, getI18n, createEvent, useSize,
|
|
|
5
5
|
import { getEventTargetNode, updatePanelPlacement, toCssUnit } from '../../ui/src/dom';
|
|
6
6
|
import { getOnName } from '../../ui/src/vn';
|
|
7
7
|
import { getLastZIndex, nextZIndex } from '../../ui/src/utils';
|
|
8
|
-
import {
|
|
8
|
+
import { createComponentLog } from '../../ui/src/log';
|
|
9
9
|
import VxeInputComponent from '../../input/src/input';
|
|
10
|
+
const { errLog } = createComponentLog('table-select');
|
|
10
11
|
export function getRowUniqueId() {
|
|
11
12
|
return XEUtils.uniqueId('row_');
|
|
12
13
|
}
|
|
14
|
+
function createReactData() {
|
|
15
|
+
return {
|
|
16
|
+
initialized: false,
|
|
17
|
+
tableColumns: [],
|
|
18
|
+
fullOptionList: [],
|
|
19
|
+
panelIndex: 0,
|
|
20
|
+
panelStyle: {},
|
|
21
|
+
panelPlacement: null,
|
|
22
|
+
triggerFocusPanel: false,
|
|
23
|
+
visiblePanel: false,
|
|
24
|
+
isAniVisible: false,
|
|
25
|
+
isActivated: false
|
|
26
|
+
};
|
|
27
|
+
}
|
|
13
28
|
function createInternalData() {
|
|
14
29
|
return {
|
|
15
30
|
// hpTimeout: undefined,
|
|
@@ -89,18 +104,7 @@ export default defineVxeComponent({
|
|
|
89
104
|
const refGridWrapper = ref();
|
|
90
105
|
const refOptionPanel = ref();
|
|
91
106
|
const refGrid = ref();
|
|
92
|
-
const reactData = reactive(
|
|
93
|
-
initialized: false,
|
|
94
|
-
tableColumns: [],
|
|
95
|
-
fullOptionList: [],
|
|
96
|
-
panelIndex: 0,
|
|
97
|
-
panelStyle: {},
|
|
98
|
-
panelPlacement: null,
|
|
99
|
-
triggerFocusPanel: false,
|
|
100
|
-
visiblePanel: false,
|
|
101
|
-
isAniVisible: false,
|
|
102
|
-
isActivated: false
|
|
103
|
-
});
|
|
107
|
+
const reactData = reactive(createReactData());
|
|
104
108
|
const internalData = createInternalData();
|
|
105
109
|
const refMaps = {
|
|
106
110
|
refElem
|
|
@@ -357,12 +361,12 @@ export default defineVxeComponent({
|
|
|
357
361
|
rowid = getRowUniqueId();
|
|
358
362
|
}
|
|
359
363
|
if (keyMaps[rowid]) {
|
|
360
|
-
errLog('vxe.error.repeatKey', [
|
|
364
|
+
errLog('vxe.error.repeatKey', [rowKeyField, rowid]);
|
|
361
365
|
}
|
|
362
366
|
keyMaps[rowid] = true;
|
|
363
367
|
const value = item[valueField];
|
|
364
368
|
if (rowMaps[value]) {
|
|
365
|
-
errLog('vxe.error.repeatKey', [
|
|
369
|
+
errLog('vxe.error.repeatKey', [valueField, value]);
|
|
366
370
|
}
|
|
367
371
|
rowMaps[value] = { item, index, items, parent: null, nodes: [] };
|
|
368
372
|
});
|
|
@@ -706,11 +710,12 @@ export default defineVxeComponent({
|
|
|
706
710
|
globalEvents.off($xeTableSelect, 'mousedown');
|
|
707
711
|
globalEvents.off($xeTableSelect, 'blur');
|
|
708
712
|
globalEvents.off($xeTableSelect, 'resize');
|
|
713
|
+
XEUtils.assign(reactData, createReactData());
|
|
709
714
|
XEUtils.assign(internalData, createInternalData());
|
|
710
715
|
});
|
|
711
716
|
nextTick(() => {
|
|
712
717
|
if (!VxeTableGridComponent) {
|
|
713
|
-
errLog('vxe.error.reqComp', ['
|
|
718
|
+
errLog('vxe.error.reqComp', ['vxe-grid']);
|
|
714
719
|
}
|
|
715
720
|
});
|
|
716
721
|
provide('$xeTableSelect', $xeTableSelect);
|
package/es/tabs/src/tabs.js
CHANGED
|
@@ -4,9 +4,10 @@ import { createEvent, getConfig, getIcon, globalEvents, permission, useSize, ren
|
|
|
4
4
|
import { getSlotVNs } from '../../ui/src/vn';
|
|
5
5
|
import { toCssUnit, addClass, removeClass } from '../../ui/src/dom';
|
|
6
6
|
import { isEnableConf } from '../../ui/src/utils';
|
|
7
|
-
import {
|
|
7
|
+
import { createComponentLog } from '../../ui/src/log';
|
|
8
8
|
import XEUtils from 'xe-utils';
|
|
9
9
|
import VxeLoadingComponent from '../../loading/src/loading';
|
|
10
|
+
const { warnLog, errLog } = createComponentLog('tabs');
|
|
10
11
|
const scrollbarOffsetSize = 20;
|
|
11
12
|
export default defineVxeComponent({
|
|
12
13
|
name: 'VxeTabs',
|
|
@@ -543,11 +544,11 @@ export default defineVxeComponent({
|
|
|
543
544
|
return handlePrevNext(true);
|
|
544
545
|
},
|
|
545
546
|
prevTab() {
|
|
546
|
-
warnLog('vxe.error.delFunc', ['
|
|
547
|
+
warnLog('vxe.error.delFunc', ['prevTab', 'prev']);
|
|
547
548
|
return tabsMethods.prev();
|
|
548
549
|
},
|
|
549
550
|
nextTab() {
|
|
550
|
-
warnLog('vxe.error.delFunc', ['
|
|
551
|
+
warnLog('vxe.error.delFunc', ['nextTab', 'next']);
|
|
551
552
|
return tabsMethods.next();
|
|
552
553
|
}
|
|
553
554
|
};
|
|
@@ -3,7 +3,8 @@ import { defineVxeComponent } from '../../ui/src/comp';
|
|
|
3
3
|
import XEUtils from 'xe-utils';
|
|
4
4
|
import { getConfig, getI18n, createEvent, useSize } from '../../ui';
|
|
5
5
|
import { getFuncText } from '../../ui/src/utils';
|
|
6
|
-
import {
|
|
6
|
+
import { createComponentLog } from '../../ui/src/log';
|
|
7
|
+
const { warnLog } = createComponentLog('textarea');
|
|
7
8
|
let autoTxtElem;
|
|
8
9
|
export default defineVxeComponent({
|
|
9
10
|
name: 'VxeTextarea',
|
package/es/tree/src/tree.js
CHANGED
|
@@ -2,7 +2,7 @@ import { ref, h, reactive, computed, watch, onBeforeUnmount, nextTick, onMounted
|
|
|
2
2
|
import { defineVxeComponent } from '../../ui/src/comp';
|
|
3
3
|
import { VxeUI, createEvent, useSize, globalEvents, globalResize, renderEmptyElement } from '../../ui';
|
|
4
4
|
import { calcTreeLine, enNodeValue, deNodeValue } from './util';
|
|
5
|
-
import {
|
|
5
|
+
import { createComponentLog } from '../../ui/src/log';
|
|
6
6
|
import { getCrossTreeDragNodeInfo } from './store';
|
|
7
7
|
import XEUtils from 'xe-utils';
|
|
8
8
|
import { getSlotVNs } from '../../ui/src/vn';
|
|
@@ -10,6 +10,7 @@ import { toCssUnit, isScale, getPaddingTopBottomSize, addClass, removeClass, get
|
|
|
10
10
|
import { isEnableConf } from '../../ui/src/utils';
|
|
11
11
|
import { moveRowAnimateToTb, clearRowAnimate } from '../../ui/src/anime';
|
|
12
12
|
import VxeLoadingComponent from '../../loading';
|
|
13
|
+
const { errLog } = createComponentLog('tree');
|
|
13
14
|
const { menus, getConfig, getI18n, getIcon } = VxeUI;
|
|
14
15
|
/**
|
|
15
16
|
* 生成节点的唯一主键
|
|
@@ -719,7 +720,7 @@ export default defineVxeComponent({
|
|
|
719
720
|
handleData(true);
|
|
720
721
|
if (sYLoad) {
|
|
721
722
|
if (!(props.height || props.maxHeight)) {
|
|
722
|
-
errLog('vxe.error.reqProp', ['
|
|
723
|
+
errLog('vxe.error.reqProp', ['height | max-height | virtual-y-config.enabled=false']);
|
|
723
724
|
}
|
|
724
725
|
}
|
|
725
726
|
return computeScrollLoad().then(() => {
|
|
@@ -4,12 +4,13 @@ import { getConfig, getI18n, getIcon, globalEvents, createEvent, useSize, render
|
|
|
4
4
|
import { getEventTargetNode, updatePanelPlacement, toCssUnit } from '../../ui/src/dom';
|
|
5
5
|
import { getLastZIndex, nextZIndex } from '../../ui/src/utils';
|
|
6
6
|
import { deNodeValue } from '../../tree/src/util';
|
|
7
|
-
import {
|
|
7
|
+
import { createComponentLog } from '../../ui/src/log';
|
|
8
8
|
import XEUtils from 'xe-utils';
|
|
9
9
|
import VxeInputComponent from '../../input';
|
|
10
10
|
import VxeButtonComponent from '../../button';
|
|
11
11
|
import VxeTreeComponent from '../../tree';
|
|
12
12
|
import { getSlotVNs } from '../../ui/src/vn';
|
|
13
|
+
const { warnLog, errLog } = createComponentLog('tree-select');
|
|
13
14
|
function getOptUniqueId() {
|
|
14
15
|
return XEUtils.uniqueId('node_');
|
|
15
16
|
}
|
|
@@ -819,7 +820,7 @@ export default defineVxeComponent({
|
|
|
819
820
|
h('div', {
|
|
820
821
|
class: 'vxe-tree-select--header-button'
|
|
821
822
|
}, [
|
|
822
|
-
showCheckedButton && showClearButton
|
|
823
|
+
(showCheckedButton && multiple) || showClearButton
|
|
823
824
|
? h('div', {
|
|
824
825
|
class: 'vxe-tree-select--selected-btns'
|
|
825
826
|
}, [
|
|
@@ -839,24 +840,20 @@ export default defineVxeComponent({
|
|
|
839
840
|
: renderEmptyElement($xeTreeSelect)
|
|
840
841
|
])
|
|
841
842
|
: renderEmptyElement($xeTreeSelect),
|
|
842
|
-
showExpandButton
|
|
843
|
+
showExpandButton
|
|
843
844
|
? h('div', {
|
|
844
845
|
class: 'vxe-tree-select--expand-btns'
|
|
845
846
|
}, [
|
|
846
|
-
|
|
847
|
-
|
|
848
|
-
|
|
849
|
-
|
|
850
|
-
|
|
851
|
-
|
|
852
|
-
:
|
|
853
|
-
|
|
854
|
-
|
|
855
|
-
|
|
856
|
-
mode: 'text',
|
|
857
|
-
onClick: clearExpandPanelEvent
|
|
858
|
-
})
|
|
859
|
-
: renderEmptyElement($xeTreeSelect)
|
|
847
|
+
h(VxeButtonComponent, {
|
|
848
|
+
content: getI18n('vxe.treeSelect.allExpand'),
|
|
849
|
+
mode: 'text',
|
|
850
|
+
onClick: allExpandPanelEvent
|
|
851
|
+
}),
|
|
852
|
+
h(VxeButtonComponent, {
|
|
853
|
+
content: getI18n('vxe.treeSelect.clearExpand'),
|
|
854
|
+
mode: 'text',
|
|
855
|
+
onClick: clearExpandPanelEvent
|
|
856
|
+
})
|
|
860
857
|
])
|
|
861
858
|
: renderEmptyElement($xeTreeSelect)
|
|
862
859
|
])
|
|
@@ -919,7 +916,7 @@ export default defineVxeComponent({
|
|
|
919
916
|
}, treeScopedSlots)
|
|
920
917
|
])
|
|
921
918
|
]),
|
|
922
|
-
footerSlot || showTotalButton ||
|
|
919
|
+
footerSlot || showTotalButton || showCloseButton
|
|
923
920
|
? h('div', {
|
|
924
921
|
class: 'vxe-tree-select--panel-footer'
|
|
925
922
|
}, footerSlot
|
|
@@ -933,7 +930,7 @@ export default defineVxeComponent({
|
|
|
933
930
|
class: 'vxe-tree-select--total-btns'
|
|
934
931
|
}, getI18n('vxe.treeSelect.total', [selectVals.length]))
|
|
935
932
|
: renderEmptyElement($xeTreeSelect),
|
|
936
|
-
showCloseButton
|
|
933
|
+
showCloseButton
|
|
937
934
|
? h('div', {
|
|
938
935
|
class: 'vxe-tree-select--oper-btns'
|
|
939
936
|
}, [
|
package/es/ui/index.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { VxeUI, setConfig, setIcon } from '@vxe-ui/core';
|
|
2
2
|
import { dynamicApp } from '../dynamics';
|
|
3
3
|
import { warnLog } from './src/log';
|
|
4
|
-
export const version = "4.15.
|
|
4
|
+
export const version = "4.15.4";
|
|
5
5
|
VxeUI.uiVersion = version;
|
|
6
6
|
VxeUI.dynamicApp = dynamicApp;
|
|
7
7
|
export function config(options) {
|
|
@@ -64,6 +64,9 @@ setConfig({
|
|
|
64
64
|
showFullLabel: true,
|
|
65
65
|
treeConfig: {
|
|
66
66
|
showIcon: true
|
|
67
|
+
},
|
|
68
|
+
filterConfig: {
|
|
69
|
+
autoExpandMode: 'first'
|
|
67
70
|
}
|
|
68
71
|
},
|
|
69
72
|
checkbox: {},
|
package/es/ui/src/log.js
CHANGED
|
@@ -1,4 +1,14 @@
|
|
|
1
|
-
import {
|
|
2
|
-
const
|
|
3
|
-
|
|
4
|
-
export
|
|
1
|
+
import { VxeUI } from '@vxe-ui/core';
|
|
2
|
+
const { log } = VxeUI;
|
|
3
|
+
const uiVersion = `ui v${"4.15.4"}`;
|
|
4
|
+
export function createComponentLog(name) {
|
|
5
|
+
const tableVersion = VxeUI.tableVersion ? `table v${VxeUI.tableVersion}` : '';
|
|
6
|
+
const ganttVersion = VxeUI.ganttVersion ? `gantt v${VxeUI.ganttVersion}` : '';
|
|
7
|
+
const designVersion = VxeUI.designVersion ? `design v${VxeUI.designVersion}` : '';
|
|
8
|
+
return {
|
|
9
|
+
warnLog: log.create('warn', uiVersion + tableVersion + ganttVersion + designVersion + '] [' + name),
|
|
10
|
+
errLog: log.create('error', uiVersion + tableVersion + ganttVersion + designVersion + '] [' + name)
|
|
11
|
+
};
|
|
12
|
+
}
|
|
13
|
+
export const warnLog = log.create('warn', uiVersion);
|
|
14
|
+
export const errLog = log.create('error', uiVersion);
|