vxe-table 4.7.55 → 4.7.57

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 (65) hide show
  1. package/es/grid/src/grid.js +1 -1
  2. package/es/style.css +1 -1
  3. package/es/style.min.css +1 -1
  4. package/es/table/module/export/hook.js +6 -3
  5. package/es/table/render/index.js +12 -0
  6. package/es/table/src/column.js +2 -2
  7. package/es/table/src/columnInfo.js +2 -1
  8. package/es/table/src/group.js +2 -2
  9. package/es/table/src/table.js +1 -1
  10. package/es/table/src/util.js +1 -1
  11. package/es/table/style.css +65 -30
  12. package/es/table/style.min.css +1 -1
  13. package/es/toolbar/src/toolbar.js +3 -0
  14. package/es/ui/index.js +2 -2
  15. package/es/ui/src/log.js +1 -1
  16. package/es/vxe-table/style.css +65 -30
  17. package/es/vxe-table/style.min.css +1 -1
  18. package/lib/grid/src/grid.js +1 -1
  19. package/lib/grid/src/grid.min.js +1 -1
  20. package/lib/index.umd.js +40 -12
  21. package/lib/index.umd.min.js +1 -1
  22. package/lib/style.css +1 -1
  23. package/lib/style.min.css +1 -1
  24. package/lib/table/module/export/hook.js +6 -3
  25. package/lib/table/module/export/hook.min.js +1 -1
  26. package/lib/table/render/index.js +17 -0
  27. package/lib/table/render/index.min.js +1 -1
  28. package/lib/table/src/column.js +1 -1
  29. package/lib/table/src/column.min.js +1 -1
  30. package/lib/table/src/columnInfo.js +4 -1
  31. package/lib/table/src/columnInfo.min.js +1 -1
  32. package/lib/table/src/group.js +1 -1
  33. package/lib/table/src/group.min.js +1 -1
  34. package/lib/table/src/table.js +1 -1
  35. package/lib/table/src/table.min.js +1 -1
  36. package/lib/table/src/util.js +2 -2
  37. package/lib/table/src/util.min.js +1 -1
  38. package/lib/table/style/style.css +65 -30
  39. package/lib/table/style/style.min.css +1 -1
  40. package/lib/toolbar/src/toolbar.js +3 -0
  41. package/lib/toolbar/src/toolbar.min.js +1 -1
  42. package/lib/ui/index.js +2 -2
  43. package/lib/ui/index.min.js +1 -1
  44. package/lib/ui/src/log.js +1 -1
  45. package/lib/ui/src/log.min.js +1 -1
  46. package/lib/vxe-table/style/style.css +65 -30
  47. package/lib/vxe-table/style/style.min.css +1 -1
  48. package/package.json +2 -2
  49. package/packages/grid/src/grid.ts +1 -1
  50. package/packages/table/module/export/hook.ts +5 -3
  51. package/packages/table/render/index.ts +16 -0
  52. package/packages/table/src/column.ts +2 -2
  53. package/packages/table/src/columnInfo.ts +2 -1
  54. package/packages/table/src/group.ts +2 -2
  55. package/packages/table/src/table.ts +1 -1
  56. package/packages/table/src/util.ts +1 -1
  57. package/packages/toolbar/src/toolbar.ts +3 -0
  58. package/styles/components/icon.scss +1 -1
  59. package/styles/components/table.scss +28 -10
  60. /package/es/{iconfont.1721294431120.ttf → iconfont.1721615372181.ttf} +0 -0
  61. /package/es/{iconfont.1721294431120.woff → iconfont.1721615372181.woff} +0 -0
  62. /package/es/{iconfont.1721294431120.woff2 → iconfont.1721615372181.woff2} +0 -0
  63. /package/lib/{iconfont.1721294431120.ttf → iconfont.1721615372181.ttf} +0 -0
  64. /package/lib/{iconfont.1721294431120.woff → iconfont.1721615372181.woff} +0 -0
  65. /package/lib/{iconfont.1721294431120.woff2 → iconfont.1721615372181.woff2} +0 -0
