提交 4c745c5e 编写于 作者: zhangpingchuan's avatar zhangpingchuan

Update App.vue.ftl

上级 5072e8c0
...@@ -34,18 +34,6 @@ TARGET=PSSYSAPP ...@@ -34,18 +34,6 @@ TARGET=PSSYSAPP
</a-layout-content> </a-layout-content>
</a-layout> </a-layout>
</a-layout> </a-layout>
<#-- <div class="app-setting">
<a-icon type="setting" @click="showModal" />
</div>
<a-modal :title="$t('moresetting')" v-model="visible" @ok="handleOk">
<div class="current-langue">
<span>{{$t('changelanguage')}}</span>
<a-radio-group v-model="curLangue" @change="handleChange">
<a-radio-button value="zh">{{$t('chinese')}}</a-radio-button>
<a-radio-button value="en">{{$t('english')}}</a-radio-button>
</a-radio-group>
</div>
</a-modal> -->
</div> </div>
</a-locale-provider> </a-locale-provider>
</template> </template>
...@@ -73,29 +61,19 @@ export default { ...@@ -73,29 +61,19 @@ export default {
data() { data() {
return { return {
curSelected: "0", curSelected: "0",
visible: false,
curLangue: "zh",
locale: zhCN locale: zhCN
}; };
}, },
created() { created() {
if (Object.is(window.localStorage.getItem("curLang"), "zh")) { if (Object.is(window.localStorage.getItem("curLang"), "zh")) {
this.curLangue = "zh";
this.$i18n.locale = "zh";
this.locale = zhCN; this.locale = zhCN;
} else { } else {
this.curLangue = "en";
this.$i18n.locale = "en";
this.locale = enUS; this.locale = enUS;
} }
AppService.getInstance().subject.subscribe(res => { AppService.getInstance().subject.subscribe(res => {
if (Object.is(res, "zh")) { if (Object.is(res, "zh")) {
this.curLangue = "zh";
this.$i18n.locale = "zh";
this.locale = zhCN; this.locale = zhCN;
} else { } else {
this.curLangue = "en";
this.$i18n.locale = "en";
this.locale = enUS; this.locale = enUS;
} }
this.$forceUpdate(); this.$forceUpdate();
...@@ -104,15 +82,6 @@ export default { ...@@ -104,15 +82,6 @@ export default {
methods: { methods: {
handleClick(e) { handleClick(e) {
this.curSelected = e.key; this.curSelected = e.key;
},
handleOk() {
this.visible = false;
},
showModal() {
this.visible = true;
},
handleChange() {
AppService.getInstance().changeLanguage(this.curLangue);
} }
} }
}; };
...@@ -139,16 +108,4 @@ export default { ...@@ -139,16 +108,4 @@ export default {
text-align: center; text-align: center;
margin: 16px; margin: 16px;
} }
<#-- .app-setting {
position: fixed;
top: 30%;
right: 8px;
font-size: 24px;
cursor: pointer;
}
.current-langue {
display: flex;
justify-content: space-between;
align-items: center;
} -->
</style> </style>
\ No newline at end of file
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册