Commit e1da32d1 authored by zhangyanni's avatar zhangyanni

提交

parent cd3e57e0
...@@ -2179,8 +2179,9 @@ i, em { ...@@ -2179,8 +2179,9 @@ i, em {
line-height: 20px !important; line-height: 20px !important;
} }
} }
.hbl-fa{ .hbl-fa,#hbl-fa{
textarea{ textarea{
width: 100%;
outline: none;//去除外边框 outline: none;//去除外边框
border:none;//去除边框 border:none;//去除边框
...@@ -2395,6 +2396,7 @@ i, em { ...@@ -2395,6 +2396,7 @@ i, em {
} }
} }
.textTransparent{ .textTransparent{
position: relative;
.el-textarea{ .el-textarea{
overflow: scroll; overflow: scroll;
} }
......
<template> <template>
<div class="hbl-fa"> <div id="hbl-fa">
<div :class="commentType==1?'textTransparent':'textareaDiv'" @click="showButton(0)"> <div :class="commentType==1?'textTransparent':'textareaDiv'" @click="showButton(0)">
<el-input @blur.prevent="handleToParent" <el-input @blur.prevent="handleToParent"
id="inputTextarea" id="inputTextarea"
ref="textareaRef" ref="textareaRef"
@focus="handleShowEle" @focus="handleShowEle"
@input="handleInput" @input="handleInput"
autofocus
type="textarea" type="textarea"
v-model="textareaMap[0]" v-model="textareaMap[0]"
resize="none" rows="6" resize="none" rows="6"
...@@ -436,12 +437,17 @@ ...@@ -436,12 +437,17 @@
//获取焦点信息 //获取焦点信息
handleShowEle(event) { handleShowEle(event) {
var u = navigator.userAgent;
if(u.indexOf('Android') > -1 || u.indexOf('Adr') > -1){
document.getElementById("hbl-fa").setAttribute("class","absoluteDiv");
}
if (event.srcElement.setSelectionRange) { if (event.srcElement.setSelectionRange) {
setTimeout(function () { setTimeout(function () {
event.srcElement.setSelectionRange(event.srcElement.value.length, event.srcElement.value.length); event.srcElement.setSelectionRange(event.srcElement.value.length, event.srcElement.value.length);
event.srcElement.focus() event.srcElement.focus()
}, 0) }, 0)
} }
this.isShowVisible = false; this.isShowVisible = false;
}, },
...@@ -527,6 +533,10 @@ ...@@ -527,6 +533,10 @@
if (navigator.userAgent.match(/\(i[^;]+;( U;)? CPU.+Mac OS X/)) { if (navigator.userAgent.match(/\(i[^;]+;( U;)? CPU.+Mac OS X/)) {
globalMsg.$emit("scrollToTop"); globalMsg.$emit("scrollToTop");
} }
var u = navigator.userAgent;
if(u.indexOf('Android') > -1 || u.indexOf('Adr') > -1){
document.getElementById("hbl-fa").classList.remove("absoluteDiv");
}
}, },
//让input获取焦点 //让input获取焦点
...@@ -832,6 +842,7 @@ ...@@ -832,6 +842,7 @@
} }
}, },
mounted() {//页面加载完成后 mounted() {//页面加载完成后
$("#inputTextarea").focus();
this.getTopicInfo() this.getTopicInfo()
if (this.replyCreatedBy) { if (this.replyCreatedBy) {
this.getNickName(); this.getNickName();
...@@ -857,7 +868,7 @@ ...@@ -857,7 +868,7 @@
} }
} }
} };
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
.comment { .comment {
...@@ -1592,7 +1603,7 @@ ...@@ -1592,7 +1603,7 @@
font-size: 16px; font-size: 16px;
} }
.hbl-fa { #hbl-fa {
text-align: left; text-align: left;
font-size: .28rem; font-size: .28rem;
width: 100%; width: 100%;
...@@ -1855,4 +1866,9 @@ ...@@ -1855,4 +1866,9 @@
padding-top: .2rem; padding-top: .2rem;
} }
} }
.absoluteDiv{
position: absolute;
top: -300px;
width: 100%;
}
</style> </style>
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment