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
问题描述 taro的公共页面使用工厂模式export出去之后发现这个错误:Uncaught ReferenceError: _TaroComponentClass is not defined 复现步骤 运行项目到此页面控制台报错
Uncaught ReferenceError: _TaroComponentClass is not defined
function CommonSelectPage (config) { const { title //举例希望渲染不同的title } = config; return class extends React.Component { constructor (props) { super(props) this.state = { list: [] } } config = { navigationBarTitleText: '', } get checkedNum() { const { list } = this.state; return list.reduce((acc, cur) => acc = cur.status ? acc + 1 : acc, 0) } componentWillReceiveProps (nextProps) { console.log(this.props, nextProps); } render () { return ( <View className='common-select'> {title} //举例希望渲染不同的title </View> ) } } } const commonSelectPage = new CommonSelectPage({title: 'lalala'}); export default commonSelectPage;
期望行为 此页面为公共页面 用config作为可配置的json 利用工厂模式 希望渲染出一个页面 只是一些字段不相同
报错信息
系统信息
The text was updated successfully, but these errors were encountered:
No branches or pull requests
问题描述
taro的公共页面使用工厂模式export出去之后发现这个错误:
Uncaught ReferenceError: _TaroComponentClass is not defined
复现步骤
运行项目到此页面控制台报错
期望行为
此页面为公共页面 用config作为可配置的json 利用工厂模式 希望渲染出一个页面 只是一些字段不相同
报错信息
Uncaught ReferenceError: _TaroComponentClass is not defined
系统信息
The text was updated successfully, but these errors were encountered: