fix: functional compoent support vue3.0.3
parent
fa320e6e64
commit
f5cf7e0920
|
@ -1,4 +1,4 @@
|
|||
import { CSSProperties, VNodeTypes, inject, SetupContext, FunctionalComponent } from 'vue';
|
||||
import { CSSProperties, VNodeTypes, inject, FunctionalComponent } from 'vue';
|
||||
import classNames from '../_util/classNames';
|
||||
import { defaultConfigProvider } from '../config-provider';
|
||||
import LocaleReceiver from '../locale-provider/LocaleReceiver';
|
||||
|
@ -30,7 +30,7 @@ interface EmptyType extends FunctionalComponent<EmptyProps> {
|
|||
PRESENTED_IMAGE_SIMPLE: VNodeTypes;
|
||||
}
|
||||
|
||||
const Empty: EmptyType = (props: EmptyProps, { slots = {}, attrs }: SetupContext) => {
|
||||
const Empty: EmptyType = (props, { slots = {}, attrs }) => {
|
||||
const configProvider = inject('configProvider', defaultConfigProvider);
|
||||
const { getPrefixCls, direction } = configProvider;
|
||||
const {
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
import { SetupContext, VNodeChild } from 'vue';
|
||||
import { FunctionalComponent, VNodeChild } from 'vue';
|
||||
import PropTypes from '../_util/vue-types';
|
||||
|
||||
export interface TransBtnProps {
|
||||
|
@ -9,7 +9,11 @@ export interface TransBtnProps {
|
|||
onClick?: (payload: MouseEvent) => void;
|
||||
}
|
||||
|
||||
const TransBtn = (props: TransBtnProps, { slots }: SetupContext) => {
|
||||
export interface TransBtnType extends FunctionalComponent<TransBtnProps> {
|
||||
displayName: string;
|
||||
}
|
||||
|
||||
const TransBtn: TransBtnType = (props, { slots }) => {
|
||||
const { class: className, customizeIcon, customizeIconProps, onMousedown, onClick } = props;
|
||||
let icon: VNodeChild;
|
||||
|
||||
|
@ -48,6 +52,7 @@ const TransBtn = (props: TransBtnProps, { slots }: SetupContext) => {
|
|||
};
|
||||
|
||||
TransBtn.inheritAttrs = false;
|
||||
TransBtn.displayName = 'TransBtn';
|
||||
TransBtn.props = {
|
||||
class: PropTypes.string,
|
||||
customizeIcon: PropTypes.any,
|
||||
|
|
Loading…
Reference in New Issue