From 4d4d47cb0918accd35381b3eeeefe4e921171239 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=BB=93=E5=8F=91=E5=8F=97=E9=95=BF=E7=94=9F?= Date: Mon, 8 Jul 2019 14:54:21 +0800 Subject: [PATCH] =?UTF-8?q?=E5=85=A8=E6=96=87=E6=A3=80=E7=B4=A2=E8=B0=83?= =?UTF-8?q?=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- themes/yilia/source-src/css/tools.scss | 3 ++- themes/yilia/source-src/js/share.js | 13 ------------- themes/yilia/source-src/js/slider.js | 12 ++++++++++++ 3 files changed, 14 insertions(+), 14 deletions(-) diff --git a/themes/yilia/source-src/css/tools.scss b/themes/yilia/source-src/css/tools.scss index 704c9c2..8d47381 100644 --- a/themes/yilia/source-src/css/tools.scss +++ b/themes/yilia/source-src/css/tools.scss @@ -269,7 +269,8 @@ label.bui-switch-label { } } .search-result { - height: 700px; + height: 600px; + overflow-y: auto; .search-result-item { text-align: left; border-bottom: 1px dashed $colorC; diff --git a/themes/yilia/source-src/js/share.js b/themes/yilia/source-src/js/share.js index d500bac..a7e78b1 100644 --- a/themes/yilia/source-src/js/share.js +++ b/themes/yilia/source-src/js/share.js @@ -15,15 +15,6 @@ function showWXModal() { 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) { let url = null 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 } \ No newline at end of file diff --git a/themes/yilia/source-src/js/slider.js b/themes/yilia/source-src/js/slider.js index f0d98c3..7b117d6 100644 --- a/themes/yilia/source-src/js/slider.js +++ b/themes/yilia/source-src/js/slider.js @@ -175,6 +175,18 @@ new Vue({ try { if(night && eval(night)) document.querySelector('body').classList.add('night') } 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) + }) } })