Skip to content

Commit aac1116

Browse files
committed
快速上手
1 parent bb611f7 commit aac1116

File tree

4 files changed

+18
-3
lines changed

4 files changed

+18
-3
lines changed

package.json

+1
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
"@sentry/vite-plugin": "^2.10.2",
1313
"@sentry/vue": "^7.93.0",
1414
"@unocss/reset": "^0.58.3",
15+
"@vercel/analytics": "^1.1.3",
1516
"@vercel/speed-insights": "^1.0.9",
1617
"vue": "^3.3.11"
1718
},

pnpm-lock.yaml

+13
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/App.vue

-2
Original file line numberDiff line numberDiff line change
@@ -20,12 +20,10 @@ import ThemeComponent from "@/components/toogleTheme/ThemeComponent.vue";
2020
2121
onMounted(() => {
2222
})
23-
import { SpeedInsights } from "@vercel/speed-insights/next"
2423
2524
</script>
2625

2726
<template>
28-
<speed-insights/>
2927
<button class="button" @click=" tip({ type: 'warn', str: '我是提示框' }) ">click</button>
3028

3129

src/main.ts

+4-1
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,11 @@ import "@/assets/global.css"
88
import 'virtual:svg-icons-register'
99
import SvgIcon from "@/common/SvgIcon.vue";
1010
const app = createApp(App);
11+
import { inject } from '@vercel/analytics';
12+
import { injectSpeedInsights } from '@vercel/speed-insights';
1113

12-
14+
injectSpeedInsights();
15+
inject();
1316
app.component('svg-icon', SvgIcon)
1417

1518
// // 应用级别的错误处理器

0 commit comments

Comments
 (0)