浏览代码

fix: 去除 status校验

奔跑的面条 3 年之前
父节点
当前提交
144b2aa81c

+ 1 - 1
src/views/chart/ContentConfigurations/components/ChartData/components/ChartDataAjax/index.vue

@@ -127,7 +127,7 @@ const sendHandle = async () => {
   try {
     const res = await customizeHttp(toRaw(targetData.value.request), toRaw(chartEditStore.requestGlobalConfig))
     loading.value = false
-    if (res && res.status === ResultEnum.SUCCESS) {
+    if (res && res.data) {
       targetData.value.option.dataset = newFunctionHandle(res.data, targetData.value.filter)
       showMatching.value = true
       return

+ 3 - 5
src/views/chart/ContentConfigurations/components/ChartData/components/ChartDataMonacoEditor/index.vue

@@ -17,15 +17,13 @@
             </template>
             编辑
           </n-button>
-          <n-button tertiary size="small" @click="delFilter">
-            删除
-          </n-button>
+          <n-button tertiary size="small" @click="delFilter"> 删除 </n-button>
         </n-space>
       </template>
     </n-card>
   </template>
   <template v-else>
-    <n-button class="go-ml-3"  @click="addFilter">
+    <n-button class="go-ml-3" @click="addFilter">
       <template #icon>
         <n-icon>
           <filter-icon />
@@ -125,7 +123,7 @@ const sourceData = ref<any>('')
 const fetchTargetData = async () => {
   try {
     const res = await customizeHttp(toRaw(targetData.value.request), toRaw(chartEditStore.requestGlobalConfig))
-    if (res && res.status === ResultEnum.SUCCESS) {
+    if (res && res.data) {
       sourceData.value = res.data
       return
     }