| | |
| | | |
| | | return ( |
| | | <div style={{overflow: 'hidden'}}> |
| | | <Player poster="" autoPlay={card.autoPlay === 'true'} aspectRatio={card.aspectRatio || '16:9'} loop={card.loop === 'true'}> |
| | | <Player startTime={card.startTime || 0} poster="" currentTime={10} autoPlay={card.autoPlay === 'true'} aspectRatio={card.aspectRatio || '16:9'} loop={card.loop === 'true'}> |
| | | <source src={value} /> |
| | | <BigPlayButton position="center" /> |
| | | <ControlBar> |
| | |
| | | text: ['eleType', 'datatype', 'format', 'width', 'height', 'prefix', 'postfix', 'link', 'anchors', 'noValue', 'bgImage', 'fixStyle'], |
| | | number: ['eleType', 'datatype', 'format', 'width', 'height', 'prefix', 'postfix', 'noValue', 'fixStyle'], |
| | | picture: ['eleType', 'datatype', 'width', 'lenWidRadio', 'maxWidth', 'link', 'noValue'], |
| | | video: ['eleType', 'datatype', 'width', 'aspectRatio', 'autoPlay', 'loop', 'noValue'], |
| | | video: ['eleType', 'datatype', 'width', 'aspectRatio', 'autoPlay', 'loop', 'startTime', 'noValue'], |
| | | icon: ['eleType', 'icon', 'datatype', 'width'], |
| | | slider: ['eleType', 'datatype', 'width', 'color', 'maxValue', 'showInfo', 'showType', 'strokeWidth', 'strokeLinecap', 'trailColor'], |
| | | splitline: ['eleType', 'color', 'width', 'borderWidth'], |
| | |
| | | } else if (item.key === 'value' && card.eleType === 'slider') { |
| | | item.type = 'number' |
| | | item.label = '值' |
| | | } else if (item.key === 'value' && card.eleType === 'text') { |
| | | item.type = 'textarea' |
| | | item.label = '内容' |
| | | } else if (item.key === 'format') { |
| | | if (card.eleType === 'text') { |
| | | item.options = item.oriOptions.filter(op => !['percent', 'thdSeparator', 'abs'].includes(op.value)) |
| | |
| | | if (value === 'slider') { |
| | | item.type = 'number' |
| | | item.label = '值' |
| | | } else if (value === 'text') { |
| | | item.type = 'textarea' |
| | | item.label = '内容' |
| | | } else { |
| | | item.type = 'text' |
| | | item.label = '内容' |
| | |
| | | { |
| | | required: item.readonly ? false : !!item.required, |
| | | message: this.props.dict['form.required.input'] + item.label + '!' |
| | | }, |
| | | { |
| | | max: formRule.input.max, |
| | | message: formRule.input.message |
| | | } |
| | | ] |
| | | })(<TextArea rows={2} disabled={item.readonly} placeholder={item.placeholder || ''} />)} |
| | | })(<TextArea autoSize={{minRows: 2}} disabled={item.readonly} placeholder={item.placeholder || ''} />)} |
| | | </Form.Item> |
| | | </Col> |
| | | ) |
| | |
| | | min-height: 190px; |
| | | |
| | | >.ant-row { |
| | | >.ant-col { |
| | | >.ant-col:not(.textarea) { |
| | | height: 65px; |
| | | } |
| | | .ant-col.textarea { |
| | | height: 80px; |
| | | min-height: 80px; |
| | | .ant-form-item-label { |
| | | width: 14.2%; |
| | | } |
| | |
| | | ] |
| | | }, |
| | | { |
| | | type: 'number', |
| | | key: 'startTime', |
| | | precision: 0, |
| | | label: '开始时间', |
| | | initVal: card.startTime || 0, |
| | | tooltip: '视频开始播放的时间,用于调整视频初始化展示的界面。', |
| | | required: false |
| | | }, |
| | | { |
| | | type: 'select', |
| | | key: 'format', |
| | | label: '格式化', |
| | |
| | | |
| | | if (_config.wrap.position === 'fixed' || _config.wrap.position === 'absolute') { |
| | | _config.style.position = _config.wrap.position |
| | | _config.style.zIndex = 2 |
| | | _config.style.zIndex = 3 |
| | | _config.style.left = _config.wrap.left || '' |
| | | _config.style.right = _config.wrap.right || '' |
| | | _config.style.top = _config.wrap.top || '' |
| | |
| | | _config.style.transform = _config.wrap.transform || '' |
| | | _config.style.width = _config.wrap.realwidth || '' |
| | | } else { |
| | | _config.style.zIndex = 2 |
| | | _config.style.zIndex = 3 |
| | | _config.style.left = _config.wrap.left || '' |
| | | _config.style.right = _config.wrap.right || '' |
| | | _config.style.top = _config.wrap.top || '' |
| | |
| | | let index = '' |
| | | let _activeIndex = null |
| | | if (selectedRowKeys.length > 0) { |
| | | selectedRowKeys = selectedRowKeys.filter(key => !data[key].$disabled) |
| | | index = selectedRowKeys.slice(-1)[0] |
| | | } |
| | | |
| | |
| | | |
| | | this.setState({ selectedRowKeys, activeIndex: _activeIndex }) |
| | | |
| | | let selects = this.props.data.filter((item, _index) => selectedRowKeys.includes(_index) && !item.$disabled) |
| | | let selects = data.filter((item, _index) => selectedRowKeys.includes(_index) && !item.$disabled) |
| | | |
| | | this.props.chgSelectData(selects) |
| | | if (setting.$hasSyncModule) { |
| | |
| | | } else { |
| | | type = '' |
| | | icon = btn.icon || '' |
| | | label = (loadingNumber && !loadingTotal ? `(${loadingNumber})` : '') + btn.label |
| | | label = btn.label |
| | | className = 'mk-btn mk-' + btn.class |
| | | } |
| | | |
| | | if (loadingNumber && !loadingTotal && btn.$toolbtn && (!btn.show || btn.show === 'button')) { |
| | | label = (loadingNumber && !loadingTotal ? `(${loadingNumber})` : '') + btn.label |
| | | } |
| | | |
| | | return ( |
| | | <> |
| | | <Button |
| | |
| | | _resolve() |
| | | }) |
| | | } else { // 超出20个请求时循环执行 |
| | | if (btn.progress === 'progressbar') { |
| | | if (btn.progress === 'progressbar' && btn.$toolbtn) { |
| | | this.setState({ |
| | | loadingTotal: params.length |
| | | }) |
| | |
| | | }) |
| | | } |
| | | |
| | | if (_params.length > 1 && btn.progress === 'progressbar') { |
| | | if (_params.length > 1 && btn.progress === 'progressbar' && btn.$toolbtn) { |
| | | this.setState({ |
| | | loadingTotal: _params.length |
| | | }) |
| | |
| | | params = this.getInnerParam(data, formdata) |
| | | } |
| | | |
| | | if (params.length > 1 && btn.progress === 'progressbar') { |
| | | if (params.length > 1 && btn.progress === 'progressbar' && btn.$toolbtn) { |
| | | this.setState({ |
| | | loadingTotal: params.length |
| | | }) |
| | |
| | | } else { |
| | | type = '' |
| | | icon = btn.icon || '' |
| | | label = (loadingNumber && !loadingTotal ? `(${loadingNumber})` : '') + btn.label |
| | | label = btn.label |
| | | className = 'mk-btn mk-' + btn.class |
| | | } |
| | | |
| | | if (loadingNumber && !loadingTotal && btn.$toolbtn && (!btn.show || btn.show === 'button')) { |
| | | label = (loadingNumber && !loadingTotal ? `(${loadingNumber})` : '') + btn.label |
| | | } |
| | | |
| | | return <div style={{display: 'inline-block'}} onClick={(e) => e.stopPropagation()}> |
| | | <Button |
| | | type={type} |
| | |
| | | * |
| | | */ |
| | | onSelectChange = selectedRowKeys => { |
| | | const { setting } = this.props |
| | | const { setting, data } = this.props |
| | | |
| | | let index = '' |
| | | let _activeIndex = null |
| | | if (selectedRowKeys.length > 0) { |
| | | selectedRowKeys = selectedRowKeys.filter(key => !data[key].$disabled) |
| | | index = selectedRowKeys.slice(-1)[0] |
| | | } |
| | | |
| | |
| | | |
| | | this.setState({ selectedRowKeys, activeIndex: _activeIndex }) |
| | | |
| | | let selects = this.props.data.filter((item, _index) => selectedRowKeys.includes(_index) && !item.$disabled) |
| | | let selects = data.filter((item, _index) => selectedRowKeys.includes(_index) && !item.$disabled) |
| | | |
| | | this.props.chgSelectData(selects) |
| | | } |