Skip to content

Commit 9241c34

Browse files
committed
feat(locale): support auto get Vue value
1 parent 3ebc731 commit 9241c34

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/common/mixins/locale.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
import locale from '../locale'
12
import { parsePath, isUndef } from '../helpers/util'
23
import { warn } from '../helpers/debug'
34

@@ -17,5 +18,8 @@ export default {
1718
return parsePath(messages, path)
1819
}
1920
}
21+
},
22+
beforeCreate() {
23+
locale.install(this.$root.constructor)
2024
}
2125
}

0 commit comments

Comments
 (0)