vxe-table 3.15.22 → 3.15.24
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/es/index.css +1 -1
- package/es/index.min.css +1 -1
- package/es/style.css +1 -1
- package/es/style.min.css +1 -1
- package/es/table/src/cell.js +21 -7
- package/es/table/src/util.js +12 -15
- package/es/table/style.css +15 -6
- package/es/table/style.min.css +1 -1
- package/es/ui/index.js +1 -1
- package/es/ui/src/dom.js +6 -0
- package/es/ui/src/log.js +1 -1
- package/es/vxe-table/style.css +15 -6
- 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.css +1 -1
- package/lib/index.min.css +1 -1
- package/lib/index.umd.js +32 -23
- package/lib/index.umd.min.js +1 -1
- package/lib/style.css +1 -1
- package/lib/style.min.css +1 -1
- package/lib/table/src/cell.js +13 -7
- package/lib/table/src/cell.min.js +1 -1
- package/lib/table/src/util.js +11 -14
- package/lib/table/src/util.min.js +1 -1
- package/lib/table/style/style.css +15 -6
- package/lib/table/style/style.min.css +1 -1
- package/lib/ui/index.js +1 -1
- package/lib/ui/index.min.js +1 -1
- package/lib/ui/src/dom.js +7 -0
- package/lib/ui/src/dom.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 +15 -6
- package/lib/vxe-table/style/style.min.css +1 -1
- package/package.json +1 -1
- package/packages/table/src/cell.ts +21 -7
- package/packages/table/src/util.ts +12 -16
- package/packages/ui/src/dom.ts +7 -0
- package/styles/components/table.scss +23 -15
- /package/es/{iconfont.1746836465256.ttf → iconfont.1746864347026.ttf} +0 -0
- /package/es/{iconfont.1746836465256.woff → iconfont.1746864347026.woff} +0 -0
- /package/es/{iconfont.1746836465256.woff2 → iconfont.1746864347026.woff2} +0 -0
- /package/lib/{iconfont.1746836465256.ttf → iconfont.1746864347026.ttf} +0 -0
- /package/lib/{iconfont.1746836465256.woff → iconfont.1746864347026.woff} +0 -0
- /package/lib/{iconfont.1746836465256.woff2 → iconfont.1746864347026.woff2} +0 -0
package/es/table/src/cell.js
CHANGED
|
@@ -10,7 +10,7 @@ function renderTitlePrefixIcon(h, params) {
|
|
|
10
10
|
const titlePrefix = column.titlePrefix || column.titleHelp;
|
|
11
11
|
if (titlePrefix) {
|
|
12
12
|
return h('i', {
|
|
13
|
-
class: ['vxe-cell-title-prefix-icon', titlePrefix.iconStatus ? `theme--${titlePrefix.iconStatus}` : ''
|
|
13
|
+
class: ['vxe-cell-title-prefix-icon', titlePrefix.iconStatus ? `theme--${titlePrefix.iconStatus}` : ''],
|
|
14
14
|
on: {
|
|
15
15
|
mouseenter(evnt) {
|
|
16
16
|
$table.triggerHeaderTitleEvent(evnt, titlePrefix, params);
|
|
@@ -19,7 +19,11 @@ function renderTitlePrefixIcon(h, params) {
|
|
|
19
19
|
$table.handleTargetLeaveEvent(evnt);
|
|
20
20
|
}
|
|
21
21
|
}
|
|
22
|
-
}
|
|
22
|
+
}, [
|
|
23
|
+
h('i', {
|
|
24
|
+
class: titlePrefix.icon || getIcon().TABLE_TITLE_PREFIX
|
|
25
|
+
})
|
|
26
|
+
]);
|
|
23
27
|
}
|
|
24
28
|
return renderEmptyElement($table);
|
|
25
29
|
}
|
|
@@ -28,7 +32,7 @@ function renderTitleSuffixIcon(h, params) {
|
|
|
28
32
|
const titleSuffix = column.titleSuffix;
|
|
29
33
|
if (titleSuffix) {
|
|
30
34
|
return h('i', {
|
|
31
|
-
class: ['vxe-cell-title-suffix-icon', titleSuffix.iconStatus ? `theme--${titleSuffix.iconStatus}` : ''
|
|
35
|
+
class: ['vxe-cell-title-suffix-icon', titleSuffix.iconStatus ? `theme--${titleSuffix.iconStatus}` : ''],
|
|
32
36
|
on: {
|
|
33
37
|
mouseenter(evnt) {
|
|
34
38
|
$table.triggerHeaderTitleEvent(evnt, titleSuffix, params);
|
|
@@ -37,7 +41,11 @@ function renderTitleSuffixIcon(h, params) {
|
|
|
37
41
|
$table.handleTargetLeaveEvent(evnt);
|
|
38
42
|
}
|
|
39
43
|
}
|
|
40
|
-
}
|
|
44
|
+
}, [
|
|
45
|
+
h('i', {
|
|
46
|
+
class: titleSuffix.icon || getIcon().TABLE_TITLE_SUFFIX
|
|
47
|
+
})
|
|
48
|
+
]);
|
|
41
49
|
}
|
|
42
50
|
return renderEmptyElement($table);
|
|
43
51
|
}
|
|
@@ -1019,12 +1027,18 @@ export const Cell = {
|
|
|
1019
1027
|
isRequired && editOpts.showAsterisk
|
|
1020
1028
|
? h('i', {
|
|
1021
1029
|
class: 'vxe-cell--required-icon'
|
|
1022
|
-
}
|
|
1030
|
+
}, [
|
|
1031
|
+
h('i', {
|
|
1032
|
+
class: 'vxe-cell--required-icon'
|
|
1033
|
+
})
|
|
1034
|
+
])
|
|
1023
1035
|
: renderEmptyElement($table),
|
|
1024
1036
|
isEnableConf(editRender) && editOpts.showIcon
|
|
1025
1037
|
? h('i', {
|
|
1026
|
-
class:
|
|
1027
|
-
}
|
|
1038
|
+
class: 'vxe-cell--edit-icon'
|
|
1039
|
+
}, [
|
|
1040
|
+
h('i')
|
|
1041
|
+
])
|
|
1028
1042
|
: renderEmptyElement($table)
|
|
1029
1043
|
];
|
|
1030
1044
|
}
|
package/es/table/src/util.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import XEUtils from 'xe-utils';
|
|
2
2
|
import { ColumnInfo } from './columnInfo';
|
|
3
|
-
import { isScale, isPx } from '../../ui/src/dom';
|
|
3
|
+
import { isScale, isPx, queryElement } from '../../ui/src/dom';
|
|
4
4
|
import { warnLog, errLog } from '../../ui/src/log';
|
|
5
5
|
import { eqEmptyValue } from '../../ui/src/utils';
|
|
6
6
|
const getAllConvertColumns = (columns, parentColumn) => {
|
|
@@ -154,7 +154,7 @@ function getPaddingLeftRightSize(elem) {
|
|
|
154
154
|
}
|
|
155
155
|
return 0;
|
|
156
156
|
}
|
|
157
|
-
function
|
|
157
|
+
function getElementMarginAndWidth(elem) {
|
|
158
158
|
if (elem) {
|
|
159
159
|
const computedStyle = getComputedStyle(elem);
|
|
160
160
|
const marginLeft = XEUtils.toNumber(computedStyle.marginLeft);
|
|
@@ -232,9 +232,6 @@ export function getRootColumn($xeTable, column) {
|
|
|
232
232
|
}
|
|
233
233
|
return column;
|
|
234
234
|
}
|
|
235
|
-
function queryCellElement(cell, selector) {
|
|
236
|
-
return cell.querySelector('.vxe-cell' + selector);
|
|
237
|
-
}
|
|
238
235
|
export function toFilters(filters) {
|
|
239
236
|
if (filters && XEUtils.isArray(filters)) {
|
|
240
237
|
return filters.map(({ label, value, data, resetValue, checked }) => {
|
|
@@ -262,19 +259,19 @@ export function getColReMinWidth(params) {
|
|
|
262
259
|
const showTitle = headOverflow === 'title';
|
|
263
260
|
const showTooltip = headOverflow === true || headOverflow === 'tooltip';
|
|
264
261
|
const hasEllipsis = showTitle || showTooltip || showEllipsis;
|
|
265
|
-
const minTitleWidth = XEUtils.floor((XEUtils.toNumber(getComputedStyle(cell).fontSize) || 14) * 1.
|
|
266
|
-
const paddingLeftRight = getPaddingLeftRightSize(cell) + getPaddingLeftRightSize(
|
|
262
|
+
const minTitleWidth = XEUtils.floor((XEUtils.toNumber(getComputedStyle(cell).fontSize) || 14) * 1.8);
|
|
263
|
+
const paddingLeftRight = getPaddingLeftRightSize(cell) + getPaddingLeftRightSize(queryElement(cell, '.vxe-cell'));
|
|
267
264
|
let mWidth = minTitleWidth + paddingLeftRight;
|
|
268
265
|
// 默认最小宽处理
|
|
269
266
|
if (hasEllipsis) {
|
|
270
|
-
const dragIconWidth =
|
|
271
|
-
const checkboxIconWidth =
|
|
272
|
-
const requiredIconWidth =
|
|
273
|
-
const editIconWidth =
|
|
274
|
-
const prefixIconWidth =
|
|
275
|
-
const suffixIconWidth =
|
|
276
|
-
const sortIconWidth =
|
|
277
|
-
const filterIconWidth =
|
|
267
|
+
const dragIconWidth = getElementMarginAndWidth(queryElement(cell, '.vxe-cell--drag-handle'));
|
|
268
|
+
const checkboxIconWidth = getElementMarginAndWidth(queryElement(cell, '.vxe-cell--checkbox'));
|
|
269
|
+
const requiredIconWidth = getElementMarginAndWidth(queryElement(cell, '.vxe-cell--required-icon'));
|
|
270
|
+
const editIconWidth = getElementMarginAndWidth(queryElement(cell, '.vxe-cell--edit-icon'));
|
|
271
|
+
const prefixIconWidth = getElementMarginAndWidth(queryElement(cell, '.vxe-cell-title-prefix-icon'));
|
|
272
|
+
const suffixIconWidth = getElementMarginAndWidth(queryElement(cell, '.vxe-cell-title-suffix-icon'));
|
|
273
|
+
const sortIconWidth = getElementMarginAndWidth(queryElement(cell, '.vxe-cell--sort'));
|
|
274
|
+
const filterIconWidth = getElementMarginAndWidth(queryElement(cell, '.vxe-cell--filter'));
|
|
278
275
|
mWidth += dragIconWidth + checkboxIconWidth + requiredIconWidth + editIconWidth + prefixIconWidth + suffixIconWidth + filterIconWidth + sortIconWidth;
|
|
279
276
|
}
|
|
280
277
|
// 如果设置最小宽
|
package/es/table/style.css
CHANGED
|
@@ -2291,29 +2291,38 @@
|
|
|
2291
2291
|
position: relative;
|
|
2292
2292
|
font-weight: var(--vxe-ui-table-header-font-weight);
|
|
2293
2293
|
}
|
|
2294
|
-
.vxe-header--column.col--ellipsis > .vxe-cell {
|
|
2294
|
+
.vxe-header--column.col--ellipsis > .vxe-cell .vxe-cell--wrapper {
|
|
2295
2295
|
display: flex;
|
|
2296
2296
|
align-items: center;
|
|
2297
2297
|
}
|
|
2298
|
+
.vxe-header--column.col--ellipsis > .vxe-cell .vxe-cell--wrapper .vxe-cell--drag-handle,
|
|
2299
|
+
.vxe-header--column.col--ellipsis > .vxe-cell .vxe-cell--wrapper .vxe-cell--sort,
|
|
2300
|
+
.vxe-header--column.col--ellipsis > .vxe-cell .vxe-cell--wrapper .vxe-cell--filter,
|
|
2301
|
+
.vxe-header--column.col--ellipsis > .vxe-cell .vxe-cell--wrapper .vxe-cell-title-prefix-icon,
|
|
2302
|
+
.vxe-header--column.col--ellipsis > .vxe-cell .vxe-cell--wrapper .vxe-cell-title-suffix-icon,
|
|
2303
|
+
.vxe-header--column.col--ellipsis > .vxe-cell .vxe-cell--wrapper .vxe-cell--checkbox,
|
|
2304
|
+
.vxe-header--column.col--ellipsis > .vxe-cell .vxe-cell--wrapper .vxe-cell-title-suffix-icon,
|
|
2305
|
+
.vxe-header--column.col--ellipsis > .vxe-cell .vxe-cell--wrapper .vxe-cell--required-icon {
|
|
2306
|
+
flex-shrink: 0;
|
|
2307
|
+
}
|
|
2298
2308
|
.vxe-header--column.col--ellipsis > .vxe-cell .vxe-cell--title {
|
|
2299
2309
|
overflow: hidden;
|
|
2300
2310
|
text-overflow: ellipsis;
|
|
2301
2311
|
white-space: nowrap;
|
|
2302
2312
|
}
|
|
2303
|
-
.vxe-header--column.col--ellipsis > .vxe-cell > i:not(.vxe-cell--title), .vxe-header--column.col--ellipsis > .vxe-cell > span:not(.vxe-cell--title) {
|
|
2304
|
-
flex-shrink: 0;
|
|
2305
|
-
}
|
|
2306
2313
|
.vxe-header--column .vxe-cell--required-icon {
|
|
2307
2314
|
display: inline-block;
|
|
2308
2315
|
color: var(--vxe-ui-table-validate-error-color);
|
|
2309
2316
|
width: 0.8em;
|
|
2310
2317
|
height: 1em;
|
|
2311
2318
|
line-height: 1em;
|
|
2319
|
+
position: relative;
|
|
2320
|
+
}
|
|
2321
|
+
.vxe-header--column .vxe-cell--required-icon > i {
|
|
2312
2322
|
font-family: Verdana, Arial, Tahoma;
|
|
2313
2323
|
font-weight: normal;
|
|
2314
|
-
position: relative;
|
|
2315
2324
|
}
|
|
2316
|
-
.vxe-header--column .vxe-cell--required-icon:before {
|
|
2325
|
+
.vxe-header--column .vxe-cell--required-icon > i:before {
|
|
2317
2326
|
content: "*";
|
|
2318
2327
|
position: absolute;
|
|
2319
2328
|
left: 0;
|