File tree Expand file tree Collapse file tree 3 files changed +306
-248
lines changed
Expand file tree Collapse file tree 3 files changed +306
-248
lines changed Original file line number Diff line number Diff line change 269269 class =" BlogStatistic weathContent"
270270 >
271271 <div class =" BlogStatisticItem borderRight" v-for =" (item,i) in weathArray" v-bind:key =" i" >
272- <div class =" weathWeek" >{{ item.week }} </div >
272+ <div class =" weathWeek" v-html = " item.week" > </div >
273273 <!-- <div class="weathDay">11月23日</div> -->
274274 <div class =" weathDay" >{{ item.date }}</div >
275275 <div class =" weathIcon" >
@@ -356,13 +356,15 @@ export default {
356356 weathArray = dataObj .forecasts [0 ].casts ,
357357 week;
358358
359- console .log (dataObj);
360- console .log (weekJson);
361-
362359 that .city = dataObj .forecasts [0 ].city ;
363360 if (weathArray .length > 0 ){
364- weathArray .forEach (function (item ){
365- item .week = weekJson[item .week ];
361+ weathArray .forEach (function (item ,i ){
362+ if (i == 0 ){
363+ item .week = weekJson[item .week ] + ' <span style="font-size:0.5rem">(今天)</span>' ;
364+ }else {
365+ item .week = weekJson[item .week ];
366+ }
367+
366368 item .date = item .date .split (' -' )[1 ] + ' 月' + item .date .split (' -' )[2 ] + " 日" ;
367369 item .dayweatherIcon = weathJson[item .dayweather ];
368370 });
You can’t perform that action at this time.
0 commit comments