Files
doodle-mini/miniprogram/components/word-picker/word-picker.wxml
T
2025-06-27 17:44:10 +08:00

53 lines
1.6 KiB
Plaintext

<van-popup
show="{{ show }}"
bind:close="onClose"
round
position="bottom"
custom-style="height: 65%"
custom-class="word-picker">
<view class="word-picker-title">请选择文字</view>
<van-tabs
id="tabs"
animated
color="#93d333"
ellipsis="{{false}}"
line-width="90rpx"
nav-class="nav-class"
tab-class="tab-class"
wrap-class="wrap-class"
tab-active-class="tab-active-class"
swipeable="{{true}}"
active="{{currentTab}}"
bind:change="onTabChange">
<van-tab
wx:for="{{wordList}}"
wx:for-index="wordIndex"
wx:key="wordIndex"
title="{{wordList[wordIndex].categoryName}}">
<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-word-text"
wx:for="{{selectedWords}}"
wx:key="index"
>{{item}}</text
>
</view>
</van-popup>