first commit

This commit is contained in:
duanshuwen
2026-05-25 23:40:50 +08:00
commit 30b9100b4a
569 changed files with 75942 additions and 0 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 30 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 28 KiB

View File

@@ -0,0 +1,68 @@
<template>
<view class="ai-tab-wrapper">
<view class="tab-container">
<view
class="tab-item is-left"
:class="{ active: modelValue === 0 }"
@tap="handleSwitch(0)"
>
<view class="tab-content">
<image
v-if="leftSelected || leftUnselected"
:src="modelValue === 0 ? (leftSelected || leftUnselected) : (leftUnselected || leftSelected)"
class="tab-image"
mode="scaleToFill"
/>
<view class="tab-label">
<text class="tab-text">探索发现</text>
</view>
</view>
</view>
<view
class="tab-item is-right"
:class="{ active: modelValue === 1 }"
@tap="handleSwitch(1)"
>
<view class="tab-content">
<image
v-if="rightSelected || rightUnselected"
:src="modelValue === 1 ? (rightSelected || rightUnselected) : (rightUnselected || rightSelected)"
class="tab-image"
mode="scaleToFill"
/>
<view class="tab-label">
<text class="tab-text">AI伴游</text>
<view
v-if="showDot"
:class="['status-dot', modelValue === 1 ? 'status-dot--active' : 'status-dot--inactive']"
></view>
</view>
</view>
</view>
</view>
</view>
</template>
<script setup>
import leftSelected from "./images/L_02.png";
import leftUnselected from "./images/L_01.png";
import rightSelected from "./images/R_02.png";
import rightUnselected from "./images/R_01.png";
const props = defineProps({
modelValue: { type: Number, default: 0 },
showDot: { type: Boolean, default: true },
});
const emit = defineEmits(["update:modelValue", "change"]);
const handleSwitch = (i) => {
emit("update:modelValue", i);
emit("change", i);
};
</script>
<style lang="scss" scoped>
@import "./styles/index.scss";
</style>

View File

@@ -0,0 +1,103 @@
.ai-tab-wrapper {
width: 100%;
}
.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;
line-height: 0;
transition: background 0.3s;
overflow: hidden;
}
.tab-text {
font-size: 18px;
font-weight: 500;
color: rgba(255, 255, 255, 0.65);
}
.tab-image {
position: absolute;
left: 0;
right: 0;
top: auto;
bottom: 0;
width: 100%;
height: 48px;
display: block;
vertical-align: bottom;
z-index: 5;
}
.tab-label {
display: flex;
align-items: center;
justify-content: center;
position: relative;
z-index: 20;
}
.tab-item.active .tab-text {
color: #2e312f;
font-weight: bold;
}
.is-left {
margin-right: -24px;
}
.is-left .tab-label {
transform: translateX(-20px);
}
.is-right {
margin-left: -24px;
}
.is-right .tab-label {
transform: translateX(20px);
}
.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);
}