feat:公用template

This commit is contained in:
R524809
2025-12-22 17:32:48 +08:00
parent e23da39bdf
commit 95ef36a564
8 changed files with 131 additions and 246 deletions
@@ -1,32 +1,15 @@
<view class="page-container">
<view class="wrapper">
<text class="wrapper-title">预览打印效果</text>
<!-- 模版不能跨包引用 -->
<import src="../shared/templates/canvas-page-template.wxml" />
<!-- 预览打印效果 -->
<view id="canvasWrapper" class="canvas-wrapper">
<canvas
type="2d"
id="canvasContent"
class="canvas-content"
style="width:{{boxWidth}}px;height:{{boxHeight}}px" />
</view>
<!-- 类型选择器和随机生成按钮 -->
<math-type-selector
current-type-name="{{currentModeName}}"
type-actions="{{typeActions}}"
bind:select="onSelectType"
bind:random="onRandom" />
<draw-ad type="focusDraw"></draw-ad>
</view>
<view class="empty"></view>
</view>
<math-bottom-buttons
disabled="{{!hasContent}}"
bind:share="onShareAppMessage"
bind:export="exportToPrint" />
<share-guide-popup
show="{{showShareDialog}}"
bind:onClose="onCloseShareDialog"
bind:onShareSuccess="onShareSuccess" />
<template
is="canvasPageTemplate"
data="{{
boxWidth: boxWidth,
boxHeight: boxHeight,
hasTypeSelector: true,
currentModeName: currentModeName,
typeActions: typeActions,
adType: 'focusDraw',
disabled: !hasContent,
showShareDialog: showShareDialog
}}" />