UNPKG

h_ui

Version:

A Vue.js 2.0 UI Components Framework

1 lines 10.4 kB
module.exports=function(t){var e={};function o(n){if(e[n])return e[n].exports;var r=e[n]={i:n,l:!1,exports:{}};return t[n].call(r.exports,r,r.exports,o),r.l=!0,r.exports}return o.m=t,o.c=e,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(t,e){if(1&e&&(t=o(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var n=Object.create(null);if(o.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var r in t)o.d(n,r,function(e){return t[e]}.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/lib/cjs/",o(o.s=1120)}({0:function(t,e){var o=t.exports={version:"2.6.12"};"number"==typeof __e&&(__e=o)},1:function(t,e){var o=t.exports="undefined"!=typeof window&&window.Math==Math?window:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")();"number"==typeof __g&&(__g=o)},10:function(t,e){var o={}.hasOwnProperty;t.exports=function(t,e){return o.call(t,e)}},11:function(t,e,o){var n=o(5),r=o(14);t.exports=o(2)?function(t,e,o){return n.f(t,e,r(1,o))}:function(t,e,o){return t[e]=o,t}},1120:function(t,e,o){"use strict";var n=o(8);Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var r=n(o(1121)),i=o(32);r.default.install=function(t,e){(0,i.setGlobal)(t,e),t.component("HTag",r.default),t.component("Tag",r.default)};var c=r.default;e.default=c},1121:function(t,e,o){"use strict";o.r(e);var n=o(775),r=o(625);for(var i in r)["default"].indexOf(i)<0&&function(t){o.d(e,t,(function(){return r[t]}))}(i);var c=o(4),u=Object(c.a)(r.default,n.a,n.b,!1,null,null,null);e.default=u.exports},12:function(t,e,o){var n=o(6);t.exports=function(t){if(!n(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,o){var n=o(38);t.exports=function(t,e,o){return e in t?n(t,e,{value:o,enumerable:!0,configurable:!0,writable:!0}):t[e]=o,t},t.exports.__esModule=!0,t.exports.default=t.exports},16:function(t,e,o){var n=o(27);t.exports=function(t,e,o){if(n(t),void 0===e)return t;switch(o){case 1:return function(o){return t.call(e,o)};case 2:return function(o,n){return t.call(e,o,n)};case 3:return function(o,n,r){return t.call(e,o,n,r)}}return function(){return t.apply(e,arguments)}}},17:function(t,e,o){var n=o(6);t.exports=function(t,e){if(!n(t))return t;var o,r;if(e&&"function"==typeof(o=t.toString)&&!n(r=o.call(t)))return r;if("function"==typeof(o=t.valueOf)&&!n(r=o.call(t)))return r;if(!e&&"function"==typeof(o=t.toString)&&!n(r=o.call(t)))return r;throw TypeError("Can't convert object to primitive value")}},2:function(t,e,o){t.exports=!o(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,o){var n=o(6),r=o(1).document,i=n(r)&&n(r.createElement);t.exports=function(t){return i?r.createElement(t):{}}},25:function(t,e,o){t.exports=!o(2)&&!o(7)((function(){return 7!=Object.defineProperty(o(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,o){var n=o(1),r=o(0),i=o(16),c=o(11),u=o(10),s=function(t,e,o){var l,a,f,d=t&s.F,p=t&s.G,h=t&s.S,y=t&s.P,v=t&s.B,b=t&s.W,_=p?r:r[e]||(r[e]={}),x=_.prototype,g=p?n:h?n[e]:(n[e]||{}).prototype;for(l in p&&(o=e),o)(a=!d&&g&&void 0!==g[l])&&u(_,l)||(f=a?g[l]:o[l],_[l]=p&&"function"!=typeof g[l]?o[l]:v&&a?i(f,n):b&&g[l]==f?function(t){var e=function(e,o,n){if(this instanceof t){switch(arguments.length){case 0:return new t;case 1:return new t(e);case 2:return new t(e,o)}return new t(e,o,n)}return t.apply(this,arguments)};return e.prototype=t.prototype,e}(f):y&&"function"==typeof f?i(Function.call,f):f,y&&((_.virtual||(_.virtual={}))[l]=f,t&s.R&&x&&!x[l]&&c(x,l,f)))};s.F=1,s.G=2,s.S=4,s.P=8,s.B=16,s.W=32,s.U=64,s.R=128,t.exports=s},32:function(t,e){t.exports=require("h_ui/dist/lib/util/global.js")},335:function(t,e){t.exports=require("h_ui/dist/lib/cjs/Tooltip.js")},38:function(t,e,o){t.exports=o(39)},39:function(t,e,o){o(40);var n=o(0).Object;t.exports=function(t,e,o){return n.defineProperty(t,e,o)}},4:function(t,e,o){"use strict";function n(t,e,o,n,r,i,c,u){var s,l="function"==typeof t?t.options:t;if(e&&(l.render=e,l.staticRenderFns=o,l._compiled=!0),n&&(l.functional=!0),i&&(l._scopeId="data-v-"+i),c?(s=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__),r&&r.call(this,t),t&&t._registeredComponents&&t._registeredComponents.add(c)},l._ssrRegister=s):r&&(s=u?function(){r.call(this,(l.functional?this.parent:this).$root.$options.shadowRoot)}:r),s)if(l.functional){l._injectStyles=s;var a=l.render;l.render=function(t,e){return s.call(e),a(t,e)}}else{var f=l.beforeCreate;l.beforeCreate=f?[].concat(f,s):[s]}return{exports:t,options:l}}o.d(e,"a",(function(){return n}))},40:function(t,e,o){var n=o(3);n(n.S+n.F*!o(2),"Object",{defineProperty:o(5).f})},47:function(t,e){t.exports=require("h_ui/dist/lib/cjs/Icon.js")},5:function(t,e,o){var n=o(12),r=o(25),i=o(17),c=Object.defineProperty;e.f=o(2)?Object.defineProperty:function(t,e,o){if(n(t),e=i(e,!0),n(o),r)try{return c(t,e,o)}catch(t){}if("get"in o||"set"in o)throw TypeError("Accessors not supported!");return"value"in o&&(t[e]=o.value),t}},6:function(t,e){t.exports=function(t){return"object"==typeof t?null!==t:"function"==typeof t}},625:function(t,e,o){"use strict";o.r(e);var n=o(626),r=o.n(n);for(var i in n)["default"].indexOf(i)<0&&function(t){o.d(e,t,(function(){return n[t]}))}(i);e.default=r.a},626:function(t,e,o){"use strict";var n=o(8);Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var r=n(o(15)),i=n(o(47)),c=o(21),u=n(o(335)),s="h-tag",l=["default","primary","success","warning","error","blue","green","red","yellow","pink","magenta","volcano","orange","gold","lime","cyan","geekblue","purple"],a=["pink","magenta","volcano","orange","gold","lime","cyan","geekblue","purple"],f={name:"Tag",components:{Icon:i.default,Tooltip:u.default},props:{closable:{type:Boolean,default:!1},checkable:{type:Boolean,default:!1},checked:{type:Boolean,default:!0},color:{type:String,default:"default"},type:{validator:function(t){return(0,c.oneOf)(t,["border","dot"])}},name:{type:[String,Number]},fade:{type:Boolean,default:!0},showTitle:{type:Boolean,default:!1},title:String,placement:String,width:{type:[String,Number],default:null}},data:function(){return{isChecked:this.checked}},computed:{tranName:function(){return this.fade?"fade":""},content:function(){return this.showTitle?this.title||this.$slots.default[0].text:void 0},classes:function(){var t;return["".concat(s),(t={},(0,r.default)(t,"".concat(s,"-").concat(this.color),!!this.color&&(0,c.oneOf)(this.color,l)),(0,r.default)(t,"".concat(s,"-").concat(this.type),!!this.type),(0,r.default)(t,"".concat(s,"-closable"),this.closable),(0,r.default)(t,"".concat(s,"-checked"),this.isChecked),t)]},wraperStyles:function(){return(0,c.oneOf)(this.color,l)?{}:{background:this.isChecked?this.defaultTypeColor:"transparent",borderWidth:"1px",borderStyle:"solid",borderColor:"dot"!==this.type&&"border"!==this.type&&this.isChecked?this.borderColor:this.lineColor,color:this.lineColor}},textClasses:function(){return["".concat(s,"-text"),"border"===this.type&&(0,c.oneOf)(this.color,l)?"".concat(s,"-color-").concat(this.color):"","dot"!==this.type&&"border"!==this.type&&"default"!==this.color&&this.isChecked&&a.indexOf(this.color)<0?"".concat(s,"-color-white"):""]},dotClasses:function(){return"".concat(s,"-dot-inner")},iconClass:function(){return"dot"===this.type?"":"border"===this.type?(0,c.oneOf)(this.color,l)?"".concat(s,"-color-").concat(this.color):"":void 0!==this.color?"default"===this.color?"":"rgb(255, 255, 255)":""},showDot:function(){return!!this.type&&"dot"===this.type},lineColor:function(){return"dot"===this.type?"":"border"===this.type?void 0!==this.color?(0,c.oneOf)(this.color,l)?"":this.color:"":void 0!==this.color?"default"===this.color?"":"rgb(255, 255, 255)":""},borderColor:function(){return void 0!==this.color?"default"===this.color?"":this.color:""},dotColor:function(){return void 0!==this.color?(0,c.oneOf)(this.color,l)?"":this.color:""},textColorStyle:function(){var t={};return this.color||l||("dot"!==this.type&&"border"!==this.type?this.this.isChecked&&(t.color=this.lineColor):t.color=this.lineColor),null!==this.width&&(t.width=this.width+"px"),t},bgColorStyle:function(){return(0,c.oneOf)(this.color,l)?{}:{background:this.dotColor}},defaultTypeColor:function(){return"dot"!==this.type&&"border"!==this.type&&void 0!==this.color?(0,c.oneOf)(this.color,l)?"":this.color:""}},methods:{close:function(t){void 0===this.name?this.$emit("on-close",t):this.$emit("on-close",t,this.name)},check:function(){if(this.checkable){var t=!this.isChecked;this.isChecked=t,void 0===this.name?this.$emit("on-change",t):this.$emit("on-change",t,this.name)}}}};e.default=f},7:function(t,e){t.exports=function(t){try{return!!t()}catch(t){return!0}}},775:function(t,e,o){"use strict";o.d(e,"a",(function(){return n})),o.d(e,"b",(function(){return r}));var n=function(){var t=this,e=t.$createElement,o=t._self._c||e;return o("transition",{attrs:{name:t.tranName}},[o("Tooltip",{attrs:{content:t.content,disabled:!t.showTitle,placement:t.placement}},[o("div",{class:t.classes,style:t.wraperStyles,on:{click:t.check}},[t.showDot?o("span",{class:t.dotClasses,style:t.bgColorStyle}):t._e(),t._v(" "),o("span",{class:t.textClasses,style:t.textColorStyle},[t._t("default")],2),t._v(" "),t.closable?o("Icon",{class:t.iconClass,attrs:{color:t.lineColor,name:"close"},nativeOn:{click:function(e){return e.stopPropagation(),t.close(e)}}}):t._e()],1)])],1)},r=[];n._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}});