Forráskód Böngészése

弹窗 样式 修改

黄琪勇 7 hónapja
szülő
commit
52916e9d36

+ 3 - 1
src/components/Popover.vue

@@ -21,6 +21,7 @@ const props = withDefaults(
     appendTo?: HTMLElement | "parent"
     appendTo?: HTMLElement | "parent"
     contentStyle?: CSSProperties
     contentStyle?: CSSProperties
     center?: boolean
     center?: boolean
+    offsetOne?: number
     offset?: number
     offset?: number
   }>(),
   }>(),
   {
   {
@@ -28,6 +29,7 @@ const props = withDefaults(
     trigger: "click",
     trigger: "click",
     placement: "bottom",
     placement: "bottom",
     center: false,
     center: false,
+    offsetOne: 0,
     offset: 8
     offset: 8
   }
   }
 )
 )
@@ -67,7 +69,7 @@ onMounted(() => {
     interactive: true,
     interactive: true,
     appendTo: props.appendTo || document.body,
     appendTo: props.appendTo || document.body,
     maxWidth: "none",
     maxWidth: "none",
-    offset: [0, props.offset],
+    offset: [props.offsetOne, props.offset],
     duration: 200,
     duration: 200,
     animation: "scale",
     animation: "scale",
     theme: "popover",
     theme: "popover",

+ 2 - 2
src/views/Editor/CanvasTool/index.vue

@@ -145,7 +145,7 @@
         <Popover trigger="click" v-model:value="moreToolsVisible" :offset="10" @click.stop>
         <Popover trigger="click" v-model:value="moreToolsVisible" :offset="10" @click.stop>
           <template #content>
           <template #content>
             <PopoverMenuItem>
             <PopoverMenuItem>
-              <Popover trigger="click" v-model:value="chartPoolVisible" :offset="10">
+              <Popover trigger="click" v-model:value="chartPoolVisible" placement="right" :offsetOne="50" :offset="36">
                 <template #content>
                 <template #content>
                   <ChartPool
                   <ChartPool
                     @select="
                     @select="
@@ -163,7 +163,7 @@
               </Popover>
               </Popover>
             </PopoverMenuItem>
             </PopoverMenuItem>
             <PopoverMenuItem>
             <PopoverMenuItem>
-              <Popover trigger="click" v-model:value="tableGeneratorVisible" :offset="10">
+              <Popover trigger="click" v-model:value="tableGeneratorVisible" placement="right" :offsetOne="130" :offset="36">
                 <template #content>
                 <template #content>
                   <TableGenerator
                   <TableGenerator
                     @close="tableGeneratorVisible = false"
                     @close="tableGeneratorVisible = false"