mirror of
https://gitee.com/ant-design-vue/ant-design-vue.git
synced 2024-11-29 18:48:32 +08:00
refactor: transition
This commit is contained in:
parent
35d5185634
commit
2666cb79ab
@ -5,7 +5,7 @@ import type {
|
||||
TransitionGroupProps,
|
||||
TransitionProps,
|
||||
} from 'vue';
|
||||
import { nextTick, Transition, TransitionGroup } from 'vue';
|
||||
import { nextTick } from 'vue';
|
||||
import { tuple } from './type';
|
||||
|
||||
const SelectPlacements = tuple('bottomLeft', 'bottomRight', 'topLeft', 'topRight');
|
||||
@ -126,6 +126,4 @@ const getTransitionName = (rootPrefixCls: string, motion: string, transitionName
|
||||
return `${rootPrefixCls}-${motion}`;
|
||||
};
|
||||
|
||||
export { Transition, TransitionGroup, collapseMotion, getTransitionName, getTransitionDirection };
|
||||
|
||||
export default Transition;
|
||||
export { collapseMotion, getTransitionName, getTransitionDirection };
|
||||
|
@ -1,5 +1,5 @@
|
||||
import type { CSSProperties, ExtractPropTypes, PropType } from 'vue';
|
||||
import { computed, defineComponent, shallowRef } from 'vue';
|
||||
import { computed, defineComponent, shallowRef, Transition } from 'vue';
|
||||
import CloseOutlined from '@ant-design/icons-vue/CloseOutlined';
|
||||
import CheckCircleOutlined from '@ant-design/icons-vue/CheckCircleOutlined';
|
||||
import ExclamationCircleOutlined from '@ant-design/icons-vue/ExclamationCircleOutlined';
|
||||
@ -11,7 +11,7 @@ import InfoCircleFilled from '@ant-design/icons-vue/InfoCircleFilled';
|
||||
import CloseCircleFilled from '@ant-design/icons-vue/CloseCircleFilled';
|
||||
import classNames from '../_util/classNames';
|
||||
import PropTypes from '../_util/vue-types';
|
||||
import { getTransitionProps, Transition } from '../_util/transition';
|
||||
import { getTransitionProps } from '../_util/transition';
|
||||
import { isValidElement } from '../_util/props-util';
|
||||
import { tuple, withInstall } from '../_util/type';
|
||||
import { cloneElement } from '../_util/vnode';
|
||||
|
@ -3,9 +3,9 @@ import ScrollNumber from './ScrollNumber';
|
||||
import classNames from '../_util/classNames';
|
||||
import { getPropsSlot, flattenChildren } from '../_util/props-util';
|
||||
import { cloneElement } from '../_util/vnode';
|
||||
import { getTransitionProps, Transition } from '../_util/transition';
|
||||
import { getTransitionProps } from '../_util/transition';
|
||||
import type { ExtractPropTypes, CSSProperties, PropType } from 'vue';
|
||||
import { defineComponent, computed, ref, watch } from 'vue';
|
||||
import { defineComponent, computed, ref, watch, Transition } from 'vue';
|
||||
import Ribbon from './Ribbon';
|
||||
import useConfigInject from '../config-provider/hooks/useConfigInject';
|
||||
import isNumeric from '../_util/isNumeric';
|
||||
|
@ -1,6 +1,5 @@
|
||||
import { defineComponent, nextTick } from 'vue';
|
||||
import { defineComponent, nextTick, Transition } from 'vue';
|
||||
import LoadingOutlined from '@ant-design/icons-vue/LoadingOutlined';
|
||||
import Transition from '../_util/transition';
|
||||
const getCollapsedWidth = (node: HTMLSpanElement) => {
|
||||
if (node) {
|
||||
node.style.width = '0px';
|
||||
|
@ -2,8 +2,7 @@ import PanelContent from './PanelContent';
|
||||
import { initDefaultProps } from '../_util/props-util';
|
||||
import { collapsePanelProps } from './commonProps';
|
||||
import type { ExtractPropTypes } from 'vue';
|
||||
import { defineComponent } from 'vue';
|
||||
import Transition from '../_util/transition';
|
||||
import { defineComponent, Transition } from 'vue';
|
||||
import classNames from '../_util/classNames';
|
||||
import devWarning from '../vc-util/devWarning';
|
||||
import useConfigInject from '../config-provider/hooks/useConfigInject';
|
||||
|
@ -1,5 +1,5 @@
|
||||
import VerticalAlignTopOutlined from '@ant-design/icons-vue/VerticalAlignTopOutlined';
|
||||
import { getTransitionProps, Transition } from '../_util/transition';
|
||||
import { getTransitionProps } from '../_util/transition';
|
||||
import {
|
||||
defineComponent,
|
||||
nextTick,
|
||||
@ -10,6 +10,7 @@ import {
|
||||
ref,
|
||||
watch,
|
||||
onDeactivated,
|
||||
Transition,
|
||||
} from 'vue';
|
||||
import FloatButton, { floatButtonPrefixCls } from './FloatButton';
|
||||
import useConfigInject from '../config-provider/hooks/useConfigInject';
|
||||
|
@ -1,8 +1,8 @@
|
||||
import { defineComponent, ref, computed, watch, onBeforeUnmount } from 'vue';
|
||||
import { defineComponent, ref, computed, watch, onBeforeUnmount, Transition } from 'vue';
|
||||
import CloseOutlined from '@ant-design/icons-vue/CloseOutlined';
|
||||
import FileTextOutlined from '@ant-design/icons-vue/FileTextOutlined';
|
||||
import classNames from '../_util/classNames';
|
||||
import { getTransitionProps, Transition } from '../_util/transition';
|
||||
import { getTransitionProps } from '../_util/transition';
|
||||
import FloatButton, { floatButtonPrefixCls } from './FloatButton';
|
||||
import useConfigInject from '../config-provider/hooks/useConfigInject';
|
||||
import { useProvideFloatButtonGroupContext } from './context';
|
||||
|
@ -1,5 +1,4 @@
|
||||
import { computed, defineComponent, ref, watch } from 'vue';
|
||||
import Transition from '../../_util/transition';
|
||||
import { computed, Transition, defineComponent, ref, watch } from 'vue';
|
||||
import { useInjectMenu, MenuContextProvider } from './hooks/useMenuContext';
|
||||
import type { MenuMode } from './interface';
|
||||
import SubMenuList from './SubMenuList';
|
||||
|
@ -1,4 +1,12 @@
|
||||
import { computed, defineComponent, onBeforeUnmount, onMounted, shallowRef, watch } from 'vue';
|
||||
import {
|
||||
computed,
|
||||
defineComponent,
|
||||
onBeforeUnmount,
|
||||
onMounted,
|
||||
shallowRef,
|
||||
watch,
|
||||
Transition,
|
||||
} from 'vue';
|
||||
import type { ExtractPropTypes, CSSProperties } from 'vue';
|
||||
import EyeOutlined from '@ant-design/icons-vue/EyeOutlined';
|
||||
import DeleteOutlined from '@ant-design/icons-vue/DeleteOutlined';
|
||||
@ -15,7 +23,7 @@ import type {
|
||||
} from '../interface';
|
||||
import type { VueNode } from '../../_util/type';
|
||||
import useConfigInject from '../../config-provider/hooks/useConfigInject';
|
||||
import Transition, { getTransitionProps } from '../../_util/transition';
|
||||
import { getTransitionProps } from '../../_util/transition';
|
||||
import { booleanType, stringType, functionType, arrayType, objectType } from '../../_util/type';
|
||||
|
||||
export const listItemProps = () => {
|
||||
|
@ -17,11 +17,12 @@ import {
|
||||
onMounted,
|
||||
shallowRef,
|
||||
watchEffect,
|
||||
TransitionGroup,
|
||||
} from 'vue';
|
||||
import { filterEmpty, initDefaultProps, isValidElement } from '../../_util/props-util';
|
||||
import type { VueNode } from '../../_util/type';
|
||||
import useConfigInject from '../../config-provider/hooks/useConfigInject';
|
||||
import { getTransitionGroupProps, TransitionGroup } from '../../_util/transition';
|
||||
import { getTransitionGroupProps } from '../../_util/transition';
|
||||
import collapseMotion from '../../_util/collapseMotion';
|
||||
|
||||
const HackSlot = (_, { slots }) => {
|
||||
|
@ -1,7 +1,7 @@
|
||||
import type { CSSProperties, PropType } from 'vue';
|
||||
import { computed, ref, defineComponent, nextTick } from 'vue';
|
||||
import { Transition, computed, ref, defineComponent, nextTick } from 'vue';
|
||||
import type { MouseEventHandler } from '../_util/EventInterface';
|
||||
import Transition, { getTransitionProps } from '../_util/transition';
|
||||
import { getTransitionProps } from '../_util/transition';
|
||||
import dialogPropTypes from './IDialogPropTypes';
|
||||
import { offset } from './util';
|
||||
const sentinelStyle = { width: 0, height: 0, overflow: 'hidden', outline: 'none' };
|
||||
|
@ -1,5 +1,5 @@
|
||||
import { defineComponent } from 'vue';
|
||||
import Transition, { getTransitionProps } from '../_util/transition';
|
||||
import { defineComponent, Transition } from 'vue';
|
||||
import { getTransitionProps } from '../_util/transition';
|
||||
|
||||
export default defineComponent({
|
||||
compatConfig: { MODE: 3 },
|
||||
|
Loading…
Reference in New Issue
Block a user