vxe-table 3.11.34 → 3.11.36

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.
Files changed (49) hide show
  1. package/es/index.css +1 -1
  2. package/es/index.min.css +1 -1
  3. package/es/style.css +1 -1
  4. package/es/style.min.css +1 -1
  5. package/es/table/module/edit/mixin.js +57 -33
  6. package/es/table/module/export/mixin.js +23 -20
  7. package/es/table/module/filter/panel.js +10 -7
  8. package/es/table/src/methods.js +17 -10
  9. package/es/table/style.css +3 -25
  10. package/es/table/style.min.css +1 -1
  11. package/es/ui/index.js +2 -1
  12. package/es/ui/src/log.js +1 -1
  13. package/es/vxe-table/style.css +3 -25
  14. package/es/vxe-table/style.min.css +1 -1
  15. package/lib/index.css +1 -1
  16. package/lib/index.min.css +1 -1
  17. package/lib/index.umd.js +121 -71
  18. package/lib/index.umd.min.js +1 -1
  19. package/lib/style.css +1 -1
  20. package/lib/style.min.css +1 -1
  21. package/lib/table/module/edit/mixin.js +67 -33
  22. package/lib/table/module/edit/mixin.min.js +1 -1
  23. package/lib/table/module/export/mixin.js +22 -19
  24. package/lib/table/module/export/mixin.min.js +1 -1
  25. package/lib/table/module/filter/panel.js +12 -6
  26. package/lib/table/module/filter/panel.min.js +1 -1
  27. package/lib/table/src/methods.js +17 -11
  28. package/lib/table/src/methods.min.js +1 -1
  29. package/lib/table/style/style.css +3 -25
  30. package/lib/table/style/style.min.css +1 -1
  31. package/lib/ui/index.js +2 -1
  32. package/lib/ui/index.min.js +1 -1
  33. package/lib/ui/src/log.js +1 -1
  34. package/lib/ui/src/log.min.js +1 -1
  35. package/lib/vxe-table/style/style.css +3 -25
  36. package/lib/vxe-table/style/style.min.css +1 -1
  37. package/package.json +2 -2
  38. package/packages/table/module/edit/mixin.ts +58 -33
  39. package/packages/table/module/export/mixin.ts +24 -20
  40. package/packages/table/module/filter/panel.ts +11 -7
  41. package/packages/table/src/methods.ts +17 -10
  42. package/packages/ui/index.ts +1 -0
  43. package/styles/components/table.scss +3 -22
  44. /package/es/{iconfont.1734489177027.ttf → iconfont.1734659093549.ttf} +0 -0
  45. /package/es/{iconfont.1734489177027.woff → iconfont.1734659093549.woff} +0 -0
  46. /package/es/{iconfont.1734489177027.woff2 → iconfont.1734659093549.woff2} +0 -0
  47. /package/lib/{iconfont.1734489177027.ttf → iconfont.1734659093549.ttf} +0 -0
  48. /package/lib/{iconfont.1734489177027.woff → iconfont.1734659093549.woff} +0 -0
  49. /package/lib/{iconfont.1734489177027.woff2 → iconfont.1734659093549.woff2} +0 -0
@@ -48,8 +48,7 @@ function insertTreeRow (_vm: any, newRecords: any[], isAppend: any) {
48
48
  })
49
49
  }
50
50
 
