fix: 修复报错无法加载policies列表的问题

This commit is contained in:
chenjinsong
2023-10-23 16:34:29 +08:00
parent 6a2d5a0efe
commit 97d793471c
2 changed files with 3 additions and 2 deletions

View File

@@ -1306,12 +1306,13 @@ export function numberWithCommas (num) {
* @returns {string}
*/
export function switchStatus (status) {
switch (status) {
switch (status + '') {
case '0':
return 'detection.create.disabled'
case '1':
return 'detection.create.enabled'
}
return null
}
/**

View File

@@ -3,7 +3,7 @@
<div class="detection-title">
<span>{{ $t('overall.policies') }}</span>
<span class="detection-title-label">
{{ policyTotal }} {{ $t('detection.policesCreated') }} | {{ policyEnabledNum }} {{ $t('detection.policesEnabled') }}
{{ $t('detection.policesCreated', { total: policyTotal }) }} | {{ $t('detection.policesEnabled', { enabled: policyEnabledNum }) }}
</span>
</div>