vxe-table 3.16.6 → 3.16.7

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 (140) hide show
  1. package/es/locale/lang/ar-EG.js +1 -1
  2. package/es/locale/lang/de-DE.js +1 -1
  3. package/es/locale/lang/en-US.js +1 -1
  4. package/es/locale/lang/es-ES.js +1 -1
  5. package/es/locale/lang/fr-FR.js +1 -1
  6. package/es/locale/lang/hu-HU.js +1 -1
  7. package/es/locale/lang/hy-AM.js +1 -1
  8. package/es/locale/lang/id-ID.js +1 -1
  9. package/es/locale/lang/it-IT.js +1 -1
  10. package/es/locale/lang/ja-JP.js +1 -1
  11. package/es/locale/lang/ko-KR.js +1 -1
  12. package/es/locale/lang/ms-MY.js +1 -1
  13. package/es/locale/lang/nb-NO.js +1 -1
  14. package/es/locale/lang/pt-BR.js +1 -1
  15. package/es/locale/lang/ru-RU.js +1 -1
  16. package/es/locale/lang/th-TH.js +1 -1
  17. package/es/locale/lang/ug-CN.js +1 -1
  18. package/es/locale/lang/uk-UA.js +1 -1
  19. package/es/locale/lang/uz-UZ.js +1 -1
  20. package/es/locale/lang/vi-VN.js +1 -1
  21. package/es/locale/lang/zh-CHT.js +1 -1
  22. package/es/locale/lang/zh-CN.js +1 -1
  23. package/es/style.css +1 -1
  24. package/es/table/src/cell.js +5 -5
  25. package/es/table/src/methods.js +41 -14
  26. package/es/table/src/table.js +4 -1
  27. package/es/ui/index.js +2 -1
  28. package/es/ui/src/log.js +1 -1
  29. package/lib/index.umd.js +58 -22
  30. package/lib/index.umd.min.js +1 -1
  31. package/lib/locale/lang/ar-EG.js +1 -1
  32. package/lib/locale/lang/ar-EG.min.js +1 -1
  33. package/lib/locale/lang/ar-EG.umd.js +1 -1
  34. package/lib/locale/lang/de-DE.js +1 -1
  35. package/lib/locale/lang/de-DE.min.js +1 -1
  36. package/lib/locale/lang/de-DE.umd.js +1 -1
  37. package/lib/locale/lang/en-US.js +1 -1
  38. package/lib/locale/lang/en-US.min.js +1 -1
  39. package/lib/locale/lang/en-US.umd.js +1 -1
  40. package/lib/locale/lang/es-ES.js +1 -1
  41. package/lib/locale/lang/es-ES.min.js +1 -1
  42. package/lib/locale/lang/es-ES.umd.js +1 -1
  43. package/lib/locale/lang/fr-FR.js +1 -1
  44. package/lib/locale/lang/fr-FR.min.js +1 -1
  45. package/lib/locale/lang/fr-FR.umd.js +1 -1
  46. package/lib/locale/lang/hu-HU.js +1 -1
  47. package/lib/locale/lang/hu-HU.min.js +1 -1
  48. package/lib/locale/lang/hu-HU.umd.js +1 -1
  49. package/lib/locale/lang/hy-AM.js +1 -1
  50. package/lib/locale/lang/hy-AM.min.js +1 -1
  51. package/lib/locale/lang/hy-AM.umd.js +1 -1
  52. package/lib/locale/lang/id-ID.js +1 -1
  53. package/lib/locale/lang/id-ID.min.js +1 -1
  54. package/lib/locale/lang/id-ID.umd.js +1 -1
  55. package/lib/locale/lang/it-IT.js +1 -1
  56. package/lib/locale/lang/it-IT.min.js +1 -1
  57. package/lib/locale/lang/it-IT.umd.js +1 -1
  58. package/lib/locale/lang/ja-JP.js +1 -1
  59. package/lib/locale/lang/ja-JP.min.js +1 -1
  60. package/lib/locale/lang/ja-JP.umd.js +1 -1
  61. package/lib/locale/lang/ko-KR.js +1 -1
  62. package/lib/locale/lang/ko-KR.min.js +1 -1
  63. package/lib/locale/lang/ko-KR.umd.js +1 -1
  64. package/lib/locale/lang/ms-MY.js +1 -1
  65. package/lib/locale/lang/ms-MY.min.js +1 -1
  66. package/lib/locale/lang/ms-MY.umd.js +1 -1
  67. package/lib/locale/lang/nb-NO.js +1 -1
  68. package/lib/locale/lang/nb-NO.min.js +1 -1
  69. package/lib/locale/lang/nb-NO.umd.js +1 -1
  70. package/lib/locale/lang/pt-BR.js +1 -1
  71. package/lib/locale/lang/pt-BR.min.js +1 -1
  72. package/lib/locale/lang/pt-BR.umd.js +1 -1
  73. package/lib/locale/lang/ru-RU.js +1 -1
  74. package/lib/locale/lang/ru-RU.min.js +1 -1
  75. package/lib/locale/lang/ru-RU.umd.js +1 -1
  76. package/lib/locale/lang/th-TH.js +1 -1
  77. package/lib/locale/lang/th-TH.min.js +1 -1
  78. package/lib/locale/lang/th-TH.umd.js +1 -1
  79. package/lib/locale/lang/ug-CN.js +1 -1
  80. package/lib/locale/lang/ug-CN.min.js +1 -1
  81. package/lib/locale/lang/ug-CN.umd.js +1 -1
  82. package/lib/locale/lang/uk-UA.js +1 -1
  83. package/lib/locale/lang/uk-UA.min.js +1 -1
  84. package/lib/locale/lang/uk-UA.umd.js +1 -1
  85. package/lib/locale/lang/uz-UZ.js +1 -1
  86. package/lib/locale/lang/uz-UZ.min.js +1 -1
  87. package/lib/locale/lang/uz-UZ.umd.js +1 -1
  88. package/lib/locale/lang/vi-VN.js +1 -1
  89. package/lib/locale/lang/vi-VN.min.js +1 -1
  90. package/lib/locale/lang/vi-VN.umd.js +1 -1
  91. package/lib/locale/lang/zh-CHT.js +1 -1
  92. package/lib/locale/lang/zh-CHT.min.js +1 -1
  93. package/lib/locale/lang/zh-CHT.umd.js +1 -1
  94. package/lib/locale/lang/zh-CN.js +1 -1
  95. package/lib/locale/lang/zh-CN.min.js +1 -1
  96. package/lib/locale/lang/zh-CN.umd.js +1 -1
  97. package/lib/style.css +1 -1
  98. package/lib/table/src/cell.js +5 -4
  99. package/lib/table/src/cell.min.js +1 -1
  100. package/lib/table/src/methods.js +45 -14
  101. package/lib/table/src/methods.min.js +1 -1
  102. package/lib/table/src/table.js +4 -1
  103. package/lib/table/src/table.min.js +1 -1
  104. package/lib/ui/index.js +2 -1
  105. package/lib/ui/index.min.js +1 -1
  106. package/lib/ui/src/log.js +1 -1
  107. package/lib/ui/src/log.min.js +1 -1
  108. package/package.json +1 -1
  109. package/packages/locale/lang/ar-EG.ts +1 -1
  110. package/packages/locale/lang/de-DE.ts +1 -1
  111. package/packages/locale/lang/en-US.ts +1 -1
  112. package/packages/locale/lang/es-ES.ts +1 -1
  113. package/packages/locale/lang/fr-FR.ts +1 -1
  114. package/packages/locale/lang/hu-HU.ts +1 -1
  115. package/packages/locale/lang/hy-AM.ts +1 -1
  116. package/packages/locale/lang/id-ID.ts +1 -1
  117. package/packages/locale/lang/it-IT.ts +1 -1
  118. package/packages/locale/lang/ja-JP.ts +1 -1
  119. package/packages/locale/lang/ko-KR.ts +1 -1
  120. package/packages/locale/lang/ms-MY.ts +1 -1
  121. package/packages/locale/lang/nb-NO.ts +1 -1
  122. package/packages/locale/lang/pt-BR.ts +1 -1
  123. package/packages/locale/lang/ru-RU.ts +1 -1
  124. package/packages/locale/lang/th-TH.ts +1 -1
  125. package/packages/locale/lang/ug-CN.ts +1 -1
  126. package/packages/locale/lang/uk-UA.ts +1 -1
  127. package/packages/locale/lang/uz-UZ.ts +1 -1
  128. package/packages/locale/lang/vi-VN.ts +1 -1
  129. package/packages/locale/lang/zh-CHT.ts +1 -1
  130. package/packages/locale/lang/zh-CN.ts +1 -1
  131. package/packages/table/src/cell.ts +5 -5
  132. package/packages/table/src/methods.ts +50 -13
  133. package/packages/table/src/table.ts +4 -1
  134. package/packages/ui/index.ts +1 -0
  135. /package/es/{iconfont.1753347577985.ttf → iconfont.1753520075971.ttf} +0 -0
  136. /package/es/{iconfont.1753347577985.woff → iconfont.1753520075971.woff} +0 -0
  137. /package/es/{iconfont.1753347577985.woff2 → iconfont.1753520075971.woff2} +0 -0
  138. /package/lib/{iconfont.1753347577985.ttf → iconfont.1753520075971.ttf} +0 -0
  139. /package/lib/{iconfont.1753347577985.woff → iconfont.1753520075971.woff} +0 -0
  140. /package/lib/{iconfont.1753347577985.woff2 → iconfont.1753520075971.woff2} +0 -0
