vxe-table 3.8.9 → 3.8.10-beta.1

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 (104) hide show
  1. package/lib/button/src/button.js +45 -40
  2. package/lib/button/src/button.min.js +1 -1
  3. package/lib/button/style/style.css +21 -0
  4. package/lib/button/style/style.min.css +1 -1
  5. package/lib/checkbox/src/checkbox.js +1 -1
  6. package/lib/checkbox/src/checkbox.min.js +1 -1
  7. package/lib/custom/src/panel.js +13 -11
  8. package/lib/custom/src/panel.min.js +1 -1
  9. package/lib/export/src/export-panel.js +6 -18
  10. package/lib/export/src/export-panel.min.js +1 -1
  11. package/lib/export/src/import-panel.js +6 -11
  12. package/lib/export/src/import-panel.min.js +1 -1
  13. package/lib/export/src/mixin.js +51 -21
  14. package/lib/export/src/mixin.min.js +1 -1
  15. package/lib/filter/src/mixin.js +5 -4
  16. package/lib/filter/src/mixin.min.js +1 -1
  17. package/lib/filter/src/panel.js +6 -3
  18. package/lib/filter/src/panel.min.js +1 -1
  19. package/lib/icon/style/{iconfont.1719372002523.ttf → iconfont.1720087701329.ttf} +0 -0
  20. package/lib/icon/style/iconfont.1720087701329.woff +0 -0
  21. package/lib/icon/style/iconfont.1720087701329.woff2 +0 -0
  22. package/lib/icon/style/style.css +25 -10
  23. package/lib/icon/style/style.min.css +25 -10
  24. package/lib/{iconfont.1719372002523.ttf → iconfont.1720087701329.ttf} +0 -0
  25. package/lib/iconfont.1720087701329.woff +0 -0
  26. package/lib/iconfont.1720087701329.woff2 +0 -0
  27. package/lib/index.css +1 -1
  28. package/lib/index.umd.js +175 -138
  29. package/lib/index.umd.min.js +1 -1
  30. package/lib/locale/lang/en-US.js +7 -3
  31. package/lib/locale/lang/en-US.min.js +1 -1
  32. package/lib/locale/lang/en-US.umd.js +7 -3
  33. package/lib/locale/lang/es-ES.js +7 -3
  34. package/lib/locale/lang/es-ES.min.js +1 -1
  35. package/lib/locale/lang/es-ES.umd.js +7 -3
  36. package/lib/locale/lang/ja-JP.js +7 -3
  37. package/lib/locale/lang/ja-JP.min.js +1 -1
  38. package/lib/locale/lang/ja-JP.umd.js +7 -3
  39. package/lib/locale/lang/pt-BR.js +7 -3
  40. package/lib/locale/lang/pt-BR.min.js +1 -1
  41. package/lib/locale/lang/pt-BR.umd.js +7 -3
  42. package/lib/locale/lang/zh-CN.js +7 -3
  43. package/lib/locale/lang/zh-CN.min.js +1 -1
  44. package/lib/locale/lang/zh-CN.umd.js +7 -3
  45. package/lib/locale/lang/zh-HK.min.js +1 -1
  46. package/lib/locale/lang/zh-HK.umd.js +7 -3
  47. package/lib/locale/lang/zh-MO.min.js +1 -1
  48. package/lib/locale/lang/zh-MO.umd.js +7 -3
  49. package/lib/locale/lang/zh-TC.js +7 -3
  50. package/lib/locale/lang/zh-TC.min.js +1 -1
  51. package/lib/locale/lang/zh-TC.umd.js +7 -3
  52. package/lib/locale/lang/zh-TW.min.js +1 -1
  53. package/lib/locale/lang/zh-TW.umd.js +7 -3
  54. package/lib/style.css +1 -1
  55. package/lib/style.min.css +1 -1
  56. package/lib/table/src/header.js +3 -0
  57. package/lib/table/src/header.min.js +1 -1
  58. package/lib/table/src/methods.js +24 -20
  59. package/lib/table/src/methods.min.js +1 -1
  60. package/lib/table/src/table.js +1 -1
  61. package/lib/table/src/table.min.js +1 -1
  62. package/lib/tools/log.js +1 -1
  63. package/lib/tools/log.min.js +1 -1
  64. package/lib/v-x-e-table/index.js +1 -1
  65. package/lib/v-x-e-table/index.min.js +1 -1
  66. package/lib/v-x-e-table/src/conf.js +9 -2
  67. package/lib/v-x-e-table/src/conf.min.js +1 -1
  68. package/lib/v-x-e-table/style/style.css +25 -10
  69. package/lib/v-x-e-table/style/style.min.css +1 -1
  70. package/lib/vxe-button/style/style.css +21 -0
  71. package/lib/vxe-button/style/style.min.css +1 -1
  72. package/lib/vxe-icon/style/style.css +25 -10
  73. package/lib/vxe-icon/style/style.min.css +1 -1
  74. package/package.json +1 -1
  75. package/packages/button/src/button.js +44 -40
  76. package/packages/checkbox/src/checkbox.js +1 -1
  77. package/packages/custom/src/panel.js +13 -11
  78. package/packages/export/src/export-panel.js +6 -18
  79. package/packages/export/src/import-panel.js +7 -12
  80. package/packages/export/src/mixin.js +48 -23
  81. package/packages/filter/src/mixin.js +5 -4
  82. package/packages/filter/src/panel.js +3 -3
  83. package/packages/locale/lang/en-US.js +7 -3
  84. package/packages/locale/lang/es-ES.js +7 -3
  85. package/packages/locale/lang/ja-JP.js +7 -3
  86. package/packages/locale/lang/pt-BR.js +7 -3
  87. package/packages/locale/lang/zh-CN.js +7 -3
  88. package/packages/locale/lang/zh-TC.js +7 -3
  89. package/packages/table/src/header.js +1 -0
  90. package/packages/table/src/methods.js +22 -18
  91. package/packages/table/src/table.js +1 -1
  92. package/packages/v-x-e-table/src/conf.js +9 -2
  93. package/styles/button.scss +6 -0
  94. package/styles/icon/iconfont.ttf +0 -0
  95. package/styles/icon/iconfont.woff +0 -0
  96. package/styles/icon/iconfont.woff2 +0 -0
  97. package/styles/icon.scss +26 -10
  98. package/styles/old-icon.scss +1 -1
  99. package/types/table.d.ts +2 -1
  100. package/types/v-x-e-table/index.d.ts +1 -0
  101. package/lib/icon/style/iconfont.1719372002523.woff +0 -0
  102. package/lib/icon/style/iconfont.1719372002523.woff2 +0 -0
  103. package/lib/iconfont.1719372002523.woff +0 -0
  104. package/lib/iconfont.1719372002523.woff2 +0 -0
