Commit ce3e18eb authored by yun's avatar yun

回复试验

parent 283516d0
...@@ -300,10 +300,12 @@ ...@@ -300,10 +300,12 @@
</div> </div>
<div <div
class="input" class="input"
v-if="currentTag == tags[2] && !isOutLine && !isFull"
> >
<van-field <van-field
:disabled="course.releaseState === '4'" :disabled="course.releaseState === '4'"
rows="1.5" rows="1.5"
@focus="matterIos()"
@blur="textareaHeightSmaller()" @blur="textareaHeightSmaller()"
v-model="commentContent" v-model="commentContent"
id="discussInput" id="discussInput"
...@@ -695,13 +697,14 @@ export default { ...@@ -695,13 +697,14 @@ export default {
}, },
// 回复点击 // 回复点击
textareaHeightBiggerRe(type, replyName) { textareaHeightBiggerRe(type, replyName) {
const input = document.getElementById('discussInput') const input = document.getElementById('discussInput'),
focusBtn = document.getElementById('btnFocus2')
this.discussType = type this.discussType = type
this.discussPlaceHloder = '回复2@' + replyName this.discussPlaceHloder = '回复@' + replyName
input.addEventListener('click', function() { focusBtn.addEventListener('click', function() {
input.focus() input.focus()
}) })
input.click() focusBtn.click()
}, },
textareaHeightSmaller() { textareaHeightSmaller() {
if (this.commentContent.trim() === '') { if (this.commentContent.trim() === '') {
......
...@@ -175,7 +175,6 @@ ...@@ -175,7 +175,6 @@
</div> </div>
</transition> </transition>
<search-box <search-box
v-show="hackReset"
@onCancel="onCancel" @onCancel="onCancel"
:hackReset = 'hackReset' :hackReset = 'hackReset'
/> />
...@@ -239,6 +238,10 @@ export default { ...@@ -239,6 +238,10 @@ export default {
methods: { methods: {
// 点击搜索 事件 // 点击搜索 事件
search() { search() {
const that = this
if (that.$route.params.searchFocus !== 'focus') {
document.getElementById('searchInputP').focus()
}
const navBar = document.getElementById('navBar') const navBar = document.getElementById('navBar')
navBar.style.display = 'none' navBar.style.display = 'none'
// 重建组件 // 重建组件
...@@ -247,8 +250,12 @@ export default { ...@@ -247,8 +250,12 @@ export default {
// this.$refs.scollElement.scrollIntoView() // this.$refs.scollElement.scrollIntoView()
this.hackReset = true this.hackReset = true
setTimeout(() => { setTimeout(() => {
document.getElementById('searchInputP').focus() if (that.$route.params.searchContent !== undefined) {
}, 100) that.$refs.searchBox.backToSearch(that.$route.params.searchContent)
}
delete that.$route.params.searchContent
delete that.$route.params.searchFocus
}, 500)
}) })
}, },
// 搜索取消关闭事件 // 搜索取消关闭事件
......
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