เพิ่มข้อความแจ้งเตือน เลือกคุณสมบัติ

This commit is contained in:
DESKTOP-1R2VSQH\Lenovo ThinkPad E490 2024-01-17 10:32:17 +07:00
parent c3191c2fb4
commit ecaaacbe1d
4 changed files with 82 additions and 54 deletions

View file

@ -853,6 +853,26 @@ export const useCounterMixin = defineStore("mixin", () => {
});
};
const dialogMessageNotify = (
q: any,
desc?: string, // ถ้ามี cancel action ใส่เป็น null
cancel?: Function
) => {
q.dialog({
component: CustomComponent,
componentProps: {
title: "ข้อความแจ้งเตือน",
message: desc && desc != null ? desc : "กรุณากรอกข้อมูลให้ครบ",
icon: "warning",
color: "orange",
textOk: "ตกลง",
onlycancel: true,
},
}).onCancel(() => {
if (cancel) cancel();
});
};
/**
* convert arabicNumberToText
* @param Number
@ -1043,6 +1063,7 @@ export const useCounterMixin = defineStore("mixin", () => {
fails,
dialogConfirm,
dialogRemove,
dialogMessageNotify,
arabicNumberToText,
calculateDurationYmd,
};