0.1.2 • Published 3 years ago
vue-weather-icon v0.1.2
vue-weather-icon
安装
$ npm install vue-weather-icon -S
使用
在 main.js
文件中引入插件并注册
# main.js
import vue-weather-icon from 'vue-weather-icon'
import 'vue-weather-icon/lib/vue-weather-icon.css'
Vue.use(vue-weather-icon)
在项目中用使用 vue-weather-icon
<!-- <weather-icon type="stormy" radius="0" scale="50px">
雨夹雪
</weather-icon> -->
<weather-icon type="sun" radius="10px" scale="1in" showLabel>
</weather-icon>
<weather-icon type="sun" radius="10px" scale="2in" showLabel>
</weather-icon>
<!-- <weather-icon type="stormy" showLabel scale="10rem"> 666 </weather-icon> -->
<!-- <weather-icon type="stormy" showLabel scale="10em">555 </weather-icon> -->
<!-- <weather-icon type="stormy" showLabel scale="10vh"> </weather-icon> -->
注意:标签为 <weather-icon>
参数
参数 | 说明 | 类型 | 值 |
---|---|---|---|
type | 类型 | String | breezy,cloudy,fog,heavy-rain,light-rain,light-snow,night-sun,overcast,stormy,sun |
showLabel | 是否显示标题 | String | (slot) |
radius | 圆角 | String | px % |
scale | 大小 宽度 | String | px % |