feat: 完成分龄页开发

This commit is contained in:
R524809
2026-05-06 17:28:51 +08:00
parent 50394154f7
commit 9bdf850f20
54 changed files with 3499 additions and 1021 deletions
+11
View File
@@ -25,6 +25,7 @@ export interface PageCanvasInstance {
getShareOptions(): ShareOptions;
selectComponent(selector: string): any;
getPublishMeta?(): DebugPublishMeta;
getWorksheetStatsId?(): string;
}
/**
@@ -225,10 +226,15 @@ export function getPageCommonMethods(config: PageCommonMethodsConfig = {}) {
* 导出打印
*/
async exportToPrint(this: PageCanvasInstance) {
const worksheetId =
typeof this.getWorksheetStatsId === 'function'
? this.getWorksheetStatsId()
: this.data.functionId;
await downloadPrint(this.canvas, {
errorToast: '请先生成内容',
trackerName: this.data.pageTitle,
trackerMode: this.data.currentMode,
worksheetId,
});
},
@@ -278,11 +284,16 @@ export function getPageCommonMethods(config: PageCommonMethodsConfig = {}) {
async onShareSuccess(this: PageCanvasInstance) {
this.setData({ showShareDialog: false });
if (this.canvas) {
const worksheetId =
typeof this.getWorksheetStatsId === 'function'
? this.getWorksheetStatsId()
: this.data.functionId;
// 分享成功后下载(不限制次数)
await downloadPrint(this.canvas, {
errorToast: '请先生成内容',
trackerName: this.data.pageTitle,
trackerMode: this.data.currentMode,
worksheetId,
});
}
},