From 508ca330bcc5e805cdf07b2c6a392aeb86021051 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E6=9D=8E=E6=9D=A8?= <1711467488@qq.com>
Date: Tue, 13 Feb 2018 23:34:20 +0800
Subject: [PATCH] no message
Former-commit-id: dfb70c261eb670133d905f25fc525f59d01a05f2
Former-commit-id: 38532f4c1cd8b63afadd21d80e4f7a56200ecbdf
Former-commit-id: 589c68cc6aad2aadb828be5bda04c9eea2ad0bed
---
build/vue-loader.conf.js | 11 +++++++----
package.json | 1 +
.../plugins/vue-i18n/components/DemoI18n.vue | 16 +++++++++++++++-
3 files changed, 23 insertions(+), 5 deletions(-)
diff --git a/build/vue-loader.conf.js b/build/vue-loader.conf.js
index 33ed58bc..0f0ddbc6 100755
--- a/build/vue-loader.conf.js
+++ b/build/vue-loader.conf.js
@@ -7,10 +7,13 @@ const sourceMapEnabled = isProduction
: config.dev.cssSourceMap
module.exports = {
- loaders: utils.cssLoaders({
- sourceMap: sourceMapEnabled,
- extract: isProduction
- }),
+ loaders: {
+ ...utils.cssLoaders({
+ sourceMap: sourceMapEnabled,
+ extract: isProduction
+ }),
+ i18n: '@kazupon/vue-i18n-loader'
+ },
cssSourceMap: sourceMapEnabled,
cacheBusting: config.dev.cacheBusting,
transformToRequire: {
diff --git a/package.json b/package.json
index fe6a7128..6211efea 100755
--- a/package.json
+++ b/package.json
@@ -37,6 +37,7 @@
"xlsx": "^0.12.0"
},
"devDependencies": {
+ "@kazupon/vue-i18n-loader": "^0.2.1",
"autoprefixer": "^7.1.2",
"babel-core": "^6.22.1",
"babel-eslint": "^7.1.1",
diff --git a/src/pages/demo/plugins/vue-i18n/components/DemoI18n.vue b/src/pages/demo/plugins/vue-i18n/components/DemoI18n.vue
index e8558316..3e5d6eb0 100644
--- a/src/pages/demo/plugins/vue-i18n/components/DemoI18n.vue
+++ b/src/pages/demo/plugins/vue-i18n/components/DemoI18n.vue
@@ -1,3 +1,17 @@
+
+{
+ "cn": {
+ "hello": "你好!"
+ },
+ "en": {
+ "hello": "hello world!"
+ },
+ "ja": {
+ "hello": "こんにちは、世界!"
+ }
+}
+
+
- Hello
+ {{$t('hello')}}