vxe-table 3.12.0 → 3.12.1-beta.0
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/grid/src/grid.js +46 -9
- package/es/grid/style.css +14 -0
- package/es/grid/style.min.css +1 -1
- package/es/index.css +1 -1
- package/es/index.min.css +1 -1
- package/es/style.css +1 -1
- package/es/style.min.css +1 -1
- package/es/table/src/column.js +2 -2
- package/es/table/src/group.js +2 -2
- package/es/toolbar/src/toolbar.js +2 -2
- package/es/ui/index.js +1 -1
- package/es/ui/src/dom.js +6 -0
- package/es/ui/src/log.js +1 -1
- package/es/vxe-grid/style.css +14 -0
- package/es/vxe-grid/style.min.css +1 -1
- package/lib/grid/src/grid.js +42 -13
- package/lib/grid/src/grid.min.js +1 -1
- package/lib/grid/style/style.css +14 -0
- package/lib/grid/style/style.min.css +1 -1
- package/lib/index.css +1 -1
- package/lib/index.min.css +1 -1
- package/lib/index.umd.js +50 -15
- package/lib/index.umd.min.js +1 -1
- package/lib/style.css +1 -1
- package/lib/style.min.css +1 -1
- package/lib/ui/index.js +1 -1
- package/lib/ui/index.min.js +1 -1
- package/lib/ui/src/dom.js +7 -0
- package/lib/ui/src/dom.min.js +1 -1
- package/lib/ui/src/log.js +1 -1
- package/lib/ui/src/log.min.js +1 -1
- package/lib/vxe-grid/style/style.css +14 -0
- package/lib/vxe-grid/style/style.min.css +1 -1
- package/package.json +2 -2
- package/packages/grid/src/grid.ts +49 -10
- package/packages/ui/src/dom.ts +7 -0
- package/styles/components/grid.scss +13 -0
- /package/es/{iconfont.1735661059384.ttf → iconfont.1735796308780.ttf} +0 -0
- /package/es/{iconfont.1735661059384.woff → iconfont.1735796308780.woff} +0 -0
- /package/es/{iconfont.1735661059384.woff2 → iconfont.1735796308780.woff2} +0 -0
- /package/lib/{iconfont.1735661059384.ttf → iconfont.1735796308780.ttf} +0 -0
- /package/lib/{iconfont.1735661059384.woff → iconfont.1735796308780.woff} +0 -0
- /package/lib/{iconfont.1735661059384.woff2 → iconfont.1735796308780.woff2} +0 -0
|
@@ -1,5 +1,8 @@
|
|
|
1
1
|
.vxe-grid {
|
|
2
2
|
position: relative;
|
|
3
|
+
display: flex;
|
|
4
|
+
flex-direction: row;
|
|
5
|
+
overflow: auto;
|
|
3
6
|
}
|
|
4
7
|
.vxe-grid.is--loading:before {
|
|
5
8
|
content: "";
|
|
@@ -46,6 +49,17 @@
|
|
|
46
49
|
overflow: hidden;
|
|
47
50
|
}
|
|
48
51
|
|
|
52
|
+
.vxe-grid--aside-left-wrapper,
|
|
53
|
+
.vxe-grid--aside-right-wrapper {
|
|
54
|
+
flex-shrink: 0;
|
|
55
|
+
overflow: auto;
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
.vxe-grid--body-content-wrapper {
|
|
59
|
+
flex-grow: 1;
|
|
60
|
+
overflow: auto;
|
|
61
|
+
}
|
|
62
|
+
|
|
49
63
|
.vxe-grid {
|
|
50
64
|
font-size: var(--vxe-ui-font-size-default);
|
|
51
65
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
.vxe-grid{position:relative}.vxe-grid.is--loading:before{content:"";position:absolute;top:0;left:0;width:100%;height:100%;z-index:99;-webkit-user-select:none;-moz-user-select:none;user-select:none;background-color:var(--vxe-ui-loading-background-color)}.vxe-grid.is--loading>.vxe-table .vxe-loading{background-color:transparent}.vxe-grid.is--maximize{position:fixed;top:0;left:0;width:100%;height:100%;padding:.5em 1em;background-color:var(--vxe-ui-layout-background-color)}.vxe-grid .vxe-grid--bottom-wrapper,.vxe-grid .vxe-grid--form-wrapper,.vxe-grid .vxe-grid--top-wrapper{position:relative}.vxe-grid .vxe-grid--table-container{display:flex;flex-direction:row}.vxe-grid .vxe-grid--left-wrapper,.vxe-grid .vxe-grid--right-wrapper{flex-shrink:0;overflow:auto;outline:0}.vxe-grid .vxe-grid--table-wrapper{flex-grow:1;overflow:hidden}.vxe-grid{font-size:var(--vxe-ui-font-size-default)}.vxe-grid.size--medium{font-size:var(--vxe-ui-font-size-medium)}.vxe-grid.size--small{font-size:var(--vxe-ui-font-size-small)}.vxe-grid.size--mini{font-size:var(--vxe-ui-font-size-mini)}
|
|
1
|
+
.vxe-grid{position:relative;display:flex;flex-direction:row;overflow:auto}.vxe-grid.is--loading:before{content:"";position:absolute;top:0;left:0;width:100%;height:100%;z-index:99;-webkit-user-select:none;-moz-user-select:none;user-select:none;background-color:var(--vxe-ui-loading-background-color)}.vxe-grid.is--loading>.vxe-table .vxe-loading{background-color:transparent}.vxe-grid.is--maximize{position:fixed;top:0;left:0;width:100%;height:100%;padding:.5em 1em;background-color:var(--vxe-ui-layout-background-color)}.vxe-grid .vxe-grid--bottom-wrapper,.vxe-grid .vxe-grid--form-wrapper,.vxe-grid .vxe-grid--top-wrapper{position:relative}.vxe-grid .vxe-grid--table-container{display:flex;flex-direction:row}.vxe-grid .vxe-grid--left-wrapper,.vxe-grid .vxe-grid--right-wrapper{flex-shrink:0;overflow:auto;outline:0}.vxe-grid .vxe-grid--table-wrapper{flex-grow:1;overflow:hidden}.vxe-grid--aside-left-wrapper,.vxe-grid--aside-right-wrapper{flex-shrink:0;overflow:auto}.vxe-grid--body-content-wrapper{flex-grow:1;overflow:auto}.vxe-grid{font-size:var(--vxe-ui-font-size-default)}.vxe-grid.size--medium{font-size:var(--vxe-ui-font-size-medium)}.vxe-grid.size--small{font-size:var(--vxe-ui-font-size-small)}.vxe-grid.size--mini{font-size:var(--vxe-ui-font-size-mini)}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "vxe-table",
|
|
3
|
-
"version": "3.12.0",
|
|
3
|
+
"version": "3.12.1-beta.0",
|
|
4
4
|
"description": "一个基于 vue 的 PC 端表格组件,支持增删改查、虚拟树、拖拽排序,懒加载、快捷菜单、数据校验、树形结构、打印、导入导出、自定义模板、渲染器、JSON 配置式...",
|
|
5
5
|
"scripts": {
|
|
6
6
|
"update": "npm install --legacy-peer-deps",
|
|
@@ -28,7 +28,7 @@
|
|
|
28
28
|
"style": "lib/style.css",
|
|
29
29
|
"typings": "types/index.d.ts",
|
|
30
30
|
"dependencies": {
|
|
31
|
-
"vxe-pc-ui": "^3.3.
|
|
31
|
+
"vxe-pc-ui": "^3.3.60"
|
|
32
32
|
},
|
|
33
33
|
"devDependencies": {
|
|
34
34
|
"@babel/plugin-transform-modules-commonjs": "^7.25.7",
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { CreateElement, VNode } from 'vue'
|
|
2
2
|
import XEUtils from 'xe-utils'
|
|
3
3
|
import { getLastZIndex, nextZIndex, isEnableConf } from '../../ui/src/utils'
|
|
4
|
-
import { getOffsetHeight, getPaddingTopBottomSize, getDomNode } from '../../ui/src/dom'
|
|
4
|
+
import { getOffsetHeight, getPaddingTopBottomSize, getDomNode, toCssUnit } from '../../ui/src/dom'
|
|
5
5
|
import { VxeUI } from '../../ui'
|
|
6
6
|
import VxeTableComponent from '../../table/src/table'
|
|
7
7
|
import VxeToolbarComponent from '../../toolbar/src/toolbar'
|
|
@@ -9,7 +9,8 @@ import tableComponentProps from '../../table/src/props'
|
|
|
9
9
|
import { getSlotVNs } from '../../ui/src/vn'
|
|
10
10
|
import { warnLog, errLog } from '../../ui/src/log'
|
|
11
11
|
|
|
12
|
-
import type { VxeFormComponent, VxePagerComponent } from 'vxe-pc-ui'
|
|
12
|
+
import type { VxeFormComponent, VxePagerComponent, VxeComponentStyleType } from 'vxe-pc-ui'
|
|
13
|
+
import type{ GridReactData } from '../../../types'
|
|
13
14
|
|
|
14
15
|
const { getConfig, getI18n, commands, globalEvents, globalMixins, renderEmptyElement } = VxeUI
|
|
15
16
|
|
|
@@ -430,8 +431,25 @@ export default {
|
|
|
430
431
|
computeZoomOpts () {
|
|
431
432
|
return Object.assign({}, getConfig().grid.zoomConfig, this.zoomConfig)
|
|
432
433
|
},
|
|
433
|
-
|
|
434
|
-
|
|
434
|
+
computeStyles () {
|
|
435
|
+
const $xeGrid = this
|
|
436
|
+
const props = $xeGrid
|
|
437
|
+
const reactData = $xeGrid as GridReactData
|
|
438
|
+
|
|
439
|
+
const { height, maxHeight } = props
|
|
440
|
+
const { isZMax, tZindex } = reactData
|
|
441
|
+
const stys: VxeComponentStyleType = {}
|
|
442
|
+
if (isZMax) {
|
|
443
|
+
stys.zIndex = tZindex
|
|
444
|
+
} else {
|
|
445
|
+
if (height) {
|
|
446
|
+
stys.height = height === 'auto' || height === '100%' ? '100%' : toCssUnit(height)
|
|
447
|
+
}
|
|
448
|
+
if (maxHeight) {
|
|
449
|
+
stys.maxHeight = maxHeight === 'auto' || maxHeight === '100%' ? '100%' : toCssUnit(maxHeight)
|
|
450
|
+
}
|
|
451
|
+
}
|
|
452
|
+
return stys
|
|
435
453
|
},
|
|
436
454
|
tableExtendProps () {
|
|
437
455
|
const rest: any = {}
|
|
@@ -544,18 +562,39 @@ export default {
|
|
|
544
562
|
globalEvents.off(this, 'keydown')
|
|
545
563
|
},
|
|
546
564
|
render (this: any, h: CreateElement) {
|
|
547
|
-
const
|
|
548
|
-
const
|
|
565
|
+
const $xeGrid = this
|
|
566
|
+
const props = $xeGrid
|
|
567
|
+
const reactData = $xeGrid as GridReactData
|
|
568
|
+
const slots = $xeGrid.$scopedSlots
|
|
569
|
+
|
|
570
|
+
const vSize = $xeGrid.computeSize
|
|
571
|
+
const styles = $xeGrid.computeStyles
|
|
572
|
+
const asideLeftSlot = slots.asideLeft || slots['aside-left']
|
|
573
|
+
const asideRightSlot = slots.asideRight || slots['aside-right']
|
|
549
574
|
return h('div', {
|
|
550
575
|
class: ['vxe-grid', {
|
|
551
576
|
[`size--${vSize}`]: vSize,
|
|
552
577
|
'is--animat': !!this.animat,
|
|
553
578
|
'is--round': this.round,
|
|
554
|
-
'is--maximize': isZMax,
|
|
555
|
-
'is--loading':
|
|
579
|
+
'is--maximize': reactData.isZMax,
|
|
580
|
+
'is--loading': props.loading || reactData.tableLoading
|
|
556
581
|
}],
|
|
557
|
-
style:
|
|
558
|
-
},
|
|
582
|
+
style: styles
|
|
583
|
+
}, [
|
|
584
|
+
asideLeftSlot
|
|
585
|
+
? h('div', {
|
|
586
|
+
class: 'vxe-grid--aside-left-wrapper'
|
|
587
|
+
}, asideLeftSlot.call($xeGrid, {}))
|
|
588
|
+
: renderEmptyElement($xeGrid),
|
|
589
|
+
h('div', {
|
|
590
|
+
class: 'vxe-grid--body-content-wrapper'
|
|
591
|
+
}, renderLayout(h, $xeGrid)),
|
|
592
|
+
asideRightSlot
|
|
593
|
+
? h('div', {
|
|
594
|
+
class: 'vxe-grid--aside-right-wrapper'
|
|
595
|
+
}, asideRightSlot.call($xeGrid, {}))
|
|
596
|
+
: renderEmptyElement($xeGrid)
|
|
597
|
+
])
|
|
559
598
|
},
|
|
560
599
|
methods: {
|
|
561
600
|
...methods,
|
package/packages/ui/src/dom.ts
CHANGED
|
@@ -73,6 +73,13 @@ export function addClass (elem: any, cls: string) {
|
|
|
73
73
|
}
|
|
74
74
|
}
|
|
75
75
|
|
|
76
|
+
export function toCssUnit (val?: number | string, unit = 'px') {
|
|
77
|
+
if (XEUtils.isNumber(val) || /^\d+$/.test(`${val}`)) {
|
|
78
|
+
return `${val}${unit}`
|
|
79
|
+
}
|
|
80
|
+
return `${val || ''}`
|
|
81
|
+
}
|
|
82
|
+
|
|
76
83
|
export function getDomNode () {
|
|
77
84
|
const documentElement = document.documentElement
|
|
78
85
|
const bodyElem = document.body
|
|
@@ -1,5 +1,8 @@
|
|
|
1
1
|
.vxe-grid {
|
|
2
2
|
position: relative;
|
|
3
|
+
display: flex;
|
|
4
|
+
flex-direction: row;
|
|
5
|
+
overflow: auto;
|
|
3
6
|
&.is--loading {
|
|
4
7
|
&:before {
|
|
5
8
|
content: "";
|
|
@@ -48,6 +51,16 @@
|
|
|
48
51
|
}
|
|
49
52
|
}
|
|
50
53
|
|
|
54
|
+
.vxe-grid--aside-left-wrapper,
|
|
55
|
+
.vxe-grid--aside-right-wrapper {
|
|
56
|
+
flex-shrink: 0;
|
|
57
|
+
overflow: auto;
|
|
58
|
+
}
|
|
59
|
+
.vxe-grid--body-content-wrapper {
|
|
60
|
+
flex-grow: 1;
|
|
61
|
+
overflow: auto;
|
|
62
|
+
}
|
|
63
|
+
|
|
51
64
|
.vxe-grid {
|
|
52
65
|
font-size: var(--vxe-ui-font-size-default);
|
|
53
66
|
&.size--medium {
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|