Feature1-2.jsx 1.53 KB
Newer Older
bert committed
1 2 3
// 纯数据展现情况列表
import React from 'react';

bert committed
4
import FeatureSetConfig from '../components/FeatureSetConfig';
bert committed
5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71

import Immutable from 'immutable';
import Reqwest from 'reqwest';

import testData from '../common/test-data';

const simple_conf = {
    
    type: 'simpleObject',

    initData: function(callback){
       // 模拟数据
       setTimeout(function(){
            let object = testData.simpleObject;
            object.key = object.docid;

            callback(object);
       }, 1000)
    },

    operate:[
        {
            text: '确认数据',
            style: {
                'marginRight': '30px'
            },
            callback: function(item){
                console.log(item)
            }
        }, {
            text: '展示数据',
            callback: function(item){
                console.log(item)
            }
        }
    ],

    UType:[
        {
            name: 'docid',
            label: '唯一标识',
            type: 'string',
            placeholder: '请输入标示名称'
        },{
            name: 'title',
            label: '标题',
            type: 'string',
            placeholder: '请输入标示名称'
        },{
            name: 'link',
            label: '链接',
            type: 'string'
        },{
            name: 'date',
            label: '日期',
            type: 'date'
        },{
            name: 'img',
            label: '图片',
            type: 'imageUpload'
        }
    ]
}

const Feature1 = FeatureSetConfig(simple_conf);

export default Feature1;