UNPKG

h_ui

Version:

A Vue.js 2.0 UI Components Framework

1 lines 7.4 kB
!function(t,n){if("object"==typeof exports&&"object"==typeof module)module.exports=n(require("h_ui/dist/lib/util/tools.js"));else if("function"==typeof define&&define.amd)define(["h_ui/dist/lib/util/tools.js"],n);else{var e="object"==typeof exports?n(require("h_ui/dist/lib/util/tools.js")):n(t["h_ui/dist/lib/util/tools.js"]);for(var o in e)("object"==typeof exports?exports:t)[o]=e[o]}}(window,(function(t){return function(t){var n={};function e(o){if(n[o])return n[o].exports;var r=n[o]={i:o,l:!1,exports:{}};return t[o].call(r.exports,r,r.exports,e),r.l=!0,r.exports}return e.m=t,e.c=n,e.d=function(t,n,o){e.o(t,n)||Object.defineProperty(t,n,{enumerable:!0,get:o})},e.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},e.t=function(t,n){if(1&n&&(t=e(t)),8&n)return t;if(4&n&&"object"==typeof t&&t&&t.__esModule)return t;var o=Object.create(null);if(e.r(o),Object.defineProperty(o,"default",{enumerable:!0,value:t}),2&n&&"string"!=typeof t)for(var r in t)e.d(o,r,function(n){return t[n]}.bind(null,r));return o},e.n=function(t){var n=t&&t.__esModule?function(){return t.default}:function(){return t};return e.d(n,"a",n),n},e.o=function(t,n){return Object.prototype.hasOwnProperty.call(t,n)},e.p="",e(e.s=91)}({0:function(t,n){var e=t.exports="undefined"!=typeof window&&window.Math==Math?window:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")();"number"==typeof __g&&(__g=e)},1:function(t,n){var e=t.exports={version:"2.6.12"};"number"==typeof __e&&(__e=e)},10:function(t,n){t.exports=function(t,n){return{enumerable:!(1&t),configurable:!(2&t),writable:!(4&t),value:n}}},11:function(t,n,e){var o=e(0),r=e(1),u=e(34),i=e(9),c=e(4),f=function(t,n,e){var a,l,s,p=t&f.F,d=t&f.G,v=t&f.S,y=t&f.P,m=t&f.B,h=t&f.W,x=d?r:r[n]||(r[n]={}),b=x.prototype,w=d?o:v?o[n]:(o[n]||{}).prototype;for(a in d&&(e=n),e)(l=!p&&w&&void 0!==w[a])&&c(x,a)||(s=l?w[a]:e[a],x[a]=d&&"function"!=typeof w[a]?e[a]:m&&l?u(s,o):h&&w[a]==s?function(t){var n=function(n,e,o){if(this instanceof t){switch(arguments.length){case 0:return new t;case 1:return new t(n);case 2:return new t(n,e)}return new t(n,e,o)}return t.apply(this,arguments)};return n.prototype=t.prototype,n}(s):y&&"function"==typeof s?u(Function.call,s):s,y&&((x.virtual||(x.virtual={}))[a]=s,t&f.R&&b&&!b[a]&&i(b,a,s)))};f.F=1,f.G=2,f.S=4,f.P=8,f.B=16,f.W=32,f.U=64,f.R=128,t.exports=f},14:function(t,n,e){var o=e(6);t.exports=function(t,n){if(!o(t))return t;var e,r;if(n&&"function"==typeof(e=t.toString)&&!o(r=e.call(t)))return r;if("function"==typeof(e=t.valueOf)&&!o(r=e.call(t)))return r;if(!n&&"function"==typeof(e=t.toString)&&!o(r=e.call(t)))return r;throw TypeError("Can't convert object to primitive value")}},18:function(t,n){t.exports=function(t){if(null==t)throw TypeError("Can't call method on "+t);return t}},2:function(t,n,e){t.exports=!e(7)((function(){return 7!=Object.defineProperty({},"a",{get:function(){return 7}}).a}))},21:function(t,n,e){t.exports=!e(2)&&!e(7)((function(){return 7!=Object.defineProperty(e(22)("div"),"a",{get:function(){return 7}}).a}))},22:function(t,n,e){var o=e(6),r=e(0).document,u=o(r)&&o(r.createElement);t.exports=function(t){return u?r.createElement(t):{}}},25:function(t,n){t.exports=function(t){return t&&t.__esModule?t:{default:t}},t.exports.__esModule=!0,t.exports.default=t.exports},3:function(t,n,e){var o=e(8),r=e(21),u=e(14),i=Object.defineProperty;n.f=e(2)?Object.defineProperty:function(t,n,e){if(o(t),n=u(n,!0),o(e),r)try{return i(t,n,e)}catch(t){}if("get"in e||"set"in e)throw TypeError("Accessors not supported!");return"value"in e&&(t[n]=e.value),t}},33:function(n,e){n.exports=t},34:function(t,n,e){var o=e(35);t.exports=function(t,n,e){if(o(t),void 0===n)return t;switch(e){case 1:return function(e){return t.call(n,e)};case 2:return function(e,o){return t.call(n,e,o)};case 3:return function(e,o,r){return t.call(n,e,o,r)}}return function(){return t.apply(n,arguments)}}},35:function(t,n){t.exports=function(t){if("function"!=typeof t)throw TypeError(t+" is not a function!");return t}},4:function(t,n){var e={}.hasOwnProperty;t.exports=function(t,n){return e.call(t,n)}},6:function(t,n){t.exports=function(t){return"object"==typeof t?null!==t:"function"==typeof t}},7:function(t,n){t.exports=function(t){try{return!!t()}catch(t){return!0}}},72:function(t,n){t.exports="\t\n\v\f\r   ᠎              \u2028\u2029\ufeff"},8:function(t,n,e){var o=e(6);t.exports=function(t){if(!o(t))throw TypeError(t+" is not an object!");return t}},9:function(t,n,e){var o=e(3),r=e(10);t.exports=e(2)?function(t,n,e){return o.f(t,n,r(1,e))}:function(t,n,e){return t[n]=e,t}},91:function(t,n,e){"use strict";var o=e(25);Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0;var r=o(e(92)),u=e(33),i=[{name:"FormItem",control:"showModal"},{name:"Dropdown",control:"currentVisible"}];function c(t){var n=t.$options.name;if("Dropdown"!==n)return!0;if("Dropdown"===n){if("custom"!==t.trigger)return!0;if(void 0!==t.$listeners["update:visible"])return!0}return!1}function f(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"show",e=arguments.length>2?arguments[2]:void 0,o=arguments.length>3?arguments[3]:void 0,r=e.show,f=e.hide;if(!1!==f&&("hide"===n&&(o.target.click(),t.forEach((function(t){i.find((function(n){var e=n.name===t.$options.name;return e&&c(t)&&(t[n.control]=!1),e}))}))),"show"===n)){if(!0!==r)return;t.forEach((function(t){if(t.isShowError){t.showModal=!0;var n=(0,u.findComponentsUpward)(t,"CommonDropdown");n&&n.update()}}))}}var a={inserted:function(t,n,e){var o=n.value;if(o[0]){var c=[];t.onmousedown=function(a){o[2]&&a.target.click();var l=e.componentInstance||e.context;c=(0,u.findComponentsDownward)(l,i.map((function(t){return t.name})));var s=t.parentNode,p=(0,r.default)(s.clientWidth,10),d=(0,r.default)(s.clientHeight,10),v=document.body.clientWidth,y=window.innerHeight||document.body.clientHeight,m=a.clientX-s.offsetLeft,h=a.clientY-s.offsetTop;document.onmousemove=function(t){f(c,"hide",n.arg,t),s.parentNode.style.display="block",document.body.style.userSelect="none";var e=t.clientX-m,r=t.clientY-h;!o[1]&&e+p>v&&(e=v-p),!o[1]&&r+d>y&&(r=y-d),e<0&&(e=0),r<0&&(r=0),s.style.left=e+"px",s.style.top=r+"px"},document.onmouseup=function(){f(c,"show",n.arg),document.body.style.userSelect="text",document.onmousemove=null,document.onmouseup=null}},t.onmouseup=function(t){f(c,"show",n.arg),document.body.style.userSelect="text",document.onmousemove=null,document.onmouseup=null}}},bind:function(t,n,e){},update:function(){},unbind:function(t,n){}};n.default=a},92:function(t,n,e){t.exports=e(93)},93:function(t,n,e){e(94),t.exports=e(1).parseInt},94:function(t,n,e){var o=e(11),r=e(95);o(o.G+o.F*(parseInt!=r),{parseInt:r})},95:function(t,n,e){var o=e(0).parseInt,r=e(96).trim,u=e(72),i=/^[-+]?0[xX]/;t.exports=8!==o(u+"08")||22!==o(u+"0x16")?function(t,n){var e=r(String(t),3);return o(e,n>>>0||(i.test(e)?16:10))}:o},96:function(t,n,e){var o=e(11),r=e(18),u=e(7),i=e(72),c="["+i+"]",f=RegExp("^"+c+c+"*"),a=RegExp(c+c+"*$"),l=function(t,n,e){var r={},c=u((function(){return!!i[t]()||"​…"!="​…"[t]()})),f=r[t]=c?n(s):i[t];e&&(r[e]=f),o(o.P+o.F*c,"String",r)},s=l.trim=function(t,n){return t=String(r(t)),1&n&&(t=t.replace(f,"")),2&n&&(t=t.replace(a,"")),t};t.exports=l}})}));