import { Form, Input, Modal } from 'antd'; import React, { Component } from 'react'; import { ConfigItemProp } from '../../../component/chart.d'; import styles from "./configItemImgSelector.module.css"; import { ConfigItemInterface } from "./configItem.d"; import { SettingOutlined } from '@ant-design/icons'; import ConfigItemImgManageBoard from './configItemImgManageBoard'; interface Prop extends ConfigItemInterface { dataSourceUrl ?: string ; uploadUrl ?: string ; } interface State { } export default class ConfigItemImgSelector extends Component { board : any = undefined ; onChange = (v:React.ChangeEvent)=>{ const t:string = v.target.value ; this.onChangeValue(t) } componentDidMount() { console.log(window.location.protocol) } onChangeValue = (url:string)=>{ this.props.onChange && this.props.onChange({ ...this.props.data, value : url }) } showModel = ()=>{ this.board && this.board.show() } render(){ const {data}= this.props; return ( { data && data.value!='' ? : null } } onChange={(e)=>this.onChangeValue(e.target.value)}/> this.board=ref} uploadInfo={ { name : "pic", action: window.location.protocol+"//ssl.zhuanyegou.com/fileServer/file/upload?project=uat-utile&showName=false", // action: "http://localhost:8085/file/upload?project=uat-utile&showName=false", } } onChange={this.onChangeValue} /> ) } }