feat: 生产 shape

This commit is contained in:
2025-08-08 17:32:39 +08:00
parent 738358ab76
commit 64deb9f3be
16 changed files with 1219 additions and 160 deletions
@@ -4,7 +4,7 @@
custom-class="shape-picker-popup">
<view class="shape-picker-container">
<text class="shape-picker-title"
>选择形状{{ currentShapeKey ? '' : '(多选)' }}</text
>选择形状{{ singleMode ? '' : '(多选)' }}</text
>
<view class="shape-options-wrapper">
<view class="shape-options">
@@ -15,20 +15,16 @@
bindtap="onSelectShape"
data-index="{{index}}"
data-shape="{{item.id}}">
<view class="shape-svg-container">
<image
class="shape-svg"
src="{{ item.svgDataUrl }}"
mode="aspectFit" />
<!-- 多选模式下显示选中标记 -->
<view wx:if="{{ item.checked }}" class="selected-icon">
<toy-icon
name="ic_check"
size="24"
color="#93d333" />
</view>
</view>
<image
class="shape-svg"
src="{{ item.svgDataUrl }}"
mode="aspectFit" />
<text class="shape-name">{{item.name}}</text>
<image
wx:if="{{item.checked}}"
class="img-shape-selected"
src="/assets/imgs/checked.png"
mode="aspectFit" />
</view>
</view>
</view>
@@ -37,9 +33,8 @@
type="primary"
bind:click="onChange"
width="400rpx"
disabled="{{ currentShapeKey ? !selectedShape : selectedShapes.length === 0 }}">
确认选择{{ !currentShapeKey && selectedShapes.length > 0 ? ''
+ selectedShapes.length + '个)' : '' }}
disabled="{{ totalSelected === 0 }}">
确认选择{{ singleMode ? '' : '' + totalSelected + '个)' }}
</toy-button>
</view>
</view>