数据写法
.vue文件中
<p>{{$t("page.orders.remainingDocuments")}}</p> //在标签外部
<el-date-picker
:start-placeholder="$t('page.orders.startTime')"
:end-placeholder="$t('page.orders.endTime')" >
</el-date-picker> //在标签内部
switch (status) {
case "PAY_FAIL":
return this.$t('page.orders.payToStatus.PAY_FAIL');break
case "PAY_SUCCESS":
return this.$t('page.orders.payToStatus.PAY_SUCCESS');break //js代码块里面的this
en.js文件中:
remainingDocuments: "Remaining documents", //在标签外部
startTime: "Start date", //在标签内部
endTime: "End date", //在标签内部
zh.js文件中
zh.js文件中:
remainingDocuments: "剩余文档", //在标签外部
startTime: "开始日期", //在标签内部
endTime: "结束日期", //在标签内部
在数组中表示
.vue文件:
<el-tooltip placement="top">
<div slot="content">
{{$t('page.envelopes.editor.contractNoTip[0]')}}<br/>
{{$t('page.envelopes.editor.contractNoTip[1]')}}<br/>
<br/>
{{$t('page.envelopes.editor.contractNoTip[2]')}}</div>
<i class="el-icon-question"></i>
</el-tooltip>
zh.js文件:
contractNoTip: [
"Rule:<Abbreviation of company name>-<type>-<time>-<Contract serial number>",
"Example:YQQ-LD-20190711-0001",
"Please fill in according to the number management rules of your company",
],
en.js文件:
contractNoTip: [
"规则:公司名称缩写-合同/业务类型-年月日-合同流水号",
"示例:YQQ-LD-20190711-0001",
"请根据您公司的编号管理规则填写",
],