vxe-table 4.8.16 → 4.9.1

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 (135) hide show
  1. package/README.en.md +1 -1
  2. package/README.md +1 -1
  3. package/README.zh-TW.md +1 -1
  4. package/es/locale/lang/en-US.js +1 -0
  5. package/es/locale/lang/es-ES.js +1 -0
  6. package/es/locale/lang/hu-HU.js +1 -0
  7. package/es/locale/lang/ja-JP.js +1 -0
  8. package/es/locale/lang/ko-KR.js +1 -0
  9. package/es/locale/lang/pt-BR.js +1 -0
  10. package/es/locale/lang/ru-RU.js +1 -0
  11. package/es/locale/lang/uk-UA.js +1 -0
  12. package/es/locale/lang/vi-VN.js +1 -0
  13. package/es/locale/lang/zh-CHT.js +1 -0
  14. package/es/locale/lang/zh-CN.js +1 -0
  15. package/es/style.css +1 -1
  16. package/es/style.min.css +1 -1
  17. package/es/table/module/custom/hook.js +4 -0
  18. package/es/table/module/edit/hook.js +53 -34
  19. package/es/table/module/filter/hook.js +2 -3
  20. package/es/table/module/keyboard/hook.js +2 -2
  21. package/es/table/src/body.js +31 -24
  22. package/es/table/src/cell.js +99 -59
  23. package/es/table/src/emits.js +3 -0
  24. package/es/table/src/footer.js +177 -147
  25. package/es/table/src/header.js +144 -107
  26. package/es/table/src/props.js +5 -1
  27. package/es/table/src/table.js +346 -108
  28. package/es/table/src/util.js +9 -0
  29. package/es/table/style.css +33 -20
  30. package/es/table/style.min.css +1 -1
  31. package/es/ui/index.js +9 -4
  32. package/es/ui/src/log.js +1 -1
  33. package/es/vxe-table/style.css +33 -20
  34. package/es/vxe-table/style.min.css +1 -1
  35. package/helper/vetur/attributes.json +1 -1
  36. package/helper/vetur/tags.json +1 -1
  37. package/lib/index.umd.js +1035 -573
  38. package/lib/index.umd.min.js +1 -1
  39. package/lib/locale/lang/en-US.js +1 -0
  40. package/lib/locale/lang/en-US.min.js +1 -1
  41. package/lib/locale/lang/en-US.umd.js +1 -0
  42. package/lib/locale/lang/es-ES.js +1 -0
  43. package/lib/locale/lang/es-ES.min.js +1 -1
  44. package/lib/locale/lang/es-ES.umd.js +1 -0
  45. package/lib/locale/lang/hu-HU.js +1 -0
  46. package/lib/locale/lang/hu-HU.min.js +1 -1
  47. package/lib/locale/lang/hu-HU.umd.js +1 -0
  48. package/lib/locale/lang/ja-JP.js +1 -0
  49. package/lib/locale/lang/ja-JP.min.js +1 -1
  50. package/lib/locale/lang/ja-JP.umd.js +1 -0
  51. package/lib/locale/lang/ko-KR.js +1 -0
  52. package/lib/locale/lang/ko-KR.min.js +1 -1
  53. package/lib/locale/lang/ko-KR.umd.js +1 -0
  54. package/lib/locale/lang/pt-BR.js +1 -0
  55. package/lib/locale/lang/pt-BR.min.js +1 -1
  56. package/lib/locale/lang/pt-BR.umd.js +1 -0
  57. package/lib/locale/lang/ru-RU.js +1 -0
  58. package/lib/locale/lang/ru-RU.min.js +1 -1
  59. package/lib/locale/lang/ru-RU.umd.js +1 -0
  60. package/lib/locale/lang/uk-UA.js +1 -0
  61. package/lib/locale/lang/uk-UA.min.js +1 -1
  62. package/lib/locale/lang/uk-UA.umd.js +1 -0
  63. package/lib/locale/lang/vi-VN.js +1 -0
  64. package/lib/locale/lang/vi-VN.min.js +1 -1
  65. package/lib/locale/lang/zh-CHT.js +1 -0
  66. package/lib/locale/lang/zh-CHT.min.js +1 -1
  67. package/lib/locale/lang/zh-CN.js +1 -0
  68. package/lib/locale/lang/zh-CN.min.js +1 -1
  69. package/lib/locale/lang/zh-CN.umd.js +1 -0
  70. package/lib/style.css +1 -1
  71. package/lib/style.min.css +1 -1
  72. package/lib/table/module/custom/hook.js +4 -0
  73. package/lib/table/module/custom/hook.min.js +1 -1
  74. package/lib/table/module/edit/hook.js +63 -42
  75. package/lib/table/module/edit/hook.min.js +1 -1
  76. package/lib/table/module/filter/hook.js +1 -2
  77. package/lib/table/module/filter/hook.min.js +1 -1
  78. package/lib/table/module/keyboard/hook.js +2 -2
  79. package/lib/table/module/keyboard/hook.min.js +1 -1
  80. package/lib/table/src/body.js +34 -21
  81. package/lib/table/src/body.min.js +1 -1
  82. package/lib/table/src/cell.js +110 -51
  83. package/lib/table/src/cell.min.js +1 -1
  84. package/lib/table/src/emits.js +1 -1
  85. package/lib/table/src/emits.min.js +1 -1
  86. package/lib/table/src/footer.js +222 -183
  87. package/lib/table/src/footer.min.js +1 -1
  88. package/lib/table/src/header.js +188 -150
  89. package/lib/table/src/header.min.js +1 -1
  90. package/lib/table/src/props.js +5 -1
  91. package/lib/table/src/props.min.js +1 -1
  92. package/lib/table/src/table.js +380 -110
  93. package/lib/table/src/table.min.js +1 -1
  94. package/lib/table/src/util.js +10 -0
  95. package/lib/table/src/util.min.js +1 -1
  96. package/lib/table/style/style.css +33 -20
  97. package/lib/table/style/style.min.css +1 -1
  98. package/lib/ui/index.js +9 -4
  99. package/lib/ui/index.min.js +1 -1
  100. package/lib/ui/src/log.js +1 -1
  101. package/lib/ui/src/log.min.js +1 -1
  102. package/lib/vxe-table/style/style.css +33 -20
  103. package/lib/vxe-table/style/style.min.css +1 -1
  104. package/package.json +3 -3
  105. package/packages/locale/lang/en-US.ts +1 -0
  106. package/packages/locale/lang/es-ES.ts +1 -0
  107. package/packages/locale/lang/hu-HU.ts +1 -0
  108. package/packages/locale/lang/ja-JP.ts +1 -0
  109. package/packages/locale/lang/ko-KR.ts +1 -0
  110. package/packages/locale/lang/pt-BR.ts +1 -0
  111. package/packages/locale/lang/ru-RU.ts +1 -0
  112. package/packages/locale/lang/uk-UA.ts +1 -0
  113. package/packages/locale/lang/vi-VN.ts +1 -0
  114. package/packages/locale/lang/zh-CHT.ts +1 -0
  115. package/packages/locale/lang/zh-CN.ts +1 -0
  116. package/packages/table/module/custom/hook.ts +4 -0
  117. package/packages/table/module/edit/hook.ts +54 -34
  118. package/packages/table/module/filter/hook.ts +2 -3
  119. package/packages/table/module/keyboard/hook.ts +2 -2
  120. package/packages/table/src/body.ts +46 -31
  121. package/packages/table/src/cell.ts +140 -92
  122. package/packages/table/src/emits.ts +3 -0
  123. package/packages/table/src/footer.ts +189 -152
  124. package/packages/table/src/header.ts +157 -116
  125. package/packages/table/src/props.ts +5 -1
  126. package/packages/table/src/table.ts +358 -109
  127. package/packages/table/src/util.ts +10 -0
  128. package/packages/ui/index.ts +8 -3
  129. package/styles/components/table.scss +42 -35
  130. /package/es/{iconfont.1731633504443.ttf → iconfont.1731937248477.ttf} +0 -0
  131. /package/es/{iconfont.1731633504443.woff → iconfont.1731937248477.woff} +0 -0
  132. /package/es/{iconfont.1731633504443.woff2 → iconfont.1731937248477.woff2} +0 -0
  133. /package/lib/{iconfont.1731633504443.ttf → iconfont.1731937248477.ttf} +0 -0
  134. /package/lib/{iconfont.1731633504443.woff → iconfont.1731937248477.woff} +0 -0
  135. /package/lib/{iconfont.1731633504443.woff2 → iconfont.1731937248477.woff2} +0 -0
