vxe-table 4.8.16 → 4.9.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.
- package/README.en.md +1 -1
- package/README.md +1 -1
- package/README.zh-TW.md +1 -1
- package/es/style.css +1 -1
- package/es/style.min.css +1 -1
- package/es/table/module/custom/hook.js +4 -0
- package/es/table/module/edit/hook.js +46 -34
- package/es/table/module/filter/hook.js +2 -3
- package/es/table/module/keyboard/hook.js +2 -2
- package/es/table/src/body.js +31 -24
- package/es/table/src/cell.js +99 -59
- package/es/table/src/emits.js +3 -0
- package/es/table/src/footer.js +177 -147
- package/es/table/src/header.js +144 -107
- package/es/table/src/props.js +5 -1
- package/es/table/src/table.js +346 -108
- package/es/table/src/util.js +9 -0
- package/es/table/style.css +33 -20
- package/es/table/style.min.css +1 -1
- package/es/ui/index.js +9 -4
- package/es/ui/src/log.js +1 -1
- package/es/vxe-table/style.css +33 -20
- package/es/vxe-table/style.min.css +1 -1
- package/helper/vetur/attributes.json +1 -1
- package/helper/vetur/tags.json +1 -1
- package/lib/index.umd.js +1032 -580
- package/lib/index.umd.min.js +1 -1
- package/lib/style.css +1 -1
- package/lib/style.min.css +1 -1
- package/lib/table/module/custom/hook.js +4 -0
- package/lib/table/module/custom/hook.min.js +1 -1
- package/lib/table/module/edit/hook.js +54 -42
- package/lib/table/module/edit/hook.min.js +1 -1
- package/lib/table/module/filter/hook.js +1 -2
- package/lib/table/module/filter/hook.min.js +1 -1
- package/lib/table/module/keyboard/hook.js +2 -2
- package/lib/table/module/keyboard/hook.min.js +1 -1
- package/lib/table/src/body.js +34 -21
- package/lib/table/src/body.min.js +1 -1
- package/lib/table/src/cell.js +110 -51
- package/lib/table/src/cell.min.js +1 -1
- package/lib/table/src/emits.js +1 -1
- package/lib/table/src/emits.min.js +1 -1
- package/lib/table/src/footer.js +222 -183
- package/lib/table/src/footer.min.js +1 -1
- package/lib/table/src/header.js +188 -150
- package/lib/table/src/header.min.js +1 -1
- package/lib/table/src/props.js +5 -1
- package/lib/table/src/props.min.js +1 -1
- package/lib/table/src/table.js +380 -110
- package/lib/table/src/table.min.js +1 -1
- package/lib/table/src/util.js +10 -0
- package/lib/table/src/util.min.js +1 -1
- package/lib/table/style/style.css +33 -20
- package/lib/table/style/style.min.css +1 -1
- package/lib/ui/index.js +9 -4
- package/lib/ui/index.min.js +1 -1
- package/lib/ui/src/log.js +1 -1
- package/lib/ui/src/log.min.js +1 -1
- package/lib/vxe-table/style/style.css +33 -20
- package/lib/vxe-table/style/style.min.css +1 -1
- package/package.json +3 -3
- package/packages/table/module/custom/hook.ts +4 -0
- package/packages/table/module/edit/hook.ts +47 -34
- package/packages/table/module/filter/hook.ts +2 -3
- package/packages/table/module/keyboard/hook.ts +2 -2
- package/packages/table/src/body.ts +46 -31
- package/packages/table/src/cell.ts +140 -92
- package/packages/table/src/emits.ts +3 -0
- package/packages/table/src/footer.ts +189 -152
- package/packages/table/src/header.ts +157 -116
- package/packages/table/src/props.ts +5 -1
- package/packages/table/src/table.ts +358 -109
- package/packages/table/src/util.ts +10 -0
- package/packages/ui/index.ts +8 -3
- package/styles/components/table.scss +42 -35
- /package/es/{iconfont.1731633504443.ttf → iconfont.1731895336421.ttf} +0 -0
- /package/es/{iconfont.1731633504443.woff → iconfont.1731895336421.woff} +0 -0
- /package/es/{iconfont.1731633504443.woff2 → iconfont.1731895336421.woff2} +0 -0
- /package/lib/{iconfont.1731633504443.ttf → iconfont.1731895336421.ttf} +0 -0
- /package/lib/{iconfont.1731633504443.woff → iconfont.1731895336421.woff} +0 -0
- /package/lib/{iconfont.1731633504443.woff2 → iconfont.1731895336421.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
|
package/packages/ui/index.ts
CHANGED
|
@@ -43,8 +43,11 @@ VxeUI.setConfig({
|
|
|
43
43
|
// trigger: 'default'
|
|
44
44
|
strict: true
|
|
45
45
|
},
|
|
46
|
-
|
|
47
|
-
|
|
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--
|
|
668
|
-
|
|
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--
|
|
1309
|
+
.vxe-table--drag-sort-tip {
|
|
1303
1310
|
display: none;
|
|
1304
1311
|
position: absolute;
|
|
1305
1312
|
top: 0;
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|