feat: 添加 APopconfirmButton 组件并更新 index.page.vue 以集成确认删除功能
This commit is contained in:
@ -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>
|
||||
|
Reference in New Issue
Block a user