mirror of
https://github.com/xinnan-tech/xiaozhi-esp32-server.git
synced 2026-07-26 00:53:54 +08:00
fix: 模态框闪烁问题
This commit is contained in:
@@ -105,6 +105,7 @@ export default {
|
|||||||
},
|
},
|
||||||
cancel() {
|
cancel() {
|
||||||
this.saving = false; // 取消时重置状态
|
this.saving = false; // 取消时重置状态
|
||||||
|
this.dialogKey = Date.now();
|
||||||
this.$emit('cancel');
|
this.$emit('cancel');
|
||||||
},
|
},
|
||||||
|
|
||||||
@@ -115,9 +116,7 @@ export default {
|
|||||||
},
|
},
|
||||||
watch: {
|
watch: {
|
||||||
visible(newVal) {
|
visible(newVal) {
|
||||||
if (newVal) {
|
if (!newVal) {
|
||||||
this.dialogKey = Date.now();
|
|
||||||
} else {
|
|
||||||
// 当对话框关闭时,重置saving状态
|
// 当对话框关闭时,重置saving状态
|
||||||
this.saving = false;
|
this.saving = false;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -153,13 +153,13 @@ export default {
|
|||||||
},
|
},
|
||||||
cancel() {
|
cancel() {
|
||||||
this.saving = false; // 取消时重置状态
|
this.saving = false; // 取消时重置状态
|
||||||
|
this.dialogKey = Date.now();
|
||||||
this.$emit('cancel');
|
this.$emit('cancel');
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
watch: {
|
watch: {
|
||||||
visible(newVal) {
|
visible(newVal) {
|
||||||
if (newVal) {
|
if (newVal) {
|
||||||
this.dialogKey = Date.now();
|
|
||||||
api.agent.getRecentlyFiftyByAgentId(this.agentId, ((data) => {
|
api.agent.getRecentlyFiftyByAgentId(this.agentId, ((data) => {
|
||||||
this.valueTypeOptions = data.data.data.map(item => ({
|
this.valueTypeOptions = data.data.data.map(item => ({
|
||||||
...item
|
...item
|
||||||
|
|||||||
Reference in New Issue
Block a user