@gx-design-vue/pro-layout 0.1.0-alpha.0
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/LICENSE +21 -0
- package/README.md +76 -0
- package/dist/Context/expose.d.ts +6 -0
- package/dist/Context/expose.js +7 -0
- package/dist/Context/index.d.ts +43 -0
- package/dist/Context/index.js +18 -0
- package/dist/ProLayout.d.ts +539 -0
- package/dist/ProLayout.js +371 -0
- package/dist/WrapContent.d.ts +100 -0
- package/dist/WrapContent.js +45 -0
- package/dist/components/AppPage/context.d.ts +9 -0
- package/dist/components/AppPage/context.js +7 -0
- package/dist/components/AppPage/index.d.ts +73 -0
- package/dist/components/AppPage/index.js +71 -0
- package/dist/components/AppPage/style.d.ts +10 -0
- package/dist/components/AppPage/style.js +40 -0
- package/dist/components/BaseMenu/index.d.ts +255 -0
- package/dist/components/BaseMenu/index.js +381 -0
- package/dist/components/BaseMenu/props.d.ts +105 -0
- package/dist/components/BaseMenu/props.js +94 -0
- package/dist/components/BaseMenu/style.d.ts +6 -0
- package/dist/components/BaseMenu/style.js +155 -0
- package/dist/components/BreadCrumb/Breadcrumb.d.ts +33 -0
- package/dist/components/BreadCrumb/Breadcrumb.js +75 -0
- package/dist/components/BreadCrumb/index.d.ts +7 -0
- package/dist/components/BreadCrumb/index.js +44 -0
- package/dist/components/BreadCrumb/style.d.ts +8 -0
- package/dist/components/BreadCrumb/style.js +87 -0
- package/dist/components/CollapsedIcon/index.d.ts +33 -0
- package/dist/components/CollapsedIcon/index.js +51 -0
- package/dist/components/CollapsedIcon/style.d.ts +9 -0
- package/dist/components/CollapsedIcon/style.js +34 -0
- package/dist/components/FooterToolbar/index.d.ts +76 -0
- package/dist/components/FooterToolbar/index.js +96 -0
- package/dist/components/FooterToolbar/props.d.ts +47 -0
- package/dist/components/FooterToolbar/props.js +33 -0
- package/dist/components/FooterToolbar/style/index.d.ts +14 -0
- package/dist/components/FooterToolbar/style/index.js +48 -0
- package/dist/components/FooterToolbar/style/stylish.d.ts +18 -0
- package/dist/components/FooterToolbar/style/stylish.js +16 -0
- package/dist/components/GlobalFooter/index.d.ts +73 -0
- package/dist/components/GlobalFooter/index.js +77 -0
- package/dist/components/GlobalFooter/style.d.ts +6 -0
- package/dist/components/GlobalFooter/style.js +29 -0
- package/dist/components/GlobalHeader/DefaultHeader.d.ts +164 -0
- package/dist/components/GlobalHeader/DefaultHeader.js +149 -0
- package/dist/components/GlobalHeader/index.d.ts +164 -0
- package/dist/components/GlobalHeader/index.js +78 -0
- package/dist/components/GlobalHeader/props.d.ts +70 -0
- package/dist/components/GlobalHeader/props.js +56 -0
- package/dist/components/GlobalHeader/style/defaultHeader.d.ts +6 -0
- package/dist/components/GlobalHeader/style/defaultHeader.js +108 -0
- package/dist/components/GlobalHeader/style/header.d.ts +6 -0
- package/dist/components/GlobalHeader/style/header.js +41 -0
- package/dist/components/LogoContent/index.d.ts +80 -0
- package/dist/components/LogoContent/index.js +90 -0
- package/dist/components/LogoContent/props.d.ts +57 -0
- package/dist/components/LogoContent/props.js +37 -0
- package/dist/components/LogoContent/style.d.ts +6 -0
- package/dist/components/LogoContent/style.js +63 -0
- package/dist/components/PageContainer/PageHeader.d.ts +39 -0
- package/dist/components/PageContainer/PageHeader.js +53 -0
- package/dist/components/PageContainer/index.d.ts +197 -0
- package/dist/components/PageContainer/index.js +222 -0
- package/dist/components/PageContainer/props.d.ts +138 -0
- package/dist/components/PageContainer/props.js +103 -0
- package/dist/components/PageContainer/style/index.d.ts +14 -0
- package/dist/components/PageContainer/style/index.js +52 -0
- package/dist/components/PageContainer/style/pageHeader.d.ts +6 -0
- package/dist/components/PageContainer/style/pageHeader.js +44 -0
- package/dist/components/PageTranstion/index.d.ts +40 -0
- package/dist/components/PageTranstion/index.js +71 -0
- package/dist/components/PageTranstion/keyFrame/back.d.ts +16 -0
- package/dist/components/PageTranstion/keyFrame/back.js +158 -0
- package/dist/components/PageTranstion/keyFrame/bounce.d.ts +18 -0
- package/dist/components/PageTranstion/keyFrame/bounce.js +178 -0
- package/dist/components/PageTranstion/keyFrame/fade.d.ts +34 -0
- package/dist/components/PageTranstion/keyFrame/fade.js +342 -0
- package/dist/components/PageTranstion/keyFrame/flip.d.ts +12 -0
- package/dist/components/PageTranstion/keyFrame/flip.js +92 -0
- package/dist/components/PageTranstion/keyFrame/lightSpeed.d.ts +12 -0
- package/dist/components/PageTranstion/keyFrame/lightSpeed.js +72 -0
- package/dist/components/PageTranstion/keyFrame/roll.d.ts +10 -0
- package/dist/components/PageTranstion/keyFrame/roll.js +35 -0
- package/dist/components/PageTranstion/keyFrame/rotate.d.ts +18 -0
- package/dist/components/PageTranstion/keyFrame/rotate.js +149 -0
- package/dist/components/PageTranstion/keyFrame/slide.d.ts +16 -0
- package/dist/components/PageTranstion/keyFrame/slide.js +102 -0
- package/dist/components/PageTranstion/keyFrame/zoom.d.ts +18 -0
- package/dist/components/PageTranstion/keyFrame/zoom.js +165 -0
- package/dist/components/PageTranstion/style.d.ts +10 -0
- package/dist/components/PageTranstion/style.js +51 -0
- package/dist/components/SiderMenu/Arrow.d.ts +6 -0
- package/dist/components/SiderMenu/Arrow.js +15 -0
- package/dist/components/SiderMenu/SiderMenu.d.ts +180 -0
- package/dist/components/SiderMenu/SiderMenu.js +265 -0
- package/dist/components/SiderMenu/index.d.ts +193 -0
- package/dist/components/SiderMenu/index.js +51 -0
- package/dist/components/SiderMenu/props.d.ts +77 -0
- package/dist/components/SiderMenu/props.js +67 -0
- package/dist/components/SiderMenu/style/index.d.ts +12 -0
- package/dist/components/SiderMenu/style/index.js +162 -0
- package/dist/components/SiderMenu/typings.d.ts +38 -0
- package/dist/components/SiderMenu/typings.js +1 -0
- package/dist/components/TabsRoute/index.d.ts +95 -0
- package/dist/components/TabsRoute/index.js +405 -0
- package/dist/components/TabsRoute/props.d.ts +78 -0
- package/dist/components/TabsRoute/props.js +47 -0
- package/dist/components/TabsRoute/style.d.ts +15 -0
- package/dist/components/TabsRoute/style.js +133 -0
- package/dist/components/TabsRoute/utils/config.d.ts +18 -0
- package/dist/components/TabsRoute/utils/config.js +64 -0
- package/dist/config/animate.d.ts +11 -0
- package/dist/config/animate.js +76 -0
- package/dist/config/index.d.ts +34 -0
- package/dist/config/index.js +30 -0
- package/dist/hooks/collapsed/index.d.ts +15 -0
- package/dist/hooks/collapsed/index.js +50 -0
- package/dist/hooks/layout/useLayoutExpose.d.ts +15 -0
- package/dist/hooks/layout/useLayoutExpose.js +22 -0
- package/dist/hooks/layout/usePageContent.d.ts +6 -0
- package/dist/hooks/layout/usePageContent.js +28 -0
- package/dist/hooks/menu/context.d.ts +21 -0
- package/dist/hooks/menu/context.js +7 -0
- package/dist/hooks/menu/index.d.ts +29 -0
- package/dist/hooks/menu/index.js +118 -0
- package/dist/hooks/theme/index.d.ts +11 -0
- package/dist/hooks/theme/index.js +13 -0
- package/dist/index.d.ts +28 -0
- package/dist/index.js +24 -0
- package/dist/pro-layout.esm.js +6042 -0
- package/dist/pro-layout.js +37 -0
- package/dist/props/collapsedProps.d.ts +39 -0
- package/dist/props/collapsedProps.js +45 -0
- package/dist/props/defaultSettings.d.ts +62 -0
- package/dist/props/defaultSettings.js +56 -0
- package/dist/props/index.d.ts +226 -0
- package/dist/props/index.js +109 -0
- package/dist/props/themeProps.d.ts +14 -0
- package/dist/props/themeProps.js +10 -0
- package/dist/style/index.d.ts +24 -0
- package/dist/style/index.js +62 -0
- package/dist/types/Breadcrumb.d.ts +22 -0
- package/dist/types/Breadcrumb.js +1 -0
- package/dist/types/MenuTypings.d.ts +46 -0
- package/dist/types/MenuTypings.js +1 -0
- package/dist/types/RouteTypings.d.ts +96 -0
- package/dist/types/RouteTypings.js +1 -0
- package/dist/types/SlotsTypings.d.ts +124 -0
- package/dist/types/SlotsTypings.js +32 -0
- package/dist/types/typings.d.ts +73 -0
- package/dist/types/typings.js +3 -0
- package/dist/utils/index.d.ts +7 -0
- package/dist/utils/index.js +17 -0
- package/dist/utils/menu.d.ts +24 -0
- package/dist/utils/menu.js +134 -0
- package/dist/utils/style/index.d.ts +44 -0
- package/dist/utils/style/index.js +103 -0
- package/global.d.ts +11 -0
- package/package.json +73 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2022 gx12358
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
ADDED
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
<div align="center"><a name="readme-top"></a>
|
|
2
|
+
|
|
3
|
+
<img height="180" src="https://gx12358.cn/resource/img/favicon.ico">
|
|
4
|
+
|
|
5
|
+
<h1>Pro Layout</h1>
|
|
6
|
+
|
|
7
|
+
</div>
|
|
8
|
+
|
|
9
|
+
## ✨ Features
|
|
10
|
+
|
|
11
|
+
- 🌈 Enterprise-class UI designed for web applications.
|
|
12
|
+
- 📦 A set of high-quality Vue3 components out of the box.
|
|
13
|
+
- 🛡 Written in TypeScript with predictable static types.
|
|
14
|
+
- ⚙️ Whole package of design resources and development tools.
|
|
15
|
+
- 🌍 Internationalization support for dozens of languages.
|
|
16
|
+
- 🎨 Powerful theme customization based on CSS-in-JS.
|
|
17
|
+
|
|
18
|
+
## 🖥 Environment Support
|
|
19
|
+
|
|
20
|
+
- Modern browsers
|
|
21
|
+
- Server-side Rendering
|
|
22
|
+
- [Electron](https://www.electronjs.org/)
|
|
23
|
+
|
|
24
|
+
| [<img src="https://raw.githubusercontent.com/alrra/browser-logos/master/src/edge/edge_48x48.png" alt="Edge" width="24px" height="24px" />](https://godban.github.io/browsers-support-badges/)<br>Edge | [<img src="https://raw.githubusercontent.com/alrra/browser-logos/master/src/firefox/firefox_48x48.png" alt="Firefox" width="24px" height="24px" />](https://godban.github.io/browsers-support-badges/)<br>Firefox | [<img src="https://raw.githubusercontent.com/alrra/browser-logos/master/src/chrome/chrome_48x48.png" alt="Chrome" width="24px" height="24px" />](https://godban.github.io/browsers-support-badges/)<br>Chrome | [<img src="https://raw.githubusercontent.com/alrra/browser-logos/master/src/safari/safari_48x48.png" alt="Safari" width="24px" height="24px" />](https://godban.github.io/browsers-support-badges/)<br>Safari | [<img src="https://raw.githubusercontent.com/alrra/browser-logos/master/src/electron/electron_48x48.png" alt="Electron" width="24px" height="24px" />](https://godban.github.io/browsers-support-badges/)<br>Electron |
|
|
25
|
+
| --- | --- | --- | --- | --- |
|
|
26
|
+
| Edge | last 2 versions | last 2 versions | last 2 versions | last 2 versions |
|
|
27
|
+
|
|
28
|
+
## 📦 Install
|
|
29
|
+
|
|
30
|
+
```bash
|
|
31
|
+
npm install @gx-design-vue/pro-layout
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
```bash
|
|
35
|
+
yarn add @gx-design-vue/pro-layout
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
```bash
|
|
39
|
+
pnpm add @gx-design-vue/pro-layout
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
```bash
|
|
43
|
+
bun add @gx-design-vue/pro-layout
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
## Acknowledgements
|
|
47
|
+
|
|
48
|
+
Antdv Next is inspired by and built upon the following open-source projects.
|
|
49
|
+
|
|
50
|
+
- [Ant Design](https://ant.design/)
|
|
51
|
+
- [Vue.js](https://vuejs.org/)
|
|
52
|
+
- [Vite](https://vitejs.dev/)
|
|
53
|
+
|
|
54
|
+
## Maintainer
|
|
55
|
+
|
|
56
|
+
[@gx12358](https://github.com/gx12358/vue3-antd-admin)
|
|
57
|
+
|
|
58
|
+
## Contributors
|
|
59
|
+
|
|
60
|
+
<a href="https://github.com/gx12358/vue3-antd-admin/graphs/contributors">
|
|
61
|
+
<img alt="Contributors" src="https://contrib.rocks/image?repo=gx12358/vue3-antd-admin" />
|
|
62
|
+
</a>
|
|
63
|
+
|
|
64
|
+
## Special Thanks
|
|
65
|
+
|
|
66
|
+
Thanks to the [vbenjs/vue-vben-admin](https://github.com/gx12358/vue3-antd-admin) project for providing inspiration and reference implementation.
|
|
67
|
+
|
|
68
|
+
## License
|
|
69
|
+
|
|
70
|
+
[MIT © gx12358-2021](./LICENSE)
|
|
71
|
+
|
|
72
|
+
## `Star`
|
|
73
|
+
|
|
74
|
+
Thank you very much for the stars from kind-hearted people, thank you for your support :heart:
|
|
75
|
+
|
|
76
|
+
[](https://github.com/gx12358/vue3-antd-admin/stargazers)
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { ProLayoutInjextExpose } from "../types/typings.js";
|
|
2
|
+
|
|
3
|
+
//#region src/Context/expose.d.ts
|
|
4
|
+
declare const provideProLayoutExposeContext: (value: ProLayoutInjextExpose) => void, useProLayoutExposeContext: (injectDefaultValue?: ProLayoutInjextExpose) => ProLayoutInjextExpose;
|
|
5
|
+
//#endregion
|
|
6
|
+
export { provideProLayoutExposeContext, useProLayoutExposeContext };
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { useContext } from "@gx-design-vue/context";
|
|
2
|
+
|
|
3
|
+
//#region src/Context/expose.ts
|
|
4
|
+
const { provideContext: provideProLayoutExposeContext, useInjectContext: useProLayoutExposeContext } = useContext("pro-layout-expose");
|
|
5
|
+
|
|
6
|
+
//#endregion
|
|
7
|
+
export { provideProLayoutExposeContext, useProLayoutExposeContext };
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import { Meta } from "../types/RouteTypings.js";
|
|
2
|
+
import { BreadcrumbProps } from "../types/Breadcrumb.js";
|
|
3
|
+
import { MenuPropsContext, ProLayoutMenuFunProps } from "../types/MenuTypings.js";
|
|
4
|
+
import { LayoutPageContainer, PageContainerPropsType } from "../components/PageContainer/props.js";
|
|
5
|
+
import { ShortcutKeyProps } from "../props/index.js";
|
|
6
|
+
import { BasicLayoutProps, CollapsedProps, LayoutClassNamesType, LayoutContext, LayoutStylesType } from "../types/typings.js";
|
|
7
|
+
import { ComputedRef, Ref } from "vue";
|
|
8
|
+
import { CustomRender, PrefixCls, WithFalse } from "@gx-design-vue/pro-utils";
|
|
9
|
+
|
|
10
|
+
//#region src/Context/index.d.ts
|
|
11
|
+
declare const defaultContextKey: (keyof ProLayoutContextProps)[];
|
|
12
|
+
interface ProLayoutContextProps {
|
|
13
|
+
getPrefixCls: (prefixCls: PrefixCls) => string;
|
|
14
|
+
setHasFooterToolbar: (value: boolean) => void;
|
|
15
|
+
zIndex: Ref<number>;
|
|
16
|
+
styles: Ref<LayoutStylesType>;
|
|
17
|
+
waterMarkProps: Ref<BasicLayoutProps['waterMarkProps']>;
|
|
18
|
+
classNames: Ref<LayoutClassNamesType>;
|
|
19
|
+
breadcrumb: ComputedRef<BreadcrumbProps>;
|
|
20
|
+
collapsed: Ref<boolean>;
|
|
21
|
+
hasFooterToolbar: Ref<boolean>;
|
|
22
|
+
collapsedEffect: ComputedRef<boolean>;
|
|
23
|
+
collapsedProps: ComputedRef<Partial<CollapsedProps>>;
|
|
24
|
+
openKeys: Ref<ProLayoutMenuFunProps['openKeys']>;
|
|
25
|
+
selectedKeys: Ref<ProLayoutMenuFunProps['openKeys']>;
|
|
26
|
+
renderRouterView: Ref<boolean>;
|
|
27
|
+
contentFullScreen: Ref<boolean>;
|
|
28
|
+
disableMobile?: Ref<boolean>;
|
|
29
|
+
fullScreenOnTabsHide: Ref<boolean>;
|
|
30
|
+
shortcutKey: Ref<ShortcutKeyProps>;
|
|
31
|
+
hasContentWide: ComputedRef<boolean>;
|
|
32
|
+
breadcrumbRender: Ref<WithFalse<(props: BreadcrumbProps) => CustomRender> | undefined>;
|
|
33
|
+
isMobile: ComputedRef<boolean>;
|
|
34
|
+
settings: ComputedRef<BasicLayoutProps['settings']>;
|
|
35
|
+
pageContainer: Ref<LayoutPageContainer>;
|
|
36
|
+
pageHeaderRender: ComputedRef<PageContainerPropsType['pageHeaderRender']>;
|
|
37
|
+
menu: ComputedRef<MenuPropsContext>;
|
|
38
|
+
currentMeta: Ref<Meta | undefined>;
|
|
39
|
+
layoutProps: ComputedRef<LayoutContext>;
|
|
40
|
+
}
|
|
41
|
+
declare const provideProLayoutContext: (value: ProLayoutContextProps) => void, useProLayoutContext: (injectDefaultValue?: ProLayoutContextProps) => ProLayoutContextProps;
|
|
42
|
+
//#endregion
|
|
43
|
+
export { ProLayoutContextProps, defaultContextKey, provideProLayoutContext, useProLayoutContext };
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { useContext } from "@gx-design-vue/context";
|
|
2
|
+
|
|
3
|
+
//#region src/Context/index.ts
|
|
4
|
+
const defaultContextKey = [
|
|
5
|
+
"styles",
|
|
6
|
+
"zIndex",
|
|
7
|
+
"waterMarkProps",
|
|
8
|
+
"classNames",
|
|
9
|
+
"openKeys",
|
|
10
|
+
"selectedKeys",
|
|
11
|
+
"disableMobile",
|
|
12
|
+
"shortcutKey",
|
|
13
|
+
"pageContainer"
|
|
14
|
+
];
|
|
15
|
+
const { provideContext: provideProLayoutContext, useInjectContext: useProLayoutContext } = useContext("pro-layout");
|
|
16
|
+
|
|
17
|
+
//#endregion
|
|
18
|
+
export { defaultContextKey, provideProLayoutContext, useProLayoutContext };
|