<template>
  <div class="app-container">
    <el-row :gutter="10" class="mb8">
      <el-col :span="12">
        <el-card>
          <div ref="echartsRef" style="width: 600px; height: 400px;"></div>
        </el-card>
      </el-col>
      <el-col :span="12"></el-col>
    </el-row>
  </div>
</template>

<script setup>
import {onMounted, ref} from 'vue';
import * as echarts from 'echarts';

const echartsRef = ref(null);

onMounted(() => {
  const chart = echarts.init(echartsRef.value);
  const option = {
    // ECharts 配置项
    title: {
      text: 'ECharts 示例'
    },
    tooltip: {},
    xAxis: {
      data: ['衬衫', '羊毛衫', '雪纺衫', '裤子', '高跟鞋', '袜子']
    },
    yAxis: {},
    series: [{
      name: '销量',
      type: 'bar',
      data: [5, 20, 36, 10, 10, 20]
    }]
  };

  chart.setOption(option);
});
</script>

<style>
/* 你的样式 */
</style>
