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/data-card/index.jsx | 12 ++++++++---- 1 files changed, 8 insertions(+), 4 deletions(-) diff --git a/src/menu/components/carousel/data-card/index.jsx b/src/menu/components/carousel/data-card/index.jsx index d105c62..aeb94fb 100644 --- a/src/menu/components/carousel/data-card/index.jsx +++ b/src/menu/components/carousel/data-card/index.jsx @@ -47,7 +47,7 @@ name: card.name, subtype: card.subtype, setting: { interType: 'system' }, - wrap: { name: card.name, width: card.width || 24, autoplay: 'false', dots: 'true' }, + wrap: { name: card.name, width: card.width || 24, autoplay: 'false', dots: 'true', height: '300px' }, style: { borderWidth: '1px', borderColor: '#e8e8e8', marginTop: '8px', marginBottom: '8px', height: '300px' }, columns: [], scripts: [], @@ -195,7 +195,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) => { @@ -207,11 +207,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