0.1.2 • Published 3 years ago

vue-weather-icon v0.1.2

Weekly downloads
-
License
MIT
Repository
-
Last release
3 years ago

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类型Stringbreezy,cloudy,fog,heavy-rain,light-rain,light-snow,night-sun,overcast,stormy,sun
showLabel是否显示标题String(slot)
radius圆角Stringpx %
scale大小 宽度Stringpx %