道具类型失败:FocusZone:道具类型“ as”无效;它必须是一个函数,通常来自“ prop-types”包,但是收到了“ undefined”

在使用Fluent UI组件时,我在react js中收到此警告。我做了很多尝试,但无法删除此警告。有人有主意吗?

代码

<Dialog        
        as="div"
        classname="PopupDialogs"
        open={showPopUp}
        styles={{ justifySelf: "unset" }}
        header={GetSubject()}
        content={<Flex>{displayTime}</Flex>}
        footer={footer()}
        onCancel={() => { OnClosePopUp(false) }}
        onconfirm={() => { }}
        headeraction={context.userProfileData.isTeacher && headeraction()}
    />

警告

backend.js:6 Warning: Failed prop type: FocusZone: prop type `as` is invalid; it must be a function,usually from the `prop-types` package,but received `undefined`.
    in FocusZone (created by Menu)
    in Menu (created by Context.Consumer)
    in div (created by Context.Consumer)
    in div (created by Context.Consumer)
    in div (created by Context.Consumer)
    in div (created by Context.Consumer)
    in div (created by Context.Consumer)
    in div (created by Context.Consumer)
    in div (created by Context.Consumer)
    in section (created by Context.Consumer)
    in u (created by Context.Consumer)
    in f (created by Context.Consumer)
    in s (created by component)
    in component (created by Context.Consumer)
    in t (created by D)
    in t (created by D)
    in D
    in t (created by t)
    in t
    in div (created by ProviderBox)
    in ProviderBox (created by Provider)
    in Unknown (created by Provider)
    in s (created by Provider)
    in Provider

非常感谢

beckyang123 回答:道具类型失败:FocusZone:道具类型“ as”无效;它必须是一个函数,通常来自“ prop-types”包,但是收到了“ undefined”

暂时没有好的解决方案,如果你有好的解决方案,请发邮件至:iooj@foxmail.com
本文链接:https://www.f2er.com/2733416.html

大家都在问