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

zpc

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