一个Vue.js组件,可将可配置的柔和或强烈的发光效果应用于应用程序中的任何元素。
# NPM
$ npm i vue-glow --save
1.导入VueGlow组件。
import VueGlow from 'vue-glow';
2.将VueGlow组件添加到模板。
// soft
<VueGlow color="#18806C" mode="hex" elevation="11" intensity="1.67">任何你想要的!</VueGlow>
// intense
<VueGlow color="#18806C" mode="hex" elevation="11" intensity="1.67" intense>任何你想要的!</VueGlow>
3.所有可能的道具都可以配置发光效果。
color :{默认:’红色’},
mode :{类型:字符串,默认:’ name ‘},//’ name ‘,’ hex ‘,’rgb’或’hsl’。
elevation :{默认:12},
intense :{类型:布尔值,默认值:假},
intensity :{类型:数字,默认:1},
disabled :布尔值,
tile :布尔,
fade :布尔,//使褪色过渡
reversed :布尔值,
interval :{默认值:50}
4.对发光效果应用淡入淡出过渡。
<VueGlow color="#18806C" mode="hex" fade interval="31" elevation="11" intensity="1.67" intense>任何你想要的!</VueGlow>