tianyun 3 months ago
parent
commit
8256c5f3f2
1 changed files with 5 additions and 0 deletions
  1. 5 0
      simple-demo/mycopy.html

+ 5 - 0
simple-demo/mycopy.html

@@ -244,6 +244,8 @@
                         showContent = res.content_back;
                     }
                     this.myObj = JSON.parse(showContent);
+                    // 设置activeTab
+                    this.activeTab = Object.keys(this.myObj)[0] || '';
                 }
 
                 if (pageManager.isReadOnly()) {
@@ -262,6 +264,7 @@
                 this.$prompt('请输入新的标签名', '修改标签名', {
                     confirmButtonText: '确定',
                     cancelButtonText: '取消',
+                    closeOnClickModal: false,
                     inputValue: activeTab
                 })
                     .then(({value}) => {
@@ -351,6 +354,7 @@
                     confirmButtonText: '保存',
                     cancelButtonText: '取消',
                     inputPlaceholder: '输入新Key',
+                    closeOnClickModal: false,
                     inputValue: key
                 }).then(({ value: newKey }) => {
                     // 第二步:修改Value
@@ -358,6 +362,7 @@
                         confirmButtonText: '保存',
                         cancelButtonText: '取消',
                         inputPlaceholder: '输入新值',
+                        closeOnClickModal: false,
                         inputValue: value
                     }).then(({ value: newValue }) => {
                         // 更新数据