Skip to content

Commit 3656dd5

Browse files
committed
style: pagination
1 parent 7b60f2a commit 3656dd5

File tree

2 files changed

+20
-3
lines changed

2 files changed

+20
-3
lines changed

components/pagination/Pagination.tsx

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,7 @@ import LeftOutlined from '@ant-design/icons-vue/LeftOutlined';
44
import RightOutlined from '@ant-design/icons-vue/RightOutlined';
55
import DoubleLeftOutlined from '@ant-design/icons-vue/DoubleLeftOutlined';
66
import DoubleRightOutlined from '@ant-design/icons-vue/DoubleRightOutlined';
7-
import VcSelect from '../select';
8-
import MiniSelect from './MiniSelect';
7+
import MiniSelect, { MiddleSelect } from './Select';
98
import { useLocaleReceiver } from '../locale-provider/LocaleReceiver';
109
import VcPagination from '../vc-pagination';
1110
import enUS from '../vc-pagination/locale/en_US';
@@ -145,7 +144,7 @@ export default defineComponent({
145144
...getIconsProps(prefixCls.value),
146145
prefixCls: prefixCls.value,
147146
selectPrefixCls: selectPrefixCls.value,
148-
selectComponentClass: selectComponentClass || (isSmall ? MiniSelect : VcSelect),
147+
selectComponentClass: selectComponentClass || (isSmall ? MiniSelect : MiddleSelect),
149148
locale: locale.value,
150149
buildOptionText,
151150
...attrs,

components/pagination/MiniSelect.tsx renamed to components/pagination/Select.tsx

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ import { defineComponent } from 'vue';
22
import VcSelect, { selectProps } from '../select';
33

44
export default defineComponent({
5+
name: 'MiniSelect',
56
inheritAttrs: false,
67
props: selectProps(),
78
Option: VcSelect.Option,
@@ -16,3 +17,20 @@ export default defineComponent({
1617
};
1718
},
1819
});
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+
});

0 commit comments

Comments
 (0)