Browse Source

fix:SettingDrawer component flashes when first load

kanako 5 năm trước cách đây
mục cha
commit
f800f53b8e
1 tập tin đã thay đổi với 4 bổ sung6 xóa
  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)