vue-wang-iview
Version:
2 lines • 11.9 kB
JavaScript
(function(t,n){"object"===typeof exports&&"object"===typeof module?module.exports=n():"function"===typeof define&&define.amd?define([],n):"object"===typeof exports?exports["vue-wang-iview"]=n():t["vue-wang-iview"]=n()})("undefined"!==typeof self?self:this,(function(){return function(t){var n={};function o(e){if(n[e])return n[e].exports;var i=n[e]={i:e,l:!1,exports:{}};return t[e].call(i.exports,i,i.exports,o),i.l=!0,i.exports}return o.m=t,o.c=n,o.d=function(t,n,e){o.o(t,n)||Object.defineProperty(t,n,{enumerable:!0,get:e})},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,n){if(1&n&&(t=o(t)),8&n)return t;if(4&n&&"object"===typeof t&&t&&t.__esModule)return t;var e=Object.create(null);if(o.r(e),Object.defineProperty(e,"default",{enumerable:!0,value:t}),2&n&&"string"!=typeof t)for(var i in t)o.d(e,i,function(n){return t[n]}.bind(null,i));return e},o.n=function(t){var n=t&&t.__esModule?function(){return t["default"]}:function(){return t};return o.d(n,"a",n),n},o.o=function(t,n){return Object.prototype.hasOwnProperty.call(t,n)},o.p="",o(o.s="fb15")}({"5a18":function(t,n,o){},"7b79":function(t,n,o){"use strict";o("abec")},8875:function(t,n,o){var e,i,s;(function(o,r){i=[],e=r,s="function"===typeof e?e.apply(n,i):e,void 0===s||(t.exports=s)})("undefined"!==typeof self&&self,(function(){function t(){var n=Object.getOwnPropertyDescriptor(document,"currentScript");if(!n&&"currentScript"in document&&document.currentScript)return document.currentScript;if(n&&n.get!==t&&document.currentScript)return document.currentScript;try{throw new Error}catch(h){var o,e,i,s=/.*at [^(]*\((.*):(.+):(.+)\)$/gi,r=/@([^@]*):(\d+):(\d+)\s*$/gi,a=s.exec(h.stack)||r.exec(h.stack),l=a&&a[1]||!1,c=a&&a[2]||!1,u=document.location.href.replace(document.location.hash,""),p=document.getElementsByTagName("script");l===u&&(o=document.documentElement.outerHTML,e=new RegExp("(?:[^\\n]+?\\n){0,"+(c-2)+"}[^<]*<script>([\\d\\D]*?)<\\/script>[\\d\\D]*","i"),i=o.replace(e,"$1").trim());for(var d=0;d<p.length;d++){if("interactive"===p[d].readyState)return p[d];if(p[d].src===l)return p[d];if(l===u&&p[d].innerHTML&&p[d].innerHTML.trim()===i)return p[d]}return null}}return t}))},"8d9d":function(t,n,o){},9142:function(t,n,o){"use strict";o("8d9d")},abec:function(t,n,o){},ce6b:function(t,n,o){"use strict";o("fabd")},d74d:function(t,n,o){"use strict";o("f86e")},dfaf:function(t,n,o){"use strict";o("5a18")},f86e:function(t,n,o){},fabd:function(t,n,o){},fb15:function(t,n,o){"use strict";if(o.r(n),"undefined"!==typeof window){var e=window.document.currentScript,i=o("8875");e=i(),"currentScript"in document||Object.defineProperty(document,"currentScript",{get:i});var s=e&&e.src.match(/(.+\/)[^/]+\.js(\?.*)?$/);s&&(o.p=s[1])}var r=function(){var t=this,n=t.$createElement,o=t._self._c||n;return o("div",{staticClass:"WangSkeleton-body"},[t.isUseSlot?t._t("default"):o("div",["card"===t.type?o("wang-skeleton-card",{style:{width:t.width,height:t.height,backgroundColor:t.backgroundColor},attrs:{options:t.options}}):t._e(),"avatar"===t.type?o("wang-skeleton-circlecom",{style:{width:t.width,height:t.height,backgroundColor:t.backgroundColor},attrs:{options:t.options}}):t._e(),"line"===t.type?o("wang-skeleton-straight-line",{style:{width:t.width,height:t.height,backgroundColor:t.backgroundColor},attrs:{options:t.options}}):t._e(),"list"===t.type?o("wang-skeleton-listcom",{style:{width:t.width,height:t.height,backgroundColor:t.backgroundColor},attrs:{options:t.options}}):t._e(),"custom"===t.type?o("div",{staticClass:"custom-box",style:{width:t.width,height:t.height,backgroundColor:t.backgroundColor}},t._l(t.childrenOptionCheckd,(function(n,e){return o("div",{key:e},["card"===n.type?o("wang-skeleton-card",{attrs:{options:n.options}}):t._e(),"avatar"===n.type?o("wang-skeleton-circlecom",{attrs:{options:n.options}}):t._e(),"line"===n.type?o("wang-skeleton-straight-line",{attrs:{options:n.options}}):t._e(),"list"===n.type?o("wang-skeleton-listcom",{attrs:{options:n.options}}):t._e()],1)})),0):t._e()],1)],2)},a=[],l=function(){var t=this,n=t.$createElement,o=t._self._c||n;return o("div",{staticClass:"WangSkeleton-body"},[t.isUseSlot?t._t("default"):o("div",{staticClass:"wang-card-innerWapper",class:{"wang-active":t.active},style:{justifyContent:t.justifyContent,alignItems:t.alignItems}},t._l(t.column,(function(n,e){return o("div",{key:e,staticClass:"wang-card-item-column",style:{margin:t.itemColumnMargin}},t._l(t.row,(function(n,e){return o("div",{key:e,staticClass:"wang-card-item",style:{width:t.width,height:t.height,backgroundColor:t.backgroundColor,margin:t.itemRowMargin}})})),0)})),0)],2)},c=[],u={name:"WangSkeletonCard",data(){return{row:this.options.row||1,column:this.options.column||1,width:this.options.width||"30px",height:this.options.height||"30px",backgroundColor:this.options.backgroundColor||"#F2F2F2",justifyContent:this.options.justifyContent||"flex-start",active:this.options.active||!1,itemRowMargin:this.options.itemRowMargin||"10px",itemColumnMargin:this.options.itemColumnMargin||"0px",alignItems:this.options.alignItems||"center"}},props:{isUseSlot:{type:Boolean,default:!1},options:{type:Object,default:()=>({})},childrenOption:{type:Object,default:()=>({})}}},p=u;o("d74d");function d(t,n,o,e,i,s,r,a){var l,c="function"===typeof t?t.options:t;if(n&&(c.render=n,c.staticRenderFns=o,c._compiled=!0),e&&(c.functional=!0),s&&(c._scopeId="data-v-"+s),r?(l=function(t){t=t||this.$vnode&&this.$vnode.ssrContext||this.parent&&this.parent.$vnode&&this.parent.$vnode.ssrContext,t||"undefined"===typeof __VUE_SSR_CONTEXT__||(t=__VUE_SSR_CONTEXT__),i&&i.call(this,t),t&&t._registeredComponents&&t._registeredComponents.add(r)},c._ssrRegister=l):i&&(l=a?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,n){return l.call(n),u(t,n)}}else{var p=c.beforeCreate;c.beforeCreate=p?[].concat(p,l):[l]}return{exports:t,options:c}}var h=d(p,l,c,!1,null,"c1c8f7a6",null),g=h.exports,f=function(){var t=this,n=t.$createElement,o=t._self._c||n;return o("div",{staticClass:"WangSkeleton-body"},[t.isUseSlot?t._t("default"):o("div",{staticClass:"wang-circlecom-innerWapper",class:{"wang-active":t.active},staticStyle:{height:"100%"},style:{justifyContent:t.justifyContent,alignItems:t.alignItems}},t._l(t.column,(function(n,e){return o("div",{key:e,style:{margin:t.itemColumnMargin}},t._l(t.row,(function(n,e){return o("div",{key:e,staticClass:"wang-circlecom-item",style:{width:t.width,height:t.height,backgroundColor:t.backgroundColor,margin:t.itemRowMargin}})})),0)})),0)],2)},m=[],y={name:"WangSkeletonCirclecom",data(){return{row:this.options.row||1,column:this.options.column||1,width:this.options.width||"40px",height:this.options.height||"40px",backgroundColor:this.options.backgroundColor||"#F2F2F2",justifyContent:this.options.justifyContent||"flex-start",active:this.options.active||!1,itemRowMargin:this.options.itemRowMargin||"10px",itemColumnMargin:this.options.itemColumnMargin||"0px",alignItems:this.options.alignItems||"center"}},props:{isUseSlot:{type:Boolean,default:!1},options:{type:Object,default:()=>({})},childrenOption:{type:Object,default:()=>({})}}},w=y,C=(o("dfaf"),d(w,f,m,!1,null,"40fff137",null)),v=C.exports,b=function(){var t=this,n=t.$createElement,o=t._self._c||n;return o("div",{staticClass:"WangSkeleton-body"},[t.isUseSlot?t._t("default"):o("div",{staticClass:"wang-straightline-innerWapper",class:{"wang-active":t.active},style:{justifyContent:t.justifyContent,alignItems:t.alignItems}},t._l(t.column,(function(n,e){return o("div",{key:e,style:{margin:t.itemColumnMargin}},t._l(t.row,(function(n,e){return o("div",{key:e,staticClass:"wang-straightline-item",style:{width:t.width,height:t.height,backgroundColor:t.backgroundColor,margin:t.itemRowMargin}})})),0)})),0)],2)},k=[],_={name:"WangSkeletonStraightLine",data(){return{row:this.options.row||1,column:this.options.column||1,width:this.options.width||"100px",height:this.options.height||"100px",backgroundColor:this.options.backgroundColor||"#F2F2F2",justifyContent:this.options.justifyContent||"flex-start",active:this.options.active||!1,itemRowMargin:this.options.itemRowMargin||"10px",itemColumnMargin:this.options.itemColumnMargin||"0px",alignItems:this.options.alignItems||"center"}},props:{isUseSlot:{type:Boolean,default:!1},options:{type:Object,default:()=>({})},childrenOption:{type:Object,default:()=>({})}}},S=_,j=(o("7b79"),d(S,b,k,!1,null,"cfdcc492",null)),x=j.exports,M=function(){var t=this,n=t.$createElement,o=t._self._c||n;return o("div",{staticClass:"WangSkeleton-body"},[t.isUseSlot?t._t("default"):o("div",{staticClass:"wang-straightline-innerWapper",class:{"wang-active":t.active},style:{justifyContent:t.justifyContent,alignItems:t.alignItems}},t._l(t.column,(function(n,e){return o("div",{key:e,style:{margin:t.itemColumnMargin}},t._l(t.row,(function(n,e){return o("div",{key:e,staticClass:"wang-straightline-item",style:{width:t.itemWidthCheck(e),height:t.height,backgroundColor:t.backgroundColor,margin:t.itemRowMargin}})})),0)})),0)],2)},O=[],W={name:"WangSkeletonListcom",data(){return{row:this.options.row||4,column:this.options.column||1,width:this.options.width||"600px",height:this.options.height||"20px",backgroundColor:this.options.backgroundColor||"#F2F2F2",justifyContent:this.options.justifyContent||"flex-start",active:this.options.active||!1,itemRowMargin:this.options.itemRowMargin||"10px",itemColumnMargin:this.options.itemColumnMargin||"0px",firstWidth:this.options.firstWidth||"200px",lastWidth:this.options.lastWidth||"",alignItems:this.options.alignItems||"center"}},props:{isUseSlot:{type:Boolean,default:!1},options:{type:Object,default:()=>({})},childrenOption:{type:Object,default:()=>({})}},computed:{itemWidthCheck(t){return t=>0===t?this.firstWidth:t===this.row-1?this.lastWidth:this.width}}},R=W,I=(o("9142"),d(R,M,O,!1,null,"0d052c84",null)),E=I.exports,$={name:"WangSkeleton",components:{WangSkeletonCard:g,WangSkeletonCirclecom:v,WangSkeletonStraightLine:x,WangSkeletonListcom:E},props:{isUseSlot:{type:Boolean,default:!1},options:{type:Object,default:()=>({})},childrenOption:{type:Array,default:()=>[]},type:{type:String,default:"list"},active:{type:[Boolean,String],default:!1},width:{type:String,default:""},height:{type:String,default:""},backgroundColor:{type:String,default:""}},computed:{childrenOptionCheckd(){let t=JSON.parse(JSON.stringify(this.childrenOption));return t&&t.forEach(t=>{t.options.backgroundColor?t.options.backgroundColor=t.options.backgroundColor:t.options.backgroundColor=this.options.backgroundColor,t.options.active?t.options.active=t.options.active:t.options.active=this.options.active,t.options.itemRowMargin?t.options.itemRowMargin=t.options.itemRowMargin:t.options.itemRowMargin=this.options.itemRowMargin,t.options.itemColumnMargin?t.options.itemColumnMargin=t.options.itemColumnMargin:t.options.itemColumnMargin=this.options.itemColumnMargin,t.options.alignItems?t.options.alignItems=t.options.alignItems:t.options.alignItems=this.options.alignItems,t.options.justifyContent?t.options.justifyContent=t.options.justifyContent:t.options.justifyContent=this.options.justifyContent,t.options.height?t.options.height=t.options.height:t.options.height=this.options.height,t.options.width?t.options.width=t.options.width:t.options.width=this.options.width,t.options.row?t.options.row=t.options.row:t.options.row=this.options.row}),t}}},F=$,U=(o("ce6b"),d(F,r,a,!1,null,"09c394ca",null)),T=U.exports;T.install=t=>{t.component("WangSkeleton",T)};var B=T;const L=[B],P=function(t,n={}){L.forEach(n=>{t.component(n.name,n)})};"undefined"!==typeof window&&window.Vue&&P(window.Vue);var N={install:P};n["default"]=N}})}));
//# sourceMappingURL=vue-wang-iview.umd.min.js.map