From 9f0bec133955dfc4ab02b525242b66953c2b99f2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=B0=B1=E7=9C=A0=E5=84=80=E5=BC=8F?= <854085467@qq.com> Date: Sun, 2 Jan 2022 20:50:24 +0800 Subject: [PATCH] =?UTF-8?q?=E5=8D=87=E7=BA=A7=20layer-vue=201.2.3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- example/src/components/LayAnchor.vue | 7 ++++--- package.json | 2 +- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/example/src/components/LayAnchor.vue b/example/src/components/LayAnchor.vue index e77b7dc5..3a0c06a2 100644 --- a/example/src/components/LayAnchor.vue +++ b/example/src/components/LayAnchor.vue @@ -108,6 +108,7 @@ const handlerScroll = () => { const handlerCollapse = () => { iconType.value = show.value ? "layui-icon-right" : "layui-icon-left"; + // @ts-ignore scrollRefEl.value!.firstElementChild!.style.marginRight = show.value ? "180px" : "0px"; @@ -118,7 +119,7 @@ watch(show, () => { }); onMounted(() => { - // TODO 封装 hooks + // @ts-ignore TODO 封装 hooks scrollRefEl.value = document.querySelector(".layui-body"); if (!scrollRefEl.value) { throw new Error(`scroll element is not existed: ".layui-body"`); @@ -126,8 +127,8 @@ onMounted(() => { scrollRefEl.value.scrollTop = 0; scrollRefEl.value?.addEventListener("scroll", throttle(handlerScroll, 500)); // 如果已折叠,关闭组件初始渲染时的动画,然后自动开启 - show.value = - scrollRefEl.value!.firstElementChild!.style.marginRight !== "0px"; + // @ts-ignore + show.value = scrollRefEl.value!.firstElementChild!.style.marginRight !== "0px"; enableAnimation = show.value; }); diff --git a/package.json b/package.json index 50e65466..4721f56a 100644 --- a/package.json +++ b/package.json @@ -34,7 +34,7 @@ "dependencies": { "@layui/hooks-vue": "^0.1.6", "@layui/icons-vue": "^1.0.2", - "@layui/layer-vue": "^1.2.2", + "@layui/layer-vue": "^1.2.3", "async-validator": "^4.0.7", "countup.js": "^2.0.8", "evtd": "^0.2.3",