2025-10-09 15:43:43 +08:00
|
|
|
<script setup lang="ts">
|
|
|
|
|
import { useRouter } from 'vue-router'
|
|
|
|
|
const router = useRouter()
|
|
|
|
|
|
|
|
|
|
defineProps({
|
2025-10-14 13:41:26 +08:00
|
|
|
title: { type: String, default: 'AI STYLING ASSISTANT' },
|
2025-10-16 11:01:54 +08:00
|
|
|
hasSetting: { type: Boolean, default: false },
|
2025-11-17 11:24:46 +08:00
|
|
|
styleType: { type: String, default: '1' },//1低 2高 3-12rem
|
2025-10-21 16:40:13 +08:00
|
|
|
isPlaceholder: { type: Boolean, default: true },
|
2025-10-09 15:43:43 +08:00
|
|
|
})
|
|
|
|
|
|
|
|
|
|
defineEmits(['clickReturn'])
|
|
|
|
|
|
|
|
|
|
const handleClickReturn = () => {
|
|
|
|
|
router.back()
|
|
|
|
|
// emit('clickReturn')
|
|
|
|
|
}
|
|
|
|
|
</script>
|
|
|
|
|
|
|
|
|
|
<template>
|
2025-10-16 11:01:54 +08:00
|
|
|
<div class="header-title" :style-type="styleType">
|
|
|
|
|
<div class="main">
|
|
|
|
|
<div class="return" @click="handleClickReturn"><SvgIcon name="return" size="34" /></div>
|
|
|
|
|
<span class="title">{{ title }}</span>
|
2025-10-21 09:39:28 +08:00
|
|
|
<div class="setting" v-if="hasSetting"><SvgIcon name="setting" size="44" /></div>
|
2025-10-16 11:01:54 +08:00
|
|
|
</div>
|
2025-10-21 16:40:13 +08:00
|
|
|
<div class="placeholder" v-if="isPlaceholder"></div>
|
2025-10-09 15:43:43 +08:00
|
|
|
</div>
|
|
|
|
|
</template>
|
|
|
|
|
|
|
|
|
|
<style scoped lang="less">
|
|
|
|
|
.header-title {
|
|
|
|
|
width: 100%;
|
2025-10-16 11:01:54 +08:00
|
|
|
&[style-type="2"] {
|
|
|
|
|
--header-title-height: 14.5rem;
|
|
|
|
|
--header-title-border-bottom-width: 0.2rem;
|
|
|
|
|
--header-title-return-left: 7.8rem;
|
2025-10-09 15:43:43 +08:00
|
|
|
}
|
2025-11-17 11:24:46 +08:00
|
|
|
&[style-type="3"] {
|
|
|
|
|
--header-title-height: 12rem;
|
|
|
|
|
--header-title-border-bottom-width: 0.2rem;
|
|
|
|
|
}
|
2025-10-16 11:01:54 +08:00
|
|
|
> div {
|
|
|
|
|
width: 100%;
|
|
|
|
|
height: var(--header-title-height, 9.9rem);
|
|
|
|
|
border-bottom-width: var(--header-title-border-bottom-width, 0);
|
|
|
|
|
border-bottom-style: solid;
|
|
|
|
|
border-bottom-color: var(--header-title-border-bottom-color, #D5D5D5);
|
2025-10-14 13:41:26 +08:00
|
|
|
}
|
2025-10-16 11:01:54 +08:00
|
|
|
> .main {
|
|
|
|
|
position: fixed;
|
|
|
|
|
top: 0;
|
|
|
|
|
z-index: var(--header-title-z-index, 999);
|
|
|
|
|
background-color: var(--header-title-background, #fff);
|
|
|
|
|
display: flex;
|
|
|
|
|
align-items: center;
|
|
|
|
|
justify-content: center;
|
|
|
|
|
|
|
|
|
|
> .return {
|
|
|
|
|
position: absolute;
|
|
|
|
|
left: var(--header-title-return-left, 3.2rem);
|
|
|
|
|
display: inline-block;
|
|
|
|
|
--svg-icon-color: var(--header-title-color, #000);
|
|
|
|
|
}
|
|
|
|
|
> .title {
|
|
|
|
|
font-size: 4.8rem;
|
|
|
|
|
color: var(--header-title-color, #000);
|
|
|
|
|
font-family: 'boskaRegular';
|
|
|
|
|
}
|
|
|
|
|
> .setting {
|
|
|
|
|
position: absolute;
|
|
|
|
|
right: 3.2rem;
|
|
|
|
|
display: inline-block;
|
2025-11-03 13:24:42 +08:00
|
|
|
color: var(--header-title-color, #000);
|
2025-10-16 11:01:54 +08:00
|
|
|
}
|
2025-10-14 13:41:26 +08:00
|
|
|
}
|
2025-10-16 11:01:54 +08:00
|
|
|
|
2025-10-09 15:43:43 +08:00
|
|
|
}
|
|
|
|
|
</style>
|