mirror of
https://github.com/youzan/vant.git
synced 2026-05-07 01:01:01 +08:00
refactor: reorganize all components (#8303)
This commit is contained in:
@@ -1,4 +1,11 @@
|
||||
import { ref, computed, PropType, CSSProperties, Ref } from 'vue';
|
||||
import {
|
||||
ref,
|
||||
Ref,
|
||||
computed,
|
||||
PropType,
|
||||
CSSProperties,
|
||||
defineComponent,
|
||||
} from 'vue';
|
||||
|
||||
// Utils
|
||||
import { isDef, ComponentInstance, createNamespace } from '../utils';
|
||||
@@ -12,9 +19,9 @@ import {
|
||||
useEventListener,
|
||||
} from '@vant/use';
|
||||
|
||||
const [createComponent, bem] = createNamespace('dropdown-menu');
|
||||
const [name, bem] = createNamespace('dropdown-menu');
|
||||
|
||||
export const DROPDOWN_KEY = Symbol('DropdownMenu');
|
||||
export const DROPDOWN_KEY = Symbol(name);
|
||||
|
||||
export type DropdownMenuDirection = 'up' | 'down';
|
||||
|
||||
@@ -30,7 +37,9 @@ export type DropdownMenuProvide = {
|
||||
offset: Ref<number>;
|
||||
};
|
||||
|
||||
export default createComponent({
|
||||
export default defineComponent({
|
||||
name,
|
||||
|
||||
props: {
|
||||
zIndex: [Number, String],
|
||||
activeColor: String,
|
||||
@@ -0,0 +1,8 @@
|
||||
import { installable } from '../utils';
|
||||
import _DropdownMenu from './DropdownMenu';
|
||||
|
||||
const DropdownMenu = installable(_DropdownMenu);
|
||||
|
||||
export default DropdownMenu;
|
||||
export { DropdownMenu };
|
||||
export type { DropdownMenuDirection } from './DropdownMenu';
|
||||
Reference in New Issue
Block a user