@gx-design-vue/pro-layout 0.1.0-alpha.2 → 0.1.0-alpha.21
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/ProLayout.d.ts +4 -536
- package/dist/ProLayout.js +489 -358
- package/dist/components/AppPage/context.d.ts +4 -3
- package/dist/components/AppPage/context.js +3 -5
- package/dist/components/AppPage/index.d.ts +29 -52
- package/dist/components/AppPage/index.js +71 -54
- package/dist/components/AppPage/style.d.ts +8 -7
- package/dist/components/AppPage/style.js +16 -17
- package/dist/components/Breadcrumb/index.d.ts +19 -0
- package/dist/components/Breadcrumb/index.js +129 -0
- package/dist/components/Breadcrumb/interface.d.ts +33 -0
- package/dist/components/Breadcrumb/interface.js +1 -0
- package/dist/components/CollapseButton/Arrow.d.ts +4 -0
- package/dist/components/{SiderMenu → CollapseButton}/Arrow.js +2 -4
- package/dist/components/CollapseButton/index.d.ts +7 -0
- package/dist/components/CollapseButton/index.js +45 -0
- package/dist/components/CollapseButton/interface.d.ts +19 -0
- package/dist/components/CollapseButton/interface.js +1 -0
- package/dist/components/Footer/index.d.ts +10 -0
- package/dist/components/Footer/index.js +69 -0
- package/dist/components/Footer/interface.d.ts +22 -0
- package/dist/components/Footer/interface.js +1 -0
- package/dist/components/FooterToolbar/index.d.ts +5 -72
- package/dist/components/FooterToolbar/index.js +77 -90
- package/dist/components/FooterToolbar/style.d.ts +10 -0
- package/dist/components/FooterToolbar/style.js +34 -0
- package/dist/components/Header/index.d.ts +7 -0
- package/dist/components/Header/index.js +140 -0
- package/dist/components/Header/interface.d.ts +41 -0
- package/dist/components/Header/interface.js +1 -0
- package/dist/components/Logo/index.d.ts +9 -0
- package/dist/components/Logo/index.js +63 -0
- package/dist/components/Logo/interface.d.ts +13 -0
- package/dist/components/Logo/interface.js +1 -0
- package/dist/components/Menu/iconRender.d.ts +10 -0
- package/dist/components/Menu/iconRender.js +23 -0
- package/dist/components/Menu/index.d.ts +13 -0
- package/dist/components/Menu/index.js +778 -0
- package/dist/components/Menu/interface.d.ts +50 -0
- package/dist/components/Menu/interface.js +9 -0
- package/dist/components/Menu/overflow.d.ts +39 -0
- package/dist/components/Menu/overflow.js +81 -0
- package/dist/components/Menu/style/base.d.ts +12 -0
- package/dist/components/Menu/style/base.js +36 -0
- package/dist/components/Menu/style/horizontal.d.ts +19 -0
- package/dist/components/Menu/style/horizontal.js +303 -0
- package/dist/components/Menu/style/index.d.ts +356 -0
- package/dist/components/Menu/style/index.js +147 -0
- package/dist/components/Menu/style/inline.d.ts +13 -0
- package/dist/components/Menu/style/inline.js +292 -0
- package/dist/components/PageContainer/PageHeader.d.ts +30 -36
- package/dist/components/PageContainer/PageHeader.js +80 -46
- package/dist/components/PageContainer/index.d.ts +8 -194
- package/dist/components/PageContainer/index.js +297 -209
- package/dist/components/PageContainer/style.d.ts +5 -0
- package/dist/components/PageContainer/style.js +142 -0
- package/dist/components/PageTransition/animate.d.ts +41 -0
- package/dist/components/PageTransition/animate.js +106 -0
- package/dist/components/PageTransition/index.d.ts +57 -0
- package/dist/components/PageTransition/index.js +66 -0
- package/dist/components/{PageTranstion → PageTransition}/keyFrame/back.d.ts +4 -4
- package/dist/components/{PageTranstion → PageTransition}/keyFrame/back.js +2 -4
- package/dist/components/{PageTranstion → PageTransition}/keyFrame/bounce.d.ts +4 -4
- package/dist/components/{PageTranstion → PageTransition}/keyFrame/bounce.js +2 -4
- package/dist/components/{PageTranstion → PageTransition}/keyFrame/fade.d.ts +4 -4
- package/dist/components/{PageTranstion → PageTransition}/keyFrame/fade.js +2 -4
- package/dist/components/{PageTranstion → PageTransition}/keyFrame/flip.d.ts +4 -4
- package/dist/components/{PageTranstion → PageTransition}/keyFrame/flip.js +2 -4
- package/dist/components/{PageTranstion → PageTransition}/keyFrame/lightSpeed.d.ts +4 -4
- package/dist/components/{PageTranstion → PageTransition}/keyFrame/lightSpeed.js +2 -4
- package/dist/components/PageTransition/keyFrame/roll.d.ts +10 -0
- package/dist/components/{PageTranstion → PageTransition}/keyFrame/roll.js +2 -4
- package/dist/components/{PageTranstion → PageTransition}/keyFrame/rotate.d.ts +4 -4
- package/dist/components/{PageTranstion → PageTransition}/keyFrame/rotate.js +2 -4
- package/dist/components/{PageTranstion → PageTransition}/keyFrame/slide.d.ts +4 -4
- package/dist/components/{PageTranstion → PageTransition}/keyFrame/slide.js +2 -4
- package/dist/components/{PageTranstion → PageTransition}/keyFrame/zoom.d.ts +4 -4
- package/dist/components/{PageTranstion → PageTransition}/keyFrame/zoom.js +2 -4
- package/dist/components/PageTransition/style.d.ts +11 -0
- package/dist/components/{PageTranstion → PageTransition}/style.js +9 -13
- package/dist/components/Sider/index.d.ts +7 -0
- package/dist/components/Sider/index.js +206 -0
- package/dist/components/Sider/interface.d.ts +39 -0
- package/dist/components/Sider/interface.js +1 -0
- package/dist/components/Tabs/InnerTabs.d.ts +7 -0
- package/dist/components/Tabs/InnerTabs.js +117 -0
- package/dist/components/Tabs/contextMenu.d.ts +41 -0
- package/dist/components/Tabs/contextMenu.js +89 -0
- package/dist/components/Tabs/hooks/flipAnimate.d.ts +24 -0
- package/dist/components/Tabs/hooks/flipAnimate.js +40 -0
- package/dist/components/Tabs/hooks/useAutoScroll.d.ts +27 -0
- package/dist/components/Tabs/hooks/useAutoScroll.js +122 -0
- package/dist/components/Tabs/hooks/useTabDrag.d.ts +31 -0
- package/dist/components/Tabs/hooks/useTabDrag.js +252 -0
- package/dist/components/Tabs/index.d.ts +13 -0
- package/dist/components/Tabs/index.js +181 -0
- package/dist/components/Tabs/interface.d.ts +74 -0
- package/dist/components/Tabs/interface.js +1 -0
- package/dist/components/Tabs/style/index.d.ts +35 -0
- package/dist/components/Tabs/style/index.js +161 -0
- package/dist/components/WrapContent/index.d.ts +9 -0
- package/dist/components/WrapContent/index.js +26 -0
- package/dist/components/WrapContent/interface.d.ts +15 -0
- package/dist/components/WrapContent/interface.js +1 -0
- package/dist/context/index.d.ts +53 -0
- package/dist/context/index.js +5 -0
- package/dist/defaultConfig.d.ts +10 -0
- package/dist/defaultConfig.js +38 -0
- package/dist/hooks/useLayoutBase.d.ts +78 -0
- package/dist/hooks/useLayoutBase.js +86 -0
- package/dist/hooks/useMenu.d.ts +77 -0
- package/dist/hooks/useMenu.js +166 -0
- package/dist/hooks/useTabs.d.ts +54 -0
- package/dist/hooks/useTabs.js +388 -0
- package/dist/index.d.ts +22 -27
- package/dist/index.js +15 -24
- package/dist/interface.d.ts +516 -0
- package/dist/interface.js +34 -0
- package/dist/pro-layout.esm.js +5848 -5075
- package/dist/pro-layout.js +16 -37
- package/dist/style/breadcrumb.d.ts +8 -0
- package/dist/style/breadcrumb.js +77 -0
- package/dist/style/collapseButton.d.ts +8 -0
- package/dist/style/collapseButton.js +57 -0
- package/dist/style/content.d.ts +8 -0
- package/dist/style/content.js +29 -0
- package/dist/style/footer.d.ts +8 -0
- package/dist/style/footer.js +33 -0
- package/dist/style/header.d.ts +8 -0
- package/dist/style/header.js +76 -0
- package/dist/style/index.d.ts +3 -22
- package/dist/style/index.js +51 -55
- package/dist/style/logo.d.ts +8 -0
- package/dist/style/logo.js +76 -0
- package/dist/style/menu.d.ts +15 -0
- package/dist/style/menu.js +49 -0
- package/dist/style/rightContent.d.ts +12 -0
- package/dist/style/rightContent.js +74 -0
- package/dist/style/search.d.ts +12 -0
- package/dist/style/search.js +94 -0
- package/dist/style/sider.d.ts +8 -0
- package/dist/style/sider.js +92 -0
- package/dist/style/tabs.d.ts +14 -0
- package/dist/style/tabs.js +97 -0
- package/dist/theme/augment.d.ts +20 -0
- package/dist/theme/augment.js +1 -0
- package/dist/theme/interface/components.d.ts +20 -0
- package/dist/theme/interface/components.js +1 -0
- package/dist/utils/config.d.ts +12 -0
- package/dist/utils/config.js +18 -0
- package/dist/utils/menu.d.ts +111 -20
- package/dist/utils/menu.js +263 -118
- package/dist/utils/style.d.ts +4 -0
- package/dist/utils/style.js +21 -0
- package/dist/utils/themeComponents.d.ts +28 -0
- package/dist/utils/themeComponents.js +89 -0
- package/package.json +24 -15
- package/dist/Context/expose.d.ts +0 -6
- package/dist/Context/expose.js +0 -7
- package/dist/Context/index.d.ts +0 -43
- package/dist/Context/index.js +0 -18
- package/dist/WrapContent.d.ts +0 -100
- package/dist/WrapContent.js +0 -45
- package/dist/components/BaseMenu/index.d.ts +0 -255
- package/dist/components/BaseMenu/index.js +0 -381
- package/dist/components/BaseMenu/props.d.ts +0 -105
- package/dist/components/BaseMenu/props.js +0 -94
- package/dist/components/BaseMenu/style.d.ts +0 -6
- package/dist/components/BaseMenu/style.js +0 -155
- package/dist/components/BreadCrumb/Breadcrumb.d.ts +0 -33
- package/dist/components/BreadCrumb/Breadcrumb.js +0 -75
- package/dist/components/BreadCrumb/index.d.ts +0 -7
- package/dist/components/BreadCrumb/index.js +0 -44
- package/dist/components/BreadCrumb/style.d.ts +0 -8
- package/dist/components/BreadCrumb/style.js +0 -87
- package/dist/components/CollapsedIcon/index.d.ts +0 -33
- package/dist/components/CollapsedIcon/index.js +0 -51
- package/dist/components/CollapsedIcon/style.d.ts +0 -9
- package/dist/components/CollapsedIcon/style.js +0 -34
- package/dist/components/FooterToolbar/props.d.ts +0 -47
- package/dist/components/FooterToolbar/props.js +0 -33
- package/dist/components/FooterToolbar/style/index.d.ts +0 -14
- package/dist/components/FooterToolbar/style/index.js +0 -48
- package/dist/components/FooterToolbar/style/stylish.d.ts +0 -18
- package/dist/components/FooterToolbar/style/stylish.js +0 -16
- package/dist/components/GlobalFooter/index.d.ts +0 -73
- package/dist/components/GlobalFooter/index.js +0 -77
- package/dist/components/GlobalFooter/style.d.ts +0 -6
- package/dist/components/GlobalFooter/style.js +0 -29
- package/dist/components/GlobalHeader/DefaultHeader.d.ts +0 -164
- package/dist/components/GlobalHeader/DefaultHeader.js +0 -149
- package/dist/components/GlobalHeader/index.d.ts +0 -164
- package/dist/components/GlobalHeader/index.js +0 -78
- package/dist/components/GlobalHeader/props.d.ts +0 -70
- package/dist/components/GlobalHeader/props.js +0 -56
- package/dist/components/GlobalHeader/style/defaultHeader.d.ts +0 -6
- package/dist/components/GlobalHeader/style/defaultHeader.js +0 -108
- package/dist/components/GlobalHeader/style/header.d.ts +0 -6
- package/dist/components/GlobalHeader/style/header.js +0 -41
- package/dist/components/LogoContent/index.d.ts +0 -80
- package/dist/components/LogoContent/index.js +0 -90
- package/dist/components/LogoContent/props.d.ts +0 -57
- package/dist/components/LogoContent/props.js +0 -37
- package/dist/components/LogoContent/style.d.ts +0 -6
- package/dist/components/LogoContent/style.js +0 -63
- package/dist/components/PageContainer/props.d.ts +0 -138
- package/dist/components/PageContainer/props.js +0 -103
- package/dist/components/PageContainer/style/index.d.ts +0 -14
- package/dist/components/PageContainer/style/index.js +0 -52
- package/dist/components/PageContainer/style/pageHeader.d.ts +0 -6
- package/dist/components/PageContainer/style/pageHeader.js +0 -44
- package/dist/components/PageTranstion/index.d.ts +0 -40
- package/dist/components/PageTranstion/index.js +0 -71
- package/dist/components/PageTranstion/keyFrame/roll.d.ts +0 -10
- package/dist/components/PageTranstion/style.d.ts +0 -10
- package/dist/components/SiderMenu/Arrow.d.ts +0 -6
- package/dist/components/SiderMenu/SiderMenu.d.ts +0 -180
- package/dist/components/SiderMenu/SiderMenu.js +0 -265
- package/dist/components/SiderMenu/index.d.ts +0 -193
- package/dist/components/SiderMenu/index.js +0 -51
- package/dist/components/SiderMenu/props.d.ts +0 -77
- package/dist/components/SiderMenu/props.js +0 -67
- package/dist/components/SiderMenu/style/index.d.ts +0 -12
- package/dist/components/SiderMenu/style/index.js +0 -162
- package/dist/components/SiderMenu/typings.d.ts +0 -38
- package/dist/components/SiderMenu/typings.js +0 -1
- package/dist/components/TabsRoute/index.d.ts +0 -95
- package/dist/components/TabsRoute/index.js +0 -405
- package/dist/components/TabsRoute/props.d.ts +0 -78
- package/dist/components/TabsRoute/props.js +0 -47
- package/dist/components/TabsRoute/style.d.ts +0 -15
- package/dist/components/TabsRoute/style.js +0 -133
- package/dist/components/TabsRoute/utils/config.d.ts +0 -18
- package/dist/components/TabsRoute/utils/config.js +0 -64
- package/dist/config/animate.d.ts +0 -11
- package/dist/config/animate.js +0 -76
- package/dist/config/index.d.ts +0 -34
- package/dist/config/index.js +0 -30
- package/dist/hooks/collapsed/index.d.ts +0 -15
- package/dist/hooks/collapsed/index.js +0 -50
- package/dist/hooks/layout/useLayoutExpose.d.ts +0 -15
- package/dist/hooks/layout/useLayoutExpose.js +0 -22
- package/dist/hooks/layout/usePageContent.d.ts +0 -6
- package/dist/hooks/layout/usePageContent.js +0 -28
- package/dist/hooks/menu/context.d.ts +0 -21
- package/dist/hooks/menu/context.js +0 -7
- package/dist/hooks/menu/index.d.ts +0 -29
- package/dist/hooks/menu/index.js +0 -118
- package/dist/hooks/theme/index.d.ts +0 -11
- package/dist/hooks/theme/index.js +0 -13
- package/dist/props/collapsedProps.d.ts +0 -39
- package/dist/props/collapsedProps.js +0 -45
- package/dist/props/defaultSettings.d.ts +0 -62
- package/dist/props/defaultSettings.js +0 -56
- package/dist/props/index.d.ts +0 -226
- package/dist/props/index.js +0 -109
- package/dist/props/themeProps.d.ts +0 -14
- package/dist/props/themeProps.js +0 -10
- package/dist/types/Breadcrumb.d.ts +0 -22
- package/dist/types/Breadcrumb.js +0 -1
- package/dist/types/MenuTypings.d.ts +0 -46
- package/dist/types/MenuTypings.js +0 -1
- package/dist/types/RouteTypings.d.ts +0 -96
- package/dist/types/RouteTypings.js +0 -1
- package/dist/types/SlotsTypings.d.ts +0 -124
- package/dist/types/SlotsTypings.js +0 -32
- package/dist/types/typings.d.ts +0 -73
- package/dist/types/typings.js +0 -3
- package/dist/utils/index.d.ts +0 -7
- package/dist/utils/index.js +0 -17
- package/dist/utils/style/index.d.ts +0 -44
- package/dist/utils/style/index.js +0 -103
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
//#region src/components/PageTransition/animate.d.ts
|
|
2
|
+
/**
|
|
3
|
+
* 页面切换动画预设(迁移自 animate.css)。
|
|
4
|
+
* 每个预设含若干「方向变体」,与 keyFrame/*.ts 中的关键帧类名一一对应:
|
|
5
|
+
* 类名形如 `${name}${'In'|'Out'}${Direction}`,例如 `fadeInLeft`、`zoomOut`。
|
|
6
|
+
*/
|
|
7
|
+
interface AnimatePreset {
|
|
8
|
+
/** 动画名(同时是类名前缀) */
|
|
9
|
+
name: string;
|
|
10
|
+
/** 中文别名(仅用于展示/选择器) */
|
|
11
|
+
alias: string;
|
|
12
|
+
/** 可用方向变体;`'default'` 表示无方向后缀 */
|
|
13
|
+
directions: string[];
|
|
14
|
+
}
|
|
15
|
+
interface AnimateConfig {
|
|
16
|
+
preset: AnimatePreset[];
|
|
17
|
+
}
|
|
18
|
+
declare const animateSetting: AnimateConfig;
|
|
19
|
+
/**
|
|
20
|
+
* 将方向反转为成对的相反方向(用于离场时让动画「倒放」):
|
|
21
|
+
* 在 directions 数组中按相邻成对(0↔1、2↔3 …)互换;
|
|
22
|
+
* `x` / `y` 与空方向不反转。
|
|
23
|
+
*/
|
|
24
|
+
declare function reverseDirection(direction: string, directions: string[]): string;
|
|
25
|
+
interface ResolveTransitionClassOptions {
|
|
26
|
+
/** 动画名 */
|
|
27
|
+
name: string;
|
|
28
|
+
/** 指定方向;未指定则取该预设首个方向 */
|
|
29
|
+
direction?: string;
|
|
30
|
+
/** 离场时是否反转方向 */
|
|
31
|
+
reverse: boolean;
|
|
32
|
+
/** 是否为离场(leave)阶段 */
|
|
33
|
+
isLeave: boolean;
|
|
34
|
+
}
|
|
35
|
+
/**
|
|
36
|
+
* 纯函数:根据动画名/方向/是否离场,解析出对应的关键帧类名。
|
|
37
|
+
* 未知动画名返回空串;`default` 方向无后缀。
|
|
38
|
+
*/
|
|
39
|
+
declare function resolveTransitionClass(options: ResolveTransitionClassOptions): string;
|
|
40
|
+
//#endregion
|
|
41
|
+
export { AnimateConfig, AnimatePreset, ResolveTransitionClassOptions, animateSetting, resolveTransitionClass, reverseDirection };
|
|
@@ -0,0 +1,106 @@
|
|
|
1
|
+
//#region src/components/PageTransition/animate.ts
|
|
2
|
+
/**
|
|
3
|
+
* 页面切换动画预设(迁移自 animate.css)。
|
|
4
|
+
* 每个预设含若干「方向变体」,与 keyFrame/*.ts 中的关键帧类名一一对应:
|
|
5
|
+
* 类名形如 `${name}${'In'|'Out'}${Direction}`,例如 `fadeInLeft`、`zoomOut`。
|
|
6
|
+
*/
|
|
7
|
+
/** 水平方向(光速等仅左右) */
|
|
8
|
+
const HORIZONTAL_DIRECTIONS = ["left", "right"];
|
|
9
|
+
/** 四正方向 */
|
|
10
|
+
const CARDINAL_DIRECTIONS = [
|
|
11
|
+
"left",
|
|
12
|
+
"right",
|
|
13
|
+
"down",
|
|
14
|
+
"up"
|
|
15
|
+
];
|
|
16
|
+
const animateSetting = { preset: [
|
|
17
|
+
{
|
|
18
|
+
name: "back",
|
|
19
|
+
alias: "渐近",
|
|
20
|
+
directions: CARDINAL_DIRECTIONS
|
|
21
|
+
},
|
|
22
|
+
{
|
|
23
|
+
name: "bounce",
|
|
24
|
+
alias: "弹跳",
|
|
25
|
+
directions: CARDINAL_DIRECTIONS.concat("default")
|
|
26
|
+
},
|
|
27
|
+
{
|
|
28
|
+
name: "fade",
|
|
29
|
+
alias: "淡化",
|
|
30
|
+
directions: CARDINAL_DIRECTIONS.concat([
|
|
31
|
+
"downBig",
|
|
32
|
+
"upBig",
|
|
33
|
+
"leftBig",
|
|
34
|
+
"rightBig"
|
|
35
|
+
]).concat([
|
|
36
|
+
"topLeft",
|
|
37
|
+
"bottomRight",
|
|
38
|
+
"topRight",
|
|
39
|
+
"bottomLeft"
|
|
40
|
+
]).concat("default")
|
|
41
|
+
},
|
|
42
|
+
{
|
|
43
|
+
name: "flip",
|
|
44
|
+
alias: "翻转",
|
|
45
|
+
directions: ["x", "y"]
|
|
46
|
+
},
|
|
47
|
+
{
|
|
48
|
+
name: "lightSpeed",
|
|
49
|
+
alias: "光速",
|
|
50
|
+
directions: HORIZONTAL_DIRECTIONS
|
|
51
|
+
},
|
|
52
|
+
{
|
|
53
|
+
name: "rotate",
|
|
54
|
+
alias: "旋转",
|
|
55
|
+
directions: [
|
|
56
|
+
"downLeft",
|
|
57
|
+
"upRight",
|
|
58
|
+
"downRight",
|
|
59
|
+
"upLeft"
|
|
60
|
+
].concat("default")
|
|
61
|
+
},
|
|
62
|
+
{
|
|
63
|
+
name: "roll",
|
|
64
|
+
alias: "翻滚",
|
|
65
|
+
directions: ["default"]
|
|
66
|
+
},
|
|
67
|
+
{
|
|
68
|
+
name: "zoom",
|
|
69
|
+
alias: "缩放",
|
|
70
|
+
directions: CARDINAL_DIRECTIONS.concat("default")
|
|
71
|
+
},
|
|
72
|
+
{
|
|
73
|
+
name: "slide",
|
|
74
|
+
alias: "滑动",
|
|
75
|
+
directions: CARDINAL_DIRECTIONS
|
|
76
|
+
}
|
|
77
|
+
] };
|
|
78
|
+
/**
|
|
79
|
+
* 将方向反转为成对的相反方向(用于离场时让动画「倒放」):
|
|
80
|
+
* 在 directions 数组中按相邻成对(0↔1、2↔3 …)互换;
|
|
81
|
+
* `x` / `y` 与空方向不反转。
|
|
82
|
+
*/
|
|
83
|
+
function reverseDirection(direction, directions) {
|
|
84
|
+
if (direction.length === 0 || direction === "x" || direction === "y") return direction;
|
|
85
|
+
const currentIndex = directions.indexOf(direction);
|
|
86
|
+
return directions[currentIndex % 2 === 1 ? currentIndex - 1 : currentIndex + 1] ?? direction;
|
|
87
|
+
}
|
|
88
|
+
/**
|
|
89
|
+
* 纯函数:根据动画名/方向/是否离场,解析出对应的关键帧类名。
|
|
90
|
+
* 未知动画名返回空串;`default` 方向无后缀。
|
|
91
|
+
*/
|
|
92
|
+
function resolveTransitionClass(options) {
|
|
93
|
+
const { name, direction: requestedDirection, reverse, isLeave } = options;
|
|
94
|
+
const preset = animateSetting.preset.find((item) => item.name === name);
|
|
95
|
+
if (!preset) return "";
|
|
96
|
+
let direction = requestedDirection === void 0 ? preset.directions[0] : preset.directions.find((item) => item === requestedDirection) || "";
|
|
97
|
+
direction = direction === void 0 || direction === "default" ? "" : direction;
|
|
98
|
+
if (direction !== "") {
|
|
99
|
+
direction = isLeave && reverse ? reverseDirection(direction, preset.directions) : direction;
|
|
100
|
+
direction = direction[0].toUpperCase() + direction.substring(1);
|
|
101
|
+
}
|
|
102
|
+
const phase = isLeave ? "Out" : "In";
|
|
103
|
+
return preset.name + phase + direction;
|
|
104
|
+
}
|
|
105
|
+
//#endregion
|
|
106
|
+
export { animateSetting, resolveTransitionClass, reverseDirection };
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
import { GPageTransitionSlots } from "../../interface.js";
|
|
2
|
+
import { PropType, SlotsType } from "vue";
|
|
3
|
+
|
|
4
|
+
//#region src/components/PageTransition/index.d.ts
|
|
5
|
+
/**
|
|
6
|
+
* GPageTransition —— 基于 Vue `<Transition>` 的页面切换动画包裹组件。
|
|
7
|
+
* 通过 `name`/`direction` 选择 animate.css 预设动画;`reverse` 控制离场时方向倒放;
|
|
8
|
+
* `disabled` 时直接渲染子节点、不套动画。
|
|
9
|
+
*/
|
|
10
|
+
declare const GPageTransition: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
|
|
11
|
+
prefixCls: {
|
|
12
|
+
type: PropType<string>;
|
|
13
|
+
}; /** 禁用动画,直接渲染子节点 */
|
|
14
|
+
disabled: {
|
|
15
|
+
type: PropType<boolean>;
|
|
16
|
+
default: boolean;
|
|
17
|
+
}; /** 离场时是否反转方向(让动画「倒放」) */
|
|
18
|
+
reverse: {
|
|
19
|
+
type: PropType<boolean>;
|
|
20
|
+
default: boolean;
|
|
21
|
+
}; /** 动画名,默认 'fade' */
|
|
22
|
+
name: {
|
|
23
|
+
type: PropType<string>;
|
|
24
|
+
default: string;
|
|
25
|
+
}; /** 方向变体;未指定则取该预设首个方向 */
|
|
26
|
+
direction: {
|
|
27
|
+
type: PropType<string>;
|
|
28
|
+
default: string;
|
|
29
|
+
};
|
|
30
|
+
}>, () => any, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
31
|
+
prefixCls: {
|
|
32
|
+
type: PropType<string>;
|
|
33
|
+
}; /** 禁用动画,直接渲染子节点 */
|
|
34
|
+
disabled: {
|
|
35
|
+
type: PropType<boolean>;
|
|
36
|
+
default: boolean;
|
|
37
|
+
}; /** 离场时是否反转方向(让动画「倒放」) */
|
|
38
|
+
reverse: {
|
|
39
|
+
type: PropType<boolean>;
|
|
40
|
+
default: boolean;
|
|
41
|
+
}; /** 动画名,默认 'fade' */
|
|
42
|
+
name: {
|
|
43
|
+
type: PropType<string>;
|
|
44
|
+
default: string;
|
|
45
|
+
}; /** 方向变体;未指定则取该预设首个方向 */
|
|
46
|
+
direction: {
|
|
47
|
+
type: PropType<string>;
|
|
48
|
+
default: string;
|
|
49
|
+
};
|
|
50
|
+
}>> & Readonly<{}>, {
|
|
51
|
+
reverse: boolean;
|
|
52
|
+
direction: string;
|
|
53
|
+
name: string;
|
|
54
|
+
disabled: boolean;
|
|
55
|
+
}, SlotsType<GPageTransitionSlots>, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
56
|
+
//#endregion
|
|
57
|
+
export { GPageTransition as default };
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
import { resolveTransitionClass } from "./animate.js";
|
|
2
|
+
import style_default from "./style.js";
|
|
3
|
+
import { Transition, computed, createVNode, defineComponent } from "vue";
|
|
4
|
+
import { useBaseConfig } from "antdv-next/config-provider/context";
|
|
5
|
+
import useCSSVarCls from "antdv-next/config-provider/hooks/useCSSVarCls";
|
|
6
|
+
//#region src/components/PageTransition/index.tsx
|
|
7
|
+
/**
|
|
8
|
+
* GPageTransition —— 基于 Vue `<Transition>` 的页面切换动画包裹组件。
|
|
9
|
+
* 通过 `name`/`direction` 选择 animate.css 预设动画;`reverse` 控制离场时方向倒放;
|
|
10
|
+
* `disabled` 时直接渲染子节点、不套动画。
|
|
11
|
+
*/
|
|
12
|
+
const GPageTransition = /* @__PURE__ */ defineComponent({
|
|
13
|
+
name: "GPageTransition",
|
|
14
|
+
props: {
|
|
15
|
+
prefixCls: { type: String },
|
|
16
|
+
/** 禁用动画,直接渲染子节点 */
|
|
17
|
+
disabled: {
|
|
18
|
+
type: Boolean,
|
|
19
|
+
default: false
|
|
20
|
+
},
|
|
21
|
+
/** 离场时是否反转方向(让动画「倒放」) */
|
|
22
|
+
reverse: {
|
|
23
|
+
type: Boolean,
|
|
24
|
+
default: true
|
|
25
|
+
},
|
|
26
|
+
/** 动画名,默认 'fade' */
|
|
27
|
+
name: {
|
|
28
|
+
type: String,
|
|
29
|
+
default: "fade"
|
|
30
|
+
},
|
|
31
|
+
/** 方向变体;未指定则取该预设首个方向 */
|
|
32
|
+
direction: {
|
|
33
|
+
type: String,
|
|
34
|
+
default: "default"
|
|
35
|
+
}
|
|
36
|
+
},
|
|
37
|
+
slots: Object,
|
|
38
|
+
setup(props, { slots }) {
|
|
39
|
+
const { prefixCls } = useBaseConfig("pro-page-transition", props);
|
|
40
|
+
const [hashId, cssVarCls] = style_default(prefixCls, useCSSVarCls(prefixCls));
|
|
41
|
+
function buildClass(isLeave) {
|
|
42
|
+
return [
|
|
43
|
+
resolveTransitionClass({
|
|
44
|
+
name: props.name,
|
|
45
|
+
direction: props.direction,
|
|
46
|
+
reverse: props.reverse,
|
|
47
|
+
isLeave
|
|
48
|
+
}),
|
|
49
|
+
`${prefixCls.value}-${isLeave ? "leave" : "enter"}`,
|
|
50
|
+
hashId.value,
|
|
51
|
+
cssVarCls.value
|
|
52
|
+
].filter(Boolean).join(" ");
|
|
53
|
+
}
|
|
54
|
+
const enterActiveClass = computed(() => buildClass(false));
|
|
55
|
+
const leaveActiveClass = computed(() => buildClass(true));
|
|
56
|
+
return () => {
|
|
57
|
+
if (props.disabled) return slots.default?.();
|
|
58
|
+
return createVNode(Transition, {
|
|
59
|
+
"enterActiveClass": enterActiveClass.value,
|
|
60
|
+
"leaveActiveClass": leaveActiveClass.value
|
|
61
|
+
}, { default: () => [slots.default?.()] });
|
|
62
|
+
};
|
|
63
|
+
}
|
|
64
|
+
});
|
|
65
|
+
//#endregion
|
|
66
|
+
export { GPageTransition as default };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Keyframe } from "@gx-design-vue/pro-provider";
|
|
2
|
-
import { CSSObject
|
|
2
|
+
import { CSSObject } from "@antdv-next/cssinjs";
|
|
3
3
|
|
|
4
|
-
//#region src/components/
|
|
4
|
+
//#region src/components/PageTransition/keyFrame/back.d.ts
|
|
5
5
|
declare const backInLeft: Keyframe;
|
|
6
6
|
declare const backInRight: Keyframe;
|
|
7
7
|
declare const backInUp: Keyframe;
|
|
@@ -10,7 +10,7 @@ declare const backOutLeft: Keyframe;
|
|
|
10
10
|
declare const backOutRight: Keyframe;
|
|
11
11
|
declare const backOutUp: Keyframe;
|
|
12
12
|
declare const backOutDown: Keyframe;
|
|
13
|
-
declare function PageBackIn(): CSSObject
|
|
14
|
-
declare function PageBackOut(): CSSObject
|
|
13
|
+
declare function PageBackIn(): CSSObject;
|
|
14
|
+
declare function PageBackOut(): CSSObject;
|
|
15
15
|
//#endregion
|
|
16
16
|
export { PageBackIn, PageBackOut, backInDown, backInLeft, backInRight, backInUp, backOutDown, backOutLeft, backOutRight, backOutUp };
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { Keyframe } from "@gx-design-vue/pro-provider";
|
|
2
|
-
|
|
3
|
-
//#region src/components/PageTranstion/keyFrame/back.ts
|
|
2
|
+
//#region src/components/PageTransition/keyFrame/back.ts
|
|
4
3
|
const backInLeft = new Keyframe("backInLeft", {
|
|
5
4
|
"0%": {
|
|
6
5
|
opacity: .7,
|
|
@@ -153,6 +152,5 @@ function PageBackOut() {
|
|
|
153
152
|
}
|
|
154
153
|
};
|
|
155
154
|
}
|
|
156
|
-
|
|
157
155
|
//#endregion
|
|
158
|
-
export { PageBackIn, PageBackOut, backInDown, backInLeft, backInRight, backInUp, backOutDown, backOutLeft, backOutRight, backOutUp };
|
|
156
|
+
export { PageBackIn, PageBackOut, backInDown, backInLeft, backInRight, backInUp, backOutDown, backOutLeft, backOutRight, backOutUp };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Keyframe } from "@gx-design-vue/pro-provider";
|
|
2
|
-
import { CSSObject
|
|
2
|
+
import { CSSObject } from "@antdv-next/cssinjs";
|
|
3
3
|
|
|
4
|
-
//#region src/components/
|
|
4
|
+
//#region src/components/PageTransition/keyFrame/bounce.d.ts
|
|
5
5
|
declare const bounceIn: Keyframe;
|
|
6
6
|
declare const bounceInLeft: Keyframe;
|
|
7
7
|
declare const bounceInRight: Keyframe;
|
|
@@ -12,7 +12,7 @@ declare const bounceOutLeft: Keyframe;
|
|
|
12
12
|
declare const bounceOutRight: Keyframe;
|
|
13
13
|
declare const bounceOutDown: Keyframe;
|
|
14
14
|
declare const bounceOutUp: Keyframe;
|
|
15
|
-
declare function PageBounceIn(): CSSObject
|
|
16
|
-
declare function PageBounceOut(): CSSObject
|
|
15
|
+
declare function PageBounceIn(): CSSObject;
|
|
16
|
+
declare function PageBounceOut(): CSSObject;
|
|
17
17
|
//#endregion
|
|
18
18
|
export { PageBounceIn, PageBounceOut, bounceIn, bounceInDown, bounceInLeft, bounceInRight, bounceInUp, bounceOut, bounceOutDown, bounceOutLeft, bounceOutRight, bounceOutUp };
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { Keyframe } from "@gx-design-vue/pro-provider";
|
|
2
|
-
|
|
3
|
-
//#region src/components/PageTranstion/keyFrame/bounce.ts
|
|
2
|
+
//#region src/components/PageTransition/keyFrame/bounce.ts
|
|
4
3
|
const bounceIn = new Keyframe("bounceIn", {
|
|
5
4
|
"from,20%,40%,60%,80%,to": { animationTimingFunction: "cubic-bezier(0.215, 0.61, 0.355, 1)" },
|
|
6
5
|
"0%": {
|
|
@@ -173,6 +172,5 @@ function PageBounceOut() {
|
|
|
173
172
|
}
|
|
174
173
|
};
|
|
175
174
|
}
|
|
176
|
-
|
|
177
175
|
//#endregion
|
|
178
|
-
export { PageBounceIn, PageBounceOut, bounceIn, bounceInDown, bounceInLeft, bounceInRight, bounceInUp, bounceOut, bounceOutDown, bounceOutLeft, bounceOutRight, bounceOutUp };
|
|
176
|
+
export { PageBounceIn, PageBounceOut, bounceIn, bounceInDown, bounceInLeft, bounceInRight, bounceInUp, bounceOut, bounceOutDown, bounceOutLeft, bounceOutRight, bounceOutUp };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Keyframe } from "@gx-design-vue/pro-provider";
|
|
2
|
-
import { CSSObject
|
|
2
|
+
import { CSSObject } from "@antdv-next/cssinjs";
|
|
3
3
|
|
|
4
|
-
//#region src/components/
|
|
4
|
+
//#region src/components/PageTransition/keyFrame/fade.d.ts
|
|
5
5
|
declare const fadeIn: Keyframe;
|
|
6
6
|
declare const fadeInLeft: Keyframe;
|
|
7
7
|
declare const fadeInRight: Keyframe;
|
|
@@ -28,7 +28,7 @@ declare const fadeOutTopLeft: Keyframe;
|
|
|
28
28
|
declare const fadeOutBottomRight: Keyframe;
|
|
29
29
|
declare const fadeOutTopRight: Keyframe;
|
|
30
30
|
declare const fadeOutBottomLeft: Keyframe;
|
|
31
|
-
declare function PageFadeIn(): CSSObject
|
|
32
|
-
declare function PageFadeOut(): CSSObject
|
|
31
|
+
declare function PageFadeIn(): CSSObject;
|
|
32
|
+
declare function PageFadeOut(): CSSObject;
|
|
33
33
|
//#endregion
|
|
34
34
|
export { PageFadeIn, PageFadeOut, fadeIn, fadeInBottomLeft, fadeInBottomRight, fadeInDown, fadeInDownBig, fadeInLeft, fadeInLeftBig, fadeInRight, fadeInRightBig, fadeInTopLeft, fadeInTopRight, fadeInUp, fadeInUpBig, fadeOut, fadeOutBottomLeft, fadeOutBottomRight, fadeOutDown, fadeOutDownBig, fadeOutLeft, fadeOutLeftBig, fadeOutRight, fadeOutRightBig, fadeOutTopLeft, fadeOutTopRight, fadeOutUp, fadeOutUpBig };
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { Keyframe } from "@gx-design-vue/pro-provider";
|
|
2
|
-
|
|
3
|
-
//#region src/components/PageTranstion/keyFrame/fade.ts
|
|
2
|
+
//#region src/components/PageTransition/keyFrame/fade.ts
|
|
4
3
|
const fadeIn = new Keyframe("fadeIn", {
|
|
5
4
|
"from": { opacity: 0 },
|
|
6
5
|
"to": { opacity: 1 }
|
|
@@ -337,6 +336,5 @@ function PageFadeOut() {
|
|
|
337
336
|
}
|
|
338
337
|
};
|
|
339
338
|
}
|
|
340
|
-
|
|
341
339
|
//#endregion
|
|
342
|
-
export { PageFadeIn, PageFadeOut, fadeIn, fadeInBottomLeft, fadeInBottomRight, fadeInDown, fadeInDownBig, fadeInLeft, fadeInLeftBig, fadeInRight, fadeInRightBig, fadeInTopLeft, fadeInTopRight, fadeInUp, fadeInUpBig, fadeOut, fadeOutBottomLeft, fadeOutBottomRight, fadeOutDown, fadeOutDownBig, fadeOutLeft, fadeOutLeftBig, fadeOutRight, fadeOutRightBig, fadeOutTopLeft, fadeOutTopRight, fadeOutUp, fadeOutUpBig };
|
|
340
|
+
export { PageFadeIn, PageFadeOut, fadeIn, fadeInBottomLeft, fadeInBottomRight, fadeInDown, fadeInDownBig, fadeInLeft, fadeInLeftBig, fadeInRight, fadeInRightBig, fadeInTopLeft, fadeInTopRight, fadeInUp, fadeInUpBig, fadeOut, fadeOutBottomLeft, fadeOutBottomRight, fadeOutDown, fadeOutDownBig, fadeOutLeft, fadeOutLeftBig, fadeOutRight, fadeOutRightBig, fadeOutTopLeft, fadeOutTopRight, fadeOutUp, fadeOutUpBig };
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { Keyframe } from "@gx-design-vue/pro-provider";
|
|
2
|
-
import { CSSObject
|
|
2
|
+
import { CSSObject } from "@antdv-next/cssinjs";
|
|
3
3
|
|
|
4
|
-
//#region src/components/
|
|
4
|
+
//#region src/components/PageTransition/keyFrame/flip.d.ts
|
|
5
5
|
declare const flipInX: Keyframe;
|
|
6
6
|
declare const flipInY: Keyframe;
|
|
7
7
|
declare const flipOutX: Keyframe;
|
|
8
8
|
declare const flipOutY: Keyframe;
|
|
9
|
-
declare function PageFlipIn(): CSSObject
|
|
10
|
-
declare function PageFlipOut(): CSSObject
|
|
9
|
+
declare function PageFlipIn(): CSSObject;
|
|
10
|
+
declare function PageFlipOut(): CSSObject;
|
|
11
11
|
//#endregion
|
|
12
12
|
export { PageFlipIn, PageFlipOut, flipInX, flipInY, flipOutX, flipOutY };
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { Keyframe } from "@gx-design-vue/pro-provider";
|
|
2
|
-
|
|
3
|
-
//#region src/components/PageTranstion/keyFrame/flip.ts
|
|
2
|
+
//#region src/components/PageTransition/keyFrame/flip.ts
|
|
4
3
|
const flipInX = new Keyframe("flipInX", {
|
|
5
4
|
"from": {
|
|
6
5
|
opacity: 0,
|
|
@@ -87,6 +86,5 @@ function PageFlipOut() {
|
|
|
87
86
|
}
|
|
88
87
|
};
|
|
89
88
|
}
|
|
90
|
-
|
|
91
89
|
//#endregion
|
|
92
|
-
export { PageFlipIn, PageFlipOut, flipInX, flipInY, flipOutX, flipOutY };
|
|
90
|
+
export { PageFlipIn, PageFlipOut, flipInX, flipInY, flipOutX, flipOutY };
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { Keyframe } from "@gx-design-vue/pro-provider";
|
|
2
|
-
import { CSSObject
|
|
2
|
+
import { CSSObject } from "@antdv-next/cssinjs";
|
|
3
3
|
|
|
4
|
-
//#region src/components/
|
|
4
|
+
//#region src/components/PageTransition/keyFrame/lightSpeed.d.ts
|
|
5
5
|
declare const lightSpeedInLeft: Keyframe;
|
|
6
6
|
declare const lightSpeedInRight: Keyframe;
|
|
7
7
|
declare const lightSpeedOutLeft: Keyframe;
|
|
8
8
|
declare const lightSpeedOutRight: Keyframe;
|
|
9
|
-
declare function PageLightSpeedIn(): CSSObject
|
|
10
|
-
declare function PageLightSpeedOut(): CSSObject
|
|
9
|
+
declare function PageLightSpeedIn(): CSSObject;
|
|
10
|
+
declare function PageLightSpeedOut(): CSSObject;
|
|
11
11
|
//#endregion
|
|
12
12
|
export { PageLightSpeedIn, PageLightSpeedOut, lightSpeedInLeft, lightSpeedInRight, lightSpeedOutLeft, lightSpeedOutRight };
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { Keyframe } from "@gx-design-vue/pro-provider";
|
|
2
|
-
|
|
3
|
-
//#region src/components/PageTranstion/keyFrame/lightSpeed.ts
|
|
2
|
+
//#region src/components/PageTransition/keyFrame/lightSpeed.ts
|
|
4
3
|
const lightSpeedInLeft = new Keyframe("lightSpeedInLeft", {
|
|
5
4
|
"from": {
|
|
6
5
|
opacity: 0,
|
|
@@ -67,6 +66,5 @@ function PageLightSpeedOut() {
|
|
|
67
66
|
}
|
|
68
67
|
};
|
|
69
68
|
}
|
|
70
|
-
|
|
71
69
|
//#endregion
|
|
72
|
-
export { PageLightSpeedIn, PageLightSpeedOut, lightSpeedInLeft, lightSpeedInRight, lightSpeedOutLeft, lightSpeedOutRight };
|
|
70
|
+
export { PageLightSpeedIn, PageLightSpeedOut, lightSpeedInLeft, lightSpeedInRight, lightSpeedOutLeft, lightSpeedOutRight };
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { Keyframe } from "@gx-design-vue/pro-provider";
|
|
2
|
+
import { CSSObject } from "@antdv-next/cssinjs";
|
|
3
|
+
|
|
4
|
+
//#region src/components/PageTransition/keyFrame/roll.d.ts
|
|
5
|
+
declare const rollIn: Keyframe;
|
|
6
|
+
declare const rollOut: Keyframe;
|
|
7
|
+
declare function PageRollIn(): CSSObject;
|
|
8
|
+
declare function PageRollOut(): CSSObject;
|
|
9
|
+
//#endregion
|
|
10
|
+
export { PageRollIn, PageRollOut, rollIn, rollOut };
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { Keyframe } from "@gx-design-vue/pro-provider";
|
|
2
|
-
|
|
3
|
-
//#region src/components/PageTranstion/keyFrame/roll.ts
|
|
2
|
+
//#region src/components/PageTransition/keyFrame/roll.ts
|
|
4
3
|
const rollIn = new Keyframe("rollIn", {
|
|
5
4
|
"from": {
|
|
6
5
|
opacity: 0,
|
|
@@ -30,6 +29,5 @@ function PageRollOut() {
|
|
|
30
29
|
animationName: rollOut
|
|
31
30
|
} };
|
|
32
31
|
}
|
|
33
|
-
|
|
34
32
|
//#endregion
|
|
35
|
-
export { PageRollIn, PageRollOut, rollIn, rollOut };
|
|
33
|
+
export { PageRollIn, PageRollOut, rollIn, rollOut };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Keyframe } from "@gx-design-vue/pro-provider";
|
|
2
|
-
import { CSSObject
|
|
2
|
+
import { CSSObject } from "@antdv-next/cssinjs";
|
|
3
3
|
|
|
4
|
-
//#region src/components/
|
|
4
|
+
//#region src/components/PageTransition/keyFrame/rotate.d.ts
|
|
5
5
|
declare const rotateIn: Keyframe;
|
|
6
6
|
declare const rotateInDownLeft: Keyframe;
|
|
7
7
|
declare const rotateInDownRight: Keyframe;
|
|
@@ -12,7 +12,7 @@ declare const rotateOutDownLeft: Keyframe;
|
|
|
12
12
|
declare const rotateOutDownRight: Keyframe;
|
|
13
13
|
declare const rotateOutUpLeft: Keyframe;
|
|
14
14
|
declare const rotateOutUpRight: Keyframe;
|
|
15
|
-
declare function PageRotateIn(): CSSObject
|
|
16
|
-
declare function PageRotateOut(): CSSObject
|
|
15
|
+
declare function PageRotateIn(): CSSObject;
|
|
16
|
+
declare function PageRotateOut(): CSSObject;
|
|
17
17
|
//#endregion
|
|
18
18
|
export { PageRotateIn, PageRotateOut, rotateIn, rotateInDownLeft, rotateInDownRight, rotateInUpLeft, rotateInUpRight, rotateOut, rotateOutDownLeft, rotateOutDownRight, rotateOutUpLeft, rotateOutUpRight };
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { Keyframe } from "@gx-design-vue/pro-provider";
|
|
2
|
-
|
|
3
|
-
//#region src/components/PageTranstion/keyFrame/rotate.ts
|
|
2
|
+
//#region src/components/PageTransition/keyFrame/rotate.ts
|
|
4
3
|
const rotateIn = new Keyframe("rotateIn", {
|
|
5
4
|
"from": {
|
|
6
5
|
opacity: 0,
|
|
@@ -144,6 +143,5 @@ function PageRotateOut() {
|
|
|
144
143
|
}
|
|
145
144
|
};
|
|
146
145
|
}
|
|
147
|
-
|
|
148
146
|
//#endregion
|
|
149
|
-
export { PageRotateIn, PageRotateOut, rotateIn, rotateInDownLeft, rotateInDownRight, rotateInUpLeft, rotateInUpRight, rotateOut, rotateOutDownLeft, rotateOutDownRight, rotateOutUpLeft, rotateOutUpRight };
|
|
147
|
+
export { PageRotateIn, PageRotateOut, rotateIn, rotateInDownLeft, rotateInDownRight, rotateInUpLeft, rotateInUpRight, rotateOut, rotateOutDownLeft, rotateOutDownRight, rotateOutUpLeft, rotateOutUpRight };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Keyframe } from "@gx-design-vue/pro-provider";
|
|
2
|
-
import { CSSObject
|
|
2
|
+
import { CSSObject } from "@antdv-next/cssinjs";
|
|
3
3
|
|
|
4
|
-
//#region src/components/
|
|
4
|
+
//#region src/components/PageTransition/keyFrame/slide.d.ts
|
|
5
5
|
declare const slideInDown: Keyframe;
|
|
6
6
|
declare const slideInLeft: Keyframe;
|
|
7
7
|
declare const slideInRight: Keyframe;
|
|
@@ -10,7 +10,7 @@ declare const slideOutDown: Keyframe;
|
|
|
10
10
|
declare const slideOutLeft: Keyframe;
|
|
11
11
|
declare const slideOutRight: Keyframe;
|
|
12
12
|
declare const slideOutUp: Keyframe;
|
|
13
|
-
declare function PageSlideIn(): CSSObject
|
|
14
|
-
declare function PageSlideOut(): CSSObject
|
|
13
|
+
declare function PageSlideIn(): CSSObject;
|
|
14
|
+
declare function PageSlideOut(): CSSObject;
|
|
15
15
|
//#endregion
|
|
16
16
|
export { PageSlideIn, PageSlideOut, slideInDown, slideInLeft, slideInRight, slideInUp, slideOutDown, slideOutLeft, slideOutRight, slideOutUp };
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { Keyframe } from "@gx-design-vue/pro-provider";
|
|
2
|
-
|
|
3
|
-
//#region src/components/PageTranstion/keyFrame/slide.ts
|
|
2
|
+
//#region src/components/PageTransition/keyFrame/slide.ts
|
|
4
3
|
const slideInDown = new Keyframe("slideInDown", {
|
|
5
4
|
"from": {
|
|
6
5
|
transform: "translate3d(0, -100%, 0)",
|
|
@@ -97,6 +96,5 @@ function PageSlideOut() {
|
|
|
97
96
|
}
|
|
98
97
|
};
|
|
99
98
|
}
|
|
100
|
-
|
|
101
99
|
//#endregion
|
|
102
|
-
export { PageSlideIn, PageSlideOut, slideInDown, slideInLeft, slideInRight, slideInUp, slideOutDown, slideOutLeft, slideOutRight, slideOutUp };
|
|
100
|
+
export { PageSlideIn, PageSlideOut, slideInDown, slideInLeft, slideInRight, slideInUp, slideOutDown, slideOutLeft, slideOutRight, slideOutUp };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Keyframe } from "@gx-design-vue/pro-provider";
|
|
2
|
-
import { CSSObject
|
|
2
|
+
import { CSSObject } from "@antdv-next/cssinjs";
|
|
3
3
|
|
|
4
|
-
//#region src/components/
|
|
4
|
+
//#region src/components/PageTransition/keyFrame/zoom.d.ts
|
|
5
5
|
declare const zoomIn: Keyframe;
|
|
6
6
|
declare const zoomInDown: Keyframe;
|
|
7
7
|
declare const zoomInLeft: Keyframe;
|
|
@@ -12,7 +12,7 @@ declare const zoomOutDown: Keyframe;
|
|
|
12
12
|
declare const zoomOutLeft: Keyframe;
|
|
13
13
|
declare const zoomOutRight: Keyframe;
|
|
14
14
|
declare const zoomOutUp: Keyframe;
|
|
15
|
-
declare function PageZoomIn(): CSSObject
|
|
16
|
-
declare function PageZoomOut(): CSSObject
|
|
15
|
+
declare function PageZoomIn(): CSSObject;
|
|
16
|
+
declare function PageZoomOut(): CSSObject;
|
|
17
17
|
//#endregion
|
|
18
18
|
export { PageZoomIn, PageZoomOut, zoomIn, zoomInDown, zoomInLeft, zoomInRight, zoomInUp, zoomOut, zoomOutDown, zoomOutLeft, zoomOutRight, zoomOutUp };
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { Keyframe } from "@gx-design-vue/pro-provider";
|
|
2
|
-
|
|
3
|
-
//#region src/components/PageTranstion/keyFrame/zoom.ts
|
|
2
|
+
//#region src/components/PageTransition/keyFrame/zoom.ts
|
|
4
3
|
const zoomIn = new Keyframe("zoomIn", {
|
|
5
4
|
"from": {
|
|
6
5
|
opacity: 0,
|
|
@@ -160,6 +159,5 @@ function PageZoomOut() {
|
|
|
160
159
|
}
|
|
161
160
|
};
|
|
162
161
|
}
|
|
163
|
-
|
|
164
162
|
//#endregion
|
|
165
|
-
export { PageZoomIn, PageZoomOut, zoomIn, zoomInDown, zoomInLeft, zoomInRight, zoomInUp, zoomOut, zoomOutDown, zoomOutLeft, zoomOutRight, zoomOutUp };
|
|
163
|
+
export { PageZoomIn, PageZoomOut, zoomIn, zoomInDown, zoomInLeft, zoomInRight, zoomInUp, zoomOut, zoomOutDown, zoomOutLeft, zoomOutRight, zoomOutUp };
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { ProFullToken } from "@gx-design-vue/pro-provider";
|
|
2
|
+
import { CSSObject } from "@antdv-next/cssinjs";
|
|
3
|
+
import { GenerateStyle } from "antdv-next/dist/theme/internal";
|
|
4
|
+
|
|
5
|
+
//#region src/components/PageTransition/style.d.ts
|
|
6
|
+
type ComponentToken = Record<string, any>;
|
|
7
|
+
/** GPageTransition 样式:进场/离场两段,合并所有预设关键帧。 */
|
|
8
|
+
declare const genPageTransitionStyle: GenerateStyle<ProFullToken<'ProPageTransition'>, CSSObject>;
|
|
9
|
+
declare const _default: (prefixCls: import("vue").Ref<string>, rootCls?: import("vue").Ref<string | undefined>) => readonly [import("vue").Ref<string, string>, import("vue").ComputedRef<string | undefined>];
|
|
10
|
+
//#endregion
|
|
11
|
+
export { ComponentToken, _default as default, genPageTransitionStyle };
|
|
@@ -7,11 +7,12 @@ import { PageRollIn, PageRollOut } from "./keyFrame/roll.js";
|
|
|
7
7
|
import { PageRotateIn, PageRotateOut } from "./keyFrame/rotate.js";
|
|
8
8
|
import { PageSlideIn, PageSlideOut } from "./keyFrame/slide.js";
|
|
9
9
|
import { PageZoomIn, PageZoomOut } from "./keyFrame/zoom.js";
|
|
10
|
-
import {
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
const
|
|
14
|
-
|
|
10
|
+
import { proGenStyleHooks } from "@gx-design-vue/pro-provider";
|
|
11
|
+
//#region src/components/PageTransition/style.ts
|
|
12
|
+
/** GPageTransition 样式:进场/离场两段,合并所有预设关键帧。 */
|
|
13
|
+
const genPageTransitionStyle = (token) => {
|
|
14
|
+
const { componentCls } = token;
|
|
15
|
+
return { [componentCls]: {
|
|
15
16
|
"&-enter": {
|
|
16
17
|
background: "transparent",
|
|
17
18
|
animationDuration: ".3s !important",
|
|
@@ -26,7 +27,7 @@ const ProLayoutPageTransition = (token) => {
|
|
|
26
27
|
...PageSlideIn()
|
|
27
28
|
},
|
|
28
29
|
"&-leave": {
|
|
29
|
-
display: "none",
|
|
30
|
+
display: "none !important",
|
|
30
31
|
background: "transparent",
|
|
31
32
|
animationDuration: ".3s !important",
|
|
32
33
|
...PageBackOut(),
|
|
@@ -41,11 +42,6 @@ const ProLayoutPageTransition = (token) => {
|
|
|
41
42
|
}
|
|
42
43
|
} };
|
|
43
44
|
};
|
|
44
|
-
|
|
45
|
-
return useStyle$1("PageTranstion", (token) => {
|
|
46
|
-
return [ProLayoutPageTransition(token)];
|
|
47
|
-
}, componentCls);
|
|
48
|
-
}
|
|
49
|
-
|
|
45
|
+
var style_default = proGenStyleHooks("ProPageTransition", genPageTransitionStyle);
|
|
50
46
|
//#endregion
|
|
51
|
-
export {
|
|
47
|
+
export { style_default as default, genPageTransitionStyle };
|