vxe-table 3.8.12 → 3.8.13
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/lib/filter/src/mixin.js +19 -14
- package/lib/filter/src/mixin.min.js +1 -1
- package/lib/filter/src/panel.js +1 -1
- package/lib/filter/src/panel.min.js +1 -1
- package/lib/icon/style/style.css +1 -1
- package/lib/icon/style/style.min.css +1 -1
- package/lib/index.css +1 -1
- package/lib/index.umd.js +68 -59
- package/lib/index.umd.min.js +1 -1
- package/lib/modal/src/modal.js +33 -33
- package/lib/modal/src/modal.min.js +1 -1
- package/lib/style.css +1 -1
- package/lib/style.min.css +1 -1
- package/lib/table/src/methods.js +13 -9
- package/lib/table/src/methods.min.js +1 -1
- package/lib/table/style/style.css +2 -1
- 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/vxe-table/style/style.css +2 -1
- package/lib/vxe-table/style/style.min.css +1 -1
- package/package.json +1 -1
- package/packages/filter/src/mixin.js +17 -14
- package/packages/filter/src/panel.js +1 -1
- package/packages/modal/src/modal.js +36 -36
- package/packages/table/src/methods.js +13 -9
- package/styles/table.scss +2 -1
- /package/lib/icon/style/{iconfont.1721008774130.ttf → iconfont.1721119959483.ttf} +0 -0
- /package/lib/icon/style/{iconfont.1721008774130.woff → iconfont.1721119959483.woff} +0 -0
- /package/lib/icon/style/{iconfont.1721008774130.woff2 → iconfont.1721119959483.woff2} +0 -0
- /package/lib/{iconfont.1721008774130.ttf → iconfont.1721119959483.ttf} +0 -0
- /package/lib/{iconfont.1721008774130.woff → iconfont.1721119959483.woff} +0 -0
- /package/lib/{iconfont.1721008774130.woff2 → iconfont.1721119959483.woff2} +0 -0
|
@@ -66,12 +66,12 @@ export default {
|
|
|
66
66
|
},
|
|
67
67
|
data () {
|
|
68
68
|
return {
|
|
69
|
-
|
|
69
|
+
initialized: false,
|
|
70
70
|
visible: false,
|
|
71
71
|
contentVisible: false,
|
|
72
72
|
modalTop: 0,
|
|
73
73
|
modalZindex: 0,
|
|
74
|
-
|
|
74
|
+
revertLocat: null,
|
|
75
75
|
firstOpen: true
|
|
76
76
|
}
|
|
77
77
|
},
|
|
@@ -123,7 +123,7 @@ export default {
|
|
|
123
123
|
}
|
|
124
124
|
},
|
|
125
125
|
render (h) {
|
|
126
|
-
const { _e, $scopedSlots, slots = {},
|
|
126
|
+
const { _e, $scopedSlots, slots = {}, initialized, vSize, className, type, resize, showClose, showZoom, animat, draggable, loading, status, iconStatus, showFooter, revertLocat, modalTop, dblclickZoom, contentVisible, visible, title, lockScroll, lockView, mask, isMsg, showTitleOverflow, destroyOnClose, showCancelButton, showConfirmButton } = this
|
|
127
127
|
const content = this.content || this.message
|
|
128
128
|
const defaultSlot = $scopedSlots.default || slots.default
|
|
129
129
|
const footerSlot = $scopedSlots.footer || slots.footer
|
|
@@ -146,7 +146,7 @@ export default {
|
|
|
146
146
|
'lock--view': lockView,
|
|
147
147
|
'is--resize': resize,
|
|
148
148
|
'is--mask': mask,
|
|
149
|
-
'is--maximize':
|
|
149
|
+
'is--maximize': revertLocat,
|
|
150
150
|
'is--visible': contentVisible,
|
|
151
151
|
'is--active': visible,
|
|
152
152
|
'is--loading': loading
|
|
@@ -172,7 +172,7 @@ export default {
|
|
|
172
172
|
'is--ellipsis': !isMsg && showTitleOverflow
|
|
173
173
|
}],
|
|
174
174
|
on: headerOns
|
|
175
|
-
}, headerSlot ? (!
|
|
175
|
+
}, headerSlot ? (!initialized || (destroyOnClose && !visible) ? [] : getSlotVNs(headerSlot.call(this, { $modal: this }, h))) : [
|
|
176
176
|
h('div', {
|
|
177
177
|
class: 'vxe-modal--header-title'
|
|
178
178
|
}, titleSlot ? getSlotVNs(titleSlot.call(this, { $modal: this }, h)) : (title ? getFuncText(title) : GlobalConfig.i18n('vxe.alert.title'))),
|
|
@@ -183,9 +183,9 @@ export default {
|
|
|
183
183
|
class: 'vxe-modal--corner-wrapper'
|
|
184
184
|
}, getSlotVNs(cornerSlot({ $modal: this }))) : _e(),
|
|
185
185
|
showZoom ? h('i', {
|
|
186
|
-
class: ['vxe-modal--zoom-btn', 'trigger--btn',
|
|
186
|
+
class: ['vxe-modal--zoom-btn', 'trigger--btn', revertLocat ? GlobalConfig.icon.MODAL_ZOOM_OUT : GlobalConfig.icon.MODAL_ZOOM_IN],
|
|
187
187
|
attrs: {
|
|
188
|
-
title: GlobalConfig.i18n(`vxe.modal.zoom${
|
|
188
|
+
title: GlobalConfig.i18n(`vxe.modal.zoom${revertLocat ? 'Out' : 'In'}`)
|
|
189
189
|
},
|
|
190
190
|
on: {
|
|
191
191
|
click: this.toggleZoomEvent
|
|
@@ -214,7 +214,7 @@ export default {
|
|
|
214
214
|
]) : null,
|
|
215
215
|
h('div', {
|
|
216
216
|
class: 'vxe-modal--content'
|
|
217
|
-
}, defaultSlot ? (!
|
|
217
|
+
}, defaultSlot ? (!initialized || (destroyOnClose && !visible) ? [] : getSlotVNs(defaultSlot.call(this, { $modal: this }, h))) : getFuncText(content)),
|
|
218
218
|
/**
|
|
219
219
|
* 加载中
|
|
220
220
|
*/
|
|
@@ -227,7 +227,7 @@ export default {
|
|
|
227
227
|
]),
|
|
228
228
|
showFooter ? h('div', {
|
|
229
229
|
class: 'vxe-modal--footer'
|
|
230
|
-
}, footerSlot ? (!
|
|
230
|
+
}, footerSlot ? (!initialized || (destroyOnClose && !visible) ? [] : getSlotVNs(footerSlot.call(this, { $modal: this }, h))) : [
|
|
231
231
|
XEUtils.isBoolean(showCancelButton) ? showCancelButton : type === 'confirm' ? h('vxe-button', {
|
|
232
232
|
key: 1,
|
|
233
233
|
ref: 'cancelBtn',
|
|
@@ -318,9 +318,9 @@ export default {
|
|
|
318
318
|
this.close(type)
|
|
319
319
|
},
|
|
320
320
|
open () {
|
|
321
|
-
const { $refs, events = {},
|
|
322
|
-
if (!
|
|
323
|
-
this.
|
|
321
|
+
const { $refs, events = {}, initialized, duration, visible, isMsg, remember, showFooter } = this
|
|
322
|
+
if (!initialized) {
|
|
323
|
+
this.initialized = true
|
|
324
324
|
if (this.transfer) {
|
|
325
325
|
document.body.appendChild(this.$el)
|
|
326
326
|
}
|
|
@@ -440,7 +440,7 @@ export default {
|
|
|
440
440
|
}
|
|
441
441
|
this.contentVisible = false
|
|
442
442
|
if (!remember) {
|
|
443
|
-
this.
|
|
443
|
+
this.revertLocat = null
|
|
444
444
|
}
|
|
445
445
|
XEUtils.remove(allActivedModals, item => item === this)
|
|
446
446
|
this.$emit('before-hide', params)
|
|
@@ -475,15 +475,15 @@ export default {
|
|
|
475
475
|
return this.$refs.modalBox
|
|
476
476
|
},
|
|
477
477
|
isMaximized () {
|
|
478
|
-
return !!this.
|
|
478
|
+
return !!this.revertLocat
|
|
479
479
|
},
|
|
480
480
|
maximize () {
|
|
481
481
|
return this.$nextTick().then(() => {
|
|
482
|
-
if (!this.
|
|
482
|
+
if (!this.revertLocat) {
|
|
483
483
|
const marginSize = Math.max(0, this.marginSize)
|
|
484
484
|
const modalBoxElem = this.getBox()
|
|
485
485
|
const { visibleHeight, visibleWidth } = DomTools.getDomNode()
|
|
486
|
-
this.
|
|
486
|
+
this.revertLocat = {
|
|
487
487
|
top: modalBoxElem.offsetTop,
|
|
488
488
|
left: modalBoxElem.offsetLeft,
|
|
489
489
|
width: modalBoxElem.offsetWidth + (modalBoxElem.style.width ? 0 : 1),
|
|
@@ -501,26 +501,26 @@ export default {
|
|
|
501
501
|
},
|
|
502
502
|
revert () {
|
|
503
503
|
return this.$nextTick().then(() => {
|
|
504
|
-
const
|
|
505
|
-
if (
|
|
504
|
+
const revertLocat = this.revertLocat
|
|
505
|
+
if (revertLocat) {
|
|
506
506
|
const modalBoxElem = this.getBox()
|
|
507
|
-
this.
|
|
507
|
+
this.revertLocat = null
|
|
508
508
|
Object.assign(modalBoxElem.style, {
|
|
509
|
-
top: `${
|
|
510
|
-
left: `${
|
|
511
|
-
width: `${
|
|
512
|
-
height: `${
|
|
509
|
+
top: `${revertLocat.top}px`,
|
|
510
|
+
left: `${revertLocat.left}px`,
|
|
511
|
+
width: `${revertLocat.width}px`,
|
|
512
|
+
height: `${revertLocat.height}px`
|
|
513
513
|
})
|
|
514
514
|
this.savePosStorage()
|
|
515
515
|
}
|
|
516
516
|
})
|
|
517
517
|
},
|
|
518
518
|
zoom () {
|
|
519
|
-
return this[this.
|
|
519
|
+
return this[this.revertLocat ? 'revert' : 'maximize']().then(() => this.isMaximized())
|
|
520
520
|
},
|
|
521
521
|
toggleZoomEvent (evnt) {
|
|
522
|
-
const { $listeners,
|
|
523
|
-
const params = { type:
|
|
522
|
+
const { $listeners, revertLocat, events = {} } = this
|
|
523
|
+
const params = { type: revertLocat ? 'revert' : 'max', $modal: this, $event: evnt }
|
|
524
524
|
return this.zoom().then(() => {
|
|
525
525
|
if ($listeners.zoom) {
|
|
526
526
|
this.$emit('zoom', params)
|
|
@@ -560,9 +560,9 @@ export default {
|
|
|
560
560
|
}
|
|
561
561
|
},
|
|
562
562
|
mousedownEvent (evnt) {
|
|
563
|
-
const { remember, storage, marginSize,
|
|
563
|
+
const { remember, storage, marginSize, revertLocat } = this
|
|
564
564
|
const modalBoxElem = this.getBox()
|
|
565
|
-
if (!
|
|
565
|
+
if (!revertLocat && evnt.button === 0 && !DomTools.getEventTargetNode(evnt, modalBoxElem, 'trigger--btn').flag) {
|
|
566
566
|
evnt.preventDefault()
|
|
567
567
|
const domMousemove = document.onmousemove
|
|
568
568
|
const domMouseup = document.onmouseup
|
|
@@ -754,7 +754,7 @@ export default {
|
|
|
754
754
|
}
|
|
755
755
|
}
|
|
756
756
|
document.onmouseup = () => {
|
|
757
|
-
this.
|
|
757
|
+
this.revertLocat = null
|
|
758
758
|
document.onmousemove = domMousemove
|
|
759
759
|
document.onmouseup = domMouseup
|
|
760
760
|
setTimeout(() => {
|
|
@@ -791,7 +791,7 @@ export default {
|
|
|
791
791
|
modalBoxElem.style.height = `${height}px`
|
|
792
792
|
}
|
|
793
793
|
if (zoomLeft && zoomTop) {
|
|
794
|
-
this.
|
|
794
|
+
this.revertLocat = {
|
|
795
795
|
left: zoomLeft,
|
|
796
796
|
top: zoomTop,
|
|
797
797
|
width: zoomWidth,
|
|
@@ -802,7 +802,7 @@ export default {
|
|
|
802
802
|
}
|
|
803
803
|
},
|
|
804
804
|
savePosStorage () {
|
|
805
|
-
const { id, remember, storage, storageKey,
|
|
805
|
+
const { id, remember, storage, storageKey, revertLocat } = this
|
|
806
806
|
if (remember && storage) {
|
|
807
807
|
const modalBoxElem = this.getBox()
|
|
808
808
|
const posStorageMap = this.getStorageMap(storageKey)
|
|
@@ -811,11 +811,11 @@ export default {
|
|
|
811
811
|
modalBoxElem.style.top,
|
|
812
812
|
modalBoxElem.style.width,
|
|
813
813
|
modalBoxElem.style.height
|
|
814
|
-
].concat(
|
|
815
|
-
|
|
816
|
-
|
|
817
|
-
|
|
818
|
-
|
|
814
|
+
].concat(revertLocat ? [
|
|
815
|
+
revertLocat.left,
|
|
816
|
+
revertLocat.top,
|
|
817
|
+
revertLocat.width,
|
|
818
|
+
revertLocat.height
|
|
819
819
|
] : []).map(val => val ? XEUtils.toNumber(val) : '').join(',')
|
|
820
820
|
localStorage.setItem(storageKey, XEUtils.toJSONString(posStorageMap))
|
|
821
821
|
}
|
|
@@ -2095,7 +2095,7 @@ const Methods = {
|
|
|
2095
2095
|
const el = this.$el
|
|
2096
2096
|
if (el) {
|
|
2097
2097
|
autoWidthColumnList.forEach(column => {
|
|
2098
|
-
const cellElList = el.querySelectorAll(`.vxe-body--column.${column.id}>.vxe-cell`)
|
|
2098
|
+
const cellElList = el.querySelectorAll(`.vxe-header--column.${column.id}>.vxe-cell,.vxe-body--column.${column.id}>.vxe-cell,.vxe-footer--column.${column.id}>.vxe-cell`)
|
|
2099
2099
|
const firstCellEl = cellElList[0]
|
|
2100
2100
|
let paddingSize = 0
|
|
2101
2101
|
if (firstCellEl) {
|
|
@@ -2223,19 +2223,23 @@ const Methods = {
|
|
|
2223
2223
|
} else {
|
|
2224
2224
|
this.headerHeight = 0
|
|
2225
2225
|
}
|
|
2226
|
+
let overflowX = false
|
|
2227
|
+
let footerHeight = 0
|
|
2228
|
+
let scrollbarHeight = 0
|
|
2226
2229
|
if (footerElem) {
|
|
2227
|
-
|
|
2228
|
-
|
|
2229
|
-
|
|
2230
|
-
this.footerHeight = footerHeight
|
|
2230
|
+
footerHeight = footerElem.offsetHeight
|
|
2231
|
+
overflowX = tableWidth > footerElem.clientWidth
|
|
2232
|
+
scrollbarHeight = Math.max(footerHeight - footerElem.clientHeight, 0)
|
|
2231
2233
|
} else {
|
|
2232
|
-
|
|
2233
|
-
|
|
2234
|
-
this.overflowX = tableWidth > bodyWidth
|
|
2234
|
+
overflowX = tableWidth > bodyWidth
|
|
2235
|
+
scrollbarHeight = Math.max(tableHeight - bodyElem.clientHeight, 0)
|
|
2235
2236
|
}
|
|
2237
|
+
this.footerHeight = footerHeight
|
|
2238
|
+
this.overflowX = tableWidth > bodyWidth
|
|
2239
|
+
this.scrollbarHeight = scrollbarHeight
|
|
2236
2240
|
this.updateHeight()
|
|
2237
2241
|
this.parentHeight = Math.max(this.headerHeight + this.footerHeight + 20, this.getParentHeight())
|
|
2238
|
-
if (
|
|
2242
|
+
if (overflowX) {
|
|
2239
2243
|
this.checkScrolling()
|
|
2240
2244
|
}
|
|
2241
2245
|
},
|
package/styles/table.scss
CHANGED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|