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
|
@@ -4,7 +4,7 @@ import { getConfig, getI18n, getIcon, globalEvents, createEvent, renderEmptyElem
|
|
|
4
4
|
import { getEventTargetNode, updatePanelPlacement, toCssUnit } from '../../ui/src/dom'
|
|
5
5
|
import { getLastZIndex, nextZIndex } from '../../ui/src/utils'
|
|
6
6
|
import { enNodeValue, deNodeValue } from './util'
|
|
7
|
-
import {
|
|
7
|
+
import { createComponentLog } from '../../ui/src/log'
|
|
8
8
|
import XEUtils from 'xe-utils'
|
|
9
9
|
import VxeListComponent from '../../list/src/list'
|
|
10
10
|
import VxeInputComponent from '../../input/src/input'
|
|
@@ -13,6 +13,8 @@ import VxeButtonComponent from '../../button/src/button'
|
|
|
13
13
|
import type { CascaderReactData, VxeCascaderEmits, CascaderInternalData, VxeComponentSizeType, VxeButtonDefines, VxeCascaderDefines, VxeListSlotTypes, ValueOf, VxeInputConstructor, VxeComponentStyleType, VxeCascaderPropTypes, VxeFormDefines, VxeDrawerConstructor, VxeDrawerMethods, VxeFormConstructor, VxeFormPrivateMethods, VxeModalConstructor, VxeModalMethods } from '../../../types'
|
|
14
14
|
import type { VxeTableConstructor, VxeTablePrivateMethods } from '../../../types/components/table'
|
|
15
15
|
|
|
16
|
+
const { errLog } = createComponentLog('cascader')
|
|
17
|
+
|
|
16
18
|
/**
|
|
17
19
|
* 生成节点的唯一主键
|
|
18
20
|
*/
|
|
@@ -187,11 +189,12 @@ export default /* define-vxe-component start */ defineVxeComponent({
|
|
|
187
189
|
data () {
|
|
188
190
|
const xID = XEUtils.uniqueId()
|
|
189
191
|
const reactData = createReactData()
|
|
190
|
-
const internalData = createInternalData()
|
|
191
192
|
return {
|
|
193
|
+
...({} as {
|
|
194
|
+
internalData: CascaderInternalData
|
|
195
|
+
}),
|
|
192
196
|
xID,
|
|
193
|
-
reactData
|
|
194
|
-
internalData
|
|
197
|
+
reactData
|
|
195
198
|
}
|
|
196
199
|
},
|
|
197
200
|
computed: {
|
|
@@ -2000,6 +2003,8 @@ export default /* define-vxe-component start */ defineVxeComponent({
|
|
|
2000
2003
|
const props = $xeCascader
|
|
2001
2004
|
const reactData = $xeCascader.reactData
|
|
2002
2005
|
|
|
2006
|
+
$xeCascader.internalData = createInternalData()
|
|
2007
|
+
|
|
2003
2008
|
if (!props.multiple) {
|
|
2004
2009
|
reactData.selectRadioKey = enNodeValue(props.value)
|
|
2005
2010
|
}
|
|
@@ -6,6 +6,10 @@ import VxeCheckboxComponent from './checkbox'
|
|
|
6
6
|
|
|
7
7
|
import type { VxeCheckboxGroupEmits, CheckboxGroupInternalData, VxeCheckboxPropTypes, ValueOf, CheckboxGroupReactData, VxeComponentSizeType, VxeCheckboxGroupPropTypes, VxeFormConstructor, VxeFormPrivateMethods, VxeFormDefines } from '../../../types'
|
|
8
8
|
|
|
9
|
+
function createReactData (): CheckboxGroupReactData {
|
|
10
|
+
return {}
|
|
11
|
+
}
|
|
12
|
+
|
|
9
13
|
function createInternalData (): CheckboxGroupInternalData {
|
|
10
14
|
return {
|
|
11
15
|
// isLoaded: false
|
|
@@ -55,13 +59,13 @@ export default /* define-vxe-component start */ defineVxeComponent({
|
|
|
55
59
|
}
|
|
56
60
|
},
|
|
57
61
|
data () {
|
|
58
|
-
const reactData: CheckboxGroupReactData =
|
|
59
|
-
}
|
|
60
|
-
const internalData = createInternalData()
|
|
62
|
+
const reactData: CheckboxGroupReactData = createReactData()
|
|
61
63
|
return {
|
|
64
|
+
...({} as {
|
|
65
|
+
internalData: CheckboxGroupInternalData
|
|
66
|
+
}),
|
|
62
67
|
xID: XEUtils.uniqueId(),
|
|
63
|
-
reactData
|
|
64
|
-
internalData
|
|
68
|
+
reactData
|
|
65
69
|
}
|
|
66
70
|
},
|
|
67
71
|
computed: {
|
|
@@ -265,6 +269,11 @@ export default /* define-vxe-component start */ defineVxeComponent({
|
|
|
265
269
|
$xeCheckboxGroup.loadData(val)
|
|
266
270
|
}
|
|
267
271
|
},
|
|
272
|
+
created () {
|
|
273
|
+
const $xeCheckboxGroup = this
|
|
274
|
+
|
|
275
|
+
$xeCheckboxGroup.internalData = createInternalData()
|
|
276
|
+
},
|
|
268
277
|
mounted () {
|
|
269
278
|
const $xeCheckboxGroup = this
|
|
270
279
|
const props = $xeCheckboxGroup
|
|
@@ -276,6 +285,14 @@ export default /* define-vxe-component start */ defineVxeComponent({
|
|
|
276
285
|
}
|
|
277
286
|
})
|
|
278
287
|
},
|
|
288
|
+
beforeDestroy () {
|
|
289
|
+
const $xeCheckboxGroup = this
|
|
290
|
+
const reactData = $xeCheckboxGroup.reactData
|
|
291
|
+
const internalData = $xeCheckboxGroup.internalData
|
|
292
|
+
|
|
293
|
+
XEUtils.assign(reactData, createReactData())
|
|
294
|
+
XEUtils.assign(internalData, createInternalData())
|
|
295
|
+
},
|
|
279
296
|
render (this: any, h) {
|
|
280
297
|
return this.renderVN(h)
|
|
281
298
|
}
|
|
@@ -198,11 +198,12 @@ export default /* define-vxe-component start */ defineVxeComponent({
|
|
|
198
198
|
}
|
|
199
199
|
},
|
|
200
200
|
data () {
|
|
201
|
-
const internalData = createInternalData()
|
|
202
201
|
const reactData = createReactData()
|
|
203
202
|
return {
|
|
203
|
+
...({} as {
|
|
204
|
+
internalData: ContextMenuInternalData
|
|
205
|
+
}),
|
|
204
206
|
xID: XEUtils.uniqueId(),
|
|
205
|
-
internalData,
|
|
206
207
|
reactData
|
|
207
208
|
}
|
|
208
209
|
},
|
|
@@ -699,6 +700,8 @@ export default /* define-vxe-component start */ defineVxeComponent({
|
|
|
699
700
|
created () {
|
|
700
701
|
const $xeContextMenu = this
|
|
701
702
|
|
|
703
|
+
$xeContextMenu.internalData = createInternalData()
|
|
704
|
+
|
|
702
705
|
$xeContextMenu.handleVisible()
|
|
703
706
|
globalEvents.on($xeContextMenu, 'mousewheel', $xeContextMenu.handleGlobalMousewheelEvent)
|
|
704
707
|
globalEvents.on($xeContextMenu, 'keydown', $xeContextMenu.handleGlobalKeydownEvent)
|
|
@@ -2,6 +2,19 @@ import XEUtils from 'xe-utils'
|
|
|
2
2
|
|
|
3
3
|
import type { VxeDatePanelPropTypes } from '../../../types'
|
|
4
4
|
|
|
5
|
+
export function getChunkDefaultNum (selectKey: string) {
|
|
6
|
+
const currDate = new Date()
|
|
7
|
+
switch (selectKey) {
|
|
8
|
+
case 'y': return currDate.getFullYear()
|
|
9
|
+
case 'M': return currDate.getMonth() + 1
|
|
10
|
+
case 'd': return currDate.getDate()
|
|
11
|
+
case 'H': return currDate.getHours()
|
|
12
|
+
case 'm': return currDate.getMinutes()
|
|
13
|
+
case 's': return currDate.getSeconds()
|
|
14
|
+
}
|
|
15
|
+
return 0
|
|
16
|
+
}
|
|
17
|
+
|
|
5
18
|
export function hasTimestampValueType (valueFormat?: string) {
|
|
6
19
|
return valueFormat === 'timestamp'
|
|
7
20
|
}
|
|
@@ -86,9 +99,9 @@ export const parseDateValue = (val: string | number | Date | null | undefined, t
|
|
|
86
99
|
return null
|
|
87
100
|
}
|
|
88
101
|
|
|
89
|
-
export
|
|
102
|
+
export function parseDateString (val: string | number | Date | null | undefined, type: VxeDatePanelPropTypes.Type, options: {
|
|
90
103
|
valueFormat: string
|
|
91
|
-
})
|
|
104
|
+
}) {
|
|
92
105
|
const dValue = parseDateValue(val, type, options)
|
|
93
106
|
return dValue ? XEUtils.toDateString(dValue, options.valueFormat) : ''
|
|
94
107
|
}
|
|
@@ -239,6 +252,18 @@ export function getRangeDateByCode (code: 'last1' | 'last3' | 'last7' | 'last30'
|
|
|
239
252
|
/**
|
|
240
253
|
* 判断周的年份是否跨年
|
|
241
254
|
*/
|
|
242
|
-
|
|
255
|
+
function checkWeekOfsetYear (W: number | string, M: number | string) {
|
|
243
256
|
return `${W}` === '1' && `${M}` === '12'
|
|
244
257
|
}
|
|
258
|
+
|
|
259
|
+
export function isAllSameChar (str: string, char: string) {
|
|
260
|
+
if (str.length === 0) {
|
|
261
|
+
return false
|
|
262
|
+
}
|
|
263
|
+
for (let i = 0; i < str.length; i++) {
|
|
264
|
+
if (str[i] !== char) {
|
|
265
|
+
return false
|
|
266
|
+
}
|
|
267
|
+
}
|
|
268
|
+
return true
|
|
269
|
+
}
|