xt-element-ui 1.2.3 → 1.2.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/docs/README.md +201 -0
- package/docs/components/base/xt-button.md +114 -0
- package/docs/components/base/xt-card-item.md +104 -0
- package/docs/components/base/xt-card.md +108 -0
- package/docs/components/base/xt-config-provider.md +199 -0
- package/docs/components/base/xt-flex-box.md +115 -0
- package/docs/components/base/xt-grid-box.md +303 -0
- package/docs/components/base/xt-input.md +150 -0
- package/docs/components/base/xt-text.md +212 -0
- package/docs/components/extend/ex-bar.md +68 -0
- package/docs/components/extend/ex-button.md +62 -0
- package/docs/components/extend/ex-card.md +86 -0
- package/docs/components/extend/ex-chart.md +355 -0
- package/docs/components/extend/ex-icon.md +190 -0
- package/docs/components/extend/ex-line.md +71 -0
- package/docs/components/extend/ex-multi.md +156 -0
- package/docs/components/extend/ex-page.md +75 -0
- package/docs/components/extend/ex-pie.md +70 -0
- package/docs/components/extend/ex-select-tree.md +210 -0
- package/docs/components/extend/ex-table.md +591 -0
- package/docs/components/extend/ex-upload.md +134 -0
- package/docs/components/utils/size.md +148 -0
- package/docs/components/utils/theme.md +183 -0
- package/lib/index.common.js +449 -429
- package/lib/index.css +1 -1
- package/lib/index.umd.js +449 -429
- package/lib/index.umd.min.js +4 -4
- package/package.json +4 -2
- package/src/components/ex-chart/ExMulti.vue +44 -32
- package/src/components/ex-chart/ExPie.vue +6 -8
- package/src/components/ex-chart/index.vue +1 -4
- package/src/components/ex-chart/theme/dark.js +14 -12
- package/src/components/ex-chart/utils.js +1 -1
- package/src/components/ex-icon/index.js +2 -0
- package/src/components/ex-icon/index.vue +168 -0
- package/src/components/ex-icon/style/index.scss +7 -0
- package/src/components/ex-table/index.vue +3 -3
- package/src/components/index.scss +4 -1
- package/src/components/xt-button/index.vue +2 -2
- package/src/components/xt-button/style/index.scss +524 -614
- package/src/components/xt-card-item/images/bar.svg +1 -0
- package/src/components/xt-card-item/images/line.svg +1 -0
- package/src/components/xt-card-item/images/pie.svg +1 -0
- package/src/components/xt-card-item/index copy.vue +93 -0
- package/src/components/xt-card-item/index.vue +23 -83
- package/src/components/xt-card-item/style/index copy.scss +72 -0
- package/src/components/xt-card-item/style/index.scss +51 -40
- package/src/components/xt-config-provider/index.vue +2 -2
- package/src/components/xt-text/index.vue +58 -29
- package/src/index.js +3 -0
- package/src/components/ex-chart/ExTrend.vue +0 -124
|
@@ -1,124 +0,0 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<div ref="barchart" class="bar-box" :style="{width:width}"></div>
|
|
3
|
-
</template>
|
|
4
|
-
<script>
|
|
5
|
-
import EchartsUtil from "./utils";
|
|
6
|
-
export default {
|
|
7
|
-
name: "XtTrend",
|
|
8
|
-
props: {
|
|
9
|
-
type: {
|
|
10
|
-
type: String,
|
|
11
|
-
default: "bar"
|
|
12
|
-
},
|
|
13
|
-
theme: {},
|
|
14
|
-
size: {
|
|
15
|
-
type: String,
|
|
16
|
-
default: "medium"
|
|
17
|
-
},
|
|
18
|
-
chartData: {
|
|
19
|
-
type: Array,
|
|
20
|
-
default: () => {
|
|
21
|
-
return [
|
|
22
|
-
{ value: 53, label: "正常设备" },
|
|
23
|
-
{ value: 10, label: "正常设备" },
|
|
24
|
-
{ value: 60, label: "离线设备" }
|
|
25
|
-
];
|
|
26
|
-
}
|
|
27
|
-
},
|
|
28
|
-
width: {
|
|
29
|
-
type: String,
|
|
30
|
-
default: "100%"
|
|
31
|
-
},
|
|
32
|
-
energyType: {
|
|
33
|
-
type: String,
|
|
34
|
-
default: "m³"
|
|
35
|
-
}
|
|
36
|
-
},
|
|
37
|
-
data() {
|
|
38
|
-
return {
|
|
39
|
-
myChart: null
|
|
40
|
-
};
|
|
41
|
-
},
|
|
42
|
-
watch: {
|
|
43
|
-
type: {
|
|
44
|
-
handler() {
|
|
45
|
-
const _self = this;
|
|
46
|
-
const option = _self.getOption();
|
|
47
|
-
_self.myChart.setOption(option);
|
|
48
|
-
}
|
|
49
|
-
},
|
|
50
|
-
chartData: {
|
|
51
|
-
deep: true,
|
|
52
|
-
handler(newVal, oldVal) {
|
|
53
|
-
const _self = this;
|
|
54
|
-
_self.initChart();
|
|
55
|
-
}
|
|
56
|
-
},
|
|
57
|
-
theme(newVal) {
|
|
58
|
-
this.initChart();
|
|
59
|
-
}
|
|
60
|
-
},
|
|
61
|
-
mounted() {
|
|
62
|
-
this.initChart();
|
|
63
|
-
},
|
|
64
|
-
methods: {
|
|
65
|
-
getOption() {
|
|
66
|
-
const _self = this;
|
|
67
|
-
// 数据处理
|
|
68
|
-
const option = {
|
|
69
|
-
xAxis: {
|
|
70
|
-
type: "category",
|
|
71
|
-
axisTick: {
|
|
72
|
-
show: false,
|
|
73
|
-
splitLine: {
|
|
74
|
-
lineStyle: {
|
|
75
|
-
}
|
|
76
|
-
}
|
|
77
|
-
},
|
|
78
|
-
axisLabel: {
|
|
79
|
-
}
|
|
80
|
-
},
|
|
81
|
-
tooltip: {
|
|
82
|
-
borderWidth: 1,
|
|
83
|
-
trigger: "item"
|
|
84
|
-
},
|
|
85
|
-
grid: {
|
|
86
|
-
top: "10",
|
|
87
|
-
left: "10",
|
|
88
|
-
right: "10",
|
|
89
|
-
bottom: "20"
|
|
90
|
-
},
|
|
91
|
-
yAxis: {
|
|
92
|
-
show: false,
|
|
93
|
-
type: "value"
|
|
94
|
-
},
|
|
95
|
-
series: {
|
|
96
|
-
type: _self.type || "bar",
|
|
97
|
-
areaStyle: {},
|
|
98
|
-
showSymbol: false,
|
|
99
|
-
smooth: true,
|
|
100
|
-
data: _self.chartData.map((item, ind) => {
|
|
101
|
-
const { label, value } = item;
|
|
102
|
-
return {
|
|
103
|
-
value,
|
|
104
|
-
label
|
|
105
|
-
};
|
|
106
|
-
})
|
|
107
|
-
}
|
|
108
|
-
};
|
|
109
|
-
return option;
|
|
110
|
-
},
|
|
111
|
-
initChart() {
|
|
112
|
-
const _self = this;
|
|
113
|
-
// 数据处理
|
|
114
|
-
const option = this.getOption();
|
|
115
|
-
this.myChart = EchartsUtil.init(_self.$refs.barchart, this.theme, option, this.size);
|
|
116
|
-
}
|
|
117
|
-
}
|
|
118
|
-
};
|
|
119
|
-
</script>
|
|
120
|
-
<style lang="scss" scoped>
|
|
121
|
-
.bar-box{
|
|
122
|
-
position: relative;
|
|
123
|
-
}
|
|
124
|
-
</style>
|