@meta2d/core 1.0.94 → 1.0.95-alpha.1
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/core.d.ts +1 -1
- package/src/core.js +3 -3
- package/src/core.js.map +1 -1
- package/src/pen/text.js +19 -1
- package/src/pen/text.js.map +1 -1
- package/src/theme.js +1 -1
- package/src/theme.js.map +1 -1
- package/src/utils/tool.js +1 -1
- package/src/utils/tool.js.map +1 -1
- package/src/utils/url.js +2 -0
- package/src/utils/url.js.map +1 -1
package/package.json
CHANGED
package/src/core.d.ts
CHANGED
|
@@ -73,7 +73,7 @@ export declare class Meta2d {
|
|
|
73
73
|
setDatabyOptions(options?: Options): void;
|
|
74
74
|
private init;
|
|
75
75
|
initEventFns(): void;
|
|
76
|
-
getSendData(data: any[]): any;
|
|
76
|
+
getSendData(data: any[], cpen?: Pen): any;
|
|
77
77
|
convertType(value: string, type: string): string | number | boolean;
|
|
78
78
|
getEventData(list: any, pen: Pen): any;
|
|
79
79
|
message(options: MessageOptions): void;
|
package/src/core.js
CHANGED
|
@@ -460,7 +460,7 @@ export class Meta2d {
|
|
|
460
460
|
};
|
|
461
461
|
this.events[EventAction.SendData] = (pen, e) => {
|
|
462
462
|
if (e.data?.length) {
|
|
463
|
-
const value = this.getSendData(e.data);
|
|
463
|
+
const value = this.getSendData(e.data, pen);
|
|
464
464
|
if (pen.formId && pen.formData) {
|
|
465
465
|
//表单数据
|
|
466
466
|
Object.assign(value, pen.formData);
|
|
@@ -550,7 +550,7 @@ export class Meta2d {
|
|
|
550
550
|
});
|
|
551
551
|
};
|
|
552
552
|
}
|
|
553
|
-
getSendData(data) {
|
|
553
|
+
getSendData(data, cpen) {
|
|
554
554
|
const value = {};
|
|
555
555
|
data.forEach((item) => {
|
|
556
556
|
if (item.prop) {
|
|
@@ -564,7 +564,7 @@ export class Meta2d {
|
|
|
564
564
|
let keys = _value.match(/\$\{([^}]+)\}/g)?.map(m => m.slice(2, -1));
|
|
565
565
|
if (keys) {
|
|
566
566
|
keys.forEach((key) => {
|
|
567
|
-
_value = _value.replace(`\${${key}}`, this.getDynamicParam(key));
|
|
567
|
+
_value = _value.replace(`\${${key}}`, getter(cpen, key) || this.getDynamicParam(key));
|
|
568
568
|
});
|
|
569
569
|
}
|
|
570
570
|
value[item.prop] = _value;
|