mirror of
https://gitee.com/vant-contrib/vant.git
synced 2025-04-06 03:57:59 +08:00
chore: rename composables folder
This commit is contained in:
parent
dc6330bcdc
commit
062cd546a9
@ -4,8 +4,8 @@ import { ACTION_BAR_KEY } from '../action-bar';
|
||||
|
||||
// Composition
|
||||
import { useParent } from '@vant/use';
|
||||
import { useExpose } from '../composition/use-expose';
|
||||
import { useRoute, routeProps } from '../composition/use-route';
|
||||
import { useExpose } from '../composables/use-expose';
|
||||
import { useRoute, routeProps } from '../composables/use-route';
|
||||
|
||||
// Components
|
||||
import Button from '../button';
|
||||
|
@ -3,7 +3,7 @@ import { ACTION_BAR_KEY } from '../action-bar';
|
||||
|
||||
// Composition
|
||||
import { useParent } from '@vant/use';
|
||||
import { useRoute, routeProps } from '../composition/use-route';
|
||||
import { useRoute, routeProps } from '../composables/use-route';
|
||||
|
||||
// Components
|
||||
import Icon from '../icon';
|
||||
|
@ -5,7 +5,7 @@ import { createNamespace, isObject } from '../utils';
|
||||
import { isMobile } from '../utils/validate/mobile';
|
||||
|
||||
// Composition
|
||||
import { useExpose } from '../composition/use-expose';
|
||||
import { useExpose } from '../composables/use-expose';
|
||||
|
||||
// Components
|
||||
import Area from '../area';
|
||||
|
@ -1,6 +1,6 @@
|
||||
import { ref, watch, computed, reactive, nextTick, onMounted } from 'vue';
|
||||
import { createNamespace, pick } from '../utils';
|
||||
import { useExpose } from '../composition/use-expose';
|
||||
import { useExpose } from '../composables/use-expose';
|
||||
import { pickerProps } from '../picker/shared';
|
||||
import Picker from '../picker';
|
||||
|
||||
|
@ -3,7 +3,7 @@ import { PropType, CSSProperties } from 'vue';
|
||||
// Utils
|
||||
import { createNamespace } from '../utils';
|
||||
import { BORDER_SURROUND, WHITE } from '../utils/constant';
|
||||
import { useRoute, routeProps } from '../composition/use-route';
|
||||
import { useRoute, routeProps } from '../composables/use-route';
|
||||
|
||||
// Components
|
||||
import Icon from '../icon';
|
||||
|
@ -14,8 +14,8 @@ import {
|
||||
|
||||
// Composition
|
||||
import { useToggle } from '@vant/use';
|
||||
import { useExpose } from '../../composition/use-expose';
|
||||
import { useHeight } from '../../composition/use-height';
|
||||
import { useExpose } from '../../composables/use-expose';
|
||||
import { useHeight } from '../../composables/use-height';
|
||||
|
||||
// Components
|
||||
import Day from './Day';
|
||||
|
@ -19,8 +19,8 @@ import {
|
||||
|
||||
// Composition
|
||||
import { raf, useRect, onMountedOrActivated } from '@vant/use';
|
||||
import { useRefs } from '../composition/use-refs';
|
||||
import { useExpose } from '../composition/use-expose';
|
||||
import { useRefs } from '../composables/use-refs';
|
||||
import { useExpose } from '../composables/use-expose';
|
||||
|
||||
// Components
|
||||
import Popup from '../popup';
|
||||
|
@ -4,7 +4,7 @@ import { PropType } from 'vue';
|
||||
import { createNamespace, isDef } from '../utils';
|
||||
|
||||
// Composition
|
||||
import { useRoute, routeProps } from '../composition/use-route';
|
||||
import { useRoute, routeProps } from '../composables/use-route';
|
||||
|
||||
// Components
|
||||
import Icon from '../icon';
|
||||
|
@ -2,8 +2,8 @@ import { watch } from 'vue';
|
||||
import { createNamespace } from '../utils';
|
||||
import { CHECKBOX_KEY } from '../checkbox';
|
||||
import { useChildren } from '@vant/use';
|
||||
import { useExpose } from '../composition/use-expose';
|
||||
import { useLinkField } from '../composition/use-link-field';
|
||||
import { useExpose } from '../composables/use-expose';
|
||||
import { useLinkField } from '../composables/use-link-field';
|
||||
|
||||
const [createComponent, bem] = createNamespace('checkbox-group');
|
||||
|
||||
|
@ -105,7 +105,7 @@
|
||||
|
||||
<script>
|
||||
import { ref } from 'vue';
|
||||
import { useRefs } from '../../composition/use-refs';
|
||||
import { useRefs } from '../../composables/use-refs';
|
||||
|
||||
export default {
|
||||
i18n: {
|
||||
|
@ -1,8 +1,8 @@
|
||||
import { computed, watch } from 'vue';
|
||||
import { createNamespace, pick } from '../utils';
|
||||
import { useParent } from '@vant/use';
|
||||
import { useExpose } from '../composition/use-expose';
|
||||
import { useLinkField } from '../composition/use-link-field';
|
||||
import { useExpose } from '../composables/use-expose';
|
||||
import { useLinkField } from '../composables/use-link-field';
|
||||
import Checker, { checkerProps } from './Checker';
|
||||
|
||||
const [createComponent, bem] = createNamespace('checkbox');
|
||||
|
@ -5,8 +5,8 @@ import { createNamespace } from '../utils';
|
||||
|
||||
// Composition
|
||||
import { raf, doubleRaf, useParent } from '@vant/use';
|
||||
import { useExpose } from '../composition/use-expose';
|
||||
import { useLazyRender } from '../composition/use-lazy-render';
|
||||
import { useExpose } from '../composables/use-expose';
|
||||
import { useLazyRender } from '../composables/use-lazy-render';
|
||||
|
||||
// Components
|
||||
import Cell, { cellProps } from '../cell';
|
||||
|
@ -6,7 +6,7 @@ import { parseFormat } from './utils';
|
||||
|
||||
// Composition
|
||||
import { useCountDown } from '@vant/use';
|
||||
import { useExpose } from '../composition/use-expose';
|
||||
import { useExpose } from '../composables/use-expose';
|
||||
|
||||
const [createComponent, bem] = createNamespace('count-down');
|
||||
|
||||
|
@ -5,7 +5,7 @@ import { createNamespace } from '../utils';
|
||||
|
||||
// Composition
|
||||
import { useWindowSize } from '@vant/use';
|
||||
import { useRefs } from '../composition/use-refs';
|
||||
import { useRefs } from '../composables/use-refs';
|
||||
|
||||
// Components
|
||||
import Tab from '../tab';
|
||||
|
@ -6,7 +6,7 @@ import { pick, padZero, createNamespace } from '../utils';
|
||||
import { times, sharedProps, getTrueValue, getMonthEndDay } from './utils';
|
||||
|
||||
// Composition
|
||||
import { useExpose } from '../composition/use-expose';
|
||||
import { useExpose } from '../composables/use-expose';
|
||||
|
||||
// Components
|
||||
import Picker from '../picker';
|
||||
|
@ -5,7 +5,7 @@ import { pick, range, padZero, createNamespace } from '../utils';
|
||||
import { times, sharedProps } from './utils';
|
||||
|
||||
// Composition
|
||||
import { useExpose } from '../composition/use-expose';
|
||||
import { useExpose } from '../composables/use-expose';
|
||||
|
||||
// Components
|
||||
import Picker from '../picker';
|
||||
|
@ -1,6 +1,6 @@
|
||||
import { ref } from 'vue';
|
||||
import { pick, createNamespace } from '../utils';
|
||||
import { useExpose } from '../composition/use-expose';
|
||||
import { useExpose } from '../composables/use-expose';
|
||||
import TimePicker from './TimePicker';
|
||||
import DatePicker from './DatePicker';
|
||||
|
||||
|
@ -6,7 +6,7 @@ import { DROPDOWN_KEY } from '../dropdown-menu';
|
||||
|
||||
// Composition
|
||||
import { useParent } from '@vant/use';
|
||||
import { useExpose } from '../composition/use-expose';
|
||||
import { useExpose } from '../composables/use-expose';
|
||||
|
||||
// Components
|
||||
import Cell from '../cell';
|
||||
|
@ -25,7 +25,7 @@ import { runSyncRule } from './utils';
|
||||
|
||||
// Composition
|
||||
import { useParent } from '@vant/use';
|
||||
import { useExpose } from '../composition/use-expose';
|
||||
import { useExpose } from '../composables/use-expose';
|
||||
|
||||
// Components
|
||||
import Icon from '../icon';
|
||||
|
@ -1,6 +1,6 @@
|
||||
import { createNamespace } from '../utils';
|
||||
import { useChildren } from '@vant/use';
|
||||
import { useExpose } from '../composition/use-expose';
|
||||
import { useExpose } from '../composables/use-expose';
|
||||
|
||||
const [createComponent, bem] = createNamespace('form');
|
||||
|
||||
|
@ -7,7 +7,7 @@ import { GRID_KEY } from '../grid';
|
||||
|
||||
// Composition
|
||||
import { useParent } from '@vant/use';
|
||||
import { useRoute, routeProps } from '../composition/use-route';
|
||||
import { useRoute, routeProps } from '../composables/use-route';
|
||||
|
||||
// Components
|
||||
import Icon from '../icon';
|
||||
|
@ -6,7 +6,7 @@ import { callInterceptor } from '../utils/interceptor';
|
||||
|
||||
// Composition
|
||||
import { useWindowSize } from '@vant/use';
|
||||
import { useExpose } from '../composition/use-expose';
|
||||
import { useExpose } from '../composables/use-expose';
|
||||
|
||||
// Components
|
||||
import Icon from '../icon';
|
||||
|
@ -5,7 +5,7 @@ import { bem } from './shared';
|
||||
import { range, preventDefault } from '../utils';
|
||||
|
||||
// Composition
|
||||
import { useTouch } from '../composition/use-touch';
|
||||
import { useTouch } from '../composables/use-touch';
|
||||
|
||||
// Component
|
||||
import Image from '../image';
|
||||
|
@ -8,8 +8,8 @@ import { getScrollTop, getRootScrollTop } from '../utils/dom/scroll';
|
||||
|
||||
// Composition
|
||||
import { useRect, useParent } from '@vant/use';
|
||||
import { useHeight } from '../composition/use-height';
|
||||
import { useExpose } from '../composition/use-expose';
|
||||
import { useHeight } from '../composables/use-height';
|
||||
import { useExpose } from '../composables/use-expose';
|
||||
|
||||
const [createComponent, bem] = createNamespace('index-anchor');
|
||||
|
||||
|
@ -18,7 +18,7 @@ import {
|
||||
useScrollParent,
|
||||
useEventListener,
|
||||
} from '@vant/use';
|
||||
import { useTouch } from '../composition/use-touch';
|
||||
import { useTouch } from '../composables/use-touch';
|
||||
|
||||
export const INDEX_BAR_KEY = 'vanIndexBar';
|
||||
|
||||
|
@ -5,7 +5,7 @@ import { isHidden, createNamespace } from '../utils';
|
||||
|
||||
// Composition
|
||||
import { useRect, useScrollParent, useEventListener } from '@vant/use';
|
||||
import { useExpose } from '../composition/use-expose';
|
||||
import { useExpose } from '../composables/use-expose';
|
||||
|
||||
// Components
|
||||
import Loading from '../loading';
|
||||
|
@ -5,7 +5,7 @@ import { createNamespace } from '../utils';
|
||||
import { BORDER_BOTTOM } from '../utils/constant';
|
||||
|
||||
// Composition
|
||||
import { usePlaceholder } from '../composition/use-placeholder';
|
||||
import { usePlaceholder } from '../composables/use-placeholder';
|
||||
|
||||
// Components
|
||||
import Icon from '../icon';
|
||||
|
@ -1,6 +1,6 @@
|
||||
import { ref, PropType } from 'vue';
|
||||
import { createNamespace } from '../utils';
|
||||
import { useTouch } from '../composition/use-touch';
|
||||
import { useTouch } from '../composables/use-touch';
|
||||
import Loading from '../loading';
|
||||
|
||||
const [createComponent, bem] = createNamespace('key');
|
||||
|
@ -1,6 +1,6 @@
|
||||
import { PropType, Transition, CSSProperties } from 'vue';
|
||||
import { noop, isDef, preventDefault, createNamespace } from '../utils';
|
||||
import { useLazyRender } from '../composition/use-lazy-render';
|
||||
import { useLazyRender } from '../composables/use-lazy-render';
|
||||
|
||||
const [createComponent, bem] = createNamespace('overlay');
|
||||
|
||||
|
@ -7,8 +7,8 @@ import { range, isObject, createNamespace, preventDefault } from '../utils';
|
||||
|
||||
// Composition
|
||||
import { useParent } from '@vant/use';
|
||||
import { useTouch } from '../composition/use-touch';
|
||||
import { useExpose } from '../composition/use-expose';
|
||||
import { useTouch } from '../composables/use-touch';
|
||||
import { useExpose } from '../composables/use-expose';
|
||||
|
||||
const DEFAULT_DURATION = 200;
|
||||
|
||||
|
@ -7,7 +7,7 @@ import { BORDER_UNSET_TOP_BOTTOM } from '../utils/constant';
|
||||
|
||||
// Composition
|
||||
import { useChildren } from '@vant/use';
|
||||
import { useExpose } from '../composition/use-expose';
|
||||
import { useExpose } from '../composables/use-expose';
|
||||
|
||||
// Components
|
||||
import Loading from '../loading';
|
||||
|
@ -14,8 +14,8 @@ import { createNamespace, isDef } from '../utils';
|
||||
|
||||
// Composition
|
||||
import { useEventListener } from '@vant/use';
|
||||
import { useLockScroll } from '../composition/use-lock-scroll';
|
||||
import { useLazyRender } from '../composition/use-lazy-render';
|
||||
import { useLockScroll } from '../composables/use-lock-scroll';
|
||||
import { useLazyRender } from '../composables/use-lazy-render';
|
||||
|
||||
// Components
|
||||
import Icon from '../icon';
|
||||
|
@ -1,6 +1,6 @@
|
||||
import { ref, watch, computed, nextTick, reactive, onMounted } from 'vue';
|
||||
import { createNamespace, addUnit } from '../utils';
|
||||
import { useExpose } from '../composition/use-expose';
|
||||
import { useExpose } from '../composables/use-expose';
|
||||
|
||||
const [createComponent, bem] = createNamespace('progress');
|
||||
|
||||
|
@ -5,7 +5,7 @@ import { preventDefault, getScrollTop, createNamespace } from '../utils';
|
||||
|
||||
// Composition
|
||||
import { useScrollParent } from '@vant/use';
|
||||
import { useTouch } from '../composition/use-touch';
|
||||
import { useTouch } from '../composables/use-touch';
|
||||
|
||||
// Components
|
||||
import Loading from '../loading';
|
||||
|
@ -1,7 +1,7 @@
|
||||
import { watch } from 'vue';
|
||||
import { createNamespace } from '../utils';
|
||||
import { useChildren } from '@vant/use';
|
||||
import { useLinkField } from '../composition/use-link-field';
|
||||
import { useLinkField } from '../composables/use-link-field';
|
||||
|
||||
const [createComponent, bem] = createNamespace('radio-group');
|
||||
|
||||
|
@ -4,9 +4,9 @@ import { computed } from 'vue';
|
||||
import { addUnit, createNamespace, preventDefault } from '../utils';
|
||||
|
||||
// Composition
|
||||
import { useRefs } from '../composition/use-refs';
|
||||
import { useTouch } from '../composition/use-touch';
|
||||
import { useLinkField } from '../composition/use-link-field';
|
||||
import { useRefs } from '../composables/use-refs';
|
||||
import { useTouch } from '../composables/use-touch';
|
||||
import { useLinkField } from '../composables/use-link-field';
|
||||
|
||||
// Components
|
||||
import Icon from '../icon';
|
||||
|
@ -1,6 +1,6 @@
|
||||
import { createNamespace } from '../utils';
|
||||
import { useParent } from '@vant/use';
|
||||
import { useRoute, routeProps } from '../composition/use-route';
|
||||
import { useRoute, routeProps } from '../composables/use-route';
|
||||
import { SIDEBAR_KEY } from '../sidebar';
|
||||
import Badge from '../badge';
|
||||
|
||||
|
@ -11,8 +11,8 @@ import {
|
||||
|
||||
// Composition
|
||||
import { useRect } from '@vant/use';
|
||||
import { useTouch } from '../composition/use-touch';
|
||||
import { useLinkField } from '../composition/use-link-field';
|
||||
import { useTouch } from '../composables/use-touch';
|
||||
import { useLinkField } from '../composables/use-link-field';
|
||||
|
||||
const [createComponent, bem] = createNamespace('slider');
|
||||
|
||||
|
@ -13,7 +13,7 @@ import {
|
||||
} from '../utils';
|
||||
|
||||
// Composition
|
||||
import { useLinkField } from '../composition/use-link-field';
|
||||
import { useLinkField } from '../composables/use-link-field';
|
||||
|
||||
const [createComponent, bem] = createNamespace('stepper');
|
||||
|
||||
|
@ -11,7 +11,7 @@ import {
|
||||
|
||||
// Composition
|
||||
import { useScrollParent, useEventListener } from '@vant/use';
|
||||
import { useVisibilityChange } from '../composition/use-visibility-change';
|
||||
import { useVisibilityChange } from '../composables/use-visibility-change';
|
||||
|
||||
const [createComponent, bem] = createNamespace('sticky');
|
||||
|
||||
|
@ -6,8 +6,8 @@ import { callInterceptor } from '../utils/interceptor';
|
||||
|
||||
// Composition
|
||||
import { useRect, useClickAway } from '@vant/use';
|
||||
import { useTouch } from '../composition/use-touch';
|
||||
import { useExpose } from '../composition/use-expose';
|
||||
import { useTouch } from '../composables/use-touch';
|
||||
import { useExpose } from '../composables/use-expose';
|
||||
|
||||
const [createComponent, bem] = createNamespace('swipe-cell');
|
||||
|
||||
|
@ -2,7 +2,7 @@ import { computed, nextTick, onMounted, reactive } from 'vue';
|
||||
import { SWIPE_KEY } from '../swipe';
|
||||
import { createNamespace } from '../utils';
|
||||
import { useParent } from '@vant/use';
|
||||
import { useExpose } from '../composition/use-expose';
|
||||
import { useExpose } from '../composables/use-expose';
|
||||
|
||||
const [createComponent, bem] = createNamespace('swipe-item');
|
||||
|
||||
|
@ -19,8 +19,8 @@ import {
|
||||
usePageVisibility,
|
||||
onMountedOrActivated,
|
||||
} from '@vant/use';
|
||||
import { useTouch } from '../composition/use-touch';
|
||||
import { useExpose } from '../composition/use-expose';
|
||||
import { useTouch } from '../composables/use-touch';
|
||||
import { useExpose } from '../composables/use-expose';
|
||||
|
||||
const [createComponent, bem] = createNamespace('swipe');
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
import { createNamespace, addUnit } from '../utils';
|
||||
import { useLinkField } from '../composition/use-link-field';
|
||||
import { useLinkField } from '../composables/use-link-field';
|
||||
import Loading from '../loading';
|
||||
|
||||
const [createComponent, bem] = createNamespace('switch');
|
||||
|
@ -4,7 +4,7 @@ import { TABS_KEY } from '../tabs';
|
||||
|
||||
// Composition
|
||||
import { useParent } from '@vant/use';
|
||||
import { routeProps } from '../composition/use-route';
|
||||
import { routeProps } from '../composables/use-route';
|
||||
|
||||
// Components
|
||||
import SwipeItem from '../swipe-item';
|
||||
|
@ -6,7 +6,7 @@ import { createNamespace, isObject, isDef } from '../utils';
|
||||
|
||||
// Composition
|
||||
import { useParent } from '@vant/use';
|
||||
import { routeProps, useRoute } from '../composition/use-route';
|
||||
import { routeProps, useRoute } from '../composables/use-route';
|
||||
|
||||
// Components
|
||||
import Icon from '../icon';
|
||||
|
@ -7,7 +7,7 @@ import { callInterceptor } from '../utils/interceptor';
|
||||
|
||||
// Composition
|
||||
import { useChildren } from '@vant/use';
|
||||
import { usePlaceholder } from '../composition/use-placeholder';
|
||||
import { usePlaceholder } from '../composables/use-placeholder';
|
||||
|
||||
const [createComponent, bem] = createNamespace('tabbar');
|
||||
|
||||
|
@ -24,9 +24,9 @@ import {
|
||||
useEventListener,
|
||||
onMountedOrActivated,
|
||||
} from '@vant/use';
|
||||
import { route } from '../composition/use-route';
|
||||
import { useRefs } from '../composition/use-refs';
|
||||
import { useExpose } from '../composition/use-expose';
|
||||
import { route } from '../composables/use-route';
|
||||
import { useRefs } from '../composables/use-refs';
|
||||
import { useExpose } from '../composables/use-expose';
|
||||
|
||||
// Components
|
||||
import Sticky from '../sticky';
|
||||
|
@ -12,8 +12,8 @@ import {
|
||||
} from './utils';
|
||||
|
||||
// Composition
|
||||
import { useExpose } from '../composition/use-expose';
|
||||
import { useLinkField } from '../composition/use-link-field';
|
||||
import { useExpose } from '../composables/use-expose';
|
||||
import { useLinkField } from '../composables/use-link-field';
|
||||
|
||||
// Components
|
||||
import Icon from '../icon';
|
||||
|
@ -1,5 +1,5 @@
|
||||
import { createApp, reactive, Component, nextTick } from 'vue';
|
||||
import { useExpose } from '../composition/use-expose';
|
||||
import { useExpose } from '../composables/use-expose';
|
||||
|
||||
export function usePopupState() {
|
||||
const state = reactive({
|
||||
|
Loading…
x
Reference in New Issue
Block a user