Skip to content

Commit a5a32b3

Browse files
committed
refactor: update plugin install for Vue 3 API
1 parent b58b4c4 commit a5a32b3

1 file changed

Lines changed: 8 additions & 7 deletions

File tree

src/index.js

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,13 @@ import County from './components/counties.vue'
44
import ZipcodeGroupby from './components/zipcodes.groupby.vue'
55

66
// Declare install function executed by Vue.use()
7-
export function install(Vue) {
7+
export function install(app) {
88
if (install.installed) return;
99
install.installed = true
1010

11-
Vue.component('county', County)
12-
Vue.component('zipcode', Zipcode)
13-
Vue.component('zipcode-groupby', ZipcodeGroupby)
11+
app.component('county', County)
12+
app.component('zipcode', Zipcode)
13+
app.component('zipcode-groupby', ZipcodeGroupby)
1414
}
1515

1616
// Create module definition for Vue.use()
@@ -30,8 +30,9 @@ if (GlobalVue) {
3030
}
3131

3232
// To allow use as module (npm/webpack/etc.) export component
33+
export default plugin
3334
export {
34-
Zipcode,
35-
County,
36-
ZipcodeGroupby
35+
Zipcode,
36+
County,
37+
ZipcodeGroupby
3738
}

0 commit comments

Comments
 (0)