From ea06a05198af3ce6600abd408e18fdfbbf4b779f 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: Thu, 12 May 2022 05:45:43 +0800 Subject: [PATCH] =?UTF-8?q?=F0=9F=90=9B(menu):=20=E4=BF=AE=E5=A4=8D=20menu?= =?UTF-8?q?=20=E7=BB=84=E4=BB=B6=20mored=20=E5=9B=BE=E6=A0=87=E4=B8=8D?= =?UTF-8?q?=E9=9A=8F=E7=8A=B6=E6=80=81=E5=8F=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- package/component/src/component/menu/index.less | 7 +------ package/component/src/component/menu/index.vue | 8 ++------ package/component/src/component/subMenu/index.vue | 5 ++++- package/document/src/plugin/snippet.ts | 2 +- package/document/src/plugin/usePlayground.ts | 2 +- 5 files changed, 9 insertions(+), 15 deletions(-) diff --git a/package/component/src/component/menu/index.less b/package/component/src/component/menu/index.less index 5d820b81..26158fdd 100644 --- a/package/component/src/component/menu/index.less +++ b/package/component/src/component/menu/index.less @@ -308,9 +308,4 @@ .layui-nav-child { background-color: transparent; } -} - -.layui-nav-child-spacing .layui-nav-item .layui-nav-child { - padding-left: 10px; - box-sizing: border-box; -} +} \ No newline at end of file diff --git a/package/component/src/component/menu/index.vue b/package/component/src/component/menu/index.vue index e97b1c20..c9644b5e 100644 --- a/package/component/src/component/menu/index.vue +++ b/package/component/src/component/menu/index.vue @@ -12,7 +12,6 @@ import { Ref, ref, watch, - WritableComputedRef, } from "vue"; import "./index.less"; @@ -25,7 +24,6 @@ export interface LayMenuProps { level?: boolean | string; collapse?: boolean | string; collapseTransition?: boolean | string; - childSpacing?: boolean; } const emit = defineEmits([ @@ -43,8 +41,7 @@ const props = withDefaults(defineProps(), { inverted: false, level: true, collapse: false, - collapseTransition: true, - childSpacing: false, + collapseTransition: true }); const isTree: ComputedRef = computed(() => props.tree); @@ -102,8 +99,7 @@ provide("isCollapseTransition", isCollapseTransition); inverted ? 'inverted' : '', tree ? 'layui-nav-tree' : '', theme === 'dark' ? 'layui-nav-dark' : 'layui-nav-light', - collapse ? 'layui-nav-collapse' : '', - childSpacing ? 'layui-nav-child-spacing' : '', + collapse ? 'layui-nav-collapse' : '' ]" > diff --git a/package/component/src/component/subMenu/index.vue b/package/component/src/component/subMenu/index.vue index de5af1b7..ec5e0ff0 100644 --- a/package/component/src/component/subMenu/index.vue +++ b/package/component/src/component/subMenu/index.vue @@ -89,14 +89,17 @@ onBeforeUnmount(() => window.removeEventListener("resize", setPosition));