Browse Source

setting modify

nieyuge 2 years ago
parent
commit
d0699b6881
1 changed files with 3 additions and 1 deletions
  1. 3 1
      src/view/popup/setting/index.vue

+ 3 - 1
src/view/popup/setting/index.vue

@@ -11,7 +11,7 @@
 
 
         <div class="item">
         <div class="item">
             <div class="l">Announcement Notification</div>
             <div class="l">Announcement Notification</div>
-            <div class="r">
+            <div class="r" v-if="noticeShow">
                 <a-switch v-model:checked="noticeStatus" @change="change"></a-switch>
                 <a-switch v-model:checked="noticeStatus" @change="change"></a-switch>
             </div>
             </div>
         </div>
         </div>
@@ -24,6 +24,7 @@ import router from "@/router/popup.js";
 import { getSetting, putSetting } from "@/http/user";
 import { getSetting, putSetting } from "@/http/user";
 
 
 let noticeStatus = ref(true);
 let noticeStatus = ref(true);
+let noticeShow = ref(false);
 
 
 function back() {
 function back() {
     router.back();
     router.back();
@@ -65,6 +66,7 @@ onBeforeMount(() => {
         if (code === 0) {
         if (code === 0) {
             noticeStatus.value = data.noticeSwitch === 1 ? true : false;
             noticeStatus.value = data.noticeSwitch === 1 ? true : false;
         }
         }
+        noticeShow.value = true;
     });
     });
 });
 });
 </script>
 </script>