Commit 5f9f5560 authored by 沈翠玲's avatar 沈翠玲

国际化

parent 2ebc43fa
<script>
import i18n from './lang/index'
import checkappupdate from 'common/checkappupdate.js'
export default {
onLaunch: function () {
......@@ -8,10 +10,10 @@ export default {
const fn = () => {
checkappupdate.check({
title: '检测到有新版本!',
content: '请升级app到最新版本!',
canceltext: '暂不升级',
oktext: '立即升级'
title: i18n.t('检测到有新版本!'),
content: i18n.t('请升级app到最新版本!'),
canceltext: i18n.t('暂不升级'),
oktext: i18n.t('立即升级')
})
return fn // 函数中返回自身
}
......
import Vue from 'vue';
import VueI18n from 'vue-i18n';
import zh from './zh_CN.json';
import th from "./th_TH.json";
// 需要什么语言都要导入
// 使用 Vue 2 的 VueI18n
Vue.use(VueI18n);
const i18n = new VueI18n({
locale: localStorage.getItem('language') || 'zh', // 默认语言为中文
messages: {
th,
zh,
},
silentTranslationWarn: true, //解决vue-i18n黄色警告"value of key 'xxx' is not a string"和"cannot translate the value of keypath 'xxx'.use the value of keypath as default",可忽略
globalInjection: true, // 全局注入
fallbackLocale: "zh", // 指定的locale没有找到对应的资源或当前语种不存在时,默认设置当前语种为中文
});
export const setLocal = (lang) => {
localStorage.setItem('lang', lang)
i18n.locale = lang
}
export default i18n;
\ No newline at end of file
This diff is collapsed.
This diff is collapsed.
......@@ -5,6 +5,7 @@ import Vue from 'vue'
Vue.config.productionTip = false
App.mpType = 'app'
import i18n from '@/lang/index' // 引入国际化配置
import uView from '@/uview-ui';
Vue.use(uView);
......@@ -30,6 +31,7 @@ let vuexStore = require('@/store/$u.mixin.js');
Vue.mixin(vuexStore);
const app = new Vue({
i18n,
store,
...App
})
......
This source diff could not be displayed because it is too large. You can view the blob instead.
......@@ -5,6 +5,7 @@
"html2canvas": "^1.4.1",
"svg-sprite-loader": "^6.0.11",
"uni-read-pages": "^1.0.5",
"uni-simple-router": "^2.0.8-beta.4"
"uni-simple-router": "^2.0.8-beta.4",
"vue-i18n": "^10.0.0"
}
}
......@@ -39,6 +39,8 @@
</template>
<script>
import i18n from '../../lang/index'
import TabBar from "@/components/TabBar/TabBar.vue";
import TabBarItem from "@/components/TabBar/TabBarItem.vue";
......@@ -59,13 +61,13 @@ export default {
if (this.vuex_workunit && this.vuex_workunit.workunitName === '广州宝绅委外工作单元') {
return [{
path: 'PRO',
title: '外协',
title: i18n.t('外协'),
icon: require('@/static/icons/png/wx.png')
}]
} else {
return [{
path: 'PRO',
title: '生产',
title: i18n.t('生产'),
icon: require('@/static/icons/png/pro.png')
}]
}
......
......@@ -12,19 +12,18 @@
<view class="common-main">
<ProdReport v-if="tabIndex === 'PRO'"></ProdReport>
<GxContent v-else-if="tabIndex === 'GX'"></GxContent>
<QcContent v-else-if="tabIndex === 'QC'"></QcContent>
<ProContent v-if="tabIndex === 'DV'"></ProContent>
</view>
<u-modal width="90%" v-model="showWorkstationFlag" :showConfirmButton="false" :showCancelButton="true" title="请选择工作单元" content="操作内容">
<u-modal width="90%" v-model="showWorkstationFlag" :showConfirmButton="false" :cancelText="$t('取消')" :confirmText="$t('确认')" :showCancelButton="true" :title="$t('请选择工作单元')" :content="$t('操作内容')">
<view class="station_list">
<u-empty text="暂无工作单元" mode="list" v-if="workUnitList.length == 0" style="margin: 0 auto; display: block; height: 360rpx; padding: 100rpx 0"></u-empty>
<u-empty :text="$t('暂无工作单元')" mode="list" v-if="workUnitList.length == 0" style="margin: 0 auto; display: block; height: 360rpx; padding: 100rpx 0"></u-empty>
<template v-else>
<u-row>
<u-col span="3" v-for="(card, index) in workUnitList" :key="index">
<u-card class="station_card" :show-foot="false" :title="'工作单元' + card.workunitCode">
<u-card class="station_card" :show-foot="false" :title="$t('工作单元') + card.workunitCode">
<view class="station_card_text" slot="body">
<view class="workunitName">{{ '工作单元名称:' + card.workunitName }}</view>
<u-button type="primary" @click="setWorkUnit(card)" style="margin-top: 30rpx">选择</u-button>
<view class="workunitName">{{ $t('工作单元名称:') + card.workunitName }}</view>
<u-button type="primary" @click="setWorkUnit(card)" style="margin-top: 30rpx">{{$t('选择')}}</u-button>
</view>
</u-card>
</u-col>
......@@ -33,12 +32,12 @@
</view>
</u-modal>
<u-modal v-model="showLogoutMenu" :showConfirmButton="false" :showCancelButton="true" width="600px" title="请选择操作">
<u-modal :cancelText="$t('取消')" :confirmText="$t('确认')" v-model="showLogoutMenu" :showConfirmButton="false" :showCancelButton="true" width="600px" :title="$t('请选择操作')">
<view class="logoutmenu">
<u-button shape="circle" class="menu_button" @click="" type="primary">更改密码</u-button>
<u-button shape="circle" class="menu_button" @click="handleCommand('workunit')" type="warning">切换工作中心</u-button>
<u-button shape="circle" class="menu_button" @click="handleCommand('print')" type="error">默认打印机</u-button>
<u-button shape="circle" class="menu_button" @click="handleCommand('exit')" type="error">退出登录</u-button>
<u-button shape="circle" class="menu_button" @click="" type="primary">{{$t('更改密码')}}</u-button>
<u-button shape="circle" class="menu_button" @click="handleCommand('workunit')" type="warning">{{$t('切换工作中心')}}</u-button>
<u-button shape="circle" class="menu_button" @click="handleCommand('print')" type="error">{{$t('默认打印机')}}</u-button>
<u-button shape="circle" class="menu_button" @click="handleCommand('exit')" type="error">{{$t('退出登录')}}</u-button>
</view>
</u-modal>
......@@ -56,10 +55,11 @@
> -->
<u-modal
title="打印机"
:title="$t('打印机')"
:confirmText="$t('确认')"
show-cancel-button
:show-confirm-button="false"
cancel-text="返回"
:cancel-text="$t('返回')"
:title-style="{ 'background-color': '#1E3770', color: '#FFFFFF', 'line-height': '37px', 'padding-top': '0px' }"
v-model="showPrintFlag"
width="1600rpx"
......@@ -67,14 +67,14 @@
<view class="list-bar">
<u-form label-width="100px" :model="curTaskInfo"></u-form>
<scroll-view scroll-y="true" class="scroll-list" :style="{ height: this.screenHeight - 280 + 'px' }">
<uni-table ref="materialRequestTable" border stripe :loading="loading" emptyText="未查询到数据">
<uni-table ref="materialRequestTable" border stripe :loading="loading" :emptyText="$t('未查询到数据')">
<uni-tr>
<uni-th width="100px" align="center">打印机类型</uni-th>
<uni-th width="100px" align="center">打印机名称</uni-th>
<uni-th width="100px" align="center">打印机位置</uni-th>
<uni-th width="60px" align="center">型号</uni-th>
<uni-th width="60px" align="center">连接类型</uni-th>
<uni-th width="10px" align="center">操作</uni-th>
<uni-th width="100px" align="center">{{$t('打印机类型')}}</uni-th>
<uni-th width="100px" align="center">{{$t('打印机名称')}}</uni-th>
<uni-th width="100px" align="center">{{$t('打印机位置')}}</uni-th>
<uni-th width="60px" align="center">{{$t('型号')}}</uni-th>
<uni-th width="60px" align="center">{{$t('连接类型')}}</uni-th>
<uni-th width="10px" align="center">{{$t('操作')}}</uni-th>
</uni-tr>
<uni-tr v-for="(line, index) in materialRequestArrays" :key="index">
<uni-td align="center">{{ line.printerType }}</uni-td>
......@@ -84,8 +84,8 @@
<uni-td align="center">{{ line.connectionType }}</uni-td>
<uni-td align="center">
<view class="uni-group">
<button class="uni-button" v-if="line.userPrinterStatus == '1'" size="mini" type="primary">已绑定</button>
<button class="uni-button" v-else size="mini" type="primary" @click="materialRequestFormShow(line)">绑定</button>
<button class="uni-button" v-if="line.userPrinterStatus == '1'" size="mini" type="primary">{{$t('已绑定')}}</button>
<button class="uni-button" v-else size="mini" type="primary" @click="materialRequestFormShow(line)">{{$t('绑定')}}</button>
</view>
</uni-td>
</uni-tr>
......@@ -98,10 +98,11 @@
</template>
<script>
import i18n from '../../lang/index'
import TabHeader from './TabHeader.vue';
import ProContent from '../mes/pro/index.vue';
import GxContent from '../mes/gx/index.vue';
import QcContent from '../mes/qc/index.vue';
import ProdReport from '../mes/prodReport/index.vue';
import DictData from '@/components/DictData';
import UButton from '../../uview-ui/components/u-button/u-button.vue';
......@@ -112,7 +113,6 @@ export default {
TabHeader,
ProContent,
GxContent,
QcContent,
ProdReport,
UButton
},
......@@ -125,7 +125,7 @@ export default {
activeProcess: null,
loading: false,
userInfo: {
nickName: '张三',
nickName: i18n.t('张三'),
avatar: require('@/static/images/head.png')
},
materialRequestArrays: [],
......@@ -173,7 +173,7 @@ export default {
checkWorkstation() {
if (this.vuex_workunit == null) {
this.showWorkstationFlag = true;
this.$u.toast('请设置当前触控屏的工作单元!');
this.$u.toast(i18n.t('请设置当前触控屏的工作单元!'));
}
},
//获取工序清单
......@@ -184,7 +184,7 @@ export default {
this.activeProcess = res.data[0].processCode;
this.getWorkstationList({ index: 0 });
} else {
this.$u.toast('获取工序清单异常' + res.msg);
this.$u.toast(i18n.t('获取工序清单异常') + res.msg);
}
});
},
......@@ -200,7 +200,7 @@ export default {
if (res.code === 200) {
this.workstationList = res.data;
} else {
this.$u.toast('获取工作中心清单异常' + res.msg);
this.$u.toast(i18n.t('获取工作中心清单异常') + res.msg);
}
});
},
......@@ -209,7 +209,7 @@ export default {
if (res.code === 200) {
this.workUnitList = res.rows;
} else {
this.$u.toast('获取工作单元清单异常' + res.msg);
this.$u.toast(i18n.t('获取工作单元清单异常') + res.msg);
}
});
},
......@@ -224,7 +224,7 @@ export default {
this.confirmBIND(row)
} else {
uni.showLoading({
title: '绑定中'
title: i18n.t('绑定中')
})
this.currentRow = row
this.initBle()
......@@ -251,8 +251,8 @@ export default {
})
.then((res) => {
if (res.code === 200) {
if (res.msg === '操作成功') {
this.$u.toast('绑定成功');
if (res.msg === i18n.t('操作成功')) {
this.$u.toast(i18n.t('绑定成功'));
this.$u.api.getUserPrintInfo().then((res) => {
// console.log(res, 'res888')
if (res.code === 200) {
......@@ -281,7 +281,7 @@ export default {
} else if (!status) {
uni.hideLoading()
this.currentRow = null
this.$u.toast('蓝牙连接失败')
this.$u.toast(i18n.t('蓝牙连接失败'))
}
},
handleCommand(command) {
......
<template>
<view class="dmodel-table">
<u-button type="primary" size="mini" @click="commonClick('1')">上机</u-button>
<u-button style="margin-left: 20rpx" type="success" size="mini" @click="commonClick('2')">下机</u-button>
<u-button style="margin-left: 20rpx" type="success" size="mini" @click="handleScancode('1')">上机扫描</u-button>
<u-button style="margin-left: 20rpx" type="success" size="mini" @click="handleScancode('2')">下机扫描</u-button>
<zb-table :columns="tableColumn" :data="tableData" :isTrClassStyle="isTrClassStyle" :stripe="true" @toggleAllSelection="toggleAllSelection" @toggleRowSelection="toggleRowSelection">
<template slot="slot" slot-scope="scope">
<u-tag :text="scope.row.typeName" :type="getTag(scope.row)"></u-tag>
</template>
</zb-table>
</view>
</template>
<script>
export default {
props: {
data: {
type: Array,
default: () => []
}
},
dicts: ['TOOL_MACHINES_TYPE'],
data() {
return {
tableSelectData: [],
tableColumn: [
{
type: 'selection',
width: 35
},
{
type: 'slot',
name: 'typeName',
label: '状态',
width: 80
},
{
name: 'toolCode',
label: '刀模版sn码',
width: 80
},
{
name: 'toolName',
label: '刀模版名称',
width: 80
},
{
name: 'itemName',
label: '物料名称',
width: 80
},
{
name: 'upDate',
label: '上机时间',
width: 130
},
{
name: 'downDate',
label: '下机时间',
width: 130
}
],
};
},
computed: {
tableData() {
return this.data || [];
}
},
mounted () {
},
methods: {
isTrClassStyle(row, i) {
if (row.typeName === '已上机') {
return 'green'; //暂停
} else {
return ''; //第二个大
}
},
getTag(row) {
console.log(row, 'row')
const obj = {
'1': 'primary',
'2': 'success',
'3': 'info'
}
let option = this.dict.type.TOOL_MACHINES_TYPE.map(item => {
return {
...item,
type: obj[item.value]
}
})
let type = ''
option.forEach(item => {
console.log(item , 'item')
if (item.value == row.type) {
type = item.type
}
})
console.log(type, 'type')
return type
},
async commonClick(type) {
if (this.tableSelectData.length == 0) {
return this.$u.toast('请选择一条数据!');
}
// 判断选中的类型是否一致
if (this.tableSelectData.length > 1) {
let flag = false;
for (let i = 1; i < this.tableSelectData.length; i++) {
const pre = this.tableSelectData[i - 1];
const cur = this.tableSelectData[i];
flag = cur.type == pre.type;
if (!flag) {
break;
}
}
if (!flag) {
return this.$u.toast('请选择状态相同的数据');
}
}
const params = this.tableSelectData.map((v) => {
return {
toolMachinesId: v.toolMachinesId,
type
};
});
const { code } = await this.$u.api.dModel.tmToolMachinesRecord(params);
if (code == 200) {
this.$emit('action');
}
},
handleScancode(type) {
this.$emit('scan', type)
// uni.scanCode({
// success: (res) => {
// console.log(res, 'res7778888');
// this.$u.api.dModel.tmToolMachinesScancode({ type, sn: res.result }).then((res) => {
// // console.log(res, 'res333')
// if (res.code === 200) {
// this.$emit('action');
// }
// });
// }
// });
},
toggleAllSelection(checked, arr) {
this.tableSelectData = arr;
},
toggleRowSelection(checked, arr) {
this.tableSelectData = arr;
}
}
};
</script>
<style scoped lang="scss">
.dmodel-table {
height: 500rpx;
margin-top: 20rpx;
padding: 0 20rpx;
/deep/ .item-tr.green .item-td {
background: #19be6b !important;
}
}
</style>
......@@ -14,6 +14,8 @@
</template>
<script>
import i18n from '../../../../lang/index'
export default {
dicts: ["sys_report_type"],
props: {
......@@ -32,18 +34,18 @@
},
{
name: 'name',
label: '模版名称',
label: i18n.t('模版名称'),
width: 160,
},
{
type: 'slot',
name: 'reportType',
label: '模版类型',
label: i18n.t('模版类型'),
width: 200,
},
{
name: 'remark',
label: '备注',
label: i18n.t('备注'),
width: 100,
}
],
......
......@@ -2,14 +2,14 @@
<view class="dmodel-table">
<view class="search">
<u-form :model="tableParams" labelAlign="right" class="tableForm">
<u-form-item label="工号" label-width="60px" name="userName">
<uni-easyinput type="text" v-model="tableParams.userName" placeholder="请输入编号" />
<u-form-item :label="$t('工号')" label-width="60px" name="userName">
<uni-easyinput type="text" v-model="tableParams.userName" :placeholder="$t('请输入编号')" />
</u-form-item>
<u-form-item label="姓名" label-width="60px" name="nickName">
<uni-easyinput type="text" v-model="tableParams.nickName" placeholder="请输入名称" />
<u-form-item :label="$t('姓名')" label-width="60px" name="nickName">
<uni-easyinput type="text" v-model="tableParams.nickName" :placeholder="$t('请输入名称')" />
</u-form-item>
<u-form-item>
<u-button class="btn" @click="handleClick" type="primary" size="medium">搜索</u-button>
<u-button class="btn" @click="handleClick" type="primary" size="medium">{{$t('搜索')}}</u-button>
</u-form-item>
</u-form>
</view>
......@@ -21,6 +21,8 @@
</template>
<script>
import i18n from '../../../../lang/index'
export default {
props: {
data: {
......@@ -49,18 +51,18 @@ export default {
},
{
name: 'userName',
label: '工号',
label: i18n.t('工号'),
width: 160
},
{
name: 'nickName',
label: '姓名',
label: i18n.t('姓名'),
width: 200
},
{
name: 'workunitName',
label: '工作单元',
label: i18n.t('工作单元'),
width: 160
}
]
......
......@@ -2,17 +2,17 @@
<view class="dmodel-table">
<view class="search">
<u-form :model="tableParams" labelAlign="right" class="tableForm">
<u-form-item label="工作中心" label-width="60px" name="workstationName">
<uni-easyinput type="text" v-model="tableParams.workstationName" placeholder="请输入工作中心" />
<u-form-item :label="$t('工作中心')" label-width="60px" name="workstationName">
<uni-easyinput type="text" v-model="tableParams.workstationName" :placeholder="$t('请输入工作中心')" />
</u-form-item>
<u-form-item label="工作单元编码" label-width="100px" name="workunitCode">
<uni-easyinput type="text" v-model="tableParams.workunitCode" placeholder="请输入工作单元编码" />
<u-form-item :label="$t('工作单元编码')" label-width="100px" name="workunitCode">
<uni-easyinput type="text" v-model="tableParams.workunitCode" :placeholder="$t('请输入工作单元编码')" />
</u-form-item>
<u-form-item label="工作单元名称" label-width="100px" name="workunitName">
<uni-easyinput type="text" v-model="tableParams.workunitName" placeholder="请输入工作单元名称" />
<u-form-item :label="$t('工作单元名称')" label-width="100px" name="workunitName">
<uni-easyinput type="text" v-model="tableParams.workunitName" :placeholder="$t('请输入工作单元名称')" />
</u-form-item>
<u-form-item>
<u-button class="btn" @click="getList" type="primary" size="medium">搜索</u-button>
<u-button class="btn" @click="getList" type="primary" size="medium">{{$t('搜索')}}</u-button>
</u-form-item>
</u-form>
</view>
......@@ -24,6 +24,8 @@
</template>
<script>
import i18n from '../../../../lang/index'
export default {
props: {
......@@ -43,18 +45,18 @@
},
{
name: 'workstationName',
label: '工作中心名称',
label: i18n.t('工作中心名称'),
width: 160,
},
{
name: 'workunitCode',
label: '工作单元编码',
label: i18n.t('工作单元编码'),
width: 200,
},
{
name: 'workunitName',
label: '工作单元名称',
label: i18n.t('工作单元名称'),
width: 300,
},
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
<template>
<view class="dmodel-table">
<view class="search">
<u-form :model="tableParams" labelAlign="right" class="tableForm">
<u-form-item label="检测项编号" label-width="100px" name="indexCode">
<uni-easyinput type="text" v-model="tableParams.indexCode" placeholder="请输入编号" />
</u-form-item>
<u-form-item label="检测项名称" label-width="100px" name="indexName">
<uni-easyinput type="text" v-model="tableParams.indexName" placeholder="请输入名称" />
</u-form-item>
<u-form-item>
<u-button class="btn" @click="handleClick" type="primary" size="medium">搜索</u-button>
</u-form-item>
</u-form>
</view>
<view>
<zb-table ref="zbTable" rowKey="indexCode" :columns="tableColumn" :data="tableData" :stripe="true" @toggleRowSelection="toggleRowSelection"></zb-table>
</view>
<view class="uni-pagination-box"><uni-pagination show-icon :page-size="params.pageSize" :current="params.pageNum" :total="total" @change="change" /></view>
</view>
</template>
<script>
export default {
name: 'User',
data() {
return {
params: {
pageNum: 1,
pageSize: 10
},
total: 0,
tableParams: {
indexCode: '',
indexName: ''
},
tableData: [],
tableSelectData: [],
tableColumn: [
{
type: 'radio',
width: 40
},
{
name: 'indexCode',
label: '检测项编码',
width: 160
},
{
name: 'indexName',
label: '检测项名称',
width: 200
}
]
};
},
mounted() {
this.getList();
},
methods: {
handleClick() {
if (this.tableParams.indexName) {
this.params.indexName = this.tableParams.indexName;
} else {
delete this.params.indexName
}
if (this.tableParams.indexCode) {
this.params.indexCode = this.tableParams.indexCode;
} else {
delete this.params.indexCode
}
this.params.pageNum = 1;
this.getList();
},
async getList() {
const res = await this.$u.api.getQcIndexList(this.params);
console.log(res, 'res');
if (res.code == 200) {
this.tableData = res.rows;
this.total = res.total;
}
},
// 分页触发
change(e) {
this.params.pageNum = e.current;
this.getList();
},
toggleRowSelection(checked, arr) {
this.tableSelectData = arr;
}
}
};
</script>
<style lang="scss" scoped>
.dmodel-table {
height: 1200rpx;
margin-top: 20rpx;
padding: 0 20rpx;
position: relative;
}
.tableForm {
display: flex;
margin-bottom: 20rpx;
}
.btn {
margin-left: 10px;
}
.uni-pagination-box {
position: absolute;
right: 20rpx;
bottom: 40rpx;
}
</style>
This diff is collapsed.
<template>
<view class="login">
<u-form ref="loginForm" :modelValue="loginForm" :rules="loginRules" class="login-form">
<h3 class="title">MES作业端</h3>
<h3 class="title">{{$t('MES作业端')}}</h3>
<u-form-item prop="username">
<input
v-model="loginForm.username"
type="text"
auto-complete="off"
placeholder="账号"
:placeholder="$t('账号')"
>
<svg-icon slot="prefix" icon-class="user" class="el-input__icon input-icon" />
</input>
......@@ -17,7 +17,7 @@
v-model="loginForm.password"
type="password"
auto-complete="off"
placeholder="密码"
:placeholder="$t('密码')"
@keyup.enter="submit"
>
<svg-icon slot="prefix" icon-class="password" class="el-input__icon input-icon" />
......@@ -31,8 +31,8 @@
style="width:100%;"
@click="submit()"
>
<span v-if="!loading">登 录</span>
<span v-else>登 录 中...</span>
<span v-if="!loading">{{$t('登 录')}}</span>
<span v-else>{{$t('登 录 中...')}}</span>
</button>
</u-form-item>
</u-form>
......@@ -40,6 +40,10 @@
</template>
<script>
import i18n from '../../../lang/index'
import {setLocal} from '@/lang'
export default {
data() {
return {
......@@ -54,13 +58,13 @@
loginRules: {
username: {
rules: [
{ required: true, trigger: "blur", errorMessage: "请输入您的账号" }
{ required: true, trigger: "blur", errorMessage: i18n.t('请输入您的账号') }
],
},
password: {
rules: [
{ required: true, trigger: "blur", errorMessage: "请输入您的密码" }
{ required: true, trigger: "blur", errorMessage: i18n.t('请输入您的密码') }
]
}
},
......@@ -82,6 +86,9 @@
if(res.msg){
this.$u.toast(res.msg);
}
if (res.user) {
res.user.locale ? setLocal(res.user.locale.substring(0, 2)) : 'zh'
}
if (res.code == '200') {
this.$u.api.getUserPrintInfo().then(res=> {
// console.log(res, 'res888')
......
<template>
<view class="page">
<view class="title">扫码结果</view>
<view class="title">{{$t('扫码结果')}}</view>
<view class="result_list">
<view v-for="(item, index) in list" :key="index" class="result_li">
{{ item }}
......@@ -10,6 +10,8 @@
</template>
<script>
import i18n from '../../../lang/index'
export default {
data() {
return {
......
......@@ -65,7 +65,7 @@
</view>
</template>
<template v-if="!data.length">
<view class="no-data">暂无数据~~</view>
<view class="no-data">{{$t('暂无数据~~')}}</view>
</template>
<scroll-view
class="zb-table-body"
......@@ -344,7 +344,7 @@
</view>
</template>
<template v-if="!data.length">
<view class="no-data">暂无数据~~</view>
<view class="no-data">{{$t('暂无数据~~')}}</view>
</template>
<view class="zb-table-fixed">
<view class="zb-table-tbody">
......@@ -445,6 +445,8 @@
<!-- #endif -->
</template>
<script>
import i18n from '../../../../lang/index'
import TableCheckbox from './components/table-checkbox.vue';
import TableSummary from './components/table-summary.vue';
import TableSideSummary from './components/table-side-summary.vue';
......@@ -490,7 +492,7 @@ export default {
},
sumText: {
type: String,
default: '合计'
default: i18n.t('合计')
},
isTrClassStyle: {
type: Function,
......
module.exports = {
entry: 'pages', // 编译入口文件夹,默认是 src
outdir: 'lang', // i18n 输出文件夹 默认是 src/locales
exclude: ['lang/zh_CN.json'], // 不重写的文件夹, 默认是 ['src/locales']
extensions: ['.vue'], // 重写的文件类型,默认是 ['.js', '.vue', '.ts']
single: false, // 是否为单文件编译, 默认为 false. 如果为 true, 则 entry 需为文件而不是文件夹, 如 entry: 'src/index.vue'
filename: 'zh_CN', // 输入的中文 json 文件名,默认为 zh_cn
useChineseKey: true // 是否使用中文作为key值,默认为false
}
\ No newline at end of file
This diff is collapsed.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment