From 1da6506bf58270bacc2a4345002c6b082835580e Mon Sep 17 00:00:00 2001 From: king <18310653075@163.com> Date: 星期四, 21 十月 2021 23:17:08 +0800 Subject: [PATCH] 2021-10-21 --- src/templates/sharecomponent/tablecomponent/index.jsx | 8 +++++--- 1 files changed, 5 insertions(+), 3 deletions(-) diff --git a/src/templates/sharecomponent/tablecomponent/index.jsx b/src/templates/sharecomponent/tablecomponent/index.jsx index 0ff4bcf..d6aca93 100644 --- a/src/templates/sharecomponent/tablecomponent/index.jsx +++ b/src/templates/sharecomponent/tablecomponent/index.jsx @@ -112,7 +112,7 @@ if (/^nvarchar/.test(_type)) { try { // 瀛樺湪max _length = +_type.match(/\d+/)[0] || 50 - } catch { + } catch (e) { _length = 2048 } _type = 'text' @@ -182,10 +182,11 @@ let _type = item.FieldType.toLowerCase() let _decimal = 0 let _length = 50 + if (/^nvarchar/.test(_type)) { try { // 瀛樺湪max _length = +_type.match(/\d+/)[0] || 50 - } catch { + } catch (e) { _length = 2048 } _type = 'text' @@ -209,7 +210,8 @@ type: _type, datatype: _type, decimal: _decimal, - length: _length + length: _length, + $datatype: item.FieldType.toLowerCase() } }) } -- Gitblit v1.8.0