Skip to content

Commit baad3a1

Browse files
committed
added browser mode auto install
1 parent d7cc4e7 commit baad3a1

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

src/index.js

+7-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import NumberFormat from './number-format'
55

66
export { number, vNumber, options, NumberFormat }
77

8-
export default {
8+
const VueNumberFormat = {
99
install(app, config = {}) {
1010
if (config) {
1111
Object.assign(options, config)
@@ -14,3 +14,9 @@ export default {
1414
app.component('number', number)
1515
},
1616
}
17+
18+
export default VueNumberFormat
19+
20+
if (typeof window !== 'undefined' && window.Vue) {
21+
window.Vue.use(VueNumberFormat)
22+
}

0 commit comments

Comments
 (0)