refactor: reorganize all components (#8303)

This commit is contained in:
neverland
2021-03-08 11:50:37 +08:00
committed by GitHub
parent 3144a63d2b
commit e540876398
193 changed files with 1307 additions and 400 deletions
@@ -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,
+8
View File
@@ -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';