modify
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
makeit 2024-08-07 14:26:59 +08:00
parent 351351359f
commit b60dce9f0b
4 changed files with 5 additions and 5 deletions

View File

@ -9,8 +9,8 @@ steps:
- name: node_modules_cache - name: node_modules_cache
path: /drone/src/node_modules path: /drone/src/node_modules
commands: commands:
- pwd
- node -v - node -v
- npm -v
- ls -al - ls -al
- npm config set registry https://registry.npmmirror.com/ - npm config set registry https://registry.npmmirror.com/
- npm i - npm i

View File

@ -150,8 +150,8 @@ class MiCanvas {
} catch (e) { } catch (e) {
try { try {
return this.canvas.toDataURL(); return this.canvas.toDataURL();
} catch (err) { } catch (err: any) {
console.error(err.message); console.error(err?.message);
return ''; return '';
} }
} }

View File

@ -44,7 +44,7 @@ class MiConfig {
public mobile = false; public mobile = false;
/** 是否为触摸屏 */ /** 是否为触摸屏 */
public supportsTouch = ('ontouchstart' in window) || navigator.msMaxTouchPoints; public supportsTouch = ('ontouchstart' in window) || navigator?.maxTouchPoints;
/** 通用正则 */ /** 通用正则 */
public reg: {[index: string]: any} = { public reg: {[index: string]: any} = {

View File

@ -394,7 +394,7 @@
if (elem) elem.remove(); if (elem) elem.remove();
}; };
if (Text.data && Text.data.content) { if (Text.data && Text.data.content) {
return new Promise((resolve) => { return new Promise((resolve: any) => {
Text.rendering( Text.rendering(
Text.data as MiTextConfig, Text.data as MiTextConfig,
true, true,