diff --git a/src/auto-imports.d.ts b/src/auto-imports.d.ts index a2bb48c..ef53d16 100644 --- a/src/auto-imports.d.ts +++ b/src/auto-imports.d.ts @@ -293,7 +293,7 @@ declare global { const useWindowFocus: typeof import('@vueuse/core')['useWindowFocus'] const useWindowScroll: typeof import('@vueuse/core')['useWindowScroll'] const useWindowSize: typeof import('@vueuse/core')['useWindowSize'] - const utils: typeof import('./utils/index.js')['default'] + const utils: typeof import('./utils/index')['default'] const watch: typeof import('vue')['watch'] const watchArray: typeof import('@vueuse/core')['watchArray'] const watchAtMost: typeof import('@vueuse/core')['watchAtMost'] @@ -609,7 +609,7 @@ declare module 'vue' { readonly useWindowFocus: UnwrapRef readonly useWindowScroll: UnwrapRef readonly useWindowSize: UnwrapRef - readonly utils: UnwrapRef + readonly utils: UnwrapRef readonly watch: UnwrapRef readonly watchArray: UnwrapRef readonly watchAtMost: UnwrapRef diff --git a/src/pages.json b/src/pages.json index 67484a9..b9d5964 100644 --- a/src/pages.json +++ b/src/pages.json @@ -34,4 +34,4 @@ "navigationStyle": "custom" }, "subPackages": [] -} +} \ No newline at end of file diff --git a/src/pages/feed-plan/index.vue b/src/pages/feed-plan/index.vue index 37979ab..1798e87 100644 --- a/src/pages/feed-plan/index.vue +++ b/src/pages/feed-plan/index.vue @@ -3,7 +3,7 @@ import bg from '@/static/image/feed-plan/bg.png' import circle from '@/static/image/feed-plan/circle.png' import message from '@/static/image/feed-plan/message.png' -import ToolFun from '@/utils' +import ToolFun from '@/utils/index' interface ListItem { img: string diff --git a/src/utils/index.js b/src/utils/index.js deleted file mode 100644 index a76042b..0000000 --- a/src/utils/index.js +++ /dev/null @@ -1,10 +0,0 @@ -class ToolFun { - static getSafeHeight() { - const systemInfo = uni.getSystemInfoSync() - const safeAreaInsetBottom = systemInfo.safeAreaInsets.bottom + systemInfo.safeAreaInsets.top - const menuButtonInfoHeight = uni.getMenuButtonBoundingClientRect().height + 60 - return safeAreaInsetBottom + menuButtonInfoHeight - } -} - -export default ToolFun diff --git a/src/utils/index.ts b/src/utils/index.ts new file mode 100644 index 0000000..9e46897 --- /dev/null +++ b/src/utils/index.ts @@ -0,0 +1,10 @@ +class ToolFun { + static getSafeHeight(): number { + const systemInfo: UniApp.GetSystemInfoResult = uni.getSystemInfoSync() + const safeAreaInsetBottom: number = systemInfo.safeAreaInsets.bottom + systemInfo.safeAreaInsets.top + const menuButtonInfoHeight: number = uni.getMenuButtonBoundingClientRect().height + 60 + return safeAreaInsetBottom + menuButtonInfoHeight + } +} + +export default ToolFun