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
+6 -3
View File
@@ -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],
+8
View File
@@ -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';