mirror of
https://github.com/crawlab-team/crawlab.git
synced 2026-01-23 17:31:11 +01:00
updated README
This commit is contained in:
@@ -12,8 +12,6 @@ import 'font-awesome/scss/font-awesome.scss'// FontAwesome
|
||||
|
||||
import 'codemirror/lib/codemirror.css'
|
||||
|
||||
// import ba from 'vue-ba'
|
||||
|
||||
import App from './App'
|
||||
import store from './store'
|
||||
import router from './router'
|
||||
@@ -23,6 +21,7 @@ import '@/permission' // permission control
|
||||
|
||||
import request from './api/request'
|
||||
import i18n from './i18n'
|
||||
import utils from './utils'
|
||||
|
||||
Vue.use(ElementUI, { locale })
|
||||
|
||||
@@ -45,6 +44,12 @@ window._hmt = window._hmt || [];
|
||||
// inject request api
|
||||
Vue.prototype.$request = request
|
||||
|
||||
// inject utils
|
||||
Vue.prototype.$utils = utils
|
||||
|
||||
// inject stats
|
||||
Vue.prototype.$st = utils.stats
|
||||
|
||||
const app = new Vue({
|
||||
el: '#app',
|
||||
i18n,
|
||||
|
||||
@@ -1,6 +1,8 @@
|
||||
import Vue from 'vue'
|
||||
import Router from 'vue-router'
|
||||
|
||||
import stats from '../utils/stats'
|
||||
|
||||
/* Layout */
|
||||
import Layout from '../views/layout/Layout'
|
||||
|
||||
@@ -225,7 +227,7 @@ router.beforeEach((to, from, next) => {
|
||||
router.afterEach((to, from, next) => {
|
||||
if (to.path) {
|
||||
if (localStorage.getItem('useStats') !== '0') {
|
||||
window._hmt.push(['_trackPageview', to.path])
|
||||
stats.sendPv(to.path)
|
||||
}
|
||||
}
|
||||
})
|
||||
|
||||
@@ -0,0 +1,5 @@
|
||||
import stats from './stats'
|
||||
|
||||
export default {
|
||||
stats
|
||||
}
|
||||
|
||||
@@ -0,0 +1,8 @@
|
||||
export default {
|
||||
sendPv (page) {
|
||||
window._hmt.push(['_trackPageview', page])
|
||||
},
|
||||
sendEv (ev) {
|
||||
window._hmt.push(['_trackCustomEvent', ev])
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user