From 8e21458e16088fcb8fc58aae638c9ee5309bc65f Mon Sep 17 00:00:00 2001 From: fuyu <54523771+mfmfuyu@users.noreply.github.com> Date: Wed, 5 Feb 2020 07:54:49 +0900 Subject: [PATCH] =?UTF-8?q?=E3=82=B3=E3=83=B3=E3=83=9D=E3=83=BC=E3=83=8D?= =?UTF-8?q?=E3=83=B3=E3=83=88=E3=81=AE=E6=B4=BB=E6=80=A7=E6=99=82=E3=81=AB?= =?UTF-8?q?=E5=86=8D=E8=A8=88=E7=AE=97=E3=81=99=E3=82=8B=E3=82=88=E3=81=86?= =?UTF-8?q?=E3=81=AB=20(#5829)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/client/directives/size.ts | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/client/directives/size.ts b/src/client/directives/size.ts index c7d797e5a..7c4254566 100644 --- a/src/client/directives/size.ts +++ b/src/client/directives/size.ts @@ -1,5 +1,5 @@ export default { - inserted(el, binding) { + inserted(el, binding, vn) { const query = binding.value; /* @@ -31,7 +31,7 @@ export default { const calc = () => { const width = el.clientWidth; - + for (const q of query) { if (q.max) { if (width <= q.max) { @@ -55,6 +55,7 @@ export default { el._sizeResizeCb_ = calc; window.addEventListener('resize', calc); + vn.context.$on('hook:activated', calc); }, unbind(el, binding, vn) {