提交 695c6477 编写于 作者: zhangpingchuan's avatar zhangpingchuan

zpc

上级 a7115da0
...@@ -5,6 +5,7 @@ ${P.getPartCode(item,'FORM').code} ...@@ -5,6 +5,7 @@ ${P.getPartCode(item,'FORM').code}
<script> <script>
import { FormButtonModel,FormDetailModel,FormItemModel,FormDRUIPartModel,FormGroupPanelModel,FormIFrameModel,FormPageModel,FormPartModel,FormRowItemModel,FormTabPageModel,FormTabPanelModel,FormUserControlModel} from "@models/index.js"; import { FormButtonModel,FormDetailModel,FormItemModel,FormDRUIPartModel,FormGroupPanelModel,FormIFrameModel,FormPageModel,FormPartModel,FormRowItemModel,FormTabPageModel,FormTabPanelModel,FormUserControlModel} from "@models/index.js";
import ComUtil from '@utils/ComUtil'; import ComUtil from '@utils/ComUtil';
import AppService from "@service/AppService";
export default { export default {
name: "${ctrl.getCodeName()}${ctrl.getName()}", name: "${ctrl.getCodeName()}${ctrl.getName()}",
...@@ -12,6 +13,12 @@ export default { ...@@ -12,6 +13,12 @@ export default {
data() { data() {
return { return {
/**
* 当前语言
*
*/
local:"",
/** /**
* 激活分组 * 激活分组
* *
...@@ -77,6 +84,7 @@ export default { ...@@ -77,6 +84,7 @@ export default {
created(){ created(){
this.initForm(); this.initForm();
this.initlangu();
}, },
methods: { methods: {
...@@ -93,6 +101,25 @@ export default { ...@@ -93,6 +101,25 @@ export default {
} }
}, },
/**
* 初始化语言
*
*/
initlangu(){
if (Object.is(window.localStorage.getItem("curLang"), "zh")) {
this.local ="zh_CN";
} else {
this.local ="en_GB";
}
AppService.getInstance().subject.subscribe(res => {
if (Object.is(res, "zh")) {
this.local ="zh_CN";
} else {
this.local ="en_GB";
}
});
},
/** /**
* 分页选中 * 分页选中
* *
......
<app-rich-text-editor v-model="data.${item.name}" @change="formItemChange('${item.name}',$event)" :disabled="detailsModel.${item.name}.disabled" <#if item.getEditorHeight() gt 0> height={${item.getEditorHeight()?c}}</#if> style="${item.getEditorCssStyle()}"></app-rich-text-editor> <app-rich-text-editor v-model="data.${item.name}" @change="formItemChange('${item.name}',$event)" :disabled="detailsModel.${item.name}.disabled" :langu="local" <#if item.getEditorHeight() gt 0> height={${item.getEditorHeight()?c}}</#if> style="${item.getEditorCssStyle()}"></app-rich-text-editor>
\ No newline at end of file \ No newline at end of file
...@@ -73,27 +73,29 @@ export default { ...@@ -73,27 +73,29 @@ export default {
return { return {
curSelected: "0", curSelected: "0",
visible: false, visible: false,
curLangue: "" curLangue: "zh",
locale: zhCN
}; };
}, },
computed: { created() {
locale: function() { if (Object.is(window.localStorage.getItem("curLang"), "zh")) {
if (Object.is(this.curLangue, "zh")) { this.curLangue = "zh";
return zhCN; this.$i18n.locale = "zh";
this.locale = zhCN;
} else { } else {
return null; this.curLangue = "en";
} this.$i18n.locale = "en";
this.$forceUpdate(); this.locale = enUS;
} }
},
created() {
AppService.getInstance().subject.subscribe(res => { AppService.getInstance().subject.subscribe(res => {
if (Object.is(res, "zh")) { if (Object.is(res, "zh")) {
this.curLangue = "zh"; this.curLangue = "zh";
this.$i18n.locale = 'zh' this.$i18n.locale = "zh";
this.locale = zhCN;
} else { } else {
this.curLangue = "en"; this.curLangue = "en";
this.$i18n.locale = 'en' this.$i18n.locale = "en";
this.locale = enUS;
} }
this.$forceUpdate(); this.$forceUpdate();
}); });
...@@ -116,7 +118,7 @@ export default { ...@@ -116,7 +118,7 @@ export default {
</script> </script>
<style> <style>
.ant-layout.ant-layout-has-sider{ .ant-layout.ant-layout-has-sider {
min-height: 100vh; min-height: 100vh;
} }
#components-layout-demo-custom-trigger .trigger { #components-layout-demo-custom-trigger .trigger {
......
...@@ -6,6 +6,7 @@ export default { ...@@ -6,6 +6,7 @@ export default {
changelanguage:"change language", changelanguage:"change language",
chinese:"chinese", chinese:"chinese",
english:"english", english:"english",
upload:"Upload",
<#if app.getAllPSAppViews()??> <#if app.getAllPSAppViews()??>
<#list app.getAllPSAppViews() as singleView> <#list app.getAllPSAppViews() as singleView>
${singleView.name?lower_case}:{ ${singleView.name?lower_case}:{
......
...@@ -6,6 +6,7 @@ export default { ...@@ -6,6 +6,7 @@ export default {
changelanguage:"语言修改", changelanguage:"语言修改",
chinese:"中文", chinese:"中文",
english:"英文", english:"英文",
upload:"上传",
<#if app.getAllPSAppViews()??> <#if app.getAllPSAppViews()??>
<#list app.getAllPSAppViews() as singleView> <#list app.getAllPSAppViews() as singleView>
${singleView.name?lower_case}:{ ${singleView.name?lower_case}:{
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册