chore: update

This commit is contained in:
xiaoxian521 2024-09-25 15:44:50 +08:00
parent 935c9336de
commit dbb605a35f
3 changed files with 11 additions and 8 deletions

View File

@ -1,4 +1,4 @@
<script lang="ts" setup> <script setup lang="ts">
import { import {
type EventType, type EventType,
type ButtonProps, type ButtonProps,
@ -8,6 +8,7 @@ import {
} from "./index"; } from "./index";
import { computed, ref } from "vue"; import { computed, ref } from "vue";
import { isFunction } from "@pureadmin/utils"; import { isFunction } from "@pureadmin/utils";
defineOptions({ defineOptions({
name: "ReDrawer" name: "ReDrawer"
}); });
@ -78,6 +79,7 @@ function eventsCallBack(
return options?.[event]({ options, index }); return options?.[event]({ options, index });
} }
} }
/** /**
* *
* @param {DrawerOptions} options - 包含抽屉相关配置的对象 * @param {DrawerOptions} options - 包含抽屉相关配置的对象
@ -94,6 +96,7 @@ function handleClose(
eventsCallBack("close", options, index); eventsCallBack("close", options, index);
} }
</script> </script>
<template> <template>
<el-drawer <el-drawer
v-for="(options, index) in drawerStore" v-for="(options, index) in drawerStore"

View File

@ -280,11 +280,11 @@ function onUpdateClick() {
}); });
} }
// popconfirm // Popconfirm
function onPopconfirmClick() { function onPopconfirmClick() {
addDialog({ addDialog({
width: "30%", width: "30%",
title: "popconfirm确认框示例", title: "Popconfirm确认框示例",
popconfirm: { title: "是否确认修改当前数据" }, popconfirm: { title: "是否确认修改当前数据" },
contentRenderer: () => <p>点击右下方确定按钮看看效果吧</p> contentRenderer: () => <p>点击右下方确定按钮看看效果吧</p>
}); });
@ -519,7 +519,7 @@ function onSureBtnLoading() {
<el-button @click="onCloseCallBackClick"> 关闭后的回调 </el-button> <el-button @click="onCloseCallBackClick"> 关闭后的回调 </el-button>
<el-button @click="onNestingClick"> 嵌套的弹框 </el-button> <el-button @click="onNestingClick"> 嵌套的弹框 </el-button>
<el-button @click="onUpdateClick"> 更改弹框自身属性值 </el-button> <el-button @click="onUpdateClick"> 更改弹框自身属性值 </el-button>
<el-button @click="onPopconfirmClick">popconfirm确认框</el-button> <el-button @click="onPopconfirmClick">Popconfirm确认框</el-button>
</el-space> </el-space>
<el-divider /> <el-divider />
<el-space wrap> <el-space wrap>

View File

@ -239,11 +239,11 @@ function onUpdateClick() {
}); });
} }
// popConfirm // Popconfirm
function onPopConfirmClick() { function onPopConfirmClick() {
addDrawer({ addDrawer({
size: "30%", size: "30%",
title: "popConfirm确认框示例", title: "Popconfirm确认框示例",
popConfirm: { title: "是否确认修改当前数据" }, popConfirm: { title: "是否确认修改当前数据" },
contentRenderer: () => <p>点击右下方确定按钮看看效果吧</p> contentRenderer: () => <p>点击右下方确定按钮看看效果吧</p>
}); });
@ -416,7 +416,7 @@ function onSureBtnLoading() {
title: "点击底部确定按钮可开启按钮动画", title: "点击底部确定按钮可开启按钮动画",
contentRenderer: () => <p>抽屉内容-点击底部确定按钮可开启按钮动画</p>, contentRenderer: () => <p>抽屉内容-点击底部确定按钮可开启按钮动画</p>,
beforeSure: (done, { closeLoading }) => { beforeSure: (done, { closeLoading }) => {
closeLoading(); // // closeLoading(); //
// done() // // done() //
setTimeout(() => done(), 800); setTimeout(() => done(), 800);
} }
@ -466,7 +466,7 @@ function onSureBtnLoading() {
<el-button @click="onCloseCallBackClick"> 关闭后的回调 </el-button> <el-button @click="onCloseCallBackClick"> 关闭后的回调 </el-button>
<el-button @click="onNestingClick"> 嵌套的抽屉 </el-button> <el-button @click="onNestingClick"> 嵌套的抽屉 </el-button>
<el-button @click="onUpdateClick"> 更改抽屉自身属性值 </el-button> <el-button @click="onUpdateClick"> 更改抽屉自身属性值 </el-button>
<el-button @click="onPopConfirmClick">popConfirm确认框</el-button> <el-button @click="onPopConfirmClick">Popconfirm确认框</el-button>
</el-space> </el-space>
<el-divider /> <el-divider />
<el-space wrap> <el-space wrap>