整体优化标签样式
This commit is contained in:
parent
451d22a1dd
commit
81ee70bcad
@ -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',
|
||||
},
|
||||
{
|
||||
|
@ -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,
|
||||
},
|
||||
);
|
||||
},
|
||||
},
|
||||
{
|
||||
|
@ -59,6 +59,10 @@ export const columns = [
|
||||
return h(
|
||||
NTag,
|
||||
{
|
||||
style: {
|
||||
marginRight: '6px',
|
||||
},
|
||||
bordered: false,
|
||||
type: record.status == 1 ? 'error' : 'success',
|
||||
},
|
||||
{
|
||||
|
@ -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',
|
||||
|
@ -57,6 +57,10 @@ export const columns = [
|
||||
return h(
|
||||
NTag,
|
||||
{
|
||||
style: {
|
||||
marginRight: '6px',
|
||||
},
|
||||
bordered: false,
|
||||
type: record.status == 1 ? 'success' : 'error',
|
||||
},
|
||||
{
|
||||
|
@ -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',
|
||||
},
|
||||
{
|
||||
|
@ -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,
|
||||
},
|
||||
);
|
||||
},
|
||||
},
|
||||
{
|
||||
|
@ -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',
|
||||
},
|
||||
{
|
||||
|
@ -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',
|
||||
},
|
||||
{
|
||||
|
@ -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,
|
||||
},
|
||||
);
|
||||
},
|
||||
},
|
||||
{
|
||||
|
@ -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,
|
||||
},
|
||||
);
|
||||
},
|
||||
},
|
||||
{
|
||||
|
@ -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,
|
||||
},
|
||||
);
|
||||
},
|
||||
},
|
||||
{
|
||||
|
@ -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',
|
||||
},
|
||||
{
|
||||
|
@ -38,6 +38,10 @@ export const columns = [
|
||||
return h(
|
||||
NTag,
|
||||
{
|
||||
style: {
|
||||
marginRight: '6px',
|
||||
},
|
||||
bordered: false,
|
||||
type: color,
|
||||
},
|
||||
{
|
||||
|
@ -25,6 +25,10 @@ export const columns = [
|
||||
return h(
|
||||
NTag,
|
||||
{
|
||||
style: {
|
||||
marginRight: '6px',
|
||||
},
|
||||
bordered: false,
|
||||
type: record.status == 1 ? 'success' : 'error',
|
||||
},
|
||||
{
|
||||
|
@ -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 ? '正常' : '异常'),
|
||||
|
@ -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 ? '正常' : '异常'),
|
||||
|
@ -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',
|
||||
},
|
||||
{
|
||||
|
@ -26,6 +26,10 @@ export const columns = [
|
||||
return h(
|
||||
NTag,
|
||||
{
|
||||
style: {
|
||||
marginRight: '6px',
|
||||
},
|
||||
bordered: false,
|
||||
type: record.status == 1 ? 'success' : 'error',
|
||||
},
|
||||
{
|
||||
|
@ -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',
|
||||
},
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user