Эх сурвалжийг харах

[*]requestBody属性面板null值显示优化

Lianjy 4 жил өмнө
parent
commit
713f9a229a

+ 1 - 1
magic-editor/src/console/src/components/common/magic-json-tree.vue

@@ -13,7 +13,7 @@
 
           {{item.level > 0 ? item.name : ''}}{{item.dataType != 'Object' && item.dataType != 'Array' ? ':' : ''}}
           <span :style="item.dataType | color">
-              {{item.dataType == 'String' ? ((item.value == 'null' || item.value == 'undefined') ? item.value : '"' + item.value + '"') : item.value}}
+              {{item.dataType == 'String' ? (item.value == 'null' || item.value == null ? 'null' : '"' + item.value + '"') : item.value}}
             </span>
         </div>
       </div>

+ 1 - 2
magic-editor/src/console/src/components/layout/magic-request.vue

@@ -254,10 +254,9 @@
     watch: {
       requestBody: {
         handler(newVal, oldVal) {
-          console.log('watch -handler', newVal);
+          // console.log('watch -handler', newVal);
           if (this.bodyEditorFlag) {
             this.info.requestBody = JSON.stringify(newVal[0])
-            // this.buildEditorValue(this.info.requestBody)
           }
         },
         deep: true