mirror of
https://gitee.com/baidu/amis.git
synced 2024-12-04 21:08:55 +08:00
fix(amis-editor): chart配置/同时放开api和config配置
This commit is contained in:
parent
4f07627051
commit
841e209b27
@ -209,6 +209,7 @@ export class ChartPlugin extends BasePlugin {
|
|||||||
{
|
{
|
||||||
title: '数据设置',
|
title: '数据设置',
|
||||||
body: [
|
body: [
|
||||||
|
/*
|
||||||
{
|
{
|
||||||
type: 'select',
|
type: 'select',
|
||||||
name: 'chartDataType',
|
name: 'chartDataType',
|
||||||
@ -233,10 +234,10 @@ export class ChartPlugin extends BasePlugin {
|
|||||||
}
|
}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
|
*/
|
||||||
getSchemaTpl('apiControl', {
|
getSchemaTpl('apiControl', {
|
||||||
label: '数据接口',
|
label: '数据接口',
|
||||||
visibleOn: 'chartDataType === "dataApi"',
|
// visibleOn: 'chartDataType === "dataApi"',
|
||||||
description:
|
description:
|
||||||
'接口可以返回echart图表完整配置,或者图表数据,建议返回图表数据映射到 Echarts 配置中'
|
'接口可以返回echart图表完整配置,或者图表数据,建议返回图表数据映射到 Echarts 配置中'
|
||||||
}),
|
}),
|
||||||
@ -244,7 +245,8 @@ export class ChartPlugin extends BasePlugin {
|
|||||||
getSchemaTpl('switch', {
|
getSchemaTpl('switch', {
|
||||||
label: '初始是否拉取',
|
label: '初始是否拉取',
|
||||||
name: 'initFetch',
|
name: 'initFetch',
|
||||||
visibleOn: 'chartDataType === "dataApi" && data.api',
|
// visibleOn: 'chartDataType === "dataApi" && data.api',
|
||||||
|
visibleOn: 'data.api',
|
||||||
pipeIn: defaultValue(true)
|
pipeIn: defaultValue(true)
|
||||||
}),
|
}),
|
||||||
|
|
||||||
@ -253,13 +255,14 @@ export class ChartPlugin extends BasePlugin {
|
|||||||
label: '定时刷新间隔',
|
label: '定时刷新间隔',
|
||||||
type: 'input-number',
|
type: 'input-number',
|
||||||
step: 500,
|
step: 500,
|
||||||
visibleOn: 'chartDataType === "dataApi" && data.api',
|
// visibleOn: 'chartDataType === "dataApi" && data.api',
|
||||||
|
visibleOn: 'data.api',
|
||||||
description: '设置后将自动定时刷新,最小3000, 单位 ms'
|
description: '设置后将自动定时刷新,最小3000, 单位 ms'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: 'config',
|
name: 'config',
|
||||||
asFormItem: true,
|
asFormItem: true,
|
||||||
visibleOn: 'chartDataType === "json"',
|
// visibleOn: 'chartDataType === "json"',
|
||||||
component: ChartConfigEditor,
|
component: ChartConfigEditor,
|
||||||
// type: 'json-editor',
|
// type: 'json-editor',
|
||||||
label: tipedLabel(
|
label: tipedLabel(
|
||||||
|
Loading…
Reference in New Issue
Block a user