swico 2.8.0-beta.10 → 2.8.0-beta.12
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/package.json
CHANGED
package/src/index.react.d.ts
CHANGED
|
@@ -4,14 +4,14 @@ import { SwicoHistoryOptionType } from './typings/global-type';
|
|
|
4
4
|
import { useLocation, useNav } from './template-root/.swico-react/hooks';
|
|
5
5
|
export type CustomConfigType = GlobalData['customConfig'];
|
|
6
6
|
export type { GlobalSwicoConfigType };
|
|
7
|
-
interface
|
|
7
|
+
interface LinkPropsType {
|
|
8
8
|
replace?: boolean;
|
|
9
9
|
to: string | number | SwicoHistoryOptionType;
|
|
10
10
|
style?: CSSProperties;
|
|
11
11
|
className?: string;
|
|
12
12
|
children: ReactNode;
|
|
13
13
|
}
|
|
14
|
-
export declare const Link: FC<
|
|
14
|
+
export declare const Link: FC<LinkPropsType>;
|
|
15
15
|
export { Outlet } from 'react-router';
|
|
16
16
|
export { useLocation, useNav };
|
|
17
17
|
export { history } from './mock-history';
|
package/src/index.vue.d.ts
CHANGED
|
@@ -2,35 +2,18 @@ import { GlobalData, GlobalSwicoConfigType } from './main-config';
|
|
|
2
2
|
import { App } from 'vue';
|
|
3
3
|
import { Router } from 'vue-router';
|
|
4
4
|
import { useLocation, useNav } from './template-root/.swico-vue/hooks';
|
|
5
|
+
import { SwicoHistoryOptionType } from './typings/global-type';
|
|
5
6
|
export type CustomConfigType = GlobalData['customConfig'];
|
|
6
7
|
export { RouterView } from 'vue-router';
|
|
7
8
|
export { useLocation, useNav };
|
|
8
9
|
export { history } from './mock-history';
|
|
9
10
|
export type { GlobalSwicoConfigType };
|
|
10
11
|
export declare const Outlet: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
type: BooleanConstructor;
|
|
17
|
-
};
|
|
18
|
-
}>, {
|
|
19
|
-
nav: {
|
|
20
|
-
(to: string, options?: import("./typings/global-type").NavOptionsType): void;
|
|
21
|
-
(to: number): void;
|
|
22
|
-
(to: import("./typings/global-type").SwicoHistoryOptionType, options?: import("./typings/global-type").NavOptionsType): void;
|
|
23
|
-
};
|
|
24
|
-
}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
25
|
-
to: {
|
|
26
|
-
required: true;
|
|
27
|
-
};
|
|
28
|
-
replace: {
|
|
29
|
-
type: BooleanConstructor;
|
|
30
|
-
};
|
|
31
|
-
}>> & Readonly<{}>, {
|
|
32
|
-
replace: boolean;
|
|
33
|
-
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
12
|
+
interface LinkPropsType {
|
|
13
|
+
replace?: boolean;
|
|
14
|
+
to: string | number | SwicoHistoryOptionType;
|
|
15
|
+
}
|
|
16
|
+
export declare const Link: import("vue").DefineComponent<LinkPropsType, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<LinkPropsType> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
34
17
|
export interface DefineSwicoConfigType {
|
|
35
18
|
(env: 'base', config: CustomConfigType['base']): any;
|
|
36
19
|
(env: 'dev', config: CustomConfigType['dev']): any;
|
|
@@ -254,7 +254,7 @@ function default_1(_a) {
|
|
|
254
254
|
},
|
|
255
255
|
resolve: {
|
|
256
256
|
extensions: ['.ts', '.js', '.vue', '.json'],
|
|
257
|
-
alias: Object.assign({ '@': path_1.default.join(projectPath, '/src'), vue: 'vue/dist/vue.esm-bundler.js', 'vue-router': path_1.default.dirname(require.resolve('vue-router')), swico: path_1.default.join(projectPath, '/.swico/index'),
|
|
257
|
+
alias: Object.assign({ '@': path_1.default.join(projectPath, '/src'), vue: 'vue/dist/vue.esm-bundler.js', 'vue-router': path_1.default.dirname(require.resolve('vue-router')), 'swico/vue': path_1.default.join(projectPath, '/.swico/index'), swico: path_1.default.join(projectPath, '/.swico/index'), qs: path_1.default.dirname(require.resolve('qs')) }, getCustomAliasConfig())
|
|
258
258
|
},
|
|
259
259
|
externals: customBaseConfig === null || customBaseConfig === void 0 ? void 0 : customBaseConfig.externals,
|
|
260
260
|
plugins: [
|
|
@@ -24,7 +24,7 @@ const router = (0, history_1.getRouter)();
|
|
|
24
24
|
const app = (0, vue_1.createApp)(Container);
|
|
25
25
|
app.component('SwicoLayout', Layout_1.default);
|
|
26
26
|
app.use(router);
|
|
27
|
+
(_a = global_1.default === null || global_1.default === void 0 ? void 0 : global_1.default.onInit) === null || _a === void 0 ? void 0 : _a.call(global_1.default, app, router);
|
|
27
28
|
const rootEle = document.createElement('div');
|
|
28
29
|
document.body.appendChild(rootEle);
|
|
29
30
|
app.mount(rootEle);
|
|
30
|
-
(_a = global_1.default === null || global_1.default === void 0 ? void 0 : global_1.default.onInit) === null || _a === void 0 ? void 0 : _a.call(global_1.default, app, router);
|