报错代码:
<div class="steps__title steps__badge">
<div class="item">
<u-button text="查看详情" type='primary' @click="viewInfo(item)"></u-button>
</div>
</div>
<u-modal :show="decriptionShow" :title="decriptiontitle" :closeOnClickOverlay="true" @confirm="decriptionShow = false" @close="decriptionShow = false">
<view class="slot-content">
<rich-text :nodes="decriptionContent"></rich-text>
</view>
</u-modal>
解决:将u-modal与点击展开modal的按钮或者盒子放在一起
<div class="steps__title steps__badge">
<div class="item">
<u-button text="查看详情" type='primary' @click="viewInfo(item)"></u-button>
<u-modal :show="decriptionShow" :title="decriptiontitle" :closeOnClickOverlay="true" @confirm="decriptionShow = false" @close="decriptionShow = false">
<view class="slot-content">
<rich-text :nodes="decriptionContent"></rich-text>
</view>
</u-modal>
</div>
</div>