vxe-table 4.2.8 → 4.3.0-beta.2

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 (227) hide show
  1. package/es/button/src/button.js +14 -14
  2. package/es/button/style.css +1 -58
  3. package/es/checkbox/src/checkbox.js +7 -4
  4. package/es/checkbox/style.css +37 -58
  5. package/es/edit/src/hook.js +29 -13
  6. package/es/export/src/export-panel.js +10 -20
  7. package/es/export/src/hook.js +45 -45
  8. package/es/export/src/import-panel.js +2 -2
  9. package/es/export/src/util.js +7 -7
  10. package/es/export/style.css +27 -82
  11. package/es/filter/src/hook.js +5 -5
  12. package/es/filter/src/panel.js +9 -17
  13. package/es/filter/style.css +27 -79
  14. package/es/footer/src/footer.js +15 -15
  15. package/es/form/src/form-config-item.js +8 -7
  16. package/es/form/src/form-item.js +8 -7
  17. package/es/form/src/form.js +8 -6
  18. package/es/form/style.css +0 -3
  19. package/es/grid/src/grid.js +18 -13
  20. package/es/grid/style.css +1 -1
  21. package/es/header/src/header.js +18 -18
  22. package/es/header/style.css +0 -95
  23. package/es/icon/style.css +379 -0
  24. package/es/input/src/input.js +26 -26
  25. package/es/input/style.css +13 -4
  26. package/es/keyboard/src/hook.js +7 -7
  27. package/es/list/src/list.js +5 -5
  28. package/es/loading/src/loading.js +1 -1
  29. package/es/menu/src/hooks.js +9 -9
  30. package/es/menu/src/panel.js +2 -2
  31. package/es/modal/src/modal.js +52 -51
  32. package/es/modal/style.css +2 -3
  33. package/es/pager/src/pager.js +3 -3
  34. package/es/pager/style.css +4 -2
  35. package/es/pulldown/src/pulldown.js +7 -7
  36. package/es/radio/src/button.js +1 -1
  37. package/es/radio/src/radio.js +5 -4
  38. package/es/radio/style.css +32 -55
  39. package/es/select/src/select.js +13 -12
  40. package/es/select/style.css +1 -0
  41. package/es/style.css +1 -1
  42. package/es/style.min.css +1 -1
  43. package/es/switch/src/switch.js +1 -1
  44. package/es/table/src/body.js +38 -34
  45. package/es/table/src/cell.js +16 -28
  46. package/es/table/src/columnInfo.js +4 -4
  47. package/es/table/src/table.js +65 -60
  48. package/es/table/src/util.js +2 -2
  49. package/es/table/style.css +160 -139
  50. package/es/textarea/src/textarea.js +5 -5
  51. package/es/toolbar/src/toolbar.js +17 -24
  52. package/es/toolbar/style.css +28 -80
  53. package/es/tools/dom.js +2 -2
  54. package/es/tools/log.js +1 -1
  55. package/es/tools/vn.js +7 -0
  56. package/es/tooltip/src/tooltip.js +22 -10
  57. package/es/v-x-e-table/index.js +1 -1
  58. package/es/v-x-e-table/src/conf.js +43 -38
  59. package/es/v-x-e-table/src/interceptor.js +1 -1
  60. package/es/v-x-e-table/src/renderer.js +19 -15
  61. package/es/v-x-e-table/style.css +405 -2
  62. package/lib/button/src/button.js +10 -10
  63. package/lib/button/src/button.min.js +1 -1
  64. package/lib/button/style/style.css +1 -58
  65. package/lib/button/style/style.min.css +1 -1
  66. package/lib/checkbox/src/checkbox.js +5 -3
  67. package/lib/checkbox/src/checkbox.min.js +1 -1
  68. package/lib/checkbox/style/style.css +37 -58
  69. package/lib/checkbox/style/style.min.css +1 -1
  70. package/lib/edit/src/hook.js +14 -13
  71. package/lib/edit/src/hook.min.js +1 -1
  72. package/lib/export/src/export-panel.js +11 -17
  73. package/lib/export/src/export-panel.min.js +1 -1
  74. package/lib/export/src/hook.js +50 -50
  75. package/lib/export/src/hook.min.js +1 -1
  76. package/lib/export/src/import-panel.js +3 -3
  77. package/lib/export/src/import-panel.min.js +1 -1
  78. package/lib/export/src/util.js +4 -4
  79. package/lib/export/src/util.min.js +1 -1
  80. package/lib/export/style/style.css +27 -82
  81. package/lib/export/style/style.min.css +1 -1
  82. package/lib/filter/src/hook.js +5 -5
  83. package/lib/filter/src/hook.min.js +1 -1
  84. package/lib/filter/src/panel.js +11 -15
  85. package/lib/filter/src/panel.min.js +1 -1
  86. package/lib/filter/style/style.css +27 -79
  87. package/lib/filter/style/style.min.css +1 -1
  88. package/lib/footer/src/footer.js +14 -14
  89. package/lib/footer/src/footer.min.js +1 -1
  90. package/lib/form/src/form-config-item.js +9 -7
  91. package/lib/form/src/form-config-item.min.js +1 -1
  92. package/lib/form/src/form-item.js +9 -7
  93. package/lib/form/src/form-item.min.js +1 -1
  94. package/lib/form/src/form.js +9 -6
  95. package/lib/form/src/form.min.js +1 -1
  96. package/lib/form/style/style.css +0 -3
  97. package/lib/form/style/style.min.css +1 -1
  98. package/lib/grid/src/grid.js +17 -13
  99. package/lib/grid/src/grid.min.js +1 -1
  100. package/lib/grid/style/style.css +1 -1
  101. package/lib/grid/style/style.min.css +1 -1
  102. package/lib/header/src/header.js +17 -17
  103. package/lib/header/src/header.min.js +1 -1
  104. package/lib/header/style/style.css +0 -95
  105. package/lib/header/style/style.min.css +0 -1
  106. package/lib/icon/style/style.css +379 -0
  107. package/lib/icon/style/style.min.css +1 -1
  108. package/lib/index.umd.js +163 -159
  109. package/lib/index.umd.min.js +1 -1
  110. package/lib/input/src/input.js +23 -23
  111. package/lib/input/src/input.min.js +1 -1
  112. package/lib/input/style/style.css +13 -4
  113. package/lib/input/style/style.min.css +1 -1
  114. package/lib/keyboard/src/hook.js +7 -7
  115. package/lib/keyboard/src/hook.min.js +1 -1
  116. package/lib/list/src/list.js +5 -5
  117. package/lib/list/src/list.min.js +1 -1
  118. package/lib/loading/src/loading.js +1 -1
  119. package/lib/loading/src/loading.min.js +1 -1
  120. package/lib/menu/src/hooks.js +9 -9
  121. package/lib/menu/src/hooks.min.js +1 -1
  122. package/lib/menu/src/panel.js +2 -2
  123. package/lib/menu/src/panel.min.js +1 -1
  124. package/lib/modal/src/modal.js +55 -53
  125. package/lib/modal/src/modal.min.js +1 -1
  126. package/lib/modal/style/style.css +2 -3
  127. package/lib/modal/style/style.min.css +1 -1
  128. package/lib/pager/src/pager.js +2 -2
  129. package/lib/pager/src/pager.min.js +1 -1
  130. package/lib/pager/style/style.css +4 -2
  131. package/lib/pager/style/style.min.css +1 -1
  132. package/lib/pulldown/src/pulldown.js +7 -7
  133. package/lib/pulldown/src/pulldown.min.js +1 -1
  134. package/lib/radio/src/button.js +1 -1
  135. package/lib/radio/src/button.min.js +1 -1
  136. package/lib/radio/src/radio.js +4 -4
  137. package/lib/radio/src/radio.min.js +1 -1
  138. package/lib/radio/style/style.css +32 -55
  139. package/lib/radio/style/style.min.css +1 -1
  140. package/lib/select/src/select.js +14 -12
  141. package/lib/select/src/select.min.js +1 -1
  142. package/lib/select/style/style.css +1 -0
  143. package/lib/select/style/style.min.css +1 -1
  144. package/lib/style.css +1 -1
  145. package/lib/style.min.css +1 -1
  146. package/lib/switch/src/switch.js +1 -1
  147. package/lib/switch/src/switch.min.js +1 -1
  148. package/lib/table/src/body.js +36 -34
  149. package/lib/table/src/body.min.js +1 -1
  150. package/lib/table/src/cell.js +21 -29
  151. package/lib/table/src/cell.min.js +1 -1
  152. package/lib/table/src/columnInfo.js +4 -4
  153. package/lib/table/src/columnInfo.min.js +1 -1
  154. package/lib/table/src/table.js +65 -61
  155. package/lib/table/src/table.min.js +1 -1
  156. package/lib/table/src/util.js +2 -2
  157. package/lib/table/src/util.min.js +1 -1
  158. package/lib/table/style/style.css +160 -139
  159. package/lib/table/style/style.min.css +1 -1
  160. package/lib/textarea/src/textarea.js +6 -6
  161. package/lib/textarea/src/textarea.min.js +1 -1
  162. package/lib/toolbar/src/toolbar.js +20 -22
  163. package/lib/toolbar/src/toolbar.min.js +1 -1
  164. package/lib/toolbar/style/style.css +28 -80
  165. package/lib/toolbar/style/style.min.css +1 -1
  166. package/lib/tools/dom.js +2 -2
  167. package/lib/tools/dom.min.js +1 -1
  168. package/lib/tools/log.js +1 -1
  169. package/lib/tools/log.min.js +1 -1
  170. package/lib/tools/vn.js +13 -0
  171. package/lib/tools/vn.min.js +1 -1
  172. package/lib/tooltip/src/tooltip.js +22 -8
  173. package/lib/tooltip/src/tooltip.min.js +1 -1
  174. package/lib/v-x-e-table/index.js +1 -1
  175. package/lib/v-x-e-table/index.min.js +1 -1
  176. package/lib/v-x-e-table/src/conf.js +43 -38
  177. package/lib/v-x-e-table/src/conf.min.js +1 -1
  178. package/lib/v-x-e-table/src/interceptor.js +1 -1
  179. package/lib/v-x-e-table/src/interceptor.min.js +1 -1
  180. package/lib/v-x-e-table/src/renderer.js +18 -16
  181. package/lib/v-x-e-table/src/renderer.min.js +1 -1
  182. package/lib/v-x-e-table/style/style.css +405 -2
  183. package/lib/v-x-e-table/style/style.min.css +1 -1
  184. package/package.json +6 -6
  185. package/packages/checkbox/src/checkbox.ts +7 -4
  186. package/packages/edit/src/hook.ts +18 -6
  187. package/packages/export/src/export-panel.ts +9 -19
  188. package/packages/filter/src/panel.ts +8 -16
  189. package/packages/form/src/form-config-item.ts +4 -3
  190. package/packages/form/src/form-item.ts +4 -3
  191. package/packages/form/src/form.ts +6 -4
  192. package/packages/grid/src/grid.ts +2 -1
  193. package/packages/input/src/input.ts +3 -3
  194. package/packages/modal/src/modal.ts +5 -4
  195. package/packages/radio/src/radio.ts +4 -3
  196. package/packages/select/src/select.ts +2 -1
  197. package/packages/table/src/cell.ts +18 -35
  198. package/packages/table/src/table.ts +11 -10
  199. package/packages/toolbar/src/toolbar.ts +14 -21
  200. package/packages/tools/vn.ts +10 -0
  201. package/packages/tooltip/src/tooltip.ts +8 -4
  202. package/packages/v-x-e-table/src/conf.ts +43 -38
  203. package/styles/base/checked.scss +44 -148
  204. package/styles/button.scss +1 -43
  205. package/styles/checkbox.scss +6 -65
  206. package/styles/export.scss +2 -9
  207. package/styles/filter.scss +2 -6
  208. package/styles/form.scss +0 -3
  209. package/styles/header.scss +0 -134
  210. package/styles/icon.scss +509 -713
  211. package/styles/input.scss +8 -0
  212. package/styles/modal.scss +0 -1
  213. package/styles/old-icon.scss +713 -0
  214. package/styles/pager.scss +2 -0
  215. package/styles/radio.scss +9 -77
  216. package/styles/select.scss +1 -0
  217. package/styles/table.scss +144 -21
  218. package/styles/toolbar.scss +2 -6
  219. package/styles/variable.scss +5 -5
  220. package/types/all.d.ts +6 -0
  221. package/types/column.d.ts +11 -11
  222. package/types/component.d.ts +3 -1
  223. package/types/form-item.d.ts +1 -0
  224. package/types/form.d.ts +6 -2
  225. package/types/grid.d.ts +4 -4
  226. package/types/table.d.ts +2 -2
  227. package/types/v-x-e-table/renderer.d.ts +3 -2
