modify dialogRemove function (mixin)
This commit is contained in:
parent
054ed8b5ad
commit
d1d0404fff
1 changed files with 13 additions and 4 deletions
|
|
@ -441,12 +441,21 @@ export const useCounterMixin = defineStore("mixin", () => {
|
|||
});
|
||||
};
|
||||
|
||||
const dialogRemove = (q: any, ok?: Function, cancel?: Function) => {
|
||||
const dialogRemove = (
|
||||
q: any,
|
||||
ok?: Function,
|
||||
title?: string, // ถ้ามี cancel action ใส่เป็น null
|
||||
desc?: string, // ถ้ามี cancel action ใส่เป็น null
|
||||
cancel?: Function
|
||||
) => {
|
||||
q.dialog({
|
||||
component: CustomComponent,
|
||||
componentProps: {
|
||||
title: "ยืนยันการลบข้อมูล",
|
||||
message: "ต้องการยืนยันการลบข้อมูลนี้ใช่หรือไม่?",
|
||||
title: title && title != null ? title : "ยืนยันการลบข้อมูล",
|
||||
message:
|
||||
desc && desc != null
|
||||
? desc
|
||||
: "ต้องการยืนยันการลบข้อมูลนี้ใช่หรือไม่?",
|
||||
icon: "delete",
|
||||
color: "red",
|
||||
textOk: "ตกลง",
|
||||
|
|
@ -792,6 +801,6 @@ export const useCounterMixin = defineStore("mixin", () => {
|
|||
// common dialog
|
||||
dialogConfirm,
|
||||
dialogRemove,
|
||||
dialogMessageNotify
|
||||
dialogMessageNotify,
|
||||
};
|
||||
});
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue