From 79912db1a0f20a0bad10dd8afb63f8d73fbed5d8 Mon Sep 17 00:00:00 2001 From: king <18310653075@163.com> Date: 星期四, 09 二月 2023 18:43:39 +0800 Subject: [PATCH] 2023-02-09 --- src/tabviews/custom/components/card/prop-card/index.scss | 5 -- src/menu/components/search/main-search/dragsearch/index.jsx | 8 +++- src/tabviews/custom/components/card/prop-card/index.jsx | 6 +- src/templates/sharecomponent/searchcomponent/settingform/index.jsx | 12 ++++++ src/tabviews/custom/components/card/cardItem/index.scss | 6 +++ src/tabviews/zshare/topSearch/index.jsx | 10 ++++- src/tabviews/custom/components/card/cardItem/index.jsx | 6 ++- src/tabviews/custom/components/card/data-card/index.scss | 5 -- src/menu/components/search/main-search/options.jsx | 11 +++++ src/tabviews/custom/components/card/data-card/index.jsx | 6 +- src/templates/sharecomponent/searchcomponent/dragsearch/index.jsx | 8 +++- 11 files changed, 60 insertions(+), 23 deletions(-) diff --git a/src/menu/components/search/main-search/dragsearch/index.jsx b/src/menu/components/search/main-search/dragsearch/index.jsx index 5da648f..c290b29 100644 --- a/src/menu/components/search/main-search/dragsearch/index.jsx +++ b/src/menu/components/search/main-search/dragsearch/index.jsx @@ -135,6 +135,10 @@ let labelwidth = setting.searchLwidth !== undefined ? setting.searchLwidth : 33.3 let advanceType = setting.advanceType || 'modal' + let style = {} + if (setting.borderRadius) { + style.borderRadius = setting.borderRadius + } return ( <div ref={drop} className="ant-row"> @@ -161,8 +165,8 @@ <div className="ant-row ant-form-item" style={{lineHeight: '40px', height: '55px', marginBottom: 0}}> <div className="ant-col ant-form-item-label" style={{width: labelwidth + '%'}}></div> <div className="ant-col ant-form-item-control-wrapper" style={{whiteSpace: 'nowrap'}}> - <Button type="primary">鎼滅储</Button> - <Button style={{ marginLeft: 8 }}>閲嶇疆</Button> + <Button style={style} type="primary">鎼滅储</Button> + <Button style={{ marginLeft: 8, ...style }}>閲嶇疆</Button> <div style={{position: 'absolute', top: 0, bottom: 0, left: 0, right: 0}}></div> </div> </div> diff --git a/src/menu/components/search/main-search/options.jsx b/src/menu/components/search/main-search/options.jsx index 880a5a7..f9324cf 100644 --- a/src/menu/components/search/main-search/options.jsx +++ b/src/menu/components/search/main-search/options.jsx @@ -117,9 +117,20 @@ options: [ {value: 'true', label: '鏄剧ず'}, {value: 'false', label: '闅愯棌'}, + ], + controlFields: [ + {field: 'borderRadius', values: ['true']} ] }, { + type: 'number', + field: 'borderRadius', + label: '鎸夐挳鍦嗚', + initval: wrap.borderRadius || '', + tooltip: '鎼滅储鍜岄噸缃寜閽殑鍦嗚銆�', + required: false + }, + { type: 'radio', field: 'permission', label: '鏉冮檺楠岃瘉', diff --git a/src/tabviews/custom/components/card/cardItem/index.jsx b/src/tabviews/custom/components/card/cardItem/index.jsx index 6e46720..f6cb62f 100644 --- a/src/tabviews/custom/components/card/cardItem/index.jsx +++ b/src/tabviews/custom/components/card/cardItem/index.jsx @@ -41,8 +41,10 @@ } openView = () => { - const { card, data, cards } = this.props + const { card, data, cards, onClick } = this.props + onClick && onClick() + if (!card.setting.click || data.$disabled) return if (card.setting.click === 'menus' && cards.subtype === 'datacard' && card.$cardType !== 'extendCard') { @@ -176,7 +178,7 @@ } return ( - <div className={'card-item-box ' + (card.setting.btnControl || '')} style={style} onClick={this.openView} onDoubleClick={this.doubleClick}> + <div className={'card-item-box ' + (card.setting.btnControl || '') + (card.setting.click ? ' mk-pointer' : '')} style={style} onClick={this.openView} onDoubleClick={this.doubleClick}> {bg} {children} <CardCellComponent data={data} cards={cards} cardCell={card} elements={card.elements}/> diff --git a/src/tabviews/custom/components/card/cardItem/index.scss b/src/tabviews/custom/components/card/cardItem/index.scss index 0879249..c6f2f31 100644 --- a/src/tabviews/custom/components/card/cardItem/index.scss +++ b/src/tabviews/custom/components/card/cardItem/index.scss @@ -49,6 +49,12 @@ background-repeat: inherit; } } +.card-item-box.mk-pointer { + cursor: pointer; +} +.mk-disabled .card-item-box.mk-pointer { + cursor: not-allowed; +} .card-item-box:hover { .back-side.up, .back-side.down, .back-side.left, .back-side.right { transform: translate(0, 0); diff --git a/src/tabviews/custom/components/card/data-card/index.jsx b/src/tabviews/custom/components/card/data-card/index.jsx index edc216a..23d958a 100644 --- a/src/tabviews/custom/components/card/data-card/index.jsx +++ b/src/tabviews/custom/components/card/data-card/index.jsx @@ -973,7 +973,7 @@ </Col> ))} {data && data.map((item, index) => { - let className = card.setting.click ? 'mk-card pointer ' : 'mk-card ' + let className = 'mk-card ' if (config.wrap.parity === 'true') { if (index % 2 === 1) { className += 'mk-parity-bg ' @@ -988,8 +988,8 @@ } return ( - <Col className={className} key={index} span={card.setting.width} onClick={() => {this.changeCard(index, item)}}> - <CardItem card={card} cards={config} data={item}> + <Col className={className} key={index} span={card.setting.width}> + <CardItem card={card} cards={config} data={item} onClick={() => {this.changeCard(index, item)}}> <span className="circle-select"></span> </CardItem> </Col> diff --git a/src/tabviews/custom/components/card/data-card/index.scss b/src/tabviews/custom/components/card/data-card/index.scss index 9325019..f329033 100644 --- a/src/tabviews/custom/components/card/data-card/index.scss +++ b/src/tabviews/custom/components/card/data-card/index.scss @@ -50,9 +50,6 @@ } .card-row-list { flex: 10; - .mk-card.pointer { - cursor: pointer; - } } .card-row-list.flex-layout { display: flex; @@ -229,7 +226,7 @@ background: var(--mk-sys-color); } .card-item-box { - width: 100%; + // width: 100%; display: flex; } .card-cell-list { diff --git a/src/tabviews/custom/components/card/prop-card/index.jsx b/src/tabviews/custom/components/card/prop-card/index.jsx index 2ad4a02..531d10a 100644 --- a/src/tabviews/custom/components/card/prop-card/index.jsx +++ b/src/tabviews/custom/components/card/prop-card/index.jsx @@ -499,14 +499,14 @@ <NormalHeader config={config}/> <Row className={`card-row-list data-zoom ${config.wrap.wrapClass}`}> {config.subcards.map((item, index) => { - let className = item.setting.click ? 'mk-card pointer ' : 'mk-card ' + let className = 'mk-card ' if (activeKey === index) { className += 'active' } return ( - <Col className={className} key={index} span={item.setting.width || 6} offset={item.offset || 0} onClick={() => {this.changeCard(index, item)}}> - <CardItem card={item} cards={config} data={data}/> + <Col className={className} key={index} span={item.setting.width || 6} offset={item.offset || 0}> + <CardItem card={item} cards={config} data={data} onClick={() => {this.changeCard(index, item)}}/> </Col> ) })} diff --git a/src/tabviews/custom/components/card/prop-card/index.scss b/src/tabviews/custom/components/card/prop-card/index.scss index f930a0b..87840aa 100644 --- a/src/tabviews/custom/components/card/prop-card/index.scss +++ b/src/tabviews/custom/components/card/prop-card/index.scss @@ -12,11 +12,6 @@ clear: both; } - .card-row-list { - .mk-card.pointer { - cursor: pointer; - } - } .card-row-list.flex-layout { display: flex; width: 100%; diff --git a/src/tabviews/zshare/topSearch/index.jsx b/src/tabviews/zshare/topSearch/index.jsx index 85fbb90..8f1b7d4 100644 --- a/src/tabviews/zshare/topSearch/index.jsx +++ b/src/tabviews/zshare/topSearch/index.jsx @@ -77,6 +77,7 @@ _setting.labelwidth = config.wrap.searchLwidth !== undefined ? config.wrap.searchLwidth : 33.3 _setting.labelCol = {style: {width: _setting.labelwidth + '%'}} _setting.wrapperCol = {style: {width: (100 - _setting.labelwidth) + '%'}} + _setting.borderRadius = config.wrap.borderRadius } _setting.style = null @@ -552,6 +553,11 @@ }) if (setting.show || setting.showAdv) { + let style = {} + if (setting.borderRadius) { + style.borderRadius = setting.borderRadius + } + fields.push( <Col span={setting.ratio} style={{ whiteSpace: 'nowrap' }} className="mk-search-col search-button" key="actions"> <Form.Item @@ -560,10 +566,10 @@ labelCol={setting.labelCol} wrapperCol={setting.wrapperCol} > - {setting.show ? <Button type="primary" onClick={this.handleSubmit}> + {setting.show ? <Button style={style} type="primary" onClick={this.handleSubmit}> 鎼滅储 </Button> : null} - {setting.show ? <Button style={{ marginLeft: 8 }} onClick={this.handleReset}> + {setting.show ? <Button style={{ marginLeft: 8, ...style }} onClick={this.handleReset}> 閲嶇疆 </Button> : null} {setting.showAdv ? <Button className={visible ? 'visible' : ''} type="link" onClick={this.handleAdvance}> diff --git a/src/templates/sharecomponent/searchcomponent/dragsearch/index.jsx b/src/templates/sharecomponent/searchcomponent/dragsearch/index.jsx index 9f92dd0..fdd7f52 100644 --- a/src/templates/sharecomponent/searchcomponent/dragsearch/index.jsx +++ b/src/templates/sharecomponent/searchcomponent/dragsearch/index.jsx @@ -139,6 +139,10 @@ let radio = setting.searchRatio || 6 let labelwidth = setting.searchLwidth !== undefined ? setting.searchLwidth : 33.3 let advanceType = setting.advanceType || 'modal' + let style = {} + if (setting.borderRadius) { + style.borderRadius = setting.borderRadius + } return ( <div ref={drop} className="ant-row"> @@ -170,8 +174,8 @@ </div> } trigger="hover"> <div className="ant-col ant-form-item-control-wrapper"> - <Button type="primary">鎼滅储</Button> - <Button style={{ marginLeft: 8 }}>閲嶇疆</Button> + <Button style={style} type="primary">鎼滅储</Button> + <Button style={{ marginLeft: 8, ...style }}>閲嶇疆</Button> <div style={{position: 'absolute', top: 0, bottom: 0, left: 0, right: 0}}></div> </div> </Popover> diff --git a/src/templates/sharecomponent/searchcomponent/settingform/index.jsx b/src/templates/sharecomponent/searchcomponent/settingform/index.jsx index a131ad6..1adb220 100644 --- a/src/templates/sharecomponent/searchcomponent/settingform/index.jsx +++ b/src/templates/sharecomponent/searchcomponent/settingform/index.jsx @@ -140,6 +140,18 @@ })(<InputNumber min={0} max={100} precision={1} onPressEnter={this.props.inputSubmit}/>)} </Form.Item> </Col> + <Col span={12}> + <Form.Item label={ + <Tooltip placement="topLeft" title="鎼滅储鍜岄噸缃寜閽殑鍦嗚銆�"> + <QuestionCircleOutlined className="mk-form-tip" /> + 鎸夐挳鍦嗚 + </Tooltip> + }> + {getFieldDecorator('borderRadius', { + initialValue: setting.borderRadius || '', + })(<InputNumber min={0} precision={0} onPressEnter={this.props.inputSubmit}/>)} + </Form.Item> + </Col> </Row> </Form> ) -- Gitblit v1.8.0