feat:形状
This commit is contained in:
@@ -0,0 +1,46 @@
|
||||
<van-popup
|
||||
show="{{ show }}"
|
||||
bind:close="onClose"
|
||||
custom-class="shape-picker-popup">
|
||||
<view class="shape-picker-container">
|
||||
<text class="shape-picker-title"
|
||||
>选择形状{{ currentShapeKey ? '' : '(多选)' }}</text
|
||||
>
|
||||
<view class="shape-options-wrapper">
|
||||
<view class="shape-options">
|
||||
<view
|
||||
wx:for="{{shapes}}"
|
||||
wx:key="id"
|
||||
class="shape-option {{item.checked ? 'selected' : '' }}"
|
||||
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>
|
||||
<text class="shape-name">{{item.name}}</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="btn-area">
|
||||
<toy-button
|
||||
type="primary"
|
||||
bind:click="onChange"
|
||||
width="400rpx"
|
||||
disabled="{{ currentShapeKey ? !selectedShape : selectedShapes.length === 0 }}">
|
||||
确认选择{{ !currentShapeKey && selectedShapes.length > 0 ? '('
|
||||
+ selectedShapes.length + '个)' : '' }}
|
||||
</toy-button>
|
||||
</view>
|
||||
</view>
|
||||
</van-popup>
|
||||
Reference in New Issue
Block a user