<template>
  <!-- <el-input-number v-model="num" :step="2" class="custom-input-number" /> -->
  <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-icon class="iconStyle" :size="30">
          <SwitchFilled />
        </el-icon>
      </template>
      <template #default>
        <div class="demo-rich-conent" style="display: flex; gap: 2px; flex-direction: column">
          <div class="progress-container">
            <div class="input-button-row">
              <el-input-number v-model="num" :step="2" class="custom-input-number" />
              <el-button-group size="small" direction="horizontal">
                <el-button type="primary" :icon="Check" />
                <el-button
                  type="primary"
                  color="rgb(177, 179, 184)"
                  @click="num = 0"
                  :icon="RefreshLeft"
                />
              </el-button-group>
            </div>
          </div>

          <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';
import {
  ChatLineRound,
  Male,
  WarningFilled,
  SwitchFilled,
  Check,
  RefreshLeft
} from '@element-plus/icons-vue';

const num = ref(5);
</script>

<style scoped>
.iconStyle {
  size: 30;
  color: #409eff;
}

.el-statistic {
  /* 控制文字大小 */
  --el-statistic-content-font-size: 16px;
}

.elColInfo {
  text-align: center;
}

.progress-container {
  width: 120px;
  margin-top: 5px;
  margin-bottom: 25px;
}

/* 或者通过CSS变量设置 */
/* :deep(.el-input-number) {
  width: 20px;
} */

/* 如果要设置内部输入框的宽度 */
/* :deep(.el-input__wrapper) {
  width: 20px;
} */

.input-button-row {
  width: 300px;
  display: flex;
  gap: 35px; /* 设置组件之间的间距 */
  align-items: center; /* 垂直居中对齐 */
}

.custom-input-number {
  width: 140px; /* 设置自定义宽度 */
}
</style>
