+ Hi, Motion
+
+
+
+
+
+
+ item1
+ item2
+ item3
+
+ {['vue', 'react', 'angular'].map((item, i) => (
+
+ {item}
+
+ ))}
+
+
+
{
+ setRotate(!isRotated)
+ }}
+ >
+
{
+ setRotate(!isRotated)
+ }}
+ >
+ 点击切换
+
+
+
+
+ console.log(info.point.x, info.point.y)}
+ onDragEnd={(event, info) => console.log(info.point.x, info.point.y)}
+ onDirectionLock={(axis) => console.log('axis', axis)}
+ dragSnapToOrigin={true}
+ // dragConstraints={{ left: 0, right: 300 }}
+ dragConstraints={constraintsRef}
+ // dragElastic={false}
+ // dragElastic={0.8}
+ // dragPropagation={false}
+ >
+
+ {
+ controller.start({ scale: 1.2 })
+ }}
+ >
+ 大
+
+ {
+ controller.start({ rotate: 45 })
+ }}
+ >
+ 旋转
+
+ {
+ controller.start({ opacity: 0.2 })
+ }}
+ >
+ 透明度
+
+ {
+ controller.start({ opacity: 1, rotate: 0, scale: 1.0 })
+ }}
+ >
+ 还原
+
+
+
+
+
+
{
+ console.log(latest.x, latest.y)
+ }}
+ onAnimationStart={() => {
+ console.log('Animation started')
+ setIsAnimation(true)
+ }}
+ onAnimationComplete={(definition) => {
+ setIsAnimation(false)
+ console.log('Completed animating', definition)
+ }}
+ >
+
+ {
+ await controller2.start({ x: 100 })
+ await controller2.start({ y: -200 })
+ await controller2.start({ x: -100 })
+ controller2.start({ y: 0 })
+ }}
+ >
+ 开始
+
+
+
+
+
+
+ {easeNames.map((item, i) => {
+ return (
+
+
+ {item}
+
+ {item}
+
+ )
+ })}
+
+
+
{
+ controls.start({ y: -200 })
+ }}
+ >
+ 开始
+
+
{
+ controls.set({ y: 0 })
+ }}
+ >
+ 还原
+
+
+
+
+
+
+
+
+ {
+ setButtonState(!buttonRight)
+ }}
+ >
+
+
+
+
+
+ {listLabel.map((item) => {
+ return (
+
+ {item}
+
+ )
+ })}
+ {
+ setListLabel(randomSort(listLabel))
+ }}
+ >
+ 点击改变顺序
+
+
+
+
+ {
+ setButtonState(!buttonRight)
+ }}
+ >
+
+ {
+ setButtonState(!buttonRight)
+ }}
+ >
+
+ 点击任意一个
+
+
+
+
+
+ {
+ setBigState(!isBig)
+ }}
+ >
+ click
+
+
+
+
+
+
+
+
+ {
+ setLeftState(!leftState)
+ }}
+ >
+
+
+ 黑点和文字都设置了layout
+
+
+ {
+ setLeftState(!leftState)
+ }}
+ >
+
+
+ 黑点和文字都未设置layout
+
+
+
+ )
+}
+
+export default ParallaxVert
diff --git a/src/routers/index.jsx b/src/routers/index.jsx
index c77cf68f..1f6683f8 100644
--- a/src/routers/index.jsx
+++ b/src/routers/index.jsx
@@ -43,6 +43,7 @@ const Barcode = lazy(() => import('@pages/barcode'))
const Print = lazy(() => import('@pages/print'))
const PostMessage = lazy(() => import('@pages/postmessage'))
const GeoChart = lazy(() => import('@pages/geoChart'))
+const Motion = lazy(() => import('@pages/motion'))
// const ReactPdf = lazy(() => import('@pages/reactPdf'))
const MyIframe = lazy(() => import('@pages/postmessage/myIframe'))
const Exception403 = lazy(() => import('@stateless/Exception/exception403'))
@@ -83,6 +84,14 @@ const rootRouter = [
auth: true,
element: lazyLoad(ParallaxVert),
},
+ {
+ index: false,
+ path: 'motion',
+ name: 'Motion',
+ key: '/motion',
+ auth: false,
+ element: lazyLoad(Motion),
+ },
{
index: false,
path: 'gantt',