feat:添加时间选择器的组件(10%)

This commit is contained in:
zhangyu
2021-06-21 11:29:26 +08:00
parent 5a02d866b8
commit e9dc7a7621
5 changed files with 89 additions and 27 deletions

View File

@@ -1,24 +1,27 @@
<template>
<div class="cn-panel">
<chart v-for="(chart, index) in chartList" :key="index" :chart="chart"></chart>
<!-- <grid-layout v-model:layout="chartList"
:col-num="12"
:row-height="30"
:is-draggable="draggable"
:is-resizable="resizable"
:vertical-compact="compact"
:use-css-transforms="true"
>
<grid-item v-for="item in chartList" :key="item.i"
:x="item.x"
:y="item.y"
:w="item.w"
:h="item.h"
:i="item.i"
>
<span class="text">{{ item.i }}</span>
</grid-item>
</grid-layout>-->
<div>
<DateTimeRange />
<div class="cn-panel">
<chart v-for="(chart, index) in chartList" :key="index" :chart="chart"></chart>
<!-- <grid-layout v-model:layout="chartList"
:col-num="12"
:row-height="30"
:is-draggable="draggable"
:is-resizable="resizable"
:vertical-compact="compact"
:use-css-transforms="true"
>
<grid-item v-for="item in chartList" :key="item.i"
:x="item.x"
:y="item.y"
:w="item.w"
:h="item.h"
:i="item.i"
>
<span class="text">{{ item.i }}</span>
</grid-item>
</grid-layout>-->
</div>
</div>
</template>
@@ -28,11 +31,13 @@ import { ref } from 'vue'
import { panelTypeAndRouteMapping } from '@/utils/constants'
import { api, getPanelList, getChartList } from '@/utils/api'
import Chart from './Chart'
import DateTimeRange from '@/components/common/TimeRange/DateTimeRange'
export default {
name: 'Panel',
components: {
Chart
Chart,
DateTimeRange
},
data () {
return {