提交修改
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
.card {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
background: white;
|
||||
background: var(--color-card);
|
||||
border-radius: 12px;
|
||||
margin: 0 12px 8px;
|
||||
padding: 14px;
|
||||
@@ -12,7 +12,7 @@
|
||||
.card-icon {
|
||||
width: 44px; height: 44px;
|
||||
border-radius: 12px;
|
||||
background: #FFF0EB;
|
||||
background: var(--color-active-bg);
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
@@ -20,7 +20,7 @@
|
||||
margin-right: 14px;
|
||||
}
|
||||
.card-body { flex: 1; display: flex; flex-direction: column; gap: 2px; }
|
||||
.card-name { font-size: 16px; font-weight: 600; }
|
||||
.card-meta { font-size: 13px; color: #86868B; }
|
||||
.done-badge { font-size: 12px; color: #34C759; font-weight: 600; margin-top: 2px; }
|
||||
.card-streak { font-size: 14px; color: #FF6B35; font-weight: 600; }
|
||||
.card-name { font-size: 16px; font-weight: 600; color: var(--color-text); }
|
||||
.card-meta { font-size: 13px; color: var(--color-text-secondary); }
|
||||
.done-badge { font-size: 12px; color: var(--color-success); font-weight: 600; margin-top: 2px; }
|
||||
.card-streak { font-size: 14px; color: var(--color-primary); font-weight: 600; }
|
||||
@@ -1,6 +1,9 @@
|
||||
const app = getApp()
|
||||
|
||||
Component({
|
||||
properties: {
|
||||
active: { type: String, value: 'home' },
|
||||
themeMode: { type: String, value: 'light' },
|
||||
tabs: {
|
||||
type: Array,
|
||||
value: [
|
||||
@@ -10,6 +13,11 @@ Component({
|
||||
],
|
||||
},
|
||||
},
|
||||
lifetimes: {
|
||||
attached() {
|
||||
this.setData({ themeMode: app.globalData.themeMode })
|
||||
},
|
||||
},
|
||||
methods: {
|
||||
onSwitch(e) {
|
||||
this.triggerEvent('switch', { key: e.currentTarget.dataset.key })
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
<view class="nav-bar">
|
||||
<view data-theme="{{themeMode}}" class="nav-bar">
|
||||
<view wx:for="{{tabs}}" wx:key="key" class="nav-item" data-key="{{item.key}}" bindtap="onSwitch">
|
||||
<text class="nav-icon">{{item.icon}}</text>
|
||||
<text class="nav-label {{active===item.key?'active':''}}">{{item.label}}</text>
|
||||
|
||||
@@ -3,8 +3,8 @@
|
||||
align-items: center;
|
||||
justify-content: space-around;
|
||||
padding: 8px 0 24px;
|
||||
border-top: 0.5px solid #E5E5EA;
|
||||
background: rgba(245,245,247,0.95);
|
||||
border-top: 0.5px solid var(--color-border);
|
||||
background: var(--color-nav-bg);
|
||||
position: fixed;
|
||||
bottom: 0;
|
||||
left: 0;
|
||||
@@ -20,5 +20,5 @@
|
||||
padding: 4px;
|
||||
}
|
||||
.nav-icon { font-size: 22px; }
|
||||
.nav-label { font-size: 10px; color: #86868B; }
|
||||
.nav-label.active { color: #FF6B35; font-weight: 600; }
|
||||
.nav-label { font-size: 10px; color: var(--color-text-secondary); }
|
||||
.nav-label.active { color: var(--color-primary); font-weight: 600; }
|
||||
Reference in New Issue
Block a user