<template>
  <div style="display: flex; align-items: center">
    <el-popover
      :width="300"
      popper-style="box-shadow: rgb(14 18 22 / 35%) 0px 10px 38px -10px, rgb(14 18 22 / 20%) 0px 10px 20px -15px; padding: 20px;"
    >
      <template #reference>
        <el-switch v-model="value" size="large" active-text="开" inactive-text="关" />
      </template>
      <template #default>
        <div class="demo-rich-conent" style="display: flex; gap: 2px; flex-direction: column">
          <el-switch v-model="value" size="large" disabled />

          <el-row :gutter="6">
            <el-col :span="12" :xs="24" :sm="12" :md="8" class="elColInfo">
              <el-statistic title="绑定ID" value="1100101" />
            </el-col>

            <el-col :span="12" :xs="24" :sm="12" :md="8" class="elColInfo">
              <el-statistic title="状态" :value="null">
                <template #suffix>
                  <el-tag size="default" type="success">开启</el-tag>
                </template>
              </el-statistic>
            </el-col>

            <el-col :span="12" :xs="24" :sm="12" :md="8" class="elColInfo">
              <el-statistic title="类型" :value="null">
                <template #suffix>
                  <el-tag size="default" type="primary">遥控</el-tag>
                </template>
              </el-statistic>
            </el-col>
          </el-row>
        </div>
      </template>
    </el-popover>
  </div>
</template>

<script lang="ts" setup>
import { ref } from 'vue';

const value = ref(true);
</script>

<style scoped>
.el-statistic {
  /* 控制文字大小 */
  --el-statistic-content-font-size: 16px;
}
.elColInfo {
  text-align: center;
}
</style>
