hookehuyr

✨ feat: 修复留言版,微信失败录入问题

......@@ -50,18 +50,34 @@
</template>
<script setup>
import icon_x from '@images/x.png'
import icon_y from '@images/y.png'
import MyButton from '@/components/MyButton/index.vue'
import { Toast } from 'vant';
import { ref, reactive, onMounted } from 'vue'
import { ref } from 'vue'
// const props = defineProps({
// showPopup: Boolean
// })
onMounted(() => {
})
const emit = defineEmits(['on-close', 'on-submit']);
const show = ref(false)
const message = ref('')
const closeBtn = () => {
emit('on-close', false)
show.value = false;
}
const submitComment = () => {
if (message.value) {
show.value = false;
emit('on-submit', message.value);
message.value = '';
} else {
Toast.fail('留言不能为空');
}
}
</script>
<script>
......@@ -69,8 +85,6 @@ export default {
props: ['showPopup', 'type', 'replayUser'],
data () {
return {
show: false,
message: ''
}
},
mounted () {
......@@ -83,23 +97,6 @@ export default {
}
},
methods: {
onClose () {
this.show = false;
},
refreshBtn () {},
closeBtn () {
this.$emit('on-close', false)
this.show = false;
},
submitComment () {
if (this.message) {
this.show = false;
this.$emit('on-submit', this.message);
this.message = '';
} else {
Toast.fail('留言不能为空');
}
}
}
}
</script>
......
......@@ -115,11 +115,11 @@ export default {
margin-top: 0.5rem;
overflow: auto;
.plain {
width: 29%; float: left;
margin-right: 1%;
width: 28%; float: left;
margin-right: 3%;
}
.primary {
width: 70%; float: left;
width: 69%; float: left;
}
}
}
......