@@ -826,7 +826,7 @@ function handleImport ($xetable, content, opts) {
826
826
  $xetable.createData(rows)
827
827
  .then((data) => {
828
828
  let loadRest
829
- if (opts.mode === 'insert') {
829
+ if (opts.mode === 'insert' || opts.mode === 'insertBottom') {
830
830
  loadRest = $xetable.insert(data)
831
831
  } else {
832
832
  loadRest = $xetable.reloadData(data)
@@ -894,7 +894,7 @@ function handleFileImport ($xetable, file, opts) {
894
894
  $xetable._importResolve = _importResolve
895
895
  $xetable._importReject = _importReject
896
896
  if (window.FileReader) {
897
- const options = Object.assign({ mode: 'insert' }, opts, { type, filename })
897
+ const options = Object.assign({ mode: 'insertBottom' }, opts, { type, filename })
898
898
  if (options.remote) {
899
899
  if (importMethod) {
900
900
  Promise.resolve(importMethod({ file, options, $table: $xetable })).then(() => {
@@ -1044,28 +1044,40 @@ export function handlePrint ($xetable, opts, content) {
1044
1044
  }
1045
1045
 
1046
1046
  function handleExportAndPrint ($xetable, options, isPrint) {
1047
- const { initStore, customOpts, collectColumn, footerTableData, treeConfig, mergeList, isGroup, exportParams, exportOpts } = $xetable
1047
+ const { $xegrid, initStore, customOpts, collectColumn, footerTableData, treeConfig, mergeList, isGroup, exportParams, exportOpts } = $xetable
1048
+ const proxyOpts = $xegrid ? $xegrid.proxyOpts : {}
1048
1049
  const selectRecords = $xetable.getCheckboxRecords()
1049
1050
  const hasFooter = !!footerTableData.length
1050
1051
  const hasTree = treeConfig
1051
1052
  const hasMerge = !hasTree && mergeList.length
1052
- const defOpts = Object.assign({ message: true, isHeader: true }, options)
1053
+ const defOpts = Object.assign({
1054
+ message: true,
1055
+ isHeader: true,
1056
+ current: 'current',
1057
+ modes: ['current', 'selected'].concat(proxyOpts.ajax && proxyOpts.ajax.queryAll ? ['all'] : [])
1058
+ }, options)
1053
1059
  const types = defOpts.types || XEUtils.keys(exportOpts._typeMaps)
1054
- const modes = defOpts.modes
1060
+ const modes = defOpts.modes || []
1055
1061
  const checkMethod = customOpts.checkMethod
1056
1062
  const exportColumns = collectColumn.slice(0)
1057
1063
  const { columns } = defOpts
1058
1064
  // 处理类型
1059
- const typeList = types.map(value => {
1065
+ const typeList = types.map((value) => {
1060
1066
  return {
1061
1067
  value,
1062
- label: `vxe.export.types.${value}`
1068
+ label: GlobalConfig.i18n(`vxe.export.types.${value}`)
1063
1069
  }
1064
1070
  })
1065
- const modeList = modes.map(value => {
1071
+ const modeList = modes.map((item) => {
1072
+ if (item && item.value) {
1073
+ return {
1074
+ value: item.value,
1075
+ label: item.label || item.value
1076
+ }
1077
+ }
1066
1078
  return {
1067
- value,
1068
- label: `vxe.export.modes.${value}`
1079
+ value: item,
1080
+ label: GlobalConfig.i18n(`vxe.export.modes.${item}`)
1069
1081
  }
1070
1082
  })
1071
1083
  // 默认选中
@@ -1113,11 +1125,11 @@ function handleExportAndPrint ($xetable, options, isPrint) {
1113
1125
  Object.assign(exportParams, {
1114
1126
  mode: selectRecords.length ? 'selected' : 'current'
1115
1127
  }, defOpts)
1116
- if (modes.indexOf(exportParams.mode) === -1) {
1117
- exportParams.mode = modes[0]
1128
+ if (!modeList.some(item => item.value === exportParams.mode)) {
1129
+ exportParams.mode = modeList[0].value
1118
1130
  }
1119
- if (types.indexOf(exportParams.type) === -1) {
1120
- exportParams.type = types[0]
1131
+ if (!typeList.some(item => item.value === exportParams.type)) {
1132
+ exportParams.type = typeList[0].value
1121
1133
  }
1122
1134
  initStore.export = true
1123
1135
  return $xetable.$nextTick()
@@ -1297,7 +1309,7 @@ export default {
1297
1309
  }
1298
1310
 
1299
1311
  if (!opts.data) {
1300
- opts.data = afterFullData
1312
+ opts.data = []
1301
1313
  if (mode === 'selected') {
1302
1314
  const selectRecords = this.getCheckboxRecords()
1303
1315
  if (['html', 'pdf'].indexOf(type) > -1 && treeConfig) {
@@ -1343,6 +1355,8 @@ export default {
1343
1355
  })
1344
1356
  }
1345
1357
  }
1358
+ } else if (mode === 'current') {
1359
+ opts.data = afterFullData
1346
1360
  }
1347
1361
  }
1348
1362
  return handleExport(this, opts)
@@ -1427,11 +1441,13 @@ export default {
1427
1441
  _openImport (options) {
1428
1442
  const { importOpts } = this
1429
1443
  const defOpts = Object.assign({
1430
- mode: 'insert',
1444
+ mode: 'insertBottom',
1431
1445
  message: true,
1432
- types: XEUtils.keys(importOpts._typeMaps)
1446
+ types: XEUtils.keys(importOpts._typeMaps),
1447
+ modes: ['insertBottom', 'covering']
1433
1448
  }, options, importOpts)
1434
- const { types } = defOpts
1449
+ const types = defOpts.types || []
1450
+ const modes = defOpts.modes || []
1435
1451
  const isTree = !!this.getTreeStatus()
1436
1452
  if (isTree) {
1437
1453
  if (defOpts.message) {
@@ -1443,16 +1459,22 @@ export default {
1443
1459
  errLog('vxe.error.reqProp', ['import-config'])
1444
1460
  }
1445
1461
  // 处理类型
1446
- const typeList = types.map(value => {
1462
+ const typeList = types.map((value) => {
1447
1463
  return {
1448
1464
  value,
1449
- label: `vxe.export.types.${value}`
1465
+ label: GlobalConfig.i18n(`vxe.export.types.${value}`)
1450
1466
  }
1451
1467
  })
1452
- const modeList = defOpts.modes.map(value => {
1468
+ const modeList = modes.map((item) => {
1469
+ if (item && item.value) {
1470
+ return {
1471
+ value: item.value,
1472
+ label: item.label || item.value
1473
+ }
1474
+ }
1453
1475
  return {
1454
- value,
1455
- label: `vxe.import.modes.${value}`
1476
+ value: item,
1477
+ label: GlobalConfig.i18n(`vxe.import.modes.${item}`)
1456
1478
  }
1457
1479
  })
1458
1480
  Object.assign(this.importStore, {
@@ -1464,6 +1486,9 @@ export default {
1464
1486
  visible: true
1465
1487
  })
1466
1488
  Object.assign(this.importParams, defOpts)
1489
+ if (!modeList.some(item => item.value === this.importParams.mode)) {
1490
+ this.importParams.mode = modeList[0].value
1491
+ }
1467
1492
  this.initStore.import = true
1468
1493
  },
1469
1494
  _openExport (options) {
@@ -1,6 +1,7 @@
1
1
  import XEUtils from 'xe-utils'
2
2
  import DomTools from '../../tools/dom'
3
3
  import { toFilters, handleFieldOrColumn } from '../../table/src/util'
4
+ import { isEnableConf } from '../../tools/utils'
4
5
  import VXETable from '../../v-x-e-table'
5
6
 
6
7
  export default {
@@ -29,12 +30,12 @@ export default {
29
30
  * @param {ColumnInfo} fieldOrColumn 列
30
31
  * @param {Array} options 选项
31
32
  */
32
- _setFilter (fieldOrColumn, options) {
33
+ _setFilter (fieldOrColumn, options, update) {
33
34
  const column = handleFieldOrColumn(this, fieldOrColumn)
34
35
  if (column && column.filters) {
35
36
  column.filters = toFilters(options || [])
36
37
  }
37
- return this.$nextTick()
38
+ return update ? this.updateData() : this.$nextTick()
38
39
  },
39
40
  checkFilterOptions () {
40
41
  const { filterStore } = this
@@ -57,7 +58,7 @@ export default {
57
58
  } else {
58
59
  const { target: targetElem, pageX } = evnt
59
60
  const { filters, filterMultiple, filterRender } = column
60
- const compConf = filterRender ? VXETable.renderer.get(filterRender.name) : null
61
+ const compConf = isEnableConf(filterRender) ? VXETable.renderer.get(filterRender.name) : null
61
62
  const filterRecoverMethod = column.filterRecoverMethod || (compConf ? (compConf.tableFilterRecoverMethod || compConf.filterRecoverMethod) : null)
62
63
  const { visibleWidth } = DomTools.getDomNode()
63
64
  Object.assign(filterStore, {
@@ -205,7 +206,7 @@ export default {
205
206
  if (column) {
206
207
  const { filters, filterRender } = column
207
208
  if (filters) {
208
- const compConf = filterRender ? VXETable.renderer.get(filterRender.name) : null
209
+ const compConf = isEnableConf(filterRender) ? VXETable.renderer.get(filterRender.name) : null
209
210
  const filterResetMethod = column.filterResetMethod || (compConf ? (compConf.tableFilterResetMethod || compConf.filterResetMethod) : null)
210
211
  filters.forEach((item) => {
211
212
  item._checked = false
@@ -1,6 +1,6 @@
1
1
  import GlobalConfig from '../../v-x-e-table/src/conf'
2
2
  import VXETable from '../../v-x-e-table'
3
- import UtilTools from '../../tools/utils'
3
+ import UtilTools, { isEnableConf } from '../../tools/utils'
4
4
  import { getSlotVNs } from '../../tools/vn'
5
5
 
6
6
  export default {
@@ -18,7 +18,7 @@ export default {
18
18
  const { $parent: $xetable, filterStore } = this
19
19
  const { args, column } = filterStore
20
20
  const filterRender = column ? column.filterRender : null
21
- const compConf = filterRender ? VXETable.renderer.get(filterRender.name) : null
21
+ const compConf = isEnableConf(filterRender) ? VXETable.renderer.get(filterRender.name) : null
22
22
  const filterClassName = compConf ? (compConf.tableFilterClassName || compConf.filterClassName) : ''
23
23
  return h('div', {
24
24
  class: [
@@ -120,7 +120,7 @@ export default {
120
120
  const { filterOpts } = $xetable
121
121
  const { column, multiple } = filterStore
122
122
  const filterRender = column.filterRender
123
- const compConf = filterRender ? VXETable.renderer.get(filterRender.name) : null
123
+ const compConf = isEnableConf(filterRender) ? VXETable.renderer.get(filterRender.name) : null
124
124
  const isDisabled = !hasCheckOption && !filterStore.isAllSelected && !filterStore.isIndeterminate
125
125
  return multiple && (compConf ? !(compConf.showTableFilterFooter === false || compConf.showFilterFooter === false) : true) ? [
126
126
  h('div', {
@@ -119,7 +119,8 @@ export default {
119
119
  colTitle: 'Title',
120
120
  colResizable: 'Column width (px)',
121
121
  colVisible: 'Visible',
122
- colFixed: 'Freeze columns (Max. {0})',
122
+ colFixed: 'Freeze columns',
123
+ colFixedMax: 'Freeze columns (Max. {0})',
123
124
  fixedLeft: 'Left',
124
125
  fixedUnset: 'Unset',
125
126
  fixedRight: 'Right'
@@ -127,14 +128,17 @@ export default {
127
128
  },
128
129
  import: {
129
130
  modes: {
130
- covering: 'Covering',
131
- insert: 'Insert'
131
+ covering: 'Overwrite mode (directly overwrite table data)',
132
+ insert: 'Bottom append (appends new data to the bottom of the table)',
133
+ insertTop: 'Top append (appends new data to the top of the table)',
134
+ insertBottom: 'Bottom append (appends new data to the bottom of the table)'
132
135
  },
133
136
  impTitle: 'Import data',
134
137
  impFile: 'Filename',
135
138
  impSelect: 'Select file',
136
139
  impType: 'File type',
137
140
  impOpts: 'Settings',
141
+ impMode: 'Import mode',
138
142
  impConfirm: 'Import',
139
143
  impCancel: 'Cancel'
140
144
  },
@@ -119,7 +119,8 @@ export default {
119
119
  colTitle: 'Title',
120
120
  colResizable: 'Column width (px)',
121
121
  colVisible: 'Visible',
122
- colFixed: 'Freeze columns (Max {0})',
122
+ colFixed: 'Freeze columns',
123
+ colFixedMax: 'Freeze columns (Max {0})',
123
124
  fixedLeft: 'Left',
124
125
  fixedUnset: 'Unset',
125
126
  fixedRight: 'Right'
@@ -127,14 +128,17 @@ export default {
127
128
  },
128
129
  import: {
129
130
  modes: {
130
- covering: 'Cubriendo',
131
- insert: 'Insertar'
131
+ covering: 'Overwrite mode (directly overwrite table data)',
132
+ insert: 'Bottom append (appends new data to the bottom of the table)',
133
+ insertTop: 'Top append (appends new data to the top of the table)',
134
+ insertBottom: 'Bottom append (appends new data to the bottom of the table)'
132
135
  },
133
136
  impTitle: 'Importar datos',
134
137
  impFile: 'Nombre del archivo',
135
138
  impSelect: 'Seleccionar archivo',
136
139
  impType: 'Tipo de archivo',
137
140
  impOpts: 'Configuración',
141
+ impMode: 'Import mode',
138
142
  impConfirm: 'Importar',
139
143
  impCancel: 'Cancelar'
140
144
  },
@@ -119,7 +119,8 @@ export default {
119
119
  colTitle: 'タイトル',
120
120
  colResizable: 'Column width (px)',
121
121
  colVisible: '表示',
122
- colFixed: '冻结列(最多 {0} 列)',
122
+ colFixed: '冻结列',
123
+ colFixedMax: '冻结列(最多 {0} 列)',
123
124
  fixedLeft: '左側',
124
125
  fixedUnset: '指定しない',
125
126
  fixedRight: '右側'
@@ -127,14 +128,17 @@ export default {
127
128
  },
128
129
  import: {
129
130
  modes: {
130
- covering: '上書き',
131
- insert: '追加'
131
+ covering: 'Overwrite mode (directly overwrite table data)',
132
+ insert: 'Bottom append (appends new data to the bottom of the table)',
133
+ insertTop: 'Top append (appends new data to the top of the table)',
134
+ insertBottom: 'Bottom append (appends new data to the bottom of the table)'
132
135
  },
133
136
  impTitle: 'データインポート',
134
137
  impFile: 'ファイル名',
135
138
  impSelect: 'ファイル選択',
136
139
  impType: 'ファイルの種類',
137
140
  impOpts: 'パラメータ指定',
141
+ impMode: 'Import mode',
138
142
  impConfirm: 'インポート',
139
143
  impCancel: 'キャンセル'
140
144
  },
@@ -119,7 +119,8 @@ export default {
119
119
  colTitle: 'Title',
120
120
  colResizable: 'Column width (px)',
121
121
  colVisible: 'Visible',
122
- colFixed: 'Freeze columns (Max {0})',
122
+ colFixed: 'Freeze columns',
123
+ colFixedMax: 'Freeze columns (Max {0})',
123
124
  fixedLeft: 'Left',
124
125
  fixedUnset: 'Unset',
125
126
  fixedRight: 'Right'
@@ -127,14 +128,17 @@ export default {
127
128
  },
128
129
  import: {
129
130
  modes: {
130
- covering: 'Sobrescrever',
131
- insert: 'Inserir'
131
+ covering: 'Overwrite mode (directly overwrite table data)',
132
+ insert: 'Bottom append (appends new data to the bottom of the table)',
133
+ insertTop: 'Top append (appends new data to the top of the table)',
134
+ insertBottom: 'Bottom append (appends new data to the bottom of the table)'
132
135
  },
133
136
  impTitle: 'Importar dados',
134
137
  impFile: 'Nome do arquivo',
135
138
  impSelect: 'Selecionar arquivo',
136
139
  impType: 'Tipo de arquivo',
137
140
  impOpts: 'Configurações',
141
+ impMode: 'Import mode',
138
142
  impConfirm: 'Importar',
139
143
  impCancel: 'Cancelar'
140
144
  },
@@ -119,7 +119,8 @@ export default {
119
119
  colTitle: '标题',
120
120
  colResizable: '列宽(像素)',
121
121
  colVisible: '是否显示',
122
- colFixed: '冻结列(最多 {0} 列)',
122
+ colFixed: '冻结列',
123
+ colFixedMax: '冻结列(最多 {0} 列)',
123
124
  fixedLeft: '左侧',
124
125
  fixedUnset: '不设置',
125
126
  fixedRight: '右侧'
@@ -127,14 +128,17 @@ export default {
127
128
  },
128
129
  import: {
129
130
  modes: {
130
- covering: '覆盖',
131
- insert: '新增'
131
+ covering: '覆盖方式(直接覆盖表格数据)',
132
+ insert: '底部追加(在表格的底部追加新数据)',
133
+ insertTop: '顶部追加(在表格的顶部追加新数据)',
134
+ insertBottom: '底部追加(在表格的底部追加新数据)'
132
135
  },
133
136
  impTitle: '导入数据',
134
137
  impFile: '文件名',
135
138
  impSelect: '选择文件',
136
139
  impType: '文件类型',
137
140
  impOpts: '参数设置',
141
+ impMode: '导入模式',
138
142
  impConfirm: '导入',
139
143
  impCancel: '取消'
140
144
  },
@@ -119,7 +119,8 @@ export default {
119
119
  colTitle: '標題',
120
120
  colResizable: '列宽(像素)',
121
121
  colVisible: '是否顯示',
122
- colFixed: '冻结列(最多 {0} 列)',
122
+ colFixed: '冻结列',
123
+ colFixedMax: '冻结列(最多 {0} 列)',
123
124
  fixedLeft: '左側',
124
125
  fixedUnset: '不設定',
125
126
  fixedRight: '右側'
@@ -127,14 +128,17 @@ export default {
127
128
  },
128
129
  import: {
129
130
  modes: {
130
- covering: '覆盖',
131
- insert: '新增'
131
+ covering: '覆盖方式(直接覆盖表格数据)',
132
+ insert: '底部追加(在表格的底部追加新数据)',
133
+ insertTop: '顶部追加(在表格的顶部追加新数据)',
134
+ insertBottom: '底部追加(在表格的底部追加新数据)'
132
135
  },
133
136
  impTitle: '導入數據',
134
137
  impFile: '檔名',
135
138
  impSelect: '選擇檔案',
136
139
  impType: '檔案類型',
137
140
  impOpts: '參數設置',
141
+ impMode: '導入模式',
138
142
  impConfirm: '導入',
139
143
  impCancel: '取消'
140
144
  },
@@ -283,6 +283,7 @@ export default {
283
283
  $xetable.saveCustomStore('update:visible')
284
284
  $xetable.updateCellAreas()
285
285
  $xetable.emitEvent('resizable-change', { ...params, resizeWidth }, evnt)
286
+ setTimeout(() => $xetable.recalculate(true), 300)
286
287
  })
287
288
  DomTools.removeClass($xetable.$el, 'drag--resize')
288
289
  }
@@ -1364,7 +1364,7 @@ const Methods = {
1364
1364
  return filterColumns.every(({ column, valueList, itemList }) => {
1365
1365
  if (valueList.length && !allRemoteFilter) {
1366
1366
  const { filterMethod, filterRender, field } = column
1367
- const compConf = filterRender ? VXETable.renderer.get(filterRender.name) : null
1367
+ const compConf = isEnableConf(filterRender) ? VXETable.renderer.get(filterRender.name) : null
1368
1368
  const compFilterMethod = compConf && compConf.renderFilter ? (compConf.tableFilterMethod || compConf.filterMethod) : null
1369
1369
  const defaultFilterMethod = compConf ? (compConf.defaultTableFilterMethod || compConf.defaultFilterMethod) : null
1370
1370
  const cellValue = UtilTools.getCellValue(row, column)
@@ -1566,7 +1566,6 @@ const Methods = {
1566
1566
  */
1567
1567
  setColumnFixed (fieldOrColumn, fixed) {
1568
1568
  const { isMaxFixedColumn, columnOpts } = this
1569
- const { maxFixedSize } = columnOpts
1570
1569
  const column = handleFieldOrColumn(this, fieldOrColumn)
1571
1570
  const targetColumn = getRootColumn(this, column)
1572
1571
  if (targetColumn && targetColumn.fixed !== fixed) {
@@ -1575,7 +1574,7 @@ const Methods = {
1575
1574
  if (VXETable.modal) {
1576
1575
  VXETable.modal.message({
1577
1576
  status: 'error',
1578
- content: GlobalConfig.i18n('vxe.table.maxFixedCol', [maxFixedSize])
1577
+ content: GlobalConfig.i18n('vxe.table.maxFixedCol', [columnOpts.maxFixedSize])
1579
1578
  })
1580
1579
  }
1581
1580
  return this.$nextTick()
@@ -1702,19 +1701,22 @@ const Methods = {
1702
1701
  if (resizableData || sortData || visibleData || fixedData) {
1703
1702
  tableFullColumn.forEach(column => {
1704
1703
  const colKey = column.getKey()
1704
+ // 支持一级
1705
+ if (!parent) {
1706
+ if (fixedData && fixedData[colKey]) {
1707
+ column.fixed = fixedData[colKey]
1708
+ }
1709
+ if (sortData && XEUtils.isNumber(sortData[colKey])) {
1710
+ hasCustomSort = true
1711
+ column.renderSortNumber = sortData[colKey]
1712
+ }
1713
+ }
1705
1714
  if (resizableData && XEUtils.isNumber(resizableData[colKey])) {
1706
1715
  column.resizeWidth = resizableData[colKey]
1707
1716
  }
1708
1717
  if (visibleData && XEUtils.isBoolean(visibleData[colKey])) {
1709
1718
  column.visible = visibleData[colKey]
1710
1719
  }
1711
- if (fixedData && fixedData[colKey]) {
1712
- column.fixed = fixedData[colKey]
1713
- }
1714
- if (sortData && XEUtils.isNumber(sortData[colKey])) {
1715
- hasCustomSort = true
1716
- column.renderSortNumber = sortData[colKey]
1717
- }
1718
1720
  })
1719
1721
  // 如果自定义了顺序
1720
1722
  if (hasCustomSort) {
@@ -1778,7 +1780,7 @@ const Methods = {
1778
1780
  let hasFixedt = 0
1779
1781
  let hasVisible = 0
1780
1782
  XEUtils.eachTree(collectColumn, (column, index, items, path, parent) => {
1781
- // 排序只支持一级
1783
+ // 只支持一级
1782
1784
  if (!parent) {
1783
1785
  collectColumn.forEach((column) => {
1784
1786
  const colKey = column.getKey()
@@ -1787,6 +1789,13 @@ const Methods = {
1787
1789
  sortData[colKey] = column.renderSortNumber
1788
1790
  }
1789
1791
  })
1792
+ if (column.fixed && column.fixed !== column.defaultFixed) {
1793
+ const colKey = column.getKey()
1794
+ if (colKey) {
1795
+ hasFixedt = 1
1796
+ fixedData[colKey] = column.fixed
1797
+ }
1798
+ }
1790
1799
  }
1791
1800
  if (column.resizeWidth) {
1792
1801
  const colKey = column.getKey()
@@ -1795,13 +1804,6 @@ const Methods = {
1795
1804
  resizableData[colKey] = column.renderWidth
1796
1805
  }
1797
1806
  }
1798
- if (column.fixed && column.fixed !== column.defaultFixed) {
1799
- const colKey = column.getKey()
1800
- if (colKey) {
1801
- hasFixedt = 1
1802
- fixedData[colKey] = column.fixed
1803
- }
1804
- }
1805
1807
  if (!checkMethod || checkMethod({ column })) {
1806
1808
  if (!column.visible && column.defaultVisible) {
1807
1809
  const colKey = column.getKey()
@@ -5219,7 +5221,9 @@ const Methods = {
5219
5221
  tableBodyElem.scrollLeft = 0
5220
5222
  }
5221
5223
  scrollXStore.startIndex = 0
5224
+ scrollXStore.endIndex = scrollXStore.visibleSize
5222
5225
  scrollYStore.startIndex = 0
5226
+ scrollYStore.endIndex = scrollYStore.visibleSize
5223
5227
  return this.$nextTick()
5224
5228
  },
5225
5229
  /**
@@ -618,7 +618,7 @@ export default {
618
618
  const { collectColumn } = this
619
619
  let fixedSize = 0
620
620
  collectColumn.forEach((column) => {
621
- if (column.fixed) {
621
+ if (column.renderFixed) {
622
622
  fixedSize++
623
623
  }
624
624
  })
@@ -64,9 +64,16 @@ export default {
64
64
  allowFixed: true,
65
65
  allowSort: true,
66
66
  showFooter: true,
67
- placement: 'topRight'
67
+ placement: 'topRight',
68
68
  // storage: false,
69
- // checkMethod () {}
69
+ // checkMethod () {},
70
+ modalOptions: {
71
+ showZoom: true,
72
+ mask: true,
73
+ lockView: true,
74
+ resize: true,
75
+ escClosable: true
76
+ }
70
77
  },
71
78
  sortConfig: {
72
79
  // remote: false,
@@ -103,6 +103,9 @@ $btnThemeList: (
103
103
  &:hover {
104
104
  color: $vxe-primary-lighten-color;
105
105
  }
106
+ &:active {
107
+ color: $vxe-primary-darken-color;
108
+ }
106
109
  }
107
110
  @for $index from 0 to length($btnThemeList) {
108
111
  $item: nth($btnThemeList, $index + 1);
@@ -115,6 +118,9 @@ $btnThemeList: (
115
118
  &:hover {
116
119
  color: map-get($item, btnLightenColor);
117
120
  }
121
+ &:active {
122
+ color: map-get($item, btnDarkenColor);
123
+ }
118
124
  }
119
125
  &.is--disabled {
120
126
  color: map-get($item, btnDisabledColor);
Binary file
Binary file
Binary file