feat:【ele】【mall】diy-editor 的 title-bar 使用 tailwindcss 简化 style
This commit is contained in:
@@ -11,7 +11,10 @@ defineOptions({ name: 'TitleBar' });
|
|||||||
defineProps<{ property: TitleBarProperty }>();
|
defineProps<{ property: TitleBarProperty }>();
|
||||||
</script>
|
</script>
|
||||||
<template>
|
<template>
|
||||||
<div class="title-bar" :style="{ height: `${property.height}px` }">
|
<div
|
||||||
|
class="relative box-border min-h-[20px] w-full"
|
||||||
|
:style="{ height: `${property.height}px` }"
|
||||||
|
>
|
||||||
<ElImage
|
<ElImage
|
||||||
v-if="property.bgImgUrl"
|
v-if="property.bgImgUrl"
|
||||||
:src="property.bgImgUrl"
|
:src="property.bgImgUrl"
|
||||||
@@ -51,7 +54,7 @@ defineProps<{ property: TitleBarProperty }>();
|
|||||||
</div>
|
</div>
|
||||||
<!-- 更多 -->
|
<!-- 更多 -->
|
||||||
<div
|
<div
|
||||||
class="more"
|
class="absolute bottom-0 right-2 top-0 m-auto flex items-center justify-center text-[10px] text-[#969799]"
|
||||||
v-show="property.more.show"
|
v-show="property.more.show"
|
||||||
:style="{
|
:style="{
|
||||||
color: property.descriptionColor,
|
color: property.descriptionColor,
|
||||||
@@ -64,25 +67,3 @@ defineProps<{ property: TitleBarProperty }>();
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
<style scoped lang="scss">
|
|
||||||
.title-bar {
|
|
||||||
position: relative;
|
|
||||||
box-sizing: border-box;
|
|
||||||
width: 100%;
|
|
||||||
min-height: 20px;
|
|
||||||
|
|
||||||
/* 更多 */
|
|
||||||
.more {
|
|
||||||
position: absolute;
|
|
||||||
top: 0;
|
|
||||||
right: 8px;
|
|
||||||
bottom: 0;
|
|
||||||
display: flex;
|
|
||||||
align-items: center;
|
|
||||||
justify-content: center;
|
|
||||||
margin: auto;
|
|
||||||
font-size: 10px;
|
|
||||||
color: #969799;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
</style>
|
|
||||||
|
|||||||
Reference in New Issue
Block a user