提交 516f18ea 编写于 作者: B BingBlog

add expandpael arrow

上级 d04e0f1a
/**
* @file mock data
* @author autoresponse
*/
/* eslint-disable fecs-camelcase */
/**
* 获取 mock 响应数据
*
* @param {string} path 请求路径名
* @param {Object} queryParam 查询参数信息
* @param {Object} postParam post 的查询参数信息
* @return {Object}
*/
module.exports = function (path, queryParam, postParam) {
return {
// 可以通过该属性来设置响应的延时,也可以设为值为'0,100',表示随机 0-100ms 的延时,默认 0
_timeout: 0,
// 通过该状态来设置响应的 http 的状态码,默认 200
_status: 200,
// 对于要响应的 json 数据可以统一放在该字段里,也可以不使用该字段,直接跟 _xx 属性平级放
_data: []
};
};
/* eslint-enable fecs-camelcase */
......@@ -83,6 +83,7 @@ export default {
this.watch('orginData', orginData => {
this.setChartData();
this.setChartsOutlier();
this.setChartHorizon();
});
this.watch('smoothing', smoothing => {
......@@ -95,7 +96,7 @@ export default {
});
this.watch('horizontal', horizontal => {
this.setChartHorizon(horizontal);
this.setChartHorizon();
});
this.watch('runs', runs => {
......@@ -318,7 +319,7 @@ export default {
startValue = millisecond;
}
// relative time, millisecond to hours
d[4] = Math.floor(millisecond - startValue) / (60 * 60 * 1000);
d[4] = Math.floor(millisecond - startValue);
if (!isFinite(nextVal)) {
d[3] = nextVal;
} else {
......@@ -391,7 +392,8 @@ export default {
},
// chart horizontal options methods and functions ---- start
setChartHorizon(horizontal) {
setChartHorizon() {
let horizontal = this.data.get('horizontal');
let seriesOption = this.myChart.getOption().series;
let encodeSeries = val => {
return {
......
......@@ -5,6 +5,10 @@
on-click="handleHeadClick()"
>
<span>{{title}}</span>
<span class="visaul-dl-expand-head-info">
<ui-icon class="visaul-dl-expand-head-arrow" size="20">{{iconName}}</ui-icon>
<span class="visaul-dl-expand-head-num">({{info}})</span>
</span>
</h3>
<div
san-if="{{isShow}}"
......@@ -15,7 +19,17 @@
</div>
</template>
<script>
import Icon from 'san-mui/Icon';
export default {
components: {
'ui-icon': Icon
},
computed: {
iconName() {
let isShow = this.data.get('isShow');
return isShow ? 'expand_less' : 'expand_more';
}
},
initData() {
return {
isShow: false
......@@ -38,6 +52,16 @@ export default {
height 50px
padding 0 20px
cursor pointer
position relative
.visaul-dl-expand-head-info
position absolute
left 90%
.visaul-dl-expand-head-arrow
vertical-align middle
.visaul-dl-expand-head-num
line-height 20px
font-size 12px
font-weight normal
.visaul-dl-expand-panel-content
padding 0 20px
.visaul-dl-expand-panel-content:after
......
......@@ -5,8 +5,8 @@ body, h1, h2, h3, h4, h5, h6, hr, p, blockquote, dl, dt, dd, ul, ol, li, pre, fo
// modify some styles of san-mui
.sm-icon
width 100%
height 100%
width 20px
height 20px
overflow hidden
.sm-radio,
......
<template>
<div class="visual-dl-chart-page">
<ui-expand-panel title="{{title}}">
<ui-expand-panel info="{{tagList.length}}" title="{{title}}">
<div class="visual-dl-chart-box">
<ui-chart
san-for="tag in filteredTagList"
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册