hookehuyr

fix 微信留言框弹出兼容性问题

...@@ -53,11 +53,13 @@ ...@@ -53,11 +53,13 @@
53 import icon_y from '@images/y.png' 53 import icon_y from '@images/y.png'
54 import { Toast } from 'vant'; 54 import { Toast } from 'vant';
55 55
56 -import { ref } from 'vue' 56 +import { ref, watch } from 'vue'
57 57
58 -// const props = defineProps({ 58 +const props = defineProps({
59 -// showPopup: Boolean 59 + showPopup: Boolean,
60 -// }) 60 + type: String,
61 + replayUser: String
62 +})
61 63
62 const emit = defineEmits(['on-close', 'on-submit']); 64 const emit = defineEmits(['on-close', 'on-submit']);
63 65
...@@ -78,11 +80,15 @@ const submitComment = () => { ...@@ -78,11 +80,15 @@ const submitComment = () => {
78 Toast.fail('留言不能为空'); 80 Toast.fail('留言不能为空');
79 } 81 }
80 } 82 }
83 +
84 +// 监听弹出框
85 +watch(() => props.showPopup, (v) => {
86 + show.value = v
87 +})
81 </script> 88 </script>
82 89
83 <script> 90 <script>
84 export default { 91 export default {
85 - props: ['showPopup', 'type', 'replayUser'],
86 data () { 92 data () {
87 return { 93 return {
88 } 94 }
...@@ -90,11 +96,6 @@ export default { ...@@ -90,11 +96,6 @@ export default {
90 mounted () { 96 mounted () {
91 }, 97 },
92 watch: { 98 watch: {
93 - showPopup (value, pre) {
94 - if (value) {
95 - this.show = value;
96 - }
97 - }
98 }, 99 },
99 methods: { 100 methods: {
100 } 101 }
......