This commit is contained in:
lb
2023-09-18 17:01:44 +08:00
parent c364162a2a
commit c965dfbc5a
4 changed files with 243 additions and 17 deletions

View File

@@ -1,3 +1,5 @@
import moment from 'moment';
/**
* 用于动态表结构的 tableProps 生成
* @param {*} nameData
@@ -16,9 +18,9 @@ export function handleNameData(nameData) {
function step1(tree1) {
return Array.from(new Set(tree1.map((item) => item.name)))
.sort()
.map((item) => ({
prop: item,
label: item,
.map((time) => ({
prop: time,
label: moment(time).format('YYYY-MM-DD HH:mm:ss'),
children: [],
}));
}