没有设置列时自动补一个

This commit is contained in:
liaoxuezhi 2019-12-03 18:09:35 +08:00
parent 549fb12d9e
commit 6f9a52f529

View File

@ -501,6 +501,12 @@ export const TableStore = iRendererStore
if (config.columns && Array.isArray(config.columns)) {
let columns: Array<SColumn> = config.columns.concat();
if (!columns.length) {
columns.push({
type: 'text',
label: '空'
});
}
columns.unshift({
type: '__expandme',