51
- function handleInsertRowAt (_vm: any, records: any[], row: any, isInsertNextRow?: any) {
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[] = _vm.defineField(records.map(record => Object.assign(treeConfig && transform ? { [mapChildrenField]: [], [childrenField]: [] } : {}, record)))
67
- if (XEUtils.eqNull(row)) {
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(_vm, newRecords, false)
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 (row === -1) {
88
+ if (targetRow === -1) {
90
89
  // 如果为虚拟树
91
90
  if (treeConfig && transform) {
92
- insertTreeRow(_vm, newRecords, true)
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) => row[rowField] === item[rowField], { children: mapChildrenField })
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(_vm, parentRow)]
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(_vm, item)
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) => row[rowField] === item[rowField], { children: childrenField })
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(_vm, newRecords, true)
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(row)) {
166
- if (row < afterFullData.length) {
167
- afIndex = row
164
+ if (XEUtils.isNumber(targetRow)) {
165
+ if (targetRow < afterFullData.length) {
166
+ afIndex = targetRow
168
167
  }
169
168
  } else {
170
- afIndex = _vm.findRowIndexOf(afterFullData, row)
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(_vm.findRowIndexOf(tableFullData, row), 0, ...newRecords)
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
- _vm.cacheRowMap()
199
- _vm.updateScrollYStatus()
200
- _vm.handleTableData(treeConfig && transform)
197
+ $xeTable.cacheRowMap()
198
+ $xeTable.updateScrollYStatus()
199
+ $xeTable.handleTableData(treeConfig && transform)
201
200
  if (!(treeConfig && transform)) {
202
- _vm.updateAfterDataIndex()
201
+ $xeTable.updateAfterDataIndex()
203
202
  }
204
- _vm.updateFooter()
205
- _vm.checkSelectionStatus()
206
- if (_vm.scrollYLoad) {
207
- _vm.updateScrollYSpace()
203
+ $xeTable.updateFooter()
204
+ $xeTable.checkSelectionStatus()
205
+ if ($xeTable.scrollYLoad) {
206
+ $xeTable.updateScrollYSpace()
208
207
  }
209
- return _vm.$nextTick().then(() => {
210
- _vm.updateCellAreas()
211
- return _vm.recalculate()
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} row 指定行
252
+ * @param {Row} targetRow 指定行
237
253
  * @returns
238
254
  */
239
- _insertAt (records: any, row: any) {
240
- return handleInsertRowAt(this, records, row)
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
- _insertNextAt (records: any, row: any) {
243
- return handleInsertRowAt(this, records, row, true)
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
- function getBodyLabelData ($xetable: any, opts: any, columns: any[], datas: any[]) {
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 } = $xetable
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) && $xetable.isTreeExpandByRow(parentRow)))) {
84
- const hasRowChild = hasTreeChildren($xetable, row)
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 && $xetable.isTreeExpandByRow(row)
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: $xetable, row, column, options: opts })
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($xetable, seqValue, row, $rowIndex, column, $columnIndex)
114
+ cellValue = mode === 'all' ? seqValue : getSeq($xeTable, seqValue, row, $rowIndex, column, $columnIndex)
111
115
  break
112
116
  }
113
117
  case 'checkbox':
114
- cellValue = toBooleanValue($xetable.isCheckedByCheckboxRow(row))
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($xetable.isCheckedByRadioRow(row))
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 = $xetable.getCellLabel(row, column)
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 = $xetable.getCellElement(row, column)
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] = XEUtils.toValueString(cellValue)
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: $xetable, row, column, options: opts })
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($xetable, seqValue, row, $rowIndex, column, $columnIndex)
175
+ cellValue = mode === 'all' ? seqValue : getSeq($xeTable, seqValue, row, $rowIndex, column, $columnIndex)
172
176
  break
173
177
  }
174
178
  case 'checkbox':
175
- cellValue = toBooleanValue($xetable.isCheckedByCheckboxRow(row))
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($xetable.isCheckedByRadioRow(row))
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 = $xetable.getCellLabel(row, column)
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 = $xetable.getCellElement(row, column)
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] = XEUtils.toValueString(cellValue)
205
+ item[column.id] = toStringValue(cellValue)
202
206
  })
203
207
  return item
204
208
  })
@@ -17,25 +17,29 @@ export default {
17
17
  }
18
18
  } as any,
