x-essential-lib 0.10.18 → 0.10.19

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.
Files changed (2) hide show
  1. package/dist/index.js +3 -1
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -792,7 +792,7 @@ function useMicroApp(globalStates, base, customBack) {
792
792
  running.value = true;
793
793
  }
794
794
  async function onBackButton() {
795
- await handleBack();
795
+ eventBus.emit("back");
796
796
  }
797
797
  function onDeviceReady() {
798
798
  console.log("onDeviceReady");
@@ -874,9 +874,11 @@ function useMicroApp(globalStates, base, customBack) {
874
874
  if (!base) {
875
875
  onMounted(() => {
876
876
  window.addEventListener("keydown", onKeyDown);
877
+ eventBus.on("back", handleBack);
877
878
  });
878
879
  onBeforeUnmount(() => {
879
880
  window.removeEventListener("keydown", onKeyDown);
881
+ eventBus.off("back", handleBack);
880
882
  });
881
883
  }
882
884
  function onUpdateDark(val) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "x-essential-lib",
3
- "version": "0.10.18",
3
+ "version": "0.10.19",
4
4
  "files": [
5
5
  "dist"
6
6
  ],