Selaa lähdekoodia

feat:chargeDialogShow

ananzhusen 1 vuosi sitten
vanhempi
sitoutus
22552bdee1
2 muutettua tiedostoa jossa 6 lisäystä ja 4 poistoa
  1. 2 0
      src/services/common.ts
  2. 4 4
      src/views/components/Graphics.vue

+ 2 - 0
src/services/common.ts

@@ -650,6 +650,7 @@ export const save = async (
   return true;
 };
 
+export const chargeDialogShow = ref(false);
 
 export const autoSaveAS = async(id:string)=>{
   //先请求打开图纸 
@@ -668,6 +669,7 @@ export const autoSaveAS = async(id:string)=>{
   for (const k of delAttrs) {
     delete ret[k];
   }
+  chargeDialogShow.value = false;
   meta2d.open(ret.data);
   meta2d.fitView();
   //另存为付费用户图纸

+ 4 - 4
src/views/components/Graphics.vue

@@ -271,10 +271,10 @@
 
     <t-dialog
      class="dialog-charge"
-      v-if="chargeDialog.show"
+      v-if="chargeDialogShow"
       :header="chargeDialog.name"
       :visible="true"
-      @close="chargeDialog.show = false"
+      @close="chargeDialogShow = false"
       width="80%"
       :top="8"
       :footer="false"
@@ -380,7 +380,7 @@ import {
 } from '@/services/api';
 import { convertPen } from '@/services/upgrade';
 import { isGif } from '@/services/utils';
-import { autoSave, delAttrs, blank, useFolder } from '@/services/common';
+import { autoSave, delAttrs, blank, useFolder, chargeDialogShow } from '@/services/common';
 import { debounce, throttle } from '@/services/debouce';
 import { searchObjectPinyin } from '@/services/pinyin';
 import { getCookie } from '@/services/cookie';
@@ -1230,7 +1230,7 @@ const open = async (item: any) => {
     // }
     if(!ret.data&&ret.price>0){
       chargeDialog.data = item;
-      chargeDialog.show = true;
+      chargeDialogShow.value = true;
       return;
     }
     sessionStorage.setItem('opening', '1');