WAF规则中如果对比值为空,则显示空字样

This commit is contained in:
刘祥超
2023-01-13 15:58:35 +08:00
parent e18f182ce6
commit bf82f22d0f
2 changed files with 11 additions and 2 deletions

View File

@@ -21,6 +21,9 @@ Vue.component("http-firewall-rule-label", {
}
return operatorName
},
isEmptyString: function (v) {
return typeof v == "string" && v.length == 0
}
},
template: `<div>
@@ -41,7 +44,8 @@ Vue.component("http-firewall-rule-label", {
<span v-else>
<span v-if="rule.paramFilters != null && rule.paramFilters.length > 0" v-for="paramFilter in rule.paramFilters"> | {{paramFilter.code}}</span>
<span :class="{dash:rule.isCaseInsensitive}" :title="rule.isCaseInsensitive ? '大小写不敏感':''" v-if="!rule.isComposed">{{operatorName(rule.operator)}}</span>
{{rule.value}}
<span v-if="!isEmptyString(rule.value)">{{rule.value}}</span>
<span v-else class="disabled" style="font-weight: normal" title="空字符串">[空]</span>
</span>
<!-- description -->