@@ -15,6 +15,7 @@ import tableProps from './props'
15
15
  import tableEmits from './emits'
16
16
  import VxeLoading from '../../loading/index'
17
17
  import { getRowUniqueId, clearTableAllStatus, getRowkey, getRowid, rowToVisible, colToVisible, getCellValue, setCellValue, handleFieldOrColumn, toTreePathSeq, restoreScrollLocation, restoreScrollListener, XEBodyScrollElement } from './util'
18
+ import { getSlotVNs } from '../../tools/vn'
18
19
 
19
20
  import { VxeGridConstructor, VxeGridPrivateMethods, VxeTableConstructor, TableReactData, TableInternalData, VxeTablePropTypes, VxeToolbarConstructor, VxeTooltipInstance, TablePrivateMethods, VxeTablePrivateRef, VxeTablePrivateComputed, VxeTablePrivateMethods, VxeTableMethods, TableMethods, VxeMenuPanelInstance, VxeTableDefines, VxeTableProps } from '../../../types/all'
20
21
 
@@ -2618,7 +2619,7 @@ export default defineComponent({
2618
2619
  createData (records) {
2619
2620
  const { treeConfig } = props
2620
2621
  const treeOpts = computeTreeOpts.value
2621
- const handleRrecord = (record: any) => reactive(tablePrivateMethods.defineField(Object.assign({}, record)))
2622
+ const handleRrecord = (record: any) => reactive(tablePrivateMethods.defineField(record || {}))
2622
2623
  const rows = treeConfig ? XEUtils.mapTree(records, handleRrecord, treeOpts) : records.map(handleRrecord)
2623
2624
  return nextTick().then(() => rows)
2624
2625
  },
@@ -4088,7 +4089,7 @@ export default defineComponent({
4088
4089
  // 如果点击了当前表格之外
4089
4090
  !getEventTargetNode(evnt, el).flag
4090
4091
  ) {
4091
- setTimeout(() => $xetable.clearActived(evnt))
4092
+ setTimeout(() => $xetable.clearEdit(evnt))
4092
4093
  }
4093
4094
  })
4094
4095
  }
