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
|
@@ -6,7 +6,7 @@ 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'
|
|
@@ -14,6 +14,8 @@ import VxeButtonGroupComponent from '../../button/src/button-group'
|
|
|
14
14
|
import type { VxeDateRangePickerConstructor, VxeDateRangePickerEmits, DateRangePickerReactData, DateRangePickerInternalData, VxeButtonGroupDefines, VxeComponentSizeType, VxeDateRangePickerPropTypes, VxeFormConstructor, VxeFormPrivateMethods, VxeDatePanelDefines, VxeFormDefines, ValueOf, VxeModalConstructor, VxeDrawerConstructor, VxeModalMethods, VxeDrawerMethods, VxeDateRangePickerDefines, VxeDatePanelConstructor } from '../../../types'
|
|
15
15
|
import type { VxeTableConstructor, VxeTablePrivateMethods } from '../../../types/components/table'
|
|
16
16
|
|
|
17
|
+
const { errLog } = createComponentLog('date-range-picker')
|
|
18
|
+
|
|
17
19
|
export default /* define-vxe-component start */ defineVxeComponent({
|
|
18
20
|
name: 'VxeDateRangePicker',
|
|
19
21
|
mixins: [
|
|
@@ -998,9 +1000,11 @@ export default /* define-vxe-component start */ defineVxeComponent({
|
|
|
998
1000
|
const btnTransfer = $xeDateRangePicker.computeBtnTransfer
|
|
999
1001
|
const panelElem = $xeDateRangePicker.$refs.refInputPanel as HTMLElement
|
|
1000
1002
|
if (!isDisabled && !visiblePanel) {
|
|
1001
|
-
if (!reactData.initialized
|
|
1003
|
+
if (!reactData.initialized) {
|
|
1002
1004
|
reactData.initialized = true
|
|
1003
|
-
|
|
1005
|
+
if (btnTransfer && panelElem) {
|
|
1006
|
+
document.body.appendChild(panelElem)
|
|
1007
|
+
}
|
|
1004
1008
|
}
|
|
1005
1009
|
if (internalData.hpTimeout) {
|
|
1006
1010
|
clearTimeout(internalData.hpTimeout)
|
|
@@ -1097,7 +1101,7 @@ export default /* define-vxe-component start */ defineVxeComponent({
|
|
|
1097
1101
|
break
|
|
1098
1102
|
}
|
|
1099
1103
|
default:
|
|
1100
|
-
errLog('vxe.error.notCommands', [
|
|
1104
|
+
errLog('vxe.error.notCommands', [code])
|
|
1101
1105
|
break
|
|
1102
1106
|
}
|
|
1103
1107
|
}
|
|
@@ -98,6 +98,7 @@ export default /* define-vxe-component start */ defineVxeComponent({
|
|
|
98
98
|
type: Boolean as PropType<VxeDrawerPropTypes.ShowTitleOverflow>,
|
|
99
99
|
default: () => getConfig().drawer.showTitleOverflow
|
|
100
100
|
},
|
|
101
|
+
preload: Boolean as PropType<VxeDrawerPropTypes.Preload>,
|
|
101
102
|
width: [Number, String] as PropType<VxeDrawerPropTypes.Width>,
|
|
102
103
|
height: [Number, String] as PropType<VxeDrawerPropTypes.Height>,
|
|
103
104
|
resize: {
|
|
@@ -753,7 +754,9 @@ export default /* define-vxe-component start */ defineVxeComponent({
|
|
|
753
754
|
mounted () {
|
|
754
755
|
const $xeDrawer = this
|
|
755
756
|
const props = $xeDrawer
|
|
757
|
+
const reactData = $xeDrawer.reactData
|
|
756
758
|
|
|
759
|
+
reactData.initialized = !!props.preload
|
|
757
760
|
$xeDrawer.$nextTick(() => {
|
|
758
761
|
if (props.value) {
|
|
759
762
|
$xeDrawer.openDrawer()
|
|
@@ -2,10 +2,12 @@ import { CreateElement } 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
6
|
|
|
7
7
|
import type { VxeGlobalRendererHandles, VxeFormConstructor, VxeFormPrivateMethods } from '../../../types'
|
|
8
8
|
|
|
9
|
+
const { errLog } = createComponentLog('form')
|
|
10
|
+
|
|
9
11
|
const componentDefaultModelProp = 'value'
|
|
10
12
|
|
|
11
13
|
/**
|
|
@@ -101,7 +103,7 @@ function getComponentOns (renderOpts: VxeGlobalRendererHandles.RenderFormItemCon
|
|
|
101
103
|
XEUtils.objectEach(events, (func, key: any) => {
|
|
102
104
|
ons[getOnName(key)] = function (...args: any[]) {
|
|
103
105
|
if (!XEUtils.isFunction(func)) {
|
|
104
|
-
errLog('vxe.error.errFunc', [
|
|
106
|
+
errLog('vxe.error.errFunc', [func])
|
|
105
107
|
}
|
|
106
108
|
func(params, ...args)
|
|
107
109
|
}
|
|
@@ -9,13 +9,15 @@ 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
|
|
|
14
14
|
import '../render'
|
|
15
15
|
|
|
16
16
|
import type { VxeFormPropTypes, VxeFormEmits, VxeComponentSizeType, VxeFormConstructor, VxeFormPrivateMethods, ValueOf, FormReactData, VxeFormDefines, VxeFormItemPropTypes, FormInternalData, VxeTooltipConstructor } from '../../../types'
|
|
17
17
|
import type { VxeGridConstructor, VxeGridPrivateMethods } from '../../../types/components/grid'
|
|
18
18
|
|
|
19
|
+
const { warnLog, errLog } = createComponentLog('form')
|
|
20
|
+
|
|
19
21
|
class Rule {
|
|
20
22
|
constructor (rule: any) {
|
|
21
23
|
Object.assign(this, {
|
|
@@ -284,11 +286,12 @@ export default /* define-vxe-component start */ defineVxeComponent({
|
|
|
284
286
|
data () {
|
|
285
287
|
const xID = XEUtils.uniqueId()
|
|
286
288
|
const reactData: FormReactData = createReactData()
|
|
287
|
-
const internalData = createInternalData()
|
|
288
289
|
return {
|
|
290
|
+
...({} as {
|
|
291
|
+
internalData: FormInternalData
|
|
292
|
+
}),
|
|
289
293
|
xID,
|
|
290
294
|
reactData,
|
|
291
|
-
internalData,
|
|
292
295
|
|
|
293
296
|
recalcFlag: 0
|
|
294
297
|
}
|
|
@@ -373,7 +376,7 @@ export default /* define-vxe-component start */ defineVxeComponent({
|
|
|
373
376
|
XEUtils.each(item.slots, (func) => {
|
|
374
377
|
if (!XEUtils.isFunction(func)) {
|
|
375
378
|
if (!slots[func]) {
|
|
376
|
-
errLog('vxe.error.notSlot', [
|
|
379
|
+
errLog('vxe.error.notSlot', [func])
|
|
377
380
|
}
|
|
378
381
|
}
|
|
379
382
|
})
|
|
@@ -633,10 +636,10 @@ export default /* define-vxe-component start */ defineVxeComponent({
|
|
|
633
636
|
if (validatorMethod) {
|
|
634
637
|
customValid = validatorMethod(validParams)
|
|
635
638
|
} else {
|
|
636
|
-
warnLog('vxe.error.notValidators', [
|
|
639
|
+
warnLog('vxe.error.notValidators', [validator])
|
|
637
640
|
}
|
|
638
641
|
} else {
|
|
639
|
-
errLog('vxe.error.notValidators', [
|
|
642
|
+
errLog('vxe.error.notValidators', [validator])
|
|
640
643
|
}
|
|
641
644
|
} else {
|
|
642
645
|
customValid = validator(validParams)
|
|
@@ -1049,6 +1052,8 @@ export default /* define-vxe-component start */ defineVxeComponent({
|
|
|
1049
1052
|
const props = $xeForm
|
|
1050
1053
|
const reactData = $xeForm.reactData
|
|
1051
1054
|
|
|
1055
|
+
$xeForm.internalData = createInternalData()
|
|
1056
|
+
|
|
1052
1057
|
reactData.collapseAll = !!props.collapseStatus
|
|
1053
1058
|
},
|
|
1054
1059
|
mounted () {
|
|
@@ -1060,16 +1065,18 @@ export default /* define-vxe-component start */ defineVxeComponent({
|
|
|
1060
1065
|
}
|
|
1061
1066
|
$xeForm.$nextTick(() => {
|
|
1062
1067
|
if (props.customLayout && props.items) {
|
|
1063
|
-
errLog('vxe.error.errConflicts', ['
|
|
1068
|
+
errLog('vxe.error.errConflicts', ['custom-layout', 'items'])
|
|
1064
1069
|
}
|
|
1065
1070
|
})
|
|
1066
1071
|
globalEvents.on($xeForm, 'resize', $xeForm.handleGlobalResizeEvent)
|
|
1067
1072
|
},
|
|
1068
1073
|
destroyed () {
|
|
1069
1074
|
const $xeForm = this
|
|
1075
|
+
const reactData = $xeForm.reactData
|
|
1070
1076
|
const internalData = $xeForm.internalData
|
|
1071
1077
|
|
|
1072
1078
|
globalEvents.off($xeForm, 'resize')
|
|
1079
|
+
XEUtils.assign(reactData, createReactData())
|
|
1073
1080
|
XEUtils.assign(internalData, createInternalData())
|
|
1074
1081
|
},
|
|
1075
1082
|
render (this: any, h) {
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
import { formats } from '../../ui'
|
|
2
2
|
import XEUtils from 'xe-utils'
|
|
3
|
-
import {
|
|
3
|
+
import { createComponentLog } from '../../ui/src/log'
|
|
4
|
+
|
|
5
|
+
const { errLog } = createComponentLog('form')
|
|
4
6
|
|
|
5
7
|
export class ItemInfo {
|
|
6
8
|
constructor ($xeForm: any, item: any) {
|
|
@@ -9,22 +11,22 @@ export class ItemInfo {
|
|
|
9
11
|
if (XEUtils.isString(formatter)) {
|
|
10
12
|
const gFormatOpts = formats.get(formatter)
|
|
11
13
|
if (!gFormatOpts || !gFormatOpts.formItemFormatMethod) {
|
|
12
|
-
errLog('vxe.error.notFormats', [
|
|
14
|
+
errLog('vxe.error.notFormats', [formatter])
|
|
13
15
|
}
|
|
14
16
|
} else if (XEUtils.isArray(formatter)) {
|
|
15
17
|
const gFormatOpts = formats.get(formatter[0])
|
|
16
18
|
if (!gFormatOpts || !gFormatOpts.formItemFormatMethod) {
|
|
17
|
-
errLog('vxe.error.notFormats', [
|
|
19
|
+
errLog('vxe.error.notFormats', [formatter[0]])
|
|
18
20
|
}
|
|
19
21
|
}
|
|
20
22
|
}
|
|
21
23
|
|
|
22
24
|
if (field && itemRender) {
|
|
23
25
|
if (itemRender.startField && `${itemRender.startField}`.indexOf(field) >= 0) {
|
|
24
|
-
errLog('vxe.error.modelConflicts', [`
|
|
26
|
+
errLog('vxe.error.modelConflicts', [`field=${field}`, `item-render.startField=${itemRender.startField}`])
|
|
25
27
|
}
|
|
26
28
|
if (itemRender.endField && `${itemRender.endField}`.indexOf(field) >= 0) {
|
|
27
|
-
errLog('vxe.error.modelConflicts', [`
|
|
29
|
+
errLog('vxe.error.modelConflicts', [`field=${field}`, `item-render.endField=${itemRender.endField}`])
|
|
28
30
|
}
|
|
29
31
|
}
|
|
30
32
|
|
|
@@ -65,12 +65,13 @@ export default /* define-vxe-component start */ defineVxeComponent({
|
|
|
65
65
|
getThumbnailUrlMethod: Function as PropType<VxeImagePropTypes.GetThumbnailUrlMethod>
|
|
66
66
|
},
|
|
67
67
|
data () {
|
|
68
|
-
const internalData = createInternalData()
|
|
69
68
|
const reactData = createReactData()
|
|
70
69
|
return {
|
|
70
|
+
...({} as {
|
|
71
|
+
internalData: ImageInternalData
|
|
72
|
+
}),
|
|
71
73
|
xID: XEUtils.uniqueId(),
|
|
72
|
-
reactData
|
|
73
|
-
internalData
|
|
74
|
+
reactData
|
|
74
75
|
}
|
|
75
76
|
},
|
|
76
77
|
computed: {
|
|
@@ -289,6 +290,11 @@ export default /* define-vxe-component start */ defineVxeComponent({
|
|
|
289
290
|
])
|
|
290
291
|
}
|
|
291
292
|
},
|
|
293
|
+
created () {
|
|
294
|
+
const $xeImage = this
|
|
295
|
+
|
|
296
|
+
$xeImage.internalData = createInternalData()
|
|
297
|
+
},
|
|
292
298
|
beforeDestroy () {
|
|
293
299
|
const $xeImage = this
|
|
294
300
|
const reactData = $xeImage.reactData
|
|
@@ -7,11 +7,13 @@ 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
11
|
|
|
12
12
|
import type { VxeInputConstructor, VxeInputEmits, InputInternalData, InputReactData, ValueOf, VxeInputPropTypes, VxeComponentStyleType, VxeFormConstructor, VxeFormPrivateMethods, VxeFormDefines, VxeComponentSizeType, VxeDrawerConstructor, VxeDrawerMethods, VxeModalConstructor, VxeModalMethods, VxeDatePanelDefines, VxeSelectConstructor, VxeSelectMethods, VxeTreeSelectConstructor, VxeTreeSelectMethods } from '../../../types'
|
|
13
13
|
import type { VxeTableConstructor, VxeTablePrivateMethods } from '../../../types/components/table'
|
|
14
14
|
|
|
15
|
+
const { warnLog } = createComponentLog('input')
|
|
16
|
+
|
|
15
17
|
export default /* define-vxe-component start */ defineVxeComponent({
|
|
16
18
|
name: 'VxeInput',
|
|
17
19
|
mixins: [
|
|
@@ -36,12 +36,13 @@ export default /* define-vxe-component start */ defineVxeComponent({
|
|
|
36
36
|
data () {
|
|
37
37
|
const xID = XEUtils.uniqueId()
|
|
38
38
|
const backtopId = `vxe_layout_body_backtop_${xID}`
|
|
39
|
-
const internalData = createInternalData()
|
|
40
39
|
const reactData = createReactData()
|
|
41
40
|
return {
|
|
41
|
+
...({} as {
|
|
42
|
+
internalData: LayoutBodyInternalData
|
|
43
|
+
}),
|
|
42
44
|
xID,
|
|
43
45
|
backtopId,
|
|
44
|
-
internalData,
|
|
45
46
|
reactData
|
|
46
47
|
}
|
|
47
48
|
},
|
|
@@ -131,6 +132,19 @@ export default /* define-vxe-component start */ defineVxeComponent({
|
|
|
131
132
|
])
|
|
132
133
|
}
|
|
133
134
|
},
|
|
135
|
+
created () {
|
|
136
|
+
const $xeLayoutBody = this
|
|
137
|
+
|
|
138
|
+
$xeLayoutBody.internalData = createInternalData()
|
|
139
|
+
},
|
|
140
|
+
beforeDestroy () {
|
|
141
|
+
const $xeLayoutBody = this
|
|
142
|
+
const reactData = $xeLayoutBody.reactData
|
|
143
|
+
const internalData = $xeLayoutBody.internalData
|
|
144
|
+
|
|
145
|
+
XEUtils.assign(reactData, createReactData())
|
|
146
|
+
XEUtils.assign(internalData, createInternalData())
|
|
147
|
+
},
|
|
134
148
|
render (this: any, h) {
|
|
135
149
|
return this.renderVN(h)
|
|
136
150
|
}
|
|
@@ -64,11 +64,12 @@ export default /* define-vxe-component start */ defineVxeComponent({
|
|
|
64
64
|
data () {
|
|
65
65
|
const xID = XEUtils.uniqueId()
|
|
66
66
|
const reactData = createReactData()
|
|
67
|
-
const internalData = createInternalData()
|
|
68
67
|
return {
|
|
68
|
+
...({} as {
|
|
69
|
+
internalData: ListInternalData
|
|
70
|
+
}),
|
|
69
71
|
xID,
|
|
70
|
-
reactData
|
|
71
|
-
internalData
|
|
72
|
+
reactData
|
|
72
73
|
}
|
|
73
74
|
},
|
|
74
75
|
computed: {
|
|
@@ -449,6 +450,8 @@ export default /* define-vxe-component start */ defineVxeComponent({
|
|
|
449
450
|
const $xeList = this
|
|
450
451
|
const props = $xeList
|
|
451
452
|
|
|
453
|
+
$xeList.internalData = createInternalData()
|
|
454
|
+
|
|
452
455
|
$xeList.loadData(props.data || [])
|
|
453
456
|
},
|
|
454
457
|
mounted () {
|
|
@@ -5,11 +5,13 @@ import { VxeUI, createEvent, permission, globalMixins, globalEvents, renderEmpty
|
|
|
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
10
|
|
|
11
11
|
import type { VxeMenuDefines, MenuReactData, VxeMenuPropTypes, VxeLayoutAsideConstructor, VxeMenuEmits, VxeLayoutAsidePropTypes, VxeComponentPermissionInfo, VxeComponentSizeType, ValueOf } from '../../../types'
|
|
12
12
|
|
|
13
|
+
const { errLog } = createComponentLog('menu')
|
|
14
|
+
|
|
13
15
|
const { menus, getConfig, getIcon } = VxeUI
|
|
14
16
|
|
|
15
17
|
export default /* define-vxe-component start */ defineVxeComponent({
|
|
@@ -7,11 +7,13 @@ import { getLastZIndex, nextZIndex, getSubLastZIndex, nextSubZIndex, getFuncText
|
|
|
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
11
|
|
|
12
12
|
import type { VxeModalConstructor, VxeModalPropTypes, ModalReactData, ModalInternalData, VxeModalMethods, ModalEventTypes, VxeModalEmits, VxeComponentSizeType, VxeComponentPermissionInfo, ValueOf, VxeButtonConstructor, VxeDrawerConstructor, VxeDrawerMethods, VxeFormConstructor, VxeFormPrivateMethods } from '../../../types'
|
|
13
13
|
import type { VxeTableConstructor, VxeTablePrivateMethods } from '../../../types/components/table'
|
|
14
14
|
|
|
15
|
+
const { warnLog, errLog } = createComponentLog('modal')
|
|
16
|
+
|
|
15
17
|
export const allActiveModals: VxeModalConstructor[] = []
|
|
16
18
|
const msgQueue: VxeModalConstructor[] = []
|
|
17
19
|
const notifyQueue: VxeModalConstructor[] = []
|
|
@@ -104,6 +106,7 @@ export default /* define-vxe-component start */ defineVxeComponent({
|
|
|
104
106
|
type: Boolean as PropType<VxeModalPropTypes.ShowFooter>,
|
|
105
107
|
default: () => getConfig().modal.showFooter
|
|
106
108
|
},
|
|
109
|
+
preload: Boolean as PropType<VxeModalPropTypes.Preload>,
|
|
107
110
|
showZoom: Boolean as PropType<VxeModalPropTypes.ShowZoom>,
|
|
108
111
|
zoomConfig: Object as PropType<VxeModalPropTypes.ZoomConfig>,
|
|
109
112
|
showMaximize: {
|
|
@@ -1651,10 +1654,12 @@ export default /* define-vxe-component start */ defineVxeComponent({
|
|
|
1651
1654
|
const $xeModal = this
|
|
1652
1655
|
const slots = $xeModal.$scopedSlots
|
|
1653
1656
|
const props = $xeModal
|
|
1657
|
+
const reactData = $xeModal.reactData
|
|
1654
1658
|
|
|
1655
1659
|
if (props.type === 'modal' && props.showFooter && !(props.showConfirmButton || props.showCancelButton || slots.footer)) {
|
|
1656
1660
|
warnLog('vxe.modal.footPropErr')
|
|
1657
1661
|
}
|
|
1662
|
+
reactData.initialized = !!props.preload
|
|
1658
1663
|
$xeModal.$nextTick(() => {
|
|
1659
1664
|
if (props.storage && !props.id) {
|
|
1660
1665
|
errLog('vxe.error.reqProp', ['[modal] id'])
|
|
@@ -2,13 +2,15 @@ import { CreateElement, PropType, VNode } 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, globalMixins } 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
8
|
|
|
9
9
|
import type { VxePagerPropTypes, VxePagerEmits, VxeInputDefines, VxeSelectDefines, ValueOf, VxeComponentSizeType, PagerReactData } from '../../../types'
|
|
10
10
|
import type { VxeGridConstructor, VxeGridPrivateMethods } from '../../../types/components/grid'
|
|
11
11
|
|
|
12
|
+
const { warnLog, errLog } = createComponentLog('pager')
|
|
13
|
+
|
|
12
14
|
export default /* define-vxe-component start */ defineVxeComponent({
|
|
13
15
|
name: 'VxePager',
|
|
14
16
|
mixins: [
|
|
@@ -260,7 +262,7 @@ export default /* define-vxe-component start */ defineVxeComponent({
|
|
|
260
262
|
jumpPage (currentPage: number) {
|
|
261
263
|
const $xePager = this
|
|
262
264
|
|
|
263
|
-
warnLog('vxe.error.delFunc', ['
|
|
265
|
+
warnLog('vxe.error.delFunc', ['jumpPage', 'setCurrentPage'])
|
|
264
266
|
return $xePager.setCurrentPage(currentPage)
|
|
265
267
|
},
|
|
266
268
|
getPageCount (total: number, size: number) {
|
|
@@ -864,7 +866,7 @@ export default /* define-vxe-component start */ defineVxeComponent({
|
|
|
864
866
|
if (renderFn) {
|
|
865
867
|
childNodes.push(renderFn(h))
|
|
866
868
|
} else {
|
|
867
|
-
errLog('vxe.error.notProp', [`
|
|
869
|
+
errLog('vxe.error.notProp', [`layouts -> ${name}`])
|
|
868
870
|
}
|
|
869
871
|
})
|
|
870
872
|
if (slots.right) {
|
|
@@ -7,6 +7,10 @@ import VxeRadioButtonComponent from './button'
|
|
|
7
7
|
|
|
8
8
|
import type { VxeRadioGroupPropTypes, RadioGroupInternalData, VxeRadioGroupEmits, VxeFormDefines, VxeFormConstructor, VxeFormPrivateMethods, VxeComponentPermissionInfo, VxeComponentSizeType, RadioGroupReactData, ValueOf } from '../../../types'
|
|
9
9
|
|
|
10
|
+
function createReactData (): RadioGroupReactData {
|
|
11
|
+
return {}
|
|
12
|
+
}
|
|
13
|
+
|
|
10
14
|
function createInternalData (): RadioGroupInternalData {
|
|
11
15
|
return {
|
|
12
16
|
// isLoaded: false
|
|
@@ -58,14 +62,14 @@ export default /* define-vxe-component start */ defineVxeComponent({
|
|
|
58
62
|
}
|
|
59
63
|
},
|
|
60
64
|
data () {
|
|
61
|
-
const reactData: RadioGroupReactData =
|
|
62
|
-
}
|
|
63
|
-
const internalData = createInternalData()
|
|
65
|
+
const reactData: RadioGroupReactData = createReactData()
|
|
64
66
|
return {
|
|
67
|
+
...({} as {
|
|
68
|
+
internalData: RadioGroupInternalData
|
|
69
|
+
}),
|
|
65
70
|
xID: XEUtils.uniqueId(),
|
|
66
71
|
name: XEUtils.uniqueId('xe_group_'),
|
|
67
|
-
reactData
|
|
68
|
-
internalData
|
|
72
|
+
reactData
|
|
69
73
|
}
|
|
70
74
|
},
|
|
71
75
|
computed: {
|
|
@@ -247,6 +251,11 @@ export default /* define-vxe-component start */ defineVxeComponent({
|
|
|
247
251
|
$xeRadioGroup.loadData(val)
|
|
248
252
|
}
|
|
249
253
|
},
|
|
254
|
+
created () {
|
|
255
|
+
const $xeRadioGroup = this
|
|
256
|
+
|
|
257
|
+
$xeRadioGroup.internalData = createInternalData()
|
|
258
|
+
},
|
|
250
259
|
mounted () {
|
|
251
260
|
const $xeRadioGroup = this
|
|
252
261
|
const props = $xeRadioGroup
|
|
@@ -260,9 +269,11 @@ export default /* define-vxe-component start */ defineVxeComponent({
|
|
|
260
269
|
},
|
|
261
270
|
beforeDestroy () {
|
|
262
271
|
const $xeRadioGroup = this
|
|
272
|
+
const reactData = $xeRadioGroup.reactData
|
|
263
273
|
const internalData = $xeRadioGroup.internalData
|
|
264
274
|
|
|
265
275
|
XEUtils.assign(internalData, createInternalData())
|
|
276
|
+
XEUtils.assign(reactData, createReactData())
|
|
266
277
|
},
|
|
267
278
|
render (this: any, h) {
|
|
268
279
|
return this.renderVN(h)
|
|
@@ -5,13 +5,15 @@ 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
11
|
|
|
12
12
|
import type { VxeSelectPropTypes, SelectInternalData, ValueOf, VxeComponentSizeType, SelectReactData, VxeSelectEmits, VxeButtonDefines, VxeInputDefines, VxeSelectDefines, VxeOptionProps, VxeDrawerConstructor, VxeDrawerMethods, VxeFormDefines, VxeFormConstructor, VxeFormPrivateMethods, VxeModalConstructor, VxeModalMethods, VxeInputConstructor, VxeComponentSlotType, VxeComponentStyleType } from '../../../types'
|
|
13
13
|
import type { VxeTableConstructor, VxeTablePrivateMethods } from '../../../types/components/table'
|
|
14
14
|
|
|
15
|
+
const { errLog } = createComponentLog('select')
|
|
16
|
+
|
|
15
17
|
function isOptionVisible (option: any) {
|
|
16
18
|
return option.visible !== false
|
|
17
19
|
}
|
|
@@ -20,6 +22,30 @@ function getOptUniqueId () {
|
|
|
20
22
|
return XEUtils.uniqueId('opt_')
|
|
21
23
|
}
|
|
22
24
|
|
|
25
|
+
function createReactData (): SelectReactData {
|
|
26
|
+
return {
|
|
27
|
+
initialized: false,
|
|
28
|
+
scrollYLoad: false,
|
|
29
|
+
bodyHeight: 0,
|
|
30
|
+
topSpaceHeight: 0,
|
|
31
|
+
optList: [],
|
|
32
|
+
staticOptions: [],
|
|
33
|
+
reactFlag: 0,
|
|
34
|
+
|
|
35
|
+
currentOption: null,
|
|
36
|
+
searchValue: '',
|
|
37
|
+
searchLoading: false,
|
|
38
|
+
|
|
39
|
+
panelIndex: 0,
|
|
40
|
+
panelStyle: {},
|
|
41
|
+
panelPlacement: null,
|
|
42
|
+
triggerFocusPanel: false,
|
|
43
|
+
visiblePanel: false,
|
|
44
|
+
isAniVisible: false,
|
|
45
|
+
isActivated: false
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
|
|
23
49
|
function createInternalData (): SelectInternalData {
|
|
24
50
|
return {
|
|
25
51
|
// isLoaded: false,
|
|
@@ -205,33 +231,14 @@ export default /* define-vxe-component start */ defineVxeComponent({
|
|
|
205
231
|
},
|
|
206
232
|
data () {
|
|
207
233
|
const xID = XEUtils.uniqueId()
|
|
208
|
-
const reactData
|
|
209
|
-
initialized: false,
|
|
210
|
-
scrollYLoad: false,
|
|
211
|
-
bodyHeight: 0,
|
|
212
|
-
topSpaceHeight: 0,
|
|
213
|
-
optList: [],
|
|
214
|
-
staticOptions: [],
|
|
215
|
-
reactFlag: 1,
|
|
216
|
-
|
|
217
|
-
currentOption: null,
|
|
218
|
-
searchValue: '',
|
|
219
|
-
searchLoading: false,
|
|
220
|
-
|
|
221
|
-
panelIndex: 0,
|
|
222
|
-
panelStyle: {},
|
|
223
|
-
panelPlacement: null,
|
|
224
|
-
triggerFocusPanel: false,
|
|
225
|
-
visiblePanel: false,
|
|
226
|
-
isAniVisible: false,
|
|
227
|
-
isActivated: false
|
|
228
|
-
}
|
|
229
|
-
const internalData = createInternalData()
|
|
234
|
+
const reactData = createReactData()
|
|
230
235
|
|
|
231
236
|
return {
|
|
237
|
+
...({} as {
|
|
238
|
+
internalData: SelectInternalData
|
|
239
|
+
}),
|
|
232
240
|
xID,
|
|
233
|
-
reactData
|
|
234
|
-
internalData
|
|
241
|
+
reactData
|
|
235
242
|
}
|
|
236
243
|
},
|
|
237
244
|
computed: {
|
|
@@ -851,10 +858,8 @@ export default /* define-vxe-component start */ defineVxeComponent({
|
|
|
851
858
|
reactData.initialized = true
|
|
852
859
|
const btnTransfer = $xeSelect.computeBtnTransfer
|
|
853
860
|
const panelElem = $xeSelect.$refs.refOptionPanel as HTMLElement
|
|
854
|
-
if (btnTransfer) {
|
|
855
|
-
|
|
856
|
-
document.body.appendChild(panelElem)
|
|
857
|
-
}
|
|
861
|
+
if (btnTransfer && panelElem) {
|
|
862
|
+
document.body.appendChild(panelElem)
|
|
858
863
|
}
|
|
859
864
|
}
|
|
860
865
|
reactData.isActivated = true
|
|
@@ -2125,6 +2130,11 @@ export default /* define-vxe-component start */ defineVxeComponent({
|
|
|
2125
2130
|
$xeSelect.loadData(val)
|
|
2126
2131
|
}
|
|
2127
2132
|
},
|
|
2133
|
+
created () {
|
|
2134
|
+
const $xeSelect = this
|
|
2135
|
+
|
|
2136
|
+
$xeSelect.internalData = createInternalData()
|
|
2137
|
+
},
|
|
2128
2138
|
mounted () {
|
|
2129
2139
|
const $xeSelect = this
|
|
2130
2140
|
const props = $xeSelect
|
|
@@ -2158,8 +2168,10 @@ export default /* define-vxe-component start */ defineVxeComponent({
|
|
|
2158
2168
|
},
|
|
2159
2169
|
destroyed () {
|
|
2160
2170
|
const $xeSelect = this
|
|
2171
|
+
const reactData = $xeSelect.reactData
|
|
2161
2172
|
const internalData = $xeSelect.internalData
|
|
2162
2173
|
|
|
2174
|
+
XEUtils.assign(reactData, createReactData())
|
|
2163
2175
|
XEUtils.assign(internalData, createInternalData())
|
|
2164
2176
|
},
|
|
2165
2177
|
render (this: any, h) {
|
|
@@ -5,10 +5,12 @@ import { getConfig, getIcon, createEvent, globalEvents, globalMixins, globalResi
|
|
|
5
5
|
import { getSlotVNs } from '../../ui/src/vn'
|
|
6
6
|
import { toCssUnit, isScale, addClass, removeClass } from '../../ui/src/dom'
|
|
7
7
|
import { getGlobalDefaultConfig } from '../../ui/src/utils'
|
|
8
|
-
import {
|
|
8
|
+
import { createComponentLog } from '../../ui/src/log'
|
|
9
9
|
|
|
10
10
|
import type { SplitterReactData, VxeSplitterPropTypes, VxeComponentSizeType, SplitterInternalData, VxeSplitterEmits, VxeSplitterPanelPropTypes, ValueOf, VxeSplitterPanelProps, VxeSplitterDefines } from '../../../types'
|
|
11
11
|
|
|
12
|
+
const { warnLog, errLog } = createComponentLog('splitter')
|
|
13
|
+
|
|
12
14
|
export default /* define-vxe-component start */ defineVxeComponent({
|
|
13
15
|
name: 'VxeSplitter',
|
|
14
16
|
mixins: [
|
|
@@ -170,11 +172,11 @@ export default /* define-vxe-component start */ defineVxeComponent({
|
|
|
170
172
|
}
|
|
171
173
|
reactData.itemList = reactData.staticItems || []
|
|
172
174
|
if ((showPrevButton || showNextButton) && reactData.itemList.length > 2) {
|
|
173
|
-
errLog('vxe.error.modelConflicts', ['
|
|
175
|
+
errLog('vxe.error.modelConflicts', ['action-config.showPrevButton | action-config.showNextButton', '<vxe-splitter-panel ...> Only supports 2 panel'])
|
|
174
176
|
}
|
|
175
177
|
reactData.itemList.forEach(item => {
|
|
176
178
|
if (item.showAction) {
|
|
177
|
-
warnLog('vxe.error.removeProp', ['
|
|
179
|
+
warnLog('vxe.error.removeProp', ['show-action'])
|
|
178
180
|
}
|
|
179
181
|
})
|
|
180
182
|
$xeSplitter.recalculate()
|
|
@@ -236,7 +238,7 @@ export default /* define-vxe-component start */ defineVxeComponent({
|
|
|
236
238
|
XEUtils.each(item.slots, (func) => {
|
|
237
239
|
if (!XEUtils.isFunction(func)) {
|
|
238
240
|
if (!slots[func]) {
|
|
239
|
-
errLog('vxe.error.notSlot', [
|
|
241
|
+
errLog('vxe.error.notSlot', [func])
|
|
240
242
|
}
|
|
241
243
|
}
|
|
242
244
|
})
|
|
@@ -1017,7 +1019,7 @@ export default /* define-vxe-component start */ defineVxeComponent({
|
|
|
1017
1019
|
}
|
|
1018
1020
|
const actionOpts = $xeSplitter.computeActionOpts
|
|
1019
1021
|
if (actionOpts.direction) {
|
|
1020
|
-
errLog('vxe.error.delProp', ['
|
|
1022
|
+
errLog('vxe.error.delProp', ['action-config.direction', 'action-config.showPrevButton | action-config.showNextButton'])
|
|
1021
1023
|
}
|
|
1022
1024
|
$xeSplitter.$nextTick(() => {
|
|
1023
1025
|
$xeSplitter.recalculate()
|