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>
|
<Container>
|
||||||
<PageHeader
|
<PageHeader
|
||||||
slot="header"
|
slot="header"
|
||||||
title="示例1"
|
title="示例 1"
|
||||||
url="http://kazupon.github.io/vue-i18n/en/">
|
url="http://kazupon.github.io/vue-i18n/en/">
|
||||||
</PageHeader>
|
</PageHeader>
|
||||||
<div class="dd-mb">
|
<DemoI18nControl></DemoI18nControl>
|
||||||
<el-radio-group v-model="lang" @change="handleChange">
|
<DemoI18n></DemoI18n>
|
||||||
<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>
|
|
||||||
</Container>
|
</Container>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
|
import DemoI18nControl from './components/DemoI18nControl'
|
||||||
|
import DemoI18n from './components/DemoI18n'
|
||||||
export default {
|
export default {
|
||||||
data () {
|
components: {
|
||||||
return {
|
DemoI18nControl,
|
||||||
lang: 'CN'
|
DemoI18n
|
||||||
}
|
|
||||||
},
|
|
||||||
methods: {
|
|
||||||
handleChange (val) {
|
|
||||||
this.$i18n.locale = val
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
|||||||
@@ -2,31 +2,21 @@
|
|||||||
<Container>
|
<Container>
|
||||||
<PageHeader
|
<PageHeader
|
||||||
slot="header"
|
slot="header"
|
||||||
title="示例2"
|
title="示例 2"
|
||||||
url="http://kazupon.github.io/vue-i18n/en/">
|
url="http://kazupon.github.io/vue-i18n/en/">
|
||||||
</PageHeader>
|
</PageHeader>
|
||||||
<div class="dd-mb">
|
<DemoI18nControl></DemoI18nControl>
|
||||||
<el-radio-group v-model="lang" @change="handleChange">
|
<DemoI18n></DemoI18n>
|
||||||
<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>
|
|
||||||
</Container>
|
</Container>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
|
import DemoI18nControl from './components/DemoI18nControl'
|
||||||
|
import DemoI18n from './components/DemoI18n'
|
||||||
export default {
|
export default {
|
||||||
data () {
|
components: {
|
||||||
return {
|
DemoI18nControl,
|
||||||
lang: 'CN'
|
DemoI18n
|
||||||
}
|
|
||||||
},
|
|
||||||
methods: {
|
|
||||||
handleChange (val) {
|
|
||||||
this.$i18n.locale = val
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user