File tree Expand file tree Collapse file tree 2 files changed +20
-3
lines changed Expand file tree Collapse file tree 2 files changed +20
-3
lines changed Original file line number Diff line number Diff line change @@ -4,8 +4,7 @@ import LeftOutlined from '@ant-design/icons-vue/LeftOutlined';
4
4
import RightOutlined from '@ant-design/icons-vue/RightOutlined' ;
5
5
import DoubleLeftOutlined from '@ant-design/icons-vue/DoubleLeftOutlined' ;
6
6
import DoubleRightOutlined from '@ant-design/icons-vue/DoubleRightOutlined' ;
7
- import VcSelect from '../select' ;
8
- import MiniSelect from './MiniSelect' ;
7
+ import MiniSelect , { MiddleSelect } from './Select' ;
9
8
import { useLocaleReceiver } from '../locale-provider/LocaleReceiver' ;
10
9
import VcPagination from '../vc-pagination' ;
11
10
import enUS from '../vc-pagination/locale/en_US' ;
@@ -145,7 +144,7 @@ export default defineComponent({
145
144
...getIconsProps ( prefixCls . value ) ,
146
145
prefixCls : prefixCls . value ,
147
146
selectPrefixCls : selectPrefixCls . value ,
148
- selectComponentClass : selectComponentClass || ( isSmall ? MiniSelect : VcSelect ) ,
147
+ selectComponentClass : selectComponentClass || ( isSmall ? MiniSelect : MiddleSelect ) ,
149
148
locale : locale . value ,
150
149
buildOptionText,
151
150
...attrs ,
Original file line number Diff line number Diff line change @@ -2,6 +2,7 @@ import { defineComponent } from 'vue';
2
2
import VcSelect , { selectProps } from '../select' ;
3
3
4
4
export default defineComponent ( {
5
+ name : 'MiniSelect' ,
5
6
inheritAttrs : false ,
6
7
props : selectProps ( ) ,
7
8
Option : VcSelect . Option ,
@@ -16,3 +17,20 @@ export default defineComponent({
16
17
} ;
17
18
} ,
18
19
} ) ;
20
+
21
+ export const MiddleSelect = defineComponent ( {
22
+ name : 'MiddleSelect' ,
23
+ inheritAttrs : false ,
24
+ props : selectProps ( ) ,
25
+ Option : VcSelect . Option ,
26
+ setup ( props , { attrs, slots } ) {
27
+ return ( ) => {
28
+ const selelctProps : any = {
29
+ ...props ,
30
+ size : 'middle' ,
31
+ ...attrs ,
32
+ } ;
33
+ return < VcSelect { ...selelctProps } v-slots = { slots } > </ VcSelect > ;
34
+ } ;
35
+ } ,
36
+ } ) ;
You can’t perform that action at this time.
0 commit comments