feat:添加随机生成和清空功能

This commit is contained in:
2025-06-26 16:32:57 +08:00
parent 9ffa009786
commit 0992d9f2d1
13 changed files with 357 additions and 212 deletions
+30 -2
View File
@@ -1,7 +1,16 @@
<view class="page-container">
<view class="wrapper">
<view class="setting-wrapper">
<text class="wrapper-title">自定义涂鸦卡</text>
<word-input bind:onConfirm="onConfirmInput" />
<view class="word-input-box">
<word-input bind:onConfirm="onConfirmInput" width="420rpx" />
<toy-button
type="green"
bind:click="openSelectWordPopup"
width="220rpx">
选择文字
</toy-button>
</view>
<view class="word-card-box">
<block
wx:for="{{cardList}}"
@@ -24,6 +33,25 @@
</view>
</block>
</view>
<view class="operation-box">
<toy-button
type="primary"
bind:click="refreshCardList"
width="420rpx"
icon="refresh"
icon-class-prefix="toy-icon">
随机生成
</toy-button>
<toy-button
disabled="{{cardList.length <= 0}}"
type="green"
bind:click="clearCardList"
width="220rpx"
icon="clear"
icon-class-prefix="toy-icon">
清空
</toy-button>
</view>
</view>
<view
id="previewWrapper"