@blueking/bk-weweb 0.0.35-beta.4 → 0.0.35-beta.5

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/index.esm.js CHANGED
@@ -1481,10 +1481,8 @@ var MicroInstanceModel = class {
1481
1481
  setupContainer() {
1482
1482
  if (this.container) {
1483
1483
  this.container.innerHTML = "";
1484
- if (this.showSourceCode) {
1485
- const instanceWrapper = this.createInstanceWrapper();
1486
- this.container.appendChild(instanceWrapper);
1487
- }
1484
+ const instanceWrapper = this.createInstanceWrapper();
1485
+ this.container.appendChild(instanceWrapper);
1488
1486
  }
1489
1487
  }
1490
1488
  /** 执行样式 */
@@ -1503,7 +1501,7 @@ var MicroInstanceModel = class {
1503
1501
  renderInstance() {
1504
1502
  const scriptInfo = this.getScriptInfo();
1505
1503
  if (scriptInfo?.exportInstance?.render && this.container) {
1506
- const targetContainer = this.showSourceCode ? this.container.querySelector(`#${this.name}${WRAPPER_SUFFIX}`) : this.container;
1504
+ const targetContainer = this.container.querySelector(`#${this.name}${WRAPPER_SUFFIX}`);
1507
1505
  if (targetContainer) {
1508
1506
  scriptInfo.exportInstance.render(targetContainer, this.data);
1509
1507
  }
@@ -1516,7 +1514,7 @@ var MicroInstanceModel = class {
1516
1514
  }
1517
1515
  /** 检查是否需要重新加载 */
1518
1516
  needsReload() {
1519
- return this.status === AppState.ERROR;
1517
+ return this.status === AppState.ERROR || this.status === AppState.UNSET;
1520
1518
  }
1521
1519
  };
1522
1520
 
@@ -2193,7 +2191,8 @@ var EntrySource = class {
2193
2191
  * 检查是否应该忽略脚本
2194
2192
  */
2195
2193
  shouldIgnoreScript = (script) => {
2196
- return script.hasAttribute("ignore") || script.type !== "module" && isJsonpUrl(script.getAttribute("src")) || script.hasAttribute("type") && !SCRIPT_TYPE_NAMES.includes(script.type);
2194
+ return script.hasAttribute("ignore") || // (script.type !== 'module' && isJsonpUrl(script.getAttribute('src'))) ||
2195
+ script.hasAttribute("type") && !SCRIPT_TYPE_NAMES.includes(script.type);
2197
2196
  };
2198
2197
  /**
2199
2198
  * 处理被排除的脚本