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.
@@ -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) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "miaoda-expo-devkit",
3
- "version": "0.1.1-beta.44",
3
+ "version": "0.1.1-beta.45",
4
4
  "description": "Expo 应用开发工具集:Sentry DSN 替换 stub、错误/网络捕获、Metro 符号化",
5
5
  "license": "MIT",
6
6
  "main": "./dist/index.js",