added widgets from dashboard

This commit is contained in:
woothu
2018-10-09 14:42:41 +02:00
parent 4741d4231a
commit 2023248ee2
4 changed files with 160 additions and 165 deletions
+9 -9
View File
@@ -1,13 +1,13 @@
<template>
<b-card :class="styleClasses">
<div class="h1 text-muted text-right mb-4">
<i :class="iconClasses"></i>
</div>
<div class="h4 mb-0">{{header}}</div>
<small class="text-muted text-uppercase font-weight-bold">{{text}}</small>
<b-progress height={} :variant="variant" :value="value"
:class="[backgroundColor ? 'progress-white' : '', 'progress-xs my-3 mb-0']"/>
</b-card>
<b-card :class="styleClasses">
<div class="h1 text-muted text-right mb-4">
<i :class="iconClasses"></i>
</div>
<div class="h4 mb-0">{{header}}</div>
<small class="text-muted text-uppercase font-weight-bold">{{text}}</small>
<b-progress height={} :variant="variant" :value="value"
:class="[backgroundColor ? 'progress-white' : '', 'progress-xs my-3 mb-0']"/>
</b-card>
</template>
<script>
+59
View File
@@ -0,0 +1,59 @@
<template>
<b-card no-body :class="cardClasses">
<b-card-body class="pb-0">
<slot></slot>
<h4 class="mb-0">{{header}}</h4>
<p>{{text}}</p>
</b-card-body>
<card-line1-chart-example v-if="chartType == 'chart1'" chartId="card-chart-01" class="chart-wrapper px-3" style="height:70px;" :height="chartHeight"/>
<card-line2-chart-example v-if="chartType == 'chart2'"chartId="card-chart-02" class="chart-wrapper px-3" style="height:70px;" :height="chartHeight"/>
<card-line3-chart-example v-if="chartType == 'chart3'"chartId="card-chart-03" class="chart-wrapper" style="height:70px;" :height="chartHeight"/>
<card-bar-chart-example v-if="chartType == 'chart4'" chartId="card-chart-04" class="chart-wrapper px-3" style="height:70px;" :height="chartHeight"/>
</b-card>
</template>
<script>
import CardLine1ChartExample from './../dashboard/CardLine1ChartExample'
import CardLine2ChartExample from './../dashboard/CardLine2ChartExample'
import CardLine3ChartExample from './../dashboard/CardLine3ChartExample'
import CardBarChartExample from './../dashboard/CardBarChartExample'
export default {
components:{
CardLine1ChartExample,
CardLine2ChartExample,
CardLine3ChartExample,
CardBarChartExample
},
name: 'Widget06',
data () {
return{
backgroundColor: '',
}
},
created () {
},
props: {
cardClasses: {
type: String,
default: ''
},
header: {
type: String,
default: 'header|string'
},
text: {
type: String,
default: 'text|string'
},
chartType:{
type: String,
default: 'chart1'
},
chartHeight:{
type: Number,
default: 70
},
}
}
</script>