From 539a56279625242c497b4b4093f2defbb9d80334 Mon Sep 17 00:00:00 2001
From: lty <876263681@qq.com>
Date: 星期四, 29 一月 2026 14:05:44 +0800
Subject: [PATCH] #i18n翻译
---
src/main/webapp/static/js/wrkMastLog/wrkMastLog.js | 36 +++++++++++++++++++++++++++++++-----
1 files changed, 31 insertions(+), 5 deletions(-)
diff --git a/src/main/webapp/static/js/wrkMastLog/wrkMastLog.js b/src/main/webapp/static/js/wrkMastLog/wrkMastLog.js
index 85e08de..b8c6ab0 100644
--- a/src/main/webapp/static/js/wrkMastLog/wrkMastLog.js
+++ b/src/main/webapp/static/js/wrkMastLog/wrkMastLog.js
@@ -21,6 +21,9 @@
toolbar: '#toolbar',
cellMinWidth: 50,
cols: getCol(),
+ text: {
+ none: typeof I18n !== 'undefined' ? I18n.t('no_data') : '鏆傛棤鐩稿叧鏁版嵁'
+ },
request: {
pageName: 'curr',
pageSize: 'limit'
@@ -69,6 +72,10 @@
};
$(document).on('i18n:languageChanged', function() {
+ if (typeof I18n !== 'undefined') {
+ I18n.updatePage($('#search-box'));
+ }
+ layDateRender();
tableIns.reload({
cols: getCol(),
done: doneCallback
@@ -477,11 +484,30 @@
elem: '#logErrTime\\$',
type: 'datetime'
});
- layDate.render({
- elem: '.layui-laydate-range'
- ,type: 'datetime'
- ,range: true
- });
+ function layDateRender() {
+ var lang = (typeof I18n !== 'undefined' && I18n.getLanguage().indexOf('en') > -1) ? 'en' : 'cn';
+ setTimeout(function () {
+ $('.layui-laydate-range').each(function() {
+ var $this = $(this);
+ var val = $this.val();
+
+ // Clone the element to remove old event listeners and lay-key
+ var $newElem = $this.clone();
+ $newElem.removeAttr('lay-key');
+ $newElem.val(val);
+
+ $this.replaceWith($newElem);
+
+ layDate.render({
+ elem: $newElem[0]
+ ,type: 'datetime'
+ ,range: true
+ ,lang: lang
+ });
+ });
+ }, 300);
+ }
+ layDateRender();
});
--
Gitblit v1.9.1