Skip to content

Commit c151f09

Browse files
committed
Export VueSkipTo component
1 parent ac33193 commit c151f09

File tree

2 files changed

+15
-10
lines changed

2 files changed

+15
-10
lines changed

src/index.js

Lines changed: 3 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,5 @@
1-
import VueSkipTo from './VueSkipTo.vue'
1+
import VueSkipToPlugin from './plugin'
22

3-
export default function install (Vue) {
4-
if (install.installed) return
5-
install.installed = true
6-
Vue.component('VueSkipTo', VueSkipTo)
7-
}
3+
export default VueSkipToPlugin
84

9-
// auto install
10-
if (typeof window !== 'undefined' && typeof window.Vue !== 'undefined') {
11-
window.Vue.use(install)
12-
}
5+
export { default as VueSkipTo } from './VueSkipTo.vue'

src/plugin.js

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
import VueSkipTo from './VueSkipTo.vue'
2+
3+
export default function install (Vue) {
4+
if (install.installed) return
5+
install.installed = true
6+
Vue.component('VueSkipTo', VueSkipTo)
7+
}
8+
9+
// auto install
10+
if (typeof window !== 'undefined' && typeof window.Vue !== 'undefined') {
11+
window.Vue.use(install)
12+
}

0 commit comments

Comments
 (0)