feat: 顶部标题组件添加Light模式和设置图标
This commit is contained in:
@@ -3,7 +3,9 @@
|
|||||||
const router = useRouter()
|
const router = useRouter()
|
||||||
|
|
||||||
defineProps({
|
defineProps({
|
||||||
title: { type: String, default: 'AI STYLING ASSISTANT' }
|
title: { type: String, default: 'AI STYLING ASSISTANT' },
|
||||||
|
light: { type: Boolean,default:false },
|
||||||
|
hasSetting: { type: Boolean,default:false }
|
||||||
})
|
})
|
||||||
|
|
||||||
defineEmits(['clickReturn'])
|
defineEmits(['clickReturn'])
|
||||||
@@ -15,9 +17,10 @@
|
|||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
<div class="header-title">
|
<div class="header-title" :class="{ 'light': light }">
|
||||||
<div class="return" @click="handleClickReturn"><SvgIcon name="return" size="34" /></div>
|
<div class="return" @click="handleClickReturn"><SvgIcon name="return" size="34" /></div>
|
||||||
<span class="title">{{ title }}</span>
|
<span class="title">{{ title }}</span>
|
||||||
|
<div class="setting" v-if="hasSetting"><SvgIcon name="setting" size="34" /></div>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
@@ -32,6 +35,7 @@
|
|||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
|
|
||||||
> .return {
|
> .return {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
left: 3.2rem;
|
left: 3.2rem;
|
||||||
@@ -43,5 +47,16 @@
|
|||||||
color: var(--header-title-color, #ffffff);
|
color: var(--header-title-color, #ffffff);
|
||||||
font-family: 'boskaRegular';
|
font-family: 'boskaRegular';
|
||||||
}
|
}
|
||||||
|
>.setting{
|
||||||
|
position: absolute;
|
||||||
|
right: 3.2rem;
|
||||||
|
display: inline-block;
|
||||||
|
}
|
||||||
|
|
||||||
|
&.light {
|
||||||
|
--header-title-color: #000000;
|
||||||
|
--svg-icon-color: #000000;
|
||||||
|
--header-title-background: #ffffff;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
Reference in New Issue
Block a user