mirror of
https://github.com/mayswind/ezbookkeeping.git
synced 2026-05-19 17:24:26 +08:00
code refactor
This commit is contained in:
+3
-2
@@ -7,8 +7,7 @@
|
|||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { type Ref, ref, computed, watch, onMounted } from 'vue';
|
import { type Ref, ref, computed, watch, onMounted } from 'vue';
|
||||||
|
|
||||||
import type { Notification } from 'framework7/components/notification';
|
import type { Notification, Actions, Dialog, Popover, Popup, Sheet } from 'framework7/types';
|
||||||
import type { Actions, Dialog, Popover, Popup, Sheet } from 'framework7/types';
|
|
||||||
import { f7ready } from 'framework7-vue';
|
import { f7ready } from 'framework7-vue';
|
||||||
import routes from './router/mobile.js';
|
import routes from './router/mobile.js';
|
||||||
|
|
||||||
@@ -192,6 +191,8 @@ onMounted(() => {
|
|||||||
watch(currentNotificationContent, (newValue) => {
|
watch(currentNotificationContent, (newValue) => {
|
||||||
if (notification.value) {
|
if (notification.value) {
|
||||||
notification.value.close();
|
notification.value.close();
|
||||||
|
// @ts-expect-error there is an "destroy" function in the Notification component, but it is not defined in the type definition file
|
||||||
|
// see https://framework7.io/docs/notification
|
||||||
notification.value.destroy();
|
notification.value.destroy();
|
||||||
notification.value = null;
|
notification.value = null;
|
||||||
}
|
}
|
||||||
|
|||||||
Vendored
-8
@@ -21,11 +21,3 @@ interface Window {
|
|||||||
interface Navigator {
|
interface Navigator {
|
||||||
browserLanguage?: string;
|
browserLanguage?: string;
|
||||||
}
|
}
|
||||||
|
|
||||||
declare module "framework7/components/notification" {
|
|
||||||
export namespace Notification {
|
|
||||||
export interface Notification {
|
|
||||||
destroy(): void;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|||||||
Reference in New Issue
Block a user