You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
128 lines
2.8 KiB
128 lines
2.8 KiB
<template> |
|
<div class="drop-down-menu-wrapper"> |
|
<div class="content-top"> |
|
<!-- 功能容器 --> |
|
<div v-for="i in funcList" :key="i" class="func-wrapper" @click="i.onClick"> |
|
<img :src="getImgSrc(i.img)" class="func-img" width="100%" /> |
|
<span class="func-text">{{ i.text }}</span> |
|
</div> |
|
</div> |
|
<div class="content-btm" @click="pullUp()"> |
|
<img src="@/assets/imgs/drop-down-menu/retract@2x.png" width="100%" /> |
|
</div> |
|
</div> |
|
</template> |
|
|
|
<script lang="ts" setup> |
|
import { ref, onMounted } from "vue"; |
|
import { $commonService } from "@/services/framework/dependency-injection-service"; |
|
import router from "@/router"; |
|
|
|
const funcList = ref<any[]>([]); |
|
const emit = defineEmits(["pullUp"]); |
|
const getImgSrc = $commonService.$imgService.getImgSrc; |
|
|
|
onMounted(() => { |
|
funcList.value = [ |
|
{ |
|
img: "/assets/imgs/drop-down-menu/func-xiping@2x.png", |
|
text: "息屏" |
|
}, |
|
{ |
|
img: "/assets/imgs/drop-down-menu/func-tongsuo@2x.png", |
|
text: "童锁" |
|
}, |
|
{ |
|
img: "/assets/imgs/drop-down-menu/func-jiankang@2x.png", |
|
text: "健康" |
|
}, |
|
{ |
|
img: "/assets/imgs/drop-down-menu/func-ziqingjie@2x.png", |
|
text: "自清洁", |
|
onClick: () => { |
|
router.push("/selfClean"); |
|
} |
|
}, |
|
{ |
|
img: "/assets/imgs/drop-down-menu/func-gaowenshajun@2x.png", |
|
text: "高温除菌" |
|
}, |
|
{ |
|
img: "/assets/imgs/drop-down-menu/func-shuju@2x.png", |
|
text: "数据中心", |
|
onClick: () => { |
|
router.push("/dataCenter"); |
|
} |
|
}, |
|
{ |
|
img: "/assets/imgs/drop-down-menu/func-jieneng@2x.png", |
|
text: "节能" |
|
}, |
|
{ |
|
img: "/assets/imgs/drop-down-menu/func-set@2x.png", |
|
text: "设置" |
|
}, |
|
{ |
|
img: "/assets/imgs/drop-down-menu/func-zhenduan@2x.png", |
|
text: "智慧健康诊断" |
|
} |
|
]; |
|
}); |
|
|
|
/** 窗口上弹事件 */ |
|
const pullUp = () => { |
|
emit("pullUp"); |
|
}; |
|
</script> |
|
|
|
<style lang="scss" scoped> |
|
.drop-down-menu-wrapper { |
|
width: 100vw; |
|
height: 100vh; |
|
background-color: #0a101a; |
|
overflow: hidden; |
|
|
|
.content-top { |
|
padding: 19px 24px; |
|
padding-bottom: 0; |
|
display: flex; |
|
justify-content: space-between; |
|
flex-wrap: wrap; |
|
|
|
.func-wrapper { |
|
width: 210px; |
|
height: 200px; |
|
border-radius: 16px; |
|
display: flex; |
|
flex-direction: column; |
|
justify-content: center; |
|
align-items: center; |
|
margin: 5px 0; |
|
background: #20252e; |
|
|
|
.func-img { |
|
width: 66px; |
|
height: 66px; |
|
} |
|
|
|
.func-text { |
|
font-size: 28px; |
|
color: #fff; |
|
font-family: SourceHanSansCN-Regular, SourceHanSansCN; |
|
font-weight: 400; |
|
margin-top: 42px; |
|
} |
|
} |
|
} |
|
|
|
.content-btm { |
|
width: 100vw; |
|
text-align: center; |
|
padding-bottom: 6px; |
|
|
|
img { |
|
width: 142px; |
|
} |
|
} |
|
} |
|
</style>
|
|
|