|
@@ -1,9 +1,17 @@
|
|
|
import { showToast } from "vant";
|
|
|
import { i18n } from "@/i18n";
|
|
|
+import { Toast } from '@capacitor/toast';
|
|
|
|
|
|
export function setup() {
|
|
|
- window["$msg"] = (msg, position = "top") => {
|
|
|
- showToast({ position: position, message: msg });
|
|
|
+ window["$msg"] = async (msg, position = "bottom", duration = 2000) => {
|
|
|
+
|
|
|
+ await Toast.show({
|
|
|
+ text: msg,
|
|
|
+ position: position,
|
|
|
+ duration: duration
|
|
|
+ });
|
|
|
+
|
|
|
+ // Toast({ position: position, message: msg });
|
|
|
};
|
|
|
|
|
|
window["$t"] = i18n.global.t;
|