Browse Source

缓存修改

luguang 2 months ago
parent
commit
88f6a06e63
1 changed files with 5 additions and 1 deletions
  1. 5 1
      src/views/admin/monitor/cache/components/edit.vue

+ 5 - 1
src/views/admin/monitor/cache/components/edit.vue

@@ -49,7 +49,11 @@ export default {
     async getLocalData() {
       const { code, retObj } = await this.getApi({ key: this.cacheKey })
       if (code === 0) {
-        this.$set(this.editForm, 'value', retObj)
+        if (retObj.startsWith('{')) {
+          this.$set(this.editForm, 'value', retObj.replaceAll('\\', ''))
+        } else {
+          this.$set(this.editForm, 'value', retObj)
+        }
       }
     },
     confirmClick() {