mirror of
https://codeberg.org/Hyperpipe/Hyperpipe
synced 2025-06-28 05:08:00 +02:00
parent
8945c11f02
commit
faef667189
11 changed files with 1020 additions and 885 deletions
|
@ -142,3 +142,19 @@ export const useI18n = defineStore('i18n', () => {
|
|||
|
||||
return { locale, map, t, setupLocale };
|
||||
});
|
||||
|
||||
export const useAlert = defineStore('alert', () => {
|
||||
const msg = ref('');
|
||||
|
||||
function add(m) {
|
||||
if (!m) return;
|
||||
|
||||
msg.value = m;
|
||||
|
||||
setTimeout(() => {
|
||||
if (msg.value == m) msg.value = '';
|
||||
}, 3000);
|
||||
}
|
||||
|
||||
return { msg, add };
|
||||
});
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue