前言
此組件爲本人使用ES6封裝的花瓣飄落插件,已應用於多個活動,以下只分享組件的實現及使用方法,不涉及活動相關代碼,插件已上傳npm,可通過npm安裝使用。
github地址:https://github.com/XieTongXue/flower-fly
安裝
$ npm install flower-fly -S
使用方法
① import FlowerFly from 'flower-fly'
② new FlowerFly(yourFlowerCount, yourFlowerUrl)
如:
new FlowerFly(13, 'https://www.xxxx.xxx/xxx.png')