实验内容:
实验代码:
<template>
<el-container class="container">
<el-header>
<el-input placeholder="请输入" class="input" v-model="city">
<template #prepend>城市名:</template>
</el-input>
</el-header>
<el-main class="main">
<div class="today">
今天:
<span>{{this.todayData.weather ??
this.plc}}{{this.todayData.temperature ?? this.plc}}</span>
<span style="margin-left: 20px;">{{ this.todayData.direct ??
this.plc}}</span>
<span style="margin-left: 100px;">{{ this.todayData.date}}</span>
</div>
<div class="real">
<span class="temp">{{ this.realtime.temperature ?? this.plc}}</span>
<span class="realInfo">{{ this.realtime.info ?? this.plc}}</span>
<span class="realInfo" style="margin-left:
20px;">{{ this.realtime.direct ?? this.plc}}</span>
<span class="realInfo" style="margin-left:
20px;">{{ this.realtime.power ?? this.plc}}</span>
</div>
<div class="real">