-
-
Notifications
You must be signed in to change notification settings - Fork 3.8k
/
Copy pathSelect.tsx
37 lines (35 loc) · 879 Bytes
/
Select.tsx
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
import { defineComponent } from 'vue';
import VcSelect, { selectProps } from '../select';
export default defineComponent({
name: 'MiniSelect',
compatConfig: { MODE: 3 },
inheritAttrs: false,
props: selectProps(),
Option: VcSelect.Option,
setup(props, { attrs, slots }) {
return () => {
const selelctProps: any = {
...props,
size: 'small',
...attrs,
};
return <VcSelect {...selelctProps} v-slots={slots}></VcSelect>;
};
},
});
export const MiddleSelect = defineComponent({
name: 'MiddleSelect',
inheritAttrs: false,
props: selectProps(),
Option: VcSelect.Option,
setup(props, { attrs, slots }) {
return () => {
const selelctProps: any = {
...props,
size: 'middle',
...attrs,
};
return <VcSelect {...selelctProps} v-slots={slots}></VcSelect>;
};
},
});