feat: 完成图形涂色绘制
This commit is contained in:
+8
-12
@@ -1,21 +1,20 @@
|
||||
import config from './config/config';
|
||||
|
||||
const defaultPrintConfig: PrintConfig = config.printHeader as PrintConfig;
|
||||
|
||||
|
||||
// app.ts
|
||||
App<IAppOption>({
|
||||
globalData: {
|
||||
env: 'release',
|
||||
printConfig: {
|
||||
header: 'wechat',
|
||||
appName: '涂鸦丫小程序'
|
||||
}
|
||||
printConfig: defaultPrintConfig
|
||||
},
|
||||
onLaunch() {
|
||||
const accountInfo = wx.getAccountInfoSync();
|
||||
const env = accountInfo.miniProgram.envVersion || 'release';
|
||||
this.globalData.env = env;
|
||||
if (env !== 'release') {
|
||||
const printConfig = wx.getStorageSync('printConfig') || {
|
||||
header: 'wechat',
|
||||
appName: '涂鸦丫小程序'
|
||||
};
|
||||
const printConfig = wx.getStorageSync('printConfig') || defaultPrintConfig;
|
||||
this.globalData.printConfig = printConfig;
|
||||
}
|
||||
},
|
||||
@@ -29,10 +28,7 @@ App<IAppOption>({
|
||||
},
|
||||
|
||||
getPrintConfig(): PrintConfig {
|
||||
return this.globalData.printConfig || {
|
||||
header: 'wechat',
|
||||
appName: '涂鸦丫小程序'
|
||||
};
|
||||
return this.globalData.printConfig || defaultPrintConfig;
|
||||
},
|
||||
|
||||
setPrintConfig(config: PrintConfig) {
|
||||
|
||||
Reference in New Issue
Block a user