From 0011ec870d3d1fe9d77a4941358c84acf8632e5e Mon Sep 17 00:00:00 2001 From: king <18310653075@163.com> Date: 星期三, 18 五月 2022 22:51:51 +0800 Subject: [PATCH] 2022-05-18 --- src/menu/components/chart/antv-bar/chartcompile/formconfig.jsx | 34 +++++++++++++++++++--------------- 1 files changed, 19 insertions(+), 15 deletions(-) diff --git a/src/menu/components/chart/antv-bar/chartcompile/formconfig.jsx b/src/menu/components/chart/antv-bar/chartcompile/formconfig.jsx index 784141f..0b0c513 100644 --- a/src/menu/components/chart/antv-bar/chartcompile/formconfig.jsx +++ b/src/menu/components/chart/antv-bar/chartcompile/formconfig.jsx @@ -258,6 +258,8 @@ }]) } + let _label = card.label || 'false' + return [ { type: 'radio', @@ -389,7 +391,7 @@ type: labelOptions.length > 20 ? 'select' : 'radio', key: 'label', label: '鏍囨敞', - initVal: card.label || 'false', + initVal: _label, tooltip: '鍥惧舰鑺傜偣澶勭殑鏁板�笺��', required: false, options: labelOptions @@ -400,6 +402,7 @@ initVal: card.labelColor || 'system', tooltip: '浣跨敤绯荤粺鑹叉椂锛屼娇鐢ㄨ壊绯婚�夐」璁剧疆鐨勭郴缁熼鑹诧紝浣跨敤鑷畾涔変负棰滆壊璁剧疆涓畾涔夌殑鍥惧舰棰滆壊銆�', required: false, + hidden: _label !== 'true', options: [{ value: 'system', text: '绯荤粺' @@ -407,20 +410,21 @@ value: 'custom', text: '鑷畾涔�' }] - // }, { - // type: 'radio', - // key: 'offset', - // label: '鏍囨敞浣嶇疆', - // initVal: card.offset || 'outer', - // required: false, - // options: [{ - // value: 'outer', - // text: '澶栭儴' - // }, { - // value: 'inner', - // text: '鍐呴儴' - // }], - // forbid: card.chartType !== 'bar' + }, { + type: 'radio', + key: 'labelValue', + label: '鏍囨敞鍊�', + initVal: card.labelValue || 'default', + tooltip: '鏍囨敞鍊肩殑鏄剧ず瑙勫垯銆�', + required: false, + hidden: _label === 'false', + options: [{ + value: 'default', + text: '榛樿' + }, { + value: 'zero', + text: '闅愯棌 0 鍊�' + }], }, { type: 'radio', key: 'adjust', -- Gitblit v1.8.0