fix: 解决禁 ping 状态切换失败的问题 (#552)

pull/553/head
ssongliu 2023-04-09 22:54:13 +08:00 committed by GitHub
parent e3cf522565
commit 295f2a5cf2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 3 deletions

View File

@ -28,7 +28,7 @@
style="margin-left: 10px"
inactive-value="Disable"
active-value="Enable"
@change="onPingOperate(baseInfo.pingStatus)"
@change="onPingOperate"
v-model="onPing"
/>
</div>
@ -99,7 +99,7 @@ const onOperate = async (operation: string) => {
const onPingOperate = async (operation: string) => {
let operationHelper =
operation === 'Enabel' ? i18n.global.t('firewall.noPingHelper') : i18n.global.t('firewall.onPingHelper');
operation === 'Enable' ? i18n.global.t('firewall.noPingHelper') : i18n.global.t('firewall.onPingHelper');
ElMessageBox.confirm(operationHelper, i18n.global.t('firewall.noPingTitle'), {
confirmButtonText: i18n.global.t('commons.button.confirm'),
cancelButtonText: i18n.global.t('commons.button.cancel'),
@ -107,7 +107,7 @@ const onPingOperate = async (operation: string) => {
.then(async () => {
emit('update:loading', true);
emit('update:status', 'running');
operation = operation === 'Disable' ? 'enablePing' : 'disablePing';
operation = operation === 'Disable' ? 'disablePing' : 'enablePing';
await operateFire(operation)
.then(() => {
MsgSuccess(i18n.global.t('commons.msg.operationSuccess'));