vxe-table 3.11.35 → 3.11.37
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/mixin.js +57 -33
- package/es/table/module/export/mixin.js +23 -20
- package/es/table/src/body.js +4 -4
- package/es/table/src/footer.js +4 -2
- package/es/table/src/header.js +4 -2
- package/es/table/src/methods.js +2 -2
- package/es/table/src/table.js +6 -3
- package/es/table/style.css +3 -25
- 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 +3 -25
- 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 +110 -64
- 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/mixin.js +67 -33
- package/lib/table/module/edit/mixin.min.js +1 -1
- package/lib/table/module/export/mixin.js +22 -19
- package/lib/table/module/export/mixin.min.js +1 -1
- package/lib/table/src/body.js +4 -3
- package/lib/table/src/body.min.js +1 -1
- package/lib/table/src/footer.js +4 -1
- package/lib/table/src/footer.min.js +1 -1
- package/lib/table/src/header.js +4 -1
- package/lib/table/src/header.min.js +1 -1
- package/lib/table/src/methods.js +2 -2
- package/lib/table/src/methods.min.js +1 -1
- package/lib/table/src/table.js +5 -3
- package/lib/table/src/table.min.js +1 -1
- package/lib/table/style/style.css +3 -25
- 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 +3 -25
- package/lib/vxe-table/style/style.min.css +1 -1
- package/package.json +2 -2
- package/packages/table/module/edit/mixin.ts +58 -33
- package/packages/table/module/export/mixin.ts +24 -20
- package/packages/table/src/body.ts +4 -3
- package/packages/table/src/footer.ts +4 -2
- package/packages/table/src/header.ts +4 -2
- package/packages/table/src/methods.ts +2 -2
- package/packages/table/src/table.ts +6 -3
- package/styles/components/table.scss +3 -22
- /package/es/{iconfont.1734517179309.ttf → iconfont.1734680280915.ttf} +0 -0
- /package/es/{iconfont.1734517179309.woff → iconfont.1734680280915.woff} +0 -0
- /package/es/{iconfont.1734517179309.woff2 → iconfont.1734680280915.woff2} +0 -0
- /package/lib/{iconfont.1734517179309.ttf → iconfont.1734680280915.ttf} +0 -0
- /package/lib/{iconfont.1734517179309.woff → iconfont.1734680280915.woff} +0 -0
- /package/lib/{iconfont.1734517179309.woff2 → iconfont.1734680280915.woff2} +0 -0
|
@@ -48,8 +48,7 @@ function insertTreeRow (_vm: any, newRecords: any[], isAppend: any) {
|
|
|
48
48
|
})
|
|
49
49
|
}
|
|
50
50
|
|
|
51
|
-
function handleInsertRowAt (
|
|
52
|
-
const $xeTable = _vm
|
|
51
|
+
function handleInsertRowAt ($xeTable: any, records: any[], targetRow: any, isInsertNextRow?: any) {
|
|
53
52
|
const props = $xeTable
|
|
54
53
|
const reactData = $xeTable
|
|
55
54
|
const internalData = $xeTable
|
|
@@ -63,11 +62,11 @@ function handleInsertRowAt (_vm: any, records: any[], row: any, isInsertNextRow?
|
|
|
63
62
|
if (!XEUtils.isArray(records)) {
|
|
64
63
|
records = [records]
|
|
65
64
|
}
|
|
66
|
-
const newRecords: any[] =
|
|
67
|
-
if (XEUtils.eqNull(
|
|
65
|
+
const newRecords: any[] = $xeTable.defineField(records.map(record => Object.assign(treeConfig && transform ? { [mapChildrenField]: [], [childrenField]: [] } : {}, record)))
|
|
66
|
+
if (XEUtils.eqNull(targetRow)) {
|
|
68
67
|
// 如果为虚拟树
|
|
69
68
|
if (treeConfig && transform) {
|
|
70
|
-
insertTreeRow(
|
|
69
|
+
insertTreeRow($xeTable, newRecords, false)
|
|
71
70
|
} else {
|
|
72
71
|
newRecords.forEach(item => {
|
|
73
72
|
const rowid = getRowid($xeTable, item)
|
|
@@ -86,10 +85,10 @@ function handleInsertRowAt (_vm: any, records: any[], row: any, isInsertNextRow?
|
|
|
86
85
|
})
|
|
87
86
|
}
|
|
88
87
|
} else {
|
|
89
|
-
if (
|
|
88
|
+
if (targetRow === -1) {
|
|
90
89
|
// 如果为虚拟树
|
|
91
90
|
if (treeConfig && transform) {
|
|
92
|
-
insertTreeRow(
|
|
91
|
+
insertTreeRow($xeTable, newRecords, true)
|
|
93
92
|
} else {
|
|
94
93
|
newRecords.forEach(item => {
|
|
95
94
|
const rowid = getRowid($xeTable, item)
|
|
@@ -110,14 +109,14 @@ function handleInsertRowAt (_vm: any, records: any[], row: any, isInsertNextRow?
|
|
|
110
109
|
} else {
|
|
111
110
|
// 如果为虚拟树
|
|
112
111
|
if (treeConfig && transform) {
|
|
113
|
-
const matchMapObj = XEUtils.findTree(tableFullTreeData, (item: any) =>
|
|
112
|
+
const matchMapObj = XEUtils.findTree(tableFullTreeData, (item: any) => targetRow[rowField] === item[rowField], { children: mapChildrenField })
|
|
114
113
|
if (matchMapObj) {
|
|
115
114
|
const { parent: parentRow } = matchMapObj as any
|
|
116
115
|
const parentMapChilds = parentRow ? parentRow[mapChildrenField] : tableFullTreeData
|
|
117
|
-
const parentRest = fullAllDataRowIdData[getRowid(
|
|
116
|
+
const parentRest = fullAllDataRowIdData[getRowid($xeTable, parentRow)]
|
|
118
117
|
const parentLevel = parentRest ? parentRest.level : 0
|
|
119
118
|
newRecords.forEach((item: any, i: any) => {
|
|
120
|
-
const rowid = getRowid(
|
|
119
|
+
const rowid = getRowid($xeTable, item)
|
|
121
120
|
if (process.env.VUE_APP_VXE_ENV === 'development') {
|
|
122
121
|
if (item[treeOpts.parentField]) {
|
|
123
122
|
if (parentRow && item[treeOpts.parentField] !== parentRow[rowField]) {
|
|
@@ -140,7 +139,7 @@ function handleInsertRowAt (_vm: any, records: any[], row: any, isInsertNextRow?
|
|
|
140
139
|
|
|
141
140
|
// 源
|
|
142
141
|
if (parentRow) {
|
|
143
|
-
const matchObj = XEUtils.findTree(tableFullTreeData, (item: any) =>
|
|
142
|
+
const matchObj = XEUtils.findTree(tableFullTreeData, (item: any) => targetRow[rowField] === item[rowField], { children: childrenField })
|
|
144
143
|
if (matchObj) {
|
|
145
144
|
const parentChilds = matchObj.items
|
|
146
145
|
let targetIndex = matchObj.index
|
|
@@ -154,7 +153,7 @@ function handleInsertRowAt (_vm: any, records: any[], row: any, isInsertNextRow?
|
|
|
154
153
|
if (process.env.VUE_APP_VXE_ENV === 'development') {
|
|
155
154
|
warnLog('vxe.error.unableInsert')
|
|
156
155
|
}
|
|
157
|
-
insertTreeRow(
|
|
156
|
+
insertTreeRow($xeTable, newRecords, true)
|
|
158
157
|
}
|
|
159
158
|
} else {
|
|
160
159
|
if (treeConfig) {
|
|
@@ -162,12 +161,12 @@ function handleInsertRowAt (_vm: any, records: any[], row: any, isInsertNextRow?
|
|
|
162
161
|
}
|
|
163
162
|
let afIndex = -1
|
|
164
163
|
// 如果是可视索引
|
|
165
|
-
if (XEUtils.isNumber(
|
|
166
|
-
if (
|
|
167
|
-
afIndex =
|
|
164
|
+
if (XEUtils.isNumber(targetRow)) {
|
|
165
|
+
if (targetRow < afterFullData.length) {
|
|
166
|
+
afIndex = targetRow
|
|
168
167
|
}
|
|
169
168
|
} else {
|
|
170
|
-
afIndex =
|
|
169
|
+
afIndex = $xeTable.findRowIndexOf(afterFullData, targetRow)
|
|
171
170
|
}
|
|
172
171
|
// 如果是插入指定行的下一行
|
|
173
172
|
if (isInsertNextRow) {
|
|
@@ -177,7 +176,7 @@ function handleInsertRowAt (_vm: any, records: any[], row: any, isInsertNextRow?
|
|
|
177
176
|
throw new Error(errLog('vxe.error.unableInsert'))
|
|
178
177
|
}
|
|
179
178
|
afterFullData.splice(afIndex, 0, ...newRecords)
|
|
180
|
-
tableFullData.splice(
|
|
179
|
+
tableFullData.splice($xeTable.findRowIndexOf(tableFullData, targetRow), 0, ...newRecords)
|
|
181
180
|
// 刷新单元格合并
|
|
182
181
|
mergeList.forEach((mergeItem: any) => {
|
|
183
182
|
const { row: mergeRowIndex, rowspan: mergeRowspan } = mergeItem
|
|
@@ -195,20 +194,20 @@ function handleInsertRowAt (_vm: any, records: any[], row: any, isInsertNextRow?
|
|
|
195
194
|
const rowid = getRowid($xeTable, newRow)
|
|
196
195
|
insertMaps[rowid] = newRow
|
|
197
196
|
})
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
197
|
+
$xeTable.cacheRowMap()
|
|
198
|
+
$xeTable.updateScrollYStatus()
|
|
199
|
+
$xeTable.handleTableData(treeConfig && transform)
|
|
201
200
|
if (!(treeConfig && transform)) {
|
|
202
|
-
|
|
201
|
+
$xeTable.updateAfterDataIndex()
|
|
203
202
|
}
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
if (
|
|
207
|
-
|
|
203
|
+
$xeTable.updateFooter()
|
|
204
|
+
$xeTable.checkSelectionStatus()
|
|
205
|
+
if ($xeTable.scrollYLoad) {
|
|
206
|
+
$xeTable.updateScrollYSpace()
|
|
208
207
|
}
|
|
209
|
-
return
|
|
210
|
-
|
|
211
|
-
return
|
|
208
|
+
return $xeTable.$nextTick().then(() => {
|
|
209
|
+
$xeTable.updateCellAreas()
|
|
210
|
+
return $xeTable.recalculate()
|
|
212
211
|
}).then(() => {
|
|
213
212
|
return {
|
|
214
213
|
row: newRecords.length ? newRecords[newRecords.length - 1] : null,
|
|
@@ -217,6 +216,23 @@ function handleInsertRowAt (_vm: any, records: any[], row: any, isInsertNextRow?
|
|
|
217
216
|
})
|
|
218
217
|
}
|
|
219
218
|
|
|
219
|
+
function handleInsertChildRowAt ($xeTable: any, records: any, parentRow: any, targetRow: any, isInsertNextRow?: boolean) {
|
|
220
|
+
const props = $xeTable
|
|
221
|
+
|
|
222
|
+
const { treeConfig } = props
|
|
223
|
+
const treeOpts = $xeTable.computeTreeOpts
|
|
224
|
+
const { transform, rowField, parentField } = treeOpts
|
|
225
|
+
if (treeConfig && transform) {
|
|
226
|
+
if (!XEUtils.isArray(records)) {
|
|
227
|
+
records = [records]
|
|
228
|
+
}
|
|
229
|
+
return handleInsertRowAt($xeTable, records.map((item: any) => Object.assign({}, item, { [parentField]: parentRow[rowField] })), targetRow, isInsertNextRow)
|
|
230
|
+
} else {
|
|
231
|
+
errLog('vxe.error.errProp', ['tree-config.treeConfig=false', 'tree-config.treeConfig=true'])
|
|
232
|
+
}
|
|
233
|
+
return Promise.resolve({ row: null, rows: [] })
|
|
234
|
+
}
|
|
235
|
+
|
|
220
236
|
export default {
|
|
221
237
|
methods: {
|
|
222
238
|
/**
|
|
@@ -233,14 +249,23 @@ export default {
|
|
|
233
249
|
* 如果 row 为 -1 则从插入到底部
|
|
234
250
|
* 如果 row 为有效行则插入到该行的位置
|
|
235
251
|
* @param {Object/Array} records 新的数据
|
|
236
|
-
* @param {Row}
|
|
252
|
+
* @param {Row} targetRow 指定行
|
|
237
253
|
* @returns
|
|
238
254
|
*/
|
|
239
|
-
_insertAt (records: any,
|
|
240
|
-
return handleInsertRowAt(this, records,
|
|
255
|
+
_insertAt (records: any, targetRow: any) {
|
|
256
|
+
return handleInsertRowAt(this, records, targetRow)
|
|
257
|
+
},
|
|
258
|
+
_insertNextAt (records: any, targetRow: any) {
|
|
259
|
+
return handleInsertRowAt(this, records, targetRow, true)
|
|
260
|
+
},
|
|
261
|
+
_insertChild (records: any, parentRow: any) {
|
|
262
|
+
return handleInsertChildRowAt(this, records, parentRow, null)
|
|
263
|
+
},
|
|
264
|
+
_insertChildAt (records: any, parentRow: any, targetRow: any) {
|
|
265
|
+
return handleInsertChildRowAt(this, records, parentRow, targetRow)
|
|
241
266
|
},
|
|
242
|
-
|
|
243
|
-
return
|
|
267
|
+
_insertChildNextAt (records: any, parentRow: any, targetRow: any) {
|
|
268
|
+
return handleInsertChildRowAt(this, records, parentRow, targetRow, true)
|
|
244
269
|
},
|
|
245
270
|
/**
|
|
246
271
|
* 删除指定行数据
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import XEUtils from 'xe-utils'
|
|
2
2
|
import { VxeUI } from '../../../ui'
|
|
3
3
|
import { isColumnInfo, mergeBodyMethod, getCellValue } from '../../src/util'
|
|
4
|
-
import { parseFile, formatText } from '../../../ui/src/utils'
|
|
4
|
+
import { parseFile, formatText, eqEmptyValue } from '../../../ui/src/utils'
|
|
5
5
|
import { browse } from '../../../ui/src/dom'
|
|
6
6
|
import { createHtmlPage, getExportBlobByContent } from './util'
|
|
7
7
|
import { warnLog, errLog } from '../../../ui/src/log'
|
|
@@ -66,9 +66,13 @@ function toBooleanValue (cellValue: any) {
|
|
|
66
66
|
return XEUtils.isBoolean(cellValue) ? (cellValue ? 'TRUE' : 'FALSE') : cellValue
|
|
67
67
|
}
|
|
68
68
|
|
|
69
|
-
|
|
69
|
+
const toStringValue = (cellValue: any) => {
|
|
70
|
+
return eqEmptyValue(cellValue) ? '' : `${cellValue}`
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
function getBodyLabelData ($xeTable: any, opts: any, columns: any[], datas: any[]) {
|
|
70
74
|
const { isAllExpand, mode } = opts
|
|
71
|
-
const { treeConfig, treeOpts, radioOpts, checkboxOpts, columnOpts } = $
|
|
75
|
+
const { treeConfig, treeOpts, radioOpts, checkboxOpts, columnOpts } = $xeTable
|
|
72
76
|
const childrenField = treeOpts.children || treeOpts.childrenField
|
|
73
77
|
if (!htmlCellElem) {
|
|
74
78
|
htmlCellElem = document.createElement('div')
|
|
@@ -80,13 +84,13 @@ function getBodyLabelData ($xetable: any, opts: any, columns: any[], datas: any[
|
|
|
80
84
|
XEUtils.eachTree(datas, (item, $rowIndex, items, path, parent, nodes) => {
|
|
81
85
|
const row = item._row || item
|
|
82
86
|
const parentRow = parent && parent._row ? parent._row : parent
|
|
83
|
-
if ((isAllExpand || !parentRow || (expandMaps.has(parentRow) && $
|
|
84
|
-
const hasRowChild = hasTreeChildren($
|
|
87
|
+
if ((isAllExpand || !parentRow || (expandMaps.has(parentRow) && $xeTable.isTreeExpandByRow(parentRow)))) {
|
|
88
|
+
const hasRowChild = hasTreeChildren($xeTable, row)
|
|
85
89
|
const item: any = {
|
|
86
90
|
_row: row,
|
|
87
91
|
_level: nodes.length - 1,
|
|
88
92
|
_hasChild: hasRowChild,
|
|
89
|
-
_expand: hasRowChild && $
|
|
93
|
+
_expand: hasRowChild && $xeTable.isTreeExpandByRow(row)
|
|
90
94
|
}
|
|
91
95
|
columns.forEach((column, $columnIndex) => {
|
|
92
96
|
let cellValue = ''
|
|
@@ -102,21 +106,21 @@ function getBodyLabelData ($xetable: any, opts: any, columns: any[], datas: any[
|
|
|
102
106
|
bodyExportMethod = columnOpts.exportMethod
|
|
103
107
|
}
|
|
104
108
|
if (bodyExportMethod) {
|
|
105
|
-
cellValue = bodyExportMethod({ $table: $
|
|
109
|
+
cellValue = bodyExportMethod({ $table: $xeTable, row, column, options: opts })
|
|
106
110
|
} else {
|
|
107
111
|
switch (column.type) {
|
|
108
112
|
case 'seq': {
|
|
109
113
|
const seqValue = path.map((num, i) => i % 2 === 0 ? (Number(num) + 1) : '.').join('')
|
|
110
|
-
cellValue = mode === 'all' ? seqValue : getSeq($
|
|
114
|
+
cellValue = mode === 'all' ? seqValue : getSeq($xeTable, seqValue, row, $rowIndex, column, $columnIndex)
|
|
111
115
|
break
|
|
112
116
|
}
|
|
113
117
|
case 'checkbox':
|
|
114
|
-
cellValue = toBooleanValue($
|
|
118
|
+
cellValue = toBooleanValue($xeTable.isCheckedByCheckboxRow(row))
|
|
115
119
|
item._checkboxLabel = checkboxOpts.labelField ? XEUtils.get(row, checkboxOpts.labelField) : ''
|
|
116
120
|
item._checkboxDisabled = checkboxOpts.checkMethod && !checkboxOpts.checkMethod({ row })
|
|
117
121
|
break
|
|
118
122
|
case 'radio':
|
|
119
|
-
cellValue = toBooleanValue($
|
|
123
|
+
cellValue = toBooleanValue($xeTable.isCheckedByRadioRow(row))
|
|
120
124
|
item._radioLabel = radioOpts.labelField ? XEUtils.get(row, radioOpts.labelField) : ''
|
|
121
125
|
item._radioDisabled = radioOpts.checkMethod && !radioOpts.checkMethod({ row })
|
|
122
126
|
break
|
|
@@ -124,12 +128,12 @@ function getBodyLabelData ($xetable: any, opts: any, columns: any[], datas: any[
|
|
|
124
128
|
if (opts.original) {
|
|
125
129
|
cellValue = getCellValue(row, column)
|
|
126
130
|
} else {
|
|
127
|
-
cellValue = $
|
|
131
|
+
cellValue = $xeTable.getCellLabel(row, column)
|
|
128
132
|
if (column.type === 'html') {
|
|
129
133
|
htmlCellElem.innerHTML = cellValue
|
|
130
134
|
cellValue = htmlCellElem.innerText.trim()
|
|
131
135
|
} else {
|
|
132
|
-
const cell = $
|
|
136
|
+
const cell = $xeTable.getCellElement(row, column)
|
|
133
137
|
if (cell) {
|
|
134
138
|
cellValue = cell.innerText.trim()
|
|
135
139
|
}
|
|
@@ -137,7 +141,7 @@ function getBodyLabelData ($xetable: any, opts: any, columns: any[], datas: any[
|
|
|
137
141
|
}
|
|
138
142
|
}
|
|
139
143
|
}
|
|
140
|
-
item[column.id] =
|
|
144
|
+
item[column.id] = toStringValue(cellValue)
|
|
141
145
|
})
|
|
142
146
|
expandMaps.set(row, 1)
|
|
143
147
|
rest.push(Object.assign(item, row))
|
|
@@ -163,21 +167,21 @@ function getBodyLabelData ($xetable: any, opts: any, columns: any[], datas: any[
|
|
|
163
167
|
bodyExportMethod = columnOpts.exportMethod
|
|
164
168
|
}
|
|
165
169
|
if (bodyExportMethod) {
|
|
166
|
-
cellValue = bodyExportMethod({ $table: $
|
|
170
|
+
cellValue = bodyExportMethod({ $table: $xeTable, row, column, options: opts })
|
|
167
171
|
} else {
|
|
168
172
|
switch (column.type) {
|
|
169
173
|
case 'seq': {
|
|
170
174
|
const seqValue = $rowIndex + 1
|
|
171
|
-
cellValue = mode === 'all' ? seqValue : getSeq($
|
|
175
|
+
cellValue = mode === 'all' ? seqValue : getSeq($xeTable, seqValue, row, $rowIndex, column, $columnIndex)
|
|
172
176
|
break
|
|
173
177
|
}
|
|
174
178
|
case 'checkbox':
|
|
175
|
-
cellValue = toBooleanValue($
|
|
179
|
+
cellValue = toBooleanValue($xeTable.isCheckedByCheckboxRow(row))
|
|
176
180
|
item._checkboxLabel = checkboxOpts.labelField ? XEUtils.get(row, checkboxOpts.labelField) : ''
|
|
177
181
|
item._checkboxDisabled = checkboxOpts.checkMethod && !checkboxOpts.checkMethod({ row })
|
|
178
182
|
break
|
|
179
183
|
case 'radio':
|
|
180
|
-
cellValue = toBooleanValue($
|
|
184
|
+
cellValue = toBooleanValue($xeTable.isCheckedByRadioRow(row))
|
|
181
185
|
item._radioLabel = radioOpts.labelField ? XEUtils.get(row, radioOpts.labelField) : ''
|
|
182
186
|
item._radioDisabled = radioOpts.checkMethod && !radioOpts.checkMethod({ row })
|
|
183
187
|
break
|
|
@@ -185,12 +189,12 @@ function getBodyLabelData ($xetable: any, opts: any, columns: any[], datas: any[
|
|
|
185
189
|
if (opts.original) {
|
|
186
190
|
cellValue = getCellValue(row, column)
|
|
187
191
|
} else {
|
|
188
|
-
cellValue = $
|
|
192
|
+
cellValue = $xeTable.getCellLabel(row, column)
|
|
189
193
|
if (column.type === 'html') {
|
|
190
194
|
htmlCellElem.innerHTML = cellValue
|
|
191
195
|
cellValue = htmlCellElem.innerText.trim()
|
|
192
196
|
} else {
|
|
193
|
-
const cell = $
|
|
197
|
+
const cell = $xeTable.getCellElement(row, column)
|
|
194
198
|
if (cell) {
|
|
195
199
|
cellValue = cell.innerText.trim()
|
|
196
200
|
}
|
|
@@ -198,7 +202,7 @@ function getBodyLabelData ($xetable: any, opts: any, columns: any[], datas: any[
|
|
|
198
202
|
}
|
|
199
203
|
}
|
|
200
204
|
}
|
|
201
|
-
item[column.id] =
|
|
205
|
+
item[column.id] = toStringValue(cellValue)
|
|
202
206
|
})
|
|
203
207
|
return item
|
|
204
208
|
})
|
|
@@ -337,7 +337,7 @@ function renderColumn (h: any, _vm: any, $xetable: any, seq: any, rowid: any, fi
|
|
|
337
337
|
getClass(className, params),
|
|
338
338
|
getClass(allCellClassName, params)
|
|
339
339
|
],
|
|
340
|
-
key: columnKey || columnOpts.useKey || rowOpts.useKey || columnOpts.drag ? column.id : $columnIndex,
|
|
340
|
+
key: columnKey || scrollXLoad || scrollYLoad || columnOpts.useKey || rowOpts.useKey || columnOpts.drag ? column.id : $columnIndex,
|
|
341
341
|
attrs,
|
|
342
342
|
style: Object.assign({
|
|
343
343
|
height: cellHeight
|
|
@@ -362,6 +362,7 @@ function renderRows (h: CreateElement, _vm: any, $xeTable: any, fixedType: any,
|
|
|
362
362
|
expandOpts,
|
|
363
363
|
editOpts,
|
|
364
364
|
treeExpandedMaps,
|
|
365
|
+
scrollXLoad,
|
|
365
366
|
scrollYLoad,
|
|
366
367
|
rowExpandedMaps,
|
|
367
368
|
radioOpts,
|
|
@@ -467,7 +468,7 @@ function renderRows (h: CreateElement, _vm: any, $xeTable: any, fixedType: any,
|
|
|
467
468
|
rowid
|
|
468
469
|
},
|
|
469
470
|
style: rowStyle ? (XEUtils.isFunction(rowStyle) ? rowStyle(params) : rowStyle) : null,
|
|
470
|
-
key: rowKey || rowOpts.useKey || rowOpts.drag || columnOpts.drag || treeConfig ? rowid : $rowIndex,
|
|
471
|
+
key: rowKey || scrollXLoad || scrollYLoad || rowOpts.useKey || rowOpts.drag || columnOpts.drag || treeConfig ? rowid : $rowIndex,
|
|
471
472
|
nativeOn: trOn
|
|
472
473
|
}, tdVNs)
|
|
473
474
|
: h('tr', {
|
|
@@ -476,7 +477,7 @@ function renderRows (h: CreateElement, _vm: any, $xeTable: any, fixedType: any,
|
|
|
476
477
|
rowid
|
|
477
478
|
},
|
|
478
479
|
style: rowStyle ? (XEUtils.isFunction(rowStyle) ? rowStyle(params) : rowStyle) : null,
|
|
479
|
-
key: rowKey || rowOpts.useKey || rowOpts.drag || columnOpts.drag || treeConfig ? rowid : $rowIndex,
|
|
480
|
+
key: rowKey || scrollXLoad || scrollYLoad || rowOpts.useKey || rowOpts.drag || columnOpts.drag || treeConfig ? rowid : $rowIndex,
|
|
480
481
|
on: trOn
|
|
481
482
|
}, tdVNs)
|
|
482
483
|
)
|
|
@@ -26,7 +26,7 @@ function mergeFooterMethod (mergeFooterList: any, _rowIndex: any, _columnIndex:
|
|
|
26
26
|
|
|
27
27
|
function renderRows (h: CreateElement, _vm: any, tableColumn: VxeTableDefines.ColumnInfo[], footerTableData: any[], row: any, $rowIndex: number, _rowIndex: number) {
|
|
28
28
|
const { $parent: $xetable, fixedType } = _vm
|
|
29
|
-
const { $listeners: tableListeners, footerCellClassName, footerCellStyle, footerAlign: allFooterAlign, mergeFooterList, footerSpanMethod, align: allAlign, scrollXLoad, columnKey, columnOpts, showFooterOverflow: allColumnFooterOverflow, currentColumn, overflowX, scrollbarWidth, tooltipOpts } = $xetable
|
|
29
|
+
const { $listeners: tableListeners, footerCellClassName, footerCellStyle, footerAlign: allFooterAlign, mergeFooterList, footerSpanMethod, align: allAlign, scrollXLoad, columnKey, columnOpts, showFooterOverflow: allColumnFooterOverflow, currentColumn, overflowX, scrollYLoad, scrollbarWidth, tooltipOpts } = $xetable
|
|
30
30
|
|
|
31
31
|
return tableColumn.map((column: any, $columnIndex: any) => {
|
|
32
32
|
const { type, showFooterOverflow, footerAlign, align, footerClassName, editRender, cellRender } = column
|
|
@@ -135,7 +135,7 @@ function renderRows (h: CreateElement, _vm: any, tableColumn: VxeTableDefines.Co
|
|
|
135
135
|
attrs,
|
|
136
136
|
style: footerCellStyle ? (XEUtils.isFunction(footerCellStyle) ? footerCellStyle(cellParams) : footerCellStyle) : null,
|
|
137
137
|
on: tfOns,
|
|
138
|
-
key: columnKey || columnOpts.useKey || columnOpts.drag ? column.id : $columnIndex
|
|
138
|
+
key: columnKey || scrollXLoad || scrollYLoad || columnOpts.useKey || columnOpts.drag ? column.id : $columnIndex
|
|
139
139
|
}, [
|
|
140
140
|
h('div', {
|
|
141
141
|
class: ['vxe-cell', {
|
|
@@ -170,6 +170,7 @@ function renderHeads (h: CreateElement, _vm: any, footerTableData: any[]) {
|
|
|
170
170
|
|
|
171
171
|
if (columnOpts.drag && columnDragOpts.animation) {
|
|
172
172
|
return h('transition-group', {
|
|
173
|
+
key: $rowIndex,
|
|
173
174
|
props: {
|
|
174
175
|
tag: 'tr',
|
|
175
176
|
name: `vxe-header--col-list${isDragColMove ? '' : '-disabled'}`,
|
|
@@ -182,6 +183,7 @@ function renderHeads (h: CreateElement, _vm: any, footerTableData: any[]) {
|
|
|
182
183
|
}, renderRows(h, _vm, tableColumn, footerTableData, row, $rowIndex, _rowIndex))
|
|
183
184
|
}
|
|
184
185
|
return h('tr', {
|
|
186
|
+
key: $rowIndex,
|
|
185
187
|
class: [
|
|
186
188
|
'vxe-footer--row',
|
|
187
189
|
footerRowClassName ? XEUtils.isFunction(footerRowClassName) ? footerRowClassName(rowParams) : footerRowClassName : ''
|
|
@@ -17,7 +17,7 @@ const renderRows = (h: CreateElement, _vm: any, cols: VxeTableDefines.ColumnInfo
|
|
|
17
17
|
|
|
18
18
|
const { fixedType } = _vm
|
|
19
19
|
|
|
20
|
-
const { resizable: allResizable, border, columnKey, headerCellClassName, headerCellStyle, showHeaderOverflow: allColumnHeaderOverflow, headerAlign: allHeaderAlign, align: allAlign, currentColumn, scrollXLoad, overflowX, scrollbarWidth, mouseConfig, columnOpts } = $xeTable
|
|
20
|
+
const { resizable: allResizable, border, columnKey, headerCellClassName, headerCellStyle, showHeaderOverflow: allColumnHeaderOverflow, headerAlign: allHeaderAlign, align: allAlign, currentColumn, scrollXLoad, scrollYLoad, overflowX, scrollbarWidth, mouseConfig, columnOpts } = $xeTable
|
|
21
21
|
const columnDragOpts = $xeTable.computeColumnDragOpts
|
|
22
22
|
const { disabledMethod: dragDisabledMethod } = columnDragOpts
|
|
23
23
|
return cols.map((column: any, $columnIndex: any) => {
|
|
@@ -90,7 +90,7 @@ const renderRows = (h: CreateElement, _vm: any, cols: VxeTableDefines.ColumnInfo
|
|
|
90
90
|
attrs: thAttrs,
|
|
91
91
|
style: headerCellStyle ? (XEUtils.isFunction(headerCellStyle) ? headerCellStyle(params) : headerCellStyle) : null,
|
|
92
92
|
on: thOns,
|
|
93
|
-
key: columnKey || columnOpts.useKey || columnOpts.drag || isColGroup ? colid : $columnIndex
|
|
93
|
+
key: columnKey || scrollXLoad || scrollYLoad || columnOpts.useKey || columnOpts.drag || isColGroup ? colid : $columnIndex
|
|
94
94
|
}, [
|
|
95
95
|
h('div', {
|
|
96
96
|
class: ['vxe-cell', {
|
|
@@ -140,6 +140,7 @@ function renderHeads (h: CreateElement, _vm: any, headerGroups: any[]) {
|
|
|
140
140
|
|
|
141
141
|
if (columnOpts.drag && columnDragOpts.animation) {
|
|
142
142
|
return h('transition-group', {
|
|
143
|
+
key: $rowIndex,
|
|
143
144
|
props: {
|
|
144
145
|
tag: 'tr',
|
|
145
146
|
name: `vxe-header--col-list${isDragColMove ? '' : '-disabled'}`,
|
|
@@ -152,6 +153,7 @@ function renderHeads (h: CreateElement, _vm: any, headerGroups: any[]) {
|
|
|
152
153
|
}, renderRows(h, _vm, cols, $rowIndex))
|
|
153
154
|
}
|
|
154
155
|
return h('tr', {
|
|
156
|
+
key: $rowIndex,
|
|
155
157
|
class: [
|
|
156
158
|
'vxe-header--row',
|
|
157
159
|
headerRowClassName ? XEUtils.isFunction(headerRowClassName) ? headerRowClassName(params) : headerRowClassName : ''
|
|
@@ -6785,7 +6785,7 @@ const Methods = {
|
|
|
6785
6785
|
|
|
6786
6786
|
const { lyTimeout, lyRunTime, scrollYStore } = internalData
|
|
6787
6787
|
const { visibleSize } = scrollYStore
|
|
6788
|
-
const fpsTime = Math.min(80, Math.floor(visibleSize
|
|
6788
|
+
const fpsTime = Math.min(80, Math.floor(visibleSize))
|
|
6789
6789
|
if (lyTimeout) {
|
|
6790
6790
|
clearTimeout(lyTimeout)
|
|
6791
6791
|
}
|
|
@@ -7442,7 +7442,7 @@ const Methods = {
|
|
|
7442
7442
|
} as any
|
|
7443
7443
|
|
|
7444
7444
|
// Module methods
|
|
7445
|
-
const funcs = 'setFilter,openFilter,clearFilter,saveFilterPanel,resetFilterPanel,getCheckedFilters,updateFilterOptionStatus,closeMenu,setActiveCellArea,getActiveCellArea,getCellAreas,clearCellAreas,copyCellArea,cutCellArea,pasteCellArea,getCopyCellArea,getCopyCellAreas,clearCopyCellArea,setCellAreas,openFNR,openFind,openReplace,closeFNR,getSelectedCell,clearSelected,insert,insertAt,insertNextAt,remove,removeCheckboxRow,removeRadioRow,removeCurrentRow,getRecordset,getInsertRecords,getRemoveRecords,getUpdateRecords,clearEdit,clearActived,getEditRecord,getActiveRecord,isEditByRow,isActiveByRow,setEditRow,setActiveRow,setEditCell,setActiveCell,setSelectCell,clearValidate,fullValidate,validate,fullValidateField,validateField,openExport,closeExport,openPrint,closePrint,getPrintHtml,exportData,openImport,closeImport,importData,saveFile,readFile,importByFile,print,openCustom,closeCustom,saveCustom,cancelCustom,resetCustom,toggleCustomAllCheckbox,setCustomAllCheckbox'.split(',')
|
|
7445
|
+
const funcs = 'setFilter,openFilter,clearFilter,saveFilterPanel,resetFilterPanel,getCheckedFilters,updateFilterOptionStatus,closeMenu,setActiveCellArea,getActiveCellArea,getCellAreas,clearCellAreas,copyCellArea,cutCellArea,pasteCellArea,getCopyCellArea,getCopyCellAreas,clearCopyCellArea,setCellAreas,openFNR,openFind,openReplace,closeFNR,getSelectedCell,clearSelected,insert,insertAt,insertNextAt,insertChild,insertChildAt,insertChildNextAt,remove,removeCheckboxRow,removeRadioRow,removeCurrentRow,getRecordset,getInsertRecords,getRemoveRecords,getUpdateRecords,clearEdit,clearActived,getEditRecord,getActiveRecord,isEditByRow,isActiveByRow,setEditRow,setActiveRow,setEditCell,setActiveCell,setSelectCell,clearValidate,fullValidate,validate,fullValidateField,validateField,openExport,closeExport,openPrint,closePrint,getPrintHtml,exportData,openImport,closeImport,importData,saveFile,readFile,importByFile,print,openCustom,closeCustom,saveCustom,cancelCustom,resetCustom,toggleCustomAllCheckbox,setCustomAllCheckbox'.split(',')
|
|
7446
7446
|
|
|
7447
7447
|
funcs.forEach(name => {
|
|
7448
7448
|
Methods[name] = function (...args: any[]) {
|
|
@@ -734,8 +734,11 @@ export default {
|
|
|
734
734
|
}
|
|
735
735
|
return false
|
|
736
736
|
},
|
|
737
|
-
|
|
738
|
-
const
|
|
737
|
+
computeTableBorder () {
|
|
738
|
+
const $xeTable = this
|
|
739
|
+
const props = $xeTable
|
|
740
|
+
|
|
741
|
+
const { border } = props
|
|
739
742
|
if (border === true) {
|
|
740
743
|
return 'full'
|
|
741
744
|
}
|
|
@@ -1213,7 +1216,6 @@ export default {
|
|
|
1213
1216
|
stripe,
|
|
1214
1217
|
showHeader,
|
|
1215
1218
|
height,
|
|
1216
|
-
tableBorder,
|
|
1217
1219
|
treeOpts,
|
|
1218
1220
|
treeConfig,
|
|
1219
1221
|
mouseConfig,
|
|
@@ -1250,6 +1252,7 @@ export default {
|
|
|
1250
1252
|
const loadingSlot = $scopedSlots.loading
|
|
1251
1253
|
const currLoading = this._isLoading || loading
|
|
1252
1254
|
const vSize = computeSize
|
|
1255
|
+
const tableBorder = $xeTable.computeTableBorder
|
|
1253
1256
|
const virtualScrollBars = $xeTable.computeVirtualScrollBars
|
|
1254
1257
|
const isArea = mouseConfig && mouseOpts.area
|
|
1255
1258
|
const tableStyle = $xeTable.computeTableStyle
|
|
@@ -78,17 +78,6 @@
|
|
|
78
78
|
.vxe-ico-picker {
|
|
79
79
|
width: 100%;
|
|
80
80
|
}
|
|
81
|
-
.vxe-cell--tree-node {
|
|
82
|
-
.vxe-input,
|
|
83
|
-
.vxe-textarea,
|
|
84
|
-
.vxe-select,
|
|
85
|
-
.vxe-tree-select,
|
|
86
|
-
.vxe-date-picker,
|
|
87
|
-
.vxe-number-input,
|
|
88
|
-
.vxe-ico-picker {
|
|
89
|
-
width: 100%;
|
|
90
|
-
}
|
|
91
|
-
}
|
|
92
81
|
}
|
|
93
82
|
}
|
|
94
83
|
}
|
|
@@ -110,6 +99,9 @@
|
|
|
110
99
|
width: 100%;
|
|
111
100
|
}
|
|
112
101
|
& > .vxe-cell--tree-node {
|
|
102
|
+
.vxe-default-input,
|
|
103
|
+
.vxe-default-textarea,
|
|
104
|
+
.vxe-default-select,
|
|
113
105
|
.vxe-input,
|
|
114
106
|
.vxe-textarea,
|
|
115
107
|
.vxe-select,
|
|
@@ -138,17 +130,6 @@
|
|
|
138
130
|
& > .vxe-ico-picker {
|
|
139
131
|
width: 100%;
|
|
140
132
|
}
|
|
141
|
-
& > .vxe-cell--tree-node {
|
|
142
|
-
.vxe-input,
|
|
143
|
-
.vxe-textarea,
|
|
144
|
-
.vxe-select,
|
|
145
|
-
.vxe-tree-select,
|
|
146
|
-
.vxe-date-picker,
|
|
147
|
-
.vxe-number-input,
|
|
148
|
-
.vxe-ico-picker {
|
|
149
|
-
width: 100%;
|
|
150
|
-
}
|
|
151
|
-
}
|
|
152
133
|
}
|
|
153
134
|
.vxe-cell,
|
|
154
135
|
.vxe-table--filter-template {
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|