vxe-table 4.2.5 → 4.2.6-beta.2
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/form/src/form.js +8 -9
- package/es/form/style.css +2 -1
- package/es/grid/src/grid.js +1 -1
- package/es/list/src/list.js +8 -9
- package/es/loading/index.js +7 -0
- package/es/loading/src/loading.js +31 -0
- package/es/locale/lang/en-US.js +3 -0
- package/es/locale/lang/ja-JP.js +3 -0
- package/es/locale/lang/zh-CN.js +3 -0
- package/es/locale/lang/zh-TC.js +3 -0
- package/es/modal/src/modal.js +22 -14
- package/es/modal/style.css +1 -1
- package/es/select/style.css +0 -64
- package/es/style.css +1 -1
- package/es/style.min.css +1 -1
- package/es/table/src/table.js +5 -9
- package/es/table/style.css +0 -63
- package/es/tools/log.js +1 -1
- package/es/v-x-e-table/index.js +1 -1
- package/es/v-x-e-table/src/conf.js +3 -0
- package/es/v-x-e-table/style.css +558 -0
- package/lib/form/src/form.js +10 -7
- package/lib/form/src/form.min.js +1 -1
- package/lib/form/style/style.css +2 -1
- package/lib/form/style/style.min.css +1 -1
- package/lib/grid/src/grid.js +1 -1
- package/lib/grid/src/grid.min.js +1 -1
- package/lib/index.umd.js +93 -36
- package/lib/index.umd.min.js +1 -1
- package/lib/list/src/list.js +10 -7
- package/lib/list/src/list.min.js +1 -1
- package/lib/loading/index.js +19 -0
- package/lib/loading/index.min.js +1 -0
- package/lib/loading/src/loading.js +39 -0
- package/lib/loading/src/loading.min.js +1 -0
- package/lib/locale/lang/en-US.js +3 -0
- package/lib/locale/lang/en-US.min.js +1 -1
- package/lib/locale/lang/en-US.umd.js +3 -0
- package/lib/locale/lang/ja-JP.js +3 -0
- package/lib/locale/lang/ja-JP.min.js +1 -1
- package/lib/locale/lang/ja-JP.umd.js +3 -0
- package/lib/locale/lang/zh-CN.js +3 -0
- package/lib/locale/lang/zh-CN.min.js +1 -1
- package/lib/locale/lang/zh-CN.umd.js +3 -0
- package/lib/locale/lang/zh-HK.min.js +1 -1
- package/lib/locale/lang/zh-HK.umd.js +3 -0
- package/lib/locale/lang/zh-MO.min.js +1 -1
- package/lib/locale/lang/zh-MO.umd.js +3 -0
- package/lib/locale/lang/zh-TC.js +3 -0
- package/lib/locale/lang/zh-TC.min.js +1 -1
- package/lib/locale/lang/zh-TC.umd.js +3 -0
- package/lib/locale/lang/zh-TW.min.js +1 -1
- package/lib/locale/lang/zh-TW.umd.js +3 -0
- package/lib/modal/src/modal.js +25 -12
- package/lib/modal/src/modal.min.js +1 -1
- package/lib/modal/style/style.css +1 -1
- package/lib/modal/style/style.min.css +1 -1
- package/lib/select/style/style.css +0 -64
- package/lib/select/style/style.min.css +1 -1
- package/lib/style.css +1 -1
- package/lib/style.min.css +1 -1
- package/lib/table/src/table.js +6 -7
- package/lib/table/src/table.min.js +1 -1
- package/lib/table/style/style.css +0 -63
- package/lib/table/style/style.min.css +1 -1
- package/lib/tools/log.js +1 -1
- package/lib/tools/log.min.js +1 -1
- package/lib/v-x-e-table/index.js +1 -1
- package/lib/v-x-e-table/index.min.js +1 -1
- package/lib/v-x-e-table/src/conf.js +3 -0
- package/lib/v-x-e-table/src/conf.min.js +1 -1
- package/lib/v-x-e-table/style/style.css +558 -0
- package/lib/v-x-e-table/style/style.min.css +1 -0
- package/package.json +1 -1
- package/packages/form/src/form.ts +8 -9
- package/packages/grid/src/grid.ts +1 -1
- package/packages/list/src/list.ts +8 -9
- package/packages/loading/index.ts +10 -0
- package/packages/loading/src/loading.ts +32 -0
- package/packages/locale/lang/en-US.ts +3 -0
- package/packages/locale/lang/ja-JP.ts +3 -0
- package/packages/locale/lang/zh-CN.ts +3 -0
- package/packages/locale/lang/zh-TC.ts +3 -0
- package/packages/modal/src/modal.ts +21 -14
- package/packages/table/src/table.ts +5 -9
- package/packages/v-x-e-table/src/conf.ts +4 -0
- package/styles/form.scss +1 -0
- package/styles/{base/loading.scss → loading.scss} +17 -4
- package/styles/modal.scss +1 -1
- package/styles/modules.scss +1 -0
- package/styles/select.scss +0 -1
- package/styles/table.scss +0 -1
- package/styles/v-x-e-table.scss +2 -0
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { defineComponent, h } from 'vue'
|
|
2
|
+
import GlobalConfig from '../../v-x-e-table/src/conf'
|
|
3
|
+
|
|
4
|
+
export default defineComponent({
|
|
5
|
+
name: 'VxeLoading',
|
|
6
|
+
props: {
|
|
7
|
+
loading: Boolean
|
|
8
|
+
},
|
|
9
|
+
render () {
|
|
10
|
+
const icon = GlobalConfig.icon.LOADING
|
|
11
|
+
const loadingText = GlobalConfig.loadingText
|
|
12
|
+
const text = loadingText === null ? loadingText : GlobalConfig.i18n('vxe.loading.text')
|
|
13
|
+
return h('div', {
|
|
14
|
+
class: ['vxe-loading', {
|
|
15
|
+
'is--visible': this.loading
|
|
16
|
+
}]
|
|
17
|
+
}, [
|
|
18
|
+
h('div', {
|
|
19
|
+
class: 'vxe-loading--chunk'
|
|
20
|
+
}, [
|
|
21
|
+
icon ? h('i', {
|
|
22
|
+
class: icon
|
|
23
|
+
}) : h('div', {
|
|
24
|
+
class: 'vxe-loading--spinner'
|
|
25
|
+
}),
|
|
26
|
+
text ? h('div', {
|
|
27
|
+
class: 'vxe-loading--text'
|
|
28
|
+
}, `${text}`) : null
|
|
29
|
+
])
|
|
30
|
+
])
|
|
31
|
+
}
|
|
32
|
+
})
|
|
@@ -7,6 +7,7 @@ import { errLog } from '../../tools/log'
|
|
|
7
7
|
import { GlobalEvent, hasEventKey, EVENT_KEYS } from '../../tools/event'
|
|
8
8
|
import GlobalConfig from '../../v-x-e-table/src/conf'
|
|
9
9
|
import VxeButtonConstructor from '../../button/src/button'
|
|
10
|
+
import VxeLoading from '../../loading/index'
|
|
10
11
|
|
|
11
12
|
import { VxeModalConstructor, VxeModalPropTypes, ModalReactData, VxeModalEmits, ModalEventTypes, VxeButtonInstance, ModalMethods, ModalPrivateRef, VxeModalMethods } from '../../../types/all'
|
|
12
13
|
|
|
@@ -85,7 +86,7 @@ export default defineComponent({
|
|
|
85
86
|
modalTop: 0,
|
|
86
87
|
modalZindex: 0,
|
|
87
88
|
zoomLocat: null,
|
|
88
|
-
firstOpen:
|
|
89
|
+
firstOpen: true
|
|
89
90
|
})
|
|
90
91
|
|
|
91
92
|
const refElem = ref() as Ref<HTMLDivElement>
|
|
@@ -361,18 +362,22 @@ export default defineComponent({
|
|
|
361
362
|
nextTick(() => {
|
|
362
363
|
const { fullscreen } = props
|
|
363
364
|
const { firstOpen } = reactData
|
|
364
|
-
if (!remember ||
|
|
365
|
+
if (!remember || firstOpen) {
|
|
365
366
|
updatePosition().then(() => {
|
|
366
367
|
setTimeout(() => updatePosition(), 20)
|
|
367
368
|
})
|
|
368
369
|
}
|
|
369
|
-
if (
|
|
370
|
-
reactData.firstOpen =
|
|
370
|
+
if (firstOpen) {
|
|
371
|
+
reactData.firstOpen = false
|
|
371
372
|
if (hasPosStorage()) {
|
|
372
373
|
restorePosStorage()
|
|
373
374
|
} else if (fullscreen) {
|
|
374
375
|
nextTick(() => maximize())
|
|
375
376
|
}
|
|
377
|
+
} else {
|
|
378
|
+
if (fullscreen) {
|
|
379
|
+
nextTick(() => maximize())
|
|
380
|
+
}
|
|
376
381
|
}
|
|
377
382
|
})
|
|
378
383
|
}
|
|
@@ -510,6 +515,7 @@ export default defineComponent({
|
|
|
510
515
|
}
|
|
511
516
|
boxElem.style.left = `${left}px`
|
|
512
517
|
boxElem.style.top = `${top}px`
|
|
518
|
+
boxElem.className = boxElem.className.replace(/\s?is--drag/, '') + ' is--drag'
|
|
513
519
|
}
|
|
514
520
|
document.onmouseup = () => {
|
|
515
521
|
document.onmousemove = domMousemove
|
|
@@ -519,6 +525,9 @@ export default defineComponent({
|
|
|
519
525
|
savePosStorage()
|
|
520
526
|
})
|
|
521
527
|
}
|
|
528
|
+
setTimeout(() => {
|
|
529
|
+
boxElem.className = boxElem.className.replace(/\s?is--drag/, '')
|
|
530
|
+
}, 50)
|
|
522
531
|
}
|
|
523
532
|
}
|
|
524
533
|
}
|
|
@@ -723,7 +732,7 @@ export default defineComponent({
|
|
|
723
732
|
headVNs.push(
|
|
724
733
|
h('div', {
|
|
725
734
|
class: ['vxe-modal--header', {
|
|
726
|
-
'is--
|
|
735
|
+
'is--draggable': draggable,
|
|
727
736
|
'is--ellipsis': !isMsg && props.showTitleOverflow
|
|
728
737
|
}],
|
|
729
738
|
...headerOns
|
|
@@ -756,16 +765,14 @@ export default defineComponent({
|
|
|
756
765
|
}, defaultSlot ? (!reactData.inited || (props.destroyOnClose && !reactData.visible) ? [] : defaultSlot({ $modal: $xemodal })) as VNode[] : getFuncText(content))
|
|
757
766
|
)
|
|
758
767
|
if (!isMsg) {
|
|
768
|
+
/**
|
|
769
|
+
* 加载中
|
|
770
|
+
*/
|
|
759
771
|
contVNs.push(
|
|
760
|
-
h(
|
|
761
|
-
class:
|
|
762
|
-
|
|
763
|
-
|
|
764
|
-
}, [
|
|
765
|
-
h('div', {
|
|
766
|
-
class: 'vxe-loading--spinner'
|
|
767
|
-
})
|
|
768
|
-
])
|
|
772
|
+
h(VxeLoading, {
|
|
773
|
+
class: 'vxe-modal--loading',
|
|
774
|
+
loading: props.loading
|
|
775
|
+
})
|
|
769
776
|
)
|
|
770
777
|
}
|
|
771
778
|
return [
|
|
@@ -13,6 +13,7 @@ import TableBodyComponent from './body'
|
|
|
13
13
|
import TableHeaderComponent from '../../header'
|
|
14
14
|
import tableProps from './props'
|
|
15
15
|
import tableEmits from './emits'
|
|
16
|
+
import VxeLoading from '../../loading/index'
|
|
16
17
|
import { getRowUniqueId, clearTableAllStatus, getRowkey, getRowid, rowToVisible, colToVisible, getCellValue, setCellValue, handleFieldOrColumn, toTreePathSeq, restoreScrollLocation, restoreScrollListener, XEBodyScrollElement } from './util'
|
|
17
18
|
|
|
18
19
|
import { VxeGridConstructor, VxeGridPrivateMethods, VxeTableConstructor, TableReactData, TableInternalData, VxeTablePropTypes, VxeToolbarConstructor, VxeTooltipInstance, TablePrivateMethods, VxeTablePrivateRef, VxeTablePrivateComputed, VxeTablePrivateMethods, VxeTableMethods, TableMethods, VxeMenuPanelInstance, VxeTableDefines, VxeTableProps } from '../../../types/all'
|
|
@@ -6030,15 +6031,10 @@ export default defineComponent({
|
|
|
6030
6031
|
/**
|
|
6031
6032
|
* 加载中
|
|
6032
6033
|
*/
|
|
6033
|
-
h(
|
|
6034
|
-
class:
|
|
6035
|
-
|
|
6036
|
-
|
|
6037
|
-
}, [
|
|
6038
|
-
h('div', {
|
|
6039
|
-
class: 'vxe-loading--spinner'
|
|
6040
|
-
})
|
|
6041
|
-
]),
|
|
6034
|
+
h(VxeLoading, {
|
|
6035
|
+
class: 'vxe-table--loading',
|
|
6036
|
+
loading
|
|
6037
|
+
}),
|
|
6042
6038
|
/**
|
|
6043
6039
|
* 筛选
|
|
6044
6040
|
*/
|
|
@@ -8,6 +8,7 @@ const GlobalConfig: VXETableGlobalConfig = {
|
|
|
8
8
|
version: 0, // 版本号,对于某些带数据缓存的功能有用到,上升版本号可以用于重置数据
|
|
9
9
|
// resizeInterval: 500,
|
|
10
10
|
emptyCell: ' ',
|
|
11
|
+
loadingText: null, // 自定义loading提示内容,如果为null则不显示文本
|
|
11
12
|
table: {
|
|
12
13
|
fit: true,
|
|
13
14
|
showHeader: true,
|
|
@@ -125,6 +126,9 @@ const GlobalConfig: VXETableGlobalConfig = {
|
|
|
125
126
|
types: {}
|
|
126
127
|
},
|
|
127
128
|
icon: {
|
|
129
|
+
// loading
|
|
130
|
+
// LOADING: iconPrefix + 'refresh roll vxe-loading--default-icon',
|
|
131
|
+
|
|
128
132
|
// table
|
|
129
133
|
TABLE_SORT_ASC: iconPrefix + 'caret-top',
|
|
130
134
|
TABLE_SORT_DESC: iconPrefix + 'caret-bottom',
|
package/styles/form.scss
CHANGED
|
@@ -12,13 +12,26 @@
|
|
|
12
12
|
&.is--visible {
|
|
13
13
|
display: block;
|
|
14
14
|
}
|
|
15
|
+
& > .vxe-loading--chunk {
|
|
16
|
+
width: 100%;
|
|
17
|
+
position: absolute;
|
|
18
|
+
top: 50%;
|
|
19
|
+
left: 0;
|
|
20
|
+
transform: translateY(-50%);
|
|
21
|
+
text-align: center;
|
|
22
|
+
color: $vxe-primary-color;
|
|
23
|
+
}
|
|
24
|
+
.vxe-loading--default-icon {
|
|
25
|
+
font-size: 1.2em;
|
|
26
|
+
}
|
|
27
|
+
.vxe-loading--text {
|
|
28
|
+
padding: 0.4em 0;
|
|
29
|
+
}
|
|
15
30
|
.vxe-loading--spinner {
|
|
31
|
+
display: inline-block;
|
|
32
|
+
position: relative;
|
|
16
33
|
width: 56px;
|
|
17
34
|
height: 56px;
|
|
18
|
-
position: absolute;
|
|
19
|
-
top: 50%;
|
|
20
|
-
left: 50%;
|
|
21
|
-
transform: translate(-50%, -50%);
|
|
22
35
|
&:before,
|
|
23
36
|
&:after {
|
|
24
37
|
content: "";
|
package/styles/modal.scss
CHANGED
package/styles/modules.scss
CHANGED
package/styles/select.scss
CHANGED
package/styles/table.scss
CHANGED
package/styles/v-x-e-table.scss
CHANGED