Pārlūkot izejas kodu

fix:SettingDrawer component flashes when first load

kanako 5 gadi atpakaļ
vecāks
revīzija
f800f53b8e
1 mainītis faili ar 4 papildinājumiem un 6 dzēšanām
  1. 4 6
      src/components/SettingDrawer/SettingDrawer.vue

+ 4 - 6
src/components/SettingDrawer/SettingDrawer.vue

@@ -6,6 +6,7 @@
       @close="onClose"
       :closable="false"
       :visible="visible"
+      :handle="handle"
     >
       <div class="setting-drawer-index-content">
 
@@ -183,18 +184,15 @@ export default {
   mixins: [mixin, mixinDevice],
   data () {
     return {
-      visible: true,
-      colorList
+      visible: false,
+      colorList,
+      handle: <div/>
     }
   },
   watch: {
 
   },
   mounted () {
-    const vm = this
-    setTimeout(() => {
-      vm.visible = false
-    }, 16)
     updateTheme(this.primaryColor)
     if (this.colorWeak !== config.colorWeak) {
       updateColorWeak(this.colorWeak)