vxe-pc-ui 3.15.2 → 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 -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 +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 -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 +990 -252
- 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 +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 -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 +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 +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.1781852732213.ttf} +0 -0
- /package/es/icon/{iconfont.1781753586592.woff → iconfont.1781852732213.woff} +0 -0
- /package/es/icon/{iconfont.1781753586592.woff2 → iconfont.1781852732213.woff2} +0 -0
- /package/es/{iconfont.1781753586592.ttf → iconfont.1781852732213.ttf} +0 -0
- /package/es/{iconfont.1781753586592.woff → iconfont.1781852732213.woff} +0 -0
- /package/es/{iconfont.1781753586592.woff2 → iconfont.1781852732213.woff2} +0 -0
- /package/lib/icon/style/{iconfont.1781753586592.ttf → iconfont.1781852732213.ttf} +0 -0
- /package/lib/icon/style/{iconfont.1781753586592.woff → iconfont.1781852732213.woff} +0 -0
- /package/lib/icon/style/{iconfont.1781753586592.woff2 → iconfont.1781852732213.woff2} +0 -0
- /package/lib/{iconfont.1781753586592.ttf → iconfont.1781852732213.ttf} +0 -0
- /package/lib/{iconfont.1781753586592.woff → iconfont.1781852732213.woff} +0 -0
- /package/lib/{iconfont.1781753586592.woff2 → iconfont.1781852732213.woff2} +0 -0
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
import { defineVxeComponent } from '../../ui/src/comp';
|
|
2
2
|
import XEUtils from 'xe-utils';
|
|
3
3
|
import { getConfig, getIcon, createEvent, globalMixins, renderEmptyElement } from '../../ui';
|
|
4
|
-
import {
|
|
4
|
+
import { createComponentLog } from '../../ui/src/log';
|
|
5
5
|
import { getLastZIndex, nextZIndex } from '../../ui/src/utils';
|
|
6
6
|
import { toCssUnit } from '../../ui/src/dom';
|
|
7
7
|
import VxeButtonComponent from '../../button';
|
|
8
|
+
const { errLog } = createComponentLog('backtop');
|
|
8
9
|
function createInternalData() {
|
|
9
10
|
return {
|
|
10
11
|
targetEl: null
|
|
@@ -86,13 +87,9 @@ export default {
|
|
|
86
87
|
},
|
|
87
88
|
data() {
|
|
88
89
|
const xID = XEUtils.uniqueId();
|
|
89
|
-
const internalData = createInternalData();
|
|
90
90
|
const reactData = createReactData();
|
|
91
|
-
return {
|
|
92
|
-
|
|
93
|
-
internalData,
|
|
94
|
-
reactData
|
|
95
|
-
};
|
|
91
|
+
return Object.assign(Object.assign({}, {}), { xID,
|
|
92
|
+
reactData });
|
|
96
93
|
},
|
|
97
94
|
computed: Object.assign(Object.assign({}, {}), { computeWrapperStyle() {
|
|
98
95
|
const $xeBacktop = this;
|
|
@@ -281,6 +278,10 @@ export default {
|
|
|
281
278
|
]);
|
|
282
279
|
}
|
|
283
280
|
},
|
|
281
|
+
created() {
|
|
282
|
+
const $xeBacktop = this;
|
|
283
|
+
$xeBacktop.internalData = createInternalData();
|
|
284
|
+
},
|
|
284
285
|
mounted() {
|
|
285
286
|
const $xeBacktop = this;
|
|
286
287
|
const props = $xeBacktop;
|
package/es/button/src/button.js
CHANGED
|
@@ -4,8 +4,9 @@ import { defineVxeComponent } from '../../ui/src/comp';
|
|
|
4
4
|
import { getEventTargetNode, updatePanelPlacement } from '../../ui/src/dom';
|
|
5
5
|
import { getFuncText, getLastZIndex, nextZIndex } from '../../ui/src/utils';
|
|
6
6
|
import { getSlotVNs, getEventCaseName } from '../../ui/src/vn';
|
|
7
|
-
import {
|
|
7
|
+
import { createComponentLog } from '../../ui/src/log';
|
|
8
8
|
import VxeTooltipComponent from '../../tooltip';
|
|
9
|
+
const { warnLog } = createComponentLog('button');
|
|
9
10
|
export default {
|
|
10
11
|
name: 'VxeButton',
|
|
11
12
|
mixins: [
|
|
@@ -849,7 +850,7 @@ export default {
|
|
|
849
850
|
const $xeButton = this;
|
|
850
851
|
const props = $xeButton;
|
|
851
852
|
if (props.type === 'text') {
|
|
852
|
-
warnLog('vxe.error.delProp', ['
|
|
853
|
+
warnLog('vxe.error.delProp', ['type=text', 'mode=text']);
|
|
853
854
|
}
|
|
854
855
|
globalEvents.on($xeButton, 'mousewheel', $xeButton.handleGlobalMousewheelEvent);
|
|
855
856
|
globalEvents.on($xeButton, 'mousedown', $xeButton.handleGlobalMousedownEvent);
|
|
@@ -4,8 +4,9 @@ import { VxeUI, createEvent, globalMixins, renderEmptyElement } from '../../ui';
|
|
|
4
4
|
import { getDateQuarter } from '../../date-panel/src/util';
|
|
5
5
|
import { toCssUnit } from '../../ui/src/dom';
|
|
6
6
|
import { isEnableConf } from '../../ui/src/utils';
|
|
7
|
-
import {
|
|
7
|
+
import { createComponentLog } from '../../ui/src/log';
|
|
8
8
|
import VxeButtonComponent from '../../button/src/button';
|
|
9
|
+
const { errLog } = createComponentLog('calendar');
|
|
9
10
|
const { menus, getConfig, getI18n } = VxeUI;
|
|
10
11
|
export default {
|
|
11
12
|
name: 'VxeCalendar',
|
|
@@ -3,11 +3,12 @@ import { getConfig, getI18n, getIcon, globalEvents, createEvent, renderEmptyElem
|
|
|
3
3
|
import { getEventTargetNode, updatePanelPlacement, toCssUnit } from '../../ui/src/dom';
|
|
4
4
|
import { getLastZIndex, nextZIndex } from '../../ui/src/utils';
|
|
5
5
|
import { enNodeValue, deNodeValue } from './util';
|
|
6
|
-
import {
|
|
6
|
+
import { createComponentLog } from '../../ui/src/log';
|
|
7
7
|
import XEUtils from 'xe-utils';
|
|
8
8
|
import VxeListComponent from '../../list/src/list';
|
|
9
9
|
import VxeInputComponent from '../../input/src/input';
|
|
10
10
|
import VxeButtonComponent from '../../button/src/button';
|
|
11
|
+
const { errLog } = createComponentLog('cascader');
|
|
11
12
|
/**
|
|
12
13
|
* 生成节点的唯一主键
|
|
13
14
|
*/
|
|
@@ -178,12 +179,8 @@ export default {
|
|
|
178
179
|
data() {
|
|
179
180
|
const xID = XEUtils.uniqueId();
|
|
180
181
|
const reactData = createReactData();
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
xID,
|
|
184
|
-
reactData,
|
|
185
|
-
internalData
|
|
186
|
-
};
|
|
182
|
+
return Object.assign(Object.assign({}, {}), { xID,
|
|
183
|
+
reactData });
|
|
187
184
|
},
|
|
188
185
|
computed: Object.assign(Object.assign({}, {}), { computeFormReadonly() {
|
|
189
186
|
const $xeCascader = this;
|
|
@@ -1910,6 +1907,7 @@ export default {
|
|
|
1910
1907
|
const $xeCascader = this;
|
|
1911
1908
|
const props = $xeCascader;
|
|
1912
1909
|
const reactData = $xeCascader.reactData;
|
|
1910
|
+
$xeCascader.internalData = createInternalData();
|
|
1913
1911
|
if (!props.multiple) {
|
|
1914
1912
|
reactData.selectRadioKey = enNodeValue(props.value);
|
|
1915
1913
|
}
|
package/es/checkbox/src/group.js
CHANGED
|
@@ -2,6 +2,9 @@ import { defineVxeComponent } from '../../ui/src/comp';
|
|
|
2
2
|
import XEUtils from 'xe-utils';
|
|
3
3
|
import { getConfig, createEvent, globalMixins } from '../../ui';
|
|
4
4
|
import VxeCheckboxComponent from './checkbox';
|
|
5
|
+
function createReactData() {
|
|
6
|
+
return {};
|
|
7
|
+
}
|
|
5
8
|
function createInternalData() {
|
|
6
9
|
return {
|
|
7
10
|
// isLoaded: false
|
|
@@ -50,13 +53,8 @@ export default {
|
|
|
50
53
|
};
|
|
51
54
|
},
|
|
52
55
|
data() {
|
|
53
|
-
const reactData =
|
|
54
|
-
|
|
55
|
-
return {
|
|
56
|
-
xID: XEUtils.uniqueId(),
|
|
57
|
-
reactData,
|
|
58
|
-
internalData
|
|
59
|
-
};
|
|
56
|
+
const reactData = createReactData();
|
|
57
|
+
return Object.assign(Object.assign({}, {}), { xID: XEUtils.uniqueId(), reactData });
|
|
60
58
|
},
|
|
61
59
|
computed: Object.assign(Object.assign({}, {}), { computeIsReadonly() {
|
|
62
60
|
const $xeCheckboxGroup = this;
|
|
@@ -236,6 +234,10 @@ export default {
|
|
|
236
234
|
$xeCheckboxGroup.loadData(val);
|
|
237
235
|
}
|
|
238
236
|
},
|
|
237
|
+
created() {
|
|
238
|
+
const $xeCheckboxGroup = this;
|
|
239
|
+
$xeCheckboxGroup.internalData = createInternalData();
|
|
240
|
+
},
|
|
239
241
|
mounted() {
|
|
240
242
|
const $xeCheckboxGroup = this;
|
|
241
243
|
const props = $xeCheckboxGroup;
|
|
@@ -246,6 +248,13 @@ export default {
|
|
|
246
248
|
}
|
|
247
249
|
});
|
|
248
250
|
},
|
|
251
|
+
beforeDestroy() {
|
|
252
|
+
const $xeCheckboxGroup = this;
|
|
253
|
+
const reactData = $xeCheckboxGroup.reactData;
|
|
254
|
+
const internalData = $xeCheckboxGroup.internalData;
|
|
255
|
+
XEUtils.assign(reactData, createReactData());
|
|
256
|
+
XEUtils.assign(internalData, createInternalData());
|
|
257
|
+
},
|
|
249
258
|
render(h) {
|
|
250
259
|
return this.renderVN(h);
|
|
251
260
|
}
|
|
@@ -182,13 +182,8 @@ export default {
|
|
|
182
182
|
}
|
|
183
183
|
},
|
|
184
184
|
data() {
|
|
185
|
-
const internalData = createInternalData();
|
|
186
185
|
const reactData = createReactData();
|
|
187
|
-
return {
|
|
188
|
-
xID: XEUtils.uniqueId(),
|
|
189
|
-
internalData,
|
|
190
|
-
reactData
|
|
191
|
-
};
|
|
186
|
+
return Object.assign(Object.assign({}, {}), { xID: XEUtils.uniqueId(), reactData });
|
|
192
187
|
},
|
|
193
188
|
computed: Object.assign(Object.assign({}, {}), { computeMenuGroups() {
|
|
194
189
|
const $xeContextMenu = this;
|
|
@@ -661,6 +656,7 @@ export default {
|
|
|
661
656
|
},
|
|
662
657
|
created() {
|
|
663
658
|
const $xeContextMenu = this;
|
|
659
|
+
$xeContextMenu.internalData = createInternalData();
|
|
664
660
|
$xeContextMenu.handleVisible();
|
|
665
661
|
globalEvents.on($xeContextMenu, 'mousewheel', $xeContextMenu.handleGlobalMousewheelEvent);
|
|
666
662
|
globalEvents.on($xeContextMenu, 'keydown', $xeContextMenu.handleGlobalKeydownEvent);
|
|
@@ -1,4 +1,16 @@
|
|
|
1
1
|
import XEUtils from 'xe-utils';
|
|
2
|
+
export function getChunkDefaultNum(selectKey) {
|
|
3
|
+
const currDate = new Date();
|
|
4
|
+
switch (selectKey) {
|
|
5
|
+
case 'y': return currDate.getFullYear();
|
|
6
|
+
case 'M': return currDate.getMonth() + 1;
|
|
7
|
+
case 'd': return currDate.getDate();
|
|
8
|
+
case 'H': return currDate.getHours();
|
|
9
|
+
case 'm': return currDate.getMinutes();
|
|
10
|
+
case 's': return currDate.getSeconds();
|
|
11
|
+
}
|
|
12
|
+
return 0;
|
|
13
|
+
}
|
|
2
14
|
export function hasTimestampValueType(valueFormat) {
|
|
3
15
|
return valueFormat === 'timestamp';
|
|
4
16
|
}
|
|
@@ -19,18 +31,6 @@ export function handleValueFormat(type, valueFormat) {
|
|
|
19
31
|
}
|
|
20
32
|
return 'yyyy-MM-dd';
|
|
21
33
|
}
|
|
22
|
-
export function handleInputFormat(type, inputFormat) {
|
|
23
|
-
if (inputFormat) {
|
|
24
|
-
return inputFormat;
|
|
25
|
-
}
|
|
26
|
-
if (type === 'time') {
|
|
27
|
-
return 'HH:mm:ss';
|
|
28
|
-
}
|
|
29
|
-
if (type === 'datetime') {
|
|
30
|
-
return 'yyyy-MM-dd HH:mm:ss';
|
|
31
|
-
}
|
|
32
|
-
return 'yyyy-MM-dd';
|
|
33
|
-
}
|
|
34
34
|
export function toStringTimeDate(str) {
|
|
35
35
|
const rest = new Date(2e3, 0, 1);
|
|
36
36
|
if (str) {
|
|
@@ -90,10 +90,10 @@ export const parseDateValue = (val, type, options) => {
|
|
|
90
90
|
}
|
|
91
91
|
return null;
|
|
92
92
|
};
|
|
93
|
-
export
|
|
93
|
+
export function parseDateString(val, type, options) {
|
|
94
94
|
const dValue = parseDateValue(val, type, options);
|
|
95
95
|
return dValue ? XEUtils.toDateString(dValue, options.valueFormat) : '';
|
|
96
|
-
}
|
|
96
|
+
}
|
|
97
97
|
export function parseDateObj(val, type, options) {
|
|
98
98
|
const { labelFormat, firstDay } = options;
|
|
99
99
|
let dValue = null;
|
|
@@ -226,6 +226,17 @@ export function getRangeDateByCode(code, val, type, options) {
|
|
|
226
226
|
/**
|
|
227
227
|
* 判断周的年份是否跨年
|
|
228
228
|
*/
|
|
229
|
-
|
|
229
|
+
function checkWeekOfsetYear(W, M) {
|
|
230
230
|
return `${W}` === '1' && `${M}` === '12';
|
|
231
|
-
}
|
|
231
|
+
}
|
|
232
|
+
export function isAllSameChar(str, char) {
|
|
233
|
+
if (str.length === 0) {
|
|
234
|
+
return false;
|
|
235
|
+
}
|
|
236
|
+
for (let i = 0; i < str.length; i++) {
|
|
237
|
+
if (str[i] !== char) {
|
|
238
|
+
return false;
|
|
239
|
+
}
|
|
240
|
+
}
|
|
241
|
+
return true;
|
|
242
|
+
}
|