动态设置背景图
<template>
<div class="wrap" :style="bacImage">
<img :src="iconUrl" alt="">
<div class="weather-info">
<span class="temperature">31℃</span>
<span class="weather">{
{weatherInfo.weather}}</span>
</div>
</div>
</template>
<script>
import { mapState, mapActions } from 'vuex'
import { weatherIcon2 } from '@/utils/const'
const weatherEnums = [
{ weather: '晴', icon: 'fine' },
{ weather: '雾', icon: 'fog' },
{ weather: '多云', icon: 'cloudy' },
{ weather: '阴', icon: 'overcast' },
{ weather: '阵雨', icon: 'shower' },
{ weather: '雷阵雨', icon: 'thunder-shower' },
{ weather: '雷阵雨并伴有冰雹', icon: 'thunderstorm-and-hail' },
{ weather: '小雨', icon: 'rain&