zoukankan      html  css  js  c++  java
  • 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;
        }
  • 相关阅读:
    自适应行高
    IOS各类问题
    KVC
    数据模型的构建及懒加载数据
    NSBundle
    九宫格布局获取行/列索引
    QLineEdit
    QLabel
    排序算法
    SpringBoot配置文件-yaml
  • 原文地址:https://www.cnblogs.com/dongxiaolei/p/14217144.html
Copyright © 2011-2022 走看看