• react 常用问题总结


    //表格列添加判断
    {
                title: '选择组织',
                dataIndex: 'myId',
                inputtype: 'select',
                 150,
                align: 'center',
                editable: true,
            },
            ...(this.props.role == 3 ? [{
                title: '选择部门',
                dataIndex: 'departmentIds',
                inputtype: 'select',
                 150,
                align: 'center',
                editable: true,
            }] : []),
    //给某个变量赋值
     setFieldsValue({ [`departmentIds-${record.key}`]: [0] });
    //给普通字段赋值
    setFieldsValue({ departmentIds: [0] });
    //行内绑定组件的方式
     errorComponent={() => <Empty image={Empty.PRESENTED_IMAGE_SIMPLE} description={<span>暂无文件</span>} />}
    //react新增生命周期
    static getDerivedStateFromProps(props, state) {
            if (props.pageData.list !== state.fileData) {
                return {
                    fileData: props.pageData.list ? props.pageData.list : [],
                };
            }
            return null;
        }
  • 相关阅读:
    markdown keynote
    pyecharts
    运行成功
    python发邮件3
    python发邮件2
    python发邮件1
    python发邮件
    python中的编码声明
    auther tonyxiao
    111
  • 原文地址:https://www.cnblogs.com/dongxiaolei/p/14217144.html
Copyright © 2020-2023  润新知