Vue平滑回流

Vue平滑回流

插件名称:vue-smooth-reflow

发布时间:2020年8月15日

插件作者:guanzo

官网 演示 GitHub下载

Vue平滑重排可让您在数据更改时过渡元素重排。

更改组件数据后,您注册的所有CSS属性都将转换为其新值。

安装和下载:

# NPM
$ npm install vue-smooth-reflow --save

用法

模块:

<template>
    <div>
        <div v-for="n in children" />
    </div>
</template>

<script>
// 组件的根el现在将转换到
// 适应“this.children”的新价

import smoothReflow from 'vue-smooth-reflow'
export default {
    mixins: [smoothReflow],
    data() {
        return {
            children: '<Dynamic value>'
        }
    },
    mounted(){
        this.$smoothReflow()
    },
}
</script>
相关插件