@mythpe/quasar-ui-qui 0.3.56 → 0.3.57
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json
CHANGED
|
@@ -239,7 +239,8 @@ export const useMyth = () => {
|
|
|
239
239
|
const alertMessage = (opts: Vue3MAlertMessageOptions): Vue3MAlertMessage => q.notify(quasarNotifyOptions(opts))
|
|
240
240
|
const alertSuccess = (message: string) => alertMessage({ type: 'positive', message })
|
|
241
241
|
const alertError = (message: string) => alertMessage({ type: 'negative', message })
|
|
242
|
-
|
|
242
|
+
type ConfirmMessageOptions = Partial<QDialogOptions> & Partial<QDialogProps> & Record<string, any>
|
|
243
|
+
const confirmMessage = (message?: string, title?: string, opts?: ConfirmMessageOptions): Vue3MConfirmMessage => {
|
|
243
244
|
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
|
244
245
|
// @ts-ignore
|
|
245
246
|
title = title || t('messages.are_you_sure') || ''
|
|
@@ -284,6 +285,12 @@ export const useMyth = () => {
|
|
|
284
285
|
...opts as any
|
|
285
286
|
})
|
|
286
287
|
}
|
|
288
|
+
type PromptMessageOptions = {
|
|
289
|
+
message?: string;
|
|
290
|
+
title?: string;
|
|
291
|
+
opts?: Partial<QDialogOptions> & Record<string, any>;
|
|
292
|
+
}
|
|
293
|
+
const promptMessage = (opt?: PromptMessageOptions) => confirmMessage(opt?.message, opt?.title, opt?.opts)
|
|
287
294
|
const isSmall = computed(() => q.screen.lt.md)
|
|
288
295
|
const colorStyle = (value: any, bg: boolean = false) => {
|
|
289
296
|
if (!value) {
|
|
@@ -330,6 +337,7 @@ export const useMyth = () => {
|
|
|
330
337
|
alertSuccess,
|
|
331
338
|
alertError,
|
|
332
339
|
confirmMessage,
|
|
340
|
+
promptMessage,
|
|
333
341
|
...Helpers,
|
|
334
342
|
...Str,
|
|
335
343
|
veeRules,
|