vxe-table 4.9.8 → 4.9.10
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/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/module/edit/hook.js +16 -4
- package/es/table/module/export/import-panel.js +1 -1
- package/es/table/src/body.js +9 -6
- package/es/table/src/columnInfo.js +1 -1
- package/es/table/src/footer.js +7 -1
- package/es/table/src/table.js +13 -5
- package/es/table/src/util.js +0 -10
- package/es/table/style.css +1 -1
- package/es/table/style.min.css +1 -1
- package/es/ui/index.js +1 -1
- package/es/ui/src/log.js +1 -1
- package/es/vxe-table/style.css +1 -1
- package/es/vxe-table/style.min.css +1 -1
- package/lib/index.css +1 -1
- package/lib/index.min.css +1 -1
- package/lib/index.umd.js +74 -32
- package/lib/index.umd.min.js +1 -1
- package/lib/style.css +1 -1
- package/lib/style.min.css +1 -1
- package/lib/table/module/edit/hook.js +38 -4
- package/lib/table/module/edit/hook.min.js +1 -1
- package/lib/table/module/export/import-panel.js +1 -1
- package/lib/table/module/export/import-panel.min.js +1 -1
- package/lib/table/src/body.js +9 -6
- package/lib/table/src/body.min.js +1 -1
- package/lib/table/src/columnInfo.js +3 -3
- package/lib/table/src/columnInfo.min.js +1 -1
- package/lib/table/src/footer.js +7 -1
- package/lib/table/src/footer.min.js +1 -1
- package/lib/table/src/table.js +14 -5
- package/lib/table/src/table.min.js +1 -1
- package/lib/table/src/util.js +0 -10
- package/lib/table/style/style.css +1 -1
- package/lib/table/style/style.min.css +1 -1
- package/lib/ui/index.js +1 -1
- package/lib/ui/index.min.js +1 -1
- package/lib/ui/src/log.js +1 -1
- package/lib/ui/src/log.min.js +1 -1
- package/lib/vxe-table/style/style.css +1 -1
- package/lib/vxe-table/style/style.min.css +1 -1
- package/package.json +2 -2
- package/packages/table/module/edit/hook.ts +16 -4
- package/packages/table/module/export/import-panel.ts +1 -1
- package/packages/table/src/body.ts +14 -11
- package/packages/table/src/columnInfo.ts +1 -1
- package/packages/table/src/footer.ts +7 -1
- package/packages/table/src/table.ts +18 -8
- package/packages/table/src/util.ts +0 -16
- package/styles/components/table.scss +1 -1
- /package/es/{iconfont.1732522568827.ttf → iconfont.1732797516206.ttf} +0 -0
- /package/es/{iconfont.1732522568827.woff → iconfont.1732797516206.woff} +0 -0
- /package/es/{iconfont.1732522568827.woff2 → iconfont.1732797516206.woff2} +0 -0
- /package/lib/{iconfont.1732522568827.ttf → iconfont.1732797516206.ttf} +0 -0
- /package/lib/{iconfont.1732522568827.woff → iconfont.1732797516206.woff} +0 -0
- /package/lib/{iconfont.1732522568827.woff2 → iconfont.1732797516206.woff2} +0 -0
|
@@ -9,7 +9,7 @@ import TableHeaderComponent from './header'
|
|
|
9
9
|
import TableFooterComponent from './footer'
|
|
10
10
|
import tableProps from './props'
|
|
11
11
|
import tableEmits from './emits'
|
|
12
|
-
import { getRowUniqueId, clearTableAllStatus, getRowkey, getRowid, rowToVisible, colToVisible, getCellValue, setCellValue, handleFieldOrColumn, toTreePathSeq, restoreScrollLocation,
|
|
12
|
+
import { getRowUniqueId, clearTableAllStatus, getRowkey, getRowid, rowToVisible, colToVisible, getCellValue, setCellValue, handleFieldOrColumn, toTreePathSeq, restoreScrollLocation, getRootColumn, getRefElem } from './util'
|
|
13
13
|
import { getSlotVNs } from '../../ui/src/vn'
|
|
14
14
|
import { warnLog, errLog } from '../../ui/src/log'
|
|
15
15
|
import TableCustomPanelComponent from '../module/custom/panel'
|
|
@@ -2491,7 +2491,7 @@ export default defineComponent({
|
|
|
2491
2491
|
* @param {Array} datas 数据
|
|
2492
2492
|
*/
|
|
2493
2493
|
const loadTableData = (datas: any[]) => {
|
|
2494
|
-
const { keepSource, treeConfig } = props
|
|
2494
|
+
const { keepSource, treeConfig, showOverflow } = props
|
|
2495
2495
|
const { editStore, scrollYLoad: oldScrollYLoad } = reactData
|
|
2496
2496
|
const { scrollYStore, scrollXStore, lastScrollLeft, lastScrollTop } = internalData
|
|
2497
2497
|
const treeOpts = computeTreeOpts.value
|
|
@@ -2556,8 +2556,15 @@ export default defineComponent({
|
|
|
2556
2556
|
if (keepSource) {
|
|
2557
2557
|
tablePrivateMethods.cacheSourceMap(fullData)
|
|
2558
2558
|
}
|
|
2559
|
-
if (
|
|
2560
|
-
if (
|
|
2559
|
+
if (sYLoad) {
|
|
2560
|
+
if (showOverflow) {
|
|
2561
|
+
const errColumn = internalData.tableFullColumn.find(column => column.showOverflow === false)
|
|
2562
|
+
if (errColumn) {
|
|
2563
|
+
errLog('vxe.error.errProp', [`column[field="${errColumn.field}"].show-overflow=false`, 'show-overflow=true'])
|
|
2564
|
+
}
|
|
2565
|
+
}
|
|
2566
|
+
|
|
2567
|
+
if (process.env.VUE_APP_VXE_ENV === 'development') {
|
|
2561
2568
|
if (!(props.height || props.maxHeight)) {
|
|
2562
2569
|
errLog('vxe.error.reqProp', ['table.height | table.max-height | table.scroll-y={enabled: false}'])
|
|
2563
2570
|
}
|
|
@@ -3594,7 +3601,7 @@ export default defineComponent({
|
|
|
3594
3601
|
isInsertByRow (row) {
|
|
3595
3602
|
const { editStore } = reactData
|
|
3596
3603
|
const rowid = getRowid($xeTable, row)
|
|
3597
|
-
return editStore.insertMaps[rowid]
|
|
3604
|
+
return !!editStore.insertMaps[rowid]
|
|
3598
3605
|
},
|
|
3599
3606
|
/**
|
|
3600
3607
|
* 删除所有新增的临时数据
|
|
@@ -4721,7 +4728,7 @@ export default defineComponent({
|
|
|
4721
4728
|
const { transform, lazy } = treeOpts
|
|
4722
4729
|
const rowid = getRowid($xeTable, row)
|
|
4723
4730
|
if (lazy && row[hasChildField] && !treeExpandLazyLoadedMaps[rowid]) {
|
|
4724
|
-
tableMethods.clearTreeExpandLoaded(row).then(() => {
|
|
4731
|
+
return tableMethods.clearTreeExpandLoaded(row).then(() => {
|
|
4725
4732
|
return handleAsyncTreeExpandChilds(row)
|
|
4726
4733
|
}).then(() => {
|
|
4727
4734
|
if (transform) {
|
|
@@ -4933,8 +4940,8 @@ export default defineComponent({
|
|
|
4933
4940
|
const leftBody = refTableLeftBody.value
|
|
4934
4941
|
const rightBody = refTableRightBody.value
|
|
4935
4942
|
const leftBodyElem = leftBody ? leftBody.$el as HTMLDivElement : null
|
|
4936
|
-
const tableBodyElem = tableBody ? tableBody.$el as
|
|
4937
|
-
const rightBodyElem = rightBody ? rightBody.$el as
|
|
4943
|
+
const tableBodyElem = tableBody ? tableBody.$el as HTMLDivElement : null
|
|
4944
|
+
const rightBodyElem = rightBody ? rightBody.$el as HTMLDivElement : null
|
|
4938
4945
|
const tableHeaderElem = tableHeader ? tableHeader.$el as HTMLDivElement : null
|
|
4939
4946
|
const tableFooterElem = tableFooter ? tableFooter.$el as HTMLDivElement : null
|
|
4940
4947
|
const xHandleEl = refScrollXHandleElem.value
|
|
@@ -7026,6 +7033,7 @@ export default defineComponent({
|
|
|
7026
7033
|
const trEl = evnt.currentTarget as HTMLElement
|
|
7027
7034
|
const rowid = trEl.getAttribute('rowid')
|
|
7028
7035
|
const row = $xeTable.getRowById(rowid)
|
|
7036
|
+
console.log(rowid)
|
|
7029
7037
|
if (row) {
|
|
7030
7038
|
evnt.preventDefault()
|
|
7031
7039
|
evnt.preventDefault()
|
|
@@ -7154,6 +7162,8 @@ export default defineComponent({
|
|
|
7154
7162
|
oldIndex: oafIndex
|
|
7155
7163
|
}
|
|
7156
7164
|
}, evnt)
|
|
7165
|
+
|
|
7166
|
+
$xeTable.saveCustomStore('update:sort')
|
|
7157
7167
|
}).catch(() => {
|
|
7158
7168
|
})
|
|
7159
7169
|
}
|
|
@@ -68,10 +68,6 @@ export const convertHeaderColumnToRows = (originColumns: any): any[][] => {
|
|
|
68
68
|
return rows
|
|
69
69
|
}
|
|
70
70
|
|
|
71
|
-
export interface XEBodyScrollElement extends HTMLDivElement {
|
|
72
|
-
_onscroll: ((evnt: Event) => void) | null;
|
|
73
|
-
}
|
|
74
|
-
|
|
75
71
|
export function restoreScrollLocation ($xeTable: VxeTableConstructor, scrollLeft: number, scrollTop: number) {
|
|
76
72
|
const { internalData } = $xeTable
|
|
77
73
|
return $xeTable.clearScroll().then(() => {
|
|
@@ -85,18 +81,6 @@ export function restoreScrollLocation ($xeTable: VxeTableConstructor, scrollLeft
|
|
|
85
81
|
})
|
|
86
82
|
}
|
|
87
83
|
|
|
88
|
-
// export function removeScrollListener (scrollElem: XEBodyScrollElement | null) {
|
|
89
|
-
// if (scrollElem && scrollElem._onscroll) {
|
|
90
|
-
// scrollElem.onscroll = null
|
|
91
|
-
// }
|
|
92
|
-
// }
|
|
93
|
-
|
|
94
|
-
// export function restoreScrollListener (scrollElem: XEBodyScrollElement | null) {
|
|
95
|
-
// if (scrollElem && scrollElem._onscroll) {
|
|
96
|
-
// scrollElem.onscroll = scrollElem._onscroll
|
|
97
|
-
// }
|
|
98
|
-
// }
|
|
99
|
-
|
|
100
84
|
/**
|
|
101
85
|
* 生成行的唯一主键
|
|
102
86
|
*/
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|