amis/examples/components/echarts/Title.tsx

43 lines
806 B
TypeScript
Raw Normal View History

2020-10-29 19:52:25 +08:00
/**
* @file Echarts title
*/
2020-10-30 17:58:23 +08:00
import {
textStyleControls,
buildOptions,
commonStyle,
2020-10-30 17:58:23 +08:00
viewport,
createHierarchy
} from './Common';
//@ts-ignore
const titleOptions = __inline('./option-parts/option.title.json');
2020-10-30 17:58:23 +08:00
export default {
type: 'tabs',
tabs: [
{
title: '内容',
className: 'echarts-tab',
2020-11-01 22:35:09 +08:00
controls: buildOptions('title', titleOptions)
2020-10-30 17:58:23 +08:00
},
{
title: '位置',
2020-11-01 22:35:09 +08:00
controls: [viewport('title', '标题')]
2020-10-30 17:58:23 +08:00
},
{
title: '样式',
2020-11-01 22:35:09 +08:00
controls: commonStyle('title', '标题')
2020-10-30 17:58:23 +08:00
},
{
title: '文字样式',
controls: [
createHierarchy('title', [
2020-11-01 22:35:09 +08:00
textStyleControls('title.textStyle', '主标题'),
textStyleControls('title.subtextStyle', '副标题')
2020-10-30 17:58:23 +08:00
])
]
}
]
};