Sfoglia il codice sorgente

fix(dashboard): element-ui slider click bug

the tooltip will not be automatically hidden when triggered by clicking
Casper Dai 2 anni fa
parent
commit
521e2647d5

+ 32 - 30
src/views/dashboard/components/DrawerVolumeSettings.vue

@@ -7,38 +7,40 @@
     append-to-body
     @closed="onClosed"
   >
-    <div class="l-flex--col c-volume-drawer">
-      <div class="l-flex__none l-flex--row c-sibling-item--v u-bold has-bottom-padding--sm has-bottom-border">
-        <div class="l-flex__none l-flex--row u-font-size">音量设置</div>
-        <div class="l-flex__fill" />
-        <i
-          class="l-flex__none el-icon-close u-font-size--md u-bold has-active"
-          @click="onHide"
+    <template v-if="drawer">
+      <div class="l-flex--col c-volume-drawer">
+        <div class="l-flex__none l-flex--row c-sibling-item--v u-bold has-bottom-padding--sm has-bottom-border">
+          <div class="l-flex__none l-flex--row u-font-size">音量设置</div>
+          <div class="l-flex__fill" />
+          <i
+            class="l-flex__none el-icon-close u-font-size--md u-bold has-active"
+            @click="onHide"
+          />
+        </div>
+        <div class="l-flex__none l-flex--row center c-sibling-item--v near">
+          <el-slider
+            v-model="volume"
+            class="c-sibling-item u-width--md has-bottom-padding"
+            v-bind="sliderOptions"
+          />
+          <button
+            class="c-sibling-item farthest o-button"
+            @click="onVolume"
+          >
+            应用
+          </button>
+        </div>
+        <device-group-tree
+          v-if="groups"
+          class="l-flex__fill c-sibling-item--v"
+          :groups="groups"
+          checkbox
+          check-on-click-node
+          default-expand
+          @change="onChange"
         />
       </div>
-      <div class="l-flex__none l-flex--row center c-sibling-item--v near">
-        <el-slider
-          v-model="volume"
-          class="c-sibling-item u-width--md"
-          v-bind="sliderOptions"
-        />
-        <button
-          class="c-sibling-item farthest o-button"
-          @click="onVolume"
-        >
-          应用
-        </button>
-      </div>
-      <device-group-tree
-        v-if="groups"
-        class="l-flex__fill c-sibling-item--v far"
-        :groups="groups"
-        checkbox
-        check-on-click-node
-        default-expand
-        @change="onChange"
-      />
-    </div>
+    </template>
   </el-drawer>
 </template>
 

+ 1 - 1
src/views/dashboard/components/VolumeDialog.vue

@@ -7,7 +7,7 @@
     @confirm="onConfirmVolume"
   >
     <template #default>
-      <div class="l-flex--row center">
+      <div class="l-flex--row center has-bottom-padding">
         <el-slider
           v-model="volume"
           class="u-width--md"