@@ -4164,7 +4165,7 @@ export default defineComponent({
4164
4165
  // 如果是激活编辑状态,则取消编辑
4165
4166
  if (actived.row) {
4166
4167
  const params = actived.args
4167
- $xetable.clearActived(evnt)
4168
+ $xetable.clearEdit(evnt)
4168
4169
  // 如果配置了选中功能,则为选中状态
4169
4170
  if (mouseOpts.selected) {
4170
4171
  nextTick(() => $xetable.handleSelected(params, evnt))
@@ -4237,7 +4238,7 @@ export default defineComponent({
4237
4238
  // 如果是激活编辑状态,则取消编辑
4238
4239
  if (actived.row) {
4239
4240
  const params = actived.args
4240
- $xetable.clearActived(evnt)
4241
+ $xetable.clearEdit(evnt)
4241
4242
  // 如果配置了选中功能,则为选中状态
4242
4243
  if (mouseOpts.selected) {
4243
4244
  nextTick(() => $xetable.handleSelected(params, evnt))
@@ -4273,7 +4274,7 @@ export default defineComponent({
4273
4274
  // 如果是激活编辑状态,则取消编辑
4274
4275
  if (actived.row) {
4275
4276
  params = actived.args
4276
- $xetable.clearActived(evnt)
4277
+ $xetable.clearEdit(evnt)
4277
4278
  // 如果配置了选中功能,则为选中状态
4278
4279
  if (mouseOpts.selected) {
4279
4280
  nextTick(() => $xetable.handleSelected(params, evnt))
@@ -4529,7 +4530,7 @@ export default defineComponent({
4529
4530
  return $xegrid.callSlot(slotFunc, params)
4530
4531
  }
4531
4532
  if (XEUtils.isFunction(slotFunc)) {
4532
- return slotFunc(params)
4533
+ return getSlotVNs(slotFunc(params))
4533
4534
  }
4534
4535
  }
4535
4536
  return []
@@ -4579,7 +4580,7 @@ export default defineComponent({
4579
4580
  const rowkey = getRowkey($xetable)
4580
4581
  internalData.tableFullColumn.forEach(column => {
4581
4582
  const { field, editRender } = column
4582
- if (field && !XEUtils.has(record, field)) {
4583
+ if (field && !XEUtils.has(record, field) && !record[field]) {
4583
4584
  let cellValue = null
4584
4585
  if (editRender) {
4585
4586
  const { defaultValue } = editRender
@@ -4875,7 +4876,7 @@ export default defineComponent({
4875
4876
  XEUtils.eachTree([row], (item) => {
4876
4877
  if ($xetable.eqRow(item, row) || (!checkMethod || checkMethod({ row: item }))) {
4877
4878
  XEUtils.set(item, checkField, value)
4878
- XEUtils.remove(treeIndeterminates, half => half === item)
4879
+ XEUtils.remove(treeIndeterminates, half => $xetable.eqRow(half, item))
4879
4880
  handleCheckboxReserveRow(row, value)
4880
4881
  }
4881
4882
  }, treeOpts)
@@ -4914,9 +4915,9 @@ export default defineComponent({
4914
4915
  if (value) {
4915
4916
  selection.push(item)
4916
4917
  } else {
4917
- XEUtils.remove(selection, select => select === item)
4918
+ XEUtils.remove(selection, select => $xetable.eqRow(select, item))
4918
4919
  }
4919
- XEUtils.remove(treeIndeterminates, half => half === item)
4920
+ XEUtils.remove(treeIndeterminates, half => $xetable.eqRow(half, item))
4920
4921
  handleCheckboxReserveRow(row, value)
4921
4922
  }
4922
4923
  }, treeOpts)
@@ -7,6 +7,7 @@ import { getEventTargetNode } from '../../tools/dom'
7
7
  import { formatText } from '../../tools/utils'
8
8
  import { warnLog, errLog } from '../../tools/log'
9
9
  import { GlobalEvent } from '../../tools/event'
10
+ import { getSlotVNs } from '../../tools/vn'
10
11
 
11
12
  import { VxeGridConstructor, GridPrivateMethods, ToolbarMethods, VxeToolbarConstructor, VxeToolbarEmits, VxeToolbarPropTypes, VxeTableConstructor, ToolbarPrivateRef, VxeTableMethods, VxeTablePrivateMethods, ToolbarReactData, VxeTableDefines } from '../../../types/all'
12
13
 
@@ -374,7 +375,7 @@ export default defineComponent({
374
375
  const { buttons } = props
375
376
  const buttonsSlot = slots.buttons
376
377
  if (buttonsSlot) {
377
- return buttonsSlot({ $grid: $xegrid, $table: $xetable })
378
+ return getSlotVNs(buttonsSlot({ $grid: $xegrid, $table: $xetable }))
378
379
  }
379
380
  const btnVNs: VNode[] = []
380
381
  if (buttons) {
@@ -421,7 +422,7 @@ export default defineComponent({
421
422
  const { tools } = props
422
423
  const toolsSlot = slots.tools
423
424
  if (toolsSlot) {
424
- return toolsSlot({ $grid: $xegrid, $table: $xetable })
425
+ return getSlotVNs(toolsSlot({ $grid: $xegrid, $table: $xetable }))
425
426
  }
426
427
  const btnVNs: VNode[] = []
427
428
  if (tools) {
@@ -498,12 +499,14 @@ export default defineComponent({
498
499
  const isColGroup = column.children && column.children.length
499
500
  const isDisabled = checkMethod ? !checkMethod({ column }) : false
500
501
  if (isColGroup || colKey) {
502
+ const isChecked = column.visible
503
+ const isIndeterminate = column.halfVisible
501
504
  colVNs.push(
502
505
  h('li', {
503
506
  class: ['vxe-custom--option', `level--${column.level}`, {
504
507
  'is--group': isColGroup,
505
- 'is--checked': column.visible,
506
- 'is--indeterminate': column.halfVisible,
508
+ 'is--checked': isChecked,
509
+ 'is--indeterminate': isIndeterminate,
507
510
  'is--disabled': isDisabled
508
511
  }],
509
512
  title: colTitle,
@@ -514,13 +517,7 @@ export default defineComponent({
514
517
  }
515
518
  }, [
516
519
  h('span', {
517
- class: 'vxe-checkbox--icon vxe-checkbox--checked-icon'
518
- }),
519
- h('span', {
520
- class: 'vxe-checkbox--icon vxe-checkbox--unchecked-icon'
521
- }),
522
- h('span', {
523
- class: 'vxe-checkbox--icon vxe-checkbox--indeterminate-icon'
520
+ class: ['vxe-checkbox--icon', isIndeterminate ? GlobalConfig.icon.TABLE_CHECKBOX_INDETERMINATE : (isChecked ? GlobalConfig.icon.TABLE_CHECKBOX_CHECKED : GlobalConfig.icon.TABLE_CHECKBOX_UNCHECKED)]
524
521
  }),
525
522
  h('span', {
526
523
  class: 'vxe-checkbox--label'
@@ -529,6 +526,8 @@ export default defineComponent({
529
526
  )
530
527
  }
531
528
  })
529
+ const isAllChecked = customStore.isAll
530
+ const isAllIndeterminate = customStore.isIndeterminate
532
531
  return h('div', {
533
532
  class: ['vxe-custom--wrapper', {
534
533
  'is--active': customStore.visible
@@ -549,20 +548,14 @@ export default defineComponent({
549
548
  }, [
550
549
  h('li', {
551
550
  class: ['vxe-custom--option', {
552
- 'is--checked': customStore.isAll,
553
- 'is--indeterminate': customStore.isIndeterminate
551
+ 'is--checked': isAllChecked,
552
+ 'is--indeterminate': isAllIndeterminate
554
553
  }],
555
554
  title: GlobalConfig.i18n('vxe.table.allTitle'),
556
555
  onClick: allCustomEvent
557
556
  }, [
558
557
  h('span', {
559
- class: 'vxe-checkbox--icon vxe-checkbox--checked-icon'
560
- }),
561
- h('span', {
562
- class: 'vxe-checkbox--icon vxe-checkbox--unchecked-icon'
563
- }),
564
- h('span', {
565
- class: 'vxe-checkbox--icon vxe-checkbox--indeterminate-icon'
558
+ class: ['vxe-checkbox--icon', isAllIndeterminate ? GlobalConfig.icon.TABLE_CHECKBOX_INDETERMINATE : (isAllChecked ? GlobalConfig.icon.TABLE_CHECKBOX_CHECKED : GlobalConfig.icon.TABLE_CHECKBOX_UNCHECKED)]
566
559
  }),
567
560
  h('span', {
568
561
  class: 'vxe-checkbox--label'
@@ -671,7 +664,7 @@ export default defineComponent({
671
664
  }) : createCommentVNode(),
672
665
  zoom && $xegrid ? h(resolveComponent('vxe-button') as ComponentOptions, {
673
666
  circle: true,
674
- icon: $xegrid.isMaximized() ? (zoomOpts.iconOut || GlobalConfig.icon.TOOLBAR_TOOLS_ZOOM_OUT) : (zoomOpts.iconIn || GlobalConfig.icon.TOOLBAR_TOOLS_ZOOM_IN),
667
+ icon: $xegrid.isMaximized() ? (zoomOpts.iconOut || GlobalConfig.icon.TOOLBAR_TOOLS_MINIMIZE) : (zoomOpts.iconIn || GlobalConfig.icon.TOOLBAR_TOOLS_FULLSCREEN),
675
668
  title: GlobalConfig.i18n(`vxe.toolbar.zoom${$xegrid.isMaximized() ? 'Out' : 'In'}`),
676
669
  onClick: zoomEvent
677
670
  }) : createCommentVNode(),
@@ -1,3 +1,13 @@
1
+ import XEUtils from 'xe-utils'
2
+ import { SlotVNodeType } from '../../types/all'
3
+
1
4
  export function getOnName (type: string) {
2
5
  return 'on' + type.substring(0, 1).toLocaleUpperCase() + type.substring(1)
3
6
  }
7
+
8
+ export function getSlotVNs (vns: SlotVNodeType | SlotVNodeType[]) {
9
+ if (XEUtils.isArray(vns)) {
10
+ return vns
11
+ }
12
+ return [vns]
13
+ }
@@ -4,6 +4,7 @@ import GlobalConfig from '../../v-x-e-table/src/conf'
4
4
  import { useSize } from '../../hooks/size'
5
5
  import { getLastZIndex, nextZIndex, formatText } from '../../tools/utils'
6
6
  import { getAbsolutePos, getDomNode } from '../../tools/dom'
7
+ import { getSlotVNs } from '../../tools/vn'
7
8
 
8
9
  import { VxeTooltipPropTypes, VxeTooltipConstructor, VxeTooltipEmits, TooltipReactData, TooltipMethods, TooltipPrivateRef } from '../../../types/all'
9
10
 
@@ -292,11 +293,12 @@ export default defineComponent({
292
293
  const renderContent = () => {
293
294
  const { useHTML } = props
294
295
  const { tipContent } = reactData
295
- if (slots.content) {
296
+ const contentSlot = slots.content
297
+ if (contentSlot) {
296
298
  return h('div', {
297
299
  key: 1,
298
300
  class: 'vxe-table--tooltip-content'
299
- }, slots.content({}))
301
+ }, getSlotVNs(contentSlot({})))
300
302
  }
301
303
  if (useHTML) {
302
304
  return h('div', {
@@ -314,6 +316,7 @@ export default defineComponent({
314
316
  const renderVN = () => {
315
317
  const { theme, isArrow, enterable } = props
316
318
  const { tipActive, visible, tipStore } = reactData
319
+ const defaultSlot = slots.default
317
320
  const vSize = computeSize.value
318
321
  let ons
319
322
  if (enterable) {
@@ -339,8 +342,9 @@ export default defineComponent({
339
342
  h('div', {
340
343
  class: 'vxe-table--tooltip-arrow',
341
344
  style: tipStore.arrowStyle
342
- })
343
- ].concat(slots.default ? slots.default({}) : []))
345
+ }),
346
+ ...(defaultSlot ? getSlotVNs(defaultSlot({})) : [])
347
+ ])
344
348
  }
345
349
 
346
350
  $xetooltip.renderVN = renderVN
@@ -1,6 +1,6 @@
1
1
  import { VXETableGlobalConfig } from '../../../types/all'
2
2
 
3
- const iconPrefix = 'vxe-icon--'
3
+ const iconPrefix = 'vxe-icon-'
4
4
 
5
5
  const GlobalConfig: VXETableGlobalConfig = {
6
6
  size: null, // 全局尺寸
@@ -8,7 +8,7 @@ const GlobalConfig: VXETableGlobalConfig = {
8
8
  version: 0, // 版本号,对于某些带数据缓存的功能有用到,上升版本号可以用于重置数据
9
9
  // resizeInterval: 500,
10
10
  emptyCell: ' ',
11
- loadingText: null, // 自定义loading提示内容,如果为null则不显示文本
11
+ // loadingText: null, // 自定义loading提示内容,如果为null则不显示文本
12
12
  table: {
13
13
  fit: true,
14
14
  showHeader: true,
@@ -127,73 +127,78 @@ const GlobalConfig: VXETableGlobalConfig = {
127
127
  },
128
128
  icon: {
129
129
  // loading
130
- // LOADING: iconPrefix + 'refresh roll vxe-loading--default-icon',
130
+ LOADING: iconPrefix + 'spinner roll vxe-loading--default-icon',
131
131
 
132
132
  // table
133
- TABLE_SORT_ASC: iconPrefix + 'caret-top',
134
- TABLE_SORT_DESC: iconPrefix + 'caret-bottom',
133
+ TABLE_SORT_ASC: iconPrefix + 'caret-up',
134
+ TABLE_SORT_DESC: iconPrefix + 'caret-down',
135
135
  TABLE_FILTER_NONE: iconPrefix + 'funnel',
136
136
  TABLE_FILTER_MATCH: iconPrefix + 'funnel',
137
- TABLE_EDIT: iconPrefix + 'edit-outline',
138
- TABLE_HELP: iconPrefix + 'question',
139
- TABLE_TREE_LOADED: iconPrefix + 'refresh roll',
137
+ TABLE_EDIT: iconPrefix + 'edit',
138
+ TABLE_HELP: iconPrefix + 'question-circle-fill',
139
+ TABLE_TREE_LOADED: iconPrefix + 'spinner roll',
140
140
  TABLE_TREE_OPEN: iconPrefix + 'caret-right rotate90',
141
141
  TABLE_TREE_CLOSE: iconPrefix + 'caret-right',
142
- TABLE_EXPAND_LOADED: iconPrefix + 'refresh roll',
142
+ TABLE_EXPAND_LOADED: iconPrefix + 'spinner roll',
143
143
  TABLE_EXPAND_OPEN: iconPrefix + 'arrow-right rotate90',
144
144
  TABLE_EXPAND_CLOSE: iconPrefix + 'arrow-right',
145
+ TABLE_CHECKBOX_CHECKED: iconPrefix + 'checkbox-checked',
146
+ TABLE_CHECKBOX_UNCHECKED: iconPrefix + 'checkbox-unchecked',
147
+ TABLE_CHECKBOX_INDETERMINATE: iconPrefix + 'checkbox-indeterminate',
148
+ TABLE_RADIO_CHECKED: iconPrefix + 'radio-checked',
149
+ TABLE_RADIO_UNCHECKED: iconPrefix + 'radio-unchecked',
145
150
 
146
151
  // button
147
- BUTTON_DROPDOWN: iconPrefix + 'arrow-bottom',
148
- BUTTON_LOADING: iconPrefix + 'refresh roll',
152
+ BUTTON_DROPDOWN: iconPrefix + 'arrow-down',
153
+ BUTTON_LOADING: iconPrefix + 'spinner roll',
149
154
 
150
155
  // select
151
- SELECT_LOADED: iconPrefix + 'refresh roll',
152
- SELECT_OPEN: iconPrefix + 'caret-bottom rotate180',
153
- SELECT_CLOSE: iconPrefix + 'caret-bottom',
156
+ SELECT_LOADED: iconPrefix + 'spinner roll',
157
+ SELECT_OPEN: iconPrefix + 'caret-down rotate180',
158
+ SELECT_CLOSE: iconPrefix + 'caret-down',
154
159
 
155
160
  // pager
156
- PAGER_JUMP_PREV: iconPrefix + 'd-arrow-left',
157
- PAGER_JUMP_NEXT: iconPrefix + 'd-arrow-right',
161
+ PAGER_JUMP_PREV: iconPrefix + 'arrow-double-left',
162
+ PAGER_JUMP_NEXT: iconPrefix + 'arrow-double-right',
158
163
  PAGER_PREV_PAGE: iconPrefix + 'arrow-left',
159
164
  PAGER_NEXT_PAGE: iconPrefix + 'arrow-right',
160
- PAGER_JUMP_MORE: iconPrefix + 'more',
165
+ PAGER_JUMP_MORE: iconPrefix + 'ellipsis-h',
161
166
 
162
167
  // input
163
- INPUT_CLEAR: iconPrefix + 'close',
164
- INPUT_PWD: iconPrefix + 'eye-slash',
165
- INPUT_SHOW_PWD: iconPrefix + 'eye',
166
- INPUT_PREV_NUM: iconPrefix + 'caret-top',
167
- INPUT_NEXT_NUM: iconPrefix + 'caret-bottom',
168
+ INPUT_CLEAR: iconPrefix + 'error-circle-fill',
169
+ INPUT_PWD: iconPrefix + 'eye-fill',
170
+ INPUT_SHOW_PWD: iconPrefix + 'eye-fill-close',
171
+ INPUT_PREV_NUM: iconPrefix + 'caret-up',
172
+ INPUT_NEXT_NUM: iconPrefix + 'caret-down',
168
173
  INPUT_DATE: iconPrefix + 'calendar',
169
174
  INPUT_SEARCH: iconPrefix + 'search',
170
175
 
171
176
  // modal
172
177
  MODAL_ZOOM_IN: iconPrefix + 'square',
173
- MODAL_ZOOM_OUT: iconPrefix + 'zoomout',
178
+ MODAL_ZOOM_OUT: iconPrefix + 'maximize',
174
179
  MODAL_CLOSE: iconPrefix + 'close',
175
- MODAL_INFO: iconPrefix + 'info',
176
- MODAL_SUCCESS: iconPrefix + 'success',
177
- MODAL_WARNING: iconPrefix + 'warning',
178
- MODAL_ERROR: iconPrefix + 'error',
179
- MODAL_QUESTION: iconPrefix + 'question',
180
- MODAL_LOADING: iconPrefix + 'refresh roll',
180
+ MODAL_INFO: iconPrefix + 'info-circle-fill',
181
+ MODAL_SUCCESS: iconPrefix + 'success-circle-fill',
182
+ MODAL_WARNING: iconPrefix + 'warnion-circle-fill',
183
+ MODAL_ERROR: iconPrefix + 'error-circle-fill',
184
+ MODAL_QUESTION: iconPrefix + 'question-circle-fill',
185
+ MODAL_LOADING: iconPrefix + 'spinner roll',
181
186
 
182
187
  // toolbar
183
- TOOLBAR_TOOLS_REFRESH: iconPrefix + 'refresh',
184
- TOOLBAR_TOOLS_REFRESH_LOADING: iconPrefix + 'refresh roll',
188
+ TOOLBAR_TOOLS_REFRESH: iconPrefix + 'repeat',
189
+ TOOLBAR_TOOLS_REFRESH_LOADING: iconPrefix + 'repeat roll',
185
190
  TOOLBAR_TOOLS_IMPORT: iconPrefix + 'upload',
186
191
  TOOLBAR_TOOLS_EXPORT: iconPrefix + 'download',
187
192
  TOOLBAR_TOOLS_PRINT: iconPrefix + 'print',
188
- TOOLBAR_TOOLS_ZOOM_IN: iconPrefix + 'zoomin',
189
- TOOLBAR_TOOLS_ZOOM_OUT: iconPrefix + 'zoomout',
190
- TOOLBAR_TOOLS_CUSTOM: iconPrefix + 'menu',
193
+ TOOLBAR_TOOLS_FULLSCREEN: iconPrefix + 'fullscreen',
194
+ TOOLBAR_TOOLS_MINIMIZE: iconPrefix + 'minimize',
195
+ TOOLBAR_TOOLS_CUSTOM: iconPrefix + 'custom-column',
191
196
 
192
197
  // form
193
- FORM_PREFIX: iconPrefix + 'question',
194
- FORM_SUFFIX: iconPrefix + 'question',
195
- FORM_FOLDING: iconPrefix + 'arrow-top rotate180',
196
- FORM_UNFOLDING: iconPrefix + 'arrow-top'
198
+ FORM_PREFIX: iconPrefix + 'question-circle-fill',
199
+ FORM_SUFFIX: iconPrefix + 'question-circle-fill',
200
+ FORM_FOLDING: iconPrefix + 'arrow-up rotate180',
201
+ FORM_UNFOLDING: iconPrefix + 'arrow-up'
197
202
  },
198
203
  grid: {
199
204
  // size: null,
@@ -1,179 +1,75 @@
1
- // 单选框和复选框
2
- %RadioAndCheckboxSpan {
3
- position: relative;
4
- user-select: none;
5
- cursor: pointer;
6
- }
7
- %RadioAndCheckboxIcon {
8
- display: none;
9
- position: absolute;
10
- height: 1em;
11
- width: 1em;
12
- }
13
-
14
- %XERadio {
15
- @extend %RadioAndCheckboxSpan;
16
- .vxe-radio--icon {
17
- @extend %RadioAndCheckboxIcon;
18
- font-size: $vxe-radio-font-size-default;
19
- &:before {
20
- content: "";
21
- position: absolute;
22
- height: 1em;
23
- width: 1em;
24
- top: 0;
25
- left: 0;
26
- border: $vxe-radio-border-width solid $vxe-input-border-color;
27
- background-color: $vxe-radio-icon-background-color;
28
- border-radius: 50%;
29
- }
30
- }
31
- .vxe-radio--unchecked-icon {
32
- display: inline-block;
1
+ %XECheckboxIcon {
2
+ .vxe-checkbox--icon {
3
+ font-size: 1.16em;
33
4
  }
34
- .vxe-radio--checked-icon {
35
- &:after {
36
- content: "";
37
- position: absolute;
38
- height: 0.25em;
39
- width: 0.25em;
40
- top: 0.4em;
41
- left: 0.4em;
42
- border-radius: 50%;
43
- background-color: $vxe-radio-checked-icon-background-color;
44
- }
5
+ .vxe-checkbox--icon {
6
+ color: $vxe-input-border-color;
7
+ vertical-align: middle;
8
+ font-weight: 700;
9
+ user-select: none;
45
10
  }
46
- &.is--checked {
11
+ &.is--checked,
12
+ &.is--indeterminate {
47
13
  color: $vxe-primary-color;
48
- .vxe-radio--unchecked-icon {
49
- display: none;
50
- }
51
- .vxe-radio--checked-icon {
52
- display: inline-block;
53
- &:before {
54
- border-color: $vxe-primary-color;
55
- background-color: $vxe-primary-color;
56
- }
14
+ .vxe-checkbox--icon {
15
+ color: $vxe-primary-color;
57
16
  }
58
17
  }
59
18
  &:not(.is--disabled) {
19
+ cursor: pointer;
60
20
  &:hover {
61
- .vxe-radio--icon {
62
- &:before {
63
- border-color: $vxe-primary-color;
64
- }
21
+ .vxe-checkbox--icon {
22
+ color: $vxe-primary-color;
65
23
  }
66
24
  }
67
25
  }
68
26
  &.is--disabled {
69
- cursor: not-allowed;
70
27
  color: $vxe-disabled-color;
71
- .vxe-radio--icon {
72
- &:before {
73
- border-color: $vxe-input-disabled-color;
74
- background-color: $vxe-input-disabled-background-color;
75
- }
76
- &:after {
77
- background-color: $vxe-primary-disabled-color;
78
- }
28
+ cursor: not-allowed;
29
+ .vxe-checkbox--icon {
30
+ color: $vxe-input-disabled-color;
79
31
  }
80
32
  }
33
+ .vxe-checkbox--label {
34
+ padding-left: 0.5em;
35
+ vertical-align: middle;
36
+ }
81
37
  }
82
38
 
83
- %XECheckbox {
84
- @extend %RadioAndCheckboxSpan;
85
- .vxe-checkbox--icon {
86
- @extend %RadioAndCheckboxIcon;
87
- font-size: $vxe-checkbox-font-size-default;
88
- &:before {
89
- content: "";
90
- position: absolute;
91
- height: 1em;
92
- width: 1em;
93
- top: 0;
94
- left: 0;
95
- background-color: $vxe-checkbox-icon-background-color;
96
- border-radius: $vxe-checkbox-border-radius;
97
- border: $vxe-checkbox-border-width solid $vxe-input-border-color;
98
- }
99
- }
100
- .vxe-checkbox--unchecked-icon {
101
- display: inline-block;
102
- }
103
- .vxe-checkbox--checked-icon {
104
- &:after {
105
- content: "";
106
- position: absolute;
107
- height: $vxe-checkbox-checked-height;
108
- width: $vxe-checkbox-checked-width;
109
- top: 50%;
110
- left: 50%;
111
- border: $vxe-checkbox-border-width solid $vxe-checkbox-checked-icon-border-color;
112
- border-left: 0;
113
- border-top: 0;
114
- transform: translate(-50%, -50%) rotate(45deg);
115
- }
116
- }
117
- .vxe-checkbox--indeterminate-icon {
118
- &:after {
119
- content: "";
120
- position: absolute;
121
- top: 50%;
122
- left: 50%;
123
- height: $vxe-checkbox-indeterminate-height;
124
- width: $vxe-checkbox-indeterminate-width;
125
- background-color: $vxe-checkbox-indeterminate-icon-background-color;
126
- transform: translate(-50%, -50%);
127
- }
39
+ %XERadioIcon {
40
+ cursor: pointer;
41
+ .vxe-radio--icon {
42
+ font-size: 1.34em;
128
43
  }
129
- &.is--checked,
130
- &.is--indeterminate {
131
- color: $vxe-primary-color;
132
- .vxe-checkbox--unchecked-icon {
133
- display: none;
134
- }
135
- .vxe-checkbox--icon {
136
- &:before {
137
- border-color: $vxe-primary-color;
138
- background-color: $vxe-primary-color;
139
- }
140
- }
44
+ .vxe-radio--icon {
45
+ color: $vxe-input-border-color;
46
+ vertical-align: middle;
47
+ font-weight: 700;
48
+ user-select: none;
141
49
  }
142
50
  &.is--checked {
143
- .vxe-checkbox--checked-icon {
144
- display: inline-block;
145
- }
146
- }
147
- &.is--indeterminate {
148
- .vxe-checkbox--indeterminate-icon {
149
- display: inline-block;
51
+ color: $vxe-primary-color;
52
+ .vxe-radio--icon {
53
+ color: $vxe-primary-color;
150
54
  }
151
55
  }
152
56
  &:not(.is--disabled) {
57
+ cursor: pointer;
153
58
  &:hover {
154
- .vxe-checkbox--icon {
155
- &:before {
156
- border-color: $vxe-primary-color;
157
- }
59
+ .vxe-radio--icon {
60
+ color: $vxe-primary-color;
158
61
  }
159
62
  }
160
63
  }
161
64
  &.is--disabled {
162
- cursor: not-allowed;
163
65
  color: $vxe-disabled-color;
164
- .vxe-checkbox--icon {
165
- &:before {
166
- border-color: $vxe-input-disabled-color;
167
- background-color: $vxe-input-disabled-background-color;
168
- }
169
- &:after {
170
- border-color: $vxe-primary-disabled-color;
171
- }
172
- }
173
- .vxe-checkbox--indeterminate-icon {
174
- &:after {
175
- background-color: $vxe-primary-disabled-color;
176
- }
66
+ cursor: not-allowed;
67
+ .vxe-radio--icon {
68
+ color: $vxe-input-disabled-color;
177
69
  }
178
70
  }
71
+ .vxe-radio--label {
72
+ padding-left: 0.5em;
73
+ vertical-align: middle;
74
+ }
179
75
  }