使用vue实现灭霸打响指消散效果
发布: 2019-10-07 20:03:13标签: vue
kuan-vue-scatter
使用vue实现灭霸打响指消散效果(工作太忙,一直想写,等到了国庆)
源码地址
DEMO预览
安装
01npm install kuan-vue-scatter -S 02# or03yarn add kuan-vue-scatter
复制代码使用
01<template>02 <div>03 <button :disabled="!visible" @click="visible = false">{{visible ? '消散' : '显示'}}</button>0405 <vue-scatter :visible="visible" @end="visible = true" class="test-container">06 <img src="./images/1.jpg" alt="">07 </vue-scatter>08 </div>09</template>1011<script>12import VueScatter from 'kuan-vue-scatter'1314export default {15 components: {16 VueScatter17 },18 data() {19 return {20 visible: true21 }22 }23}24</script>
复制代码