feat:优化 debug 页

This commit is contained in:
2025-07-16 18:31:55 +08:00
parent 72be2372ee
commit 3ce3d3cac4
15 changed files with 177 additions and 60 deletions
+8 -1
View File
@@ -80,10 +80,17 @@ class TextDrawService {
this.currentY = 0;
this.colors = ['#000'];
this.characters = ['王'];
this.setPrintConfig();
}
setPrintConfig() {
const printConfig = getApp().getPrintConfig();
this.headerType = printConfig.header;
this.options.appName = printConfig.appName;
}
draw(list: Array<{ color: string; word: string }>) {
this.headerType = getApp().getPrintHeader() || 'wechat';
this.setPrintConfig();
this.colors = list.map((item) => item.color || '#000');
this.characters = list.map((item) => item.word || '日');