From 20185ab64a165df51515d9fa1c9b12a7a8c55f59 Mon Sep 17 00:00:00 2001
From: king <18310653075@163.com>
Date: 星期五, 07 四月 2023 23:11:04 +0800
Subject: [PATCH] 2023-04-07

---
 src/tabviews/zshare/actionList/exceloutbutton/index.jsx |   15 +++++++++++++++
 1 files changed, 15 insertions(+), 0 deletions(-)

diff --git a/src/tabviews/zshare/actionList/exceloutbutton/index.jsx b/src/tabviews/zshare/actionList/exceloutbutton/index.jsx
index b96ad92..2192239 100644
--- a/src/tabviews/zshare/actionList/exceloutbutton/index.jsx
+++ b/src/tabviews/zshare/actionList/exceloutbutton/index.jsx
@@ -713,6 +713,21 @@
           })
         }
 
+        if (btn.verify.wrapText === 'true' && data) {
+          let lines = data.length + 1
+          let start = 2
+          if (btn.verify.merge === 'true') {
+            lines = data.length + 2
+          }
+          for (let n = 0; n < cols.length; n++) {
+            for (let m = start; m <= lines; m++) {
+              if (ws[cols[n] + m] && !ws[cols[n] + m].s) {
+                ws[cols[n] + m].s = {alignment: { wrapText: true }}
+              }
+            }
+          }
+        }
+
         // ws["A1"].s = {fill: { bgColor: { rgb: "FFFFAA"  }}, font: { color: { rgb: "1890FF" } }}
 
         const wb = XLSX.utils.book_new()

--
Gitblit v1.8.0