From 94ca93fb21be5c59d6cf36608932eac7a859734e Mon Sep 17 00:00:00 2001 From: yqllin <524123601@qq.com> Date: Fri, 26 Jan 2024 17:02:59 +0800 Subject: [PATCH] =?UTF-8?q?feat(Select):=20=E5=A2=9E=E5=8A=A0=20OptionList?= =?UTF-8?q?=20=E9=A1=B6=E9=83=A8=E6=8F=92=E6=A7=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- components/select/select.vue | 25 +++++++++- components/select/style/index.less | 9 +++- docs/.vitepress/components/select/addon.vue | 51 ++++++--------------- docs/.vitepress/components/select/index.md | 16 ++++--- 4 files changed, 54 insertions(+), 47 deletions(-) diff --git a/components/select/select.vue b/components/select/select.vue index dfb4fcba..826b3e1a 100644 --- a/components/select/select.vue +++ b/components/select/select.vue @@ -37,6 +37,13 @@ /> @@ -440,6 +455,11 @@ export default defineComponent({ } }; + const warnDeprecatedSlot = () => + console.warn( + '[FSelect]: addon 插槽即将废弃,请使用 footer 插槽代替', + ); + return { prefixCls, isOpenedRef, @@ -465,6 +485,7 @@ export default defineComponent({ hoverOptionValue, onHover, onKeyDown, + warnDeprecatedSlot, }; }, }); diff --git a/components/select/style/index.less b/components/select/style/index.less index 1961f918..557c7ca1 100644 --- a/components/select/style/index.less +++ b/components/select/style/index.less @@ -35,8 +35,15 @@ &-addon { .text(); padding: @padding-xs; - border-top: var(--f-border-width-base) var(--f-border-style-base) + + @border-line:var(--f-border-width-base) var(--f-border-style-base) var(--f-border-color-split); + &.@{select-prefix-cls}-option-header { + border-bottom: @border-line; + } + &.@{select-prefix-cls}-option-footer { + border-top: @border-line; + } } &-null { text-align: center; diff --git a/docs/.vitepress/components/select/addon.vue b/docs/.vitepress/components/select/addon.vue index 9745309a..e96fb1f8 100644 --- a/docs/.vitepress/components/select/addon.vue +++ b/docs/.vitepress/components/select/addon.vue @@ -1,44 +1,21 @@