mirror of
https://github.com/mayswind/ezbookkeeping.git
synced 2026-05-17 16:24:25 +08:00
migrate number pad sheet to composition API and typescript
This commit is contained in:
@@ -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)
|
||||
};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user