From 2ebcb722152d4266f579b9b63e9614c17a120a4e Mon Sep 17 00:00:00 2001 From: xingyuv Date: Tue, 14 Feb 2023 16:02:01 +0800 Subject: [PATCH] feat: style --- src/views/system/notice/index.vue | 54 +++++++++++++++++++++---------- 1 file changed, 37 insertions(+), 17 deletions(-) diff --git a/src/views/system/notice/index.vue b/src/views/system/notice/index.vue index d8824255..82cbe47a 100644 --- a/src/views/system/notice/index.vue +++ b/src/views/system/notice/index.vue @@ -15,20 +15,22 @@ Query -
+
- +
+ +
@@ -37,6 +39,7 @@ import dayjs from 'dayjs' import { Column, ElPagination, ElTableV2, TableV2FixedDir } from 'element-plus' import * as NoticeApi from '@/api/system/notice' import { XTextButton } from '@/components/XButton' +import { DictTag } from '@/components/DictTag' const { t } = useI18n() // 国际化 const columns: Column[] = [ @@ -57,13 +60,19 @@ const columns: Column[] = [ key: 'type', dataKey: 'type', title: '公告类型', - width: 180 + width: 180, + cellRenderer: ({ cellData: type }) => ( + + ) }, { key: 'status', dataKey: 'status', title: t('common.status'), - width: 180 + width: 180, + cellRenderer: ({ cellData: status }) => ( + + ) }, { key: 'content', @@ -85,15 +94,22 @@ const columns: Column[] = [ key: 'actionbtns', dataKey: 'actionbtns', //需要渲染当前列的数据字段,如{id:9527,name:'Mike'},则填id title: '操作', //显示在单元格表头的文本 - width: 80, //当前列的宽度,必须设置 + width: 160, //当前列的宽度,必须设置 fixed: TableV2FixedDir.RIGHT, //是否固定列 align: 'center', cellRenderer: ({ cellData: id }) => ( - + <> + + + ) } ] @@ -115,6 +131,10 @@ const getList = async () => { tableTotal.value = res.total } +const handleUpdate = (id) => { + console.info(id) +} + const handleDelete = (id) => { console.info(id) }