เพิ่มลงเวลากรณีพิเศษ (USER) #32

This commit is contained in:
DESKTOP-1R2VSQH\Lenovo ThinkPad E490 2023-11-24 16:39:55 +07:00
parent 2dea65c4df
commit 0ec7e83d0d
8 changed files with 196 additions and 80 deletions

View file

@ -208,6 +208,36 @@ export const useCounterMixin = defineStore('mixin', () => {
}
}
const success = (q: any, val: string) => {
// useQuasar ไม่สามารถใช้นอกไฟล์ .vue
if (val !== '') {
return q.notify({
message: val,
color: 'primary',
icon: 'mdi-information',
position: 'bottom-right',
multiLine: true,
timeout: 1000,
badgeColor: 'positive',
classes: 'my-notif-class',
})
}
}
function notify(q: any, val: string) {
if (val !== '') {
q.notify({
color: 'teal-10',
message: val,
icon: 'mdi-information',
position: 'bottom-right',
multiLine: true,
timeout: 7000,
actions: [{ label: 'ปิด', color: 'white', handler: () => {} }],
})
}
}
return {
date2Thai,
showLoader,
@ -215,5 +245,7 @@ export const useCounterMixin = defineStore('mixin', () => {
covertDateObject,
dialogConfirm,
messageError,
success,
notify,
}
})