@hlw-uni/mp-core 1.0.2 → 1.0.3

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/app.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import { createSSRApp } from '../node_modules/vue';
1
+ import { createApp } from '../node_modules/vue';
2
2
 
3
3
  export interface InterceptorOptions {
4
4
  /** 自动注入 Token 的 header 键名 */
@@ -11,9 +11,7 @@ export interface InterceptorOptions {
11
11
  autoToastError?: boolean;
12
12
  }
13
13
  export declare function useApp(): {
14
- install: (app: Parameters<typeof createSSRApp>[0]) => {
15
- app: any;
16
- };
14
+ install: (app: Parameters<typeof createApp>[0]) => any;
17
15
  hlw: import('./hlw').HlwInstance;
18
16
  http: any;
19
17
  };
package/dist/index.js CHANGED
@@ -838,9 +838,9 @@ var __publicField = (obj, key, value) => {
838
838
  console.warn("[hlw] useApp().install() 应只调用一次");
839
839
  }
840
840
  _installed = true;
841
- const mainApp = vue.createSSRApp(app);
841
+ const mainApp = vue.createApp(app);
842
842
  mainApp.config.globalProperties["hlw"] = hlw;
843
- return { app: mainApp };
843
+ return mainApp;
844
844
  }
845
845
  return { install, hlw, http };
846
846
  }
package/dist/index.mjs CHANGED
@@ -4,7 +4,7 @@ var __publicField = (obj, key, value) => {
4
4
  __defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
5
5
  return value;
6
6
  };
7
- import { ref, onBeforeUpdate, createSSRApp, defineComponent, computed, useSlots } from "vue";
7
+ import { ref, onBeforeUpdate, createApp, defineComponent, computed, useSlots } from "vue";
8
8
  const cosAdapter = {
9
9
  name: "cos",
10
10
  buildFormData(ctx) {
@@ -835,9 +835,9 @@ function useApp() {
835
835
  console.warn("[hlw] useApp().install() 应只调用一次");
836
836
  }
837
837
  _installed = true;
838
- const mainApp = createSSRApp(app);
838
+ const mainApp = createApp(app);
839
839
  mainApp.config.globalProperties["hlw"] = hlw;
840
- return { app: mainApp };
840
+ return mainApp;
841
841
  }
842
842
  return { install, hlw, http };
843
843
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hlw-uni/mp-core",
3
- "version": "1.0.2",
3
+ "version": "1.0.3",
4
4
  "description": "UniApp 运行时核心包 — composables、Pinia stores、工具函数、UI 组件",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.mjs",