no message

Former-commit-id: 07c9ad367d783208789e834c572365af586eaabe
Former-commit-id: 54230eb22ac1974f7343117f3d9a02c8e3bdf310
Former-commit-id: 7d8a2c68e87856bf833aa87525eb117888d5bc6b
This commit is contained in:
李杨
2018-02-13 21:08:01 +08:00
parent 3072a117f2
commit 3299077db8
3 changed files with 10 additions and 7 deletions

View File

@@ -1,4 +1,3 @@
export const message = {
language: '语言',
hello: '你好,世界'
}

View File

@@ -1,4 +1,3 @@
export const message = {
language: 'language',
hello: 'hello world'
hello: 'Hello World'
}

View File

@@ -1,12 +1,12 @@
<template>
<Container>
<div>
<el-radio-group v-model="lang">
<el-radio-group v-model="lang" @change="handleChange">
<el-radio-button label="CN">中文</el-radio-button>
<el-radio-button label="EN">英语</el-radio-button>
<el-radio-button label="EN">English</el-radio-button>
</el-radio-group>
</div>
{{$t('message.hello')}}
<p>{{$t('message.hello')}}</p>
</Container>
</template>
@@ -14,7 +14,12 @@
export default {
data () {
return {
lang: ''
lang: 'CN'
}
},
methods: {
handleChange (val) {
this.$i18n.locale = val
}
}
}