@@ -175,6 +175,16 @@ export function setCellValue (row: any, column: VxeTableDefines.ColumnInfo, valu
175
175
  return XEUtils.set(row, column.field, value)
176
176
  }
177
177
 
178
+ export function getRefElem (refEl: any) {
179
+ if (refEl) {
180
+ const rest = refEl.value
181
+ if (rest) {
182
+ return (rest.$el || rest) as HTMLElement
183
+ }
184
+ }
185
+ return null
186
+ }
187
+
178
188
  /**
179
189
  * 列宽拖动最大宽度
180
190
  * @param params
@@ -43,8 +43,11 @@ VxeUI.setConfig({
43
43
  // trigger: 'default'
44
44
  strict: true
45
45
  },
46
- dragConfig: {
47
- showRowIcon: true
46
+ rowDragConfig: {
47
+ showIcon: true
48
+ },
49
+ columnDragConfig: {
50
+ showIcon: true
48
51
  },
49
52
  checkboxConfig: {
50
53
  // trigger: 'default',
@@ -142,7 +145,8 @@ VxeUI.setConfig({
142
145
  },
143
146
  areaConfig: {
144
147
  autoClear: true,
145
- selectCellByHeader: true
148
+ selectCellByHeader: true,
149
+ selectCellByBody: true
146
150
  },
147
151
  clipConfig: {
148
152
  isCopy: true,
@@ -241,6 +245,7 @@ VxeUI.setIcon({
241
245
  TABLE_CUSTOM_SORT: iconPrefix + 'drag-handle',
242
246
  TABLE_MENU_OPTIONS: iconPrefix + 'arrow-right',
243
247
  TABLE_DRAG_ROW: iconPrefix + 'drag-handle',
248
+ TABLE_DRAG_COLUMN: iconPrefix + 'drag-handle',
244
249
 
245
250
  // toolbar
246
251
  TOOLBAR_TOOLS_REFRESH: iconPrefix + 'repeat',
@@ -663,9 +663,13 @@
663
663
  }
664
664
  }
665
665
  }
666
- &.cell--area {
667
- .vxe-table--body-wrapper,
668
- .vxe-body--column {
666
+ &.header-cell--area {
667
+ .vxe-table--header-wrapper {
668
+ user-select: none;
669
+ }
670
+ }
671
+ &.body-cell--area {
672
+ .vxe-table--body-wrapper {
669
673
  user-select: none;
670
674
  }
671
675
  }
@@ -1077,6 +1081,7 @@
1077
1081
  width: 1px;
1078
1082
  height: 100%;
1079
1083
  z-index: 9;
1084
+ pointer-events: none;
1080
1085
  cursor: col-resize;
1081
1086
  &:before {
1082
1087
  content: "";
@@ -1237,7 +1242,32 @@
1237
1242
  }
1238
1243
  }
1239
1244
 
1240
- /*拖拽行*/
1245
+ /*拖拽列*/
1246
+ .vxe-table--drag-col-line {
1247
+ height: 100%;
1248
+ width: 1px;
1249
+ background-color: var(--vxe-ui-font-primary-color);
1250
+ }
1251
+ .vxe-header--column {
1252
+ &.col--drag-origin {
1253
+ & > .vxe-cell {
1254
+ opacity: 0.5;
1255
+ }
1256
+ }
1257
+ }
1258
+ .vxe-header--col-list-move {
1259
+ transition: transform 0.35s;
1260
+ }
1261
+
1262
+ .vxe-table--drag-col-line,
1263
+ .vxe-table--drag-row-line {
1264
+ display: none;
1265
+ position: absolute;
1266
+ top: 0;
1267
+ left: 0;
1268
+ z-index: 9;
1269
+ pointer-events: none;
1270
+ }
1241
1271
  .vxe-cell--drag-handle {
1242
1272
  user-select: none;
1243
1273
  & + span {
@@ -1257,6 +1287,13 @@
1257
1287
  cursor: not-allowed;
1258
1288
  }
1259
1289
  }
