From 84c8fb0eccecf5caed61fbe4d469812c77ce83b4 Mon Sep 17 00:00:00 2001 From: jinmao88 <50581550+jinmao88@users.noreply.github.com> Date: Tue, 6 Aug 2024 22:32:51 +0800 Subject: [PATCH] feat: add support for custom slot header-index, sorted by index (#4039) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * feat: header右侧支持n个自定义位置插槽,插槽命名方式header-index,根据index大小排序。 框架默认插槽user-dropdown的index:20,notification的index:10 (#4034) * chore: 将默认组件加入排序 * chore: 更改slot命名方式支持header左侧自定义插槽,命名方式:header-right-n,header-left-n,具体位置看README --------- Co-authored-by: likui628 <90845831+likui628@users.noreply.github.com> --- packages/effects/layouts/src/basic/README.md | 7 ++ .../layouts/src/basic/header/header.vue | 98 ++++++++++++++++--- packages/effects/layouts/src/basic/layout.vue | 15 ++- 3 files changed, 104 insertions(+), 16 deletions(-) create mode 100644 packages/effects/layouts/src/basic/README.md diff --git a/packages/effects/layouts/src/basic/README.md b/packages/effects/layouts/src/basic/README.md new file mode 100644 index 00000000..6d8140bc --- /dev/null +++ b/packages/effects/layouts/src/basic/README.md @@ -0,0 +1,7 @@ +## layout + +### header + +- 支持N个自定义插槽,命名方式:header-right-n,header-left-n +- header-left-n ,排序方式:1-5 ,breadcrumb,6-x +- header-right-n ,排序方式:1-4,global-search,6-9,theme-toggle,11-14,language-toggle,16-19,fullscreen,21-24,notification,26-29,user-dropdown,30-x diff --git a/packages/effects/layouts/src/basic/header/header.vue b/packages/effects/layouts/src/basic/header/header.vue index 00d8d5ea..c829dfea 100644 --- a/packages/effects/layouts/src/basic/header/header.vue +++ b/packages/effects/layouts/src/basic/header/header.vue @@ -1,4 +1,6 @@ diff --git a/packages/effects/layouts/src/basic/layout.vue b/packages/effects/layouts/src/basic/layout.vue index dd6099de..d82fb6b9 100644 --- a/packages/effects/layouts/src/basic/layout.vue +++ b/packages/effects/layouts/src/basic/layout.vue @@ -1,7 +1,7 @@