| 12 |
- /*! vue-ydui v1.2.6 by YDCSS (c) 2018 Licensed MIT */
- !function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?exports.ydui=e():t.ydui=e()}(this,function(){return function(t){function e(o){if(n[o])return n[o].exports;var i=n[o]={exports:{},id:o,loaded:!1};return t[o].call(i.exports,i,i.exports,e),i.loaded=!0,i.exports}var n={};return e.m=t,e.c=n,e.p="/dist/",e(0)}({0:function(t,e,n){"use strict";function o(t){return t&&t.__esModule?t:{default:t}}Object.defineProperty(e,"__esModule",{value:!0}),e.TabPanel=e.Tab=void 0;var i=n(134),a=o(i),r=n(133),s=o(r);e.Tab=a.default,e.TabPanel=s.default},1:function(t,e){t.exports=function(t,e,n,o){var i,a=t=t||{},r=typeof t.default;"object"!==r&&"function"!==r||(i=t,a=t.default);var s="function"==typeof a?a.options:a;if(e&&(s.render=e.render,s.staticRenderFns=e.staticRenderFns),n&&(s._scopeId=n),o){var l=s.computed||(s.computed={});Object.keys(o).forEach(function(t){var e=o[t];l[t]=function(){return e}})}return{esModule:i,exports:a,options:s}}},2:function(t,e){t.exports=function(){var t=[];return t.toString=function(){for(var t=[],e=0;e<this.length;e++){var n=this[e];n[2]?t.push("@media "+n[2]+"{"+n[1]+"}"):t.push(n[1])}return t.join("")},t.i=function(e,n){"string"==typeof e&&(e=[[null,e,""]]);for(var o={},i=0;i<this.length;i++){var a=this[i][0];"number"==typeof a&&(o[a]=!0)}for(i=0;i<e.length;i++){var r=e[i];"number"==typeof r[0]&&o[r[0]]||(n&&!r[2]?r[2]=n:n&&(r[2]="("+r[2]+") and ("+n+")"),t.push(r))}},t}},3:function(t,e,n){function o(t){for(var e=0;e<t.length;e++){var n=t[e],o=c[n.id];if(o){o.refs++;for(var i=0;i<o.parts.length;i++)o.parts[i](n.parts[i]);for(;i<n.parts.length;i++)o.parts.push(a(n.parts[i]));o.parts.length>n.parts.length&&(o.parts.length=n.parts.length)}else{for(var r=[],i=0;i<n.parts.length;i++)r.push(a(n.parts[i]));c[n.id]={id:n.id,refs:1,parts:r}}}}function i(){var t=document.createElement("style");return t.type="text/css",u.appendChild(t),t}function a(t){var e,n,o=document.querySelector('style[data-vue-ssr-id~="'+t.id+'"]');if(o){if(v)return b;o.parentNode.removeChild(o)}if(h){var a=p++;o=f||(f=i()),e=r.bind(null,o,a,!1),n=r.bind(null,o,a,!0)}else o=i(),e=s.bind(null,o),n=function(){o.parentNode.removeChild(o)};return e(t),function(o){if(o){if(o.css===t.css&&o.media===t.media&&o.sourceMap===t.sourceMap)return;e(t=o)}else n()}}function r(t,e,n,o){var i=n?"":o.css;if(t.styleSheet)t.styleSheet.cssText=g(e,i);else{var a=document.createTextNode(i),r=t.childNodes;r[e]&&t.removeChild(r[e]),r.length?t.insertBefore(a,r[e]):t.appendChild(a)}}function s(t,e){var n=e.css,o=e.media,i=e.sourceMap;if(o&&t.setAttribute("media",o),i&&(n+="\n/*# sourceURL="+i.sources[0]+" */",n+="\n/*# sourceMappingURL=data:application/json;base64,"+btoa(unescape(encodeURIComponent(JSON.stringify(i))))+" */"),t.styleSheet)t.styleSheet.cssText=n;else{for(;t.firstChild;)t.removeChild(t.firstChild);t.appendChild(document.createTextNode(n))}}var l="undefined"!=typeof document,d=n(4),c={},u=l&&(document.head||document.getElementsByTagName("head")[0]),f=null,p=0,v=!1,b=function(){},h="undefined"!=typeof navigator&&/msie [6-9]\b/.test(navigator.userAgent.toLowerCase());t.exports=function(t,e,n){v=n;var i=d(t,e);return o(i),function(e){for(var n=[],a=0;a<i.length;a++){var r=i[a],s=c[r.id];s.refs--,n.push(s)}e?(i=d(t,e),o(i)):i=[];for(var a=0;a<n.length;a++){var s=n[a];if(0===s.refs){for(var l=0;l<s.parts.length;l++)s.parts[l]();delete c[s.id]}}}};var g=function(){var t=[];return function(e,n){return t[e]=n,t.filter(Boolean).join("\n")}}()},4:function(t,e){t.exports=function(t,e){for(var n=[],o={},i=0;i<e.length;i++){var a=e[i],r=a[0],s=a[1],l=a[2],d=a[3],c={id:t+":"+i,css:s,media:l,sourceMap:d};o[r]?o[r].parts.push(c):n.push(o[r]={id:r,parts:[c]})}return n}},5:function(t,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=function(){var t=function(t){t.preventDefault(),t.stopPropagation()},e=!1;return{lock:function(n){e||(e=!0,(n||document).addEventListener("touchmove",t))},unlock:function(n){e=!1,(n||document).removeEventListener("touchmove",t)}}}(),o=function(){return{lock:function(t){i&&d(t||document.body,"g-fix-ios-prevent-scroll")},unlock:function(t){i&&c(t||document.body,"g-fix-ios-prevent-scroll")}}}(),i=!!(window.navigator&&window.navigator.userAgent||"").match(/\(i[^;]+;( U;)? CPU.+Mac OS X/),a=function(t){var e=/^#([a-fA-F0-9]){3}(([a-fA-F0-9]){3})?$/,n=/^[rR][gG][bB][aA]\(\s*((25[0-5]|2[0-4]\d|1?\d{1,2})\s*,\s*){3}\s*(\.|\d+\.)?\d+\s*\)$/,o=/^[rR][gG][bB]\(\s*((25[0-5]|2[0-4]\d|1?\d{1,2})\s*,\s*){2}(25[0-5]|2[0-4]\d|1?\d{1,2})\s*\)$/;return e.test(t)||n.test(t)||o.test(t)},r=function(t){for(var e=t;e&&"HTML"!==e.tagName&&"BODY"!==e.tagName&&1===e.nodeType;){var n=document.defaultView.getComputedStyle(e).overflowY;if("scroll"===n||"auto"===n)return e;e=e.parentNode}return window},s=function(t,e){var n=t===window?document.body.offsetHeight:t.offsetHeight,o=t===window?0:t.getBoundingClientRect().top,i=e.getBoundingClientRect().top-o,a=i+e.offsetHeight;return i>=0&&i<n||a>0&&a<=n},l=function(t,e){return e=e||"",!(0===e.replace(/\s/g,"").length||!t)&&new RegExp(" "+e+" ").test(" "+t.className+" ")},d=function(t,e){l(t,e)||(t.className=""===t.className?e:t.className+" "+e)},c=function(t,e){if(l(t,e)){for(var n=" "+t.className.replace(/[\t\r\n]/g,"")+" ";n.indexOf(" "+e+" ")>=0;)n=n.replace(" "+e+" "," ");t.className=n.replace(/^\s+|\s+$/g,"")}},u=function(t){function e(n,o,i){if(n===o)return void("function"==typeof a&&a());var r=n+i>o?o:n+i;n>o&&(r=n-i<o?o:n-i),t===window?window.scrollTo(r,r):t.scrollTop=r,window.requestAnimationFrame(function(){return e(r,o,i)})}var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,o=arguments[2],i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:500,a=arguments[4];window.requestAnimationFrame||(window.requestAnimationFrame=window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame||window.msRequestAnimationFrame||function(t){return window.setTimeout(t,1e3/60)});var r=Math.abs(n-o),s=Math.ceil(r/i*50);e(n,o,s)};e.pageScroll=n,e.preventScroll=o,e.isIOS=i,e.isColor=a,e.getScrollview=r,e.checkInview=s,e.addClass=d,e.removeClass=c,e.scrollTop=u},45:function(t,e,n){e=t.exports=n(2)(),e.push([t.id,'.yd-tab-box{overflow:auto;-webkit-overflow-scrolling:touch}.yd-tab-nav-nomal .yd-tab-nav{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex}.yd-tab-nav-nomal .yd-tab-nav .yd-tab-nav-item{width:1%;-webkit-box-flex:1;-webkit-flex:1;-ms-flex:1;flex:1}.yd-tab-nav-scoll .yd-tab-nav .yd-tab-nav-item{padding:0 20px;display:inline-block}.yd-tab-nav{position:relative;z-index:0}.yd-tab-nav:after{height:1px;position:absolute;z-index:3;bottom:0;left:0;content:"";width:100%;background-image:-webkit-linear-gradient(bottom,currentColor 50%,transparent 0);background-image:linear-gradient(0deg,currentColor 50%,transparent 0)}.yd-tab-nav-item{text-align:center;height:100%;display:block;position:relative}.yd-tab-nav-item-label{color:inherit;display:inline-block;position:relative}.yd-tab-nav .yd-tab-active{color:currentColor}.yd-tab-nav .yd-tab-active:before{content:"";width:70%;height:2px;position:absolute;left:50%;bottom:0;margin-left:-35%;z-index:4;background-color:currentColor}.yd-tab-panel{position:relative;overflow:hidden}.yd-tab-panel-item{width:100%;position:absolute;top:0;overflow:hidden;-webkit-transform:translateX(-100%);transform:translateX(-100%)}.yd-tab-panel-item.yd-tab-active{position:relative;-webkit-transition:-webkit-transform .15s;transition:-webkit-transform .15s;transition:transform .15s;transition:transform .15s,-webkit-transform .15s;-webkit-transform:translateX(0);transform:translateX(0)}.yd-tab-panel-item.yd-tab-active~.yd-tab-panel-item{-webkit-transform:translateX(100%);transform:translateX(100%)}.yd-tab-badge{position:absolute;top:2px;z-index:9;line-height:0}.yd-tab-dot{position:absolute;top:-10px}.yd-tab-dot>i{display:inline-block;width:6px;height:6px;border-radius:100px}',""])},133:function(t,e,n){var o=n(1)(n(313),n(209),null,null);t.exports=o.exports},134:function(t,e,n){n(223);var o=n(1)(n(314),n(159),null,null);t.exports=o.exports},159:function(t,e){t.exports={render:function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"yd-tab"},[n("div",{staticClass:"yd-tab-box",class:t.horizontalScroll?"yd-tab-nav-scoll":"yd-tab-nav-nomal",style:{backgroundColor:t.bgColor}},[n("ul",{directives:[{name:"show",rawName:"v-show",value:t.navList.length>0,expression:"navList.length > 0"}],ref:"navbox",staticClass:"yd-tab-nav",style:{color:t.borderColor,width:t.width,fontSize:t.fontSize}},t._l(t.navList,function(e,o){return n("li",{key:o,staticClass:"yd-tab-nav-item",class:e._uid==t.activeIndex||o===t.activeIndex?"yd-tab-active":"",style:{color:e._uid==t.activeIndex||o===t.activeIndex?t.activeColor:t.color,lineHeight:t.height},on:{click:function(n){t.changeHandler(e.label,o,e._uid,e.tabkey)}}},[t._v("\n "+t._s(e.label)+"\n "),e.badge?n("span",{staticClass:"yd-tab-badge"},[n("yd-badge",{attrs:{scale:e.badgeScale,color:e.badgeColor,bgcolor:e.badgeBgcolor}},[t._v(t._s(e.badge))])],1):t._e(),t._v(" "),e.dot&&!e.badge?n("span",{staticClass:"yd-tab-dot"},[n("i",{style:{backgroundColor:e.dotColor}})]):t._e()])}))]),t._v(" "),n("div",{staticClass:"yd-tab-panel"},[t._t("default")],2)])},staticRenderFns:[]}},209:function(t,e){t.exports={render:function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"yd-tab-panel-item",class:t.classes},[t._t("default")],2)},staticRenderFns:[]}},223:function(t,e,n){var o=n(45);"string"==typeof o&&(o=[[t.id,o,""]]),o.locals&&(t.exports=o.locals);n(3)("1e9dcfce",o,!0)},313:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var o=n(5);e.default={name:"yd-tab-panel",data:function(){return{isCurrent:!1}},props:{badge:String,badgeColor:{validator:function(t){return!t||(0,o.isColor)(t)},default:"#FFF"},badgeBgcolor:{validator:function(t){return!t||(0,o.isColor)(t)},default:"#F6514B"},badgeScale:{validator:function(t){return/^(\d*(.\d+)?)$/.test(t)},default:.7},dot:{type:Boolean,default:!1},dotColor:{validator:function(t){return!t||(0,o.isColor)(t)},default:"#F6514B"},label:String,active:Boolean,tabkey:[String,Number]},computed:{classes:function(){return this.$parent.activeIndex===this._uid||this.isCurrent?"yd-tab-active":""}},watch:{active:function(){this.$parent.init()},label:function(){this.$parent.init()},badge:function(){this.$parent.init()},badgeColor:function(){this.$parent.init()},badgeScale:function(){this.$parent.init()},badgeBgcolor:function(){this.$parent.init()},dot:function(){this.$parent.init()},dotColor:function(){this.$parent.init()}},mounted:function(){var t=this;this.$nextTick(function(){t.$parent.init()})}}},314:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var o=n(5);e.default={name:"yd-tab",data:function(){return{navList:[],activeIndex:this.value||0,index:0,width:"auto",currentIndex:0}},props:{value:Number,callback:Function,itemClick:Function,preventDefault:{type:Boolean,default:!0},bgColor:{validator:function(t){return!t||(0,o.isColor)(t)},default:"#FFF"},color:{validator:function(t){return!t||(0,o.isColor)(t)},default:"#585858"},fontSize:{validator:function(t){return/^(\.|\d+\.)?\d+(px|rem)$/.test(t)},default:"14px"},height:{validator:function(t){return/^(\.|\d+\.)?\d+(px|rem)$/.test(t)},default:"42px"},borderColor:{validator:function(t){return!t||(0,o.isColor)(t)},default:"#E4E4E4"},activeColor:{validator:function(t){return!t||(0,o.isColor)(t)},default:"#FF5E53"},horizontalScroll:{type:Boolean,default:!1}},watch:{value:function(t){var e=this,n=this.$children.filter(function(t){return"yd-tab-panel"===t.$options.name});t>=n.length-1&&(t=n.length-1),t<0&&(t=0),this.activeIndex=this.index=t>n.length-1?n.length-1:t;var o="";n.forEach(function(n,i){t===i?(e.$set(n,"isCurrent",!0),o=n.label,n.tabkey&&(t=n.tabkey)):e.$set(n,"isCurrent",!1)}),this.callback&&this.callback(o,t)}},methods:{init:function(){var t=this,e=this.$children.filter(function(t){return"yd-tab-panel"===t.$options.name});if(this.navList=[],e.forEach(function(n,o){t.navList.push({_uid:n._uid,label:n.label,tabkey:n.tabkey,badge:n.badge,badgeColor:n.badgeColor,badgeBgcolor:n.badgeBgcolor,badgeScale:n.badgeScale,dot:n.dot,dotColor:n.dotColor}),n.active||t.activeIndex===o?(t.activeIndex=t.index=n._uid,t.currentIndex=o):o>=e.length&&(t.activeIndex=t.index=e[0]._uid)}),this.horizontalScroll){var n=1;this.$nextTick(function(){var e=t.getChildNodes(t.$refs.navbox);e.forEach(function(t){n+=t.offsetWidth}),t.width=n+"px"})}},getChildNodes:function(t){if(!t)return[];for(var e=t.children||t.childNodes,n=[],o=0,i=e.length;o<i;o++)1===e[o].nodeType&&n.push(e[o]);return n},changeHandler:function(t,e,n,o){return this.preventDefault?(this.index!==n&&(this.activeIndex=this.index=n,this.$emit("input",e)),this.value||0===this.value||this.currentIndex===e||(o||(e=o),this.callback&&this.callback(t,e)),void(this.currentIndex=e)):void(this.itemClick&&this.itemClick(e))}}}}})});
|