h_ui
Version:
A Vue.js 2.0 UI Components Framework
1 lines • 10.6 kB
JavaScript
module.exports=function(t){var e={};function n(r){if(e[r])return e[r].exports;var o=e[r]={i:r,l:!1,exports:{}};return t[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}return n.m=t,n.c=e,n.d=function(t,e,r){n.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:r})},n.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},n.t=function(t,e){if(1&e&&(t=n(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var o in t)n.d(r,o,function(e){return t[e]}.bind(null,o));return r},n.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(e,"a",e),e},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.p="/dist/lib/cjs/",n(n.s=978)}({0:function(t,e){var n=t.exports={version:"2.6.12"};"number"==typeof __e&&(__e=n)},1:function(t,e){var n=t.exports="undefined"!=typeof window&&window.Math==Math?window:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")();"number"==typeof __g&&(__g=n)},10:function(t,e){var n={}.hasOwnProperty;t.exports=function(t,e){return n.call(t,e)}},11:function(t,e,n){var r=n(5),o=n(14);t.exports=n(2)?function(t,e,n){return r.f(t,e,o(1,n))}:function(t,e,n){return t[e]=n,t}},12:function(t,e,n){var r=n(6);t.exports=function(t){if(!r(t))throw TypeError(t+" is not an object!");return t}},14:function(t,e){t.exports=function(t,e){return{enumerable:!(1&t),configurable:!(2&t),writable:!(4&t),value:e}}},15:function(t,e,n){var r=n(38);t.exports=function(t,e,n){return e in t?r(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t},t.exports.__esModule=!0,t.exports.default=t.exports},16:function(t,e,n){var r=n(27);t.exports=function(t,e,n){if(r(t),void 0===e)return t;switch(n){case 1:return function(n){return t.call(e,n)};case 2:return function(n,r){return t.call(e,n,r)};case 3:return function(n,r,o){return t.call(e,n,r,o)}}return function(){return t.apply(e,arguments)}}},17:function(t,e,n){var r=n(6);t.exports=function(t,e){if(!r(t))return t;var n,o;if(e&&"function"==typeof(n=t.toString)&&!r(o=n.call(t)))return o;if("function"==typeof(n=t.valueOf)&&!r(o=n.call(t)))return o;if(!e&&"function"==typeof(n=t.toString)&&!r(o=n.call(t)))return o;throw TypeError("Can't convert object to primitive value")}},18:function(t,e){t.exports=function(t){if(null==t)throw TypeError("Can't call method on "+t);return t}},199:function(t,e){t.exports=require("h_ui/dist/lib/cjs/Message.js")},2:function(t,e,n){t.exports=!n(7)((function(){return 7!=Object.defineProperty({},"a",{get:function(){return 7}}).a}))},21:function(t,e){t.exports=require("h_ui/dist/lib/util/tools.js")},24:function(t,e,n){var r=n(6),o=n(1).document,u=r(o)&&r(o.createElement);t.exports=function(t){return u?o.createElement(t):{}}},25:function(t,e,n){t.exports=!n(2)&&!n(7)((function(){return 7!=Object.defineProperty(n(24)("div"),"a",{get:function(){return 7}}).a}))},27:function(t,e){t.exports=function(t){if("function"!=typeof t)throw TypeError(t+" is not a function!");return t}},3:function(t,e,n){var r=n(1),o=n(0),u=n(16),i=n(11),s=n(10),a=function(t,e,n){var c,f,l,p=t&a.F,d=t&a.G,h=t&a.S,v=t&a.P,y=t&a.B,x=t&a.W,g=d?o:o[e]||(o[e]={}),_=g.prototype,b=d?r:h?r[e]:(r[e]||{}).prototype;for(c in d&&(n=e),n)(f=!p&&b&&void 0!==b[c])&&s(g,c)||(l=f?b[c]:n[c],g[c]=d&&"function"!=typeof b[c]?n[c]:y&&f?u(l,r):x&&b[c]==l?function(t){var e=function(e,n,r){if(this instanceof t){switch(arguments.length){case 0:return new t;case 1:return new t(e);case 2:return new t(e,n)}return new t(e,n,r)}return t.apply(this,arguments)};return e.prototype=t.prototype,e}(l):v&&"function"==typeof l?u(Function.call,l):l,v&&((g.virtual||(g.virtual={}))[c]=l,t&a.R&&_&&!_[c]&&i(_,c,l)))};a.F=1,a.G=2,a.S=4,a.P=8,a.B=16,a.W=32,a.U=64,a.R=128,t.exports=a},32:function(t,e){t.exports=require("h_ui/dist/lib/util/global.js")},35:function(t,e){t.exports="\t\n\v\f\r \u2028\u2029\ufeff"},38:function(t,e,n){t.exports=n(39)},39:function(t,e,n){n(40);var r=n(0).Object;t.exports=function(t,e,n){return r.defineProperty(t,e,n)}},4:function(t,e,n){"use strict";function r(t,e,n,r,o,u,i,s){var a,c="function"==typeof t?t.options:t;if(e&&(c.render=e,c.staticRenderFns=n,c._compiled=!0),r&&(c.functional=!0),u&&(c._scopeId="data-v-"+u),i?(a=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(i)},c._ssrRegister=a):o&&(a=s?function(){o.call(this,(c.functional?this.parent:this).$root.$options.shadowRoot)}:o),a)if(c.functional){c._injectStyles=a;var f=c.render;c.render=function(t,e){return a.call(e),f(t,e)}}else{var l=c.beforeCreate;c.beforeCreate=l?[].concat(l,a):[a]}return{exports:t,options:c}}n.d(e,"a",(function(){return r}))},40:function(t,e,n){var r=n(3);r(r.S+r.F*!n(2),"Object",{defineProperty:n(5).f})},47:function(t,e){t.exports=require("h_ui/dist/lib/cjs/Icon.js")},5:function(t,e,n){var r=n(12),o=n(25),u=n(17),i=Object.defineProperty;e.f=n(2)?Object.defineProperty:function(t,e,n){if(r(t),e=u(e,!0),r(n),o)try{return i(t,e,n)}catch(t){}if("get"in n||"set"in n)throw TypeError("Accessors not supported!");return"value"in n&&(t[e]=n.value),t}},51:function(t,e,n){var r=n(3),o=n(18),u=n(7),i=n(35),s="["+i+"]",a=RegExp("^"+s+s+"*"),c=RegExp(s+s+"*$"),f=function(t,e,n){var o={},s=u((function(){return!!i[t]()||"
"!="
"[t]()})),a=o[t]=s?e(l):i[t];n&&(o[n]=a),r(r.P+r.F*s,"String",o)},l=f.trim=function(t,e){return t=String(o(t)),1&e&&(t=t.replace(a,"")),2&e&&(t=t.replace(c,"")),t};t.exports=f},521:function(t,e,n){"use strict";n.r(e);var r=n(522),o=n.n(r);for(var u in r)["default"].indexOf(u)<0&&function(t){n.d(e,t,(function(){return r[t]}))}(u);e.default=o.a},522:function(t,e,n){"use strict";var r=n(8);Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var o=r(n(53)),u=r(n(15)),i=r(n(47)),s=n(21),a=r(n(199)),c="h-progress",f={name:"Progress",components:{Icon:i.default},props:{percent:{type:Number,default:0},status:{validator:function(t){return(0,s.oneOf)(t,["normal","active","wrong","success"])},default:"normal"},hideInfo:{type:Boolean,default:!1},strokeWidth:{type:Number,default:10},vertical:{type:Boolean,default:!1},showType:{type:String,validator:function(t){return(0,s.oneOf)(t,["percent","fraction"])},default:"percent"},numerator:{type:[Number,String],default:0},denominator:{type:[Number,String],default:1},hideIcon:{type:Boolean,default:!1}},data:function(){return{currentStatus:this.status,progressValue:0,progressShowValue:""}},computed:{isStatus:function(){return!this.hideIcon&&("wrong"==this.currentStatus||"success"==this.currentStatus)},statusIcon:function(){var t="";switch(this.currentStatus){case"wrong":t="delete_fill";break;case"success":t="success_fill"}return t},bgStyle:function(){return this.vertical?{height:"".concat(this.progressValue,"%"),width:"".concat(this.strokeWidth,"px")}:{width:"".concat(this.progressValue,"%"),height:"".concat(this.strokeWidth,"px")}},wrapClasses:function(){var t;return["".concat(c),"".concat(c,"-").concat(this.currentStatus),(t={},(0,u.default)(t,"".concat(c,"-show-info"),!this.hideInfo),(0,u.default)(t,"".concat(c,"-vertical"),this.vertical),t)]},textClasses:function(){return"".concat(c,"-text")},textInnerClasses:function(){return"".concat(c,"-text-inner")},outerClasses:function(){return"".concat(c,"-outer")},innerClasses:function(){return"".concat(c,"-inner")},bgClasses:function(){return"".concat(c,"-bg")}},created:function(){this.handleValue(),this.handleStatus()},methods:{handleValue:function(){"percent"==this.showType&&this.percent>=0?(this.progressValue=this.percent,this.progressShowValue="".concat(this.percent,"%")):"fraction"==this.showType&&(0,o.default)(this.denominator,10)>0&&(0,o.default)(this.numerator,10)<=(0,o.default)(this.denominator,10)?(this.progressValue=Number(100*(0,o.default)(this.numerator,10)/(0,o.default)(this.denominator,10)).toFixed(0),this.progressShowValue="".concat(this.numerator,"/").concat(this.denominator)):a.default.info("当前进度值输入不合法")},handleStatus:function(t){t?(this.currentStatus="normal",this.$emit("on-status-change","normal")):100==(0,o.default)(this.progressValue,10)&&(this.currentStatus="success",this.$emit("on-status-change","success"))}},watch:{percent:function(){this.handleValue()},numerator:function(){this.handleValue()},denominator:function(){this.handleValue()},progressValue:function(t,e){t<e?this.handleStatus(!0):this.handleStatus()},status:function(t){this.currentStatus=t}}};e.default=f},53:function(t,e,n){t.exports=n(69)},6:function(t,e){t.exports=function(t){return"object"==typeof t?null!==t:"function"==typeof t}},69:function(t,e,n){n(70),t.exports=n(0).parseInt},7:function(t,e){t.exports=function(t){try{return!!t()}catch(t){return!0}}},70:function(t,e,n){var r=n(3),o=n(71);r(r.G+r.F*(parseInt!=o),{parseInt:o})},71:function(t,e,n){var r=n(1).parseInt,o=n(51).trim,u=n(35),i=/^[-+]?0[xX]/;t.exports=8!==r(u+"08")||22!==r(u+"0x16")?function(t,e){var n=o(String(t),3);return r(n,e>>>0||(i.test(n)?16:10))}:r},747:function(t,e,n){"use strict";n.d(e,"a",(function(){return r})),n.d(e,"b",(function(){return o}));var r=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{class:t.wrapClasses},[n("div",{class:t.outerClasses},[n("div",{class:t.innerClasses},[n("div",{class:t.bgClasses,style:t.bgStyle})])]),t._v(" "),t.hideInfo?t._e():n("span",{class:t.textClasses},[t._t("default",[t.isStatus?n("span",{class:t.textInnerClasses},[n("Icon",{attrs:{name:t.statusIcon}})],1):n("span",{class:t.textInnerClasses},[t._v("\n "+t._s(t.progressShowValue)+"\n ")])])],2)])},o=[];r._withStripped=!0},8:function(t,e){t.exports=function(t){return t&&t.__esModule?t:{default:t}},t.exports.__esModule=!0,t.exports.default=t.exports},978:function(t,e,n){"use strict";var r=n(8);Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var o=r(n(979)),u=n(32);o.default.install=function(t,e){(0,u.setGlobal)(t,e),t.component("HProgress",o.default),t.component("Progress",o.default)};var i=o.default;e.default=i},979:function(t,e,n){"use strict";n.r(e);var r=n(747),o=n(521);for(var u in o)["default"].indexOf(u)<0&&function(t){n.d(e,t,(function(){return o[t]}))}(u);var i=n(4),s=Object(i.a)(o.default,r.a,r.b,!1,null,null,null);e.default=s.exports}});