no message
Former-commit-id: 40c2da50053039ef742f2c3f53c4024956a6b3d9 Former-commit-id: b8a0113ea6e18f190f14d3245bafc3c8b180d577 Former-commit-id: 44af2f67c2f8a3d5b25e0a37c6d1ae9608b3e22f
This commit is contained in:
32
src/pages/demo/plugins/vue-i18n/demo-2.vue
Normal file
32
src/pages/demo/plugins/vue-i18n/demo-2.vue
Normal file
@@ -0,0 +1,32 @@
|
||||
<template>
|
||||
<Container>
|
||||
<PageHeader
|
||||
slot="header"
|
||||
title="示例2"
|
||||
url="http://kazupon.github.io/vue-i18n/en/">
|
||||
</PageHeader>
|
||||
<div>
|
||||
<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>
|
||||
</Container>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
data () {
|
||||
return {
|
||||
lang: 'CN'
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
handleChange (val) {
|
||||
this.$i18n.locale = val
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
@@ -62,6 +62,16 @@ export const menu = {
|
||||
requiresAuth: true
|
||||
},
|
||||
component: resolve => { require(['@/pages/demo/plugins/vue-i18n/demo-1.vue'], resolve) }
|
||||
},
|
||||
{
|
||||
title: '示例 2',
|
||||
icon: 'file-o',
|
||||
path: 'vue-i18n/demo-2',
|
||||
name: 'demo-plugins-vue-i18n-demo-2',
|
||||
meta: {
|
||||
requiresAuth: true
|
||||
},
|
||||
component: resolve => { require(['@/pages/demo/plugins/vue-i18n/demo-2.vue'], resolve) }
|
||||
}
|
||||
]
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user