uview中u-modal在h5端正常使用,在app端报错Not found -1,24,0,1,0 at view.umd.min.js:1

108 阅读1分钟

报错代码:


<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>