wangzhibo
2026-08-31 17ac2ce0ed52874616c79c910667e41e34604826
xiaozhi-esp32-server/main/manager-web/src/components/ParamDialog.vue
@@ -1,7 +1,7 @@
<template>
  <CustomDialog
    :title="title"
    :visible.sync="visible"
    :visible.sync="dialogVisible"
    width="600px"
    class="param-dialog-wrapper"
    @confirm="submit"
@@ -84,6 +84,7 @@
  },
  data() {
    return {
      dialogVisible: this.visible,
      dialogKey: Date.now(),
      saving: false,
      valueTypeOptions: [
@@ -157,6 +158,7 @@
  },
  watch: {
    visible(newVal) {
      this.dialogVisible = newVal;
      if (newVal) {
        if (this.form.paramValue) {
          // 如果是 json 类型,格式化显示
@@ -178,6 +180,9 @@
        // 当对话框关闭时,重置saving状态
        this.saving = false;
      }
    },
    dialogVisible(val) {
      this.$emit('update:visible', val);
    }
  }
};