调整v-model

This commit is contained in:
aixianling
2023-05-12 16:41:11 +08:00
parent 67a5602266
commit 912c7fb079
4 changed files with 37 additions and 37 deletions

View File

@@ -1,6 +1,6 @@
<template>
<section class="chat">
<el-row align="middle">
<el-row align="middle mar-b16">
<div class="modelInfo">
<img :src="config.model.avatar" alt=""/>
<div class="fill mar-l8">
@@ -16,7 +16,10 @@
</el-row>
<thinking-bar v-show="loading"/>
<chat-content class="fill"/>
<chat-input/>
<el-row class="mar-t8" align="middle">
<chat-input class="fill mar-r8" v-model="inputText"/>
<el-button type="primary" @click="handleSend">发送</el-button>
</el-row>
</section>
</template>
@@ -33,39 +36,14 @@ export default {
},
data() {
return {
loading: true
loading: false,
inputText: "",
}
},
methods: {
handleResize() {
if (window.innerWidth <= 700) {
this.$nextTick(() => {
document.querySelectorAll('.chat-content')[0].style.height = '93%';
this.buttonStatus = false
const textareaMsg = document.getElementById("textareaMsg");
textareaMsg.style.marginLeft = "0px";
this.personInfoSpan = [14, 0, 10];
const isMobile = /iPhone|iPad|iPod|Android/i.test(navigator.userAgent)
if (isMobile) {
document.querySelectorAll('.chatInputs')[0].style.margin = '0%';
} else {
document.querySelectorAll('.chatInputs')[0].style.margin = '3%';
}
});
} else {
this.$nextTick(() => {
document.querySelectorAll('.chat-content')[0].style.height = '88%';
this.buttonStatus = true
this.personInfoSpan = [1, 17, 6];
});
}
},
},
created() {
window.addEventListener('resize', this.handleResize)
},
unmounted() {
window.removeEventListener('resize', this.handleResize)
handleSend() {
}
}
}
</script>