diff --git a/package.json b/package.json index ef39579ee..a4e01ec33 100644 --- a/package.json +++ b/package.json @@ -36,7 +36,7 @@ "babel-plugin-istanbul": "^6.0.0", "babel-preset-power-assert": "^3.0.0", "buble": "^0.19.3", - "chromedriver": "^93.0.0", + "chromedriver": "^95.0.0", "core-js": "^3.6.5", "cross-env": "^7.0.2", "cross-spawn": "^7.0.3", diff --git a/src/index.js b/src/index.js index e0c539101..ce7fb29fb 100644 --- a/src/index.js +++ b/src/index.js @@ -266,12 +266,16 @@ export default class VueI18n { }, { deep: true }) } - watchLocale (): ?Function { + watchLocale (composer?: any): ?Function { /* istanbul ignore if */ if (!this._sync || !this._root) { return null } + const self = this const target: any = this._vm return this._root.$i18n.vm.$watch('locale', (val) => { target.$set(target, 'locale', val) + if (self.__VUE_I18N_BRIDGE__ && composer) { + composer.locale.value = val + } target.$forceUpdate() }, { immediate: true }) } diff --git a/yarn.lock b/yarn.lock index c01b0db84..b0b3ba0ca 100644 --- a/yarn.lock +++ b/yarn.lock @@ -3136,10 +3136,10 @@ chrome-trace-event@^1.0.2: dependencies: tslib "^1.9.0" -chromedriver@^93.0.0: - version "93.0.1" - resolved "https://registry.yarnpkg.com/chromedriver/-/chromedriver-93.0.1.tgz#3ed1f7baa98a754fc1788c42ac8e4bb1ab27db32" - integrity sha512-KDzbW34CvQLF5aTkm3b5VdlTrvdIt4wEpCzT2p4XJIQWQZEPco5pNce7Lu9UqZQGkhQ4mpZt4Ky6NKVyIS2N8A== +chromedriver@^95.0.0: + version "95.0.0" + resolved "https://registry.yarnpkg.com/chromedriver/-/chromedriver-95.0.0.tgz#ecf854cac6df5137a651dcc132edf55612d3db7f" + integrity sha512-HwSg7S0ZZYsHTjULwxFHrrUqEpz1+ljDudJM3eOquvqD5QKnR5pSe/GlBTY9UU2tVFRYz8bEHYC4Y8qxciQiLQ== dependencies: "@testim/chrome-version" "^1.0.7" axios "^0.21.2"