feat: 图形测试

This commit is contained in:
2025-07-23 12:49:16 +08:00
parent 9ade9d8357
commit 5412f957c1
3 changed files with 126 additions and 551 deletions
+10 -44
View File
@@ -37,32 +37,11 @@
</view>
<!-- 形状预览 -->
<view class="shape-preview-container">
<canvas
type="2d"
id="preview-canvas-{{index}}"
class="shape-preview-canvas"
style="background-color: {{item.fillColor}};">
</canvas>
<view
class="shape-icon shape-icon-{{item.id}}"
style="--fill-color: {{item.fillColor}}; --border-color: #333333;">
<!-- 圆柱体底部 -->
<view
wx:if="{{item.id === 'cylinder'}}"
class="cylinder-bottom"></view>
<!-- 正方体右面 -->
<view
wx:if="{{item.id === 'cube'}}"
class="cube-right"></view>
<!-- 圆锥底部 -->
<view
wx:if="{{item.id === 'cone'}}"
class="cone-bottom"></view>
<!-- 爱心右半圆 -->
<view
wx:if="{{item.id === 'heart'}}"
class="heart-right"></view>
</view>
<image
src="{{item.svgContent}}"
class="shape-svg"
mode="aspectFit">
</image>
</view>
<!-- 形状名称 -->
<text class="shape-name">{{item.name}}</text>
@@ -158,24 +137,11 @@
</view>
<!-- 形状预览 -->
<view class="shape-preview-box">
<view class="shape-icon shape-icon-{{item.id}}">
<!-- 圆柱体底部 -->
<view
wx:if="{{item.id === 'cylinder'}}"
class="cylinder-bottom"></view>
<!-- 正方体右面 -->
<view
wx:if="{{item.id === 'cube'}}"
class="cube-right"></view>
<!-- 圆锥底部 -->
<view
wx:if="{{item.id === 'cone'}}"
class="cone-bottom"></view>
<!-- 爱心右半圆 -->
<view
wx:if="{{item.id === 'heart'}}"
class="heart-right"></view>
</view>
<image
src="{{item.svgContent}}"
class="shape-svg-small"
mode="aspectFit">
</image>
</view>
<text class="shape-name">{{item.name}}</text>
</view>