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,18 +1,20 @@
|
||||
import { PropType } from 'vue';
|
||||
import { PropType, defineComponent } from 'vue';
|
||||
import { createNamespace } from '../utils';
|
||||
import { BORDER_TOP_BOTTOM } from '../utils/constant';
|
||||
import { useChildren } from '@vant/use';
|
||||
|
||||
const [createComponent, bem] = createNamespace('collapse');
|
||||
const [name, bem] = createNamespace('collapse');
|
||||
|
||||
export const COLLAPSE_KEY = Symbol('Collapse');
|
||||
export const COLLAPSE_KEY = Symbol(name);
|
||||
|
||||
export type CollapseProvide = {
|
||||
toggle: (name: number | string, expanded: boolean) => void;
|
||||
isExpanded: (name: number | string) => boolean;
|
||||
};
|
||||
|
||||
export default createComponent({
|
||||
export default defineComponent({
|
||||
name,
|
||||
|
||||
props: {
|
||||
accordion: Boolean,
|
||||
modelValue: {
|
||||
@@ -0,0 +1,7 @@
|
||||
import { installable } from '../utils';
|
||||
import _Collapse from './Collapse';
|
||||
|
||||
const Collapse = installable(_Collapse);
|
||||
|
||||
export default Collapse;
|
||||
export { Collapse };
|
||||
Reference in New Issue
Block a user