百科.dev
全部条目在线工具AI 编程趋势榜开源项目技术资讯提交条目
登录
< 返回工具列表
V

vue-tweezing

> 前端框架
开源

易于使用、可自定义和自动的转换,并在有限的插槽中进行了良好处理

99 stars0 点赞5 次浏览
访问官网GitHub

工具介绍

易于使用、可自定义和自动的转换,并在有限的插槽中进行了良好处理

VueTweezing

Easy, customizable and automatic tweening nicely served in scoped slots

VueTweezing works with any tweening engine and provide easy integration with some engines like tween.js and Tweezer

Demo, source

Usage

Install it as a plugin:

javascript
import { Tweezing, tweezerHelper } from 'vue-tweezing'
// import Tweezer to use it as our Tweening engine
import Tweezer from 'tweezer.js'

// install the plugin with as many engines as you want
// use the tweezerHelper to generate the function
// needed by VueTweezing to handle tweezing
Vue.use(Tweezing, {
  tweezer: tweezerHelper(Tweezer),
})

Use it as a component:

xml

  
    target: {{ value }}
    val: {{ tweenedValue }}
  

Change value as you would usually do:

javascript
const vm = new Vue({
  el: '#app',
  data: {
    value: 0,
  },
})
// somewhere else
vm.value = 200

You can play with the tween object by accessing the property $tween in the Tweening component:

javascript
// given the example above
vm.$refs.tweezing.$tween.stop()

Passing tweening options

Any prop passed to Tweezing different from tween and to will be considered an option and passed

Supported Tweening engines

WIP

Tweezer

Tween.js

Adding your own

WIP

You can check the examples in src/index.js to see how to create your own helpers.

License

MIT

Issues· 0 开放

查看全部 Issues在 GitHub 打开

暂无开放 Issues,或尚未同步最近议题。

> 标签

JavaScriptanimationcomponentmotionscoped-slot

暂无评论,来聊聊你的看法吧

> 工具信息

发布日期2026年8月1日
最后更新2026年9月18日
分类前端框架
定价开源

> 相关工具

R
React
用于构建用户界面的 JavaScript 库
V
Vue.js
渐进式 JavaScript 框架
N
Next.js
基于 React 的全栈 Web 框架