1290
+
1291
+ /*拖拽行*/
1292
+ .vxe-table--drag-row-line {
1293
+ width: 100%;
1294
+ height: 1px;
1295
+ background-color: var(--vxe-ui-font-primary-color);
1296
+ }
1260
1297
  .vxe-body--row {
1261
1298
  &.row--drag-origin {
1262
1299
  & > .vxe-body--column {
@@ -1265,41 +1302,11 @@
1265
1302
  }
1266
1303
  }
1267
1304
  }
1268
- &.row--drag-active-target {
1269
- & > .vxe-body--column {
1270
- &::after {
1271
- display: none;
1272
- content: "";
1273
- position: absolute;
1274
- left: 0;
1275
- width: 100%;
1276
- height: 2px;
1277
- background-color: var(--vxe-ui-font-primary-color);
1278
- z-index: 12;
1279
- }
1280
- }
1281
- &[drag-pos="top"] {
1282
- & > .vxe-body--column {
1283
- &::after {
1284
- display: block;
1285
- top: 0;
1286
- }
1287
- }
1288
- }
1289
- &[drag-pos="bottom"] {
1290
- & > .vxe-body--column {
1291
- &::after {
1292
- display: block;
1293
- bottom: 0;
1294
- }
1295
- }
1296
- }
1297
- }
1298
1305
  }
1299
1306
  .vxe-body--row-list-move {
1300
1307
  transition: transform 0.35s;
1301
1308
  }
1302
- .vxe-table--row-drag-tip {
1309
+ .vxe-table--drag-sort-tip {
1303
1310
  display: none;
1304
1311
  position: absolute;
1305
1312
  top: 0;