Merge pull request '🏂简化Vxe日期时间列显示格式' (#41) from KaneLeung/Admin.NET.Pro:main into main

Reviewed-on: http://101.43.53.74:3000/Admin.NET/Admin.NET.Pro/pulls/41
This commit is contained in:
zuohuaijun 2024-07-12 00:17:55 +08:00
commit 6105272429
2 changed files with 5 additions and 8 deletions

View File

@ -154,11 +154,7 @@
@:<template #row_@(@column.LowerPropertyName)="{ row }">
@:<el-tag :type="dv('@(@column.DictTypeCode)', row.@(@column.LowerPropertyName))?.tagType"> {{dv('@(@column.DictTypeCode)', row.@column.LowerPropertyName)?.name}}</el-tag>
@:</template>
} else if(@column.EffectType == "DatePicker") {
@:<template #row_@(@column.LowerPropertyName)="{ row }">
@:<span>{{ formatDate(new Date(row.@(@column.LowerPropertyName)), 'YYYY-mm-dd HH:MM:SS') }}</span>
@:</template>
}
}
}
}
<template #row_record="{ row }">
@ -303,7 +299,7 @@ const options = useVxeTable<@(@Model.ClassName)>({
} else if(@column.EffectType == "EnumSelector") {
@:{ field: '@column.LowerPropertyName', title: '@column.ColumnComment', minWidth: 100, showOverflow: 'tooltip', slots: { default: 'row_@column.LowerPropertyName' }, @whethersortable },
} else if(@column.EffectType == "DatePicker") {
@:{ field: '@column.LowerPropertyName', title: '@column.ColumnComment', minWidth: 100, showOverflow: 'tooltip', slots: { default: 'row_@column.LowerPropertyName' }, @whethersortable },
@:{ field: '@column.LowerPropertyName', title: '@column.ColumnComment', minWidth: 100, showOverflow: 'tooltip', formatter: ({ cellValue }) => formatDate(new Date(cellValue), 'YYYY-mm-dd HH:MM:SS'), @whethersortable },
} else {
@:{ field: '@column.LowerPropertyName', title: '@column.ColumnComment', minWidth: 100, showOverflow: 'tooltip', @whethersortable},
}

View File

@ -79,8 +79,9 @@ const onColumnsAsideMenuClick = async (v: RouteItem) => {
if (route.path.startsWith(redirect)) mittBus.emit('setSendColumnsChildren', setSendChildren(redirect));
else router.push(redirect);
} else {
if (!v.children) {
if (!v.children || v.children?.length === 0) {
router.push(path);
onColumnsAsideDown(v.k);
} else {
//
const resData: MittMenu = setSendChildren(path);
@ -92,7 +93,7 @@ const onColumnsAsideMenuClick = async (v: RouteItem) => {
//
// https://gitee.com/lyt-top/vue-next-admin/issues/I6HW7H
if (!v.children) themeConfig.value.isCollapse = true;
if (!v.children || v.children?.length === 0) themeConfig.value.isCollapse = true;
else if (v.children.length > 1) themeConfig.value.isCollapse = false;
};
//