|  |  |  | 
|---|
|  |  |  | color: white; | 
|---|
|  |  |  | } | 
|---|
|  |  |  | .textarea{ | 
|---|
|  |  |  | width: 240px; | 
|---|
|  |  |  | width: 260px; | 
|---|
|  |  |  | height: 140px; | 
|---|
|  |  |  | margin-left: 25px; | 
|---|
|  |  |  | margin-right: 50px; | 
|---|
|  |  |  | margin-top: 5px; | 
|---|
|  |  |  | margin-top: 20px; | 
|---|
|  |  |  | font-size: 16px; | 
|---|
|  |  |  | text-indent: 8px; | 
|---|
|  |  |  | outline: 0; | 
|---|
|  |  |  | 
|---|
|  |  |  | </div> | 
|---|
|  |  |  | </div> | 
|---|
|  |  |  | <div> | 
|---|
|  |  |  | <span class="text2" >内容</span> | 
|---|
|  |  |  | <span class="text2">图标</span> | 
|---|
|  |  |  | <button type="button" class="layui-btn layui-bg-black" style="width:150px;height:30px;margin-top:15px;margin-left: 30px;line-height: 30px;float: left;" id="uploadIcon"> | 
|---|
|  |  |  | <i class="layui-icon"></i>上传图标 | 
|---|
|  |  |  | </button> | 
|---|
|  |  |  | </div> | 
|---|
|  |  |  | <br/> | 
|---|
|  |  |  | <div> | 
|---|
|  |  |  | <!-- <span class="text2" >内容</span> --> | 
|---|
|  |  |  | <textarea id="textarea" class="textarea" placeholder="输入内容" autocomplete="off" oninput="contentChange(event)" onporpertychange="contentChange(event)"></textarea> | 
|---|
|  |  |  | </div> | 
|---|
|  |  |  |  | 
|---|
|  |  |  | 
|---|
|  |  |  | var currentLabelId | 
|---|
|  |  |  | function child(id,text,fontColor,fontSize,fontfamily,content) { | 
|---|
|  |  |  | currentLabelId=id | 
|---|
|  |  |  | layui.use(['element', 'layer', 'form','colorpicker'], function () { | 
|---|
|  |  |  | layui.use(['element', 'layer', 'form','colorpicker','upload'], function () { | 
|---|
|  |  |  | var element = layui.element; | 
|---|
|  |  |  | var form = layui.form; | 
|---|
|  |  |  | var colorpicker = layui.colorpicker; | 
|---|
|  |  |  | var upload=layui.upload; | 
|---|
|  |  |  | $("#input").val(text) | 
|---|
|  |  |  | let textarea=document.getElementById("textarea") | 
|---|
|  |  |  | textarea.innerHTML=content; | 
|---|
|  |  |  | 
|---|
|  |  |  | form.on("select(fontfamily)", function (data) { | 
|---|
|  |  |  | parent.updateLabel(4,currentLabelId,data.value); | 
|---|
|  |  |  | }) | 
|---|
|  |  |  | upload.render({ | 
|---|
|  |  |  | elem: '#uploadIcon', //绑定元素 | 
|---|
|  |  |  | accept: 'images', | 
|---|
|  |  |  | url: parent.httpConfig.webApiUrl + "landstamp/front/upload", | 
|---|
|  |  |  | done: function (res) { | 
|---|
|  |  |  | if (res.code == 0) { | 
|---|
|  |  |  | let popId="pop_"+id; | 
|---|
|  |  |  | parent.updateLabel(6,currentLabelId, res.url); | 
|---|
|  |  |  | } | 
|---|
|  |  |  | layui.use('layer', function () { | 
|---|
|  |  |  | var layer = layui.layer; | 
|---|
|  |  |  | layer.msg(res.msg, { time: 1000 }); | 
|---|
|  |  |  | }); | 
|---|
|  |  |  | } | 
|---|
|  |  |  | }); | 
|---|
|  |  |  | form.render(); | 
|---|
|  |  |  | }); | 
|---|
|  |  |  | } | 
|---|