|
@@ -2,29 +2,64 @@
|
|
|
<div
|
|
<div
|
|
|
ref="boxRef"
|
|
ref="boxRef"
|
|
|
:style="styleMap?.mainStyle"
|
|
:style="styleMap?.mainStyle"
|
|
|
- class="w-full h-full box-broder"
|
|
|
|
|
- :class="fixedHeight ? 'overflow-hidden' : 'h-auto!'"
|
|
|
|
|
|
|
+ class="w-full h-full flex flex-col box-border overflow-hidden relative"
|
|
|
>
|
|
>
|
|
|
- <div :style="styleMap?.titleStyle" class="flex items-center justify-between box-broder p-10px">
|
|
|
|
|
- <span class="whitespace-pre!">{{ title }}</span>
|
|
|
|
|
|
|
+ <ImageBg :src="styleMap?.mainStyle?.imageSrc" :imageStyle="styleMap?.mainStyle?.imageStyle" />
|
|
|
|
|
+ <div
|
|
|
|
|
+ :style="styleMap?.titleStyle"
|
|
|
|
|
+ class="h-40px shrink-0 overflow-hidden relative flex items-center justify-between box-border p-10px z-2"
|
|
|
|
|
+ >
|
|
|
|
|
+ <ImageBg
|
|
|
|
|
+ :src="styleMap?.titleStyle?.imageSrc"
|
|
|
|
|
+ :imageStyle="styleMap?.titleStyle?.imageStyle"
|
|
|
|
|
+ />
|
|
|
|
|
+ <span class="whitespace-pre! z-2">{{ title }}</span>
|
|
|
<span
|
|
<span
|
|
|
v-if="closeBtn"
|
|
v-if="closeBtn"
|
|
|
- class="bg-#2195f6 shadow-[0_4px_0_#cccccc] text-white w-40px h-30px rounded-10px grid place-items-center"
|
|
|
|
|
|
|
+ :style="styleMap?.titleButtonStyle"
|
|
|
|
|
+ class="bg-#2195f6 z-2 shadow-[0_4px_0_#cccccc] text-white w-40px h-30px rounded-10px relative grid place-items-center"
|
|
|
>
|
|
>
|
|
|
- <LuX size="14px" />
|
|
|
|
|
|
|
+ <ImageBg
|
|
|
|
|
+ :src="styleMap?.titleButtonStyle?.imageSrc"
|
|
|
|
|
+ :imageStyle="styleMap?.titleButtonStyle?.imageStyle"
|
|
|
|
|
+ />
|
|
|
|
|
+ <LuX size="14px" class="z-2" />
|
|
|
</span>
|
|
</span>
|
|
|
</div>
|
|
</div>
|
|
|
- <div :style="styleMap?.contentStyle" class="box-broder p-10px break-all whitespace-pre!">
|
|
|
|
|
- {{ content }}
|
|
|
|
|
|
|
+
|
|
|
|
|
+ <div
|
|
|
|
|
+ :style="styleMap?.contentStyle"
|
|
|
|
|
+ ref="txtBoxRef"
|
|
|
|
|
+ class="box-border flex-1 p-10px overflow-hidden break-all whitespace-pre-wrap relatvie z-2"
|
|
|
|
|
+ >
|
|
|
|
|
+ <div ref="txtRef">{{ content }}</div>
|
|
|
|
|
+ <div
|
|
|
|
|
+ class="v-scrollbar absolute right-6px w-4px"
|
|
|
|
|
+ :style="{
|
|
|
|
|
+ display: textHeight > textBoxHeight ? 'block' : 'none',
|
|
|
|
|
+ background: 'rgba(0,0,0,0.2)',
|
|
|
|
|
+ top: '42px',
|
|
|
|
|
+ height: '40px'
|
|
|
|
|
+ }"
|
|
|
|
|
+ ></div>
|
|
|
</div>
|
|
</div>
|
|
|
- <div class="flex items-center justify-around pb-16px">
|
|
|
|
|
|
|
+
|
|
|
|
|
+ <div class="h-40px shrink-0 flex items-center justify-around z-2">
|
|
|
<div
|
|
<div
|
|
|
- :style="{ ...styleMap?.btnsStyle, width: btnWidth + 'px', height: btnHeight + 'px' }"
|
|
|
|
|
|
|
+ :style="{
|
|
|
|
|
+ ...styleMap?.bottomButtonStyle,
|
|
|
|
|
+ width: btnWidth + 'px',
|
|
|
|
|
+ height: btnHeight + 'px'
|
|
|
|
|
+ }"
|
|
|
v-for="(btn, index) in btns"
|
|
v-for="(btn, index) in btns"
|
|
|
:key="index"
|
|
:key="index"
|
|
|
- class="grid place-items-center shadow-[0_4px_0_#cccccc] whitespace-pre!"
|
|
|
|
|
|
|
+ class="relative grid place-items-center shadow-[0_4px_0_#cccccc] whitespace-pre!"
|
|
|
>
|
|
>
|
|
|
- {{ btn.text }}
|
|
|
|
|
|
|
+ <ImageBg
|
|
|
|
|
+ :src="styleMap?.bottomButtonStyle?.imageSrc"
|
|
|
|
|
+ :imageStyle="styleMap?.bottomButtonStyle?.imageStyle"
|
|
|
|
|
+ />
|
|
|
|
|
+ <span class="z-2">{{ btn.text }}</span>
|
|
|
</div>
|
|
</div>
|
|
|
</div>
|
|
</div>
|
|
|
</div>
|
|
</div>
|
|
@@ -37,6 +72,8 @@ import { LuX } from 'vue-icons-plus/lu'
|
|
|
import { useProjectStore } from '@/store/modules/project'
|
|
import { useProjectStore } from '@/store/modules/project'
|
|
|
import { useResizeObserver } from 'vue-hooks-plus'
|
|
import { useResizeObserver } from 'vue-hooks-plus'
|
|
|
|
|
|
|
|
|
|
+import ImageBg from '../ImageBg.vue'
|
|
|
|
|
+
|
|
|
const props = defineProps<{
|
|
const props = defineProps<{
|
|
|
width: number
|
|
width: number
|
|
|
height: number
|
|
height: number
|
|
@@ -61,6 +98,22 @@ const props = defineProps<{
|
|
|
|
|
|
|
|
const projectStore = useProjectStore()
|
|
const projectStore = useProjectStore()
|
|
|
const boxRef = ref<HTMLDivElement>()
|
|
const boxRef = ref<HTMLDivElement>()
|
|
|
|
|
+const txtBoxRef = ref<HTMLDivElement>()
|
|
|
|
|
+const txtRef = ref<HTMLSpanElement>()
|
|
|
|
|
+
|
|
|
|
|
+const textBoxHeight = ref(0)
|
|
|
|
|
+const textHeight = ref(0)
|
|
|
|
|
+
|
|
|
|
|
+useResizeObserver(txtBoxRef, (entries) => {
|
|
|
|
|
+ const entry = entries[0]
|
|
|
|
|
+ const { height: _h } = entry.contentRect
|
|
|
|
|
+ textBoxHeight.value = _h
|
|
|
|
|
+})
|
|
|
|
|
+useResizeObserver(txtRef, (entries) => {
|
|
|
|
|
+ const entry = entries[0]
|
|
|
|
|
+ const { height: _h } = entry.contentRect
|
|
|
|
|
+ textHeight.value = _h
|
|
|
|
|
+})
|
|
|
|
|
|
|
|
useResizeObserver(boxRef, (entries) => {
|
|
useResizeObserver(boxRef, (entries) => {
|
|
|
const entry = entries[0]
|
|
const entry = entries[0]
|