From 036a11f40edbd46a87541475f5eb6950a74a1254 Mon Sep 17 00:00:00 2001
From: JackLee <1071426378@163.com>
Date: Thu, 1 Jul 2021 13:01:58 +0800
Subject: [PATCH] Fix display bug.
---
dist.js | 2 +-
package.json | 4 ++--
src/main.js | 2 +-
"\346\212\242\350\257\276\345\212\251\346\211\213.user.js" | 4 ++--
4 files changed, 6 insertions(+), 6 deletions(-)
diff --git a/dist.js b/dist.js
index 4eb085e..631af84 100644
--- a/dist.js
+++ b/dist.js
@@ -1 +1 @@
-(()=>{var __webpack_modules__={364:n=>{"use strict";var e,t,o={title:"Message",text:null,theme:"default",overlay:!0,width:"90%",height:"50%",maxWidth:"450px",maxHeight:"200px",type:"text",customContent:null,customCallback:null,icon:null,iconURL:null,inputType:null,inputValue:null,inputPlaceholder:null,inputColor:null,inputValidator:null,inputPromise:null,showCancelButton:null,buttons:null,autoClose:null,html:!1,animation:!0,animationType:"pop",overlayAnimation:!0,keyResponse:!0,showButtonOutline:!1,buttonTextOk:"OK",buttonTextConfirm:"Confirm",buttonTextCancel:"Cancel",buttonTextDefault:"Button"};(e=t=function(){function n(){var n="";return n+="width: "+k.width+";",n+="height: "+k.height+";",null!=k.maxWidth&&(n+="max-width: "+k.maxWidth+";"),null!=k.maxHeight&&(n+="max-height: "+k.maxHeight+";"),k.animation&&(n+="-webkit-animation-name: x0p"+k.animationType+"; animation-name: x0p"+k.animationType+";"),!k.overlay&&(n+="outline: 1px solid #ddd"),n}function e(){var n="";switch(n+='
',null==k.icon?k.type:k.icon){case"ok":n+='';break;case"error":n+='';break;case"info":n+='';break;case"warning":n+='';break;case"custom":n+=""}return n+"
"}function t(){var n="";if(null==(_=k.buttons)&&(_=[],1!=k.showCancelButton&&(0==k.showCancelButton||"warning"!=k.type&&"input"!=k.type)||_.push({type:"cancel",key:27}),"text"==k.type||"input"==k.type?_.push({type:"info",key:13}):_.push({type:k.type,key:13})),0==_.length)return"";var e=1==k.keyResponse?"button":"div",t=_.length,o="width: "+(100/t).toFixed(2)+"%; width: calc(100% / "+t+");",a=1==k.showButtonOutline?" button-outline":"";n+='';for(var i=0;i<_.length;++i){var r=_[i];n+="<"+e+' id="x0p-button-'+i+'" class="button button-'+r.type+a+'" style="'+o+'">'+p(r)+""+e+">"}return n+"
"}function a(n){var e=document.getElementById(n);null!=e&&e.parentNode.removeChild(e)}function i(){h.classList.remove("noscroll"),document.removeEventListener("keydown",s),a("x0popup"),a("x0p-overlay")}function r(){document.getElementById("x0p-buttons").innerHTML=''}function l(){for(var n=_.length-1,e=0;e<_.length;++e){var t=document.getElementById("x0p-button-"+e);!function(n,e){t.addEventListener("click",(function(){c(n,e)}))}(_[e].type,_[e].showLoading),t.addEventListener("mousedown",(function(n){n.preventDefault?n.preventDefault():n.returnValue=!1})),1==_[e].default&&(n=e)}k.keyResponse&&_.length>0?(document.getElementById("x0p-button-"+(_.length-1)).addEventListener("keydown",(function(n){9==n.keyCode&&(document.getElementById("x0p-button-0").focus(),n.preventDefault?n.preventDefault():n.returnValue=!1)})),document.getElementById("x0p-button-"+n).focus()):document.activeElement.blur()}function s(n){for(var e=n.keyCode,t=0;t<_.length;++t)if(e==_[t].key){var o=document.getElementById("x0p-button-"+t);n.preventDefault?n.preventDefault():n.returnValue=!1,o&&o.click()}}function c(n,e){if(null!=document.getElementById("x0popup")){var t=document.getElementById("x0p-input");if("cancel"!=n&&null!=$&&null!=t){if(null!=k.inputPromise)return void k.inputPromise(n,t.value).then((function(t){null!=t?u(t):d(n,e)}));if(null!=k.inputValidator){var o=k.inputValidator(n,t.value);if(null!=o)return void u(o)}}d(n,e)}}function d(n,e){var t=document.getElementById("x0p-input"),o=null===k.customCallback?void 0:k.customCallback();clearTimeout(g),1==e?r():i();var a=null==t?null:t.value;null!=b&&b(n,a,i),v({button:n,text:a,close:i,data:o})}function u(n){a("x0p-input-error"),document.getElementById("x0p-input-anchor").insertAdjacentHTML("beforeend",''+n+"
")}function p(n){if(n.hasOwnProperty("text"))return n.text;switch(n.type){case"ok":case"error":case"info":return o.buttonTextOk;case"warning":return o.buttonTextConfirm;case"cancel":return o.buttonTextCancel;default:return o.buttonTextDefault}}function f(){var n=k.inputColor;return null==n?"":""}function m(n){var e=document.createElement("div");return e.innerText=e.textContent=n,e.innerHTML}var _,x=arguments[0],b=null,k=JSON.parse(JSON.stringify(o)),g=null,h=document.body;if("string"==typeof x)k.title=arguments[0],null!=arguments[1]&&(k.text=arguments[1]),null!=arguments[2]&&(k.type=arguments[2]),null!=arguments[3]&&("boolean"==typeof arguments[3]?k.overlayAnimation=arguments[3]:b=arguments[3]);else{for(var y in x)k[y]=x[y];null!=arguments[1]&&(b=arguments[1])}var v,w="",j=null==k.icon&&("text"==k.type||"input"==k.type),$=null!=k.inputType?k.inputType:"input"==k.type?"text":null,z=null==k.inputValue?"":k.inputValue,B=null==k.inputPlaceholder?"":k.inputPlaceholder,F=t(),C=null==k.customContent?"":k.customContent,T=new Promise((function(t,o){v=t,k.overlay&&(w+=''),w+='