chore: rename composables folder

This commit is contained in:
chenjiahan 2020-11-16 11:41:46 +08:00
parent dc6330bcdc
commit 062cd546a9
60 changed files with 67 additions and 67 deletions

View File

@ -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';

View File

@ -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';

View File

@ -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';

View File

@ -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';

View File

@ -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';

View File

@ -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';

View File

@ -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';

View File

@ -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';

View File

@ -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');

View File

@ -105,7 +105,7 @@
<script>
import { ref } from 'vue';
import { useRefs } from '../../composition/use-refs';
import { useRefs } from '../../composables/use-refs';
export default {
i18n: {

View File

@ -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');

View File

@ -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';

View File

@ -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');

View File

@ -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';

View File

@ -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';

View File

@ -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';

View File

@ -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';

View File

@ -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';

View File

@ -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';

View File

@ -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');

View File

@ -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';

View File

@ -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';

View File

@ -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';

View File

@ -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');

View File

@ -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';

View File

@ -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';

View File

@ -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';

View File

@ -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');

View File

@ -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');

View File

@ -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;

View File

@ -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';

View File

@ -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';

View File

@ -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');

View File

@ -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';

View File

@ -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');

View File

@ -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';

View File

@ -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';

View File

@ -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');

View File

@ -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');

View File

@ -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');

View File

@ -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');

View File

@ -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');

View File

@ -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');

View File

@ -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');

View File

@ -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';

View File

@ -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';

View File

@ -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');

View File

@ -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';

View File

@ -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';

View File

@ -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({