refactor: reorganize all components (#8303)
This commit is contained in:
@@ -9,6 +9,7 @@ import {
|
||||
CSSProperties,
|
||||
onDeactivated,
|
||||
onBeforeUnmount,
|
||||
defineComponent,
|
||||
} from 'vue';
|
||||
|
||||
// Utils
|
||||
@@ -31,9 +32,9 @@ import {
|
||||
import { useTouch } from '../composables/use-touch';
|
||||
import { useExpose } from '../composables/use-expose';
|
||||
|
||||
const [createComponent, bem] = createNamespace('swipe');
|
||||
const [name, bem] = createNamespace('swipe');
|
||||
|
||||
export const SWIPE_KEY = Symbol('Swipe');
|
||||
export const SWIPE_KEY = Symbol(name);
|
||||
|
||||
export type SwipeToOptions = {
|
||||
immediate?: boolean;
|
||||
@@ -50,7 +51,9 @@ export type SwipeProvide = {
|
||||
activeIndicator: ComputedRef<number>;
|
||||
};
|
||||
|
||||
export default createComponent({
|
||||
export default defineComponent({
|
||||
name,
|
||||
|
||||
props: {
|
||||
width: [Number, String],
|
||||
height: [Number, String],
|
||||
@@ -0,0 +1,8 @@
|
||||
import { installable } from '../utils';
|
||||
import _Swipe from './Swipe';
|
||||
|
||||
const Swipe = installable(_Swipe);
|
||||
|
||||
export default Swipe;
|
||||
export { Swipe };
|
||||
export type { SwipeToOptions } from './Swipe';
|
||||
Reference in New Issue
Block a user