feat: 打印预览组件化

This commit is contained in:
R524809
2026-04-22 15:02:48 +08:00
parent 4ad387e99d
commit de74666c9f
24 changed files with 552 additions and 273 deletions
@@ -0,0 +1,43 @@
<view class="pc-wrap">
<view class="pc-card {{withFab ? 'pc-card--with-fab' : ''}}">
<text class="pc-kicker">{{kicker}}</text>
<view id="canvasWrapper" class="pc-canvas-wrap">
<canvas
type="2d"
id="canvasContent"
class="pc-canvas"
style="width:{{boxWidth}}px;height:{{boxHeight}}px" />
</view>
<view
wx:if="{{showRefresh}}"
class="pc-fab pc-fab--refresh"
hover-class="pc-fab--hover"
hover-start-time="0"
hover-stay-time="70"
catchtap="onRefreshTap">
<view
class="pc-fab__icon-wrap {{refreshIconAnimClass}}">
<toy-icon
name="refresh"
size="40rpx"
color="#2d5016"
custom-class="pc-fab__toy" />
</view>
</view>
<view
wx:if="{{showFavorite}}"
class="pc-fab pc-fab--favorite"
hover-class="pc-fab--hover"
hover-start-time="0"
hover-stay-time="70"
catchtap="onFavoriteTap">
<toy-icon
name="{{favorited ? 'heart' : 'heart-o'}}"
size="40rpx"
color="{{favorited ? favoritedIconColor : favoriteIdleIconColor}}"
custom-class="pc-fab__toy" />
</view>
</view>
</view>