feat: 右上角图标随个人中心弹窗展示而变化
This commit is contained in:
@@ -1,13 +1,23 @@
|
||||
<script setup lang="ts">
|
||||
import { ref } from 'vue'
|
||||
import { useRouter } from 'vue-router'
|
||||
import MyEvent from '@/utils/myEvent'
|
||||
|
||||
const router = useRouter()
|
||||
|
||||
|
||||
defineProps({
|
||||
title: { type: String, default: 'STYLING ASSISTANT' }
|
||||
title: { type: String, default: 'STYLING ASSISTANT' },
|
||||
})
|
||||
|
||||
const emit = defineEmits(['clickReturn', 'clickProfile'])
|
||||
|
||||
const profileVisible = ref(false)
|
||||
const handleProfileVisibleChange = (visible) => {
|
||||
profileVisible.value = visible
|
||||
}
|
||||
MyEvent.add('change-profile-visible',handleProfileVisibleChange)
|
||||
|
||||
const handleClickReturn = () => {
|
||||
router.back()
|
||||
// emit('clickReturn')
|
||||
@@ -22,7 +32,9 @@
|
||||
<div class="header-title">
|
||||
<div class="return" @click="handleClickReturn"><SvgIcon name="return" size="34" /></div>
|
||||
<span class="title">{{ title }}</span>
|
||||
<div class="profile" @click="handleClickProfile"><SvgIcon name="profile" size="45" /></div>
|
||||
<div class="profile" @click="handleClickProfile">
|
||||
<SvgIcon :name="profileVisible ? 'profileFilledBlack' : 'profile_white'" size="45" />
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user