Skip to content

Commit

Permalink
chore: update
Browse files Browse the repository at this point in the history
  • Loading branch information
xiaoxian521 committed Sep 25, 2024
1 parent 935c933 commit dbb605a
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 8 deletions.
5 changes: 4 additions & 1 deletion src/components/ReDrawer/index.vue
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<script lang="ts" setup>
<script setup lang="ts">
import {
type EventType,
type ButtonProps,
Expand All @@ -8,6 +8,7 @@ import {
} from "./index";
import { computed, ref } from "vue";
import { isFunction } from "@pureadmin/utils";
defineOptions({
name: "ReDrawer"
});
Expand Down Expand Up @@ -78,6 +79,7 @@ function eventsCallBack(
return options?.[event]({ options, index });
}
}
/**
*
* @param {DrawerOptions} options - 包含抽屉相关配置的对象
Expand All @@ -94,6 +96,7 @@ function handleClose(
eventsCallBack("close", options, index);
}
</script>

<template>
<el-drawer
v-for="(options, index) in drawerStore"
Expand Down
6 changes: 3 additions & 3 deletions src/views/components/dialog/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -280,11 +280,11 @@ function onUpdateClick() {
});
}
// popconfirm 确认框
// Popconfirm 确认框
function onPopconfirmClick() {
addDialog({
width: "30%",
title: "popconfirm确认框示例",
title: "Popconfirm确认框示例",
popconfirm: { title: "是否确认修改当前数据" },
contentRenderer: () => <p>点击右下方确定按钮看看效果吧</p>
});
Expand Down Expand Up @@ -519,7 +519,7 @@ function onSureBtnLoading() {
<el-button @click="onCloseCallBackClick"> 关闭后的回调 </el-button>
<el-button @click="onNestingClick"> 嵌套的弹框 </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-divider />
<el-space wrap>
Expand Down
8 changes: 4 additions & 4 deletions src/views/components/drawer/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -239,11 +239,11 @@ function onUpdateClick() {
});
}
// popConfirm 确认框
// Popconfirm 确认框
function onPopConfirmClick() {
addDrawer({
size: "30%",
title: "popConfirm确认框示例",
title: "Popconfirm确认框示例",
popConfirm: { title: "是否确认修改当前数据" },
contentRenderer: () => <p>点击右下方确定按钮看看效果吧</p>
});
Expand Down Expand Up @@ -416,7 +416,7 @@ function onSureBtnLoading() {
title: "点击底部确定按钮可开启按钮动画",
contentRenderer: () => <p>抽屉内容-点击底部确定按钮可开启按钮动画</p>,
beforeSure: (done, { closeLoading }) => {
closeLoading(); // 关闭确定按钮动画,不关闭抽屉
// closeLoading(); // 关闭确定按钮动画,不关闭抽屉
// done() // 关闭确定按钮动画并关闭抽屉
setTimeout(() => done(), 800);
}
Expand Down Expand Up @@ -466,7 +466,7 @@ function onSureBtnLoading() {
<el-button @click="onCloseCallBackClick"> 关闭后的回调 </el-button>
<el-button @click="onNestingClick"> 嵌套的抽屉 </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-divider />
<el-space wrap>
Expand Down

0 comments on commit dbb605a

Please sign in to comment.