hldy_app_mini/pages/NursingNew/component/leftcontent/leftcontent.vue

137 lines
2.8 KiB
Vue
Raw Normal View History

2025-12-25 13:27:31 +08:00
<template>
<view>
2025-12-26 17:14:23 +08:00
<view class="letbox" :style="style">
2026-01-05 09:29:35 +08:00
<view class="logomain tp">
2025-12-25 13:27:31 +08:00
<image src="/static/shouye/logo2.png" mode="aspectFill"></image>
</view>
<view class="cont">
2026-01-05 09:29:43 +08:00
<view class="items" v-for="(v,i) in list" :key='i' :class="{'act':i==dexleft}" @click="dexleft = i;emit('navurl',i,v)">
2025-12-25 13:27:31 +08:00
<view class="tm guodu">
<image :src="i==dexleft?v.urls:v.url" mode="aspectFill" class="guodu"></image>
<text>{{v.name}}</text>
</view>
2025-12-26 15:35:54 +08:00
<!-- <view class="heng guodu" :style="i!=dexleft&&i!=list.length-1?'opacity: 1':'opacity: 0'"></view> -->
2025-12-25 13:27:31 +08:00
</view>
</view>
2026-01-06 08:53:57 +08:00
<view class="logo">
<view class="tp">
<image src="/static/shouye/xd.png" mode="aspectFill"></image>
</view>
<text>{{uni.getStorageSync('realname')}}</text>
2025-12-25 13:27:31 +08:00
</view>
</view>
</view>
</template>
<script setup lang="ts">
import { ref, onMounted, onBeforeUnmount, computed, nextTick, watch, reactive } from 'vue';
const props = defineProps({
list: {
type: Array
2025-12-26 17:14:23 +08:00
},
style:{
type:String
2025-12-25 13:27:31 +08:00
}
});
const emit = defineEmits(['navurl'])
const dexleft = ref(0);
</script>
<style scoped lang="less">
.letbox{
width: 8.2vw;
height: 100vh;
background:rgba(255, 255, 255, 0.4);
display: flex;
flex-direction: column;
justify-content: space-between;
align-items: center;
2026-01-06 08:53:57 +08:00
padding: 3.8vw 0 1vw 0;
2025-12-25 13:40:02 +08:00
margin-right: 3vw;
2025-12-25 13:27:31 +08:00
.logo{
width: 3.8vw;
2026-01-06 08:53:57 +08:00
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
view{
width: 3.8vw;
height: 3.8vw;
}
text{
font-size: 1.2vw;
margin-top: 0.6vw;
color: #666666;
}
2025-12-25 13:27:31 +08:00
}
2026-01-05 09:29:35 +08:00
.logomain{
2026-01-06 11:06:16 +08:00
width: 6vw;
height: 6vw;
2026-01-05 09:29:35 +08:00
}
2025-12-25 13:27:31 +08:00
.cont{
2026-01-05 14:28:16 +08:00
width: 6vw;
2025-12-25 13:27:31 +08:00
display: flex;
flex-direction: column;
2026-01-05 14:28:16 +08:00
// background-color: red;
2025-12-25 13:27:31 +08:00
.act{
background: RGBA(228, 229, 231, 1);
border-radius: 1.1vw;
.tm{
image{
width: 2.2vw !important;
height: 2.2vw !important;
}
}
}
.items{
2026-01-05 14:28:16 +08:00
width: 6vw;
2025-12-25 13:27:31 +08:00
height: 4.5vw;
display: flex;
flex-direction: column;
align-items: center;
position: relative;
justify-content: space-between;
2025-12-26 15:35:54 +08:00
margin-top: 0vw;
2025-12-25 13:27:31 +08:00
padding: 0.25vw 0;
.tm{
2026-01-05 14:28:16 +08:00
width: 6vw;
2025-12-25 13:27:31 +08:00
height: 4vw;
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
image{
width: 2vw;
height: 2vw;
}
text{
font-weight: 400;
font-size: 0.9vw;
color: #666666;
}
}
.heng{
position: absolute;
left: 1.2vw;
bottom: -0.6vw;
width: 1.6vw;
height: 2px;
border-radius: 1px;
background: #c9c9c9;
}
}
}
}
.tp image{
width: 100%;
height: 100%;
}
.guodu {
transition: .4s;
-webkit-transform-style: preserve-3d;
-webkit-overflow-scrolling: touch;
}
</style>