vxe-table
Version:
A PC-end table component based on Vxe UI, supporting copy-paste, data pivot table, and high-performance virtual list table solution.
640 lines (639 loc) • 30.5 kB
JavaScript
;
var __create = Object.create;
var __defProp = Object.defineProperty;
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
var __getOwnPropNames = Object.getOwnPropertyNames;
var __getProtoOf = Object.getPrototypeOf;
var __hasOwnProp = Object.prototype.hasOwnProperty;
var __export = (target, all) => {
for (var name in all)
__defProp(target, name, { get: all[name], enumerable: true });
};
var __copyProps = (to, from, except, desc) => {
if (from && typeof from === "object" || typeof from === "function") {
for (let key of __getOwnPropNames(from))
if (!__hasOwnProp.call(to, key) && key !== except)
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
}
return to;
};
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
// If the importer is in node compatibility mode or this is not an ESM
// file that has been converted to a CommonJS file using a Babel-
// compatible transform (i.e. "__esModule" has not been set), then set
// "default" to the CommonJS "module.exports" for node compatibility.
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
mod
));
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
var header_exports = {};
__export(header_exports, {
default: () => header_default
});
module.exports = __toCommonJS(header_exports);
var import_vue = require("vue");
var import_comp = require("../../ui/src/comp");
var import_xe_utils = __toESM(require("xe-utils"));
var import_core = require("@vxe-ui/core");
var import_utils = require("../../ui/src/utils");
var import_util = require("./util");
var import_vn = require("../../ui/src/vn");
const { renderer, renderEmptyElement } = import_core.VxeUI;
const sourceType = "table";
const renderType = "header";
var header_default = (
/* define-vxe-component start */
(0, import_comp.defineVxeComponent)({
name: "VxeTableHeader",
props: {
tableData: Array,
tableColumn: Array,
tableGroupColumn: Array,
fixedColumn: Array,
fixedType: {
type: String,
default: null
}
},
setup(props) {
const $xeTable = (0, import_vue.inject)("$xeTable", {});
const { xID, props: tableProps, reactData: tableReactData, internalData: tableInternalData } = $xeTable;
const { computeColumnOpts, computeColumnDragOpts, computeCellOpts, computeMouseOpts, computeHeaderCellOpts, computeDefaultRowHeight, computeVirtualXOpts, computeFloatingFilterOpts, computeIsHeaderRenderOptimize, computeHeaderTooltipOpts, computeRendererOpts, computeIsAllCheckboxDisabled } = $xeTable.getComputeMaps();
const headerColumn = (0, import_vue.ref)([]);
const refElem = (0, import_vue.ref)();
const refHeaderScroll = (0, import_vue.ref)();
const refHeaderTable = (0, import_vue.ref)();
const refHeaderColgroup = (0, import_vue.ref)();
const refHeaderTHead = (0, import_vue.ref)();
const refHeaderXSpace = (0, import_vue.ref)();
const refHeaderBorderRepair = (0, import_vue.ref)();
const uploadColumn = () => {
const { showCustomHeader } = tableProps;
const { collectColumn, visibleColumn } = tableInternalData;
const { tableGroupColumn } = props;
const { isGroup } = tableReactData;
let spanColumns = isGroup ? (0, import_util.convertHeaderColumnToRows)(tableGroupColumn) : [];
let visibleColgroups = [];
if (showCustomHeader && spanColumns.length > 1) {
visibleColgroups = (0, import_util.convertHeaderToGridRows)(spanColumns);
spanColumns = visibleColgroups;
}
headerColumn.value = spanColumns;
(0, import_vue.nextTick)(() => {
$xeTable.dispatchEvent("columns-change", { visibleColgroups, collectColumn, visibleColumn }, null);
});
};
const renderRows = (isGroup, isOptimizeMode, headerGroups, _rowIndex, cols) => {
const $xeGrid = $xeTable.xeGrid;
const $xeGantt = $xeTable.xeGantt;
const { fixedType } = props;
const { resizable: allResizable, columnKey, showCustomHeader, headerCellClassName, headerCellStyle, showHeaderOverflow: allColumnHeaderOverflow, headerAlign: allHeaderAlign, align: allAlign, mouseConfig } = tableProps;
const { dragCol, scrollXLoad, scrollYLoad, overflowX, mergeHeadFlag, tableColumn, currColFlag, isAllSelected: isAllCheckboxSelected, isIndeterminate: isAllCheckboxIndeterminate } = tableReactData;
const { fullColumnIdData, scrollXStore, mergeHeaderList, mergeHeaderCellMaps, currentCol } = tableInternalData;
const virtualXOpts = computeVirtualXOpts.value;
const columnOpts = computeColumnOpts.value;
const columnDragOpts = computeColumnDragOpts.value;
const headerTooltipOpts = computeHeaderTooltipOpts.value;
const cellOpts = computeCellOpts.value;
const defaultRowHeight = computeDefaultRowHeight.value;
const headerCellOpts = computeHeaderCellOpts.value;
const rendererOpts = computeRendererOpts.value;
const mouseOpts = computeMouseOpts.value;
const currCellHeight = (0, import_util.getCalcHeight)(headerCellOpts.height) || defaultRowHeight;
const isAllCheckboxDisabled = computeIsAllCheckboxDisabled.value;
const { disabledMethod: dragDisabledMethod, isCrossDrag, isPeerDrag } = columnDragOpts;
const isLastRow = _rowIndex === headerGroups.length - 1;
return cols.map((column, $columnIndex) => {
const { type, showHeaderOverflow, headerAlign, align, filters, headerClassName, editRender, cellRender } = column;
const colid = column.id;
const colRest = fullColumnIdData[colid] || {};
const renderOpts = editRender || cellRender;
const compConf = renderOpts && renderOpts.name ? rendererOpts[renderOpts.name] || renderer.get(renderOpts.name) : null;
const isColGroup = column.children && column.children.length;
const fixedHiddenColumn = overflowX && !isColGroup && (fixedType ? column.fixed !== fixedType : !!column.fixed);
const cellPadding = (0, import_utils.getDefaultConfig)(headerCellOpts.padding, cellOpts.padding);
const isAllCellPadding = cellPadding === true;
const isCellPaddingTop = cellPadding ? isAllCellPadding || cellPadding.top !== false : false;
const isCellPaddingBottom = cellPadding ? isAllCellPadding || cellPadding.bottom !== false : false;
const isCellPaddingLeft = cellPadding ? isAllCellPadding || cellPadding.left !== false : false;
const isCellPaddingRight = cellPadding ? isAllCellPadding || cellPadding.right !== false : false;
const headOverflow = (0, import_utils.getDefaultConfig)(showHeaderOverflow, allColumnHeaderOverflow);
const headAlign = headerAlign || (compConf ? compConf.tableHeaderCellAlign : "") || allHeaderAlign || align || (compConf ? compConf.tableCellAlign : "") || allAlign;
const showEllipsis = (headOverflow === true ? headerTooltipOpts.mode : headOverflow) === "ellipsis";
const showTitle = (headOverflow === true ? headerTooltipOpts.mode : headOverflow) === "title";
const showTooltip = (headOverflow === true ? headerTooltipOpts.mode : headOverflow) === "tooltip";
const hasEllipsis = showTitle || showTooltip || showEllipsis;
let hasFilter = false;
let firstFilterOption = null;
if (filters) {
firstFilterOption = filters[0];
hasFilter = filters.some((item) => item.checked);
}
const columnIndex = colRest.index;
const _columnIndex = colRest._index;
const cellParams = {
$table: $xeTable,
$grid: $xeGrid,
$gantt: $xeGantt,
rowIndex: _rowIndex,
_rowIndex,
$rowIndex: _rowIndex,
column,
columnIndex,
$columnIndex,
_columnIndex,
firstFilterOption,
fixed: fixedType,
// 复选框勾选状态
checked: isAllCheckboxSelected,
disabled: isAllCheckboxDisabled,
indeterminate: isAllCheckboxIndeterminate,
source: sourceType,
type: renderType,
isHidden: fixedHiddenColumn,
hasFilter
};
const thAttrs = {
colid
};
let isMergeCell = false;
if (!showCustomHeader) {
thAttrs.colspan = column.colSpan > 1 ? column.colSpan : null;
thAttrs.rowspan = column.rowSpan > 1 ? column.rowSpan : null;
}
if (mergeHeadFlag && mergeHeaderList.length && (showCustomHeader || isLastRow)) {
const spanRest = mergeHeaderCellMaps[`${_rowIndex}:${showCustomHeader ? $columnIndex : _columnIndex}`];
if (spanRest) {
const { rowspan, colspan } = spanRest;
if (!rowspan || !colspan) {
return null;
}
if (rowspan > 1) {
isMergeCell = true;
thAttrs.rowspan = rowspan;
}
if (colspan > 1) {
isMergeCell = true;
thAttrs.colspan = colspan;
}
}
}
const thOns = {
onClick: (evnt) => $xeTable.triggerHeaderCellClickEvent(evnt, cellParams),
onDblclick: (evnt) => $xeTable.triggerHeaderCellDblclickEvent(evnt, cellParams)
};
const isColDragCell = columnOpts.drag && columnDragOpts.trigger === "cell";
let isDisabledDrag = false;
if (isColDragCell) {
isDisabledDrag = !!(dragDisabledMethod && dragDisabledMethod(cellParams));
}
if ((0, import_utils.hasEnableConf)(mouseConfig, mouseOpts) || isColDragCell) {
thOns.onMousedown = (evnt) => $xeTable.triggerHeaderCellMousedownEvent(evnt, cellParams);
}
if (columnOpts.drag) {
thOns.onDragstart = $xeTable.handleHeaderCellDragDragstartEvent;
thOns.onDragend = $xeTable.handleHeaderCellDragDragendEvent;
thOns.onDragover = $xeTable.handleHeaderCellDragDragoverEvent;
if (isColDragCell) {
thOns.onMouseup = $xeTable.handleHeaderCellDragMouseupEvent;
}
}
const isLastColumn = $columnIndex === cols.length - 1;
const showResizable = import_xe_utils.default.isBoolean(column.resizable) ? column.resizable : columnOpts.resizable || allResizable;
const isAutoCellWidth = !column.resizeWidth && (column.minWidth === "auto" || column.width === "auto");
let isVNPreEmptyStatus = false;
if (isOptimizeMode && overflowX && !isGroup && !isMergeCell) {
if (!dragCol || dragCol.id !== colid) {
if (scrollXLoad && tableColumn.length > 10 && !column.fixed && !virtualXOpts.immediate && (_columnIndex < scrollXStore.visibleStartIndex - scrollXStore.preloadSize || _columnIndex > scrollXStore.visibleEndIndex + scrollXStore.preloadSize)) {
isVNPreEmptyStatus = true;
}
}
}
const tcStyle = {};
if (hasEllipsis) {
tcStyle.height = `${currCellHeight}px`;
} else {
tcStyle.minHeight = `${currCellHeight}px`;
}
if (showCustomHeader) {
} else if (isColGroup && !isLastRow) {
let childWidth = 0;
import_xe_utils.default.eachTree(column.children, (childRow) => {
if (childRow.visible && (!childRow.children || !childRow.children.length)) {
childWidth += childRow.renderWidth;
}
});
tcStyle.width = `${childWidth}px`;
}
return (0, import_vue.h)(
"th",
{
class: [
"vxe-table--column vxe-header--column",
colid,
fixedHiddenColumn ? "fixed--hidden" : "fixed--visible",
{
[`col--${headAlign}`]: headAlign,
[`col--${type}`]: type,
"col--last": isLastColumn,
"col--fixed": column.fixed,
"col--group": isColGroup,
"col--ellipsis": hasEllipsis,
"fixed--width": !isAutoCellWidth,
"is--pg-top": isCellPaddingTop,
"is--pg-bottom": isCellPaddingBottom,
"is--pg-left": isCellPaddingLeft,
"is--pg-right": isCellPaddingRight,
"is--sortable": column.sortable,
"col--filter": !!filters,
"is--filter-active": hasFilter,
"is--drag-active": columnOpts.drag && !column.fixed && !isDisabledDrag && (isCrossDrag || isPeerDrag || !column.parentId),
"is--drag-disabled": columnOpts.drag && isDisabledDrag,
"col--current": currColFlag && currentCol === column
},
headerClassName ? import_xe_utils.default.isFunction(headerClassName) ? headerClassName(cellParams) : headerClassName : "",
headerCellClassName ? import_xe_utils.default.isFunction(headerCellClassName) ? headerCellClassName(cellParams) : headerCellClassName : ""
],
style: headerCellStyle ? import_xe_utils.default.isFunction(headerCellStyle) ? headerCellStyle(cellParams) : headerCellStyle : null,
...thAttrs,
...thOns,
key: showCustomHeader ? `${colid}${$columnIndex}` : columnKey || scrollXLoad || scrollYLoad || columnOpts.useKey || columnOpts.drag || isColGroup ? colid : $columnIndex
},
[
(0, import_vue.h)(
"div",
{
class: [
"vxe-cell",
{
"c--title": showTitle,
"c--tooltip": showTooltip,
"c--ellipsis": showEllipsis
}
],
style: tcStyle
},
isVNPreEmptyStatus || isOptimizeMode && fixedHiddenColumn ? [] : [
(0, import_vue.h)(
"div",
{
colid,
class: "vxe-cell--wrapper vxe-header-cell--wrapper"
},
column.renderHeader(cellParams)
)
]
),
/**
* 列宽拖动
*/
!fixedHiddenColumn && showResizable && (!showCustomHeader || isLastRow) ? (0, import_vue.h)("div", {
class: "vxe-cell--col-resizable",
onMousedown: (evnt) => $xeTable.handleColResizeMousedownEvent(evnt, fixedType, cellParams),
onDblclick: (evnt) => $xeTable.handleColResizeDblclickEvent(evnt, cellParams)
}) : renderEmptyElement($xeTable)
]
);
});
};
const renderFilterRows = (isOptimizeMode, cols) => {
const $xeGrid = $xeTable.xeGrid;
const $xeGantt = $xeTable.xeGantt;
const { fixedType } = props;
const { showHeaderOverflow: allColumnHeaderOverflow, headerAlign: allHeaderAlign, align: allAlign } = tableProps;
const { overflowX, currColFlag } = tableReactData;
const { fullColumnIdData, currentCol } = tableInternalData;
const headerTooltipOpts = computeHeaderTooltipOpts.value;
const cellOpts = computeCellOpts.value;
const defaultRowHeight = computeDefaultRowHeight.value;
const headerCellOpts = computeHeaderCellOpts.value;
const floatingFilterOpts = computeFloatingFilterOpts.value;
const rendererOpts = computeRendererOpts.value;
const { cellClassName } = floatingFilterOpts;
const currCellHeight = (0, import_util.getCalcHeight)(headerCellOpts.height) || defaultRowHeight;
return cols.map((column, $columnIndex) => {
const { type, showHeaderOverflow, headerAlign, align, filters, editRender, cellRender, floatingFilters, filterRender, slots } = column;
const colid = column.id;
const colRest = fullColumnIdData[colid] || {};
const renderOpts = editRender || cellRender;
const flSlot = slots ? slots.floatingFilter || slots["floating-filter"] : null;
const compConf = renderOpts && renderOpts.name ? rendererOpts[renderOpts.name] || renderer.get(renderOpts.name) : null;
const flCompConf = (0, import_utils.isEnableConf)(filterRender) && filterRender.name ? rendererOpts[filterRender.name] || renderer.get(filterRender.name) : null;
const rtFloatingFilter = flCompConf ? flCompConf.renderTableFloatingFilter : null;
const fixedHiddenColumn = overflowX && (fixedType ? column.fixed !== fixedType : !!column.fixed);
const cellPadding = (0, import_utils.getDefaultConfig)(headerCellOpts.padding, cellOpts.padding);
const isAllCellPadding = cellPadding === true;
const isCellPaddingTop = cellPadding ? isAllCellPadding || cellPadding.top !== false : false;
const isCellPaddingBottom = cellPadding ? isAllCellPadding || cellPadding.bottom !== false : false;
const isCellPaddingLeft = cellPadding ? isAllCellPadding || cellPadding.left !== false : false;
const isCellPaddingRight = cellPadding ? isAllCellPadding || cellPadding.right !== false : false;
const headOverflow = import_xe_utils.default.eqNull(showHeaderOverflow) ? allColumnHeaderOverflow : showHeaderOverflow;
const headAlign = headerAlign || (compConf ? compConf.tableHeaderCellAlign : "") || allHeaderAlign || align || (compConf ? compConf.tableCellAlign : "") || allAlign;
const showEllipsis = headOverflow === "ellipsis";
const showTitle = headOverflow === "title";
const showTooltip = headOverflow === true ? headerTooltipOpts.mode === "tooltip" : headOverflow === "tooltip";
const hasEllipsis = showTitle || showTooltip || showEllipsis;
let hasFilter = false;
let firstFilterOption = null;
if (filters) {
firstFilterOption = filters[0];
hasFilter = filters.some((item) => item.checked);
}
const columnIndex = colRest.index;
const _columnIndex = colRest._index;
const cellParams = {
$table: $xeTable,
$grid: $xeGrid,
$gantt: $xeGantt,
column,
columnIndex,
$columnIndex,
_columnIndex,
option: firstFilterOption,
fixed: fixedType,
source: sourceType,
type: renderType,
isHidden: fixedHiddenColumn,
hasFilter
};
const thAttrs = {
colid
};
const isLastColumn = $columnIndex === cols.length - 1;
const isAutoCellWidth = !column.resizeWidth && (column.minWidth === "auto" || column.width === "auto");
const tcStyle = {};
if (hasEllipsis) {
tcStyle.height = `${currCellHeight}px`;
} else {
tcStyle.minHeight = `${currCellHeight}px`;
}
return (0, import_vue.h)(
"th",
{
class: [
"vxe-table--column vxe-header--column is--floating-filters",
colid,
fixedHiddenColumn ? "fixed--hidden" : "fixed--visible",
{
[`col--${headAlign}`]: headAlign,
[`col--${type}`]: type,
"col--last": isLastColumn,
"col--fixed": column.fixed,
"col--ellipsis": hasEllipsis,
"fixed--width": !isAutoCellWidth,
"is--pg-top": isCellPaddingTop,
"is--pg-bottom": isCellPaddingBottom,
"is--pg-left": isCellPaddingLeft,
"is--pg-right": isCellPaddingRight,
"is--sortable": column.sortable,
"col--filter": !!filters,
"is--filter-active": hasFilter,
"col--current": currColFlag && currentCol === column
}
],
key: colid,
...thAttrs
},
[
(0, import_vue.h)(
"div",
{
class: [
"vxe-cell",
"" + (cellClassName || ""),
{
"c--title": showTitle,
"c--tooltip": showTooltip,
"c--ellipsis": showEllipsis
}
],
style: tcStyle
},
isOptimizeMode && fixedHiddenColumn && !floatingFilters ? [] : [
(0, import_vue.h)(
"div",
{
colid,
class: "vxe-cell--wrapper vxe-header-cell--wrapper"
},
flSlot ? $xeTable.callSlot(flSlot, cellParams) : rtFloatingFilter && firstFilterOption ? (0, import_vn.getSlotVNs)(rtFloatingFilter(filterRender, cellParams)) : []
)
]
)
]
);
});
};
const renderHeads = (isGroup, isOptimizeMode, headerGroups, renderColumnList) => {
const { fixedType } = props;
const { headerRowClassName, headerRowStyle } = tableProps;
const floatingFilterOpts = computeFloatingFilterOpts.value;
const isFFEnabled = floatingFilterOpts.enabled;
const isFFTop = floatingFilterOpts.position === "top";
const rowVNs = [];
if (isFFEnabled && isFFTop) {
rowVNs.push(
(0, import_vue.h)("tr", {
key: "fft",
class: ["vxe-header--row is--floating-filters", "" + (floatingFilterOpts.rowClassName || "")]
}, renderFilterRows(isOptimizeMode, renderColumnList))
);
}
headerGroups.forEach((cols, _rowIndex) => {
const params = { $table: $xeTable, rowIndex: _rowIndex, _rowIndex, $rowIndex: _rowIndex, fixed: fixedType, type: renderType };
rowVNs.push(
(0, import_vue.h)("tr", {
key: _rowIndex,
class: ["vxe-header--row", headerRowClassName ? import_xe_utils.default.isFunction(headerRowClassName) ? headerRowClassName(params) : headerRowClassName : ""],
style: headerRowStyle ? import_xe_utils.default.isFunction(headerRowStyle) ? headerRowStyle(params) : headerRowStyle : null
}, renderRows(isGroup, isOptimizeMode, headerGroups, _rowIndex, cols))
);
});
if (isFFEnabled && !isFFTop) {
rowVNs.push(
(0, import_vue.h)("tr", {
key: "ffb",
class: ["vxe-header--row is--floating-filters", "" + (floatingFilterOpts.rowClassName || "")]
}, renderFilterRows(isOptimizeMode, renderColumnList))
);
}
return rowVNs;
};
const renderVN = () => {
const { fixedType, fixedColumn, tableColumn } = props;
const { mouseConfig } = tableProps;
const { isGroup, isColLoading, overflowX, scrollXLoad, dragCol } = tableReactData;
const { visibleColumn, fullColumnIdData } = tableInternalData;
const mouseOpts = computeMouseOpts.value;
const isHeaderRenderOptimize = computeIsHeaderRenderOptimize.value;
let renderHeaderList = headerColumn.value || [];
let renderColumnList = tableColumn;
const isOptimizeMode = isHeaderRenderOptimize;
if (isGroup) {
renderColumnList = visibleColumn;
} else {
if (!isOptimizeMode || !isColLoading && (fixedType || !overflowX)) {
renderColumnList = visibleColumn;
}
if (fixedType) {
if (isOptimizeMode) {
renderColumnList = fixedColumn || [];
}
}
renderHeaderList = [renderColumnList];
}
if (!fixedType && !isGroup) {
if (scrollXLoad && dragCol) {
if (renderColumnList.length > 2) {
const dCowRest = fullColumnIdData[dragCol.id];
if (dCowRest) {
const dcIndex = dCowRest._index;
const firstCol = renderColumnList[0];
const lastCol = renderColumnList[renderColumnList.length - 1];
const firstColRest = fullColumnIdData[firstCol.id];
const lastColRest = fullColumnIdData[lastCol.id];
if (firstColRest && lastColRest) {
const fcIndex = firstColRest._index;
const lcIndex = lastColRest._index;
if (dcIndex < fcIndex) {
renderColumnList = [dragCol].concat(renderColumnList);
renderHeaderList = [[dragCol].concat(renderHeaderList[0])].concat(renderHeaderList.slice(1));
} else if (dcIndex > lcIndex) {
renderColumnList = renderColumnList.concat([dragCol]);
renderHeaderList = [renderHeaderList[0].concat([dragCol])].concat(renderHeaderList.slice(1));
}
}
}
}
}
}
return (0, import_vue.h)(
"div",
{
ref: refElem,
class: ["vxe-table--header-wrapper", fixedType ? `fixed-${fixedType}--wrapper` : "body--wrapper"],
xid: xID
},
[
(0, import_vue.h)(
"div",
{
ref: refHeaderScroll,
class: "vxe-table--header-inner-wrapper",
onScroll(evnt) {
$xeTable.triggerHeaderScrollEvent(evnt, fixedType);
}
},
[
fixedType ? renderEmptyElement($xeTable) : (0, import_vue.h)("div", {
ref: refHeaderXSpace,
class: "vxe-body--x-space"
}),
(0, import_vue.h)(
"table",
{
ref: refHeaderTable,
class: "vxe-table--header",
xid: xID,
cellspacing: 0,
cellpadding: 0,
border: 0,
xvm: isOptimizeMode ? "1" : null
},
[
/**
* 列宽
*/
(0, import_vue.h)(
"colgroup",
{
ref: refHeaderColgroup
},
renderColumnList.map((column, $columnIndex) => {
return (0, import_vue.h)("col", {
name: column.id,
key: $columnIndex,
style: {
width: `${column.renderWidth}px`
}
});
})
),
/**
* 头部
*/
(0, import_vue.h)(
"thead",
{
ref: refHeaderTHead
},
renderHeads(isGroup, isOptimizeMode, renderHeaderList, renderColumnList)
)
]
),
(0, import_utils.hasEnableConf)(mouseConfig, mouseOpts) && mouseOpts.area ? (0, import_vue.h)(
"div",
{
class: "vxe-table--cell-area",
xid: xID
},
[
(0, import_vue.h)("span", {
class: "vxe-table--cell-main-area"
}),
(0, import_vue.h)("span", {
class: "vxe-table--cell-clip-area"
}),
(0, import_vue.h)("span", {
class: "vxe-table--cell-extend-area"
}),
(0, import_vue.h)("span", {
class: "vxe-table--cell-multi-area"
}),
(0, import_vue.h)("span", {
class: "vxe-table--cell-active-area"
}),
(0, import_vue.h)("span", {
class: "vxe-table--cell-col-status-area"
})
]
) : renderEmptyElement($xeTable)
]
)
]
);
};
(0, import_vue.watch)(() => props.tableColumn, uploadColumn);
(0, import_vue.onMounted)(() => {
(0, import_vue.nextTick)(() => {
const { fixedType } = props;
const { internalData } = $xeTable;
const { elemStore } = internalData;
const prefix = `${fixedType || "main"}-header-`;
elemStore[`${prefix}wrapper`] = refElem;
elemStore[`${prefix}scroll`] = refHeaderScroll;
elemStore[`${prefix}table`] = refHeaderTable;
elemStore[`${prefix}colgroup`] = refHeaderColgroup;
elemStore[`${prefix}list`] = refHeaderTHead;
elemStore[`${prefix}xSpace`] = refHeaderXSpace;
elemStore[`${prefix}repair`] = refHeaderBorderRepair;
uploadColumn();
});
});
(0, import_vue.onUnmounted)(() => {
const { fixedType } = props;
const { internalData } = $xeTable;
const { elemStore } = internalData;
const prefix = `${fixedType || "main"}-header-`;
elemStore[`${prefix}wrapper`] = null;
elemStore[`${prefix}scroll`] = null;
elemStore[`${prefix}table`] = null;
elemStore[`${prefix}colgroup`] = null;
elemStore[`${prefix}list`] = null;
elemStore[`${prefix}xSpace`] = null;
elemStore[`${prefix}repair`] = null;
});
return renderVN;
}
})
);