refactor(dev): 将 $__DEV__ 重命名为 __DEV__

This commit is contained in:
严浩
2025-08-14 14:31:19 +08:00
parent 231249b357
commit 1d4f3b601a
12 changed files with 14 additions and 14 deletions

View File

@@ -2,7 +2,7 @@ import { autoAnimatePlugin } from '@formkit/auto-animate/vue';
import { createHead } from '@unhead/vue/client';
export function install({ app }: { app: import('vue').App<Element> }) {
app.config.globalProperties.$__DEV__ = $__DEV__;
app.config.globalProperties.__DEV__ = __DEV__;
app.use(autoAnimatePlugin); // v-auto-animate="{ duration: 100 }"

View File

@@ -14,7 +14,7 @@ const router = createRouter({
strict: true,
});
if (import.meta.hot) handleHotUpdate(router);
if ($__DEV__) Object.assign(globalThis, { router });
if (__DEV__) Object.assign(globalThis, { router });
router.onError((error) => {
console.debug('🚨 [router error]:', error);
});