<template>
  <div class="app-container">
    <el-row :gutter="20">
      <el-col :span="8">
        <videoLeft @row-click="handleRowClick"/>
      </el-col>
      <el-col :span="16">
        <videoRight :selectedRow="selectedRow"/>
      </el-col>
    </el-row>
  </div>
</template>
<script>
import videoLeft from "./videoLeft.vue";
import videoRight from "./videoRight.vue";
export default {
  name: "cockpit",
  components: {
    videoLeft,
    videoRight,
  },
  data() {
    return {
      selectedRow: null, // 用于存储选中的行数据
    };
  },
  methods: {
    // 接收 videoLeft 组件传递的行数据
    handleRowClick(row) {
      this.selectedRow = row;
    },
  },
}
</script>