<template>
  <div>
    <el-tooltip class="box-item" effect="dark" content="复制" placement="top">
      <DocumentCopy
        @click="onCopy"
        class="cursor-pointer"
        style="
          width: 16px;
          height: 16px;
          margin-left: 4px;
          color: var(--el-color-primary);
        "
      ></DocumentCopy>
      <!-- color: var(--el-color-primary); -->
    </el-tooltip>
  </div>
</template>
<script lang="ts" setup>
import { ref, defineProps } from "vue";
import { Search, Notification, DocumentCopy } from "@element-plus/icons-vue";
import { request } from "@/utils/http";

import { ElMessage } from "element-plus";
import { handleCopy } from "@/utils/index";

const props = defineProps({
  content: {
    type: String
  }
});

const onCopy = () => {
  handleCopy(props.content);
  ElMessage.success("操作成功");
};
</script>
