vxe-table 4.7.81 → 4.7.82

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 (53) hide show
  1. package/es/grid/src/grid.js +15 -15
  2. package/es/style.css +1 -1
  3. package/es/style.min.css +1 -1
  4. package/es/table/render/index.js +9 -3
  5. package/es/table/src/body.js +1 -0
  6. package/es/table/src/props.js +5 -0
  7. package/es/table/src/table.js +1 -0
  8. package/es/table/style.css +33 -19
  9. package/es/table/style.min.css +1 -1
  10. package/es/toolbar/src/toolbar.js +11 -2
  11. package/es/ui/index.js +3 -2
  12. package/es/ui/src/log.js +1 -1
  13. package/es/vxe-table/style.css +33 -19
  14. package/es/vxe-table/style.min.css +1 -1
  15. package/lib/grid/src/grid.js +15 -15
  16. package/lib/grid/src/grid.min.js +1 -1
  17. package/lib/index.umd.js +49 -22
  18. package/lib/index.umd.min.js +1 -1
  19. package/lib/style.css +1 -1
  20. package/lib/style.min.css +1 -1
  21. package/lib/table/render/index.js +12 -2
  22. package/lib/table/render/index.min.js +1 -1
  23. package/lib/table/src/body.js +1 -0
  24. package/lib/table/src/body.min.js +1 -1
  25. package/lib/table/src/props.js +5 -0
  26. package/lib/table/src/props.min.js +1 -1
  27. package/lib/table/src/table.js +1 -0
  28. package/lib/table/src/table.min.js +1 -1
  29. package/lib/table/style/style.css +33 -19
  30. package/lib/table/style/style.min.css +1 -1
  31. package/lib/toolbar/src/toolbar.js +11 -2
  32. package/lib/toolbar/src/toolbar.min.js +1 -1
  33. package/lib/ui/index.js +3 -2
  34. package/lib/ui/index.min.js +1 -1
  35. package/lib/ui/src/log.js +1 -1
  36. package/lib/ui/src/log.min.js +1 -1
  37. package/lib/vxe-table/style/style.css +33 -19
  38. package/lib/vxe-table/style/style.min.css +1 -1
  39. package/package.json +2 -2
  40. package/packages/grid/src/grid.ts +16 -17
  41. package/packages/table/render/index.ts +9 -3
  42. package/packages/table/src/body.ts +1 -0
  43. package/packages/table/src/props.ts +5 -0
  44. package/packages/table/src/table.ts +1 -0
  45. package/packages/toolbar/src/toolbar.ts +11 -2
  46. package/packages/ui/index.ts +1 -0
  47. package/styles/components/table.scss +74 -13
  48. /package/es/{iconfont.1727054403308.ttf → iconfont.1727228895510.ttf} +0 -0
  49. /package/es/{iconfont.1727054403308.woff → iconfont.1727228895510.woff} +0 -0
  50. /package/es/{iconfont.1727054403308.woff2 → iconfont.1727228895510.woff2} +0 -0
  51. /package/lib/{iconfont.1727054403308.ttf → iconfont.1727228895510.ttf} +0 -0
  52. /package/lib/{iconfont.1727054403308.woff → iconfont.1727228895510.woff} +0 -0
  53. /package/lib/{iconfont.1727054403308.woff2 → iconfont.1727228895510.woff2} +0 -0
@@ -89,10 +89,10 @@ function isImmediateCell (renderOpts: VxeColumnPropTypes.EditRender, params: any
89
89
  }
90
90
 