19
19
  render (this: any, h: CreateElement) {
20
- const { $parent: $xetable, filterStore } = this
21
- const { args, column } = filterStore
20
+ const $xeTable = this.$parent
21
+
22
+ const { filterStore } = this
23
+ const { args, visible, multiple, column } = filterStore
22
24
  const filterRender = column ? column.filterRender : null
23
25
  const compConf = isEnableConf(filterRender) ? renderer.get(filterRender.name) : null
24
26
  const filterClassName = compConf ? (compConf.tableFilterClassName || compConf.filterClassName) : ''
27
+ const filterOpts = $xeTable.computeFilterOpts
28
+ const { destroyOnClose } = filterOpts
25
29
  return h('div', {
26
30
  class: [
27
31
  'vxe-table--filter-wrapper',
28
32
  'filter--prevent-default',
29
33
  compConf && compConf.className ? compConf.className : '',
30
- getClass(filterClassName, Object.assign({ $panel: this, $table: $xetable }, args)),
34
+ getClass(filterClassName, Object.assign({ $panel: this, $table: $xeTable }, args)),
31
35
  {
32
- 'is--animat': $xetable.animat,
33
- 'is--multiple': filterStore.multiple,
34
- 'is--active': filterStore.visible
36
+ 'is--animat': $xeTable.animat,
37
+ 'is--multiple': multiple,
38
+ 'is--active': visible
35
39
  }
36
40
  ],
37
41
  style: filterStore.style
38
- }, filterStore.visible && column ? this.renderOptions(h, filterRender, compConf).concat(this.renderFooter(h)) : [])
42
+ }, filterStore.visible && (destroyOnClose ? visible : true) && column ? this.renderOptions(h, filterRender, compConf).concat(this.renderFooter(h)) : [])
39
43
  },
40
44
  methods: {
41
45
  renderOptions (h: CreateElement, filterRender: any, compConf: any) {
@@ -2685,7 +2685,7 @@ const Methods = {
2685
2685
 
2686
2686
  const { rceTimeout } = internalData
2687
2687
  const el = $xeTable.$refs.refElem
2688
- if (!el || !el.clientWidth) {
2688
+ if (el && el.clientWidth) {
2689
2689
  $xeTable.autoCellWidth()
2690
2690
  }
2691
2691
  if (rceTimeout) {
@@ -6288,18 +6288,25 @@ const Methods = {
6288
6288
  const rowRest = fullAllDataRowIdData[getRowid($xeTable, row)]
6289
6289
  return rowRest && !!rowRest.treeLoaded
6290
6290
  },
6291
- clearTreeExpandLoaded (row: any) {
6291
+ clearTreeExpandLoaded (rows: any) {
6292
6292
  const $xeTable = this
6293
6293
 
6294
6294
  const { treeOpts, treeExpandedMaps, fullAllDataRowIdData } = this
6295
- const { transform, lazy } = treeOpts
6296
- const rowid = getRowid($xeTable, row)
6297
- const rowRest = fullAllDataRowIdData[rowid]
6298
- if (lazy && rowRest) {
6299
- rowRest.treeLoaded = false
6300
- if (treeExpandedMaps[rowid]) {
6301
- delete treeExpandedMaps[rowid]
6295
+ const { transform } = treeOpts
6296
+ if (rows) {
6297
+ if (!XEUtils.isArray(rows)) {
6298
+ rows = [rows]
6302
6299
  }
6300
+ rows.forEach((row: any) => {
6301
+ const rowid = getRowid($xeTable, row)
6302
+ const rowRest = fullAllDataRowIdData[rowid]
6303
+ if (rowRest) {
6304
+ rowRest.treeLoaded = false
6305
+ if (treeExpandedMaps[rowid]) {
6306
+ delete treeExpandedMaps[rowid]
6307
+ }
6308
+ }
6309
+ })
6303
6310
  }
6304
6311
  if (transform) {
6305
6312
  this.handleVirtualTreeToList()
@@ -7435,7 +7442,7 @@ const Methods = {
7435
7442
  } as any
7436
7443
 
7437
7444
  // Module methods
7438
- 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(',')
7439
7446
 
7440
7447
  funcs.forEach(name => {
7441
7448
  Methods[name] = function (...args: any[]) {
@@ -111,6 +111,7 @@ VxeUI.setConfig({
111
111
  filterConfig: {
112
112
  // remote: false,
113
113
  // filterMethod: null,
114
+ // destroyOnClose: false,
114
115
  showIcon: true
115
116
  },
116
117
  treeConfig: {
@@ -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 {