index.js 11 KB

12
  1. /*! vue-ydui v1.2.6 by YDCSS (c) 2018 Licensed MIT */
  2. !function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.ydui=t():e.ydui=t()}(this,function(){return function(e){function t(l){if(i[l])return i[l].exports;var n=i[l]={exports:{},id:l,loaded:!1};return e[l].call(n.exports,n,n.exports,t),n.loaded=!0,n.exports}var i={};return t.m=e,t.c=i,t.p="/dist/",t(0)}({0:function(e,t,i){"use strict";function l(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0}),t.CellGroup=t.CellItem=void 0;var n=i(77),r=l(n),c=i(76),o=l(c);t.CellItem=r.default,t.CellGroup=o.default},1:function(e,t){e.exports=function(e,t,i,l){var n,r=e=e||{},c=typeof e.default;"object"!==c&&"function"!==c||(n=e,r=e.default);var o="function"==typeof r?r.options:r;if(t&&(o.render=t.render,o.staticRenderFns=t.staticRenderFns),i&&(o._scopeId=i),l){var a=o.computed||(o.computed={});Object.keys(l).forEach(function(e){var t=l[e];a[e]=function(){return t}})}return{esModule:n,exports:r,options:o}}},2:function(e,t){e.exports=function(){var e=[];return e.toString=function(){for(var e=[],t=0;t<this.length;t++){var i=this[t];i[2]?e.push("@media "+i[2]+"{"+i[1]+"}"):e.push(i[1])}return e.join("")},e.i=function(t,i){"string"==typeof t&&(t=[[null,t,""]]);for(var l={},n=0;n<this.length;n++){var r=this[n][0];"number"==typeof r&&(l[r]=!0)}for(n=0;n<t.length;n++){var c=t[n];"number"==typeof c[0]&&l[c[0]]||(i&&!c[2]?c[2]=i:i&&(c[2]="("+c[2]+") and ("+i+")"),e.push(c))}},e}},3:function(e,t,i){function l(e){for(var t=0;t<e.length;t++){var i=e[t],l=d[i.id];if(l){l.refs++;for(var n=0;n<l.parts.length;n++)l.parts[n](i.parts[n]);for(;n<i.parts.length;n++)l.parts.push(r(i.parts[n]));l.parts.length>i.parts.length&&(l.parts.length=i.parts.length)}else{for(var c=[],n=0;n<i.parts.length;n++)c.push(r(i.parts[n]));d[i.id]={id:i.id,refs:1,parts:c}}}}function n(){var e=document.createElement("style");return e.type="text/css",f.appendChild(e),e}function r(e){var t,i,l=document.querySelector('style[data-vue-ssr-id~="'+e.id+'"]');if(l){if(y)return h;l.parentNode.removeChild(l)}if(g){var r=u++;l=p||(p=n()),t=c.bind(null,l,r,!1),i=c.bind(null,l,r,!0)}else l=n(),t=o.bind(null,l),i=function(){l.parentNode.removeChild(l)};return t(e),function(l){if(l){if(l.css===e.css&&l.media===e.media&&l.sourceMap===e.sourceMap)return;t(e=l)}else i()}}function c(e,t,i,l){var n=i?"":l.css;if(e.styleSheet)e.styleSheet.cssText=m(t,n);else{var r=document.createTextNode(n),c=e.childNodes;c[t]&&e.removeChild(c[t]),c.length?e.insertBefore(r,c[t]):e.appendChild(r)}}function o(e,t){var i=t.css,l=t.media,n=t.sourceMap;if(l&&e.setAttribute("media",l),n&&(i+="\n/*# sourceURL="+n.sources[0]+" */",i+="\n/*# sourceMappingURL=data:application/json;base64,"+btoa(unescape(encodeURIComponent(JSON.stringify(n))))+" */"),e.styleSheet)e.styleSheet.cssText=i;else{for(;e.firstChild;)e.removeChild(e.firstChild);e.appendChild(document.createTextNode(i))}}var a="undefined"!=typeof document,s=i(4),d={},f=a&&(document.head||document.getElementsByTagName("head")[0]),p=null,u=0,y=!1,h=function(){},g="undefined"!=typeof navigator&&/msie [6-9]\b/.test(navigator.userAgent.toLowerCase());e.exports=function(e,t,i){y=i;var n=s(e,t);return l(n),function(t){for(var i=[],r=0;r<n.length;r++){var c=n[r],o=d[c.id];o.refs--,i.push(o)}t?(n=s(e,t),l(n)):n=[];for(var r=0;r<i.length;r++){var o=i[r];if(0===o.refs){for(var a=0;a<o.parts.length;a++)o.parts[a]();delete d[o.id]}}}};var m=function(){var e=[];return function(t,i){return e[t]=i,e.filter(Boolean).join("\n")}}()},4:function(e,t){e.exports=function(e,t){for(var i=[],l={},n=0;n<t.length;n++){var r=t[n],c=r[0],o=r[1],a=r[2],s=r[3],d={id:e+":"+n,css:o,media:a,sourceMap:s};l[c]?l[c].parts.push(d):i.push(l[c]={id:c,parts:[d]})}return i}},54:function(e,t,i){t=e.exports=i(2)(),t.push([e.id,'.yd-cell-box{margin-bottom:.2rem}.yd-cell{position:relative;z-index:5;background-color:#fff}.yd-cell:after{height:1px;position:absolute;z-index:0;bottom:0;left:0;content:"";width:100%;background-image:-webkit-linear-gradient(bottom,#e4e4e4 50%,transparent 0);background-image:linear-gradient(0deg,#e4e4e4 50%,transparent 0)}.yd-cell a.yd-cell-item,.yd-cell label.yd-cell-item{background-color:#fff}.yd-cell a.yd-cell-item:active,.yd-cell label.yd-cell-item:active{background-color:#f5f5f5}.yd-cell-item{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;position:relative;padding-left:.24rem;overflow:hidden}.yd-cell-item:not(:last-child):after{margin-left:.24rem;height:1px;position:absolute;z-index:0;bottom:0;left:0;content:"";width:100%;background-image:-webkit-linear-gradient(bottom,#ececec 50%,transparent 0);background-image:linear-gradient(0deg,#ececec 50%,transparent 0)}.yd-cell-left{color:#555;font-size:.28rem;white-space:nowrap;-ms-flex-align:center}.yd-cell-left,.yd-cell-right{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-box-align:center;-webkit-align-items:center;align-items:center}.yd-cell-right{-webkit-box-flex:1;-webkit-flex:1;-ms-flex:1;flex:1;width:100%;min-height:1rem;color:#525252;text-align:right;font-size:.26rem;padding-right:.24rem;-ms-flex-align:center;-webkit-box-pack:end;-webkit-justify-content:flex-end;-ms-flex-pack:end;justify-content:flex-end}.yd-cell-right input[type=date],.yd-cell-right input[type=datetime-local],.yd-cell-right input[type=time]{line-height:1rem}.yd-cell-right input[type=checkbox]:not(.yd-switch),.yd-cell-right input[type=radio]{position:absolute;left:-9999em}.yd-cell-right input[type=checkbox]:not(.yd-switch)+.yd-cell-checkbox-icon:after,.yd-cell-right input[type=checkbox]:not(.yd-switch)+.yd-cell-radio-icon:after,.yd-cell-right input[type=radio]+.yd-cell-checkbox-icon:after,.yd-cell-right input[type=radio]+.yd-cell-radio-icon:after{font-family:YDUI-INLAY;font-size:.42rem}.yd-cell-right input[type=checkbox]:not(.yd-switch)+.yd-cell-radio-icon:after,.yd-cell-right input[type=radio]+.yd-cell-radio-icon:after{content:"\\E600";color:#4cd864;display:none}.yd-cell-right input[type=checkbox]:not(.yd-switch)+.yd-cell-checkbox-icon:after,.yd-cell-right input[type=radio]+.yd-cell-checkbox-icon:after{content:"\\E604";color:#d9d9d9}.yd-cell-right input[type=checkbox]:not(.yd-switch):checked+.yd-cell-radio-icon:after,.yd-cell-right input[type=radio]:checked+.yd-cell-radio-icon:after{display:inline-block}.yd-cell-right input[type=checkbox]:not(.yd-switch):checked+.yd-cell-checkbox-icon:after,.yd-cell-right input[type=radio]:checked+.yd-cell-checkbox-icon:after{color:#4cd864;content:"\\E601"}.yd-cell-right:active{background:none}.yd-cell-right .yd-input-clear,.yd-cell-right .yd-input-password{height:1rem}.yd-cell-right .yd-datetime-input,.yd-cell-right input[type=date],.yd-cell-right input[type=datetime-local],.yd-cell-right input[type=email],.yd-cell-right input[type=number]:not(.yd-spinner-input),.yd-cell-right input[type=password],.yd-cell-right input[type=tel],.yd-cell-right input[type=text],.yd-cell-right input[type=time],.yd-cell-right input[type=url]{width:1%;-webkit-box-flex:1;-webkit-flex:1;-ms-flex:1;flex:1;height:1rem;border:none;font-size:.28rem;background:transparent;color:#555;display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-box-pack:start;-webkit-justify-content:flex-start;-ms-flex-pack:start;justify-content:flex-start;-webkit-box-align:center;-webkit-align-items:center;-ms-flex-align:center;align-items:center;text-align:left}.yd-cell-right select{-webkit-box-flex:1;-webkit-flex:1;-ms-flex:1;flex:1;height:1rem;border:none;display:block;color:#a9a9a9;font-size:.28rem;margin-left:-.08rem}.yd-cell-icon{display:block;margin-right:.1rem}.yd-cell-icon img{height:.3rem;vertical-align:middle}.yd-cell-arrow:after{margin-left:.05rem;margin-right:-.08rem;display:block;font-family:YDUI-INLAY;font-size:.28rem;color:#c9c9c9;content:"\\E608"}.yd-cell-title{padding:.05rem .24rem .1rem;font-size:.28rem;text-align:left;color:#888;position:relative;z-index:1}.yd-cell-title:after{height:1px;position:absolute;z-index:0;bottom:0;left:0;content:"";width:100%;background-image:-webkit-linear-gradient(bottom,#e4e4e4 50%,transparent 0);background-image:linear-gradient(0deg,#e4e4e4 50%,transparent 0)}',""])},76:function(e,t,i){var l=i(1)(i(257),i(199),null,null);e.exports=l.exports},77:function(e,t,i){i(232);var l=i(1)(i(258),i(175),null,null);e.exports=l.exports},175:function(e,t){e.exports={render:function(){var e=this,t=e.$createElement,i=e._self._c||t;return"label"==e.type||"checkbox"==e.type||"radio"==e.type?i("label",{staticClass:"yd-cell-item"},[e.checkLeft?i("span",{staticClass:"yd-cell-left"},[e.$slots.icon?i("span",{staticClass:"yd-cell-icon"},[e._t("icon")],2):e._e(),e._v(" "),e._t("left")],2):e._e(),e._v(" "),i("label",{staticClass:"yd-cell-right",class:e.classes},[e._t("right"),e._v(" "),"checkbox"==e.type?i("i",{staticClass:"yd-cell-checkbox-icon"}):e._e(),e._v(" "),"radio"==e.type?i("i",{staticClass:"yd-cell-radio-icon"}):e._e()],2)]):"link"==e.type?i("router-link",{staticClass:"yd-cell-item",attrs:{to:e.href}},[e.checkLeft?i("div",{staticClass:"yd-cell-left"},[e.$slots.icon?i("span",{staticClass:"yd-cell-icon"},[e._t("icon")],2):e._e(),e._v(" "),e._t("left")],2):e._e(),e._v(" "),i("div",{staticClass:"yd-cell-right",class:e.classes},[e._t("right")],2)]):"a"==e.type?i("a",{staticClass:"yd-cell-item",attrs:{href:e.href}},[e.checkLeft?i("div",{staticClass:"yd-cell-left"},[e.$slots.icon?i("span",{staticClass:"yd-cell-icon"},[e._t("icon")],2):e._e(),e._v(" "),e._t("left")],2):e._e(),e._v(" "),i("div",{staticClass:"yd-cell-right",class:e.classes},[e._t("right")],2)]):i("div",{staticClass:"yd-cell-item"},[e.checkLeft?i("div",{staticClass:"yd-cell-left"},[e.$slots.icon?i("span",{staticClass:"yd-cell-icon"},[e._t("icon")],2):e._e(),e._v(" "),e._t("left")],2):e._e(),e._v(" "),i("div",{staticClass:"yd-cell-right",class:e.classes},[e._t("right")],2)])},staticRenderFns:[]}},199:function(e,t){e.exports={render:function(){var e=this,t=e.$createElement,i=e._self._c||t;return i("div",{staticClass:"yd-cell-box"},[e.title?i("div",{staticClass:"yd-cell-title"},[e._v(e._s(e.title))]):e._e(),e._v(" "),i("div",{staticClass:"yd-cell"},[e._t("default")],2),e._v(" "),e._t("bottom")],2)},staticRenderFns:[]}},232:function(e,t,i){var l=i(54);"string"==typeof l&&(l=[[e.id,l,""]]),l.locals&&(e.exports=l.locals);i(3)("5a29a3fa",l,!0)},257:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default={name:"yd-cell-group",props:{title:String}}},258:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default={name:"yd-cell-item",props:{type:{validator:function(e){return["link","a","label","div","checkbox","radio"].indexOf(e)>-1},default:"div"},arrow:{type:Boolean,default:!1},href:{type:[String,Object]}},computed:{checkLeft:function(){return!!this.$slots.left||!!this.$slots.icon},classes:function(){return this.arrow?"yd-cell-arrow":""}}}}})});