From 45286ba61d7df92ca3d60bdf187b94d5a4349874 Mon Sep 17 00:00:00 2001
From: luxiaotao1123 <t1341870251@63.com>
Date: 星期二, 22 十一月 2022 15:00:10 +0800
Subject: [PATCH] #

---
 src/main/webapp/static/layui/lay/modules/formDesigner.js |   33 ++++++++++++++++++++++-----------
 1 files changed, 22 insertions(+), 11 deletions(-)

diff --git a/src/main/webapp/static/layui/lay/modules/formDesigner.js b/src/main/webapp/static/layui/lay/modules/formDesigner.js
index a25bcb7..5213bd7 100644
--- a/src/main/webapp/static/layui/lay/modules/formDesigner.js
+++ b/src/main/webapp/static/layui/lay/modules/formDesigner.js
@@ -78,6 +78,8 @@
                         return options || null;
                     }, getData: function () {
                         return options.data || null;
+                    }, getHtmlData: function () {
+                        return that.getHtmlData() || null;
                     }, geticeEditorObjects: function () {
                         return iceEditorObjects || null;
                     },getImages:function () {
@@ -172,7 +174,7 @@
                     $label.empty();
                     $label.css("width",json.labelWidth);
                     if (json.required) {
-                        $label.append('<span style="color:red;">*</span>');
+                        // $label.append('<span style="color:red;">*</span>');
                     }
                     $label.append(json.label + ":");
                     if (json.hideLabel) {
@@ -534,7 +536,7 @@
                     $label.empty();
                     $label.css("width",json.labelWidth);
                     if (json.required) {
-                        $label.append('<span style="color:red;">*</span>');
+                        // $label.append('<span style="color:red;">*</span>');
                     }
                     $label.append(json.label + ":");
                     if (json.hideLabel) {
@@ -662,7 +664,7 @@
                     $label.css({width: '{0}'.format(json.width)});
                     $block.css({width: '{0}'.format(json.width)});
                     if (json.required) {
-                        $label.append('<span style="color:red;">*</span>');
+                        // $label.append('<span style="color:red;">*</span>');
                     }
                     $label.append(json.label + ":");
                 },
@@ -789,7 +791,7 @@
                     $('#' + json.id + ' .layui-input-block').append(_html);
                     $label.css("width",json.labelWidth);
                     if (json.required) {
-                        $label.append('<span style="color:red;">*</span>');
+                        // $label.append('<span style="color:red;">*</span>');
                     }
                     $label.append(json.label + ":");
                     form.render('select',json.id);
@@ -1063,7 +1065,7 @@
                         $block.css("margin-left",json.labelWidth);
                     }
                     if (json.required) {
-                        $label.append('<span style="color:red;">*</span>');
+                        // $label.append('<span style="color:red;">*</span>');
                     }
                     $label.append(json.label + ":");
                     form.render('checkbox');
@@ -1439,7 +1441,7 @@
                     }
                     $label.css("width",json.labelWidth);
                     if (json.required) {
-                        $label.append('<span style="color:red;">*</span>');
+                        // $label.append('<span style="color:red;">*</span>');
                     }
                     $label.append(json.label + ":");
                     var _html = '<input id="{0}" name="{0}"  lay-verify="{3}" class="layui-input icon-date widget-date {1}" style="line-height: 40px;{2}"></input>'.format(json.tag + json.id,_disabledClass,_disabledStyle,_required);
@@ -2877,7 +2879,7 @@
                     }
                     $label.css("width",json.labelWidth);
                     if (json.required) {
-                        $label.append('<span style="color:red;">*</span>');
+                        // $label.append('<span style="color:red;">*</span>');
                     }
                     $label.append(json.label + ":");
                     var _html = '';
@@ -4671,7 +4673,6 @@
                 var _html = $('<div style="height:100%;width:100%;"></div>');
                 var _script = $('<div style="height:100%;width:100%;"></div>');;
                 that.generateHtml(options.data, _html,_script);
-                console.log(_html.html());
                 var _htmlCode = staticField.htmlCode.format(_html.html(),_script.html());
                 document.getElementById('generate-code-view').value = style_html(_htmlCode, 4, ' ', 400);
                 layer.open({
@@ -4694,11 +4695,10 @@
 
             });
 
-            $('.generateHtml').on('click', function () {
+            $('.generateHtmlData').on('click', function () {
                 var _html = $('<div style="height:100%;width:100%;"></div>');
                 var _script = $('<div style="height:100%;width:100%;"></div>');
                 that.generateHtml(options.data, _html,_script);
-                console.log(_html.html());
                 return _html.html();
             });
 
@@ -4860,6 +4860,17 @@
                 json[key] = signObjects[key];
             }
             return json;
+        }
+
+
+        //鑾峰彇琛ㄥ崟鏁版嵁鍥炶皟
+        Class.prototype.getHtmlData = function () {
+            var that = this,
+                options = that.config;
+            var _html = $('<div style="height:100%;width:100%;"></div>');
+            var _script = $('<div style="height:100%;width:100%;"></div>');
+            that.generateHtml(options.data, _html,_script);
+            return _html.html();
         }
 
         //閫掑綊鏀瑰彉绂佺敤灞炴��
@@ -5210,4 +5221,4 @@
 
         exports('formDesigner'
             , formDesigner);
-    });
\ No newline at end of file
+    });

--
Gitblit v1.9.1