多应用+插件架构,代码干净,二开方便,首家独创一键云编译技术,文档视频完善,免费商用码云13.8K 广告
设计页 搜索areaTimeLineOptionTemplate 如图添加以下代码 ![](https://img.kancloud.cn/eb/29/eb294f568846a1ece911a23e3d46c324_747x654.png) ``` controlStyle:{ show: false, showNextBtn: false, showPrevBtn: false, normal: { color: '#aaa', borderColor: '#aaa' }, emphasis: { color: '#aaa', borderColor: '#aaa' } }, ``` 搜索 时间轴播放 添加以下配置项代码 ![](https://img.kancloud.cn/8a/dc/8adcf1dd9fd37278cc8103084271310a_691x1346.png) ``` { title: 'Next按钮', type: "switch", bind: "showNextBtnShow", on: vsLang.on, off: vsLang.off, show: function() { return component.config.showControl == true }, }, { title: 'Prev按钮', type: "switch", bind: "showPrevBtnShow", on: vsLang.on, off: vsLang.off, show: function() { return component.config.showControl == true }, }, { title: '按钮颜色', type: "colorpicker", bind: "tBtnColor", show: function() { return component.config.showControl == true }, }, { title: '按钮颜色(hover)', type: "colorpicker", bind: "tBtnHoverColor", show: function() { return component.config.showControl == true }, }, ``` 搜索component.config.showControl添加下面 监听 如图 ![](https://img.kancloud.cn/b0/29/b029f6c3f93aacddb63d5fba38f43720_889x452.png) ``` scope.$watch("component.config.showNextBtnShow", function (newValue, oldValue) { if (newValue != null && newValue !== oldValue) { scope.$broadcast(event_refreshChartView, {}) } }); scope.$watch("component.config.showPrevBtnShow", function (newValue, oldValue) { if (newValue != null && newValue !== oldValue) { scope.$broadcast(event_refreshChartView, {}) } }); scope.$watch("component.config.tBtnColor", function (newValue, oldValue) { if (newValue != null && newValue !== oldValue) { scope.$broadcast(event_refreshChartView, {}) } }); scope.$watch("component.config.tBtnHoverColor", function (newValue, oldValue) { if (newValue != null && newValue !== oldValue) { scope.$broadcast(event_refreshChartView, {}) } }); ``` 搜索option.baseOption.timeline.controlStyle.show 下面 添加 ![](https://img.kancloud.cn/bf/2b/bf2b02c587e69e50db8423bfe5b96272_863x546.png) ``` if (component.config.showNextBtnShow != null) { option.baseOption.timeline.controlStyle.showNextBtn = component.config.showNextBtnShow; } if (component.config.showPrevBtnShow != null) { option.baseOption.timeline.controlStyle.showPrevBtn = component.config.showPrevBtnShow; } if (component.config.tBtnColor != null) { option.baseOption.timeline.controlStyle.normal.color = component.config.tBtnColor; option.baseOption.timeline.controlStyle.normal.borderColor = component.config.tBtnColor; } if (component.config.tBtnHoverColor != null) { option.baseOption.timeline.controlStyle.emphasis.color = component.config.tBtnHoverColor; option.baseOption.timeline.controlStyle.emphasis.borderColor = component.config.tBtnHoverColor; } ``` 分享页不需要改