colmo设计师沙龙pc端后台管理系统

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. <template>
  2. <echarts :option="option" :loading="loading"></echarts>
  3. </template>
  4. <script>
  5. export default {
  6. name: 'LineChart',
  7. props: {
  8. option: {
  9. type: Object,
  10. default: () => ({})
  11. },
  12. value: {
  13. type: Array,
  14. default: () => []
  15. },
  16. loading: Boolean
  17. },
  18. computed: {
  19. opt() {
  20. return {
  21. xAxis: {
  22. type: 'category',
  23. },
  24. yAxis: {
  25. type: 'value'
  26. },
  27. series: [
  28. {
  29. type: 'line',
  30. smooth: true
  31. }
  32. ],
  33. dimensions: ['key', 'value'],
  34. source: this.value,
  35. ...this.option,
  36. }
  37. }
  38. },
  39. data() {
  40. return {
  41. }
  42. }
  43. }
  44. </script>