瀏覽代碼

fix: 修复滚动条的bug

MTrun 3 年之前
父節點
當前提交
9a1e23c661

+ 15 - 2
src/views/chart/ContentBox/index.vue

@@ -24,11 +24,19 @@
     </div>
 
     <aside class="content">
-      <n-scrollbar x-scrollable>
+      <template v-if="xScroll">
+        <n-scrollbar x-scrollable>
+          <n-scrollbar>
+            <slot></slot>
+          </n-scrollbar>
+        </n-scrollbar>
+      </template>
+
+      <template v-else>
         <n-scrollbar>
           <slot></slot>
         </n-scrollbar>
-      </n-scrollbar>
+      </template>
     </aside>
 
     <div v-if="showBottom" class="bottom go-mt-0">
@@ -69,6 +77,11 @@ defineProps({
   depth: {
     type: Number,
     default: 1
+  },
+  // x 轴滚动
+  xScroll: {
+    type: Boolean,
+    default: false
   }
 })
 

+ 1 - 1
src/views/chart/ContentCharts/components/OptionContent/index.vue

@@ -109,7 +109,7 @@ const clickItemHandle = (key: string) => {
 
 <style lang="scss" scoped>
 /* 此高度与 ContentBox 组件关联*/
-$topHeight: 36px;
+$topHeight: 40px;
 $menuWidth: 65px;
 @include go('chart-common') {
   display: flex;

+ 2 - 2
src/views/chart/ContentCharts/index.vue

@@ -62,8 +62,8 @@ import {
 $width: 330px;
 /* 列表的宽度 */
 $widthScoped: 65px;
-/* 此高度与 ContentBox 组件关联*/
-$topHeight: 36px;
+/* 此高度与 ContentBox 组件关联 */
+$topHeight: 40px;
 
 @include go(content-charts) {
   width: $width;

+ 1 - 0
src/views/chart/ContentEdit/index.vue

@@ -6,6 +6,7 @@
     :showTop="false"
     :showBottom="true"
     :depth="1"
+    :xScroll="true"
     @drop="handleDrop"
     @dragover="handleDragOver"
   >