import { tpl } from './tpl';
import BaseFormControl from '../../baseFormControl';
import './style.scss';
{}
class Radio extends BaseFormControl {
    constructor(config) {
        super()
        this.config = $.extend(true, {}, config)
        this.render();
        this._initEvent();
    }
    
    render() {
        this.appendFormControl(template.render(tpl, {
            radioName:'selectRadio',
            radioList: [
                {
                    "defaultSelect": true,
                    "text": "模板1",
                    "type": "image",
                    "value": "//img14.360buyimg.com/zx/jfs/t10645/58/1027208249/20279/3f1ecc62/59db482bN4ff1d36e.png"
                },
                {
                    "defaultSelect": false,
                    "text": "特别长的文本内容",
                    "type": "image",
                    "value": "//img30.360buyimg.com/zx/jfs/t9844/105/1002781952/30229/44c87f85/59db482cNd2f3708c.png"
                },
                {
                    "defaultSelect": false,
                    "text": "模板3",
                    "type": "image",
                    "value": "//img11.360buyimg.com/zx/jfs/t10918/21/1026933087/1359/2d1734ab/59db484cNd505c9f5.png"
                },
                {
                    "defaultSelect": false,
                    "height": "272",
                    "text": "模板4（自定义）",
                    "type": "upload-image",
                    "value": "",
                    "width": "640"
                }
            ]
        }))
    }
    getData(){
       console.log($("input[name='selectRadio']:checked").val());
    }
}
export default Radio;