@@ -728,8 +728,24 @@ renderer.mixin({
728
728
  renderDefault: defaultEditRender
729
729
  },
730
730
  VxeUpload: {
731
+ renderEdit: defaultEditRender,
732
+ renderCell: defaultEditRender,
731
733
  renderDefault: defaultEditRender
732
734
  },
735
+ VxeImage: {
736
+ renderDefault (renderOpts, params) {
737
+ const { row, column } = params
738
+ const { props } = renderOpts
739
+ const cellValue = getCellValue(row, column)
740
+ return [
741
+ h(getDefaultComponent(renderOpts), {
742
+ ...props,
743
+ src: cellValue,
744
+ ...getEditOns(renderOpts, params)
745
+ })
746
+ ]
747
+ }
748
+ },
733
749
 
734
750
  // 以下已废弃
735
751
  $input: {
@@ -1,5 +1,5 @@
1
1
  import { defineComponent, h, onUnmounted, inject, ref, Ref, PropType, provide, onMounted } from 'vue'
2
- import { XEColumnInstance, watchColumn, assemColumn, destroyColumn } from '../../table/src/util'
2
+ import { XEColumnInstance, watchColumn, assembleColumn, destroyColumn } from '../../table/src/util'
3
3
  import Cell from '../../table/src/cell'
4
4
 
5
5
  import type { VxeTableConstructor, VxeTablePrivateMethods, VxeColumnPropTypes, VxeColumnProps } from '../../../types'
@@ -116,7 +116,7 @@ export default defineComponent({
116
116
  watchColumn($xeTable, props, column)
117
117
 
118
118
  onMounted(() => {
119
- assemColumn($xeTable, refElem.value, column, parentColgroup)
119
+ assembleColumn($xeTable, refElem.value, column, parentColgroup)
120
120
  })
121
121
 
122
122
  onUnmounted(() => {
@@ -156,7 +156,8 @@ export class ColumnInfo {
156
156
  }
157
157
 
158
158
  getKey () {
159
- return this.field || (this.type ? `type=${this.type}` : null)
159
+ const { type } = this
160
+ return this.field || (type ? `type=${type}` : null)
160
161
  }
161
162
 
162
163
  update (name: string, value: any) {
@@ -1,6 +1,6 @@
1
1
  import { defineComponent, h, onUnmounted, provide, inject, ref, Ref, onMounted, Slot } from 'vue'
2
2
  import { columnProps } from './column'
3
- import { XEColumnInstance, watchColumn, assemColumn, destroyColumn } from '../../table/src/util'
3
+ import { XEColumnInstance, watchColumn, assembleColumn, destroyColumn } from '../../table/src/util'
4
4
  import Cell from '../../table/src/cell'
5
5
 
6
6
  import type { VxeTableConstructor, VxeTablePrivateMethods } from '../../../types'
@@ -27,7 +27,7 @@ export default defineComponent({
27
27
  watchColumn($xeTable, props, column)
28
28
 
29
29
  onMounted(() => {
30
- assemColumn($xeTable, refElem.value, column, parentColgroup)
30
+ assembleColumn($xeTable, refElem.value, column, parentColgroup)
31
31
  })
32
32
 
33
33
  onUnmounted(() => {
@@ -2911,7 +2911,7 @@ export default defineComponent({
2911
2911
  }, { children: childrenField })
2912
2912
  row[childrenField] = rows
2913
2913
  if (transform) {
2914
- row[mapChildrenField] = rows
2914
+ row[mapChildrenField] = XEUtils.clone(rows, false)
2915
2915
  }
2916
2916
  updateAfterDataIndex()
2917
2917
  return rows
@@ -290,7 +290,7 @@ export function watchColumn ($xeTable: VxeTableConstructor & VxeTablePrivateMeth
290
290
  })
291
291
  }
292
292
 
293
- export function assemColumn ($xeTable: VxeTableConstructor & VxeTablePrivateMethods, elem: HTMLElement, column: ColumnInfo, colgroup: XEColumnInstance | null) {
293
+ export function assembleColumn ($xeTable: VxeTableConstructor & VxeTablePrivateMethods, elem: HTMLElement, column: ColumnInfo, colgroup: XEColumnInstance | null) {
294
294
  const { reactData } = $xeTable
295
295
  const { staticColumns } = reactData
296
296
  const parentElem = elem.parentNode
@@ -264,6 +264,7 @@ export default defineComponent({
264
264
  disabled: child.disabled,
265
265
  loading: child.loading,
266
266
  type: child.type,
267
+ mode: child.mode,
267
268
  icon: child.icon,
268
269
  circle: child.circle,
269
270
  round: child.round,
@@ -308,6 +309,7 @@ export default defineComponent({
308
309
  disabled: item.disabled,
309
310
  loading: item.loading,
310
311
  type: item.type,
312
+ mode: item.mode,
311
313
  icon: item.icon,
312
314
  circle: item.circle,
313
315
  round: item.round,
@@ -365,6 +367,7 @@ export default defineComponent({
365
367
  disabled: item.disabled,
366
368
  loading: item.loading,
367
369
  type: item.type,
370
+ mode: item.mode,
368
371
  icon: item.icon,
369
372
  circle: item.circle,
370
373
  round: item.round,
@@ -45,7 +45,7 @@ $btnThemeList: (
45
45
  font-style: normal;
46
46
  font-weight: 400;
47
47
  font-size: 1.1em;
48
- line-height: 1;
48
+ line-height: 1em;
49
49
  -webkit-font-smoothing: antialiased;
50
50
  -moz-osx-font-smoothing: grayscale;
51
51
  &.animat,
@@ -47,13 +47,13 @@
47
47
  /*默认的渲染*/
48
48
  .vxe-cell,
49
49
  .vxe-table--filter-template {
50
- & > .vxe-default-input,
51
- & > .vxe-default-textarea {
50
+ .vxe-default-input,
51
+ .vxe-default-textarea {
52
52
  background-color: var(--vxe-ui-layout-background-color);
53
53
  }
54
- & > .vxe-default-input,
55
- & > .vxe-default-textarea,
56
- & > .vxe-default-select {
54
+ .vxe-default-input,
55
+ .vxe-default-textarea,
56
+ .vxe-default-select {
57
57
  outline: 0;
58
58
  padding: 0 2px;
59
59
  width: 100%;
@@ -68,12 +68,12 @@
68
68
  background-color: var(--vxe-ui-input-disabled-background-color);
69
69
  }
70
70
  }
71
- & > .vxe-default-input,
72
- & > .vxe-default-textarea,
73
- & > .vxe-default-select {
71
+ .vxe-default-input,
72
+ .vxe-default-textarea,
73
+ .vxe-default-select {
74
74
  height: var(--vxe-ui-input-height-default);
75
75
  }
76
- & > .vxe-default-input {
76
+ .vxe-default-input {
77
77
  &[type="date"]::-webkit-inner-spin-button {
78
78
  margin-top: 4px;
79
79
  }
@@ -85,7 +85,7 @@
85
85
  color: var(--vxe-ui-input-placeholder-color);
86
86
  }
87
87
  }
88
- & > .vxe-default-textarea {
88
+ .vxe-default-textarea {
89
89
  resize: none;
90
90
  vertical-align: middle;
91
91
  }
@@ -105,6 +105,24 @@
105
105
  & > .vxe-default-textarea {
106
106
  resize: none;
107
107
  }
108
+ & > .vxe-cell--tree-node {
109
+ .vxe-input,
110
+ .vxe-textarea,
111
+ .vxe-select,
112
+ .vxe-tree-select,
113
+ .vxe-date-picker,
114
+ .vxe-number-input {
115
+ width: 100%;
116
+ }
117
+ .vxe-input > .vxe-input--inner,
118
+ .vxe-textarea > .vxe-textarea--inner {
119
+ padding: 0 2px;
120
+ }
121
+ .vxe-textarea--inner,
122
+ .vxe-default-textarea {
123
+ resize: none;
124
+ }
125
+ }
108
126
  }
109
127
 
110
128
  .vxe-table--checkbox-range,