feat 项目设置Info

This commit is contained in:
Ironsp
2026-09-02 10:58:49 +08:00
parent 10b5624dac
commit 6eed913a82
9 changed files with 322 additions and 3 deletions

View File

@@ -26,6 +26,6 @@ definePage({
.content {
padding: 16px;
padding-top: 100px;
padding-top: 72px;
}
</style>

View File

@@ -5,6 +5,8 @@ definePage({
navigationStyle: 'custom',
},
})
const activeTab = ref(0)
</script>
<template>
@@ -12,7 +14,26 @@ definePage({
<back-nav title="设置" />
<view class="content">
<!-- 设置内容区域 -->
<view class="tabs-card">
<view
v-for="(tab, index) in ['项目设置', 'WIFI设置', '传感器', '电台设置']"
:key="index"
class="tab-item"
:class="{ active: activeTab === index }"
@tap="activeTab = index"
>
<text class="tab-text">
{{ tab }}
</text>
</view>
</view>
<view class="card">
<settings-projectSettings v-if="activeTab === 0" />
<settings-wifiSettings v-else-if="activeTab === 1" />
<settings-sensor v-else-if="activeTab === 2" />
<settings-radioSettings v-else />
</view>
</view>
</view>
</template>
@@ -25,6 +46,42 @@ definePage({
.content {
padding: 16px;
padding-top: 100px;
padding-top: 72px;
}
.tabs-card {
display: flex;
gap: 140rpx;
margin-bottom: 16px;
}
.tab-item {
flex: 1;
background: #fff;
border-radius: 8px;
padding: 12px 24px;
text-align: center;
}
.tab-item.active {
background: #e6f7ff;
border: 1px solid #1890ff;
}
.tab-text {
font-size: 14px;
color: #333;
}
.tab-item.active .tab-text {
color: #1890ff;
font-weight: bold;
}
/* .card {
background: #fff;
border-radius: 12px;
padding: 16px;
min-height: 300px;
} */
</style>