kunlun --开发常见问题,常用方法

常用方法

  1. import { getQueryObject } from 'UTILS/querystring';
    用于获取url里面的字段
  2. loadsh里面的map,filter,uniqby,get,isequal
    ds.map(l=>{});
    filter(apiList, l => l.id === type);
    uniqby(column, 'name'); 根据name去重
    get(this.props,'data[0]')
    isequal(a,b) 返回true/false
  3. table相关说明
    this.detailTable = createConnectedComponent({
    type: 'tableGroup', // 这里可以切换图表的渲染类型 tableGroup timeline
    path: tablekey,
    name: '成交量价',
    model: {
      columnWidth: 64,
      column: [{ name: 'addlayerroomcount', isShow:currentFilter==='newSupply'?true:false }], //控制column的显示
      isShowDeatil: false, //显示详情
      isShowFilter: false,//显示查询
      auth: { post: false, update: false, delete: false, }, // download: { frontend: true } //编辑修改权限
      ...rest,
      requestOptions: {
        column: [...resetColumn] //请求的column
      },
      filterQuery: filter, //相当于请求的filter 
      apiName: apiN, //请求api
      relations: [ 
        { apiName: apiN,
          name: '下钻',
          keyMap,
          requestOptions: {
            ...relationsRest
          },
          //requestOptions: {
          //column: ['totalacreage', 'layerroomcount', 'totalusd', 'layerroomcount'].map(name => ({ name }))
         //},
        }
      ]
    },
    router: {
    //这里可以传参数进去
    }
    });
    
posted @ 2020-09-04 15:19  Heson  阅读(121)  评论(0编辑  收藏  举报
Live2D