@persagy2/meri-design
Version:
fork from meri-design and extend it.
7 lines • 37.2 kB
JavaScript
/*!
* @@persagy2/meri-design v1.4.9-extend.2
* (c) 2019-2020 xiongshuang
* Released under the MIT License.
* 2022-12-07 10:32:51
*/
var t,e;t=this,e=function(t){return function(){"use strict";var e={8962:function(t,e,r){r.d(e,{default:function(){return w}});var n=r(2205),i=r.n(n),a={name:"MessageBox"},s=r(1900),o=(0,s.Z)(a,(function(){return(0,this._self._c)("div",{staticClass:"p-message-box"})}),[],!1,null,null,null).exports,l={name:"Message",components:{IconClose:(0,s.Z)({},(function(){var t=this._self._c;return t("svg",{attrs:{viewBox:"0 0 1024 1024",version:"1.1",xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink"}},[t("path",{staticClass:"svg-fill-white",attrs:{d:"M522.752 441.124571L916.772571 47.104l78.848 78.774857L601.526857 520.045714l394.093714 394.020572-78.848 78.848-394.020571-394.093715-394.093714 394.093715-78.774857-78.848L443.904 520.045714 49.883429 125.805714 128.658286 47.104 522.752 441.051429z"}})])}),[],!1,null,null,null).exports,HintError:(0,s.Z)({},(function(){var t=this._self._c;return t("svg",{attrs:{viewBox:"0 0 16 16",version:"1.1",xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink"}},[t("path",{staticClass:"svg-fill-white",attrs:{d:"M8,-7.10542736e-15 C12.41875,0 16,3.58125 16,8 C16,12.41875 12.41875,16 8,16 C3.58125,16 0,12.41875 0,8 C0,3.58125 3.58125,0 8,-7.10542736e-15 Z M5.75226954,4.71485549 C5.46579556,4.4283815 5.00132947,4.4283815 4.71485549,4.71485549 C4.4283815,5.00132947 4.4283815,5.46579556 4.71485549,5.75226954 L4.71485549,5.75226954 L6.962,8 L4.71485549,10.2477305 C4.45442459,10.5081613 4.43074906,10.9156932 4.64382888,11.2028697 L4.71485549,11.2851445 C5.00132947,11.5716185 5.46579556,11.5716185 5.75226954,11.2851445 L5.75226954,11.2851445 L8,9.038 L10.2477305,11.2851445 C10.5081613,11.5455754 10.9156932,11.5692509 11.2028697,11.3561711 L11.2851445,11.2851445 C11.5716185,10.9986705 11.5716185,10.5342044 11.2851445,10.2477305 L11.2851445,10.2477305 L9.038,8 L11.2851445,5.75226954 C11.5455754,5.49183865 11.5692509,5.08430684 11.3561711,4.79713033 L11.2851445,4.71485549 C10.9986705,4.4283815 10.5342044,4.4283815 10.2477305,4.71485549 L10.2477305,4.71485549 L8,6.962 Z"}})])}),[],!1,null,null,null).exports,HintInfo:(0,s.Z)({},(function(){var t=this._self._c;return t("svg",{attrs:{viewBox:"0 0 16 16",version:"1.1",xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink"}},[t("path",{staticClass:"svg-fill-white",attrs:{d:"M0,8 C0,3.58125 3.58125,0 8,0 C12.41875,0 16,3.58125 16,8 C16,12.41875 12.41875,16 8,16 C3.58125,16 0,12.41875 0,8 Z M7.30712442,11.9860119 C8.23022907,11.9860119 8.77907791,11.3784871 9.31799651,10.5908436 C9.31799651,10.496903 9.35079884,10.2490614 9.33045,10.1085465 L8.61360116,10.9486257 C8.46456628,11.1070416 8.28004302,11.2181703 8.19205465,11.1881505 C8.11139186,11.1601109 8.06345,11.0718733 8.07981047,10.9849822 L9.27591512,7.13856634 C9.37513605,6.64985347 9.1046593,6.20589307 8.53342674,6.14910099 C7.9321593,6.14910099 7.04649651,6.77064554 6.50684535,7.55828911 C6.50684535,7.65286337 6.48975233,7.88668515 6.5095314,8.0272 L7.22711279,7.18648713 C7.37541512,7.02807129 7.54748488,6.91757624 7.6347407,6.94759604 C7.72272907,6.97761584 7.77132209,7.07789307 7.74242674,7.17183366 L6.55478721,10.9996356 C6.41763605,11.4469228 6.67688023,11.8863683 7.30712442,11.9860119 Z M8.82990769,4 C8.69197969,4.00307755 8.55711879,4.03923824 8.42532093,4.10848314 C8.29352307,4.17772804 8.18931237,4.27851633 8.11268571,4.41085103 C8.03605904,4.54318573 7.99851254,4.68398158 8.00004508,4.83324282 C8.00157761,4.98250405 8.03912411,5.12176115 8.11268571,5.2510183 C8.1862473,5.38027545 8.28662673,5.48183311 8.41382699,5.55569434 C8.54102725,5.62955557 8.67971943,5.66648563 8.82990769,5.66648563 C8.97703088,5.66956318 9.11572306,5.6334025 9.24598839,5.5580025 C9.37625372,5.48260249 9.47816565,5.38027545 9.55172725,5.2510183 C9.62528884,5.12176115 9.6636016,4.98173467 9.66666667,4.83093466 C9.66666667,4.68321221 9.62835391,4.54318573 9.55172725,4.41085103 C9.47510058,4.27851633 9.36935737,4.17695866 9.23449445,4.10617498 C9.09963152,4.03539131 8.96477062,4 8.82990769,4 Z"}})])}),[],!1,null,null,null).exports,HintSuccess:(0,s.Z)({},(function(){var t=this._self._c;return t("svg",{attrs:{viewBox:"0 0 16 16",version:"1.1",xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink"}},[t("path",{staticClass:"svg-fill-white",attrs:{d:"M8,-7.10542736e-15 C12.41875,0 16,3.58125 16,8 C16,12.41875 12.41875,16 8,16 C3.58125,16 0,12.41875 0,8 C0,3.58125 3.58125,0 8,-7.10542736e-15 Z M11.4856317,4.85973157 L7.07565283,9.76971039 L5.10392523,7.79798279 C4.82373446,7.51779201 4.36117761,7.52606985 4.07077561,7.81647186 C3.7803736,8.10687387 3.77209576,8.56943071 4.05228653,8.84962149 L6.53134441,11.3286794 C6.81153519,11.6088701 7.27409203,11.6005923 7.56449404,11.3101903 L12.5002922,5.87439213 C12.7906942,5.58399012 12.7989721,5.12143328 12.5187813,4.8412425 C12.2385905,4.56105173 11.7760337,4.56932957 11.4856317,4.85973157 Z"}})])}),[],!1,null,null,null).exports,HintWaring:(0,s.Z)({},(function(){var t=this._self._c;return t("svg",{attrs:{viewBox:"0 0 16 16",version:"1.1",xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink"}},[t("path",{staticClass:"svg-fill-white",attrs:{d:"M8,0 C12.41875,0 16,3.58125 16,8 C16,12.41875 12.41875,16 8,16 C3.58125,16 0,12.41875 0,8 C0,3.58125 3.58125,0 8,0 Z M8.16324102,10.6666667 C8.02531303,10.6697442 7.89045212,10.7059049 7.75865426,10.7751498 C7.6268564,10.8443947 7.5226457,10.945183 7.44601904,11.0775177 C7.36939238,11.2098524 7.33184588,11.3506483 7.33337841,11.4999095 C7.33491094,11.6491707 7.37245744,11.7884278 7.44601904,11.917685 C7.51958064,12.0469421 7.61996006,12.1484998 7.74716032,12.222361 C7.87436058,12.2962222 8.01305276,12.3331523 8.16324102,12.3331523 C8.31036421,12.3362298 8.44905639,12.3000692 8.57932172,12.2246692 C8.70958705,12.1492692 8.81149898,12.0469421 8.88506058,11.917685 C8.95862218,11.7884278 8.99693493,11.6484013 9,11.4976013 C9,11.3498789 8.96168724,11.2098524 8.88506058,11.0775177 C8.80843392,10.945183 8.70269071,10.8436253 8.56782778,10.7728417 C8.43296485,10.702058 8.29810395,10.6666667 8.16324102,10.6666667 Z M8.16666667,3.66666667 C8.1324564,3.66666667 8.09826624,3.66832478 8.06421651,3.67163517 C7.48223374,3.72821683 7.05631198,4.24587558 7.11289364,4.82785836 L7.11289364,4.82785836 L7.52688652,9.08607082 C7.55890782,9.41543277 7.83575179,9.66666667 8.16666667,9.66666667 C8.49758154,9.66666667 8.77442552,9.41543277 8.80644682,9.08607082 L8.80644682,9.08607082 L9.2204397,4.82785836 C9.22375009,4.79380863 9.2254082,4.75961847 9.2254082,4.7254082 C9.2254082,4.1406814 8.75139347,3.66666667 8.16666667,3.66666667 Z"}})])}),[],!1,null,null,null).exports},data:function(){return{type:"info",message:"",visible:!1}},methods:{closeNode:function(){var t=this;this.$el.style.transition="all .3s",this.$el.style.opacity=".5",this.$el.style.marginTop="0",this.$el.style.transform="translateY(-100%)",this.$destroy(),setTimeout((function(){t.$el.parentNode.removeChild(t.$el),t.cb&&t.cb()}),300)}}},c=(0,s.Z)(l,(function(){var t=this,e=t._self._c;return e("transition",{attrs:{name:"fadeDownUpUi"}},[e("div",{directives:[{name:"show",rawName:"v-show",value:t.visible,expression:"visible"}],class:"p-message p-message-".concat(t.type)},[e("section",{staticClass:"p-message-hint"},["info"===t.type?e("HintInfo"):"success"===t.type?e("HintSuccess"):"warning"===t.type?e("HintWaring"):e("HintError")],1),t._v(" "),e("section",{staticClass:"p-message-text"},[t._v(t._s(t.message))]),t._v(" "),e("section",{staticClass:"p-message-close",on:{click:t.closeNode}},[e("IconClose")],1)])])}),[],!1,null,null,null).exports,u=i().extend(o),f=i().extend(c),p=null,h=null,d=0,g=[],m=[],v=function t(e){if(!i().prototype.$isServer){var r=e||{};"string"==typeof r&&(r={message:e});var n="message_".concat(d++);return p||(p=(p=new u).$mount(),document.body.appendChild(p.$el)),(h=new f({data:r})).id=n,(h=h.$mount()).visible=!0,p.$el.appendChild(h.$el),h.$el.style.zIndex=d+1001,h.$el.style.transform="translateZ(0)",g.push(h),t.setTimer(n,h),h}};["success","warning","info","error"].forEach((function(t){v[t]=function(e){var r=e||{};return"string"==typeof r&&(r={message:r}),r.type=t,v(r)}})),v.setTimer=function(t,e){m.push(window.setTimeout((function(){v.clearTimer(t,e)}),3e3))},v.clearTimer=function(t,e){e.visible=!1,e.$el.style.transition="all .3s",e.$el.style.opacity=".5",e.$el.style.transform="translateY(-100%)",setTimeout((function(){if(e&&!e._isDestroyed){e.$destroy(),e.$el.parentNode.removeChild(e.$el);var r=g.findIndex((function(e){return e.id===t}));window.clearTimeout(m[r]),m.splice(r,1),g.splice(r,1)}}),300)},v.changeMessage=function(t,e){t.message=e;for(var r=g.length,n=0;n<r;n++)if(g[n].id===t.id)return window.clearTimeout(m[n]),m.splice(n,1),g.splice(n,1),g.push(t),void v.setTimer(t.id,t)},v.remove=function(t){t&&!t._isDestroyed&&v.clearTimer(t.id,t)};var w=v},1900:function(t,e,r){function n(t,e,r,n,i,a,s,o){var l,c="function"==typeof t?t.options:t;if(e&&(c.render=e,c.staticRenderFns=r,c._compiled=!0),n&&(c.functional=!0),a&&(c._scopeId="data-v-"+a),s?(l=function(t){(t=t||this.$vnode&&this.$vnode.ssrContext||this.parent&&this.parent.$vnode&&this.parent.$vnode.ssrContext)||"undefined"==typeof __VUE_SSR_CONTEXT__||(t=__VUE_SSR_CONTEXT__),i&&i.call(this,t),t&&t._registeredComponents&&t._registeredComponents.add(s)},c._ssrRegister=l):i&&(l=o?function(){i.call(this,(c.functional?this.parent:this).$root.$options.shadowRoot)}:i),l)if(c.functional){c._injectStyles=l;var u=c.render;c.render=function(t,e){return l.call(e),u(t,e)}}else{var f=c.beforeCreate;c.beforeCreate=f?[].concat(f,l):[l]}return{exports:t,options:c}}r.d(e,{Z:function(){return n}})},2205:function(e){e.exports=t}},r={};function n(t){var i=r[t];if(void 0!==i)return i.exports;var a=r[t]={exports:{}};return e[t](a,a.exports,n),a.exports}n.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(e,{a:e}),e},n.d=function(t,e){for(var r in e)n.o(e,r)&&!n.o(t,r)&&Object.defineProperty(t,r,{enumerable:!0,get:e[r]})},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})};var i={};return function(){n.r(i),n.d(i,{default:function(){return C}});var t=n(1900),e=(0,t.Z)({},(function(){var t=this._self._c;return t("svg",{attrs:{viewBox:"0 1 16 17",version:"1.1",xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink"}},[t("g",{attrs:{transform:"translate(0, 1.500000)"}},[t("path",{staticClass:"svg-fill-grey-800",attrs:{d:"M8.66666667,1.66666667 L8.66666667,7.33266667 L14.3333333,7.33333333 L14.3333333,8.66666667\r\n L8.66566667,8.66666667 L8.66666667,14.3333333 L7.33333333,14.3333333 L7.33266667,8.66566667 L1.66666667,8.66666667\r\n L1.66666667,7.33333333 L7.33266667,7.33266667 L7.33333333,1.66666667 L8.66666667,1.66666667 Z"}})])])}),[],!1,null,null,null).exports,r=(0,t.Z)({},(function(){var t=this._self._c;return t("svg",{attrs:{viewBox:"0 0 14 14",version:"1.1",xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink"}},[t("g",{attrs:{transform:"translate(-1.000000, -1.000000)","fill-rule":"nonzero"}},[t("path",{staticClass:"svg-fill-grey-400",attrs:{d:"M8,1 C4.134375,1 1,4.134375 1,8 C1,11.865625 4.134375,15 8,15 C11.865625,15 15,11.865625 15,8 C15,4.134375 11.865625,1 8,1 Z M10.784375,9.6375 C11.040625,9.89375 11.040625,10.309375 10.784375,10.565625 C10.528125,10.821875 10.1125,10.821875 9.85625,10.565625 L8,8.709375 L6.14375,10.565625 C5.8875,10.821875 5.471875,10.821875 5.215625,10.565625 C4.959375,10.309375 4.959375,9.89375 5.215625,9.6375 L7.071875,7.78125 L5.215625,5.925 C4.959375,5.66875 4.959375,5.253125 5.215625,4.996875 C5.471875,4.740625 5.8875,4.740625 6.14375,4.996875 L8,6.853125 L9.85625,4.996875 C10.1125,4.740625 10.528125,4.740625 10.784375,4.996875 C11.040625,5.253125 11.040625,5.66875 10.784375,5.925 L8.928125,7.78125 L10.784375,9.6375 L10.784375,9.6375 Z"}})])])}),[],!1,null,null,null).exports,a=(0,t.Z)({},(function(){var t=this,e=t._self._c;return e("svg",{attrs:{viewBox:"0 0 41 40",version:"1.1",xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink"}},[e("g",{attrs:{stroke:"none","stroke-width":"1",fill:"none","fill-rule":"evenodd",opacity:"0.925548735"}},[e("rect",{staticClass:"svg-stroke-grey-400",attrs:{"stroke-width":"2",x:"4.00368755",y:"7",width:"32",height:"25",rx:"2.02985075"}}),t._v(" "),e("path",{staticClass:"svg-fill-grey-400",attrs:{d:"M4.26491802,26.6431168 L12.1045755,16.9621735 C12.457332,16.5265656 13.0964277,16.4594014 13.5320356,16.812158 C13.5707575,16.8435151 13.6071177,16.8776811 13.6408213,16.914379 L17.8672865,21.5163297 C18.2059311,21.8850599 18.7628649,21.9517713 19.1790152,21.6734529 L21.4437915,20.1587862 C21.8389862,19.8944827 22.3646926,19.939935 22.7086589,20.2681458 L35.0036876,32 L35.0036876,32 L4.26491802,32 L4.26491802,26.6431168 Z"}}),t._v(" "),e("circle",{staticClass:"svg-stroke-grey-50 svg-fill-grey-400",attrs:{"stroke-width":"2",cx:"31.5",cy:"28",r:"7"}}),t._v(" "),e("path",{staticClass:"svg-fill-white",attrs:{d:"M32.5,30 L32.5,32 L30.5,32 L30.5,30 L32.5,30 Z M32.5,24 L32.5,29 L30.5,29 L30.5,24 L32.5,24 Z"}})])])}),[],!1,null,null,null).exports,s=(0,t.Z)({},(function(){var t=this._self._c;return t("svg",{attrs:{viewBox:"0 0 1024 1024",version:"1.1",xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink"}},[t("path",{staticClass:"svg-stroke-grey-500",attrs:{d:"M379.104 509.344c4.647 3.465 7.707 5.211 10.102 7.614 111.882 111.777 223.68 223.642 335.584 335.395 11.498 11.482 17.601 24.432 14.060 40.893-6.549 30.444-42.724 43.056-66.702 23.207-2.638-2.179-5.006-4.691-7.43-7.116-122.147-122.131-244.291-244.268-366.434-366.411-22.218-22.218-22.236-44.944-0.033-67.143 122.749-122.755 245.548-245.451 368.185-368.316 12.166-12.191 26.062-17.589 42.734-13.327 28.957 7.395 40.247 42.511 21.462 65.827-2.323 2.881-5.046 5.457-7.669 8.083-111.214 111.228-222.435 222.459-333.706 333.634-2.407 2.404-5.469 4.166-10.148 7.66z"}})])}),[],!1,null,null,null).exports,o=(0,t.Z)({},(function(){var t=this._self._c;return t("svg",{attrs:{viewBox:"0 0 1024 1024",version:"1.1",xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink"}},[t("path",{staticClass:"svg-fill-grey-500",attrs:{d:"M112.979852 869.87749m29.144113-29.144113l699.730243-699.730243q29.144113-29.144113 58.288226 0l0 0q29.144113 29.144113 0 58.288226l-699.730243 699.730243q-29.144113 29.144113-58.288226 0l0 0q-29.144113-29.144113 0-58.288226Z"}}),this._v(" "),t("path",{staticClass:"svg-fill-grey-500",attrs:{d:"M824.612116 882.05104L156.379237 213.818161a42.88 42.88 0 1 1 60.641478-60.641477l668.232879 668.232879a42.88 42.88 0 0 1-60.641478 60.641477z"}})])}),[],!1,null,null,null).exports,l=(0,t.Z)({},(function(){var t=this,e=t._self._c;return e("svg",{attrs:{viewBox:"0 0 1024 1024",version:"1.1",xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink"}},[e("path",{staticClass:"svg-fill-grey-800",attrs:{d:"M513.024 41.92c23.552 0 42.688 19.072 42.688 42.688v597.312a42.688 42.688 0 0 1-85.312 0V84.608c0-23.616 19.072-42.688 42.624-42.688z"}}),t._v(" "),e("path",{staticClass:"svg-fill-grey-800",attrs:{d:"M506.496 664.384l275.584-266.048a42.688 42.688 0 0 1 59.264 61.44L535.232 755.2a42.56 42.56 0 0 1-60.16-0.896L183.872 455.68a42.688 42.688 0 1 1 61.056-59.52l261.568 268.224z"}}),t._v(" "),e("path",{staticClass:"svg-fill-grey-500",attrs:{d:"M43.712 639.232v213.376a128 128 0 0 0 128 128H854.4a128 128 0 0 0 128-128V639.232a42.688 42.688 0 0 0-85.376 0v213.376a42.688 42.688 0 0 1-42.624 42.624H171.712a42.688 42.688 0 0 1-42.688-42.624V639.232a42.688 42.688 0 0 0-85.312 0z"}})])}),[],!1,null,null,null).exports,c=(0,t.Z)({},(function(){var t=this,e=t._self._c;return e("svg",{attrs:{viewBox:"0 0 16 16",version:"1.1",xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink"}},[e("title",[t._v("原比例备份 3")]),t._v(" "),e("g",{attrs:{stroke:"none","stroke-width":"1",fill:"none","fill-rule":"evenodd"}},[e("path",{staticClass:"svg-fill-grey-500",attrs:{d:"M13.5579646,1.02767432 L2.51840787,1.02767432 C1.40758494,1.02767432 0.504247048,1.92151903 0.504247048,3.02767432 L0.504247048,12.9886417 C0.504247048,14.094797 1.40758494,14.9886417 2.51840787,14.9886417 L13.5579646,14.9886417 C14.6625341,14.9886417 15.5579646,14.0932112 15.5579646,12.9886417 L15.5579646,3.02767432 C15.5579646,1.92310482 14.6625341,1.02767432 13.5579646,1.02767432 Z M2.51840787,2.36100766 L13.5579646,2.36100766 C13.9261544,2.36100766 14.2246313,2.65948449 14.2246313,3.02767432 L14.2246313,12.9886417 C14.2246313,13.3568315 13.9261544,13.6553083 13.5579646,13.6553083 L2.51840787,13.6553083 C2.14082986,13.6553083 1.83758038,13.3552457 1.83758038,12.9886417 L1.83758038,3.02767432 C1.83758038,2.66107028 2.14082986,2.36100766 2.51840787,2.36100766 Z","fill-rule":"nonzero"}}),t._v(" "),e("rect",{staticClass:"svg-fill-grey-800",attrs:{x:"4.66666667",y:"5.33333333",width:"1.33333333",height:"5.33333333",rx:"0.666666667"}}),t._v(" "),e("rect",{staticClass:"svg-fill-grey-800",attrs:{x:"10",y:"5.33333333",width:"1.33333333",height:"5.33333333",rx:"0.666666667"}}),t._v(" "),e("circle",{staticClass:"svg-fill-grey-800",attrs:{cx:"8",cy:"6.66666667",r:"1"}}),t._v(" "),e("circle",{staticClass:"svg-fill-grey-800",attrs:{cx:"8",cy:"9.33333333",r:"1"}})])])}),[],!1,null,null,null).exports,u=(0,t.Z)({},(function(){var t=this._self._c;return t("svg",{attrs:{viewBox:"0 0 16 16",version:"1.1",xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink"}},[t("path",{staticClass:"svg-fill-grey-500",attrs:{d:"M13.5579646,1.02767432 L2.51840787,1.02767432 C1.40758494,1.02767432 0.504247048,1.92151903 0.504247048,3.02767432 L0.504247048,12.9886417 C0.504247048,14.094797 1.40758494,14.9886417 2.51840787,14.9886417 L13.5579646,14.9886417 C14.6625341,14.9886417 15.5579646,14.0932112 15.5579646,12.9886417 L15.5579646,3.02767432 C15.5579646,1.92310482 14.6625341,1.02767432 13.5579646,1.02767432 Z M2.51840787,2.36100766 L13.5579646,2.36100766 C13.9261544,2.36100766 14.2246313,2.65948449 14.2246313,3.02767432 L14.2246313,12.9886417 C14.2246313,13.3568315 13.9261544,13.6553083 13.5579646,13.6553083 L2.51840787,13.6553083 C2.14082986,13.6553083 1.83758038,13.3552457 1.83758038,12.9886417 L1.83758038,3.02767432 C1.83758038,2.66107028 2.14082986,2.36100766 2.51840787,2.36100766 Z",stroke:"none"}}),this._v(" "),t("path",{staticClass:"svg-stroke-grey-800",attrs:{d:"M5.09732584,5.665 C4.91231045,5.665 4.76232584,5.81498461 4.76232584,6 L4.76232584,10 C4.76232584,10.1850154 4.91231045,10.335 5.09732584,10.335 L11.0045815,10.335 C11.1895969,10.335 11.3395815,10.1850154 11.3395815,10 L11.3395815,6 C11.3395815,5.81498461 11.1895969,5.665 11.0045815,5.665 L5.09732584,5.665 Z","stroke-width":"1.33",fill:"none"}})])}),[],!1,null,null,null).exports,f=n(8962),p=function(t){var e={type:(t.type||"GET").toUpperCase(),url:t.url||"",async:t.async||"true",data:t.data||null,dataType:t.dataType||"json",beforeSend:t.beforeSend||function(){},success:t.success||function(){},error:t.error||function(){},onprogress:t.onprogress||function(){}};e.beforeSend();var r=new XMLHttpRequest||new ActiveXObject("Microsoft.XMLHTTP");r.upload.onprogress=e.onprogress,r.open(e.type,e.url,e.async),r.responseType=e.dataType,r.send(e.data),r.onreadystatechange=function(){4===r.readyState&&(r.status>=200&&r.status<300||304===r.status?e.success(r.response):e.error(r.response))}};function h(){/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */h=function(){return t};var t={},e=Object.prototype,r=e.hasOwnProperty,n=Object.defineProperty||function(t,e,r){t[e]=r.value},i="function"==typeof Symbol?Symbol:{},a=i.iterator||"@@iterator",s=i.asyncIterator||"@@asyncIterator",o=i.toStringTag||"@@toStringTag";function l(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{l({},"")}catch(N){l=function(t,e,r){return t[e]=r}}function c(t,e,r,i){var a=e&&e.prototype instanceof p?e:p,s=Object.create(a.prototype),o=new k(i||[]);return n(s,"_invoke",{value:_(t,r,o)}),s}function u(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(N){return{type:"throw",arg:N}}}t.wrap=c;var f={};function p(){}function d(){}function m(){}var v={};l(v,a,(function(){return this}));var w=Object.getPrototypeOf,y=w&&w(w(S([])));y&&y!==e&&r.call(y,a)&&(v=y);var C=m.prototype=p.prototype=Object.create(v);function x(t){["next","throw","return"].forEach((function(e){l(t,e,(function(t){return this._invoke(e,t)}))}))}function L(t,e){function i(n,a,s,o){var l=u(t[n],t,a);if("throw"!==l.type){var c=l.arg,f=c.value;return f&&"object"==g(f)&&r.call(f,"__await")?e.resolve(f.__await).then((function(t){i("next",t,s,o)}),(function(t){i("throw",t,s,o)})):e.resolve(f).then((function(t){c.value=t,s(c)}),(function(t){return i("throw",t,s,o)}))}o(l.arg)}var a;n(this,"_invoke",{value:function(t,r){function n(){return new e((function(e,n){i(t,r,e,n)}))}return a=a?a.then(n,n):n()}})}function _(t,e,r){var n="suspendedStart";return function(i,a){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===i)throw a;return{value:void 0,done:!0}}for(r.method=i,r.arg=a;;){var s=r.delegate;if(s){var o=b(s,r);if(o){if(o===f)continue;return o}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var l=u(t,e,r);if("normal"===l.type){if(n=r.done?"completed":"suspendedYield",l.arg===f)continue;return{value:l.arg,done:r.done}}"throw"===l.type&&(n="completed",r.method="throw",r.arg=l.arg)}}}function b(t,e){var r=e.method,n=t.iterator[r];if(void 0===n)return e.delegate=null,"throw"===r&&t.iterator.return&&(e.method="return",e.arg=void 0,b(t,e),"throw"===e.method)||"return"!==r&&(e.method="throw",e.arg=new TypeError("The iterator does not provide a '"+r+"' method")),f;var i=u(n,t.iterator,e.arg);if("throw"===i.type)return e.method="throw",e.arg=i.arg,e.delegate=null,f;var a=i.arg;return a?a.done?(e[t.resultName]=a.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=void 0),e.delegate=null,f):a:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,f)}function I(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function M(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function k(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(I,this),this.reset(!0)}function S(t){if(t){var e=t[a];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var n=-1,i=function e(){for(;++n<t.length;)if(r.call(t,n))return e.value=t[n],e.done=!1,e;return e.value=void 0,e.done=!0,e};return i.next=i}}return{next:Z}}function Z(){return{value:void 0,done:!0}}return d.prototype=m,n(C,"constructor",{value:m,configurable:!0}),n(m,"constructor",{value:d,configurable:!0}),d.displayName=l(m,o,"GeneratorFunction"),t.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===d||"GeneratorFunction"===(e.displayName||e.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,m):(t.__proto__=m,l(t,o,"GeneratorFunction")),t.prototype=Object.create(C),t},t.awrap=function(t){return{__await:t}},x(L.prototype),l(L.prototype,s,(function(){return this})),t.AsyncIterator=L,t.async=function(e,r,n,i,a){void 0===a&&(a=Promise);var s=new L(c(e,r,n,i),a);return t.isGeneratorFunction(r)?s:s.next().then((function(t){return t.done?t.value:s.next()}))},x(C),l(C,o,"Generator"),l(C,a,(function(){return this})),l(C,"toString",(function(){return"[object Generator]"})),t.keys=function(t){var e=Object(t),r=[];for(var n in e)r.push(n);return r.reverse(),function t(){for(;r.length;){var n=r.pop();if(n in e)return t.value=n,t.done=!1,t}return t.done=!0,t}},t.values=S,k.prototype={constructor:k,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(M),!t)for(var e in this)"t"===e.charAt(0)&&r.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=void 0)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var e=this;function n(r,n){return s.type="throw",s.arg=t,e.next=r,n&&(e.method="next",e.arg=void 0),!!n}for(var i=this.tryEntries.length-1;i>=0;--i){var a=this.tryEntries[i],s=a.completion;if("root"===a.tryLoc)return n("end");if(a.tryLoc<=this.prev){var o=r.call(a,"catchLoc"),l=r.call(a,"finallyLoc");if(o&&l){if(this.prev<a.catchLoc)return n(a.catchLoc,!0);if(this.prev<a.finallyLoc)return n(a.finallyLoc)}else if(o){if(this.prev<a.catchLoc)return n(a.catchLoc,!0)}else{if(!l)throw new Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return n(a.finallyLoc)}}}},abrupt:function(t,e){for(var n=this.tryEntries.length-1;n>=0;--n){var i=this.tryEntries[n];if(i.tryLoc<=this.prev&&r.call(i,"finallyLoc")&&this.prev<i.finallyLoc){var a=i;break}}a&&("break"===t||"continue"===t)&&a.tryLoc<=e&&e<=a.finallyLoc&&(a=null);var s=a?a.completion:{};return s.type=t,s.arg=e,a?(this.method="next",this.next=a.finallyLoc,f):this.complete(s)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),f},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),M(r),f}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var i=n.arg;M(r)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,r){return this.delegate={iterator:S(t),resultName:e,nextLoc:r},"next"===this.method&&(this.arg=void 0),f}},t}function d(t,e,r,n,i,a,s){try{var o=t[a](s),l=o.value}catch(c){return void r(c)}o.done?e(l):Promise.resolve(l).then(n,i)}function g(t){return g="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},g(t)}var m={name:"ImageUpload",components:{Add:e,Delete:r,FailImg:a,Close:o,Download:l,OriginalSize:c,SmallImage:u,Left:s},data:function(){return{changeLimit:"",currentImageId:"",currentImageName:"",displayModal:!1,isDrop:!1,currentChoseImages:[],renderImageList:[],params:{zoomVal:1,left:0,top:0,currentX:0,currentY:0,flag:!1}}},props:{hosts:{type:String,required:!0},maxNumber:{type:Number,default:9},accept:{type:Array,default:function(){return["gjf","jpeg","jpe","jpg","png"]}},action:{type:String,required:!0},multiple:{type:Boolean,default:!0},defaultFileList:{type:Array,default:function(){return[]}},previewMode:{type:Boolean,default:!1},showTrigger:{type:Boolean,default:!0}},computed:{disabledStatus:function(){return this.renderImageList.length>=this.limitMaxNumber},acceptExtend:function(){return this.accept.map((function(t){return".".concat(t)})).join(",")},limitMaxNumber:function(){return this.maxNumber>=9?9:this.maxNumber},isZoomImage:function(){return 1===this.params.zoomVal}},watch:{defaultFileList:{handler:function(t,e){var r=JSON.parse(JSON.stringify(this.defaultFileList));!this.previewMode&&this.defaultFileList.length>this.limitMaxNumber&&r.splice(this.limitMaxNumber,r.length-1),this.renderImageList=r},deep:!0}},mounted:function(){var t=JSON.parse(JSON.stringify(this.defaultFileList));!this.previewMode&&this.defaultFileList.length>this.limitMaxNumber&&t.splice(this.limitMaxNumber,t.length-1),this.renderImageList=t},methods:{zoomImage:function(t){var e=this.$refs.scaleImage;if(this.params.zoomVal+=(t.wheelDelta||24*t.detail)/1200,!(this.params.zoomVal>=.2))return this.params.zoomVal=.2,e.style.transform="scale(".concat(this.params.zoomVal,")"),!1;e.style.transform="scale(".concat(this.params.zoomVal,")")},imageChosed:function(t){this.params.flag=!0,t||((t=window.event).target.onselectstart=function(){return!1}),"auto"!==t.target.style.left&&""!==t.target.style.left&&(this.params.left=t.target.style.left),"auto"!==t.target.style.top&&""!==t.target.style.top&&(this.params.top=t.target.style.top),this.params.currentX=t.clientX,this.params.currentY=t.clientY},imageLeave:function(t){this.params.flag=!1},defaultDrag:function(t){t.stopPropagation(),t.preventDefault()},imageUp:function(t){this.params.flag=!1},imageMove:function(t){if(t.preventDefault(),this.params.flag){var e=t.clientX,r=t.clientY,n=e-this.params.currentX,i=r-this.params.currentY;t.target.style.left="".concat(parseInt(this.params.left)+n,"px"),t.target.style.top="".concat(parseInt(this.params.top)+i,"px")}},showBigImage:function(t){var e=this.renderImageList.findIndex((function(e){return e.id===t.id}));1===this.renderImageList.length?this.changeLimit="all":0===e?this.changeLimit="first":e===this.renderImageList.length-1?this.changeLimit="last":this.changeLimit="",this.currentImageId=t.id,this.currentImageName=t.name,this.displayModal=!0,this.$refs.scaleImage.style.width="auto",this.adaptionScreen()},resetOriginSize:function(){var t=this.$refs.scaleImage;this.$refs.imageBox,t.style.width="auto",t.style.left="auto",t.style.top="0",t.style.transform="scale(1)",this.params.zoomVal=1},adaptionScreen:function(){var t=this;this.$nextTick((function(){var e=t.$refs.scaleImage,r=t.$refs.imageBox.clientHeight,n=new Image;n.src=e.src,n.onload=function(){var i=n.naturalHeight;e.style.width="auto",e.style.left="auto",e.style.top="auto";var a=Number((r/i).toFixed(3));a<1?(e.style.transform="scale(".concat(a,")"),t.params.zoomVal=a):(e.style.transform="scale(1)",t.params.zoomVal=1)}}))},closeImageModal:function(){this.params.zoomVal=1,this.displayModal=!1},changeCurrentImage:function(t){var e=this,r=this.renderImageList.findIndex((function(t){return t.id===e.currentImageId}));"prev"===t?(this.currentImageId=this.renderImageList[r-1].id,this.changeLimit=1===r?"first":""):(this.currentImageId=this.renderImageList[r+1].id,r===this.renderImageList.length-2?this.changeLimit="last":this.changeLimit=""),this.adaptionScreen()},inputDrag:function(t){return this.isDrop=!0,!1},checkFileType:function(t){for(var e=this,r=!0,n=function(n){var i=t[n].name.split(".").pop();if(-1===e.accept.findIndex((function(t){return t.toLocaleLowerCase()===i.toLocaleLowerCase()})))return f.default.error("含有非支持文件格式"),r=!1,{v:!1}},i=0;i<t.length;i++){var a=n(i);if("object"===g(a))return a.v}return r},changeFileChose:function(t){if(this.isDrop)return document.querySelector(".p-add-image-input").value=null,this.isDrop=!1,!1;var e=t.target.files;if(!this.checkFileType(e))return!1;if(this.renderImageList.length+e.length>=this.limitMaxNumber){for(var r=[],n=0;n<this.limitMaxNumber-this.renderImageList.length;n++)r.push(e[n]);e=r}e&&this.fileReader(e),document.querySelector(".p-add-image-input").value=null},fileReader:function(t){for(var e=0;e<t.length;e++){var r=t[e];this.featchUpload(r)}},featchUpload:function(t){var e=this.renderImageList.findIndex((function(e){return e.name===t.name}));-1!==e?this.renderImageList.splice(e,1,{status:"pending",name:t.name,progressRate:0}):this.renderImageList.push({status:"pending",name:t.name,progressRate:0});var r=this,n=new FormData;n.append("file",t),p({type:"POST",url:"".concat(this.hosts).concat(this.action),onprogress:function(e){r.setProgress(e,t)},dataType:"json",data:n,success:function(e){var n="string"==typeof e?JSON.parse(e):e;r.handleData(t,n,"done")},error:function(e){r.handleData(t,e,"fail")}})},setProgress:function(t,e){var r=this.renderImageList.findIndex((function(t){return t.name===e.name})),n=Math.round(t.loaded/t.total*100);this.renderImageList.splice(r,1,{status:"pending",name:e.name,progressRate:n})},handleData:function(t,e,r){var n=this,i=n.renderImageList.findIndex((function(e){return e.name===t.name}));if(-1!==i)if("done"===r){var a={id:e.url,name:t.name,status:r,url:e.url,suffix:e.suffix,progressRate:100,size:e.size};n.renderImageList.splice(i,1,a)}else{var s={id:"",name:t.name,status:r,url:"",suffix:"",progressRate:0,size:0};n.renderImageList.splice(i,1,s)}this.$emit("change",this.renderImageList)},deleteImage:function(t){var e=this.renderImageList.findIndex((function(e){return e.name===t.name}));this.renderImageList.splice(e,1),this.$emit("change",this.renderImageList)},downloadFile:function(){var t,e=this;return(t=h().mark((function t(){var r,n,i,a,s;return h().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return r="".concat(e.hosts).concat(e.currentImageId),t.next=3,fetch(r);case 3:return n=t.sent,t.next=6,n.blob();case 6:i=t.sent,a=window.URL.createObjectURL(i),(s=document.createElement("a")).href=a,s.download=e.currentImageName,s.click(),s.remove();case 13:case"end":return t.stop()}}),t)})),function(){var e=this,r=arguments;return new Promise((function(n,i){var a=t.apply(e,r);function s(t){d(a,n,i,s,o,"next",t)}function o(t){d(a,n,i,s,o,"throw",t)}s(void 0)}))})()}}},v=m,w=(0,t.Z)(v,(function(){var t=this,e=t._self._c;return e("div",{staticClass:"p-image-upload"},[t.previewMode||t.disabledStatus&&!t.showTrigger?t._e():e("div",{class:["p-image-upload-centent",t.disabledStatus?"p-image-upload-disabled":""]},[e("Add"),t._v(" "),e("input",{staticClass:"p-add-image-input",attrs:{type:"file",multiple:t.multiple,accept:t.acceptExtend,disabled:t.disabledStatus},on:{dragenter:t.inputDrag,change:t.changeFileChose}}),t._v(" "),e("span",{staticClass:"p-label"},[t._v("添加图片")]),t._v(" "),e("span",{staticClass:"p-number"},[t._v(t._s("".concat(t.renderImageList.length,"/").concat(t.limitMaxNumber)))])],1),t._v(" "),t._l(t.renderImageList,(function(r,n){return e("div",{key:n,class:["p-image-list","p-image-list-".concat(r.status)]},[t.previewMode?t._e():e("Delete",{staticClass:"p-delete-icon",nativeOn:{click:function(e){return t.deleteImage(r)}}}),t._v(" "),"pending"===r.status?[e("span",{staticClass:"p-list-label"},[t._v("上传中")]),t._v(" "),e("div",{staticClass:"p-progress-bar"},[e("div",{staticClass:"p-progress-rate",style:{width:r.progressRate+"%"}})])]:t._e(),t._v(" "),"done"===r.status?[e("div",{staticClass:"p-small-image-box"},[e("img",{staticClass:"p-list-image",attrs:{src:t.hosts+r.id,alt:"image"},on:{click:function(e){return t.showBigImage(r)}}})])]:t._e(),t._v(" "),"fail"===r.status?[e("FailImg",{staticClass:"p-fail-icon"}),t._v(" "),e("span",{staticClass:"p-fail-text"},[t._v("上传图片失败")])]:t._e()],2)})),t._v(" "),e("div",{directives:[{name:"show",rawName:"v-show",value:t.displayModal,expression:"displayModal"}],staticClass:"p-image-modal"},[e("div",{staticClass:"p-image-modal-back"}),t._v(" "),e("div",{staticClass:"p-image-header"},[e("div",{staticClass:"p-size-box"},[t.isZoomImage?e("SmallImage"):e("OriginalSize"),t._v(" "),t.isZoomImage?e("span",{staticClass:"p-size-label",on:{click:t.adaptionScreen}},[t._v("适应屏幕")]):e("span",{staticClass:"p-size-label",on:{click:t.resetOriginSize}},[t._v("原始尺寸")])],1),t._v(" "),e("div",{staticClass:"p-download-box",on:{click:t.downloadFile}},[e("Download"),t._v(" "),e("span",{staticClass:"p-size-label"},[t._v("下载原图")])],1),t._v(" "),e("div",{staticClass:"p-close-box"},[e("Close",{nativeOn:{click:function(e){return t.closeImageModal.apply(null,arguments)}}})],1)]),t._v(" "),e("div",{staticClass:"p-image-content"},["first"!==t.changeLimit&&"all"!==t.changeLimit?e("span",{staticClass:"p-control p-control-left",on:{click:function(e){return t.changeCurrentImage("prev")}}},[e("Left")],1):t._e(),t._v(" "),e("div",{ref:"imageBox",staticClass:"p-image-box",on:{mousewheel:t.zoomImage,DOMMouseScroll:t.zoomImage}},[e("img",{ref:"scaleImage",staticClass:"p-big-image",attrs:{src:t.hosts+t.currentImageId,alt:"图片名字"},on:{mousedown:t.imageChosed,mousemove:t.imageMove,mouseup:t.imageUp,mouseleave:t.imageLeave,drop:t.defaultDrag,dragstart:t.defaultDrag}})]),t._v(" "),"last"!==t.changeLimit&&"all"!==t.changeLimit?e("span",{staticClass:"p-control p-control-right",on:{click:function(e){return t.changeCurrentImage("next")}}},[e("Left")],1):t._e()])])],2)}),[],!1,null,null,null),y=w.exports;y.install=function(t){return t.component(y.name,y)};var C=y}(),i}()},"object"==typeof exports&&"object"==typeof module?module.exports=e(require("vue")):"function"==typeof define&&define.amd?define("ImageUpload",["vue"],e):"object"==typeof exports?exports.ImageUpload=e(require("vue")):t.ImageUpload=e(t.Vue);