feat: 首页tab的调整
This commit is contained in:
@@ -11,7 +11,7 @@
|
||||
v-if="leftSelected || leftUnselected"
|
||||
:src="modelValue === 0 ? (leftSelected || leftUnselected) : (leftUnselected || leftSelected)"
|
||||
class="tab-image"
|
||||
mode="aspectFill"
|
||||
mode="scaleToFill"
|
||||
/>
|
||||
<text class="tab-text">探索发现</text>
|
||||
</view>
|
||||
@@ -27,7 +27,7 @@
|
||||
v-if="rightSelected || rightUnselected"
|
||||
:src="modelValue === 1 ? (rightSelected || rightUnselected) : (rightUnselected || rightSelected)"
|
||||
class="tab-image"
|
||||
mode="aspectFill"
|
||||
mode="scaleToFill"
|
||||
/>
|
||||
<text class="tab-text">AI伴游</text>
|
||||
<view
|
||||
@@ -59,91 +59,6 @@ const handleSwitch = (i) => {
|
||||
};
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
.ai-tab-wrapper {
|
||||
width: 100%;
|
||||
background-color: #61d68b;
|
||||
}
|
||||
|
||||
.tab-container {
|
||||
position: relative;
|
||||
width: 100%;
|
||||
height: 50px;
|
||||
display: flex;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.tab-item {
|
||||
position: relative;
|
||||
flex: 1;
|
||||
height: 50px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
transition: all 0.3s ease;
|
||||
}
|
||||
|
||||
.tab-item.active {
|
||||
z-index: 10;
|
||||
}
|
||||
|
||||
.tab-content {
|
||||
position: absolute;
|
||||
inset: 0;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
transition: background 0.3s;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.tab-text {
|
||||
font-size: 18px;
|
||||
font-weight: 500;
|
||||
color: rgba(255, 255, 255, 0.65);
|
||||
z-index: 20;
|
||||
}
|
||||
|
||||
.tab-image {
|
||||
position: absolute;
|
||||
inset: 0;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
display: block;
|
||||
object-fit: cover;
|
||||
z-index: 5;
|
||||
}
|
||||
|
||||
.tab-item.active .tab-text {
|
||||
color: #2e312f;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.is-left {
|
||||
margin-right: -24px;
|
||||
}
|
||||
|
||||
.is-right {
|
||||
margin-left: -24px;
|
||||
}
|
||||
|
||||
.status-dot {
|
||||
display: inline-block;
|
||||
margin-left: 6px;
|
||||
width: 6px;
|
||||
height: 6px;
|
||||
border-radius: 50%;
|
||||
z-index: 22;
|
||||
transform: translateY(-1px);
|
||||
}
|
||||
|
||||
.status-dot--active {
|
||||
background-color: #26d46c;
|
||||
}
|
||||
|
||||
.status-dot--inactive {
|
||||
background-color: rgba(255, 255, 255, 0.65);
|
||||
border: 1px solid rgba(0, 0, 0, 0.08);
|
||||
}
|
||||
|
||||
<style lang="scss" scoped>
|
||||
@import "./styles/index.scss";
|
||||
</style>
|
||||
|
||||
Reference in New Issue
Block a user