refactor: reorganize all components (#8303)
This commit is contained in:
@@ -4,11 +4,15 @@ import {
|
||||
PropType,
|
||||
TeleportProps,
|
||||
CSSProperties,
|
||||
defineComponent,
|
||||
} from 'vue';
|
||||
|
||||
// Utils
|
||||
import { createNamespace, getZIndexStyle, UnknownProp } from '../utils';
|
||||
import { DROPDOWN_KEY, DropdownMenuProvide } from '../dropdown-menu';
|
||||
import {
|
||||
DROPDOWN_KEY,
|
||||
DropdownMenuProvide,
|
||||
} from '../dropdown-menu/DropdownMenu';
|
||||
|
||||
// Composables
|
||||
import { useParent } from '@vant/use';
|
||||
@@ -19,7 +23,7 @@ import Cell from '../cell';
|
||||
import Icon from '../icon';
|
||||
import Popup from '../popup';
|
||||
|
||||
const [createComponent, bem] = createNamespace('dropdown-item');
|
||||
const [name, bem] = createNamespace('dropdown-item');
|
||||
|
||||
export type DropdownItemOption = {
|
||||
text: string;
|
||||
@@ -27,7 +31,9 @@ export type DropdownItemOption = {
|
||||
value: number | string;
|
||||
};
|
||||
|
||||
export default createComponent({
|
||||
export default defineComponent({
|
||||
name,
|
||||
|
||||
props: {
|
||||
title: String,
|
||||
disabled: Boolean,
|
||||
@@ -0,0 +1,8 @@
|
||||
import { installable } from '../utils';
|
||||
import _DropdownItem from './DropdownItem';
|
||||
|
||||
const DropdownItem = installable(_DropdownItem);
|
||||
|
||||
export default DropdownItem;
|
||||
export { DropdownItem };
|
||||
export type { DropdownItemOption } from './DropdownItem';
|
||||
Reference in New Issue
Block a user