Files
lanecarford_front/src/views/Workshop/selectStyle.vue

172 lines
3.3 KiB
Vue
Raw Normal View History

2025-10-09 10:42:45 +08:00
<script setup lang="ts">
2025-10-09 16:04:55 +08:00
import { onMounted, onUnmounted, reactive, toRefs } from "vue";
2025-10-09 13:56:00 +08:00
import SelectItem from "@/components/selectStyle/selectItem.vue";
2025-10-10 16:03:12 +08:00
import HeaderTitle from '@/components/HeaderTitle.vue'
import { useRouter } from 'vue-router'
import editProfile1_1 from '@/assets/images/workshop/selectStyle/selectStyle1-1.png'
import editProfile1_2 from '@/assets/images/workshop/selectStyle/selectStyle1-2.png'
import editProfile1_3 from '@/assets/images/workshop/selectStyle/selectStyle1-3.png'
import editProfile1_4 from '@/assets/images/workshop/selectStyle/selectStyle1-4.png'
2025-10-21 10:20:57 +08:00
import { useGenerateStore } from '@/stores'
2025-10-10 16:03:12 +08:00
const router = useRouter()
2025-10-09 10:42:45 +08:00
//const props = defineProps({
//})
const emit = defineEmits([
'view-type'
])
2025-10-09 10:42:45 +08:00
let data = reactive({
2025-10-09 16:04:55 +08:00
selectList:
[
{
id:1,
imgList:[
editProfile1_1,
editProfile1_2,
editProfile1_3,
editProfile1_4,
2025-10-09 16:04:55 +08:00
],
isLike: false,
isAdd: false,
},
{
id:2,
imgList:[
editProfile1_1,
editProfile1_2,
editProfile1_3,
editProfile1_4,
2025-10-09 16:04:55 +08:00
],
isLike: false,
isAdd: false,
},
{
id:3,
2025-10-09 16:04:55 +08:00
imgList:[
editProfile1_1,
editProfile1_2,
editProfile1_3,
editProfile1_4,
2025-10-09 16:04:55 +08:00
],
isLike: false,
isAdd: false,
},
{
id:4,
2025-10-09 16:04:55 +08:00
imgList:[
editProfile1_1,
editProfile1_2,
editProfile1_3,
editProfile1_4,
2025-10-09 16:04:55 +08:00
],
isLike: false,
isAdd: false,
},
],
select:{
}
2025-10-09 10:42:45 +08:00
})
2025-10-21 10:20:57 +08:00
const generateStore = useGenerateStore()
const toSelectModelContinue = ()=>{
router.push({ path: 'selectModelContinue' })
2025-10-10 16:03:12 +08:00
}
2025-10-09 10:42:45 +08:00
onMounted(()=>{
emit('view-type', 1)
2025-10-21 10:20:57 +08:00
console.log(useGenerateStore())
2025-10-09 10:42:45 +08:00
})
onUnmounted(()=>{
})
defineExpose({})
const { selectList, select } = toRefs(data);
2025-10-09 10:42:45 +08:00
</script>
<template>
<header-title style-type="2" />
2025-10-09 10:42:45 +08:00
<div class="selectStyle">
2025-10-09 16:04:55 +08:00
<div class="text">
<div class="title">
Whats your Style?
2025-10-09 13:56:00 +08:00
</div>
2025-10-09 16:04:55 +08:00
<div class="info">
Select the outfit that matches you the most.
</div>
</div>
<div class="selectContent">
<SelectItem :selectList="selectList" v-model:select="select" />
2025-10-09 10:42:45 +08:00
</div>
</div>
<div class="footer placeholder"></div>
2025-10-10 16:03:12 +08:00
<div class="footer">
<button @click.stop="toSelectModelContinue">Continue</button>
2025-10-10 16:03:12 +08:00
</div>
2025-10-09 10:42:45 +08:00
</template>
<style lang="less" scoped>
.header-title {
--header-title-background: #f6f6f6;
}
2025-10-09 10:42:45 +08:00
.selectStyle{
width: 100%;
flex: 1;
2025-10-10 16:03:12 +08:00
// height: 100%;
2025-10-09 10:42:45 +08:00
position: relative;
display: flex;
flex-direction: column;
background-color: #f6f6f6;
overflow: hidden;
2025-10-09 16:04:55 +08:00
> .text{
text-align: center;
width: 100%;
margin-top: 3.4rem;
margin-bottom: 7.2rem;
2025-10-09 16:04:55 +08:00
> .title{
font-family: satoshiBold;
font-weight: 700;
font-size: 9.6rem;
line-height: 124%;
}
> .info{
font-size: 4rem;
font-weight: 400;
line-height: 124%;
margin-top: 1.3rem;
}
}
.selectContent{
padding: 0 3.5rem;
flex: 1;
overflow: auto;
2025-10-09 16:04:55 +08:00
}
2025-10-09 10:42:45 +08:00
}
2025-10-10 16:03:12 +08:00
.footer {
position: fixed;
width: 100%;
bottom: 0;
left: 0;
height: 11.2rem;
display: flex;
align-items: center;
justify-content: flex-end;
background-color: #f6f6f6;
&.placeholder{
position: relative;
}
2025-10-10 16:03:12 +08:00
> button {
width: 24.6rem;
height: 5.9rem;
border-radius: 0.7rem;
box-sizing: content-box;
border: 0.3rem solid #000;
background-color: #000;
font-family: satoshiBold;
font-weight: 700;
font-size: 3.6rem;
2025-10-10 16:03:12 +08:00
color: #fff;
margin-right: 5rem;
&:active {
opacity: 0.7;
}
}
}
2025-10-09 10:42:45 +08:00
</style>