From 9e100b8804d43d9f7559cdf41b67ed7475a809b8 Mon Sep 17 00:00:00 2001 From: king <18310653075@163.com> Date: 星期三, 07 四月 2021 18:30:58 +0800 Subject: [PATCH] 2021-04-07 --- src/menu/components/card/data-card/index.jsx | 18 ++++-------------- 1 files changed, 4 insertions(+), 14 deletions(-) diff --git a/src/menu/components/card/data-card/index.jsx b/src/menu/components/card/data-card/index.jsx index 1ce4fff..7b12967 100644 --- a/src/menu/components/card/data-card/index.jsx +++ b/src/menu/components/card/data-card/index.jsx @@ -1,6 +1,5 @@ import React, {Component} from 'react' import PropTypes from 'prop-types' -import { connect } from 'react-redux' import { is, fromJS } from 'immutable' import { Icon, Popover, Modal, Pagination, notification } from 'antd' @@ -42,6 +41,7 @@ const { card } = this.props if (card.isNew) { + let ismob = sessionStorage.getItem('appType') === 'mob' let _card = { uuid: card.uuid, type: card.type, @@ -66,7 +66,7 @@ btnlog: [], subcards: [{ uuid: Utils.getuuid(), - setting: { width: 6, type: 'simple'}, + setting: { width: ismob ? 24 : 6, type: 'simple'}, style: { borderWidth: '1px', borderColor: '#e8e8e8', paddingTop: '15px', paddingBottom: '15px', paddingLeft: '15px', paddingRight: '15px', @@ -129,7 +129,7 @@ } shouldComponentUpdate (nextProps, nextState) { - return !is(fromJS(this.state), fromJS(nextState)) || (!this.props.menu && nextProps.menu) + return !is(fromJS(this.state), fromJS(nextState)) } /** @@ -424,14 +424,4 @@ } } -const mapStateToProps = (state) => { - return { - menu: state.customMenu - } -} - -const mapDispatchToProps = () => { - return {} -} - -export default connect(mapStateToProps, mapDispatchToProps)(DataCardEditComponent) \ No newline at end of file +export default DataCardEditComponent \ No newline at end of file -- Gitblit v1.8.0