提交 a1d0c8fd authored 作者: matian's avatar matian

修改右侧弹窗效果

上级 2e8e5783
...@@ -54,8 +54,9 @@ const MOBILE_REG = /^1(3[0-9]|4[01456879]|5[0-35-9]|6[2567]|7[0-8]|8[0-9]|9[0-35 ...@@ -54,8 +54,9 @@ const MOBILE_REG = /^1(3[0-9]|4[01456879]|5[0-35-9]|6[2567]|7[0-8]|8[0-9]|9[0-35
export default { export default {
data() { data() {
return { return {
top: 0,
tabBtnActive: true, tabBtnActive: true,
isShowBtn: false, isShowBtn: true,
tabBtnTarget: '', tabBtnTarget: '',
projectName: '家庭教育硕士', projectName: '家庭教育硕士',
sendCode: '', sendCode: '',
...@@ -67,18 +68,29 @@ export default { ...@@ -67,18 +68,29 @@ export default {
} }
} }
}, },
mounted() {
window.addEventListener('scroll', this.scrollHandle)
},
watch: {
top(v) {
if (v > 500) {
this.tabBtnActive = false
}
if (v === 0) {
this.isOver = true
}
}
},
methods: { methods: {
scrollHandle(e) {
this.top = e.srcElement.scrollingElement.scrollTop // 获取页面滚动高度
},
handleClose() { handleClose() {
this.tabBtnActive = !this.tabBtnActive this.tabBtnActive = false
this.isShowBtn = true this.isShowBtn = true
}, },
handleMsOver() { handleMsOver() {
this.tabBtnActive = !this.tabBtnActive this.tabBtnActive = true
this.isShowBtn = false
// if (type !== '') {
// this.tabBtnTarget = type
// }
}, },
handleMsOut(type) { handleMsOut(type) {
this.tabBtnActive = false this.tabBtnActive = false
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论