feat: 选择文字

This commit is contained in:
2025-06-27 17:44:10 +08:00
parent aa9d74c2d1
commit 23ad49d333
8 changed files with 124 additions and 20 deletions
@@ -3,15 +3,20 @@
bind:close="onClose"
round
position="bottom"
custom-style="height: 60%"
custom-style="height: 65%"
custom-class="word-picker">
<view class="word-picker-title">请选择文字</view>
<van-tabs
id="tabs"
animated
color="#ff1a34"
color="#93d333"
ellipsis="{{false}}"
line-width="90rpx"
nav-class="nav-class"
tab-class="tab-class"
wrap-class="wrap-class"
swipeable
tab-active-class="tab-active-class"
swipeable="{{true}}"
active="{{currentTab}}"
bind:change="onTabChange">
<van-tab
@@ -19,20 +24,24 @@
wx:for-index="wordIndex"
wx:key="wordIndex"
title="{{wordList[wordIndex].categoryName}}">
<view class="word-list">
<view
class="word-item"
wx:for="{{wordList[wordIndex].words}}"
wx:key="index"
bind:tap="onWordClick">
<text class="word-item-text">{{item}}</text>
<!-- <text class="word-item-icon icon-success"></text> -->
<view class="word-list-wrapper">
<view class="word-list">
<view
class="word-item"
wx:for="{{wordList[wordIndex].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>
<view class="word-item-empty"></view>
</view>
</van-tab>
</van-tabs>
<view class="selected-words">
<text class="selected-words-title">已选文字:</text>
已选文字:
<text
class="selected-word-text"
wx:for="{{selectedWords}}"