Commit ce3e18eb authored by yun's avatar yun

回复试验

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