Commit 47d7ea12 by 李伟康

feat(OrderScreen): 优化弹窗显示效果

- 在 popup-body 上添加 :key 属性,以修复弹窗滚动问题
- 在 clear 方法中添加 viewKey 更新,以触发弹窗重新渲染
1 parent 2a3a18b3
...@@ -17,7 +17,7 @@ ...@@ -17,7 +17,7 @@
></uni-icons> ></uni-icons>
</view> </view>
</view> </view>
<view class="popup-body"> <view class="popup-body" :key="viewKey">
<scroll-view <scroll-view
scroll-y scroll-y
:class="['popup-scroll-view',{show:loadComplete}]" :class="['popup-scroll-view',{show:loadComplete}]"
...@@ -82,6 +82,7 @@ export default { ...@@ -82,6 +82,7 @@ export default {
screenList: config.screenList, screenList: config.screenList,
loadComplete: true, loadComplete: true,
chooseContent: {}, chooseContent: {},
viewKey:Date.now(),
} }
}, },
provide () { provide () {
...@@ -101,6 +102,8 @@ export default { ...@@ -101,6 +102,8 @@ export default {
this.$refs.popup.open() this.$refs.popup.open()
}, },
clear () { clear () {
this.chooseContent = {}
this.viewKey = Date.now()
}, },
close () { close () {
this.$refs.popup.close() this.$refs.popup.close()
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!