91
91
  function getCellLabelVNs (renderOpts: any, params: any, cellLabel: any) {
92
- const { placeholder } = renderOpts
92
+ const { name, placeholder } = renderOpts
93
93
  return [
94
94
  h('span', {
95
- class: 'vxe-cell--label'
95
+ class: ['vxe-cell--label', ['VxeTextarea', 'textarea'].includes(name) ? 'is--textarea' : '']
96
96
  }, placeholder && isEmptyValue(cellLabel)
97
97
  ? [
98
98
  h('span', {
@@ -638,7 +638,13 @@ renderer.mixin({
638
638
  tableFilterDefaultMethod: handleFilterMethod
639
639
  },
640
640
  VxeTextarea: {
641
- tableAutoFocus: 'VxeTextarea'
641
+ tableAutoFocus: 'textarea',
642
+ renderTableEdit: defaultEditRender,
643
+ renderTableCell (renderOpts, params) {
644
+ const { row, column } = params
645
+ const cellValue = XEUtils.get(row, column.field)
646
+ return getCellLabelVNs(renderOpts, params, cellValue)
647
+ }
642
648
  },
643
649
  VxeButton: {
644
650
  renderTableDefault: buttonCellRender
@@ -334,6 +334,7 @@ export default defineComponent({
334
334
  'col--tree-node': treeNode,
335
335
  'col--edit': isEdit,
336
336
  'col--ellipsis': hasEllipsis,
337
+ 'col--height': !!rowOpts.height,
337
338
  'fixed--hidden': fixedHiddenColumn,
338
339
  'col--dirty': isDirty,
339
340
  'col--active': editConfig && isEdit && (actived.row === row && (actived.column === column || editOpts.mode === 'row')),
@@ -34,6 +34,11 @@ export default {
34
34
  type: [Boolean, String] as PropType<VxeTablePropTypes.Border>,
35
35
  default: () => getConfig().table.border
36
36
  },
37
+ // 单元格是否有边距
38
+ padding: {
39
+ type: Boolean as PropType<VxeTablePropTypes.Padding>,
40
+ default: () => getConfig().table.padding
41
+ },
37
42
  // 是否圆角边框
38
43
  round: {
39
44
  type: Boolean as PropType<VxeTablePropTypes.Round>,
@@ -7045,6 +7045,7 @@ export default defineComponent({
7045
7045
  'is--fixed-left': leftList.length,
7046
7046
  'is--fixed-right': rightList.length,
7047
7047
  'is--animat': !!props.animat,
7048
+ 'is--padding': props.padding,
7048
7049
  'is--round': props.round,
7049
7050
  'is--stripe': !treeConfig && stripe,
7050
7051
  'is--loading': currLoading,
@@ -310,8 +310,11 @@ export default defineComponent({
310
310
  round: child.round,
311
311
  status: child.status,
312
312
  content: child.name,
313
- routerLink: item.routerLink,
314
- permissionCode: item.permissionCode,
313
+ title: child.title,
314
+ routerLink: child.routerLink,
315
+ permissionCode: child.permissionCode,
316
+ prefixTooltip: child.prefixTooltip,
317
+ suffixTooltip: child.suffixTooltip,
315
318
  onClick: ({ $event }) => isBtn ? btnEvent($event, child) : tolEvent($event, child)
316
319
  })
317
320
  : createCommentVNode()
@@ -354,8 +357,11 @@ export default defineComponent({
354
357
  round: item.round,
355
358
  status: item.status,
356
359
  content: item.name,
360
+ title: item.title,
357
361
  routerLink: item.routerLink,
358
362
  permissionCode: item.permissionCode,
363
+ prefixTooltip: item.prefixTooltip,
364
+ suffixTooltip: item.suffixTooltip,
359
365
  destroyOnClose: item.destroyOnClose,
360
366
  placement: item.placement,
361
367
  transfer: item.transfer,
@@ -411,8 +417,11 @@ export default defineComponent({
411
417
  round: item.round,
412
418
  status: item.status,
413
419
  content: item.name,
420
+ title: item.title,
414
421
  routerLink: item.routerLink,
415
422
  permissionCode: item.permissionCode,
423
+ prefixTooltip: item.prefixTooltip,
424
+ suffixTooltip: item.suffixTooltip,
416
425
  destroyOnClose: item.destroyOnClose,
417
426
  placement: item.placement,
418
427
  transfer: item.transfer,
@@ -17,6 +17,7 @@ VxeUI.setConfig({
17
17
  animat: true,
18
18
  delayHover: 250,
19
19
  autoResize: true,
20
+ padding: true,
20
21
  minHeight: 144,
21
22
  // keepSource: false,
22
23
  // showOverflow: null,
@@ -130,6 +130,22 @@
130
130
  }
131
131
  }
132
132
  }
133
+ .vxe-body--column {
134
+ &.col--height {
135
+ & > .vxe-cell {
136
+ height: 100%;
137
+ & > .vxe-textarea,
138
+ & > .vxe-default-textarea {
139
+ height: 100%;
140
+ }
141
+ }
142
+ }
143
+ .vxe-cell--label {
144
+ &.is--textarea {
145
+ white-space: pre-line;
146
+ }
147
+ }
148
+ }
133
149
 
134
150
  .vxe-table--checkbox-range,
135
151
  .vxe-table--cell-main-area,
@@ -678,15 +694,25 @@
678
694
  }
679
695
  }
680
696
  }
697
+ &.is--padding {
698
+ .vxe-body--column {
699
+ &:not(.col--ellipsis) {
700
+ padding: var(--vxe-ui-table-column-padding-default);
701
+ }
702
+ }
703
+ }
704
+ .vxe-header--column,
705
+ .vxe-footer--column {
706
+ &:not(.col--ellipsis) {
707
+ padding: var(--vxe-ui-table-column-padding-default);
708
+ }
709
+ }
681
710
  .vxe-header--column,
682
711
  .vxe-body--column,
683
712
  .vxe-footer--column {
684
713
  position: relative;
685
714
  line-height: var(--vxe-ui-table-row-line-height);
686
715
  text-align: left;
687
- &:not(.col--ellipsis) {
688
- padding: var(--vxe-ui-table-column-padding-default);
689
- }
690
716
  &.col--current {
691
717
  background-color: var(--vxe-ui-table-column-current-background-color);
692
718
  // .vxe-tree--btn-wrapper {
@@ -731,6 +757,27 @@
731
757
  .vxe-table--footer-wrapper {
732
758
  border-top: var(--vxe-ui-table-border-width) solid var(--vxe-ui-table-border-color);
733
759
  }
760
+ // &.border--default,
761
+ // &.border--full,
762
+ // &.border--inner,
763
+ // &.border--outer {
764
+ // .vxe-body--row {
765
+ // &:last-child {
766
+ // & > .vxe-body--column {
767
+ // & > .vxe-cell {
768
+ // border-bottom: 1px solid transparent;
769
+ // }
770
+ // }
771
+ // }
772
+ // }
773
+ // .vxe-body--column {
774
+ // &:first-child {
775
+ // & > .vxe-cell {
776
+ // border-left: 1px solid transparent;
777
+ // }
778
+ // }
779
+ // }
780
+ // }
734
781
  &.border--default,
735
782
  &.border--full,
736
783
  &.border--outer {
@@ -883,11 +930,16 @@
883
930
  }
884
931
  }
885
932
  }
933
+
934
+ &.is--padding {
935
+ .vxe-cell {
936
+ padding-left: var(--vxe-ui-table-cell-padding-left);
937
+ padding-right: var(--vxe-ui-table-cell-padding-right);
938
+ }
939
+ }
886
940
  .vxe-cell {
887
941
  white-space: pre-line;
888
942
  word-break: break-all;
889
- padding-left: var(--vxe-ui-table-cell-padding-left);
890
- padding-right: var(--vxe-ui-table-cell-padding-right);
891
943
  }
892
944
 
893
945
  // 单元格占位符
@@ -1146,6 +1198,7 @@
1146
1198
  }
1147
1199
  }
1148
1200
 
1201
+
1149
1202
  /*溢出列*/
1150
1203
  .vxe-header--column,
1151
1204
  .vxe-body--column,
@@ -1159,8 +1212,10 @@
1159
1212
  white-space: nowrap;
1160
1213
  }
1161
1214
  }
1162
- & > .vxe-cell {
1163
- max-height: var(--vxe-ui-table-row-height-default);
1215
+ &:not(.col--height) {
1216
+ & > .vxe-cell {
1217
+ max-height: var(--vxe-ui-table-row-height-default);
1218
+ }
1164
1219
  }
1165
1220
  }
1166
1221
  }
@@ -1170,8 +1225,10 @@
1170
1225
  .vxe-footer--column {
1171
1226
  &.col--ellipsis {
1172
1227
  @extend %MediumColumnHeight;
1173
- & > .vxe-cell {
1174
- max-height: var(--vxe-ui-table-row-height-medium);
1228
+ &:not(.col--height) {
1229
+ & > .vxe-cell {
1230
+ max-height: var(--vxe-ui-table-row-height-medium);
1231
+ }
1175
1232
  }
1176
1233
  }
1177
1234
  }
@@ -1188,8 +1245,10 @@
1188
1245
  .vxe-footer--column {
1189
1246
  &.col--ellipsis {
1190
1247
  @extend %SmallColumnHeight;
1191
- & > .vxe-cell {
1192
- max-height: var(--vxe-ui-table-row-height-small);
1248
+ &:not(.col--height) {
1249
+ & > .vxe-cell {
1250
+ max-height: var(--vxe-ui-table-row-height-small);
1251
+ }
1193
1252
  }
1194
1253
  }
1195
1254
  }
@@ -1206,8 +1265,10 @@
1206
1265
  .vxe-footer--column {
1207
1266
  &.col--ellipsis {
1208
1267
  @extend %MiniColumnHeight;
1209
- & > .vxe-cell {
1210
- max-height: var(--vxe-ui-table-row-height-mini);
1268
+ &:not(.col--height) {
1269
+ & > .vxe-cell {
1270
+ max-height: var(--vxe-ui-table-row-height-mini);
1271
+ }
1211
1272
  }
1212
1273
  }
1213
1274
  }