|
1 | | -import './editable-select.scss'; |
| 1 | +import './editable-select.scss' |
2 | 2 | import { |
3 | 3 | defineComponent, |
4 | 4 | reactive, |
5 | 5 | toRefs, |
6 | 6 | renderSlot, |
7 | 7 | provide, |
8 | 8 | SetupContext, |
9 | | -} from 'vue'; |
| 9 | +} from 'vue' |
10 | 10 | import { |
11 | 11 | editableSelectProps, |
12 | 12 | EditableSelectProps, |
13 | 13 | selectKey, |
14 | | -} from './editable-select-types'; |
15 | | -import { Icon } from '../../icon'; |
16 | | -import { FlexibleOverlay } from '../../overlay'; |
17 | | -import { useSelectStates, useSelect } from './hooks/use-select'; |
18 | | -import { className } from './utils/index'; |
| 14 | +} from './editable-select-types' |
| 15 | +import { Icon } from '../../icon' |
| 16 | +import { FlexibleOverlay } from '../../overlay' |
| 17 | +import { useSelectStates, useSelect } from './hooks/use-select' |
| 18 | +import { className } from './utils/index' |
19 | 19 | export default defineComponent({ |
20 | 20 | name: 'DEditableSelect', |
21 | 21 | props: editableSelectProps, |
22 | 22 | emits: ['update:modelValue'], |
23 | 23 |
|
24 | 24 | setup(props: EditableSelectProps, ctx: SetupContext) { |
25 | | - const states = useSelectStates(); |
26 | | - const { origin, visible } = toRefs(states); |
| 25 | + const states = useSelectStates() |
| 26 | + const { origin, visible } = toRefs(states) |
27 | 27 |
|
28 | 28 | const inputCls = className('devui-form-control devui-dropdown-origin', { |
29 | 29 | disabled: props.disabled, |
30 | | - }); |
31 | | - const { toggleMenu, handleOptionSelect } = useSelect(props, ctx, states); |
| 30 | + }) |
| 31 | + const { toggleMenu, handleOptionSelect } = useSelect(props, ctx, states) |
32 | 32 |
|
33 | 33 | provide( |
34 | 34 | selectKey, |
35 | 35 | reactive({ |
36 | 36 | handleOptionSelect, |
37 | 37 | }) |
38 | | - ); |
| 38 | + ) |
39 | 39 |
|
40 | 40 | return () => { |
41 | 41 | return ( |
@@ -75,7 +75,7 @@ export default defineComponent({ |
75 | 75 | </div> |
76 | 76 | </FlexibleOverlay> |
77 | 77 | </> |
78 | | - ); |
79 | | - }; |
| 78 | + ) |
| 79 | + } |
80 | 80 | }, |
81 | | -}); |
| 81 | +}) |
0 commit comments