全文检索调整

This commit is contained in:
结发受长生 2019-07-08 14:54:21 +08:00
parent 0ef8644966
commit 4d4d47cb09
3 changed files with 14 additions and 14 deletions

View File

@ -269,7 +269,8 @@ label.bui-switch-label {
} }
} }
.search-result { .search-result {
height: 700px; height: 600px;
overflow-y: auto;
.search-result-item { .search-result-item {
text-align: left; text-align: left;
border-bottom: 1px dashed $colorC; border-bottom: 1px dashed $colorC;

View File

@ -15,15 +15,6 @@ function showWXModal() {
mask.classList.add('in') mask.classList.add('in')
} }
function hideModal() {
let modals = document.querySelectorAll('.page-modal')
let mask = document.querySelector('.mask')
Array.prototype.forEach.call(modals, modal => {
modal.classList.remove('in')
})
mask.classList.remove('in')
}
function handleClick(type, opts) { function handleClick(type, opts) {
let url = null let url = null
switch(type) { switch(type) {
@ -79,10 +70,6 @@ let init = function() {
}) })
} }
}) })
document.querySelector('.mask').addEventListener('click', hideModal)
Array.prototype.forEach.call(document.querySelectorAll('.js-modal-close'), modalClose => {
modalClose.addEventListener('click', hideModal)
})
} }
export default { init } export default { init }

View File

@ -175,6 +175,18 @@ new Vue({
try { try {
if(night && eval(night)) document.querySelector('body').classList.add('night') if(night && eval(night)) document.querySelector('body').classList.add('night')
} catch (e){} } catch (e){}
let hideModal = (function() {
let modals = document.querySelectorAll('.page-modal')
Array.prototype.forEach.call(modals, modal => {
modal.classList.remove('in')
})
this.$refs.mask.classList.remove('in')
}).bind(this)
this.$refs.mask.addEventListener('click', hideModal)
Array.prototype.forEach.call(document.querySelectorAll('.js-modal-close'), modalClose => {
modalClose.addEventListener('click', hideModal)
})
} }
}) })