feat:优化练字贴

This commit is contained in:
R524809
2026-01-21 09:07:57 +08:00
parent 9c13b44806
commit 943250b34a
6 changed files with 490 additions and 341 deletions
+20 -23
View File
@@ -2,13 +2,29 @@
<view class="wrapper">
<text class="wrapper-title">自定义练字贴</text>
<view class="word-input-box">
<word-input bind:onConfirm="onConfirmInput" width="410rpx" />
<word-input bind:onConfirm="onConfirmInput" style="width: 100%;"/>
</view>
<view class="action-buttons-box">
<toy-button
type="green"
bind:click="openSelectWordPopup"
width="200rpx">
height="80rpx"
width="410rpx"
icon="success"
icon-class-prefix="van-icon">
选择文字
</toy-button>
<toy-button
disabled="{{words.length <= 0}}"
type="white"
bind:click="clearWords"
width="220rpx"
height="80rpx"
icon="clear"
icon-class-prefix="toy-icon">
清空
</toy-button>
</view>
<view class="word-card-box">
@@ -27,28 +43,9 @@
<empty-state
wx:if="{{!words.length}}"
title="还没有添加文字"
desc="请在上方输入文字或点击选择文字按钮,开始创建你的练字田字格吧!"
desc='请在上方输入文字或点击"选择文字"按钮,开始创建你的练字田字格吧!'
hint="提示:最多可以同时添加 11 个文字" />
</view>
<view class="operation-box">
<toy-button
type="primary"
bind:click="refreshWords"
width="410rpx"
icon="refresh"
icon-class-prefix="toy-icon">
随机生成
</toy-button>
<toy-button
disabled="{{words.length <= 0}}"
type="white"
bind:click="clearWords"
width="200rpx"
icon="clear"
icon-class-prefix="toy-icon">
清空
</toy-button>
</view>
</view>
<view id="previewWrapper" class="wrapper">
@@ -88,7 +85,7 @@
</view>
<word-picker
show="{{showSelectWordPopup}}"
selectedWords="{{words}}"
selectedWords="{{selectedWords}}"
max="11"
bind:onClose="closeSelectWordPopup"
bind:onChange="onChangeWord" />