feat: 添加 APopconfirmButton 组件并更新 index.page.vue 以集成确认删除功能
All checks were successful
/ depcheck (push) Successful in 2m15s
/ build-and-deploy-to-vercel (push) Successful in 2m34s
/ surge (push) Successful in 2m21s
/ playwright (push) Successful in 3m46s

This commit is contained in:
mini2024
2025-02-28 00:35:13 +08:00
parent ff4718c54b
commit 5ada043ee9
2 changed files with 64 additions and 12 deletions

View File

@ -1,17 +1,28 @@
<script setup></script>
<script setup>
import APopconfirmButton from './APopconfirmButton.vue';
</script>
<template>
<ACard>
<AForm name="basic" :label-col="{ style: { width: '7em' } }">
<AFormItem required label="Username">
<AInput />
</AFormItem>
<AFormItem label="Password">
<AInput />
</AFormItem>
<AFormItem>
<AButton html-type="submit" type="primary">Submit</AButton>
</AFormItem>
</AForm>
<ACard>
<AForm name="basic" :label-col="{ style: { width: '7em' } }">
<AFormItem required label="Username">
<AInput />
</AFormItem>
<AFormItem label="Password">
<AInput />
</AFormItem>
<AFormItem>
<AButton html-type="submit" type="primary">Submit</AButton>
</AFormItem>
</AForm>
</ACard>
<ACard class="mt-4">
<AButton size="small" type="text">Delete</AButton>
<APopconfirmButton #default="{ loading, open }">
<AButton :disabled="loading" size="small" @click="open" danger type="text">Delete</AButton>
</APopconfirmButton>
</ACard>
</ACard>
</template>
<style lang="scss" scoped></style>