no message
Former-commit-id: b10907f05b3edf4f989f88aeb3dfd791e6193f68 Former-commit-id: 2c3cd9fbb8dd48e806059f68f7bf572d54f7ea5a Former-commit-id: 19fa12c189c6e7e91583a9ffdcaa5c01cfd60170
This commit is contained in:
3
src/pages/demo/plugins/vue-i18n/components/DemoI18n.vue
Normal file
3
src/pages/demo/plugins/vue-i18n/components/DemoI18n.vue
Normal file
@@ -0,0 +1,3 @@
|
||||
<template>
|
||||
<el-button>{{$t('message.hello')}}</el-button>
|
||||
</template>
|
||||
@@ -0,0 +1,24 @@
|
||||
<template>
|
||||
<div class="dd-mb">
|
||||
<el-radio-group v-model="lang" @change="handleChange">
|
||||
<el-radio-button label="CN">中文</el-radio-button>
|
||||
<el-radio-button label="EN">English</el-radio-button>
|
||||
</el-radio-group>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
data () {
|
||||
return {
|
||||
lang: 'CN'
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
handleChange (val) {
|
||||
this.$i18n.locale = val
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
@@ -2,31 +2,21 @@
|
||||
<Container>
|
||||
<PageHeader
|
||||
slot="header"
|
||||
title="示例1"
|
||||
title="示例 1"
|
||||
url="http://kazupon.github.io/vue-i18n/en/">
|
||||
</PageHeader>
|
||||
<div class="dd-mb">
|
||||
<el-radio-group v-model="lang" @change="handleChange">
|
||||
<el-radio-button label="CN">中文</el-radio-button>
|
||||
<el-radio-button label="EN">English</el-radio-button>
|
||||
</el-radio-group>
|
||||
</div>
|
||||
<el-button>{{$t('message.hello')}}</el-button>
|
||||
<DemoI18nControl></DemoI18nControl>
|
||||
<DemoI18n></DemoI18n>
|
||||
</Container>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import DemoI18nControl from './components/DemoI18nControl'
|
||||
import DemoI18n from './components/DemoI18n'
|
||||
export default {
|
||||
data () {
|
||||
return {
|
||||
lang: 'CN'
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
handleChange (val) {
|
||||
this.$i18n.locale = val
|
||||
}
|
||||
components: {
|
||||
DemoI18nControl,
|
||||
DemoI18n
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
|
||||
@@ -2,31 +2,21 @@
|
||||
<Container>
|
||||
<PageHeader
|
||||
slot="header"
|
||||
title="示例2"
|
||||
title="示例 2"
|
||||
url="http://kazupon.github.io/vue-i18n/en/">
|
||||
</PageHeader>
|
||||
<div class="dd-mb">
|
||||
<el-radio-group v-model="lang" @change="handleChange">
|
||||
<el-radio-button label="CN">中文</el-radio-button>
|
||||
<el-radio-button label="EN">English</el-radio-button>
|
||||
</el-radio-group>
|
||||
</div>
|
||||
<p>{{$t('message.hello')}}</p>
|
||||
<DemoI18nControl></DemoI18nControl>
|
||||
<DemoI18n></DemoI18n>
|
||||
</Container>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import DemoI18nControl from './components/DemoI18nControl'
|
||||
import DemoI18n from './components/DemoI18n'
|
||||
export default {
|
||||
data () {
|
||||
return {
|
||||
lang: 'CN'
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
handleChange (val) {
|
||||
this.$i18n.locale = val
|
||||
}
|
||||
components: {
|
||||
DemoI18nControl,
|
||||
DemoI18n
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user