style: rename useProvide

feat-new-menu
tanjinzhou 4 years ago
parent 7acf577f56
commit ea8ff66989

@ -3,7 +3,7 @@ import { ConfigProviderProps, defaultConfigProvider, SizeType } from '../../conf
const sizeProvider = Symbol('SizeProvider');
const useProviderSize = <T = SizeType>(props: Record<any, any>): ComputedRef<T> => {
const useProvideSize = <T = SizeType>(props: Record<any, any>): ComputedRef<T> => {
const configProvider = inject<UnwrapRef<ConfigProviderProps>>(
'configProvider',
defaultConfigProvider,
@ -21,6 +21,6 @@ const useInjectSize = <T = SizeType>(): ComputedRef<T> => {
return size;
};
export { useInjectSize, sizeProvider, useProviderSize };
export { useInjectSize, sizeProvider, useProvideSize };
export default useProviderSize;
export default useProvideSize;

@ -4,7 +4,6 @@ import {
CSSProperties,
defineComponent,
ExtractPropTypes,
inject,
nextTick,
onMounted,
PropType,

@ -1,12 +1,12 @@
import { cloneElement } from '../_util/vnode';
import Avatar, { avatarProps, AvatarSize } from './Avatar';
import Popover from '../popover';
import { defineComponent, provide, PropType, ExtractPropTypes, CSSProperties } from 'vue';
import { defineComponent, PropType, ExtractPropTypes, CSSProperties } from 'vue';
import PropTypes from '../_util/vue-types';
import { flattenChildren, getPropsSlot } from '../_util/props-util';
import { tuple } from '../_util/type';
import useConfigInject from '../_util/hooks/useConfigInject';
import useProviderSize from '../_util/hooks/useSize';
import useProvideSize from '../_util/hooks/useSize';
const groupProps = {
prefixCls: PropTypes.string,
@ -33,7 +33,7 @@ const Group = defineComponent({
inheritAttrs: false,
setup(props, { slots, attrs }) {
const { prefixCls, direction } = useConfigInject('avatar-group', props);
useProviderSize<AvatarSize>(props);
useProvideSize<AvatarSize>(props);
return () => {
const { maxPopoverPlacement = 'top', maxCount, maxStyle } = props;

@ -1 +1 @@
Subproject commit d197053285b81e77718621c0b5b94cb3b21831a2
Subproject commit eacad021cf9e4d7d18fe4c4b9a38cbd7e3378d49
Loading…
Cancel
Save