合作咨询
我们的专家服务团队将竭诚为您提供专业的合作咨询服务
分发文档
RefreshWeatherCommand主要在需要手动刷新天气变量的值时使用。
天气在应用、亮屏、进入前台这几种情况下会自动刷新,不再需要在resume中添加刷新命令。
起始规范版本:HarmonyOS 5.0
是否平台特性:否
锁屏(Lockscreen) | 桌面(Wallpaper) | 一镜到底(LongTake) | 百变卡片(Widget) | 充电动效(ChargingSkin) | |
|---|---|---|---|---|---|
是否支持 | √ | √ | x | √ | √ |
直板机 | 折叠屏 | 平板 | |
|---|---|---|---|
是否支持 | √ | √ | √ |
不涉及
不涉及
示例一:通过点击事件刷新当天的数据。
<Weather>
<Var name="Weather.today.weatherid" expression="999"/>
<Var name="Weather.today.aqivaluetext" expression="'bbb'"/>
<Var name="Weather.today.currentTem" expression="222"/>
<Var name="Weather.today.maxtemp" expression="333"/>
<Var name="Weather.today.mintemp" expression="444"/>
</Weather>
<Image x="600" y="500" h="250" w="260" src="bj.jpg"/>
<Button x="600" y="500" h="250" w="260">
<Trigger action="down">
<RefreshWeatherCommand/>
</Trigger>
</Button> 合作咨询
我们的专家服务团队将竭诚为您提供专业的合作咨询服务
解决方案
精准高效的一站式服务支持,助力开发者商业成功