Skip to content
This repository was archived by the owner on Jun 23, 2023. It is now read-only.

Commit 1fe8d2c

Browse files
committed
update README.
1 parent 25193f9 commit 1fe8d2c

File tree

1 file changed

+22
-0
lines changed

1 file changed

+22
-0
lines changed

README.md

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -104,6 +104,28 @@ createApp(app)
104104
.mount('#app');
105105
```
106106

107+
### 在 VuePress 里使用
108+
109+
插件也支持在Vue的静态文档 [VuePress](https://vuepress.vuejs.org/zh/) 项目里使用。
110+
111+
在项目下的 `/docs/.vuepress` 文件夹下,创建一个 `enhanceApp.js`,按照下面的方式引入即可启动数据上报功能。
112+
113+
官方文档传送门:[应用级别的配置 - VuePress](https://vuepress.vuejs.org/zh/guide/basic-config.html#%E5%BA%94%E7%94%A8%E7%BA%A7%E5%88%AB%E7%9A%84%E9%85%8D%E7%BD%AE)
114+
115+
```js
116+
import cnzzAnalytics from 'vue-cnzz-analytics'
117+
118+
export default ({ Vue, router }) => {
119+
Vue.use(cnzzAnalytics, {
120+
router: router,
121+
siteIdList: [
122+
11111
123+
],
124+
isDebug: false
125+
});
126+
};
127+
```
128+
107129
可在开发环境打开debug模式了解相关的上报情况(上线前记得关闭debug)。
108130

109131
## 方法

0 commit comments

Comments
 (0)