<script setup lang="ts">
// import { reactive } from 'vue';
import { useQuasar } from 'quasar';
import ICON from 'src/config/icons';
import emitter from '../../eventbus';

const props = defineProps<{
  params: any;
}>();

const $q = useQuasar();

function delRow() {
  const msg = `确定<strong>删除</strong>当前行<span class="text-red text-weight-bold">${props.params.data.name}</span>？`;
  $q.dialog({
    title: '<i class="bi bi-exclamation-circle text-warning"></i>&nbsp;提示',
    message: msg,
    cancel: true,
    persistent: true,
    html: true,
  }).onOk(() => {
    emitter.emit('delRow', props.params);
  });
}
</script>
<template>
  <div>
    <q-btn :icon="ICON.delete" round flat @click="delRow" size="11px" />
  </div>
</template>

<style lang="scss" scoped></style>
