miaoda-expo-devkit 0.1.1-beta.44 → 0.1.1-beta.45
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/dist/stubs/lgui-control.js +13 -0
- package/package.json +1 -1
|
@@ -218,6 +218,9 @@ class EditorController {
|
|
|
218
218
|
case "editor-delete":
|
|
219
219
|
this.deleteActiveNode();
|
|
220
220
|
break;
|
|
221
|
+
case "editor-text-update":
|
|
222
|
+
this.updateActiveNodeText(e);
|
|
223
|
+
break;
|
|
221
224
|
}
|
|
222
225
|
};
|
|
223
226
|
}
|
|
@@ -360,6 +363,16 @@ class EditorController {
|
|
|
360
363
|
this.activeNode = null;
|
|
361
364
|
postToParent("iframe-node-clear");
|
|
362
365
|
}
|
|
366
|
+
/**
|
|
367
|
+
* 更新选中元素的文本内容
|
|
368
|
+
*/
|
|
369
|
+
updateActiveNodeText(e) {
|
|
370
|
+
if (!this.activeNode) return;
|
|
371
|
+
const text = e.data.value;
|
|
372
|
+
if (typeof text !== "string") return;
|
|
373
|
+
const node = this.activeNode;
|
|
374
|
+
node.innerHTML = text;
|
|
375
|
+
}
|
|
363
376
|
}
|
|
364
377
|
let controller = null;
|
|
365
378
|
function onGlobalMessage(e) {
|