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,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, DateRangePickerInternalData, DateRangePickerReactData, DateRangePickerMethods, VxeDateRangePickerPropTypes, DateRangePickerPrivateRef, VxeFormConstructor, VxeFormPrivateMethods, VxeFormDefines, ValueOf, VxeModalConstructor, VxeDatePanelPropTypes, VxeDrawerConstructor, VxeModalMethods, VxeDrawerMethods, VxeDatePanelEvents, VxeDateRangePickerDefines, VxeButtonGroupEvents, 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 defineVxeComponent({
|
|
18
20
|
name: 'VxeDateRangePicker',
|
|
19
21
|
props: {
|
|
@@ -951,7 +953,7 @@ export default defineVxeComponent({
|
|
|
951
953
|
break
|
|
952
954
|
}
|
|
953
955
|
default:
|
|
954
|
-
errLog('vxe.error.notCommands', [
|
|
956
|
+
errLog('vxe.error.notCommands', [code])
|
|
955
957
|
break
|
|
956
958
|
}
|
|
957
959
|
}
|
|
@@ -94,6 +94,7 @@ export default defineVxeComponent({
|
|
|
94
94
|
type: Boolean as PropType<VxeDrawerPropTypes.ShowTitleOverflow>,
|
|
95
95
|
default: () => getConfig().drawer.showTitleOverflow
|
|
96
96
|
},
|
|
97
|
+
preload: Boolean as PropType<VxeDrawerPropTypes.Preload>,
|
|
97
98
|
width: [Number, String] as PropType<VxeDrawerPropTypes.Width>,
|
|
98
99
|
height: [Number, String] as PropType<VxeDrawerPropTypes.Height>,
|
|
99
100
|
resize: {
|
|
@@ -640,6 +641,7 @@ export default defineVxeComponent({
|
|
|
640
641
|
})
|
|
641
642
|
|
|
642
643
|
onMounted(() => {
|
|
644
|
+
reactData.initialized = !!props.preload
|
|
643
645
|
nextTick(() => {
|
|
644
646
|
if (props.modelValue) {
|
|
645
647
|
openDrawer()
|
|
@@ -2,10 +2,12 @@ import { h, resolveComponent, ComponentOptions } 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 = 'modelValue'
|
|
10
12
|
|
|
11
13
|
/**
|
|
@@ -102,7 +104,7 @@ function getComponentOns (renderOpts: VxeGlobalRendererHandles.RenderFormItemCon
|
|
|
102
104
|
XEUtils.objectEach(events, (func, key: any) => {
|
|
103
105
|
ons[getOnName(key)] = function (...args: any[]) {
|
|
104
106
|
if (!XEUtils.isFunction(func)) {
|
|
105
|
-
errLog('vxe.error.errFunc', [
|
|
107
|
+
errLog('vxe.error.errFunc', [func])
|
|
106
108
|
}
|
|
107
109
|
func(params, ...args)
|
|
108
110
|
}
|
|
@@ -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 { VxeFormConstructor, VxeFormPropTypes, VxeFormEmits, FormReactData, FormMethods, FormPrivateRef, VxeFormPrivateMethods, VxeFormDefines, VxeFormItemPropTypes, VxeTooltipInstance, FormInternalData, VxeFormPrivateComputed } 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, {
|
|
@@ -349,7 +351,7 @@ export default defineVxeComponent({
|
|
|
349
351
|
XEUtils.each(item.slots, (func) => {
|
|
350
352
|
if (!XEUtils.isFunction(func)) {
|
|
351
353
|
if (!slots[func]) {
|
|
352
|
-
errLog('vxe.error.notSlot', [
|
|
354
|
+
errLog('vxe.error.notSlot', [func])
|
|
353
355
|
}
|
|
354
356
|
}
|
|
355
357
|
})
|
|
@@ -579,10 +581,10 @@ export default defineVxeComponent({
|
|
|
579
581
|
if (validatorMethod) {
|
|
580
582
|
customValid = validatorMethod(validParams)
|
|
581
583
|
} else {
|
|
582
|
-
warnLog('vxe.error.notValidators', [
|
|
584
|
+
warnLog('vxe.error.notValidators', [validator])
|
|
583
585
|
}
|
|
584
586
|
} else {
|
|
585
|
-
errLog('vxe.error.notValidators', [
|
|
587
|
+
errLog('vxe.error.notValidators', [validator])
|
|
586
588
|
}
|
|
587
589
|
} else {
|
|
588
590
|
customValid = validator(validParams)
|
|
@@ -999,7 +1001,7 @@ export default defineVxeComponent({
|
|
|
999
1001
|
onMounted(() => {
|
|
1000
1002
|
nextTick(() => {
|
|
1001
1003
|
if (props.customLayout && props.items) {
|
|
1002
|
-
errLog('vxe.error.errConflicts', ['
|
|
1004
|
+
errLog('vxe.error.errConflicts', ['custom-layout', 'items'])
|
|
1003
1005
|
}
|
|
1004
1006
|
})
|
|
1005
1007
|
globalEvents.on($xeForm, 'resize', handleGlobalResizeEvent)
|
|
@@ -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
|
|
|
@@ -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, InputReactData, InputMethods, ValueOf, InputInternalData, VxeInputPropTypes, InputPrivateRef, VxeFormConstructor, VxeFormPrivateMethods, VxeFormDefines, VxeDrawerConstructor, VxeDrawerMethods, VxeModalConstructor, VxeModalMethods, VxeDatePanelDefines, VxeSelectConstructor, VxeSelectMethods, VxeTreeSelectConstructor, VxeTreeSelectMethods, VxeComponentStyleType } from '../../../types'
|
|
13
13
|
import type { VxeTableConstructor, VxeTablePrivateMethods } from '../../../types/components/table'
|
|
14
14
|
|
|
15
|
+
const { warnLog } = createComponentLog('input')
|
|
16
|
+
|
|
15
17
|
export default defineVxeComponent({
|
|
16
18
|
name: 'VxeInput',
|
|
17
19
|
props: {
|
|
@@ -5,11 +5,13 @@ 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
10
|
|
|
11
11
|
import type { VxeMenuDefines, VxeMenuPropTypes, MenuReactData, VxeMenuEmits, MenuMethods, VxeComponentSlotType, VxeLayoutAsidePropTypes, MenuPrivateMethods, MenuPrivateRef, VxeMenuPrivateComputed, VxeMenuConstructor, VxeMenuPrivateMethods, ValueOf, VxeLayoutAsideConstructor, VxeLayoutAsidePrivateMethods } from '../../../types'
|
|
12
12
|
|
|
13
|
+
const { errLog } = createComponentLog('menu')
|
|
14
|
+
|
|
13
15
|
const { menus, getConfig, getIcon } = VxeUI
|
|
14
16
|
|
|
15
17
|
export default defineVxeComponent({
|
|
@@ -7,11 +7,13 @@ 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
11
|
|
|
12
12
|
import type { VxeModalConstructor, VxeModalPropTypes, ModalReactData, ModalInternalData, VxeModalEmits, VxeModalPrivateComputed, ModalEventTypes, VxeButtonInstance, ModalMethods, ModalPrivateRef, VxeModalMethods, ValueOf, 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[] = []
|
|
@@ -100,6 +102,7 @@ export default defineVxeComponent({
|
|
|
100
102
|
type: Boolean as PropType<VxeModalPropTypes.ShowFooter>,
|
|
101
103
|
default: () => getConfig().modal.showFooter
|
|
102
104
|
},
|
|
105
|
+
preload: Boolean as PropType<VxeModalPropTypes.Preload>,
|
|
103
106
|
showZoom: Boolean as PropType<VxeModalPropTypes.ShowZoom>,
|
|
104
107
|
zoomConfig: Object as PropType<VxeModalPropTypes.ZoomConfig>,
|
|
105
108
|
showMaximize: {
|
|
@@ -1479,9 +1482,10 @@ export default defineVxeComponent({
|
|
|
1479
1482
|
if (props.type === 'modal' && props.showFooter && !(props.showConfirmButton || props.showCancelButton || slots.footer)) {
|
|
1480
1483
|
warnLog('vxe.modal.footPropErr')
|
|
1481
1484
|
}
|
|
1485
|
+
reactData.initialized = !!props.preload
|
|
1482
1486
|
nextTick(() => {
|
|
1483
1487
|
if (props.storage && !props.id) {
|
|
1484
|
-
errLog('vxe.error.reqProp', ['
|
|
1488
|
+
errLog('vxe.error.reqProp', ['id'])
|
|
1485
1489
|
}
|
|
1486
1490
|
if (props.modelValue) {
|
|
1487
1491
|
openModal()
|
|
@@ -2,13 +2,15 @@ import { h, PropType, computed, inject, ref, Ref, reactive, nextTick, watch } fr
|
|
|
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
8
|
|
|
9
9
|
import type { VxePagerPropTypes, VxePagerConstructor, VxePagerEmits, VxeSelectEvents, ValueOf, PagerPrivateRef, PagerMethods, PagerPrivateMethods, VxePagerPrivateMethods, PagerReactData, VxeInputEvents, VxeSelectDefines } 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 defineVxeComponent({
|
|
13
15
|
name: 'VxePager',
|
|
14
16
|
props: {
|
|
@@ -655,7 +657,7 @@ export default defineVxeComponent({
|
|
|
655
657
|
* @deprecated
|
|
656
658
|
*/
|
|
657
659
|
jumpPage (currentPage: number) {
|
|
658
|
-
warnLog('vxe.error.delFunc', ['
|
|
660
|
+
warnLog('vxe.error.delFunc', ['jumpPage', 'setCurrentPage'])
|
|
659
661
|
return $xePager.setCurrentPage(currentPage)
|
|
660
662
|
}
|
|
661
663
|
}
|
|
@@ -731,7 +733,7 @@ export default defineVxeComponent({
|
|
|
731
733
|
if (renderFn) {
|
|
732
734
|
childNodes.push(renderFn())
|
|
733
735
|
} else {
|
|
734
|
-
errLog('vxe.error.notProp', [`
|
|
736
|
+
errLog('vxe.error.notProp', [`layouts -> ${name}`])
|
|
735
737
|
}
|
|
736
738
|
})
|
|
737
739
|
if (slots.right) {
|
|
@@ -7,6 +7,10 @@ import VxeRadioButtonComponent from './button'
|
|
|
7
7
|
|
|
8
8
|
import type { VxeRadioGroupPropTypes, RadioGroupInternalData, VxeRadioGroupConstructor, RadioGroupReactData, VxeRadioGroupEmits, VxeRadioGroupPrivateMethods, RadioGroupPrivateMethods, RadioGroupPrivateComputed, RadioGroupMethods, VxeFormConstructor, VxeFormPrivateMethods, VxeFormDefines, 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
|
|
@@ -53,8 +57,7 @@ export default defineVxeComponent({
|
|
|
53
57
|
|
|
54
58
|
const { computeSize } = useSize(props)
|
|
55
59
|
|
|
56
|
-
const reactData = reactive
|
|
57
|
-
})
|
|
60
|
+
const reactData = reactive(createReactData())
|
|
58
61
|
|
|
59
62
|
const internalData = createInternalData()
|
|
60
63
|
|
|
@@ -214,6 +217,7 @@ export default defineVxeComponent({
|
|
|
214
217
|
})
|
|
215
218
|
|
|
216
219
|
onUnmounted(() => {
|
|
220
|
+
XEUtils.assign(reactData, createReactData())
|
|
217
221
|
XEUtils.assign(internalData, createInternalData())
|
|
218
222
|
})
|
|
219
223
|
|
|
@@ -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, VxeSelectConstructor, SelectInternalData, SelectReactData, VxeSelectDefines, VxeButtonEvents, ValueOf, VxeSelectEmits, VxeComponentSlotType, VxeInputConstructor, SelectMethods, SelectPrivateRef, VxeSelectMethods, VxeOptionProps, VxeDrawerConstructor, VxeDrawerMethods, VxeFormDefines, VxeFormConstructor, VxeFormPrivateMethods, VxeModalConstructor, VxeModalMethods, VxeInputEvents, 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,
|
|
@@ -204,27 +230,7 @@ export default defineVxeComponent({
|
|
|
204
230
|
|
|
205
231
|
const { computeSize } = useSize(props)
|
|
206
232
|
|
|
207
|
-
const reactData = reactive
|
|
208
|
-
initialized: false,
|
|
209
|
-
scrollYLoad: false,
|
|
210
|
-
bodyHeight: 0,
|
|
211
|
-
topSpaceHeight: 0,
|
|
212
|
-
optList: [],
|
|
213
|
-
staticOptions: [],
|
|
214
|
-
reactFlag: 0,
|
|
215
|
-
|
|
216
|
-
currentOption: null,
|
|
217
|
-
searchValue: '',
|
|
218
|
-
searchLoading: false,
|
|
219
|
-
|
|
220
|
-
panelIndex: 0,
|
|
221
|
-
panelStyle: {},
|
|
222
|
-
panelPlacement: null,
|
|
223
|
-
triggerFocusPanel: false,
|
|
224
|
-
visiblePanel: false,
|
|
225
|
-
isAniVisible: false,
|
|
226
|
-
isActivated: false
|
|
227
|
-
})
|
|
233
|
+
const reactData = reactive(createReactData())
|
|
228
234
|
|
|
229
235
|
const internalData = createInternalData()
|
|
230
236
|
|
|
@@ -1836,6 +1842,7 @@ export default defineVxeComponent({
|
|
|
1836
1842
|
globalEvents.off($xeSelect, 'keydown')
|
|
1837
1843
|
globalEvents.off($xeSelect, 'blur')
|
|
1838
1844
|
globalEvents.off($xeSelect, 'resize')
|
|
1845
|
+
XEUtils.assign(reactData, createReactData())
|
|
1839
1846
|
XEUtils.assign(internalData, createInternalData())
|
|
1840
1847
|
})
|
|
1841
1848
|
|
|
@@ -4,11 +4,13 @@ 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
9
|
|
|
10
10
|
import type { SplitterReactData, SplitterPrivateRef, VxeSplitterPropTypes, SplitterInternalData, SplitterMethods, VxeSplitterPanelPropTypes, VxeSplitterDefines, VxeSplitterPanelProps, VxeSplitterPrivateComputed, SplitterPrivateMethods, VxeSplitterEmits, VxeSplitterConstructor, ValueOf, VxeSplitterPrivateMethods } from '../../../types'
|
|
11
11
|
|
|
12
|
+
const { warnLog, errLog } = createComponentLog('splitter')
|
|
13
|
+
|
|
12
14
|
export default defineVxeComponent({
|
|
13
15
|
name: 'VxeSplitter',
|
|
14
16
|
props: {
|
|
@@ -226,13 +228,13 @@ export default defineVxeComponent({
|
|
|
226
228
|
}
|
|
227
229
|
reactData.itemList = list.map(item => {
|
|
228
230
|
if (item.showAction) {
|
|
229
|
-
warnLog('vxe.error.removeProp', ['
|
|
231
|
+
warnLog('vxe.error.removeProp', ['show-action'])
|
|
230
232
|
}
|
|
231
233
|
if (item.slots) {
|
|
232
234
|
XEUtils.each(item.slots, (func) => {
|
|
233
235
|
if (!XEUtils.isFunction(func)) {
|
|
234
236
|
if (!slots[func]) {
|
|
235
|
-
errLog('vxe.error.notSlot', [
|
|
237
|
+
errLog('vxe.error.notSlot', [func])
|
|
236
238
|
}
|
|
237
239
|
}
|
|
238
240
|
})
|
|
@@ -953,11 +955,11 @@ export default defineVxeComponent({
|
|
|
953
955
|
reactData.itemList = val || []
|
|
954
956
|
|
|
955
957
|
if ((showPrevButton || showNextButton) && reactData.itemList.length > 2) {
|
|
956
|
-
errLog('vxe.error.modelConflicts', ['
|
|
958
|
+
errLog('vxe.error.modelConflicts', ['action-config.showPrevButton | action-config.showNextButton', '<vxe-splitter-panel ...> Only supports 2 panel'])
|
|
957
959
|
}
|
|
958
960
|
reactData.itemList.forEach(item => {
|
|
959
961
|
if (item.showAction) {
|
|
960
|
-
warnLog('vxe.error.removeProp', ['
|
|
962
|
+
warnLog('vxe.error.removeProp', ['showAction'])
|
|
961
963
|
}
|
|
962
964
|
})
|
|
963
965
|
recalculate()
|
|
@@ -980,7 +982,7 @@ export default defineVxeComponent({
|
|
|
980
982
|
|
|
981
983
|
const actionOpts = computeActionOpts.value
|
|
982
984
|
if (actionOpts.direction) {
|
|
983
|
-
errLog('vxe.error.delProp', ['
|
|
985
|
+
errLog('vxe.error.delProp', ['action-config.direction', 'action-config.showPrevButton | action-config.showNextButton'])
|
|
984
986
|
}
|
|
985
987
|
|
|
986
988
|
globalEvents.on($xeSplitter, 'resize', handleGlobalResizeEvent)
|
|
@@ -5,17 +5,34 @@ 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
10
|
|
|
11
11
|
import type { TableSelectReactData, VxeTableSelectEmits, VxeInputConstructor, TableSelectInternalData, VxeTableSelectPropTypes, VxeFormDefines, VxeModalConstructor, VxeModalMethods, VxeDrawerConstructor, VxeDrawerMethods, TableSelectMethods, TableSelectPrivateMethods, ValueOf, TableSelectPrivateRef, VxeTableSelectPrivateComputed, VxeTableSelectConstructor, VxeTableSelectPrivateMethods, VxeFormConstructor, VxeFormPrivateMethods, VxeComponentStyleType } from '../../../types'
|
|
12
12
|
import type { VxeTableConstructor, VxeTablePrivateMethods } from '../../../types/components/table'
|
|
13
13
|
import type { VxeGridInstance, VxeGridEvents, VxeGridPropTypes } from '../../../types/components/grid'
|
|
14
14
|
|
|
15
|
+
const { errLog } = createComponentLog('table-select')
|
|
16
|
+
|
|
15
17
|
export function getRowUniqueId () {
|
|
16
18
|
return XEUtils.uniqueId('row_')
|
|
17
19
|
}
|
|
18
20
|
|
|
21
|
+
function createReactData (): TableSelectReactData {
|
|
22
|
+
return {
|
|
23
|
+
initialized: false,
|
|
24
|
+
tableColumns: [],
|
|
25
|
+
fullOptionList: [],
|
|
26
|
+
panelIndex: 0,
|
|
27
|
+
panelStyle: {},
|
|
28
|
+
panelPlacement: null,
|
|
29
|
+
triggerFocusPanel: false,
|
|
30
|
+
visiblePanel: false,
|
|
31
|
+
isAniVisible: false,
|
|
32
|
+
isActivated: false
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
|
|
19
36
|
function createInternalData (): TableSelectInternalData {
|
|
20
37
|
return {
|
|
21
38
|
// hpTimeout: undefined,
|
|
@@ -103,20 +120,9 @@ export default defineVxeComponent({
|
|
|
103
120
|
const refOptionPanel = ref<HTMLDivElement>()
|
|
104
121
|
const refGrid = ref<VxeGridInstance>()
|
|
105
122
|
|
|
106
|
-
const reactData = reactive
|
|
107
|
-
initialized: false,
|
|
108
|
-
tableColumns: [],
|
|
109
|
-
fullOptionList: [],
|
|
110
|
-
panelIndex: 0,
|
|
111
|
-
panelStyle: {},
|
|
112
|
-
panelPlacement: null,
|
|
113
|
-
triggerFocusPanel: false,
|
|
114
|
-
visiblePanel: false,
|
|
115
|
-
isAniVisible: false,
|
|
116
|
-
isActivated: false
|
|
117
|
-
})
|
|
123
|
+
const reactData = reactive(createReactData())
|
|
118
124
|
|
|
119
|
-
const internalData
|
|
125
|
+
const internalData = createInternalData()
|
|
120
126
|
|
|
121
127
|
const refMaps: TableSelectPrivateRef = {
|
|
122
128
|
refElem
|
|
@@ -402,12 +408,12 @@ export default defineVxeComponent({
|
|
|
402
408
|
rowid = getRowUniqueId()
|
|
403
409
|
}
|
|
404
410
|
if (keyMaps[rowid]) {
|
|
405
|
-
errLog('vxe.error.repeatKey', [
|
|
411
|
+
errLog('vxe.error.repeatKey', [rowKeyField, rowid])
|
|
406
412
|
}
|
|
407
413
|
keyMaps[rowid] = true
|
|
408
414
|
const value = item[valueField]
|
|
409
415
|
if (rowMaps[value]) {
|
|
410
|
-
errLog('vxe.error.repeatKey', [
|
|
416
|
+
errLog('vxe.error.repeatKey', [valueField, value])
|
|
411
417
|
}
|
|
412
418
|
rowMaps[value] = { item, index, items, parent: null, nodes: [] }
|
|
413
419
|
})
|
|
@@ -787,12 +793,13 @@ export default defineVxeComponent({
|
|
|
787
793
|
globalEvents.off($xeTableSelect, 'mousedown')
|
|
788
794
|
globalEvents.off($xeTableSelect, 'blur')
|
|
789
795
|
globalEvents.off($xeTableSelect, 'resize')
|
|
796
|
+
XEUtils.assign(reactData, createReactData())
|
|
790
797
|
XEUtils.assign(internalData, createInternalData())
|
|
791
798
|
})
|
|
792
799
|
|
|
793
800
|
nextTick(() => {
|
|
794
801
|
if (!VxeTableGridComponent) {
|
|
795
|
-
errLog('vxe.error.reqComp', ['
|
|
802
|
+
errLog('vxe.error.reqComp', ['vxe-grid'])
|
|
796
803
|
}
|
|
797
804
|
})
|
|
798
805
|
|
|
@@ -4,12 +4,14 @@ 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
10
|
|
|
11
11
|
import type { VxeTabsPropTypes, VxeTabPaneProps, VxeTabsEmits, TabsInternalData, TabsReactData, TabsPrivateRef, VxeTabsPrivateComputed, VxeTabsConstructor, VxeTabsPrivateMethods, VxeTabPaneDefines, ValueOf, TabsMethods, TabsPrivateMethods, VxeComponentStyleType } from '../../../types'
|
|
12
12
|
|
|
13
|
+
const { warnLog, errLog } = createComponentLog('tabs')
|
|
14
|
+
|
|
13
15
|
const scrollbarOffsetSize = 20
|
|
14
16
|
|
|
15
17
|
export default defineVxeComponent({
|
|
@@ -580,11 +582,11 @@ export default defineVxeComponent({
|
|
|
580
582
|
return handlePrevNext(true)
|
|
581
583
|
},
|
|
582
584
|
prevTab () {
|
|
583
|
-
warnLog('vxe.error.delFunc', ['
|
|
585
|
+
warnLog('vxe.error.delFunc', ['prevTab', 'prev'])
|
|
584
586
|
return tabsMethods.prev()
|
|
585
587
|
},
|
|
586
588
|
nextTab () {
|
|
587
|
-
warnLog('vxe.error.delFunc', ['
|
|
589
|
+
warnLog('vxe.error.delFunc', ['nextTab', 'next'])
|
|
588
590
|
return tabsMethods.next()
|
|
589
591
|
}
|
|
590
592
|
}
|
|
@@ -3,10 +3,12 @@ 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
7
|
|
|
8
8
|
import type { VxeTextareaPropTypes, TextareaReactData, TextareaMethods, VxeTextareaConstructor, VxeTextareaEmits, TextareaPrivateRef, VxeFormConstructor, VxeFormPrivateMethods, VxeFormDefines } from '../../../types'
|
|
9
9
|
|
|
10
|
+
const { warnLog } = createComponentLog('textarea')
|
|
11
|
+
|
|
10
12
|
let autoTxtElem: HTMLDivElement
|
|
11
13
|
|
|
12
14
|
export default defineVxeComponent({
|
|
@@ -2,7 +2,7 @@ import { ref, h, reactive, PropType, computed, VNode, watch, onBeforeUnmount, ne
|
|
|
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'
|
|
@@ -13,6 +13,8 @@ import VxeLoadingComponent from '../../loading'
|
|
|
13
13
|
|
|
14
14
|
import type { TreeReactData, VxeTreeEmits, VxeTreePropTypes, TreeInternalData, TreePrivateRef, VxeTreeDefines, VxeTreePrivateComputed, TreePrivateMethods, TreeMethods, ValueOf, VxeTreeConstructor, VxeTreePrivateMethods, VxeComponentStyleType } from '../../../types'
|
|
15
15
|
|
|
16
|
+
const { errLog } = createComponentLog('tree')
|
|
17
|
+
|
|
16
18
|
const { menus, getConfig, getI18n, getIcon } = VxeUI
|
|
17
19
|
|
|
18
20
|
/**
|
|
@@ -779,7 +781,7 @@ export default defineVxeComponent({
|
|
|
779
781
|
handleData(true)
|
|
780
782
|
if (sYLoad) {
|
|
781
783
|
if (!(props.height || props.maxHeight)) {
|
|
782
|
-
errLog('vxe.error.reqProp', ['
|
|
784
|
+
errLog('vxe.error.reqProp', ['height | max-height | virtual-y-config.enabled=false'])
|
|
783
785
|
}
|
|
784
786
|
}
|
|
785
787
|
return computeScrollLoad().then(() => {
|