feat:优化 debug 页
This commit is contained in:
@@ -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 || '日');
|
||||
|
||||
Reference in New Issue
Block a user