Closed jonathanpmartins closed 3 years ago
New Way of doing things....
import Vue from 'vue'
import money from 'v-money'
const app = Vue.createApp({
/* options */
})
// register directive v-money3 and component <money3>
app.use(money)
import Vue from 'vue'
import Money3Directive from 'v-money'
const app = Vue.createApp({
/* options */
})
// register directive v-money3
app.directive('money3', Money3Directive)
import Vue from 'vue'
import Money3Component from 'v-money'
const app = Vue.createApp({
/* options */
})
// register component <money3>
app.component('money3', Money3Component)
@joserick take a look at this new release https://github.com/jonathanpmartins/v-money3/releases/tag/3.7.0 Implemented a clear way for importing component and/or directive
This issue was originally open by @mesqueeb (https://github.com/vuejs-tips/v-money/issues/59) in the old v-money
repository.
@mesqueeb posted a pull request (https://github.com/vuejs-tips/v-money/pull/61) that fixes this issue. But it was never merged.
Old way of doing things:
A. Globally