diff --git a/src/components/QrItem.js b/src/components/QrItem.js index 272937b..0034d5d 100644 --- a/src/components/QrItem.js +++ b/src/components/QrItem.js @@ -20,6 +20,10 @@ class QrItem extends React.Component { this.props.onSelected(this.props.index); } + shouldComponentUpdate(nextProps, nextState, nextContext) { + return nextProps.selected || this.props.selected + } + render() { return (
下载二维码
+下载二维码 - {styleList[this.state.selectedIndex].value}