vxe-table 3.7.9 → 3.7.10-beta.0

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 (69) hide show
  1. package/helper/vetur/attributes.json +4 -0
  2. package/helper/vetur/tags.json +1 -0
  3. package/lib/form/src/form.js +4 -3
  4. package/lib/form/src/form.min.js +1 -1
  5. package/lib/icon/style/style.css +1 -1
  6. package/lib/icon/style/style.min.css +1 -1
  7. package/lib/index.css +1 -1
  8. package/lib/index.umd.js +40 -20
  9. package/lib/index.umd.min.js +1 -1
  10. package/lib/locale/lang/en-US.js +0 -1
  11. package/lib/locale/lang/en-US.min.js +1 -1
  12. package/lib/locale/lang/en-US.umd.js +0 -1
  13. package/lib/locale/lang/ja-JP.js +0 -1
  14. package/lib/locale/lang/ja-JP.min.js +1 -1
  15. package/lib/locale/lang/ja-JP.umd.js +0 -1
  16. package/lib/locale/lang/zh-CN.js +0 -1
  17. package/lib/locale/lang/zh-CN.min.js +1 -1
  18. package/lib/locale/lang/zh-CN.umd.js +0 -1
  19. package/lib/locale/lang/zh-HK.min.js +1 -1
  20. package/lib/locale/lang/zh-HK.umd.js +0 -1
  21. package/lib/locale/lang/zh-MO.min.js +1 -1
  22. package/lib/locale/lang/zh-MO.umd.js +0 -1
  23. package/lib/locale/lang/zh-TC.js +0 -1
  24. package/lib/locale/lang/zh-TC.min.js +1 -1
  25. package/lib/locale/lang/zh-TC.umd.js +0 -1
  26. package/lib/locale/lang/zh-TW.min.js +1 -1
  27. package/lib/locale/lang/zh-TW.umd.js +0 -1
  28. package/lib/style.css +1 -1
  29. package/lib/style.min.css +1 -1
  30. package/lib/table/src/cell.js +19 -3
  31. package/lib/table/src/cell.min.js +1 -1
  32. package/lib/table/src/column.js +3 -1
  33. package/lib/table/src/column.min.js +1 -1
  34. package/lib/table/src/columnInfo.js +1 -0
  35. package/lib/table/src/columnInfo.min.js +1 -1
  36. package/lib/table/src/methods.js +5 -6
  37. package/lib/table/src/methods.min.js +1 -1
  38. package/lib/table/src/table.js +1 -1
  39. package/lib/table/src/table.min.js +1 -1
  40. package/lib/table/src/util.js +3 -2
  41. package/lib/table/src/util.min.js +1 -1
  42. package/lib/table/style/style.css +4 -2
  43. package/lib/table/style/style.min.css +1 -1
  44. package/lib/tools/log.js +1 -1
  45. package/lib/tools/log.min.js +1 -1
  46. package/lib/v-x-e-table/index.js +1 -1
  47. package/lib/v-x-e-table/index.min.js +1 -1
  48. package/lib/v-x-e-table/src/conf.js +2 -1
  49. package/lib/v-x-e-table/src/conf.min.js +1 -1
  50. package/package.json +2 -2
  51. package/packages/form/src/form.js +4 -3
  52. package/packages/locale/lang/en-US.js +0 -1
  53. package/packages/locale/lang/ja-JP.js +0 -1
  54. package/packages/locale/lang/zh-CN.js +0 -1
  55. package/packages/locale/lang/zh-TC.js +0 -1
  56. package/packages/table/src/cell.js +21 -3
  57. package/packages/table/src/column.js +3 -1
  58. package/packages/table/src/columnInfo.js +1 -0
  59. package/packages/table/src/methods.js +5 -6
  60. package/packages/table/src/table.js +1 -1
  61. package/packages/table/src/util.js +3 -2
  62. package/packages/v-x-e-table/src/conf.js +2 -1
  63. package/styles/table.scss +6 -3
  64. /package/lib/icon/style/{iconfont.1709080259515.ttf → iconfont.1710117177540.ttf} +0 -0
  65. /package/lib/icon/style/{iconfont.1709080259515.woff → iconfont.1710117177540.woff} +0 -0
  66. /package/lib/icon/style/{iconfont.1709080259515.woff2 → iconfont.1710117177540.woff2} +0 -0
  67. /package/lib/{iconfont.1709080259515.ttf → iconfont.1710117177540.ttf} +0 -0
  68. /package/lib/{iconfont.1709080259515.woff → iconfont.1710117177540.woff} +0 -0
  69. /package/lib/{iconfont.1709080259515.woff2 → iconfont.1710117177540.woff2} +0 -0
