From 8f6b3d26bde4e22773cc53386dfbae669a7472ed Mon Sep 17 00:00:00 2001 From: king <18310653075@163.com> Date: 星期二, 13 十月 2020 09:16:21 +0800 Subject: [PATCH] 2020-10-13 --- src/menu/components/card/cardcellcomponent/elementform/index.jsx | 17 ++++++++++++----- 1 files changed, 12 insertions(+), 5 deletions(-) diff --git a/src/menu/components/card/cardcellcomponent/elementform/index.jsx b/src/menu/components/card/cardcellcomponent/elementform/index.jsx index 8f9719d..2a4422b 100644 --- a/src/menu/components/card/cardcellcomponent/elementform/index.jsx +++ b/src/menu/components/card/cardcellcomponent/elementform/index.jsx @@ -9,11 +9,11 @@ import './index.scss' const cardTypeOptions = { - text: ['eleType', 'datatype', 'value', 'format', 'fontSize', 'fontWeight', 'width', 'height', 'align', 'padding', 'prefix', 'postfix'], - number: ['eleType', 'datatype', 'value', 'format', 'fontSize', 'fontWeight', 'width', 'height', 'align', 'padding', 'prefix', 'postfix'], + text: ['eleType', 'datatype', 'format', 'fontSize', 'fontWeight', 'width', 'height', 'align', 'padding', 'prefix', 'postfix'], + number: ['eleType', 'datatype', 'format', 'fontSize', 'fontWeight', 'width', 'height', 'align', 'padding', 'prefix', 'postfix'], picture: ['eleType', 'datatype', 'width', 'lenWidRadio', 'radius', 'padding', 'url'], - icon: ['eleType', 'icon', 'fontSize', 'width', 'height', 'align', 'padding', 'tooltip'], - link: ['eleType', 'datatype', 'value', 'labelfield', 'fontSize', 'width', 'height', 'align', 'padding', 'prefix'], + icon: ['eleType', 'icon', 'datatype', 'fontSize', 'width', 'align', 'padding'], + link: ['eleType', 'datatype', 'labelfield', 'fontSize', 'width', 'height', 'align', 'padding', 'prefix'], slider: ['eleType', 'field', 'width', 'color', 'padding', 'maxValue'], splitline: ['eleType', 'color', 'width', 'padding'], } @@ -36,7 +36,6 @@ UNSAFE_componentWillMount () { const { card, config } = this.props - let _options = this.getOptions(card.eleType, card.datatype) this.setState({ @@ -83,6 +82,14 @@ if (['text', 'number', 'picture', 'link'].includes(eleType)) { if (datatype === 'dynamic') { _options.push('field') + } else if (eleType !== 'picture') { + _options.push('value') + } + } else if (eleType === 'icon') { + if (datatype === 'dynamic') { + _options.push('field') + } else { + _options.push('tooltip') } } -- Gitblit v1.8.0