整理
Some checks failed
/ depcheck (push) Successful in 2m24s
/ lint-build-and-check (push) Successful in 2m36s
/ build-and-deploy-to-vercel (push) Successful in 3m13s
/ surge (push) Successful in 2m40s
/ playwright (push) Failing after 8m16s

This commit is contained in:
严浩
2025-03-10 12:41:24 +08:00
parent a7b10809c1
commit 4542944f52
35 changed files with 66 additions and 60 deletions

View File

@ -0,0 +1,44 @@
<script setup lang="ts">
import type { PopconfirmProps } from 'ant-design-vue';
import type { HPopconfirmProps } from './types';
defineOptions({ inheritAttrs: true });
const props = defineProps<HPopconfirmProps>();
const _loading = shallowRef(false);
const onConfirm: PopconfirmProps['onConfirm'] = async (e) => {
if (props.onConfirm) {
try {
_loading.value = true;
await props.onConfirm(e);
} finally {
_loading.value = false;
}
}
};
</script>
<template>
<APopconfirm
:align="{
targetOffset: [0, 0],
}"
:arrow-point-at-center="!true"
:cancel-button-props="{ disabled: _loading }"
:description
:disabled="_loading"
:on-confirm
:title
placement="topRight"
>
<slot></slot>
</APopconfirm>
</template>
<style lang="less">
[class^='ant-'] .anticon svg {
vertical-align: unset; /* baseline */
}
</style>