feat:绘制图形

This commit is contained in:
2025-09-12 16:56:00 +08:00
parent 3b4b2dcd64
commit 6acc5d676c
27 changed files with 76464 additions and 112 deletions
+63
View File
@@ -0,0 +1,63 @@
<!--index.wxml-->
<view class="container">
<!-- 上部:输入区域 -->
<view class="input-section">
<view class="input-row">
<input
class="word-input"
placeholder="请输入汉字(支持多个汉字)"
value="{{inputWord}}"
bindinput="onInputChange"
maxlength="20" />
<button class="generate-btn" bindtap="onGenerateClick">生成</button>
</view>
</view>
<!-- 已选择的汉字列表 -->
<view class="selected-section" wx:if="{{wordList.length > 0}}">
<view class="section-header">
<text class="section-title"
>已选择的汉字 ({{wordList.length}})</text
>
<button class="clear-btn" bindtap="onClearAll" size="mini">
清空
</button>
</view>
<view class="word-list">
<view
class="word-item selected"
wx:for="{{wordList}}"
wx:key="*this"
wx:for-item="word"
wx:for-index="index">
<text class="word-text">{{word}}</text>
<text
class="remove-btn"
bindtap="onRemoveWord"
data-index="{{index}}"
>×</text
>
</view>
</view>
</view>
<!-- 下部:可选汉字区域 -->
<view class="available-section">
<view class="section-header">
<text class="section-title"
>可选汉字 ({{availableWords.length}})</text
>
</view>
<view class="word-grid">
<view
class="word-item available {{wordList.includes(word) ? 'disabled' : ''}}"
wx:for="{{availableWords}}"
wx:key="*this"
wx:for-item="word"
bindtap="onWordSelect"
data-word="{{word}}">
<text class="word-text">{{word}}</text>
</view>
</view>
</view>
</view>