@@ -8948,10 +8948,10 @@ const Methods = {
8948
8948
 
8949
8949
  return handleSortEvent($xeTable, null, sortConfs, isUpdate)
8950
8950
  },
8951
- setSortByEvent (evnt: Event, sortConfs: VxeTableDefines.SortConfs | VxeTableDefines.SortConfs[], isUpdate?: boolean) {
8951
+ setSortByEvent (evnt: Event, sortConfs: VxeTableDefines.SortConfs | VxeTableDefines.SortConfs[]) {
8952
8952
  const $xeTable = this as VxeTableConstructor & VxeTablePrivateMethods
8953
8953
 
8954
- return handleSortEvent($xeTable, evnt, sortConfs, isUpdate)
8954
+ return handleSortEvent($xeTable, evnt, sortConfs, true)
8955
8955
  },
8956
8956
  /**
8957
8957
  * 清空指定列的排序条件
@@ -8984,6 +8984,7 @@ const Methods = {
8984
8984
 
8985
8985
  const { tableFullColumn } = internalData
8986
8986
  const sortOpts = $xeTable.computeSortOpts
8987
+ const { multiple } = sortOpts
8987
8988
  const sortCols: VxeTableDefines.ColumnInfo[] = []
8988
8989
  let column: VxeTableDefines.ColumnInfo<any> | null = null
8989
8990
  if (evnt) {
@@ -9003,11 +9004,18 @@ const Methods = {
9003
9004
  if (!sortOpts.remote) {
9004
9005
  $xeTable.handleTableData(true)
9005
9006
  }
9006
- if (sortCols.length) {
9007
+
9008
+ if (!multiple) {
9009
+ column = sortCols[0]
9010
+ }
9011
+
9012
+ if (column) {
9013
+ $xeTable.handleColumnSortEvent(evnt, column)
9014
+ }
9015
+
9016
+ if (multiple && sortCols.length) {
9007
9017
  const params = { $table: $xeTable, $event: evnt, cols: sortCols, sortList: [] }
9008
9018
  $xeTable.dispatchEvent('clear-all-sort', params, evnt)
9009
- } else if (column) {
9010
- $xeTable.handleColumnSortEvent(evnt, column)
9011
9019
  }
9012
9020
  }
9013
9021
  return $xeTable.$nextTick().then(() => {
@@ -9041,15 +9049,13 @@ const Methods = {
9041
9049
  }
9042
9050
  return sortList
9043
9051
  },
9044
- setFilterByEvent (evnt: Event, fieldOrColumn: VxeColumnPropTypes.Field | VxeTableDefines.ColumnInfo<any>, options: VxeColumnPropTypes.FilterItem[], isUpdate?: boolean) {
9052
+ setFilterByEvent (evnt: Event, fieldOrColumn: VxeColumnPropTypes.Field | VxeTableDefines.ColumnInfo<any>, options: VxeColumnPropTypes.FilterItem[]) {
9045
9053
  const $xeTable = this as VxeTableConstructor & VxeTablePrivateMethods
9046
9054
 
9047
9055
  const column = handleFieldOrColumn($xeTable, fieldOrColumn)
9048
9056
  if (column && column.filters) {
9049
9057
  column.filters = toFilters(options || [])
9050
- if (isUpdate) {
9051
- return $xeTable.handleColumnConfirmFilter(column, evnt)
9052
- }
9058
+ return $xeTable.handleColumnConfirmFilter(column, evnt)
9053
9059
  }
9054
9060
  return $xeTable.$nextTick()
9055
9061
  },
@@ -9101,6 +9107,7 @@ const Methods = {
9101
9107
  const { filterStore } = reactData
9102
9108
  const { tableFullColumn } = internalData
9103
9109
  const filterOpts = $xeTable.computeFilterOpts
9110
+ const { multiple } = filterOpts
9104
9111
  const filterCols: VxeTableDefines.ColumnInfo[] = []
9105
9112
  let column: VxeTableDefines.ColumnInfo<any> | null = null
9106
9113
  if (fieldOrColumn) {
@@ -9123,19 +9130,49 @@ const Methods = {
9123
9130
  style: null,
9124
9131
  options: [],
9125
9132
  column: null,
9126
- multiple: false,
9133
+ multiple: false, // 选项是覅多选
9127
9134
  visible: false
9128
9135
  })
9129
9136
  }
9137
+
9130
9138
  if (!filterOpts.remote) {
9131
9139
  $xeTable.updateData()
9132
9140
  }
9133
- if (filterCols.length) {
9141
+
9142
+ if (!multiple) {
9143
+ column = filterCols[0]
9144
+ }
9145
+
9146
+ if (column) {
9147
+ const filterList = () => $xeTable.getCheckedFilters()
9148
+ const values: any[] = []
9149
+ const datas: any[] = []
9150
+ column.filters.forEach((item: any) => {
9151
+ if (item.checked) {
9152
+ values.push(item.value)
9153
+ datas.push(item.data)
9154
+ }
9155
+ })
9156
+ const params = {
9157
+ $table: $xeTable,
9158
+ $event: evnt as Event,
9159
+ column,
9160
+ field: column.field,
9161
+ property: column.field,
9162
+ values,
9163
+ datas,
9164
+ filters: filterList,
9165
+ filterList
9166
+ }
9167
+ $xeTable.dispatchEvent('filter-change', params, evnt)
9168
+ $xeTable.dispatchEvent('clear-filter', params, evnt)
9169
+ }
9170
+
9171
+ if (multiple && filterCols.length) {
9134
9172
  const params = { $table: $xeTable, $event: evnt, cols: filterCols, filterList: [] }
9135
9173
  $xeTable.dispatchEvent('clear-all-filter', params, evnt)
9136
- } else if (column) {
9137
- $xeTable.dispatchEvent('clear-filter', { filterList: () => $xeTable.getCheckedFilters() }, evnt)
9138
9174
  }
9175
+
9139
9176
  return $xeTable.$nextTick()
9140
9177
  },
9141
9178
  /**
@@ -1724,7 +1724,10 @@ export default {
1724
1724
  warnLog('vxe.error.delProp', ['row-group-config.countFields', 'column.agg-func'])
1725
1725
  }
1726
1726
  if (aggregateOpts.aggregateMethod) {
1727
- warnLog('vxe.error.delProp', ['row-group-config.aggregateMethod', 'aggregate-config.countMethod'])
1727
+ warnLog('vxe.error.delProp', ['row-group-config.aggregateMethod', 'aggregate-config.calcValuesMethod'])
1728
+ }
1729
+ if (aggregateOpts.countMethod) {
1730
+ warnLog('vxe.error.delProp', ['aggregate-config.countMethod', 'aggregate-config.calcValuesMethod'])
1728
1731
  }
1729
1732
  if (props.treeConfig && treeOpts.children) {
1730
1733
  warnLog('vxe.error.delProp', ['tree-config.children', 'tree-config.childrenField'])
@@ -140,6 +140,7 @@ VxeUI.setConfig({
140
140
  // filterMethod: null,
141
141
  // destroyOnClose: false,
142
142
  // isEvery: false,
143
+ multiple: true,
143
144
  showIcon: true
144
145
  },
145
146
  aggregateConfig: {