-
-
Notifications
You must be signed in to change notification settings - Fork 11
/
Copy pathenhanceApp.js
32 lines (31 loc) · 1.05 KB
/
enhanceApp.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
import Vuex from 'vuex'
//import './timetableStyles.css'
//import timetable from 'vue-timetable'
//Vue.use(timetable)
import VueChartkick from 'vue-chartkick'
import Chart from 'chart.js'
import VueGoodTable from 'vue-good-table';
// import the styles
//import 'vue-good-table/dist/vue-good-table.css'
export default ({ Vue, options, router, siteData }) => {
Vue.use(Vuex)
Vue.use(VueChartkick, {adapter: Chart})
Vue.use(VueGoodTable)
Vue.mixin({
computed: {
$title() {
const page = this.$page
const siteTitle = this.$siteTitle
const selfTitle = page.frontmatter.home ? null : (
page.frontmatter.title || // explicit title
(page.title ? page.title.replace(/[_`]/g, '') : '') // inferred title
)
return siteTitle
? selfTitle
? (selfTitle + ' | ' + siteTitle)
: siteTitle
: selfTitle || 'VuePress'
}
}
})
}