vxe-table 3.19.18 → 3.19.19
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.1763613263662.ttf → iconfont.1764033994654.ttf} +0 -0
- /package/es/{iconfont.1763613263662.woff → iconfont.1764033994654.woff} +0 -0
- /package/es/{iconfont.1763613263662.woff2 → iconfont.1764033994654.woff2} +0 -0
- /package/lib/{iconfont.1763613263662.ttf → iconfont.1764033994654.ttf} +0 -0
- /package/lib/{iconfont.1763613263662.woff → iconfont.1764033994654.woff} +0 -0
- /package/lib/{iconfont.1763613263662.woff2 → iconfont.1764033994654.woff2} +0 -0
package/es/table/src/header.js
CHANGED
|
@@ -6,20 +6,6 @@ import { getSlotVNs } from '../../ui/src/vn';
|
|
|
6
6
|
const { renderer, renderEmptyElement } = VxeUI;
|
|
7
7
|
const sourceType = 'table';
|
|
8
8
|
const renderType = 'header';
|
|
9
|
-
function getColumnFirstChild(column) {
|
|
10
|
-
const { children } = column;
|
|
11
|
-
if (children && children.length) {
|
|
12
|
-
return getColumnFirstChild(children[0]);
|
|
13
|
-
}
|
|
14
|
-
return column;
|
|
15
|
-
}
|
|
16
|
-
function getColumnLastChild(column) {
|
|
17
|
-
const { children } = column;
|
|
18
|
-
if (children && children.length) {
|
|
19
|
-
return getColumnLastChild(children[children.length - 1]);
|
|
20
|
-
}
|
|
21
|
-
return column;
|
|
22
|
-
}
|
|
23
9
|
function renderRows(h, _vm, isGroup, isOptimizeMode, headerGroups, $rowIndex, cols) {
|
|
24
10
|
const props = _vm;
|
|
25
11
|
const $xeTable = _vm.$parent;
|
|
@@ -151,15 +137,13 @@ function renderRows(h, _vm, isGroup, isOptimizeMode, headerGroups, $rowIndex, co
|
|
|
151
137
|
// custom
|
|
152
138
|
}
|
|
153
139
|
else if (isColGroup && !isLastRow) {
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
const lastColRest = fullColumnIdData[lastCol.id];
|
|
159
|
-
if (firstColRest && lastColRest) {
|
|
160
|
-
tcStyle.width = `${lastColRest.oLeft - firstColRest.oLeft + lastCol.renderWidth}px`;
|
|
140
|
+
let childWidth = 0;
|
|
141
|
+
XEUtils.eachTree(column.children, (childRow) => {
|
|
142
|
+
if (childRow.visible && (!childRow.children || !childRow.children.length)) {
|
|
143
|
+
childWidth += childRow.renderWidth;
|
|
161
144
|
}
|
|
162
|
-
}
|
|
145
|
+
});
|
|
146
|
+
tcStyle.width = `${childWidth}px`;
|
|
163
147
|
}
|
|
164
148
|
return h('th', {
|
|
165
149
|
class: ['vxe-table--column vxe-header--column', colid, fixedHiddenColumn ? 'fixed--hidden' : 'fixed--visible', {
|
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
|
|
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
|
@@ -2005,7 +2005,7 @@ function getClass(property, params) {
|
|
|
2005
2005
|
;// CONCATENATED MODULE: ./packages/ui/index.ts
|
|
2006
2006
|
|
|
2007
2007
|
|
|
2008
|
-
const version = "3.19.
|
|
2008
|
+
const version = "3.19.19";
|
|
2009
2009
|
core_.VxeUI.version = version;
|
|
2010
2010
|
core_.VxeUI.tableVersion = version;
|
|
2011
2011
|
core_.VxeUI.setConfig({
|
|
@@ -2545,10 +2545,10 @@ function getNodeOffset(elem, container, rest) {
|
|
|
2545
2545
|
return rest;
|
|
2546
2546
|
}
|
|
2547
2547
|
function isPx(val) {
|
|
2548
|
-
return val && /^\d+(px
|
|
2548
|
+
return val && /^\d+(\.\d+)?px?$/.test(val);
|
|
2549
2549
|
}
|
|
2550
2550
|
function isScale(val) {
|
|
2551
|
-
return val && /^\d
|
|
2551
|
+
return val && /^\d+(\.\d+)?%$/.test(val);
|
|
2552
2552
|
}
|
|
2553
2553
|
function hasClass(elem, cls) {
|
|
2554
2554
|
return !!(elem && elem.className && elem.className.match && elem.className.match(getClsRE(cls)));
|
|
@@ -2714,7 +2714,7 @@ function isNodeElement(elem) {
|
|
|
2714
2714
|
const {
|
|
2715
2715
|
log: log_log
|
|
2716
2716
|
} = core_.VxeUI;
|
|
2717
|
-
const log_version = `table v${"3.19.
|
|
2717
|
+
const log_version = `table v${"3.19.19"}`;
|
|
2718
2718
|
const warnLog = log_log.create('warn', log_version);
|
|
2719
2719
|
const errLog = log_log.create('error', log_version);
|
|
2720
2720
|
;// CONCATENATED MODULE: ./packages/table/src/columnInfo.ts
|
|
@@ -7728,24 +7728,6 @@ const {
|
|
|
7728
7728
|
} = core_.VxeUI;
|
|
7729
7729
|
const header_sourceType = 'table';
|
|
7730
7730
|
const header_renderType = 'header';
|
|
7731
|
-
function getColumnFirstChild(column) {
|
|
7732
|
-
const {
|
|
7733
|
-
children
|
|
7734
|
-
} = column;
|
|
7735
|
-
if (children && children.length) {
|
|
7736
|
-
return getColumnFirstChild(children[0]);
|
|
7737
|
-
}
|
|
7738
|
-
return column;
|
|
7739
|
-
}
|
|
7740
|
-
function getColumnLastChild(column) {
|
|
7741
|
-
const {
|
|
7742
|
-
children
|
|
7743
|
-
} = column;
|
|
7744
|
-
if (children && children.length) {
|
|
7745
|
-
return getColumnLastChild(children[children.length - 1]);
|
|
7746
|
-
}
|
|
7747
|
-
return column;
|
|
7748
|
-
}
|
|
7749
7731
|
function header_renderRows(h, _vm, isGroup, isOptimizeMode, headerGroups, $rowIndex, cols) {
|
|
7750
7732
|
const props = _vm;
|
|
7751
7733
|
const $xeTable = _vm.$parent;
|
|
@@ -7916,15 +7898,13 @@ function header_renderRows(h, _vm, isGroup, isOptimizeMode, headerGroups, $rowIn
|
|
|
7916
7898
|
if (showCustomHeader) {
|
|
7917
7899
|
// custom
|
|
7918
7900
|
} else if (isColGroup && !isLastRow) {
|
|
7919
|
-
|
|
7920
|
-
|
|
7921
|
-
|
|
7922
|
-
|
|
7923
|
-
const lastColRest = fullColumnIdData[lastCol.id];
|
|
7924
|
-
if (firstColRest && lastColRest) {
|
|
7925
|
-
tcStyle.width = `${lastColRest.oLeft - firstColRest.oLeft + lastCol.renderWidth}px`;
|
|
7901
|
+
let childWidth = 0;
|
|
7902
|
+
external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().eachTree(column.children, childRow => {
|
|
7903
|
+
if (childRow.visible && (!childRow.children || !childRow.children.length)) {
|
|
7904
|
+
childWidth += childRow.renderWidth;
|
|
7926
7905
|
}
|
|
7927
|
-
}
|
|
7906
|
+
});
|
|
7907
|
+
tcStyle.width = `${childWidth}px`;
|
|
7928
7908
|
}
|
|
7929
7909
|
return h('th', {
|
|
7930
7910
|
class: ['vxe-table--column vxe-header--column', colid, fixedHiddenColumn ? 'fixed--hidden' : 'fixed--visible', {
|