diff --git a/docs/assets/index.3bc15a97.js b/docs/assets/index.8cb1653e.js similarity index 98% rename from docs/assets/index.3bc15a97.js rename to docs/assets/index.8cb1653e.js index ce397cf..a042d8f 100644 --- a/docs/assets/index.3bc15a97.js +++ b/docs/assets/index.8cb1653e.js @@ -74,7 +74,7 @@ ${l}`:a)}},onCacheKey:i=>Ah(t,n,i)}}function bm(e,t,n,r){const{modifiers:o,plura * @namespace * @public */var n=function(r){var o=/(?:^|\s)lang(?:uage)?-([\w-]+)(?=\s|$)/i,s=0,i={},a={manual:r.Prism&&r.Prism.manual,disableWorkerMessageHandler:r.Prism&&r.Prism.disableWorkerMessageHandler,util:{encode:function g(m){return m instanceof l?new l(m.type,g(m.content),m.alias):Array.isArray(m)?m.map(g):m.replace(/&/g,"&").replace(/"+M.content+""};function c(g,m,y,k){g.lastIndex=m;var M=g.exec(y);if(M&&k&&M[1]){var C=M[1].length;M.index+=C,M[0]=M[0].slice(C)}return M}function u(g,m,y,k,M,C){for(var Y in y)if(!(!y.hasOwnProperty(Y)||!y[Y])){var j=y[Y];j=Array.isArray(j)?j:[j];for(var K=0;K=C.reach);ye+=V.value.length,V=V.next){var je=V.value;if(m.length>g.length)return;if(!(je instanceof l)){var Ne=1,we;if(Me){if(we=c(_,ye,g,de),!we||we.index>=g.length)break;var G=we.index,tt=we.index+we[0].length,Fe=ye;for(Fe+=V.value.length;G>=Fe;)V=V.next,Fe+=V.value.length;if(Fe-=V.value.length,ye=Fe,V.value instanceof l)continue;for(var S=V;S!==m.tail&&(FeC.reach&&(C.reach=pe);var X=V.prev;Z&&(X=d(m,X,Z),ye+=Z.length),w(m,X,Ne);var ee=new l(Y,z?a.tokenize(N,z):N,Ae,N);if(V=d(m,X,ee),re&&d(m,V,re),Ne>1){var le={cause:Y+","+K,reach:pe};u(g,m,y,V.prev,ye,le),C&&le.reach>C.reach&&(C.reach=le.reach)}}}}}}function f(){var g={value:null,prev:null,next:null},m={value:null,prev:g,next:null};g.next=m,this.head=g,this.tail=m,this.length=0}function d(g,m,y){var k=m.next,M={value:y,prev:m,next:k};return m.next=M,k.prev=M,g.length++,M}function w(g,m,y){for(var k=m.next,M=0;M/,greedy:!0},prolog:{pattern:/<\?[\s\S]+?\?>/,greedy:!0},doctype:{pattern:/"'[\]]|"[^"]*"|'[^']*')+(?:\[(?:[^<"'\]]|"[^"]*"|'[^']*'|<(?!!--)|)*\]\s*)?>/i,greedy:!0,inside:{"internal-subset":{pattern:/(^[^\[]*\[)[\s\S]+(?=\]>$)/,lookbehind:!0,greedy:!0,inside:null},string:{pattern:/"[^"]*"|'[^']*'/,greedy:!0},punctuation:/^$|[[\]]/,"doctype-tag":/^DOCTYPE/i,name:/[^\s<>'"]+/}},cdata:{pattern://i,greedy:!0},tag:{pattern:/<\/?(?!\d)[^\s>\/=$<%]+(?:\s(?:\s*[^\s>\/=]+(?:\s*=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+(?=[\s>]))|(?=[\s/>])))+)?\s*\/?>/,greedy:!0,inside:{tag:{pattern:/^<\/?[^\s>\/]+/,inside:{punctuation:/^<\/?/,namespace:/^[^\s>\/:]+:/}},"special-attr":[],"attr-value":{pattern:/=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+)/,inside:{punctuation:[{pattern:/^=/,alias:"attr-equals"},/"|'/]}},punctuation:/\/?>/,"attr-name":{pattern:/[^\s>\/]+/,inside:{namespace:/^[^\s>\/:]+:/}}}},entity:[{pattern:/&[\da-z]{1,8};/i,alias:"named-entity"},/&#x?[\da-f]{1,8};/i]},n.languages.markup.tag.inside["attr-value"].inside.entity=n.languages.markup.entity,n.languages.markup.doctype.inside["internal-subset"].inside=n.languages.markup,n.hooks.add("wrap",function(r){r.type==="entity"&&(r.attributes.title=r.content.replace(/&/,"&"))}),Object.defineProperty(n.languages.markup.tag,"addInlined",{value:function(o,s){var i={};i["language-"+s]={pattern:/(^$)/i,lookbehind:!0,inside:n.languages[s]},i.cdata=/^$/i;var a={"included-cdata":{pattern://i,inside:i}};a["language-"+s]={pattern:/[\s\S]+/,inside:n.languages[s]};var l={};l[o]={pattern:RegExp(/(<__[^>]*>)(?:))*\]\]>|(?!)/.source.replace(/__/g,function(){return o}),"i"),lookbehind:!0,greedy:!0,inside:a},n.languages.insertBefore("markup","cdata",l)}}),Object.defineProperty(n.languages.markup.tag,"addAttribute",{value:function(r,o){n.languages.markup.tag.inside["special-attr"].push({pattern:RegExp(/(^|["'\s])/.source+"(?:"+r+")"+/\s*=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+(?=[\s>]))/.source,"i"),lookbehind:!0,inside:{"attr-name":/^[^\s=]+/,"attr-value":{pattern:/=[\s\S]+/,inside:{value:{pattern:/(^=\s*(["']|(?!["'])))\S[\s\S]*(?=\2$)/,lookbehind:!0,alias:[o,"language-"+o],inside:n.languages[o]},punctuation:[{pattern:/^=/,alias:"attr-equals"},/"|'/]}}}})}}),n.languages.html=n.languages.markup,n.languages.mathml=n.languages.markup,n.languages.svg=n.languages.markup,n.languages.xml=n.languages.extend("markup",{}),n.languages.ssml=n.languages.xml,n.languages.atom=n.languages.xml,n.languages.rss=n.languages.xml,function(r){var o=/(?:"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"|'(?:\\(?:\r\n|[\s\S])|[^'\\\r\n])*')/;r.languages.css={comment:/\/\*[\s\S]*?\*\//,atrule:{pattern:/@[\w-](?:[^;{\s]|\s+(?![\s{]))*(?:;|(?=\s*\{))/,inside:{rule:/^@[\w-]+/,"selector-function-argument":{pattern:/(\bselector\s*\(\s*(?![\s)]))(?:[^()\s]|\s+(?![\s)])|\((?:[^()]|\([^()]*\))*\))+(?=\s*\))/,lookbehind:!0,alias:"selector"},keyword:{pattern:/(^|[^\w-])(?:and|not|only|or)(?![\w-])/,lookbehind:!0}}},url:{pattern:RegExp("\\burl\\((?:"+o.source+"|"+/(?:[^\\\r\n()"']|\\[\s\S])*/.source+")\\)","i"),greedy:!0,inside:{function:/^url/i,punctuation:/^\(|\)$/,string:{pattern:RegExp("^"+o.source+"$"),alias:"url"}}},selector:{pattern:RegExp(`(^|[{}\\s])[^{}\\s](?:[^{};"'\\s]|\\s+(?![\\s{])|`+o.source+")*(?=\\s*\\{)"),lookbehind:!0},string:{pattern:o,greedy:!0},property:{pattern:/(^|[^-\w\xA0-\uFFFF])(?!\s)[-_a-z\xA0-\uFFFF](?:(?!\s)[-\w\xA0-\uFFFF])*(?=\s*:)/i,lookbehind:!0},important:/!important\b/i,function:{pattern:/(^|[^-a-z0-9])[-a-z0-9]+(?=\()/i,lookbehind:!0},punctuation:/[(){};:,]/},r.languages.css.atrule.inside.rest=r.languages.css;var s=r.languages.markup;s&&(s.tag.addInlined("style","css"),s.tag.addAttribute("style","css"))}(n),n.languages.clike={comment:[{pattern:/(^|[^\\])\/\*[\s\S]*?(?:\*\/|$)/,lookbehind:!0,greedy:!0},{pattern:/(^|[^\\:])\/\/.*/,lookbehind:!0,greedy:!0}],string:{pattern:/(["'])(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/,greedy:!0},"class-name":{pattern:/(\b(?:class|extends|implements|instanceof|interface|new|trait)\s+|\bcatch\s+\()[\w.\\]+/i,lookbehind:!0,inside:{punctuation:/[.\\]/}},keyword:/\b(?:break|catch|continue|do|else|finally|for|function|if|in|instanceof|new|null|return|throw|try|while)\b/,boolean:/\b(?:false|true)\b/,function:/\b\w+(?=\()/,number:/\b0x[\da-f]+\b|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:e[+-]?\d+)?/i,operator:/[<>]=?|[!=]=?=?|--?|\+\+?|&&?|\|\|?|[?*/~^%]/,punctuation:/[{}[\];(),.:]/},n.languages.javascript=n.languages.extend("clike",{"class-name":[n.languages.clike["class-name"],{pattern:/(^|[^$\w\xA0-\uFFFF])(?!\s)[_$A-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\.(?:constructor|prototype))/,lookbehind:!0}],keyword:[{pattern:/((?:^|\})\s*)catch\b/,lookbehind:!0},{pattern:/(^|[^.]|\.\.\.\s*)\b(?:as|assert(?=\s*\{)|async(?=\s*(?:function\b|\(|[$\w\xA0-\uFFFF]|$))|await|break|case|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally(?=\s*(?:\{|$))|for|from(?=\s*(?:['"]|$))|function|(?:get|set)(?=\s*(?:[#\[$\w\xA0-\uFFFF]|$))|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)\b/,lookbehind:!0}],function:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*(?:\.\s*(?:apply|bind|call)\s*)?\()/,number:{pattern:RegExp(/(^|[^\w$])/.source+"(?:"+(/NaN|Infinity/.source+"|"+/0[bB][01]+(?:_[01]+)*n?/.source+"|"+/0[oO][0-7]+(?:_[0-7]+)*n?/.source+"|"+/0[xX][\dA-Fa-f]+(?:_[\dA-Fa-f]+)*n?/.source+"|"+/\d+(?:_\d+)*n/.source+"|"+/(?:\d+(?:_\d+)*(?:\.(?:\d+(?:_\d+)*)?)?|\.\d+(?:_\d+)*)(?:[Ee][+-]?\d+(?:_\d+)*)?/.source)+")"+/(?![\w$])/.source),lookbehind:!0},operator:/--|\+\+|\*\*=?|=>|&&=?|\|\|=?|[!=]==|<<=?|>>>?=?|[-+*/%&|^!=<>]=?|\.{3}|\?\?=?|\?\.?|[~:]/}),n.languages.javascript["class-name"][0].pattern=/(\b(?:class|extends|implements|instanceof|interface|new)\s+)[\w.\\]+/,n.languages.insertBefore("javascript","keyword",{regex:{pattern:RegExp(/((?:^|[^$\w\xA0-\uFFFF."'\])\s]|\b(?:return|yield))\s*)/.source+/\//.source+"(?:"+/(?:\[(?:[^\]\\\r\n]|\\.)*\]|\\.|[^/\\\[\r\n])+\/[dgimyus]{0,7}/.source+"|"+/(?:\[(?:[^[\]\\\r\n]|\\.|\[(?:[^[\]\\\r\n]|\\.|\[(?:[^[\]\\\r\n]|\\.)*\])*\])*\]|\\.|[^/\\\[\r\n])+\/[dgimyus]{0,7}v[dgimyus]{0,7}/.source+")"+/(?=(?:\s|\/\*(?:[^*]|\*(?!\/))*\*\/)*(?:$|[\r\n,.;:})\]]|\/\/))/.source),lookbehind:!0,greedy:!0,inside:{"regex-source":{pattern:/^(\/)[\s\S]+(?=\/[a-z]*$)/,lookbehind:!0,alias:"language-regex",inside:n.languages.regex},"regex-delimiter":/^\/|\/$/,"regex-flags":/^[a-z]+$/}},"function-variable":{pattern:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*[=:]\s*(?:async\s*)?(?:\bfunction\b|(?:\((?:[^()]|\([^()]*\))*\)|(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)\s*=>))/,alias:"function"},parameter:[{pattern:/(function(?:\s+(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)?\s*\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\))/,lookbehind:!0,inside:n.languages.javascript},{pattern:/(^|[^$\w\xA0-\uFFFF])(?!\s)[_$a-z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*=>)/i,lookbehind:!0,inside:n.languages.javascript},{pattern:/(\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\)\s*=>)/,lookbehind:!0,inside:n.languages.javascript},{pattern:/((?:\b|\s|^)(?!(?:as|async|await|break|case|catch|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally|for|from|function|get|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|set|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)(?![$\w\xA0-\uFFFF]))(?:(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*\s*)\(\s*|\]\s*\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\)\s*\{)/,lookbehind:!0,inside:n.languages.javascript}],constant:/\b[A-Z](?:[A-Z_]|\dx?)*\b/}),n.languages.insertBefore("javascript","string",{hashbang:{pattern:/^#!.*/,greedy:!0,alias:"comment"},"template-string":{pattern:/`(?:\\[\s\S]|\$\{(?:[^{}]|\{(?:[^{}]|\{[^}]*\})*\})+\}|(?!\$\{)[^\\`])*`/,greedy:!0,inside:{"template-punctuation":{pattern:/^`|`$/,alias:"string"},interpolation:{pattern:/((?:^|[^\\])(?:\\{2})*)\$\{(?:[^{}]|\{(?:[^{}]|\{[^}]*\})*\})+\}/,lookbehind:!0,inside:{"interpolation-punctuation":{pattern:/^\$\{|\}$/,alias:"punctuation"},rest:n.languages.javascript}},string:/[\s\S]+/}},"string-property":{pattern:/((?:^|[,{])[ \t]*)(["'])(?:\\(?:\r\n|[\s\S])|(?!\2)[^\\\r\n])*\2(?=\s*:)/m,lookbehind:!0,greedy:!0,alias:"property"}}),n.languages.insertBefore("javascript","operator",{"literal-property":{pattern:/((?:^|[,{])[ \t]*)(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*:)/m,lookbehind:!0,alias:"property"}}),n.languages.markup&&(n.languages.markup.tag.addInlined("script","javascript"),n.languages.markup.tag.addAttribute(/on(?:abort|blur|change|click|composition(?:end|start|update)|dblclick|error|focus(?:in|out)?|key(?:down|up)|load|mouse(?:down|enter|leave|move|out|over|up)|reset|resize|scroll|select|slotchange|submit|unload|wheel)/.source,"javascript")),n.languages.js=n.languages.javascript,function(){if(typeof n=="undefined"||typeof document=="undefined")return;Element.prototype.matches||(Element.prototype.matches=Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector);var r="Loading\u2026",o=function(I,x){return"\u2716 Error "+I+" while fetching file: "+x},s="\u2716 Error: File does not exist or is empty",i={js:"javascript",py:"python",rb:"ruby",ps1:"powershell",psm1:"powershell",sh:"bash",bat:"batch",h:"c",tex:"latex"},a="data-src-status",l="loading",c="loaded",u="failed",f="pre[data-src]:not(["+a+'="'+c+'"]):not(['+a+'="'+l+'"])';function d(I,x,R){var g=new XMLHttpRequest;g.open("GET",I,!0),g.onreadystatechange=function(){g.readyState==4&&(g.status<400&&g.responseText?x(g.responseText):g.status>=400?R(o(g.status,g.statusText)):R(s))},g.send(null)}function w(I){var x=/^\s*(\d+)\s*(?:(,)\s*(?:(\d+)\s*)?)?$/.exec(I||"");if(x){var R=Number(x[1]),g=x[2],m=x[3];return g?m?[R,Number(m)]:[R,void 0]:[R,R]}}n.hooks.add("before-highlightall",function(I){I.selector+=", "+f}),n.hooks.add("before-sanity-check",function(I){var x=I.element;if(x.matches(f)){I.code="",x.setAttribute(a,l);var R=x.appendChild(document.createElement("CODE"));R.textContent=r;var g=x.getAttribute("data-src"),m=I.language;if(m==="none"){var y=(/\.(\w+)$/.exec(g)||[,"none"])[1];m=i[y]||y}n.util.setLanguage(R,m),n.util.setLanguage(x,m);var k=n.plugins.autoloader;k&&k.loadLanguages(m),d(g,function(M){x.setAttribute(a,c);var C=w(x.getAttribute("data-range"));if(C){var Y=M.split(/\r\n?|\n/g),j=C[0],K=C[1]==null?Y.length:C[1];j<0&&(j+=Y.length),j=Math.max(0,Math.min(j-1,Y.length)),K<0&&(K+=Y.length),K=Math.max(0,Math.min(K,Y.length)),M=Y.slice(j,K).join(` -`),x.hasAttribute("data-start")||x.setAttribute("data-start",String(j+1))}R.textContent=M,n.highlightElement(R)},function(M){x.setAttribute(a,u),R.textContent=M})}}),n.plugins.fileHighlight={highlight:function(x){for(var R=(x||document).querySelectorAll(f),g=0,m;m=R[g++];)n.highlightElement(m)}};var F=!1;n.fileHighlight=function(){F||(console.warn("Prism.fileHighlight is deprecated. Use `Prism.plugins.fileHighlight.highlight` instead."),F=!0),n.plugins.fileHighlight.highlight.apply(this,arguments)}}()})(Cc);var Zr=Cc.exports;const og="_container_fg27g_1",sg="_component_fg27g_10",ig="_action_fg27g_13",ag="_code_fg27g_16";var vr={container:og,component:sg,action:ig,code:ag};const Xs=vt({props:{component:{type:Object,required:!0}},setup(e,{attrs:t,slots:n,emit:r,expose:o}){const s=ke(()=>Zr.highlight(e.component.__sourceCode,Zr.languages.html,"html")),i=Be(!1),a=()=>i.value=!i.value;return()=>D("div",{class:vr.container},[D("h2",null,[e.component.__sourceCodeTitle]),D("div",{class:vr.component},[lt(e.component)]),D("div",{class:vr.action},[D("div",{onClick:Ut(a,["stop"])},[D(io("v-button"),null,{default:()=>[i.value?"\u9690\u85CF\u6E90\u4EE3\u7801":"\u67E5\u770B\u6E90\u4EE3\u7801"]})])]),i.value?D("div",{class:vr.code},[D("pre",{class:"language-html",innerHTML:s.value},null)]):D("div",null,null)])}}),Tc=()=>D("div",null,[D(Xs,{component:rg},null)]);Tc.displayName="BannerDemo";const lg={name:"Banner"};function cg(e,t,n,r,o,s){return Xe(),At("h1",null,"Vue Scaffold UI")}var ug=hn(lg,[["render",cg],["__file","/Users/icuxika/WebstormProjects/vue-scaffold-ui/lib/banner/Banner.vue"]]);const fg=["disabled"],dg={key:0,class:"v3-loading-indicator"},pg={key:1,class:"v3-loading-indicator-empty"},hg={name:"Button"},mg=vt(xo(wo({},hg),{props:{theme:{type:String,required:!1,default:"button"},size:{type:String,required:!1,default:"normal"},level:{type:String,required:!1,default:"normal"},disabled:{type:Boolean,required:!1,default:!1},loading:{type:Boolean,required:!1,default:!1}},setup(e){const t=e,n=ke(()=>({[`v3-theme-${t.theme}`]:t.theme,[`v3-size-${t.size}`]:t.size,[`v3-level-${t.level}`]:t.level}));return(r,o)=>(Xe(),At("button",{class:Br(["v3-button",$e(n)]),disabled:t.disabled},[t.loading?(Xe(),At("span",dg)):(Xe(),At("span",pg)),Rr(r.$slots,"default")],10,fg))}}));var Oc=hn(mg,[["__file","/Users/icuxika/WebstormProjects/vue-scaffold-ui/lib/button/Button.vue"]]);const yo=e=>(dl("data-v-0570c587"),e=e(),pl(),e),gg={key:0,class:"container"},yg=yo(()=>ve("div",{class:"title"},[ve("span",null,"\u5B8C\u6210\u62FC\u56FE\u7136\u540E\u70B9\u51FB\u786E\u8BA4")],-1)),bg=["src"],vg={class:"control-wrapper"},wg=yo(()=>ve("span",null,"\u53D6\u6D88",-1)),xg=yo(()=>ve("span",null,"\u5237\u65B0",-1)),kg=yo(()=>ve("span",null,"\u786E\u8BA4",-1)),Eg={name:"Verification"},Fg=vt(xo(wo({},Eg),{props:{visible:{type:Boolean,required:!0,default:!1},onRefresh:{type:Function,required:!0},onConfirm:{type:Function,required:!0}},emits:["update:visible"],setup(e,{emit:t}){const n=e;Jd(m=>({"0570c587-shadeImageUrl":$e(s),"0570c587-blockWrapperTop":$e(c)}));let r="";const o=Be(""),s=ke(()=>"url('data:image/jpg;base64,"+o.value+"')"),i=Be(""),a=ke(()=>"data:image/jpg;base64,"+i.value),l=Be(0),c=ke(()=>l.value+"px"),u=Be(),f=Be();let d=0,w=0;const F=m=>{d=m.x-m.target.getBoundingClientRect().x,w=m.y-m.target.getBoundingClientRect().y,m.dataTransfer&&(m.dataTransfer.effectAllowed="move")},I=m=>{let y=u.value,k=f.value;if(y&&k){let{x:M,y:C,width:Y,height:j}=y.getBoundingClientRect(),{width:K,height:te}=k.getBoundingClientRect();m.x-dM+Y||m.y-wC+j?m.dataTransfer&&(m.dataTransfer.dropEffect="none"):m.dataTransfer&&(m.dataTransfer.dropEffect="move")}m.preventDefault()},x=m=>{let y=m.target.className,k=f.value;k&&(y==="image-wrapper"?(k.style.left=m.offsetX-d+"px",k.style.top=m.offsetY-w+"px"):(k.style.left=m.offsetX+k.getBoundingClientRect().x-k.parentNode.getBoundingClientRect().x-d+"px",k.style.top=m.offsetY+k.getBoundingClientRect().y-k.parentNode.getBoundingClientRect().y-w+"px")),m.preventDefault()},R=()=>{const m=n.onRefresh();o.value=m.shadeImage,i.value=m.blockImage,l.value=m.y,r=m.token},g=()=>{let m=0,y=0,k=u.value,M=f.value;k&&M&&(m=M.getBoundingClientRect().x-k.getBoundingClientRect().x,y=M.getBoundingClientRect().y-k.getBoundingClientRect().y);let C=n.onConfirm(m,y,r);console.log(C)};return cr(()=>{R()}),(m,y)=>n.visible?(Xe(),At("div",gg,[yg,ve("div",{ref_key:"imageWrapperRef",ref:u,class:"image-wrapper",onDrop:x,onDragenter:y[3]||(y[3]=Ut(()=>{},["prevent"])),onDragleave:y[4]||(y[4]=Ut(()=>{},["prevent"])),onDragend:y[5]||(y[5]=Ut(()=>{},["prevent"])),onDragover:I},[ve("div",{ref_key:"blockWrapperRef",ref:f,class:"block-wrapper"},[ve("img",{class:"block-image",src:$e(a),alt:"",draggable:"true",onDragstart:F,onDragenter:y[0]||(y[0]=Ut(()=>{},["prevent"])),onDragleave:y[1]||(y[1]=Ut(()=>{},["prevent"])),onDragend:y[2]||(y[2]=Ut(()=>{},["prevent"]))},null,40,bg)],512)],544),ve("div",vg,[ve("div",{class:"cancel-wrapper",onClick:y[6]||(y[6]=k=>t("update:visible",!1))},[Rr(m.$slots,"cancel",{},()=>[wg],!0)]),ve("div",{class:"refresh-wrapper",onClick:R},[Rr(m.$slots,"refresh",{},()=>[xg],!0)]),ve("div",{class:"confirm-wrapper",onClick:g},[Rr(m.$slots,"confirm",{},()=>[kg],!0)])])])):Pl("v-if",!0)}}));var Sg=hn(Fg,[["__scopeId","data-v-0570c587"],["__file","/Users/icuxika/WebstormProjects/vue-scaffold-ui/lib/verification/Verification.vue"]]);const Rg=({components:e=[],componentPrefix:t="V"})=>{const n=(o,s,i)=>{o.component(t+s)||o.component(t+s,i)};return{install:o=>{e.forEach(s=>{var i;n(o,(i=s.name)!=null?i:"",s)})}}};const Mg={class:"container"},Ig={class:"component"},Cg={class:"action"},Tg={key:0,class:"code"},Og=["innerHTML"],Ag=vt({props:{component:{type:Object,required:!0}},setup(e){const t=e,n=t.component.__sourceCodeTitle,r=ke(()=>Zr.highlight(t.component.__sourceCode,Zr.languages.html,"html")),o=Be(!1),s=()=>o.value=!o.value;return(i,a)=>(Xe(),At("div",Mg,[ve("h2",null,Ho($e(n)),1),ve("div",Ig,[(Xe(),ur(_f(t.component)))]),ve("div",Cg,[D($e(Oc),{onClick:s},{default:Mn(()=>[Je(Ho(o.value?"\u9690\u85CF\u6E90\u4EE3\u7801":"\u67E5\u770B\u6E90\u4EE3\u7801"),1)]),_:1})]),o.value?(Xe(),At("div",Tg,[ve("pre",{class:"language-html",innerHTML:$e(r)},null,8,Og)])):Pl("v-if",!0)]))}});var jg=hn(Ag,[["__scopeId","data-v-46454032"],["__file","/Users/icuxika/WebstormProjects/vue-scaffold-ui/src/views/components/Demo.vue"]]),Fa=e=>{e.__sourceCode=` + diff --git a/src/views/components/DemoX.tsx b/src/views/components/DemoX.tsx index 5f1a4c0..f860866 100644 --- a/src/views/components/DemoX.tsx +++ b/src/views/components/DemoX.tsx @@ -45,18 +45,16 @@ export const DemoX = defineComponent({ const codeVisible = ref(false); const toggleCodeVisible = () => (codeVisible.value = !codeVisible.value); - // 将onClick事件设置在VButton上时,开发时没有问题,但是构建时vue-tsc会报错不通过,因为这个操作的相当于给 - // VButton多添加了一个属性,但VButton作为一个自定义组件没有具备onClick,暂时通过套一层div来进行解决 return () => (

{(props.component as ComponentType).__sourceCodeTitle}

{h(props.component)}
-
- - {codeVisible.value ? "隐藏源代码" : "查看源代码"} - -
+ + {codeVisible.value ? "隐藏源代码" : "查看源代码"} +
{codeVisible.value ? (