diff --git a/src/views/content/ad/columns.ts b/src/views/content/ad/columns.ts index 628dcd7..6c65e39 100644 --- a/src/views/content/ad/columns.ts +++ b/src/views/content/ad/columns.ts @@ -47,20 +47,37 @@ export const columns = [ width: 100, render(record) { let typeText = ''; + let color = ''; switch (record.type) { case 1: typeText = '图片'; + color = 'success'; break; case 2: typeText = '文字'; + color = 'primary'; break; case 3: typeText = '视频'; + color = 'warning'; break; default: break; } - return h('span', typeText || '-'); + // return h('span', typeText || '-'); + return h( + NTag, + { + style: { + marginRight: '6px', + }, + bordered: false, + type: color, + }, + { + default: () => typeText, + }, + ); }, }, { @@ -71,6 +88,10 @@ export const columns = [ return h( NTag, { + style: { + marginRight: '6px', + }, + bordered: false, type: record.status == 1 ? 'success' : 'error', }, { diff --git a/src/views/content/adSort/columns.ts b/src/views/content/adSort/columns.ts index 8e03643..520ecb4 100644 --- a/src/views/content/adSort/columns.ts +++ b/src/views/content/adSort/columns.ts @@ -1,4 +1,5 @@ import { h } from 'vue'; +import { NTag } from 'naive-ui'; export const columns = [ { @@ -28,20 +29,37 @@ export const columns = [ width: 100, render(record) { let typeText = ''; + let color = ''; switch (record.type) { case 1: typeText = '网站'; + color = 'success'; break; case 2: typeText = '手机站'; + color = 'primary'; break; case 3: typeText = '移动端'; + color = 'warning'; break; default: break; } - return h('span', typeText || '-'); + // return h('span', typeText || '-'); + return h( + NTag, + { + style: { + marginRight: '6px', + }, + bordered: false, + type: color, + }, + { + default: () => typeText, + }, + ); }, }, { diff --git a/src/views/content/article/columns.ts b/src/views/content/article/columns.ts index e2ba350..53bf131 100644 --- a/src/views/content/article/columns.ts +++ b/src/views/content/article/columns.ts @@ -59,6 +59,10 @@ export const columns = [ return h( NTag, { + style: { + marginRight: '6px', + }, + bordered: false, type: record.status == 1 ? 'error' : 'success', }, { diff --git a/src/views/content/layoutItem/columns.ts b/src/views/content/layoutItem/columns.ts index 9c54447..f68cbb0 100644 --- a/src/views/content/layoutItem/columns.ts +++ b/src/views/content/layoutItem/columns.ts @@ -25,6 +25,21 @@ export const columns = [ title: '推荐类型', key: 'typeText', width: 100, + render(record) { + return h( + NTag, + { + style: { + marginRight: '6px', + }, + bordered: false, + type: 'info', + }, + { + default: () => record.typeText, + }, + ); + }, }, { title: '推荐ID', diff --git a/src/views/content/link/columns.ts b/src/views/content/link/columns.ts index d2cbeb9..d9ccd5d 100644 --- a/src/views/content/link/columns.ts +++ b/src/views/content/link/columns.ts @@ -57,6 +57,10 @@ export const columns = [ return h( NTag, { + style: { + marginRight: '6px', + }, + bordered: false, type: record.status == 1 ? 'success' : 'error', }, { diff --git a/src/views/data/config/columnsItem.ts b/src/views/data/config/columnsItem.ts index 6f1531e..7c6d092 100644 --- a/src/views/data/config/columnsItem.ts +++ b/src/views/data/config/columnsItem.ts @@ -1,5 +1,6 @@ import { h } from 'vue'; import { NTag } from 'naive-ui'; + export const columns = [ { type: 'selection', @@ -91,7 +92,20 @@ export const columns = [ default: break; } - return h('span', typeText || '-'); + // return h('span', typeText || '-'); + return h( + NTag, + { + style: { + marginRight: '6px', + }, + bordered: false, + type: 'info', + }, + { + default: () => typeText, + }, + ); }, }, { @@ -102,6 +116,10 @@ export const columns = [ return h( NTag, { + style: { + marginRight: '6px', + }, + bordered: false, type: record.status == 1 ? 'success' : 'error', }, { diff --git a/src/views/data/message/columns.ts b/src/views/data/message/columns.ts index 446dbe4..61deada 100644 --- a/src/views/data/message/columns.ts +++ b/src/views/data/message/columns.ts @@ -1,4 +1,5 @@ import { h } from 'vue'; +import { NTag } from 'naive-ui'; export const columns = [ { @@ -23,20 +24,37 @@ export const columns = [ width: 100, render(record) { let typeText = ''; + let color = ''; switch (record.type) { case 1: typeText = '系统通知'; + color = 'success'; break; case 2: typeText = '用户私信'; + color = 'primary'; break; case 3: typeText = '代办事项'; + color = 'warning'; break; default: break; } - return h('span', typeText || '-'); + // return h('span', typeText || '-'); + return h( + NTag, + { + style: { + marginRight: '6px', + }, + bordered: false, + type: color, + }, + { + default: () => typeText, + }, + ); }, }, { diff --git a/src/views/data/notice/columns.ts b/src/views/data/notice/columns.ts index b7d14c8..90ae089 100644 --- a/src/views/data/notice/columns.ts +++ b/src/views/data/notice/columns.ts @@ -39,7 +39,11 @@ export const columns = [ return h( NTag, { - type: record.type == 1 ? 'info' : 'success', + style: { + marginRight: '6px', + }, + bordered: false, + type: record.type == 1 ? 'info' : 'warning', }, { default: () => (record.type == 1 ? '通知' : '公告'), @@ -55,6 +59,10 @@ export const columns = [ return h( NTag, { + style: { + marginRight: '6px', + }, + bordered: false, type: record.status == 1 ? 'success' : 'error', }, { diff --git a/src/views/data/param/columns.ts b/src/views/data/param/columns.ts index 5e82602..5f11307 100644 --- a/src/views/data/param/columns.ts +++ b/src/views/data/param/columns.ts @@ -36,6 +36,10 @@ export const columns = [ return h( NTag, { + style: { + marginRight: '6px', + }, + bordered: false, type: record.type == 0 ? 'info' : 'warning', }, { @@ -52,6 +56,10 @@ export const columns = [ return h( NTag, { + style: { + marginRight: '6px', + }, + bordered: false, type: record.status == 1 ? 'success' : 'error', }, { diff --git a/src/views/file/emailTemplate/columns.ts b/src/views/file/emailTemplate/columns.ts index 9c13842..1fde226 100644 --- a/src/views/file/emailTemplate/columns.ts +++ b/src/views/file/emailTemplate/columns.ts @@ -29,20 +29,37 @@ export const columns = [ width: 100, render(record) { let typeText = ''; + let color = ''; switch (record.type) { case 1: typeText = '普通邮件'; + color = 'success'; break; case 2: typeText = '图文邮件'; + color = 'primary'; break; case 3: typeText = '模板文件'; + color = 'warning'; break; default: break; } - return h('span', typeText || '-'); + // return h('span', typeText || '-'); + return h( + NTag, + { + style: { + marginRight: '6px', + }, + bordered: false, + type: color, + }, + { + default: () => typeText, + }, + ); }, }, { diff --git a/src/views/file/messageTemplate/columns.ts b/src/views/file/messageTemplate/columns.ts index 55b81d1..9eb4eeb 100644 --- a/src/views/file/messageTemplate/columns.ts +++ b/src/views/file/messageTemplate/columns.ts @@ -33,20 +33,37 @@ export const columns = [ key: 'type', render(record) { let typeText = ''; + let color = ''; switch (record.type) { case 1: typeText = '系统通知'; + color = 'success'; break; case 2: typeText = '用户私信'; + color = 'primary'; break; case 3: typeText = '代办事项'; + color = 'warning'; break; default: break; } - return h('span', typeText || '-'); + // return h('span', typeText || '-'); + return h( + NTag, + { + style: { + marginRight: '6px', + }, + bordered: false, + type: color, + }, + { + default: () => typeText, + }, + ); }, }, { diff --git a/src/views/logger/fileLog/columns.ts b/src/views/logger/fileLog/columns.ts index b0b768c..037d5b3 100644 --- a/src/views/logger/fileLog/columns.ts +++ b/src/views/logger/fileLog/columns.ts @@ -1,4 +1,6 @@ import { h } from 'vue'; +import { NTag } from 'naive-ui'; + export const columns = [ { type: 'selection', @@ -32,20 +34,37 @@ export const columns = [ width: 100, render(record) { let typeText = ''; + let color = ''; switch (record.type) { case 0: typeText = '单个文件'; + color = 'success'; break; case 1: typeText = '多个文件'; + color = 'primary'; break; case 2: typeText = '其他'; + color = 'warning'; break; default: break; } - return h('span', typeText || '-'); + // return h('span', typeText || '-'); + return h( + NTag, + { + style: { + marginRight: '6px', + }, + bordered: false, + type: color, + }, + { + default: () => typeText, + }, + ); }, }, { diff --git a/src/views/monitor/job/columns.ts b/src/views/monitor/job/columns.ts index 6e9dfb1..771fbb2 100644 --- a/src/views/monitor/job/columns.ts +++ b/src/views/monitor/job/columns.ts @@ -37,6 +37,21 @@ export const columns = [ title: '执行策略', key: 'executePolicyText', width: 100, + render(record) { + return h( + NTag, + { + style: { + marginRight: '6px', + }, + bordered: false, + type: 'info', + }, + { + default: () => record.executePolicyText, + }, + ); + }, }, { title: '同步任务', @@ -46,6 +61,10 @@ export const columns = [ return h( NTag, { + style: { + marginRight: '6px', + }, + bordered: false, type: record.isSync == 1 ? 'success' : 'info', }, { diff --git a/src/views/system/dept/columns.ts b/src/views/system/dept/columns.ts index 09d796f..98059a0 100644 --- a/src/views/system/dept/columns.ts +++ b/src/views/system/dept/columns.ts @@ -38,6 +38,10 @@ export const columns = [ return h( NTag, { + style: { + marginRight: '6px', + }, + bordered: false, type: color, }, { diff --git a/src/views/system/level/columns.ts b/src/views/system/level/columns.ts index d06477c..7189cd3 100644 --- a/src/views/system/level/columns.ts +++ b/src/views/system/level/columns.ts @@ -25,6 +25,10 @@ export const columns = [ return h( NTag, { + style: { + marginRight: '6px', + }, + bordered: false, type: record.status == 1 ? 'success' : 'error', }, { diff --git a/src/views/system/logger/loginLog/columns.ts b/src/views/system/logger/loginLog/columns.ts index 1fef96e..ac77efd 100644 --- a/src/views/system/logger/loginLog/columns.ts +++ b/src/views/system/logger/loginLog/columns.ts @@ -36,6 +36,10 @@ export const columns = [ h( NTag, { + style: { + marginRight: '6px', + }, + bordered: false, type: 'info', }, { @@ -54,6 +58,7 @@ export const columns = [ h( NTag, { + bordered: false, style: { marginBottom: '5px' }, }, { @@ -83,6 +88,7 @@ export const columns = [ { type: record.status == 0 ? 'success' : 'error', style: { marginBottom: '5px' }, + bordered: false, }, { default: () => (record.status == 0 ? '正常' : '异常'), diff --git a/src/views/system/logger/operLog/columns.ts b/src/views/system/logger/operLog/columns.ts index 73b8174..9d8f1e8 100644 --- a/src/views/system/logger/operLog/columns.ts +++ b/src/views/system/logger/operLog/columns.ts @@ -36,6 +36,10 @@ export const columns = [ h( NTag, { + style: { + marginRight: '6px', + }, + bordered: false, type: 'info', }, { @@ -55,6 +59,7 @@ export const columns = [ NTag, { style: { marginBottom: '5px' }, + bordered: false, }, { default: () => record.requestMethod, @@ -83,6 +88,7 @@ export const columns = [ { type: record.status == 0 ? 'success' : 'error', style: { marginBottom: '5px' }, + bordered: false, }, { default: () => (record.status == 0 ? '正常' : '异常'), diff --git a/src/views/system/menu/columns.ts b/src/views/system/menu/columns.ts index 21bf8ba..73d88af 100644 --- a/src/views/system/menu/columns.ts +++ b/src/views/system/menu/columns.ts @@ -22,7 +22,11 @@ export const columns: BasicColumn[] = [ return h( NTag, { + style: { + marginRight: '6px', + }, type: record.type == 1 ? 'success' : 'info', + bordered: false, }, { default: () => (record.type == 1 ? '按钮' : '菜单'), @@ -51,6 +55,10 @@ export const columns: BasicColumn[] = [ return h( NTag, { + style: { + marginRight: '6px', + }, + bordered: false, type: record.status == 0 ? 'info' : 'error', }, { @@ -67,6 +75,10 @@ export const columns: BasicColumn[] = [ return h( NTag, { + style: { + marginRight: '6px', + }, + bordered: false, type: record.hide == 0 ? 'success' : 'error', }, { diff --git a/src/views/system/position/columns.ts b/src/views/system/position/columns.ts index 7583b01..f948fd7 100644 --- a/src/views/system/position/columns.ts +++ b/src/views/system/position/columns.ts @@ -26,6 +26,10 @@ export const columns = [ return h( NTag, { + style: { + marginRight: '6px', + }, + bordered: false, type: record.status == 1 ? 'success' : 'error', }, { diff --git a/src/views/system/user/columns.ts b/src/views/system/user/columns.ts index 9cea520..ba8da19 100644 --- a/src/views/system/user/columns.ts +++ b/src/views/system/user/columns.ts @@ -63,7 +63,11 @@ export const columns: BasicColumn[] = [ return h( NTag, { + style: { + marginRight: '6px', + }, type: color, + bordered: false, }, { default: () => typeText, @@ -111,6 +115,10 @@ export const columns: BasicColumn[] = [ return h( NTag, { + style: { + marginRight: '6px', + }, + bordered: false, type: row.status == 1 ? 'success' : 'error', }, {