migrate number pad sheet to composition API and typescript

This commit is contained in:
MaysWind
2025-01-06 22:32:36 +08:00
parent 60ba3b7977
commit 2b71723ba1
2 changed files with 288 additions and 263 deletions
+11
View File
@@ -1,3 +1,4 @@
import { useI18n as useVueI18n } from 'vue-i18n';
import { f7, f7ready } from 'framework7-vue';
import { FontSize, FONT_SIZE_PREVIEW_CLASSNAME_PREFIX } from '@/core/font.ts';
@@ -192,3 +193,13 @@ export function scrollToSelectedItem(parentEl, containerSelector, selectedItemSe
container.scrollTop(targetPos);
}
export function useI18nUIComponents() {
const i18nGlobal = useVueI18n();
return {
showAlert: (message, confirmCallback) => showAlert(message, confirmCallback, i18nGlobal.t),
showConfirm: (message, confirmCallback, cancelCallback) => showConfirm(message, confirmCallback, cancelCallback, i18nGlobal.t),
showToast: (message, timeout) => showToast(message, timeout, i18nGlobal.t)
};
}