We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
我用下面这个demo,组件里定义方法funA,但是却得到methods:[],请问是不支持fc还是我写法有问题?麻烦看看,谢谢🙏
methods:[]
import React from 'react'; import PropTypes from 'prop-types'; /** * 人物组件 * @description 公共banner组件 */ const Banner = (props) => { const {src} = props; Banner.propTypes = { /** * banner图片地址 */ src: PropTypes.string.isRequired }; Banner.defaultProps = { src: '' }; /** * 这是方法funA,它没出现在解析后的methods中 * @param {String} text 文本内容 */ const funA = (text) => { console.log(text); }; return ( <div> <img src={src} /> </div> ); }; export default Banner;
The text was updated successfully, but these errors were encountered:
No branches or pull requests
我用下面这个demo,组件里定义方法funA,但是却得到
methods:[]
,请问是不支持fc还是我写法有问题?麻烦看看,谢谢🙏The text was updated successfully, but these errors were encountered: