figure 1 is the product details interface, in which the information src, name, marketprice and nowprice are all passed in by figure 2. Figure 1 is just a component, as shown in the following code
1
figure 2
<template>
<div class="goods_description_wrap">
<div
class="goods_description_pic"
@mouseenter="showcheckeddetailelement=true"
@mouseleave="showcheckeddetailelement=false">
<img
class="productimg"
:src="this.$root.bestsellgoods[productid].goodspic">
<span
v-show="showcheckeddetailelement"
@mouseenter="showcheckeddetailelement=true"
class="goods_description_detailed_see"
:style="{ left: followcheckedx+"px", top: followcheckedy+"px"}"></span>
<div
class="detial_see_wrap"
@mousemove="checkeddetailproduct($event)">
</div>
</div>
<!-- -->
<div
v-show="showcheckeddetailelement"
class="goods_description_detailed_div">
<img
class="detail_sobig_img"
:src="this.$root.bestsellgoods[productid].goodspic"
:style="{ left: -followcheckedx*2 +"px", top: -followcheckedy*2 +"px"}">
</div>
<div class="goods_description_others">
<div class="goods_description_others_name">
<span class="goods_description_name">{{ this.$root.bestsellgoods[productid].goodsname }}</span>
</div>
<!-- <div class="goods_description_others_line"></div> -->
<div class="goods_description_others_price_wrap">
<div class="now_price_wrap">
<span class="now_price_text">:</span>
<span class="now_price">{{ this.$root.bestsellgoods[productid].marketprice }}</span>
</div>
<div class="reduce_price_wrap">
<span class="reduce_price_text">:</span>
<span class="reduce_price">{{ this.$root.bestsellgoods[productid].presentprice }}</span>
</div>
<div>
</div>
</div>
<div class="goods_description_others_counts_wrap">
<div class="counts_text">
<span>:</span>
</div>
<div class="counts_btns">
<a
class="counts_btns_left"
@click="countsReduce()"></a>
<input
class="goodscounts"
type="text"
:value="productcounts.purchasecounts"
disabled="disabled">
<a
class="counts_btns_right"
@click="countsAdd()"></a>
<div class="div_clear"></div>
</div>
<span class="counts_kucun">({{ productcounts.remaincounts }})</span>
<div class="div_clear"></div>
</div>
<div class="goods_description_others_btns_wrap">
<div class="now_buy" @click="getPrice()">
<span class="now_buy_text"></span>
</div>
<div class="join_shopping">
<span class="join_shopping_text"></span>
</div>
<div class="div_clear"></div>
</div>
</div>
<div class="div_clear"></div>
</div>
</template>
but when refreshing the interface in figure 1, there will be an error, how to prevent the refresh page from reporting an error?