整体优化标签样式
This commit is contained in:
parent
451d22a1dd
commit
81ee70bcad
@ -47,20 +47,37 @@ export const columns = [
|
|||||||
width: 100,
|
width: 100,
|
||||||
render(record) {
|
render(record) {
|
||||||
let typeText = '';
|
let typeText = '';
|
||||||
|
let color = '';
|
||||||
switch (record.type) {
|
switch (record.type) {
|
||||||
case 1:
|
case 1:
|
||||||
typeText = '图片';
|
typeText = '图片';
|
||||||
|
color = 'success';
|
||||||
break;
|
break;
|
||||||
case 2:
|
case 2:
|
||||||
typeText = '文字';
|
typeText = '文字';
|
||||||
|
color = 'primary';
|
||||||
break;
|
break;
|
||||||
case 3:
|
case 3:
|
||||||
typeText = '视频';
|
typeText = '视频';
|
||||||
|
color = 'warning';
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
break;
|
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(
|
return h(
|
||||||
NTag,
|
NTag,
|
||||||
{
|
{
|
||||||
|
style: {
|
||||||
|
marginRight: '6px',
|
||||||
|
},
|
||||||
|
bordered: false,
|
||||||
type: record.status == 1 ? 'success' : 'error',
|
type: record.status == 1 ? 'success' : 'error',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
@ -1,4 +1,5 @@
|
|||||||
import { h } from 'vue';
|
import { h } from 'vue';
|
||||||
|
import { NTag } from 'naive-ui';
|
||||||
|
|
||||||
export const columns = [
|
export const columns = [
|
||||||
{
|
{
|
||||||
@ -28,20 +29,37 @@ export const columns = [
|
|||||||
width: 100,
|
width: 100,
|
||||||
render(record) {
|
render(record) {
|
||||||
let typeText = '';
|
let typeText = '';
|
||||||
|
let color = '';
|
||||||
switch (record.type) {
|
switch (record.type) {
|
||||||
case 1:
|
case 1:
|
||||||
typeText = '网站';
|
typeText = '网站';
|
||||||
|
color = 'success';
|
||||||
break;
|
break;
|
||||||
case 2:
|
case 2:
|
||||||
typeText = '手机站';
|
typeText = '手机站';
|
||||||
|
color = 'primary';
|
||||||
break;
|
break;
|
||||||
case 3:
|
case 3:
|
||||||
typeText = '移动端';
|
typeText = '移动端';
|
||||||
|
color = 'warning';
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
return h('span', typeText || '-');
|
// return h('span', typeText || '-');
|
||||||
|
return h(
|
||||||
|
NTag,
|
||||||
|
{
|
||||||
|
style: {
|
||||||
|
marginRight: '6px',
|
||||||
|
},
|
||||||
|
bordered: false,
|
||||||
|
type: color,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
default: () => typeText,
|
||||||
|
},
|
||||||
|
);
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
@ -59,6 +59,10 @@ export const columns = [
|
|||||||
return h(
|
return h(
|
||||||
NTag,
|
NTag,
|
||||||
{
|
{
|
||||||
|
style: {
|
||||||
|
marginRight: '6px',
|
||||||
|
},
|
||||||
|
bordered: false,
|
||||||
type: record.status == 1 ? 'error' : 'success',
|
type: record.status == 1 ? 'error' : 'success',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
@ -25,6 +25,21 @@ export const columns = [
|
|||||||
title: '推荐类型',
|
title: '推荐类型',
|
||||||
key: 'typeText',
|
key: 'typeText',
|
||||||
width: 100,
|
width: 100,
|
||||||
|
render(record) {
|
||||||
|
return h(
|
||||||
|
NTag,
|
||||||
|
{
|
||||||
|
style: {
|
||||||
|
marginRight: '6px',
|
||||||
|
},
|
||||||
|
bordered: false,
|
||||||
|
type: 'info',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
default: () => record.typeText,
|
||||||
|
},
|
||||||
|
);
|
||||||
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: '推荐ID',
|
title: '推荐ID',
|
||||||
|
@ -57,6 +57,10 @@ export const columns = [
|
|||||||
return h(
|
return h(
|
||||||
NTag,
|
NTag,
|
||||||
{
|
{
|
||||||
|
style: {
|
||||||
|
marginRight: '6px',
|
||||||
|
},
|
||||||
|
bordered: false,
|
||||||
type: record.status == 1 ? 'success' : 'error',
|
type: record.status == 1 ? 'success' : 'error',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
import { h } from 'vue';
|
import { h } from 'vue';
|
||||||
import { NTag } from 'naive-ui';
|
import { NTag } from 'naive-ui';
|
||||||
|
|
||||||
export const columns = [
|
export const columns = [
|
||||||
{
|
{
|
||||||
type: 'selection',
|
type: 'selection',
|
||||||
@ -91,7 +92,20 @@ export const columns = [
|
|||||||
default:
|
default:
|
||||||
break;
|
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(
|
return h(
|
||||||
NTag,
|
NTag,
|
||||||
{
|
{
|
||||||
|
style: {
|
||||||
|
marginRight: '6px',
|
||||||
|
},
|
||||||
|
bordered: false,
|
||||||
type: record.status == 1 ? 'success' : 'error',
|
type: record.status == 1 ? 'success' : 'error',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
@ -1,4 +1,5 @@
|
|||||||
import { h } from 'vue';
|
import { h } from 'vue';
|
||||||
|
import { NTag } from 'naive-ui';
|
||||||
|
|
||||||
export const columns = [
|
export const columns = [
|
||||||
{
|
{
|
||||||
@ -23,20 +24,37 @@ export const columns = [
|
|||||||
width: 100,
|
width: 100,
|
||||||
render(record) {
|
render(record) {
|
||||||
let typeText = '';
|
let typeText = '';
|
||||||
|
let color = '';
|
||||||
switch (record.type) {
|
switch (record.type) {
|
||||||
case 1:
|
case 1:
|
||||||
typeText = '系统通知';
|
typeText = '系统通知';
|
||||||
|
color = 'success';
|
||||||
break;
|
break;
|
||||||
case 2:
|
case 2:
|
||||||
typeText = '用户私信';
|
typeText = '用户私信';
|
||||||
|
color = 'primary';
|
||||||
break;
|
break;
|
||||||
case 3:
|
case 3:
|
||||||
typeText = '代办事项';
|
typeText = '代办事项';
|
||||||
|
color = 'warning';
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
return h('span', typeText || '-');
|
// return h('span', typeText || '-');
|
||||||
|
return h(
|
||||||
|
NTag,
|
||||||
|
{
|
||||||
|
style: {
|
||||||
|
marginRight: '6px',
|
||||||
|
},
|
||||||
|
bordered: false,
|
||||||
|
type: color,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
default: () => typeText,
|
||||||
|
},
|
||||||
|
);
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
@ -39,7 +39,11 @@ export const columns = [
|
|||||||
return h(
|
return h(
|
||||||
NTag,
|
NTag,
|
||||||
{
|
{
|
||||||
type: record.type == 1 ? 'info' : 'success',
|
style: {
|
||||||
|
marginRight: '6px',
|
||||||
|
},
|
||||||
|
bordered: false,
|
||||||
|
type: record.type == 1 ? 'info' : 'warning',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
default: () => (record.type == 1 ? '通知' : '公告'),
|
default: () => (record.type == 1 ? '通知' : '公告'),
|
||||||
@ -55,6 +59,10 @@ export const columns = [
|
|||||||
return h(
|
return h(
|
||||||
NTag,
|
NTag,
|
||||||
{
|
{
|
||||||
|
style: {
|
||||||
|
marginRight: '6px',
|
||||||
|
},
|
||||||
|
bordered: false,
|
||||||
type: record.status == 1 ? 'success' : 'error',
|
type: record.status == 1 ? 'success' : 'error',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
@ -36,6 +36,10 @@ export const columns = [
|
|||||||
return h(
|
return h(
|
||||||
NTag,
|
NTag,
|
||||||
{
|
{
|
||||||
|
style: {
|
||||||
|
marginRight: '6px',
|
||||||
|
},
|
||||||
|
bordered: false,
|
||||||
type: record.type == 0 ? 'info' : 'warning',
|
type: record.type == 0 ? 'info' : 'warning',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@ -52,6 +56,10 @@ export const columns = [
|
|||||||
return h(
|
return h(
|
||||||
NTag,
|
NTag,
|
||||||
{
|
{
|
||||||
|
style: {
|
||||||
|
marginRight: '6px',
|
||||||
|
},
|
||||||
|
bordered: false,
|
||||||
type: record.status == 1 ? 'success' : 'error',
|
type: record.status == 1 ? 'success' : 'error',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
@ -29,20 +29,37 @@ export const columns = [
|
|||||||
width: 100,
|
width: 100,
|
||||||
render(record) {
|
render(record) {
|
||||||
let typeText = '';
|
let typeText = '';
|
||||||
|
let color = '';
|
||||||
switch (record.type) {
|
switch (record.type) {
|
||||||
case 1:
|
case 1:
|
||||||
typeText = '普通邮件';
|
typeText = '普通邮件';
|
||||||
|
color = 'success';
|
||||||
break;
|
break;
|
||||||
case 2:
|
case 2:
|
||||||
typeText = '图文邮件';
|
typeText = '图文邮件';
|
||||||
|
color = 'primary';
|
||||||
break;
|
break;
|
||||||
case 3:
|
case 3:
|
||||||
typeText = '模板文件';
|
typeText = '模板文件';
|
||||||
|
color = 'warning';
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
return h('span', typeText || '-');
|
// return h('span', typeText || '-');
|
||||||
|
return h(
|
||||||
|
NTag,
|
||||||
|
{
|
||||||
|
style: {
|
||||||
|
marginRight: '6px',
|
||||||
|
},
|
||||||
|
bordered: false,
|
||||||
|
type: color,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
default: () => typeText,
|
||||||
|
},
|
||||||
|
);
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
@ -33,20 +33,37 @@ export const columns = [
|
|||||||
key: 'type',
|
key: 'type',
|
||||||
render(record) {
|
render(record) {
|
||||||
let typeText = '';
|
let typeText = '';
|
||||||
|
let color = '';
|
||||||
switch (record.type) {
|
switch (record.type) {
|
||||||
case 1:
|
case 1:
|
||||||
typeText = '系统通知';
|
typeText = '系统通知';
|
||||||
|
color = 'success';
|
||||||
break;
|
break;
|
||||||
case 2:
|
case 2:
|
||||||
typeText = '用户私信';
|
typeText = '用户私信';
|
||||||
|
color = 'primary';
|
||||||
break;
|
break;
|
||||||
case 3:
|
case 3:
|
||||||
typeText = '代办事项';
|
typeText = '代办事项';
|
||||||
|
color = 'warning';
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
return h('span', typeText || '-');
|
// return h('span', typeText || '-');
|
||||||
|
return h(
|
||||||
|
NTag,
|
||||||
|
{
|
||||||
|
style: {
|
||||||
|
marginRight: '6px',
|
||||||
|
},
|
||||||
|
bordered: false,
|
||||||
|
type: color,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
default: () => typeText,
|
||||||
|
},
|
||||||
|
);
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
@ -1,4 +1,6 @@
|
|||||||
import { h } from 'vue';
|
import { h } from 'vue';
|
||||||
|
import { NTag } from 'naive-ui';
|
||||||
|
|
||||||
export const columns = [
|
export const columns = [
|
||||||
{
|
{
|
||||||
type: 'selection',
|
type: 'selection',
|
||||||
@ -32,20 +34,37 @@ export const columns = [
|
|||||||
width: 100,
|
width: 100,
|
||||||
render(record) {
|
render(record) {
|
||||||
let typeText = '';
|
let typeText = '';
|
||||||
|
let color = '';
|
||||||
switch (record.type) {
|
switch (record.type) {
|
||||||
case 0:
|
case 0:
|
||||||
typeText = '单个文件';
|
typeText = '单个文件';
|
||||||
|
color = 'success';
|
||||||
break;
|
break;
|
||||||
case 1:
|
case 1:
|
||||||
typeText = '多个文件';
|
typeText = '多个文件';
|
||||||
|
color = 'primary';
|
||||||
break;
|
break;
|
||||||
case 2:
|
case 2:
|
||||||
typeText = '其他';
|
typeText = '其他';
|
||||||
|
color = 'warning';
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
return h('span', typeText || '-');
|
// return h('span', typeText || '-');
|
||||||
|
return h(
|
||||||
|
NTag,
|
||||||
|
{
|
||||||
|
style: {
|
||||||
|
marginRight: '6px',
|
||||||
|
},
|
||||||
|
bordered: false,
|
||||||
|
type: color,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
default: () => typeText,
|
||||||
|
},
|
||||||
|
);
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
@ -37,6 +37,21 @@ export const columns = [
|
|||||||
title: '执行策略',
|
title: '执行策略',
|
||||||
key: 'executePolicyText',
|
key: 'executePolicyText',
|
||||||
width: 100,
|
width: 100,
|
||||||
|
render(record) {
|
||||||
|
return h(
|
||||||
|
NTag,
|
||||||
|
{
|
||||||
|
style: {
|
||||||
|
marginRight: '6px',
|
||||||
|
},
|
||||||
|
bordered: false,
|
||||||
|
type: 'info',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
default: () => record.executePolicyText,
|
||||||
|
},
|
||||||
|
);
|
||||||
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: '同步任务',
|
title: '同步任务',
|
||||||
@ -46,6 +61,10 @@ export const columns = [
|
|||||||
return h(
|
return h(
|
||||||
NTag,
|
NTag,
|
||||||
{
|
{
|
||||||
|
style: {
|
||||||
|
marginRight: '6px',
|
||||||
|
},
|
||||||
|
bordered: false,
|
||||||
type: record.isSync == 1 ? 'success' : 'info',
|
type: record.isSync == 1 ? 'success' : 'info',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
@ -38,6 +38,10 @@ export const columns = [
|
|||||||
return h(
|
return h(
|
||||||
NTag,
|
NTag,
|
||||||
{
|
{
|
||||||
|
style: {
|
||||||
|
marginRight: '6px',
|
||||||
|
},
|
||||||
|
bordered: false,
|
||||||
type: color,
|
type: color,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
@ -25,6 +25,10 @@ export const columns = [
|
|||||||
return h(
|
return h(
|
||||||
NTag,
|
NTag,
|
||||||
{
|
{
|
||||||
|
style: {
|
||||||
|
marginRight: '6px',
|
||||||
|
},
|
||||||
|
bordered: false,
|
||||||
type: record.status == 1 ? 'success' : 'error',
|
type: record.status == 1 ? 'success' : 'error',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
@ -36,6 +36,10 @@ export const columns = [
|
|||||||
h(
|
h(
|
||||||
NTag,
|
NTag,
|
||||||
{
|
{
|
||||||
|
style: {
|
||||||
|
marginRight: '6px',
|
||||||
|
},
|
||||||
|
bordered: false,
|
||||||
type: 'info',
|
type: 'info',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@ -54,6 +58,7 @@ export const columns = [
|
|||||||
h(
|
h(
|
||||||
NTag,
|
NTag,
|
||||||
{
|
{
|
||||||
|
bordered: false,
|
||||||
style: { marginBottom: '5px' },
|
style: { marginBottom: '5px' },
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@ -83,6 +88,7 @@ export const columns = [
|
|||||||
{
|
{
|
||||||
type: record.status == 0 ? 'success' : 'error',
|
type: record.status == 0 ? 'success' : 'error',
|
||||||
style: { marginBottom: '5px' },
|
style: { marginBottom: '5px' },
|
||||||
|
bordered: false,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
default: () => (record.status == 0 ? '正常' : '异常'),
|
default: () => (record.status == 0 ? '正常' : '异常'),
|
||||||
|
@ -36,6 +36,10 @@ export const columns = [
|
|||||||
h(
|
h(
|
||||||
NTag,
|
NTag,
|
||||||
{
|
{
|
||||||
|
style: {
|
||||||
|
marginRight: '6px',
|
||||||
|
},
|
||||||
|
bordered: false,
|
||||||
type: 'info',
|
type: 'info',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@ -55,6 +59,7 @@ export const columns = [
|
|||||||
NTag,
|
NTag,
|
||||||
{
|
{
|
||||||
style: { marginBottom: '5px' },
|
style: { marginBottom: '5px' },
|
||||||
|
bordered: false,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
default: () => record.requestMethod,
|
default: () => record.requestMethod,
|
||||||
@ -83,6 +88,7 @@ export const columns = [
|
|||||||
{
|
{
|
||||||
type: record.status == 0 ? 'success' : 'error',
|
type: record.status == 0 ? 'success' : 'error',
|
||||||
style: { marginBottom: '5px' },
|
style: { marginBottom: '5px' },
|
||||||
|
bordered: false,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
default: () => (record.status == 0 ? '正常' : '异常'),
|
default: () => (record.status == 0 ? '正常' : '异常'),
|
||||||
|
@ -22,7 +22,11 @@ export const columns: BasicColumn[] = [
|
|||||||
return h(
|
return h(
|
||||||
NTag,
|
NTag,
|
||||||
{
|
{
|
||||||
|
style: {
|
||||||
|
marginRight: '6px',
|
||||||
|
},
|
||||||
type: record.type == 1 ? 'success' : 'info',
|
type: record.type == 1 ? 'success' : 'info',
|
||||||
|
bordered: false,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
default: () => (record.type == 1 ? '按钮' : '菜单'),
|
default: () => (record.type == 1 ? '按钮' : '菜单'),
|
||||||
@ -51,6 +55,10 @@ export const columns: BasicColumn[] = [
|
|||||||
return h(
|
return h(
|
||||||
NTag,
|
NTag,
|
||||||
{
|
{
|
||||||
|
style: {
|
||||||
|
marginRight: '6px',
|
||||||
|
},
|
||||||
|
bordered: false,
|
||||||
type: record.status == 0 ? 'info' : 'error',
|
type: record.status == 0 ? 'info' : 'error',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@ -67,6 +75,10 @@ export const columns: BasicColumn[] = [
|
|||||||
return h(
|
return h(
|
||||||
NTag,
|
NTag,
|
||||||
{
|
{
|
||||||
|
style: {
|
||||||
|
marginRight: '6px',
|
||||||
|
},
|
||||||
|
bordered: false,
|
||||||
type: record.hide == 0 ? 'success' : 'error',
|
type: record.hide == 0 ? 'success' : 'error',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
@ -26,6 +26,10 @@ export const columns = [
|
|||||||
return h(
|
return h(
|
||||||
NTag,
|
NTag,
|
||||||
{
|
{
|
||||||
|
style: {
|
||||||
|
marginRight: '6px',
|
||||||
|
},
|
||||||
|
bordered: false,
|
||||||
type: record.status == 1 ? 'success' : 'error',
|
type: record.status == 1 ? 'success' : 'error',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
@ -63,7 +63,11 @@ export const columns: BasicColumn[] = [
|
|||||||
return h(
|
return h(
|
||||||
NTag,
|
NTag,
|
||||||
{
|
{
|
||||||
|
style: {
|
||||||
|
marginRight: '6px',
|
||||||
|
},
|
||||||
type: color,
|
type: color,
|
||||||
|
bordered: false,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
default: () => typeText,
|
default: () => typeText,
|
||||||
@ -111,6 +115,10 @@ export const columns: BasicColumn[] = [
|
|||||||
return h(
|
return h(
|
||||||
NTag,
|
NTag,
|
||||||
{
|
{
|
||||||
|
style: {
|
||||||
|
marginRight: '6px',
|
||||||
|
},
|
||||||
|
bordered: false,
|
||||||
type: row.status == 1 ? 'success' : 'error',
|
type: row.status == 1 ? 'success' : 'error',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user