From 7a5502884c004b829bf881dc304215a16755de6c Mon Sep 17 00:00:00 2001 From: king <18310653075@163.com> Date: 星期二, 01 十一月 2022 14:21:04 +0800 Subject: [PATCH] 2022-11-01 --- src/menu/components/carousel/prop-card/index.jsx | 12 ++++++++---- 1 files changed, 8 insertions(+), 4 deletions(-) diff --git a/src/menu/components/carousel/prop-card/index.jsx b/src/menu/components/carousel/prop-card/index.jsx index 9163629..92d8dd5 100644 --- a/src/menu/components/carousel/prop-card/index.jsx +++ b/src/menu/components/carousel/prop-card/index.jsx @@ -48,7 +48,7 @@ name: card.name, subtype: card.subtype, setting: { }, - wrap: { name: card.name, width: card.width || 24, datatype: 'static', autoplay: 'false', dots: 'true' }, + wrap: { name: card.name, width: card.width || 24, datatype: 'static', autoplay: 'false', dots: 'true', height: '300px' }, style: { borderWidth: '1px', borderColor: '#e8e8e8', marginLeft: '0px', marginRight: '0px', marginTop: '8px', marginBottom: '8px', height: '300px' }, columns: [], scripts: [], @@ -215,7 +215,7 @@ changeStyle = () => { const { card } = this.state - MKEmitter.emit('changeStyle', ['height', 'background', 'border', 'padding', 'margin', 'shadow'], card.style, this.getStyle) + MKEmitter.emit('changeStyle', ['background', 'border', 'padding', 'margin', 'shadow'], card.style, this.getStyle) } getStyle = (style) => { @@ -272,11 +272,15 @@ getWrapForms = () => { const { card } = this.state - return getWrapForm(card.wrap, card.subtype) + return getWrapForm({...card.wrap, height: card.style.height}, card.subtype) } updateWrap = (res) => { - this.updateComponent({...this.state.card, wrap: res}) + let _card = {...this.state.card, wrap: res} + + _card.style.height = res.height + + this.updateComponent(_card) } clickComponent = (e) => { -- Gitblit v1.8.0