@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 +2 -4
- package/dist/index.js +2 -2
- package/dist/index.mjs +3 -3
- package/package.json +1 -1
package/dist/app.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
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
|
|
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.
|
|
841
|
+
const mainApp = vue.createApp(app);
|
|
842
842
|
mainApp.config.globalProperties["hlw"] = hlw;
|
|
843
|
-
return
|
|
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,
|
|
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 =
|
|
838
|
+
const mainApp = createApp(app);
|
|
839
839
|
mainApp.config.globalProperties["hlw"] = hlw;
|
|
840
|
-
return
|
|
840
|
+
return mainApp;
|
|
841
841
|
}
|
|
842
842
|
return { install, hlw, http };
|
|
843
843
|
}
|