From e24c707ba13733903c310334fb0bbee1667ca4f6 Mon Sep 17 00:00:00 2001
From: king <18310653075@163.com>
Date: 星期六, 20 八月 2022 22:24:46 +0800
Subject: [PATCH] 2022-08-20

---
 src/tabviews/custom/components/share/normalTable/index.jsx |    9 +++++++--
 1 files changed, 7 insertions(+), 2 deletions(-)

diff --git a/src/tabviews/custom/components/share/normalTable/index.jsx b/src/tabviews/custom/components/share/normalTable/index.jsx
index 99f8396..4654657 100644
--- a/src/tabviews/custom/components/share/normalTable/index.jsx
+++ b/src/tabviews/custom/components/share/normalTable/index.jsx
@@ -10,6 +10,7 @@
 import MKEmitter from '@/utils/events.js'
 import zhCN from '@/locales/zh-CN/main.js'
 import enUS from '@/locales/en-US/main.js'
+import Encrypts from '@/components/encrypts'
 import '@/assets/css/table.scss'
 import './index.scss'
 
@@ -122,9 +123,13 @@
           content = `${content.substr(0, 4)}-${content.substr(5, 2)}-${content.substr(8, 2)}`
         } else if (col.textFormat === 'YYYY-MM-DD HH:mm:ss' && /^[1-9]\d{3}(-|\/)(0[1-9]|1[0-2])(-|\/)(0[1-9]|[1-2][0-9]|3[0-1]).([0-1][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9]/.test(content)) {
           content = `${content.substr(0, 4)}-${content.substr(5, 2)}-${content.substr(8, 2)} ${content.substr(11, 2)}:${content.substr(14, 2)}:${content.substr(17, 2)}`
+        } else if (col.textFormat === 'encryption') {
+          content = <span>{col.prefix || ''}<Encrypts value={content} />{col.postfix || ''}</span>
         }
-  
-        content = (col.prefix || '') + content + (col.postfix || '')
+
+        if (col.textFormat !== 'encryption') {
+          content = (col.prefix || '') + content + (col.postfix || '')
+        }
       }
 
       if (col.marks) {

--
Gitblit v1.8.0