无人机管理后台前端(已迁走)
张含笑
2025-09-01 2ca94de8ede18ac07ccfd8dec7b6f6a707adde9b
src/views/device/components/DeviceSettingPopover.vue
@@ -1,41 +1,38 @@
<template>
  <a-popover
  <el-popover
    :visible="state.sVisible"
    trigger="click"
    v-bind="$attrs"
    :overlay-class-name="overlayClassName"
    placement="bottom"
    @visibleChange=""
    v-on="$attrs"
    width="200"
  >
    <template #content>
    <template #default>
      <div class="title-content"></div>
      <slot name="formContent" />
      <div class="uranus-popconfirm-btns">
        <a-button size="sm" @click="onCancel">
        <el-button @click="onCancel">
          {{ cancelText || '取消' }}
        </a-button>
        <a-button
          size="sm"
        </el-button>
        <el-button
          :loading="loading"
          type="primary"
          class="confirm-btn"
          @click="onConfirm"
        >
          {{ okText || '确定' }}
        </a-button>
        </el-button>
      </div>
    </template>
    <template v-if="$slots.default">
    <template #reference>
      <slot></slot>
    </template>
  </a-popover>
  </el-popover>
</template>
<script setup>
import { defineProps, defineEmits, reactive, watch, computed } from 'vue';
const props = defineProps();
const props = defineProps(['visible', 'loading', 'disabled', 'title', 'cancelText', 'okText', 'width']);
const emit = defineEmits(['cancel', 'confirm']);