Skip to content

Commit

Permalink
Merge pull request #83 from caipeizhi/main_修复手机端弹出键盘报错
Browse files Browse the repository at this point in the history
1.修复手机端点击输入框时,弹出键盘后,侧边栏消失
  • Loading branch information
202252197 committed Apr 16, 2023
2 parents 3b46a10 + 4008cc3 commit b56d9f6
Show file tree
Hide file tree
Showing 2 changed files with 34 additions and 7 deletions.
22 changes: 18 additions & 4 deletions src/view/home.vue
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,9 @@ export default {
},
data() {
return {
asideStatus: true
asideStatus: true,
firstSize: true,
width: 0
};
},
created() {
Expand All @@ -32,13 +34,25 @@ export default {
window.removeEventListener('resize', this.handleResize)
},
methods: {
//监听窗口尺寸的变化
handleResize() {
resize(){
if (window.innerWidth <= 1150) {
this.asideStatus=false
} else {
this.asideStatus=true
};
}
},
//监听窗口尺寸的变化
handleResize() {
if (this.firstSize){
this.resize();
this.firstSize = false;
this.width = window.innerWidth;
}
if ( this.width != window.innerWidth ){
this.resize();
this.width = window.innerWidth;
}
}
}
};
Expand Down
19 changes: 16 additions & 3 deletions src/view/pages/chatHome/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -753,6 +753,8 @@ export default {
showPersonList: true,
showSetupList: true,
showMainContent: true,
firstSize: true,
width: 0
};
},
computed: {
Expand Down Expand Up @@ -1000,8 +1002,7 @@ export default {
this.$message.error(this.$t('message.get_roles_fail'))
})
},
//监听窗口尺寸的变化
handleResize() {
resize(){
if (window.innerWidth <= 1150) {
this.showPersonList = false;
this.showSetupList = false;
Expand All @@ -1020,7 +1021,19 @@ export default {
} else {
this.showPersonList = true;
this.showSetupList = true;
};
}
},
//监听窗口尺寸的变化
handleResize() {
if ( this.firstSize ){
this.resize();
this.firstSize = false;
this.width = window.innerWidth;
}
if ( this.width != window.innerWidth ){
this.resize();
this.width = window.innerWidth;
}
},
//创建会话
newSession() {
Expand Down

1 comment on commit b56d9f6

@4everland
Copy link

@4everland 4everland bot commented on b56d9f6 Apr 16, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Successfully deployed to the following parameters

parameters Value
IPFS CID bafybeibc36tpargrsuf2vzohtom57alrhij5e4tey7st5wv2hyu7g64mue
Assigned domain https://chatgpt_jcm-uvtplssk-202252197.4everland.app
https://chatgpt_jcm-92.4everland.app
Custom domain

Please sign in to comment.