v-area-picker
Version:
1 lines • 17.3 kB
JavaScript
!function(t,e){if("object"==typeof exports&&"object"==typeof module)module.exports=e();else if("function"==typeof define&&define.amd)define([],e);else{var n,r=e();for(n in r)("object"==typeof exports?exports:t)[n]=r[n]}}(window,function(){return r={},o.m=n=[function(t,e,n){t.exports=n(12)},function(t,e,n){"use strict";function r(t,e,n,r,o,i,a,c){var u,s,f="function"==typeof t?t.options:t;return e&&(f.render=e,f.staticRenderFns=n,f._compiled=!0),r&&(f.functional=!0),i&&(f._scopeId="data-v-"+i),a?f._ssrRegister=u=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__),o&&o.call(this,t),t&&t._registeredComponents&&t._registeredComponents.add(a)}:o&&(u=c?function(){o.call(this,(f.functional?this.parent:this).$root.$options.shadowRoot)}:o),u&&(f.functional?(f._injectStyles=u,s=f.render,f.render=function(t,e){return u.call(e),s(t,e)}):(c=f.beforeCreate,f.beforeCreate=c?[].concat(c,u):[u])),{exports:t,options:f}}n.d(e,"a",function(){return r})},function(t,e){function u(t,e,n,r,o,i,a){try{var c=t[i](a),u=c.value}catch(t){return void n(t)}c.done?e(u):Promise.resolve(u).then(r,o)}t.exports=function(c){return function(){var t=this,a=arguments;return new Promise(function(e,n){var r=c.apply(t,a);function o(t){u(r,e,n,o,i,"next",t)}function i(t){u(r,e,n,o,i,"throw",t)}o(void 0)})}},t.exports.default=t.exports,t.exports.__esModule=!0},function(t,e,o){"use strict";var n,r,c=function(){return n=void 0===n?Boolean(window&&document&&document.all&&!window.atob):n},i=(r={},function(t){if(void 0===r[t]){var e=document.querySelector(t);if(window.HTMLIFrameElement&&e instanceof window.HTMLIFrameElement)try{e=e.contentDocument.head}catch(t){e=null}r[t]=e}return r[t]}),s=[];function f(t){for(var e=-1,n=0;n<s.length;n++)if(s[n].identifier===t){e=n;break}return e}function u(t,e){for(var n={},r=[],o=0;o<t.length;o++){var i=t[o],a=e.base?i[0]+e.base:i[0],c=n[a]||0,u="".concat(a," ").concat(c);n[a]=c+1;c=f(u),i={css:i[1],media:i[2],sourceMap:i[3]};-1!==c?(s[c].references++,s[c].updater(i)):s.push({identifier:u,updater:function(e,t){var n,r,o;{var i;o=t.singleton?(i=v++,n=h=h||l(t),r=d.bind(null,n,i,!1),d.bind(null,n,i,!0)):(n=l(t),r=function(t,e,n){var r=n.css,o=n.media,n=n.sourceMap;o?t.setAttribute("media",o):t.removeAttribute("media");n&&"undefined"!=typeof btoa&&(r+="\n/*# sourceMappingURL=data:application/json;base64,".concat(btoa(unescape(encodeURIComponent(JSON.stringify(n))))," */"));if(t.styleSheet)t.styleSheet.cssText=r;else{for(;t.firstChild;)t.removeChild(t.firstChild);t.appendChild(document.createTextNode(r))}}.bind(null,n,t),function(){!function(t){if(null===t.parentNode)return;t.parentNode.removeChild(t)}(n)})}return r(e),function(t){t?t.css===e.css&&t.media===e.media&&t.sourceMap===e.sourceMap||r(e=t):o()}}(i,e),references:1}),r.push(u)}return r}function l(t){var e,n=document.createElement("style"),r=t.attributes||{};if(void 0!==r.nonce||(e=o.nc)&&(r.nonce=e),Object.keys(r).forEach(function(t){n.setAttribute(t,r[t])}),"function"==typeof t.insert)t.insert(n);else{t=i(t.insert||"head");if(!t)throw new Error("Couldn't find a style target. This probably means that the value for the 'insert' parameter is invalid.");t.appendChild(n)}return n}var a,p=(a=[],function(t,e){return a[t]=e,a.filter(Boolean).join("\n")});function d(t,e,n,r){n=n?"":r.media?"@media ".concat(r.media," {").concat(r.css,"}"):r.css;t.styleSheet?t.styleSheet.cssText=p(e,n):(r=document.createTextNode(n),(n=t.childNodes)[e]&&t.removeChild(n[e]),n.length?t.insertBefore(r,n[e]):t.appendChild(r))}var h=null,v=0;t.exports=function(t,i){(i=i||{}).singleton||"boolean"==typeof i.singleton||(i.singleton=c());var a=u(t=t||[],i);return function(t){if(t=t||[],"[object Array]"===Object.prototype.toString.call(t)){for(var e=0;e<a.length;e++){var n=f(a[e]);s[n].references--}for(var t=u(t,i),r=0;r<a.length;r++){var o=f(a[r]);0===s[o].references&&(s[o].updater(),s.splice(o,1))}a=t}}}},,,function(t,e,n){"use strict";var r=function(){var n=this,t=n.$createElement,r=n._self._c||t;return r("div",{staticClass:"tabs-wrapper"},[r("div",{staticClass:"tabs flex"},[n._l(n.currOptions,function(e,t){return r("div",{key:t,ref:"tabItem"+t,refInFor:!0,staticClass:"item",class:n.tabItemClass(e),on:{click:function(t){return n.onTabSelect(e)}}},[r("div",[n._v(n._s(e.label))])])}),n._v(" "),r("div",{ref:"tabLine",staticClass:"tab-line",class:{animated:n.animated},style:n.tabLineStyle})],2),n._v(" "),r("keep-alive",[r("transition",{attrs:{name:n.transitionName}},n._l(n.activeTabs,function(t,e){t=t.slot;return r("div",{key:e,staticClass:"tabs-content"},[n._t(t)],2)}),0)],1)],1)};r._withStripped=!0;var o=n(7),i=n.n(o),a=n(2),c=n.n(a),u=n(0),s=n.n(u);function f(e,t){var n,r=Object.keys(e);return Object.getOwnPropertySymbols&&(n=Object.getOwnPropertySymbols(e),t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)),r}function l(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?f(Object(n),!0).forEach(function(t){i()(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):f(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}var p={name:"VTabs",props:{value:{type:[Number,String]},options:{type:Array,default:function(){return[]}},lineColor:{type:String,default:"#2B6BFF"},lineHeight:{type:Number,default:2},lineWidth:Number,animated:{type:Boolean,default:!0}},data:function(){return{currValue:this.value,currOptions:[],transitionName:"",tabLineStyle:{}}},computed:{tabItemClass:function(){return function(t){var e=[];return t.active?e.push("active c-3"):e.push("c-9"),t.disabled&&e.push("disabled"),e.join(" ")}},activeTabs:function(){var e=this;return this.currOptions.filter(function(t){return t.value===e.currValue})},curIndex:function(){var e=this;return this.currOptions.findIndex(function(t){return t.value===e.value})}},watch:{options:{handler:function(){this.initOptions()},deep:!0},value:{handler:function(e){var n=this;return c()(s.a.mark(function t(){return s.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return n.currValue=e,n.initOptions(),t.next=4,n.$nextTick();case 4:return t.next=6,n.setTabItemLine();case 6:case"end":return t.stop()}},t)}))()},immediate:!0},curIndex:function(t,e){this.transitionName=e<t?"slide-left":"slide-right"}},mounted:function(){this.initOptions()},methods:{initOptions:function(){var e=this,t=this.currOptions.map(function(t){return t.value});if(t.length!==new Set(t).size)throw new Error("tab的value值必须唯一");this.currOptions=this.options.map(function(t){return l(l({},t),{},{active:t.value===e.currValue,disabled:!!t.disabled})})},onTabSelect:function(t){t.disabled||(this.currOptions.forEach(function(t){t.active=!1}),t.active=!0,this.currValue=t.value,this.$emit("input",this.currValue),t.value!==this.value&&this.$emit("change",this.currValue))},setTabItemLine:function(){var n=this;return c()(s.a.mark(function t(){var e;return s.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:e=n.currOptions.findIndex(function(t){return t.value===n.value}),e=n.$refs["tabItem".concat(e)],e=e&&e[0],n.tabLineStyle=n.getDomPosition(e);case 4:case"end":return t.stop()}},t)}))()},getDomPosition:function(t){if(!t)return{};var e=t.offsetLeft+t.offsetWidth/2,n=this.lineColor,r=this.lineHeight,o=this.lineWidth;return{height:"".concat(r,"px"),width:"".concat(o||t.getBoundingClientRect().width,"px"),transform:"translateX(".concat(e,"px) translateX(-50%)"),background:n}}}},o=n(3),a=n.n(o),u=n(8),o=n.n(u),u={insert:"head",singleton:!1},n=(a()(o.a,u),o.a.locals,n(1)),r=Object(n.a)(p,r,[],!1,null,"bfebb14c",null);r.options.__file="src/components/tabs/src/tabs.vue";e.a=r.exports},function(t,e){t.exports=function(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t},t.exports.default=t.exports,t.exports.__esModule=!0},function(t,e,n){(e=n(9)(!1)).push([t.i,"@media (-webkit-min-device-pixel-ratio:2),(min-device-pixel-ratio:2){}@media (-webkit-min-device-pixel-ratio:3),(min-device-pixel-ratio:3){}*[data-v-bfebb14c],*[data-v-bfebb14c]::after,*[data-v-bfebb14c]::before{box-sizing:border-box}[data-v-bfebb14c]::-webkit-scrollbar{display:none}.tabs-wrapper[data-v-bfebb14c]{height:100%;overflow:hidden}.tabs[data-v-bfebb14c]{position:relative;display:flex;background-color:#fff}.tabs .item[data-v-bfebb14c]{position:relative;display:flex;flex-direction:column;align-items:center;font-size:14px}.tabs .item + .item[data-v-bfebb14c]{margin-left:10px}.tabs .tab-line[data-v-bfebb14c]{position:absolute;height:2px;left:0;bottom:-5px}.tabs .tab-line.animated[data-v-bfebb14c]{transition:all .3s}.tabs-content[data-v-bfebb14c]{margin-top:10px;height:100%;overflow:scroll}.active[data-v-bfebb14c]{color:#2b6bff}.disabled[data-v-bfebb14c]{cursor:not-allowed}.c-9[data-v-bfebb14c]{color:#999}",""]),t.exports=e},function(t,e,n){"use strict";t.exports=function(n){var u=[];return u.toString=function(){return this.map(function(t){var e=function(t,e){var n=t[1]||"",r=t[3];if(!r)return n;if(e&&"function"==typeof btoa){t=function(t){t=btoa(unescape(encodeURIComponent(JSON.stringify(t)))),t="sourceMappingURL=data:application/json;charset=utf-8;base64,".concat(t);return"/*# ".concat(t," */")}(r),e=r.sources.map(function(t){return"/*# sourceURL=".concat(r.sourceRoot||"").concat(t," */")});return[n].concat(e).concat([t]).join("\n")}return[n].join("\n")}(t,n);return t[2]?"@media ".concat(t[2]," {").concat(e,"}"):e}).join("")},u.i=function(t,e,n){"string"==typeof t&&(t=[[null,t,""]]);var r={};if(n)for(var o=0;o<this.length;o++){var i=this[o][0];null!=i&&(r[i]=!0)}for(var a=0;a<t.length;a++){var c=[].concat(t[a]);n&&r[c[0]]||(e&&(c[2]?c[2]="".concat(e," and ").concat(c[2]):c[2]=e),u.push(c))}},u}},,,function(e,t,n){e=function(a){"use strict";var u,t=Object.prototype,s=t.hasOwnProperty,e="function"==typeof Symbol?Symbol:{},r=e.iterator||"@@iterator",n=e.asyncIterator||"@@asyncIterator",o=e.toStringTag||"@@toStringTag";function i(t,e,n){return Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{i({},"")}catch(t){i=function(t,e,n){return t[e]=n}}function c(t,e,n,r){var o,i,a,c,e=e&&e.prototype instanceof b?e:b,e=Object.create(e.prototype),r=new L(r||[]);return e._invoke=(o=t,i=n,a=r,c=l,function(t,e){if(c===d)throw new Error("Generator is already running");if(c===h){if("throw"===t)throw e;return S()}for(a.method=t,a.arg=e;;){var n=a.delegate;if(n){var r=function t(e,n){var r=e.iterator[n.method];if(r===u){if(n.delegate=null,"throw"===n.method){if(e.iterator.return&&(n.method="return",n.arg=u,t(e,n),"throw"===n.method))return v;n.method="throw",n.arg=new TypeError("The iterator does not provide a 'throw' method")}return v}r=f(r,e.iterator,n.arg);if("throw"===r.type)return n.method="throw",n.arg=r.arg,n.delegate=null,v;var r=r.arg;if(!r)return n.method="throw",n.arg=new TypeError("iterator result is not an object"),n.delegate=null,v;{if(!r.done)return r;n[e.resultName]=r.value,n.next=e.nextLoc,"return"!==n.method&&(n.method="next",n.arg=u)}n.delegate=null;return v}(n,a);if(r){if(r===v)continue;return r}}if("next"===a.method)a.sent=a._sent=a.arg;else if("throw"===a.method){if(c===l)throw c=h,a.arg;a.dispatchException(a.arg)}else"return"===a.method&&a.abrupt("return",a.arg);c=d;r=f(o,i,a);if("normal"===r.type){if(c=a.done?h:p,r.arg!==v)return{value:r.arg,done:a.done}}else"throw"===r.type&&(c=h,a.method="throw",a.arg=r.arg)}}),e}function f(t,e,n){try{return{type:"normal",arg:t.call(e,n)}}catch(t){return{type:"throw",arg:t}}}a.wrap=c;var l="suspendedStart",p="suspendedYield",d="executing",h="completed",v={};function b(){}function m(){}function y(){}var g={};g[r]=function(){return this};e=Object.getPrototypeOf,e=e&&e(e(E([])));e&&e!==t&&s.call(e,r)&&(g=e);var w=y.prototype=b.prototype=Object.create(g);function x(t){["next","throw","return"].forEach(function(e){i(t,e,function(t){return this._invoke(e,t)})})}function O(a,c){var e;this._invoke=function(n,r){function t(){return new c(function(t,e){!function e(t,n,r,o){t=f(a[t],a,n);if("throw"!==t.type){var i=t.arg,n=i.value;return n&&"object"==typeof n&&s.call(n,"__await")?c.resolve(n.__await).then(function(t){e("next",t,r,o)},function(t){e("throw",t,r,o)}):c.resolve(n).then(function(t){i.value=t,r(i)},function(t){return e("throw",t,r,o)})}o(t.arg)}(n,r,t,e)})}return e=e?e.then(t,t):t()}}function _(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 j(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function L(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(_,this),this.reset(!0)}function E(e){if(e){var t=e[r];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var n=-1,t=function t(){for(;++n<e.length;)if(s.call(e,n))return t.value=e[n],t.done=!1,t;return t.value=u,t.done=!0,t};return t.next=t}}return{next:S}}function S(){return{value:u,done:!0}}return((m.prototype=w.constructor=y).constructor=m).displayName=i(y,o,"GeneratorFunction"),a.isGeneratorFunction=function(t){t="function"==typeof t&&t.constructor;return!!t&&(t===m||"GeneratorFunction"===(t.displayName||t.name))},a.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,y):(t.__proto__=y,i(t,o,"GeneratorFunction")),t.prototype=Object.create(w),t},a.awrap=function(t){return{__await:t}},x(O.prototype),O.prototype[n]=function(){return this},a.AsyncIterator=O,a.async=function(t,e,n,r,o){void 0===o&&(o=Promise);var i=new O(c(t,e,n,r),o);return a.isGeneratorFunction(e)?i:i.next().then(function(t){return t.done?t.value:i.next()})},x(w),i(w,o,"Generator"),w[r]=function(){return this},w.toString=function(){return"[object Generator]"},a.keys=function(n){var t,r=[];for(t in n)r.push(t);return r.reverse(),function t(){for(;r.length;){var e=r.pop();if(e in n)return t.value=e,t.done=!1,t}return t.done=!0,t}},a.values=E,L.prototype={constructor:L,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=u,this.done=!1,this.delegate=null,this.method="next",this.arg=u,this.tryEntries.forEach(j),!t)for(var e in this)"t"===e.charAt(0)&&s.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=u)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(n){if(this.done)throw n;var r=this;function t(t,e){return i.type="throw",i.arg=n,r.next=t,e&&(r.method="next",r.arg=u),!!e}for(var e=this.tryEntries.length-1;0<=e;--e){var o=this.tryEntries[e],i=o.completion;if("root"===o.tryLoc)return t("end");if(o.tryLoc<=this.prev){var a=s.call(o,"catchLoc"),c=s.call(o,"finallyLoc");if(a&&c){if(this.prev<o.catchLoc)return t(o.catchLoc,!0);if(this.prev<o.finallyLoc)return t(o.finallyLoc)}else if(a){if(this.prev<o.catchLoc)return t(o.catchLoc,!0)}else{if(!c)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return t(o.finallyLoc)}}}},abrupt:function(t,e){for(var n=this.tryEntries.length-1;0<=n;--n){var r=this.tryEntries[n];if(r.tryLoc<=this.prev&&s.call(r,"finallyLoc")&&this.prev<r.finallyLoc){var o=r;break}}var i=(o=o&&("break"===t||"continue"===t)&&o.tryLoc<=e&&e<=o.finallyLoc?null:o)?o.completion:{};return i.type=t,i.arg=e,o?(this.method="next",this.next=o.finallyLoc,v):this.complete(i)},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),v},finish:function(t){for(var e=this.tryEntries.length-1;0<=e;--e){var n=this.tryEntries[e];if(n.finallyLoc===t)return this.complete(n.completion,n.afterLoc),j(n),v}},catch:function(t){for(var e=this.tryEntries.length-1;0<=e;--e){var n=this.tryEntries[e];if(n.tryLoc===t){var r,o=n.completion;return"throw"===o.type&&(r=o.arg,j(n)),r}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,n){return this.delegate={iterator:E(t),resultName:e,nextLoc:n},"next"===this.method&&(this.arg=u),v}},a}(e.exports);try{regeneratorRuntime=e}catch(t){Function("r","regeneratorRuntime = r")(e)}},,,,,,,,,,,,function(t,e,n){"use strict";n.r(e);var r=n(6);r.a.install=function(t){t.component(r.a.name,r.a)},e.default=r.a}],o.c=r,o.d=function(t,e,n){o.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:n})},o.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},o.t=function(e,t){if(1&t&&(e=o(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(o.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var r in e)o.d(n,r,function(t){return e[t]}.bind(null,r));return n},o.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return o.d(e,"a",e),e},o.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},o.p="../dist/",o(o.s=24);function o(t){if(r[t])return r[t].exports;var e=r[t]={i:t,l:!1,exports:{}};return n[t].call(e.exports,e,e.exports,o),e.l=!0,e.exports}var n,r});