src/ZKEACMS.StyleEditor/Scripts/editor.min.js
(完整代码) 5KB/*! http://www.zkea.net/
* Copyright (c) ZKEASOFT. All rights reserved.
* http://www.zkea.net/licenses */
function updateDisplay(){var c=document.getElementById("width").value,l=document.getElementById("height").value,a=document.getElementById("t-color").value,v=document.getElementById("b-color").value,y=document.getElementById("border-width").innerHTML+"px",ei=document.getElementById("bc-color").value,oi=document.getElementById("border-style").value,e=document.getElementById("padding-custom").value,r,s,t,i,f,n,h;e||(e=document.getElementById("padding").innerHTML+"px");r=document.getElementById("margin-custom").value;r||(r=document.getElementById("margin").innerHTML+"px");var p=document.getElementById("font-name").value,w=document.getElementById("font-style").value,b=document.getElementById("font-weight").value,k=document.getElementById("font-size").innerHTML+"px",d=document.getElementById("font-variant").value,g=document.getElementById("line-height").innerHTML+"px",nt=document.getElementById("text-align").value,tt=document.getElementById("text-decoration").value,it=document.getElementById("text-indent").innerHTML+"px",rt=document.getElementById("letter-spacing").innerHTML+"px",ut=document.getElementById("word-spacing").innerHTML+"px",ft=document.getElementById("text-transform").value,u=document.getElementById("background-image").value;u&&(u="url("+u.replace("~/","/")+")");var et=document.getElementById("background-repeat").value,ot=document.getElementById("background-position").value,st=document.getElementById("background-attachment").value,ht=document.getElementById("background-size").value,ct=document.getElementById("background").value,lt=document.getElementById("position").value,at=document.getElementById("position-top").value+"px",vt=document.getElementById("position-left").value+"px",yt=document.getElementById("position-right").value+"px",pt=document.getElementById("position-bottom").value+"px",wt=document.getElementById("z-index").value,bt=document.getElementById("cursor").value,kt=document.getElementById("visibility").value,dt=document.getElementById("overflow").value,gt=document.getElementById("float").value,o=document.getElementById("border-radius-custom").value;o||(o=document.getElementById("border-radius").innerHTML+"px");var ni=document.getElementById("text-h-length").innerHTML+"px",ti=document.getElementById("text-v-length").innerHTML+"px",ii=document.getElementById("text-b-length").innerHTML+"px",si=document.getElementById("text-s-color").value,ri=document.getElementById("box-h-length").innerHTML+"px",ui=document.getElementById("box-v-length").innerHTML+"px",fi=document.getElementById("box-b-length").innerHTML+"px",hi=document.getElementById("box-s-color").value;for(this.css=[],v&&this.css.push("background-color:"+v),a&&this.css.push("color:"+a),c&&this.css.push("width:"+c+"px"),l&&this.css.push("height:"+l+"px"),y!=="0px"&&this.css.push("border:"+y+" "+oi+" "+ei),e!=="0px"&&this.css.push("padding:"+e),r!=="0px"&&this.css.push("margin:"+r),p&&this.css.push("font-family:"+p),w&&this.css.push("font-style:"+w),b&&this.css.push("font-weight:"+b),k!=="0px"&&this.css.push("font-size:"+k),d&&this.css.push("font-variant:"+d),g!=="0px"&&this.css.push("line-height:"+g),nt&&this.css.push("text-align:"+nt),tt&&this.css.push("text-decoration:"+tt),it!=="0px"&&this.css.push("text-indent:"+it),rt!=="0px"&&this.css.push("letter-spacing:"+rt),ut!=="0px"&&this.css.push("word-spacing:"+ut),ft&&this.css.push("text-transform:"+ft),u&&this.css.push("background-image:"+u),et&&this.css.push("background-repeat:"+et),ot&&this.css.push("background-position:"+ot),st&&this.css.push("background-attachment:"+st),ht&&this.css.push("background-size:"+ht),ct&&this.css.push("background:"+ct),lt&&this.css.push("position:"+lt),at!="px"&&this.css.push("top:"+at),vt!="px"&&this.css.push("left:"+vt),yt!="px"&&this.css.push("right:"+yt),pt!="px"&&this.css.push("bottom:"+pt),wt&&this.css.push("z-index:"+wt),bt&&this.css.push("cursor:"+bt),kt&&this.css.push("visibility:"+kt),dt&&this.css.push("overflow:"+dt),gt&&this.css.push("float:"+gt),o!=="0px"&&this.css.push("border-radius:"+o),(ni!=="0px"||ti!=="0px"||ii!=="0px")&&this.css.push("text-shadow:"+ni+" "+ti+" "+ii+" "+si),(ri!=="0px"||ui!=="0px"||fi!=="0px")&&this.css.push("box-shadow:"+ri+" "+ui+" "+fi+" "+hi),s=0;s<window.unKnownStyle.length;s++)this.css.push(window.unKnownStyle[s]);return this.css.push(""),t=window.top.$(".custom-style-target"),t.hasClass("form-control")?(i=t.val(),f=/style="([^"]*)"/g,this.css.length>1?f.test(i)?t.val(i.replace(f,'style="'+$.trim(this.css.join(";"))+'"')):t.val($.trim(i)+(i?" ":"")+'style="'+$.trim(this.css.join(";"))+'"'):f.test(i)&&t.val($.trim(i.replace(f,"")))):t.attr("style",this.css.join(";")),n=this.css.join(";\n"),n="#CSS-Display {\n"+n+"}\n",h=document.getElementById("output"),h.innerText?h.innerText=n:h.textContent=n,window.displayStyle?window.displayStyle.text(n):(window.displayStyle=$('<style type="text/css">'+n+"<\/style>"),$("head").append(window.displayStyle)),n}$(function(){$("#accordion2").height(window.innerHeight-20);window.Scrollbar.init(document.querySelector("#accordion2"),{continuousScrolling:!1})});
24 小时内免费解锁 3 个项目,之后 1 算力/个。 规则说明
AI 解读 AI
登录后可用,每次 10 算力,解读结果公开显示在下面。
还没有人解读过这个文件。