feat: 汉字每天打卡基本完成,细节还待优化
This commit is contained in:
@@ -37,6 +37,34 @@
|
||||
overflow-y: auto;
|
||||
height: 500rpx;
|
||||
|
||||
.word-section {
|
||||
margin-bottom: 36rpx;
|
||||
|
||||
&:last-child {
|
||||
margin-bottom: 0;
|
||||
}
|
||||
|
||||
.word-section-title {
|
||||
font-size: 26rpx;
|
||||
color: #888888;
|
||||
padding-left: 28rpx;
|
||||
margin-bottom: 20rpx;
|
||||
font-weight: bold;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
|
||||
&::before {
|
||||
content: "";
|
||||
display: inline-block;
|
||||
width: 6rpx;
|
||||
height: 24rpx;
|
||||
background-color: #93d333;
|
||||
margin-right: 12rpx;
|
||||
border-radius: 3rpx;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.word-list {
|
||||
display: grid;
|
||||
grid-template-columns: repeat(6, 72rpx);
|
||||
|
||||
@@ -31,17 +31,42 @@
|
||||
wx:key="categoryIndex"
|
||||
title="{{wordList[categoryIndex].icon}} {{wordList[categoryIndex].categoryName}}">
|
||||
<view class="word-list-wrapper">
|
||||
<view class="word-list">
|
||||
<block
|
||||
wx:if="{{wordList[categoryIndex].sections && wordList[categoryIndex].sections.length > 0}}">
|
||||
<view
|
||||
class="word-item {{wxs.isSelected(selectedWords, item) ? 'selected' : ''}}"
|
||||
wx:for="{{wordList[categoryIndex].words}}"
|
||||
wx:key="index"
|
||||
data-word="{{item}}"
|
||||
bind:tap="onWordClick">
|
||||
<text class="word-item-text">{{item}}</text>
|
||||
<!-- <text class="word-item-icon icon-success"></text> -->
|
||||
class="word-section"
|
||||
wx:for="{{wordList[categoryIndex].sections}}"
|
||||
wx:for-item="section"
|
||||
wx:for-index="sectionIndex"
|
||||
wx:key="sectionIndex">
|
||||
<view class="word-section-title"
|
||||
>{{section.sectionName}}</view
|
||||
>
|
||||
<view class="word-list">
|
||||
<view
|
||||
class="word-item {{wxs.isSelected(selectedWords, item) ? 'selected' : ''}}"
|
||||
wx:for="{{section.words}}"
|
||||
wx:key="index"
|
||||
data-word="{{item}}"
|
||||
bind:tap="onWordClick">
|
||||
<text class="word-item-text">{{item}}</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</block>
|
||||
<block wx:else>
|
||||
<view class="word-list">
|
||||
<view
|
||||
class="word-item {{wxs.isSelected(selectedWords, item) ? 'selected' : ''}}"
|
||||
wx:for="{{wordList[categoryIndex].words}}"
|
||||
wx:key="index"
|
||||
data-word="{{item}}"
|
||||
bind:tap="onWordClick">
|
||||
<text class="word-item-text">{{item}}</text>
|
||||
<!-- <text class="word-item-icon icon-success"></text> -->
|
||||
</view>
|
||||
</view>
|
||||
</block>
|
||||
<view class="word-item-empty"></view>
|
||||
</view>
|
||||
</van-tab>
|
||||
|
||||
Reference in New Issue
Block a user