mirror of
https://github.com/1Panel-dev/1Panel.git
synced 2025-12-13 14:07:52 +08:00
fix: 解决禁 ping 状态切换失败的问题 (#552)
This commit is contained in:
parent
e3cf522565
commit
295f2a5cf2
1 changed files with 3 additions and 3 deletions
|
|
@ -28,7 +28,7 @@
|
||||||
style="margin-left: 10px"
|
style="margin-left: 10px"
|
||||||
inactive-value="Disable"
|
inactive-value="Disable"
|
||||||
active-value="Enable"
|
active-value="Enable"
|
||||||
@change="onPingOperate(baseInfo.pingStatus)"
|
@change="onPingOperate"
|
||||||
v-model="onPing"
|
v-model="onPing"
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
|
|
@ -99,7 +99,7 @@ const onOperate = async (operation: string) => {
|
||||||
|
|
||||||
const onPingOperate = async (operation: string) => {
|
const onPingOperate = async (operation: string) => {
|
||||||
let operationHelper =
|
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'), {
|
ElMessageBox.confirm(operationHelper, i18n.global.t('firewall.noPingTitle'), {
|
||||||
confirmButtonText: i18n.global.t('commons.button.confirm'),
|
confirmButtonText: i18n.global.t('commons.button.confirm'),
|
||||||
cancelButtonText: i18n.global.t('commons.button.cancel'),
|
cancelButtonText: i18n.global.t('commons.button.cancel'),
|
||||||
|
|
@ -107,7 +107,7 @@ const onPingOperate = async (operation: string) => {
|
||||||
.then(async () => {
|
.then(async () => {
|
||||||
emit('update:loading', true);
|
emit('update:loading', true);
|
||||||
emit('update:status', 'running');
|
emit('update:status', 'running');
|
||||||
operation = operation === 'Disable' ? 'enablePing' : 'disablePing';
|
operation = operation === 'Disable' ? 'disablePing' : 'enablePing';
|
||||||
await operateFire(operation)
|
await operateFire(operation)
|
||||||
.then(() => {
|
.then(() => {
|
||||||
MsgSuccess(i18n.global.t('commons.msg.operationSuccess'));
|
MsgSuccess(i18n.global.t('commons.msg.operationSuccess'));
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue