更新记录
1.0.1(2024-08-30)
下载此版本
更新
1.0.0(2024-08-30)
下载此版本
组件初始化
平台兼容性
App |
快应用 |
微信小程序 |
支付宝小程序 |
百度小程序 |
字节小程序 |
QQ小程序 |
HBuilderX 3.1.0 app-vue app-nvue |
× |
× |
× |
× |
× |
× |
钉钉小程序 |
快手小程序 |
飞书小程序 |
京东小程序 |
× |
× |
× |
× |
H5-Safari |
Android Browser |
微信浏览器(Android) |
QQ浏览器(Android) |
Chrome |
IE |
Edge |
Firefox |
PC-Safari |
× |
× |
× |
× |
√ |
× |
× |
× |
× |
ly-weather
基本用法
1.在需要的页面引入该插件
import lyWeather from '@/components/ly-weather/ly-weather.vue';
2.在需要的页面使用
<ly-weather ref="lyWeather" :nowData="nowData" :data="data"></ly-weather>
3.在当需要引入的页面定义天气数据
nowData:{
temperature:30,
city:'兰州',
weather: "晴",
wind:'西南风',
level:'2级',
humidity:'20%',
airQuality:34
}
data: [{
week: "周二",
label: "8/11",
weather: "雪",
weatherIcon: require("../../static/15.png"),
max: 34,
min: 27,
wind: "西南风",
air: "良"
}, {
week: "周三",
label: "8/12",
weather: "雪",
weatherIcon: require("../../static/15.png"),
max: 34,
min: 27,
wind: "西南风",
air: "良"
}, {
week: "周四",
label: "8/13",
weather: "晴",
weatherIcon: require("../../static/16.png"),
max: 36,
min: 27,
wind: "西南风",
air: "良"
}, {
week: "周五",
label: "8/14",
weather: "晴",
weatherIcon: require("../../static/16.png"),
max: 35,
min: 26,
wind: "西南风",
air: "良"
}]