aliyun0639241635 4880824ab1 项目级别页面和引入UI组件 hai 11 meses
..
components 4880824ab1 项目级别页面和引入UI组件 hai 11 meses
utssdk 4880824ab1 项目级别页面和引入UI组件 hai 11 meses
changelog.md 4880824ab1 项目级别页面和引入UI组件 hai 11 meses
package.json 4880824ab1 项目级别页面和引入UI组件 hai 11 meses
readme.md 4880824ab1 项目级别页面和引入UI组件 hai 11 meses

readme.md

lime-animateIt 元素动画

  • 参考createAnimation的实现步骤,当前版本会有各平台表现不一致的问题

安装

在插件市场导入即可

使用

// animationData 没有作用,只为兼容小程序
<view ref="viewRef" :animation="animationData" class="test"></view>
import {createAnimation, CreateAnimationOptions} from '@/uni_modules/lime-animateIt'
const viewRef = ref<UniElement|null>(null)

animation.scaleX(0.5).translateX(200).step()
animation.top(200).scaleX(1.8).step({duration: 600})
animation.top(100).left(-200).step({duration: 2000})
// 非小程序export不导致出任何内容,也不支持下面的参数
// 参数1: 需要动画的元素(非小程序必填)
// 参数2: 循环次数 -1为无限(可选,不填则1次)
animationData.value = animation.export(viewRef,2)

// APP WEB
animation.onFinish = ()=>{
	console.log('onFinish')
}

const onClick = ()=>{
	// APP WEB
	animation.play()
}
const onStop = ()=>{
	// APP WEB
	animation.stop()
}

API

可以参考createanimation,但uniappX支持的动画有限property