vxe-table 4.17.18 → 4.17.20
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/style.css +1 -1
- package/es/table/src/header.js +6 -22
- package/es/ui/index.js +1 -1
- package/es/ui/src/dom.js +2 -2
- package/es/ui/src/log.js +1 -1
- package/lib/index.umd.js +10 -30
- package/lib/index.umd.min.js +1 -1
- package/lib/style.css +1 -1
- package/lib/table/src/header.js +6 -26
- package/lib/table/src/header.min.js +1 -1
- package/lib/ui/index.js +1 -1
- package/lib/ui/index.min.js +1 -1
- package/lib/ui/src/dom.js +2 -2
- 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/package.json +1 -1
- package/packages/table/src/header.ts +6 -24
- package/packages/ui/src/dom.ts +2 -2
- /package/es/{iconfont.1763618883966.ttf → iconfont.1764045862093.ttf} +0 -0
- /package/es/{iconfont.1763618883966.woff → iconfont.1764045862093.woff} +0 -0
- /package/es/{iconfont.1763618883966.woff2 → iconfont.1764045862093.woff2} +0 -0
- /package/lib/{iconfont.1763618883966.ttf → iconfont.1764045862093.ttf} +0 -0
- /package/lib/{iconfont.1763618883966.woff → iconfont.1764045862093.woff} +0 -0
- /package/lib/{iconfont.1763618883966.woff2 → iconfont.1764045862093.woff2} +0 -0
package/es/table/src/header.js
CHANGED
|
@@ -8,20 +8,6 @@ import { getSlotVNs } from '../../ui/src/vn';
|
|
|
8
8
|
const { renderer, renderEmptyElement } = VxeUI;
|
|
9
9
|
const sourceType = 'table';
|
|
10
10
|
const renderType = 'header';
|
|
11
|
-
function getColumnFirstChild(column) {
|
|
12
|
-
const { children } = column;
|
|
13
|
-
if (children && children.length) {
|
|
14
|
-
return getColumnFirstChild(children[0]);
|
|
15
|
-
}
|
|
16
|
-
return column;
|
|
17
|
-
}
|
|
18
|
-
function getColumnLastChild(column) {
|
|
19
|
-
const { children } = column;
|
|
20
|
-
if (children && children.length) {
|
|
21
|
-
return getColumnLastChild(children[children.length - 1]);
|
|
22
|
-
}
|
|
23
|
-
return column;
|
|
24
|
-
}
|
|
25
11
|
export default defineVxeComponent({
|
|
26
12
|
name: 'VxeTableHeader',
|
|
27
13
|
props: {
|
|
@@ -185,15 +171,13 @@ export default defineVxeComponent({
|
|
|
185
171
|
// custom
|
|
186
172
|
}
|
|
187
173
|
else if (isColGroup && !isLastRow) {
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
const lastColRest = fullColumnIdData[lastCol.id];
|
|
193
|
-
if (firstColRest && lastColRest) {
|
|
194
|
-
tcStyle.width = `${lastColRest.oLeft - firstColRest.oLeft + lastCol.renderWidth}px`;
|
|
174
|
+
let childWidth = 0;
|
|
175
|
+
XEUtils.eachTree(column.children, (childRow) => {
|
|
176
|
+
if (childRow.visible && (!childRow.children || !childRow.children.length)) {
|
|
177
|
+
childWidth += childRow.renderWidth;
|
|
195
178
|
}
|
|
196
|
-
}
|
|
179
|
+
});
|
|
180
|
+
tcStyle.width = `${childWidth}px`;
|
|
197
181
|
}
|
|
198
182
|
return h('th', Object.assign(Object.assign(Object.assign({ class: ['vxe-table--column vxe-header--column', colid, fixedHiddenColumn ? 'fixed--hidden' : 'fixed--visible', {
|
|
199
183
|
[`col--${headAlign}`]: headAlign,
|
package/es/ui/index.js
CHANGED
package/es/ui/src/dom.js
CHANGED
|
@@ -39,10 +39,10 @@ function getNodeOffset(elem, container, rest) {
|
|
|
39
39
|
return rest;
|
|
40
40
|
}
|
|
41
41
|
export function isPx(val) {
|
|
42
|
-
return val && /^\d+(px)?$/.test(val);
|
|
42
|
+
return val && /^\d+(\.\d+)?(px)?$/.test(val);
|
|
43
43
|
}
|
|
44
44
|
export function isScale(val) {
|
|
45
|
-
return val && /^\d
|
|
45
|
+
return val && /^\d+(\.\d+)?%$/.test(val);
|
|
46
46
|
}
|
|
47
47
|
export function hasClass(elem, cls) {
|
|
48
48
|
return !!(elem && elem.className && elem.className.match && elem.className.match(getClsRE(cls)));
|
package/es/ui/src/log.js
CHANGED
package/lib/index.umd.js
CHANGED
|
@@ -3141,7 +3141,7 @@ function eqEmptyValue(cellValue) {
|
|
|
3141
3141
|
;// ./packages/ui/index.ts
|
|
3142
3142
|
|
|
3143
3143
|
|
|
3144
|
-
const version = "4.17.
|
|
3144
|
+
const version = "4.17.20";
|
|
3145
3145
|
core_.VxeUI.version = version;
|
|
3146
3146
|
core_.VxeUI.tableVersion = version;
|
|
3147
3147
|
core_.VxeUI.setConfig({
|
|
@@ -3655,7 +3655,7 @@ var esnext_iterator_some = __webpack_require__(7550);
|
|
|
3655
3655
|
const {
|
|
3656
3656
|
log: log_log
|
|
3657
3657
|
} = core_.VxeUI;
|
|
3658
|
-
const log_version = `table v${"4.17.
|
|
3658
|
+
const log_version = `table v${"4.17.20"}`;
|
|
3659
3659
|
const warnLog = log_log.create('warn', log_version);
|
|
3660
3660
|
const errLog = log_log.create('error', log_version);
|
|
3661
3661
|
;// ./packages/table/src/columnInfo.ts
|
|
@@ -3926,10 +3926,10 @@ function getNodeOffset(elem, container, rest) {
|
|
|
3926
3926
|
return rest;
|
|
3927
3927
|
}
|
|
3928
3928
|
function isPx(val) {
|
|
3929
|
-
return val && /^\d+(px)?$/.test(val);
|
|
3929
|
+
return val && /^\d+(\.\d+)?(px)?$/.test(val);
|
|
3930
3930
|
}
|
|
3931
3931
|
function isScale(val) {
|
|
3932
|
-
return val && /^\d
|
|
3932
|
+
return val && /^\d+(\.\d+)?%$/.test(val);
|
|
3933
3933
|
}
|
|
3934
3934
|
function hasClass(elem, cls) {
|
|
3935
3935
|
return !!(elem && elem.className && elem.className.match && elem.className.match(getClsRE(cls)));
|
|
@@ -8156,24 +8156,6 @@ const {
|
|
|
8156
8156
|
} = core_.VxeUI;
|
|
8157
8157
|
const header_sourceType = 'table';
|
|
8158
8158
|
const header_renderType = 'header';
|
|
8159
|
-
function getColumnFirstChild(column) {
|
|
8160
|
-
const {
|
|
8161
|
-
children
|
|
8162
|
-
} = column;
|
|
8163
|
-
if (children && children.length) {
|
|
8164
|
-
return getColumnFirstChild(children[0]);
|
|
8165
|
-
}
|
|
8166
|
-
return column;
|
|
8167
|
-
}
|
|
8168
|
-
function getColumnLastChild(column) {
|
|
8169
|
-
const {
|
|
8170
|
-
children
|
|
8171
|
-
} = column;
|
|
8172
|
-
if (children && children.length) {
|
|
8173
|
-
return getColumnLastChild(children[children.length - 1]);
|
|
8174
|
-
}
|
|
8175
|
-
return column;
|
|
8176
|
-
}
|
|
8177
8159
|
/* harmony default export */ var header = (defineVxeComponent({
|
|
8178
8160
|
name: 'VxeTableHeader',
|
|
8179
8161
|
props: {
|
|
@@ -8404,15 +8386,13 @@ function getColumnLastChild(column) {
|
|
|
8404
8386
|
if (showCustomHeader) {
|
|
8405
8387
|
// custom
|
|
8406
8388
|
} else if (isColGroup && !isLastRow) {
|
|
8407
|
-
|
|
8408
|
-
|
|
8409
|
-
|
|
8410
|
-
|
|
8411
|
-
const lastColRest = fullColumnIdData[lastCol.id];
|
|
8412
|
-
if (firstColRest && lastColRest) {
|
|
8413
|
-
tcStyle.width = `${lastColRest.oLeft - firstColRest.oLeft + lastCol.renderWidth}px`;
|
|
8389
|
+
let childWidth = 0;
|
|
8390
|
+
external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().eachTree(column.children, childRow => {
|
|
8391
|
+
if (childRow.visible && (!childRow.children || !childRow.children.length)) {
|
|
8392
|
+
childWidth += childRow.renderWidth;
|
|
8414
8393
|
}
|
|
8415
|
-
}
|
|
8394
|
+
});
|
|
8395
|
+
tcStyle.width = `${childWidth}px`;
|
|
8416
8396
|
}
|
|
8417
8397
|
return (0,external_commonjs_vue_commonjs2_vue_root_Vue_.h)('th', {
|
|
8418
8398
|
class: ['vxe-table--column vxe-header--column', colid, fixedHiddenColumn ? 'fixed--hidden' : 'fixed--visible', {
|