@@ -11,10 +11,28 @@ function renderTitlePrefixIcon (h, params) {
11
11
  const titlePrefix = column.titlePrefix || column.titleHelp
12
12
  return titlePrefix ? [
13
13
  h('i', {
14
- class: ['vxe-cell-help-icon', titlePrefix.icon || GlobalConfig.icon.TABLE_HELP],
14
+ class: ['vxe-cell-title-prefix-icon', titlePrefix.icon || GlobalConfig.icon.TABLE_TITLE_PREFIX],
15
15
  on: {
16
16
  mouseenter (evnt) {
17
- $table.triggerHeaderHelpEvent(evnt, params)
17
+ $table.triggerHeaderTitleEvent(evnt, titlePrefix, params)
18
+ },
19
+ mouseleave (evnt) {
20
+ $table.handleTargetLeaveEvent(evnt)
21
+ }
22
+ }
23
+ })
24
+ ] : []
25
+ }
26
+
27
+ function renderTitleSuffixIcon (h, params) {
28
+ const { $table, column } = params
29
+ const titleSuffix = column.titleSuffix
30
+ return titleSuffix ? [
31
+ h('i', {
32
+ class: ['vxe-cell-title-suffix-icon', titleSuffix.icon || GlobalConfig.icon.TABLE_TITLE_SUFFIX],
33
+ on: {
34
+ mouseenter (evnt) {
35
+ $table.triggerHeaderTitleEvent(evnt, titleSuffix, params)
18
36
  },
19
37
  mouseleave (evnt) {
20
38
  $table.handleTargetLeaveEvent(evnt)
@@ -159,7 +177,7 @@ export const Cell = {
159
177
  return renderTitleContent(h, params, UtilTools.formatText(column.getTitle(), 1))
160
178
  },
161
179
  renderDefaultHeader (h, params) {
162
- return renderTitlePrefixIcon(h, params).concat(Cell.renderHeaderTitle(h, params))
180
+ return renderTitlePrefixIcon(h, params).concat(Cell.renderHeaderTitle(h, params)).concat(renderTitleSuffixIcon(h, params))
163
181
  },
164
182
  renderDefaultCell (h, params) {
165
183
  const { $table, row, column } = params
@@ -74,8 +74,10 @@ const props = {
74
74
  footerExportMethod: Function,
75
75
  // 已废弃,被 titlePrefix 替换
76
76
  titleHelp: Object,
77
- // 标题帮助图标配置项
77
+ // 标题前缀图标配置项
78
78
  titlePrefix: Object,
79
+ // 标题后缀图标配置项
80
+ titleSuffix: Object,
79
81
  // 单元格值类型
80
82
  cellType: String,
81
83
  // 单元格渲染配置项
@@ -95,6 +95,7 @@ export class ColumnInfo {
95
95
  footerExportMethod: _vm.footerExportMethod,
96
96
  titleHelp: _vm.titleHelp,
97
97
  titlePrefix: _vm.titlePrefix,
98
+ titleSuffix: _vm.titleSuffix,
98
99
  // 自定义参数
99
100
  params: _vm.params,
100
101
  // 渲染属性
@@ -2810,15 +2810,14 @@ const Methods = {
2810
2810
  this.closeTooltip()
2811
2811
  }
2812
2812
  },
2813
- triggerHeaderHelpEvent (evnt, params) {
2814
- const { column } = params
2815
- const titlePrefix = column.titlePrefix || column.titleHelp
2816
- if (titlePrefix.content || titlePrefix.message) {
2813
+ triggerHeaderTitleEvent (evnt, iconParams, params) {
2814
+ const tipContent = iconParams.content || iconParams.message
2815
+ if (tipContent) {
2817
2816
  const { $refs, tooltipStore } = this
2818
- const content = getFuncText(titlePrefix.content || titlePrefix.message)
2817
+ const content = getFuncText(tipContent)
2819
2818
  this.handleTargetEnterEvent(true)
2820
2819
  tooltipStore.visible = true
2821
- tooltipStore.currOpts = { ...titlePrefix, content: null }
2820
+ tooltipStore.currOpts = { ...params, content: null }
2822
2821
  this.$nextTick(() => {
2823
2822
  const $tooltip = $refs.tooltip
2824
2823
  if ($tooltip) {
@@ -1168,7 +1168,7 @@ export default {
1168
1168
  icon: loadingOpts.icon,
1169
1169
  text: loadingOpts.text
1170
1170
  }
1171
- }, this.callSlot($scopedSlots.loading, {})),
1171
+ }, this.callSlot($scopedSlots.loading, {}, h)),
1172
1172
  /**
1173
1173
  * 筛选
1174
1174
  */
@@ -129,10 +129,11 @@ export function getColReMinWidth (params) {
129
129
  const checkboxIconWidth = getPaddingLeftRightSize(queryCellElement(cell, '--title>.vxe-cell--checkbox'))
130
130
  const requiredIconWidth = getElemenMarginWidth(queryCellElement(cell, '>.vxe-cell--required-icon'))
131
131
  const editIconWidth = getElemenMarginWidth(queryCellElement(cell, '>.vxe-cell--edit-icon'))
132
- const helpIconWidth = getElemenMarginWidth(queryCellElement(cell, '>.vxe-cell-help-icon'))
132
+ const prefixIconWidth = getElemenMarginWidth(queryCellElement(cell, '>.vxe-cell-title-prefix-icon'))
133
+ const suffixIconWidth = getElemenMarginWidth(queryCellElement(cell, '>.vxe-cell-title-suffix-icon'))
133
134
  const sortIconWidth = getElemenMarginWidth(queryCellElement(cell, '>.vxe-cell--sort'))
134
135
  const filterIconWidth = getElemenMarginWidth(queryCellElement(cell, '>.vxe-cell--filter'))
135
- mWidth += checkboxIconWidth + requiredIconWidth + editIconWidth + helpIconWidth + filterIconWidth + sortIconWidth
136
+ mWidth += checkboxIconWidth + requiredIconWidth + editIconWidth + prefixIconWidth + suffixIconWidth + filterIconWidth + sortIconWidth
136
137
  }
137
138
  // 如果设置最小宽
138
139
  if (colMinWidth) {
@@ -144,7 +144,8 @@ export default {
144
144
  TABLE_FILTER_NONE: iconPrefix + 'funnel',
145
145
  TABLE_FILTER_MATCH: iconPrefix + 'funnel',
146
146
  TABLE_EDIT: iconPrefix + 'edit',
147
- TABLE_HELP: iconPrefix + 'question-circle-fill',
147
+ TABLE_TITLE_PREFIX: iconPrefix + 'question-circle-fill',
148
+ TABLE_TITLE_SUFFIX: iconPrefix + 'question-circle-fill',
148
149
  TABLE_TREE_LOADED: iconPrefix + 'spinner roll',
149
150
  TABLE_TREE_OPEN: iconPrefix + 'caret-right rotate90',
150
151
  TABLE_TREE_CLOSE: iconPrefix + 'caret-right',
package/styles/table.scss CHANGED
@@ -398,7 +398,8 @@
398
398
  }
399
399
  // .vxe-cell--required-icon,
400
400
  // .vxe-cell--edit-icon,
401
- // .vxe-cell-help-icon,
401
+ // .vxe-cell-title-prefix-icon,
402
+ // .vxe-cell-title-suffix-icon,
402
403
  // .vxe-cell--title {
403
404
  // vertical-align: middle;
404
405
  // }
@@ -406,10 +407,12 @@
406
407
  margin-right: 0.1em;
407
408
  }
408
409
  .vxe-cell--edit-icon,
409
- .vxe-cell-help-icon {
410
+ .vxe-cell-title-prefix-icon,
411
+ .vxe-cell-title-suffix-icon {
410
412
  margin-right: 0.2em;
411
413
  }
412
- .vxe-cell-help-icon {
414
+ .vxe-cell-title-prefix-icon,
415
+ .vxe-cell-title-suffix-icon {
413
416
  cursor: help;
414
417
  }
415
418
  .vxe-resizable {