style :修改asset页面labels样式 修改message的判断条件

This commit is contained in:
zhangyu
2020-07-22 16:33:53 +08:00
parent c05b7cfd9f
commit 942f84cefa
6 changed files with 10 additions and 3 deletions

View File

@@ -745,7 +745,8 @@ const cn = {
add: "添加", add: "添加",
update: "更新", update: "更新",
del: "删除", del: "删除",
nameMaxLength:"长度应小于64" nameMaxLength:"长度应小于64",
uriRequired:'请填写正确的网址'
}, },
reset: { reset: {
reset: "重置", reset: "重置",

View File

@@ -753,6 +753,7 @@ const en = {
update: "Update", update: "Update",
del: "Delete", del: "Delete",
nameMaxLength:'The length should be less than 64', nameMaxLength:'The length should be less than 64',
uriRequired:'Please fill in the correct url'
}, },
reset:{ reset:{
reset:'Reset', reset:'Reset',

View File

@@ -374,7 +374,7 @@
this.showSubList = true; this.showSubList = true;
}, },
messageStyle(e) { messageStyle(e) {
if (e.column.label == this.$t("alert.message")) { if (e.column.label == 'Message' || e.column.label == this.$t('alert.message')) {
if (e.row.alertNum > 0) { if (e.row.alertNum > 0) {
return 'danger'; return 'danger';
} else { } else {

View File

@@ -28,6 +28,7 @@
line-height: 20px; line-height: 20px;
border-radius: 4px; border-radius: 4px;
display: inline-block; display: inline-block;
box-sizing: content-box;
} }
.nz-alert-tag__label { .nz-alert-tag__label {
border-radius: 3px 0 0 3px; border-radius: 3px 0 0 3px;
@@ -40,6 +41,9 @@
overflow: hidden; overflow: hidden;
word-break: break-all; word-break: break-all;
display: inline-block; display: inline-block;
height: 21px;
box-sizing: content-box;
margin-left: -1px;
} }
.nz-alert-tag__content { .nz-alert-tag__content {
border-radius: 0 3px 3px 0; border-radius: 0 3px 3px 0;

View File

@@ -638,7 +638,7 @@
}) })
}, },
messageStyle(e) { messageStyle(e) {
if (e.column.label == 'Alerts') { if (e.column.label == 'Alerts' || e.column.label == this.$t("asset.tableTitle.alerts")) {
if (e.row.alertNum > 0) { if (e.row.alertNum > 0) {
return 'danger'; return 'danger';
} else { } else {

View File

@@ -404,6 +404,7 @@
], ],
url:[ url:[
{ required: true, message: this.$t('validate.required'), trigger: 'blur' }, { required: true, message: this.$t('validate.required'), trigger: 'blur' },
// { type: 'url', message: this.$t('config.system.link.uriRequired'), trigger: 'blur' } /*检验网址是否正确*/
] ]
}, },
resetRules:{ resetRules:{