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({
|
q.dialog({
|
||||||
component: CustomComponent,
|
component: CustomComponent,
|
||||||
componentProps: {
|
componentProps: {
|
||||||
title: "ยืนยันการลบข้อมูล",
|
title: title && title != null ? title : "ยืนยันการลบข้อมูล",
|
||||||
message: "ต้องการยืนยันการลบข้อมูลนี้ใช่หรือไม่?",
|
message:
|
||||||
|
desc && desc != null
|
||||||
|
? desc
|
||||||
|
: "ต้องการยืนยันการลบข้อมูลนี้ใช่หรือไม่?",
|
||||||
icon: "delete",
|
icon: "delete",
|
||||||
color: "red",
|
color: "red",
|
||||||
textOk: "ตกลง",
|
textOk: "ตกลง",
|
||||||
|
|
@ -792,6 +801,6 @@ export const useCounterMixin = defineStore("mixin", () => {
|
||||||
// common dialog
|
// common dialog
|
||||||
dialogConfirm,
|
dialogConfirm,
|
||||||
dialogRemove,
|
dialogRemove,
|
||||||
dialogMessageNotify
|
dialogMessageNotify,
|
||||||
};
|
};
|
||||||
});
|
});
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue