亚洲在线久爱草,狠狠天天香蕉网,天天搞日日干久草,伊人亚洲日本欧美

為了賬號安全,請及時綁定郵箱和手機立即綁定
已解決430363個問題,去搜搜看,總會有你想問的

Popover組件,ios上點擊遮罩層不能關閉氣泡,安卓上測可以

Popover組件,ios上點擊遮罩層不能關閉氣泡,安卓上測可以

楊__羊羊 2019-03-15 16:15:37
antd里的Popover組件,ios上點擊遮罩層不能關閉氣泡,目前安卓上測試可以,為了兼容ios難道只有手寫氣泡組件嗎...多麻煩啊const Item = Popover.Item;class More extends React.Component {    constructor(props) {        super(props);        this.state = {            visible: false,            selected: '',        };    };    onSelect = (opt) => {        this.setState({            visible: false,            selected: opt.props.value,        });        if (opt.props.value == '') {            ///        } else if (opt.props.value == '') {            ///        }    };    handleVisibleChange = (visible) => {        this.setState({            visible,        });    };    render() {        let offsetX = -((document.querySelector('body').offsetWidth) * 0.125) + 9;        return (            <div>                <Popover                     mask                    overlayClassName="fortest"                    overlayStyle={{ color: 'currentColor' }}                    visible={this.state.visible}                    className="c-more"                    overlay={[                        (<Item key="4" value="code" icon={<Icon type={require('./image/QrCode1.svg')} size="xs" />} data-seed="logId">                            二維碼                        </Item>),                        (<Item key="6" value="quit" icon={<Icon type={require('./image/PullOut1.svg')} size="xs" />}>                             <span style={{ marginRight: 5 }}>退出</span>                        </Item>),                    ]}                    align={{                        overflow: { adjustY: 100, adjustX: 0 },                        offset: [offsetX, -180],                    }}                    onVisibleChange={this.handleVisibleChange}                    onSelect={this.onSelect}                >                    <div className="c-more-button"                        icon={<Icon type={require('./image/more1.svg')} size="md" />}                    >                    </div>                </Popover>            </div>        );    }}
查看完整描述

1 回答

  • 1 回答
  • 0 關注
  • 851 瀏覽
慕課專欄
更多

添加回答

舉報

0/150
提交
取消
微信客服

購課補貼
聯系客服咨詢優惠詳情

幫助反饋 APP下載

慕課網APP
您的移動學習伙伴

公眾號

掃描二維碼
關注慕課網微信公眾號