mirror of
https://github.com/fofolee/uTools-quickcommand.git
synced 2025-06-08 14:34:13 +08:00
修改 toggle event
This commit is contained in:
parent
69f72b1098
commit
30bcfadc59
@ -41,7 +41,9 @@
|
|||||||
>
|
>
|
||||||
<template v-slot:append>
|
<template v-slot:append>
|
||||||
<q-toggle
|
<q-toggle
|
||||||
@click="toggleFeature('favFile')"
|
@update:model-value="
|
||||||
|
(val, e) => toggleFeature('favFile', val)
|
||||||
|
"
|
||||||
v-model="$root.profile.quickFileEnable"
|
v-model="$root.profile.quickFileEnable"
|
||||||
checked-icon="check"
|
checked-icon="check"
|
||||||
color="primary"
|
color="primary"
|
||||||
@ -70,7 +72,9 @@
|
|||||||
>
|
>
|
||||||
<template v-slot:append>
|
<template v-slot:append>
|
||||||
<q-toggle
|
<q-toggle
|
||||||
@click="toggleFeature('favUrl')"
|
@update:model-value="
|
||||||
|
(val, e) => toggleFeature('favUrl', val)
|
||||||
|
"
|
||||||
v-model="$root.profile.quickUrlEnable"
|
v-model="$root.profile.quickUrlEnable"
|
||||||
checked-icon="check"
|
checked-icon="check"
|
||||||
color="primary"
|
color="primary"
|
||||||
@ -100,7 +104,9 @@
|
|||||||
>
|
>
|
||||||
<template v-slot:append>
|
<template v-slot:append>
|
||||||
<q-toggle
|
<q-toggle
|
||||||
@click="toggleFeature('pluNickName')"
|
@update:model-value="
|
||||||
|
(val, e) => toggleFeature('pluNickName', val)
|
||||||
|
"
|
||||||
v-model="$root.profile.pluNickNameEnable"
|
v-model="$root.profile.pluNickNameEnable"
|
||||||
checked-icon="check"
|
checked-icon="check"
|
||||||
color="primary"
|
color="primary"
|
||||||
@ -474,13 +480,10 @@ export default {
|
|||||||
quickcommand.showMessageBox("取消收藏成功");
|
quickcommand.showMessageBox("取消收藏成功");
|
||||||
},
|
},
|
||||||
// 实用功能
|
// 实用功能
|
||||||
toggleFeature(type) {
|
toggleFeature(type, enable) {
|
||||||
this.$root.utools.whole.removeFeature(this.features[type].code) ||
|
enable
|
||||||
this.$root.utools.whole.setFeature(_.cloneDeep(this.features[type]));
|
? this.$root.utools.whole.setFeature(_.cloneDeep(this.features[type]))
|
||||||
if (type === "apiServer" && !this.$root.profile.apiServerEnable) {
|
: this.$root.utools.whole.removeFeature(this.features[type].code);
|
||||||
window.quickcommandHttpServer().stop();
|
|
||||||
this.$root.nativeProfile.serverStatus = false;
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
Loading…
x
Reference in New Issue
Block a user