add basic

This commit is contained in:
shaohaojiecoder
2020-02-07 22:05:52 +08:00
parent 680a547df4
commit ba142266fb
19 changed files with 487 additions and 122 deletions

View File

@@ -7,11 +7,12 @@
</template>
<script>
import zhCN from 'ant-design-vue/lib/locale-provider/zh_CN'
import i18n from '@/locales'
import { AppDeviceEnquire } from '@/utils/mixin'
import { mixin } from '@/store/i18n-mixin'
export default {
mixins: [AppDeviceEnquire],
mixins: [AppDeviceEnquire, mixin],
provide () {
return {
reload: this.reload
@@ -19,11 +20,16 @@ export default {
},
data () {
return {
locale: zhCN,
locale: {},
alive: true
}
},
mounted () {},
created () {
this.$watch('currentLang', () => {
this.locale = i18n.getLocaleMessage(this.currentLang).antLocale
})
},
methods: {
reload () {
this.alive = false