@meta2d/core 1.1.2 → 1.1.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/src/canvas/canvas.js +1 -1
- package/src/canvas/canvas.js.map +1 -1
- package/src/core.d.ts +1 -1
- package/src/core.js +10 -0
- package/src/core.js.map +1 -1
- package/src/dialog/dialog.js +22 -18
- package/src/dialog/dialog.js.map +1 -1
- package/src/scroll/scroll.d.ts +1 -1
- package/src/scroll/scroll.js +7 -2
- package/src/scroll/scroll.js.map +1 -1
package/src/core.d.ts
CHANGED
|
@@ -74,7 +74,7 @@ export declare class Meta2d {
|
|
|
74
74
|
private init;
|
|
75
75
|
initEventFns(): void;
|
|
76
76
|
getSendData(data: any[], cpen?: Pen): any;
|
|
77
|
-
convertType(value: string, type: string):
|
|
77
|
+
convertType(value: string, type: string): any;
|
|
78
78
|
getEventData(list: any, pen: Pen): any;
|
|
79
79
|
message(options: MessageOptions): void;
|
|
80
80
|
closeAll(): void;
|
package/src/core.js
CHANGED
|
@@ -611,6 +611,16 @@ export class Meta2d {
|
|
|
611
611
|
}
|
|
612
612
|
}
|
|
613
613
|
}
|
|
614
|
+
else if (typeof value === 'object') {
|
|
615
|
+
let bodyStr = JSON.stringify(value);
|
|
616
|
+
let keys = bodyStr.match(/\$\{([^}]+)\}/g)?.map(m => m.slice(2, -1));
|
|
617
|
+
if (keys?.length) {
|
|
618
|
+
for (let i = 0; i < keys.length; i++) {
|
|
619
|
+
bodyStr = bodyStr.replace(`\${${keys[i]}}`, this.getDynamicParam(keys[i]));
|
|
620
|
+
}
|
|
621
|
+
}
|
|
622
|
+
return JSON.parse(bodyStr);
|
|
623
|
+
}
|
|
614
624
|
return value;
|
|
615
625
|
}
|
|
616
626
|
getEventData(list, pen) {
|