meri-design
Version:
基于vue框架的ui库
7 lines • 15.4 kB
JavaScript
/*!
* @meri-design v2.2.19-beta10
* (c) 2019-2022 YuShu-Web
* Released under the MIT License.
* 2025-01-14 15:25:40
*/
var t,n;t=this,n=function(){return function(){var t={12548:function(t,n,r){var e=r(61798);t.exports=e},23866:function(t,n,r){r(68787);var e=r(35703);t.exports=e("Array").map},88287:function(t,n,r){var e=r(7046),o=r(23866),i=Array.prototype;t.exports=function(t){var n=t.map;return t===i||e(i,t)&&n===i.map?o:n}},86942:function(t,n,r){t.exports=r(88698)},88698:function(t,n,r){var e=r(12548);t.exports=e},24883:function(t,n,r){var e=r(57475),o=r(69826),i=TypeError;t.exports=function(t){if(e(t))return t;throw i(o(t)+" is not a function")}},96059:function(t,n,r){var e=r(10941),o=String,i=TypeError;t.exports=function(t){if(e(t))return t;throw i(o(t)+" is not an object")}},3610:function(t,n,r){var e=r(86843),o=r(95329),i=r(37026),u=r(89678),c=r(10623),a=r(64692),f=o([].push),s=function(t){var n=1==t,r=2==t,o=3==t,s=4==t,p=6==t,l=7==t,v=5==t||p;return function(y,d,b,h){for(var m,x,g=u(y),w=i(g),j=e(d,b),S=c(w),O=0,_=h||a,T=n?_(y,S):r||l?_(y,0):void 0;S>O;O++)if((v||O in w)&&(x=j(m=w[O],O,g),t))if(n)T[O]=x;else if(x)switch(t){case 3:return!0;case 5:return m;case 6:return O;case 2:f(T,m)}else switch(t){case 4:return!1;case 7:f(T,m)}return p?-1:o||s?s:T}};t.exports={forEach:s(0),map:s(1),filter:s(2),some:s(3),every:s(4),find:s(5),findIndex:s(6),filterReject:s(7)}},50568:function(t,n,r){var e=r(95981),o=r(99813),i=r(53385),u=o("species");t.exports=function(t){return i>=51||!e((function(){var n=[];return(n.constructor={})[u]=function(){return{foo:1}},1!==n[t](Boolean).foo}))}},5693:function(t,n,r){var e=r(1052),o=r(24284),i=r(10941),u=r(99813)("species"),c=Array;t.exports=function(t){var n;return e(t)&&(n=t.constructor,(o(n)&&(n===c||e(n.prototype))||i(n)&&null===(n=n[u]))&&(n=void 0)),void 0===n?c:n}},64692:function(t,n,r){var e=r(5693);t.exports=function(t,n){return new(e(t))(0===n?0:n)}},82532:function(t,n,r){var e=r(95329),o=e({}.toString),i=e("".slice);t.exports=function(t){return i(o(t),8,-1)}},9697:function(t,n,r){var e=r(22885),o=r(57475),i=r(82532),u=r(99813)("toStringTag"),c=Object,a="Arguments"==i(function(){return arguments}());t.exports=e?i:function(t){var n,r,e;return void 0===t?"Undefined":null===t?"Null":"string"==typeof(r=function(t,n){try{return t[n]}catch(r){}}(n=c(t),u))?r:a?i(n):"Object"==(e=i(n))&&o(n.callee)?"Arguments":e}},32029:function(t,n,r){var e=r(55746),o=r(65988),i=r(31887);t.exports=e?function(t,n,r){return o.f(t,n,i(1,r))}:function(t,n,r){return t[n]=r,t}},31887:function(t){t.exports=function(t,n){return{enumerable:!(1&t),configurable:!(2&t),writable:!(4&t),value:n}}},75609:function(t,n,r){var e=r(21899),o=Object.defineProperty;t.exports=function(t,n){try{o(e,t,{value:n,configurable:!0,writable:!0})}catch(r){e[t]=n}return n}},55746:function(t,n,r){var e=r(95981);t.exports=!e((function(){return 7!=Object.defineProperty({},1,{get:function(){return 7}})[1]}))},61333:function(t,n,r){var e=r(21899),o=r(10941),i=e.document,u=o(i)&&o(i.createElement);t.exports=function(t){return u?i.createElement(t):{}}},2861:function(t,n,r){var e=r(626);t.exports=e("navigator","userAgent")||""},53385:function(t,n,r){var e,o,i=r(21899),u=r(2861),c=i.process,a=i.Deno,f=c&&c.versions||a&&a.version,s=f&&f.v8;s&&(o=(e=s.split("."))[0]>0&&e[0]<4?1:+(e[0]+e[1])),!o&&u&&(!(e=u.match(/Edge\/(\d+)/))||e[1]>=74)&&(e=u.match(/Chrome\/(\d+)/))&&(o=+e[1]),t.exports=o},35703:function(t,n,r){var e=r(54058);t.exports=function(t){return e[t+"Prototype"]}},76887:function(t,n,r){"use strict";var e=r(21899),o=r(79730),i=r(95329),u=r(57475),c=r(49677).f,a=r(37252),f=r(54058),s=r(86843),p=r(32029),l=r(90953),v=function(t){var n=function(r,e,i){if(this instanceof n){switch(arguments.length){case 0:return new t;case 1:return new t(r);case 2:return new t(r,e)}return new t(r,e,i)}return o(t,this,arguments)};return n.prototype=t.prototype,n};t.exports=function(t,n){var r,o,y,d,b,h,m,x,g=t.target,w=t.global,j=t.stat,S=t.proto,O=w?e:j?e[g]:(e[g]||{}).prototype,_=w?f:f[g]||p(f,g,{})[g],T=_.prototype;for(y in n)r=!a(w?y:g+(j?".":"#")+y,t.forced)&&O&&l(O,y),b=_[y],r&&(h=t.dontCallGetSet?(x=c(O,y))&&x.value:O[y]),d=r&&h?h:n[y],r&&typeof b==typeof d||(m=t.bind&&r?s(d,e):t.wrap&&r?v(d):S&&u(d)?i(d):d,(t.sham||d&&d.sham||b&&b.sham)&&p(m,"sham",!0),p(_,y,m),S&&(l(f,o=g+"Prototype")||p(f,o,{}),p(f[o],y,d),t.real&&T&&!T[y]&&p(T,y,d)))}},95981:function(t){t.exports=function(t){try{return!!t()}catch(n){return!0}}},79730:function(t,n,r){var e=r(18285),o=Function.prototype,i=o.apply,u=o.call;t.exports="object"==typeof Reflect&&Reflect.apply||(e?u.bind(i):function(){return u.apply(i,arguments)})},86843:function(t,n,r){var e=r(95329),o=r(24883),i=r(18285),u=e(e.bind);t.exports=function(t,n){return o(t),void 0===n?t:i?u(t,n):function(){return t.apply(n,arguments)}}},18285:function(t,n,r){var e=r(95981);t.exports=!e((function(){var t=function(){}.bind();return"function"!=typeof t||t.hasOwnProperty("prototype")}))},78834:function(t,n,r){var e=r(18285),o=Function.prototype.call;t.exports=e?o.bind(o):function(){return o.apply(o,arguments)}},95329:function(t,n,r){var e=r(18285),o=Function.prototype,i=o.bind,u=o.call,c=e&&i.bind(u,u);t.exports=e?function(t){return t&&c(t)}:function(t){return t&&function(){return u.apply(t,arguments)}}},626:function(t,n,r){var e=r(54058),o=r(21899),i=r(57475),u=function(t){return i(t)?t:void 0};t.exports=function(t,n){return arguments.length<2?u(e[t])||u(o[t]):e[t]&&e[t][n]||o[t]&&o[t][n]}},14229:function(t,n,r){var e=r(24883);t.exports=function(t,n){var r=t[n];return null==r?void 0:e(r)}},21899:function(t,n,r){var e=function(t){return t&&t.Math==Math&&t};t.exports=e("object"==typeof globalThis&&globalThis)||e("object"==typeof window&&window)||e("object"==typeof self&&self)||e("object"==typeof r.g&&r.g)||function(){return this}()||Function("return this")()},90953:function(t,n,r){var e=r(95329),o=r(89678),i=e({}.hasOwnProperty);t.exports=Object.hasOwn||function(t,n){return i(o(t),n)}},2840:function(t,n,r){var e=r(55746),o=r(95981),i=r(61333);t.exports=!e&&!o((function(){return 7!=Object.defineProperty(i("div"),"a",{get:function(){return 7}}).a}))},37026:function(t,n,r){var e=r(95329),o=r(95981),i=r(82532),u=Object,c=e("".split);t.exports=o((function(){return!u("z").propertyIsEnumerable(0)}))?function(t){return"String"==i(t)?c(t,""):u(t)}:u},81302:function(t,n,r){var e=r(95329),o=r(57475),i=r(63030),u=e(Function.toString);o(i.inspectSource)||(i.inspectSource=function(t){return u(t)}),t.exports=i.inspectSource},1052:function(t,n,r){var e=r(82532);t.exports=Array.isArray||function(t){return"Array"==e(t)}},57475:function(t){t.exports=function(t){return"function"==typeof t}},24284:function(t,n,r){var e=r(95329),o=r(95981),i=r(57475),u=r(9697),c=r(626),a=r(81302),f=function(){},s=[],p=c("Reflect","construct"),l=/^\s*(?:class|function)\b/,v=e(l.exec),y=!l.exec(f),d=function(t){if(!i(t))return!1;try{return p(f,s,t),!0}catch(n){return!1}},b=function(t){if(!i(t))return!1;switch(u(t)){case"AsyncFunction":case"GeneratorFunction":case"AsyncGeneratorFunction":return!1}try{return y||!!v(l,a(t))}catch(n){return!0}};b.sham=!0,t.exports=!p||o((function(){var t;return d(d.call)||!d(Object)||!d((function(){t=!0}))||t}))?b:d},37252:function(t,n,r){var e=r(95981),o=r(57475),i=/#|\.prototype\./,u=function(t,n){var r=a[c(t)];return r==s||r!=f&&(o(n)?e(n):!!n)},c=u.normalize=function(t){return String(t).replace(i,".").toLowerCase()},a=u.data={},f=u.NATIVE="N",s=u.POLYFILL="P";t.exports=u},10941:function(t,n,r){var e=r(57475);t.exports=function(t){return"object"==typeof t?null!==t:e(t)}},82529:function(t){t.exports=!0},56664:function(t,n,r){var e=r(626),o=r(57475),i=r(7046),u=r(32302),c=Object;t.exports=u?function(t){return"symbol"==typeof t}:function(t){var n=e("Symbol");return o(n)&&i(n.prototype,c(t))}},10623:function(t,n,r){var e=r(43057);t.exports=function(t){return e(t.length)}},35331:function(t){var n=Math.ceil,r=Math.floor;t.exports=Math.trunc||function(t){var e=+t;return(e>0?r:n)(e)}},72497:function(t,n,r){var e=r(53385),o=r(95981);t.exports=!!Object.getOwnPropertySymbols&&!o((function(){var t=Symbol();return!String(t)||!(Object(t)instanceof Symbol)||!Symbol.sham&&e&&e<41}))},65988:function(t,n,r){var e=r(55746),o=r(2840),i=r(83937),u=r(96059),c=r(83894),a=TypeError,f=Object.defineProperty,s=Object.getOwnPropertyDescriptor,p="enumerable",l="configurable",v="writable";n.f=e?i?function(t,n,r){if(u(t),n=c(n),u(r),"function"==typeof t&&"prototype"===n&&"value"in r&&v in r&&!r.writable){var e=s(t,n);e&&e.writable&&(t[n]=r.value,r={configurable:l in r?r.configurable:e.configurable,enumerable:p in r?r.enumerable:e.enumerable,writable:!1})}return f(t,n,r)}:f:function(t,n,r){if(u(t),n=c(n),u(r),o)try{return f(t,n,r)}catch(e){}if("get"in r||"set"in r)throw a("Accessors not supported");return"value"in r&&(t[n]=r.value),t}},49677:function(t,n,r){var e=r(55746),o=r(78834),i=r(36760),u=r(31887),c=r(74529),a=r(83894),f=r(90953),s=r(2840),p=Object.getOwnPropertyDescriptor;n.f=e?p:function(t,n){if(t=c(t),n=a(n),s)try{return p(t,n)}catch(r){}if(f(t,n))return u(!o(i.f,t,n),t[n])}},7046:function(t,n,r){var e=r(95329);t.exports=e({}.isPrototypeOf)},36760:function(t,n){"use strict";var r={}.propertyIsEnumerable,e=Object.getOwnPropertyDescriptor,o=e&&!r.call({1:2},1);n.f=o?function(t){var n=e(this,t);return!!n&&n.enumerable}:r},39811:function(t,n,r){var e=r(78834),o=r(57475),i=r(10941),u=TypeError;t.exports=function(t,n){var r,c;if("string"===n&&o(r=t.toString)&&!i(c=e(r,t)))return c;if(o(r=t.valueOf)&&!i(c=e(r,t)))return c;if("string"!==n&&o(r=t.toString)&&!i(c=e(r,t)))return c;throw u("Can't convert object to primitive value")}},54058:function(t){t.exports={}},48219:function(t){var n=TypeError;t.exports=function(t){if(null==t)throw n("Can't call method on "+t);return t}},63030:function(t,n,r){var e=r(21899),o=r(75609),i="__core-js_shared__",u=e[i]||o(i,{});t.exports=u},68726:function(t,n,r){var e=r(82529),o=r(63030);(t.exports=function(t,n){return o[t]||(o[t]=void 0!==n?n:{})})("versions",[]).push({version:"3.23.4",mode:e?"pure":"global",copyright:"© 2014-2022 Denis Pushkarev (zloirock.ru)",license:"https://github.com/zloirock/core-js/blob/v3.23.4/LICENSE",source:"https://github.com/zloirock/core-js"})},74529:function(t,n,r){var e=r(37026),o=r(48219);t.exports=function(t){return e(o(t))}},62435:function(t,n,r){var e=r(35331);t.exports=function(t){var n=+t;return n!=n||0===n?0:e(n)}},43057:function(t,n,r){var e=r(62435),o=Math.min;t.exports=function(t){return t>0?o(e(t),9007199254740991):0}},89678:function(t,n,r){var e=r(48219),o=Object;t.exports=function(t){return o(e(t))}},46935:function(t,n,r){var e=r(78834),o=r(10941),i=r(56664),u=r(14229),c=r(39811),a=r(99813),f=TypeError,s=a("toPrimitive");t.exports=function(t,n){if(!o(t)||i(t))return t;var r,a=u(t,s);if(a){if(void 0===n&&(n="default"),r=e(a,t,n),!o(r)||i(r))return r;throw f("Can't convert object to primitive value")}return void 0===n&&(n="number"),c(t,n)}},83894:function(t,n,r){var e=r(46935),o=r(56664);t.exports=function(t){var n=e(t,"string");return o(n)?n:n+""}},22885:function(t,n,r){var e={};e[r(99813)("toStringTag")]="z",t.exports="[object z]"===String(e)},69826:function(t){var n=String;t.exports=function(t){try{return n(t)}catch(r){return"Object"}}},99418:function(t,n,r){var e=r(95329),o=0,i=Math.random(),u=e(1..toString);t.exports=function(t){return"Symbol("+(void 0===t?"":t)+")_"+u(++o+i,36)}},32302:function(t,n,r){var e=r(72497);t.exports=e&&!Symbol.sham&&"symbol"==typeof Symbol.iterator},83937:function(t,n,r){var e=r(55746),o=r(95981);t.exports=e&&o((function(){return 42!=Object.defineProperty((function(){}),"prototype",{value:42,writable:!1}).prototype}))},99813:function(t,n,r){var e=r(21899),o=r(68726),i=r(90953),u=r(99418),c=r(72497),a=r(32302),f=o("wks"),s=e.Symbol,p=s&&s.for,l=a?s:s&&s.withoutSetter||u;t.exports=function(t){if(!i(f,t)||!c&&"string"!=typeof f[t]){var n="Symbol."+t;c&&i(s,t)?f[t]=s[t]:f[t]=a&&p?p(n):l(n)}return f[t]}},68787:function(t,n,r){"use strict";var e=r(76887),o=r(3610).map;e({target:"Array",proto:!0,forced:!r(50568)("map")},{map:function(t){return o(this,t,arguments.length>1?arguments[1]:void 0)}})},61798:function(t,n,r){var e=r(88287);t.exports=e},88946:function(t,n,r){t.exports=r(86942)}},n={};function r(e){var o=n[e];if(void 0!==o)return o.exports;var i=n[e]={exports:{}};return t[e](i,i.exports,r),i.exports}r.n=function(t){var n=t&&t.__esModule?function(){return t.default}:function(){return t};return r.d(n,{a:n}),n},r.d=function(t,n){for(var e in n)r.o(n,e)&&!r.o(t,e)&&Object.defineProperty(t,e,{enumerable:!0,get:n[e]})},r.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(t){if("object"==typeof window)return window}}(),r.o=function(t,n){return Object.prototype.hasOwnProperty.call(t,n)},r.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})};var e={};return function(){"use strict";r.r(e),r.d(e,{default:function(){return u}});var t=r(88946),n=r.n(t),o=function(t,n,r,e,o,i,u,c){var a,f="function"==typeof t?t.options:t;if(n&&(f.render=n,f.staticRenderFns=r,f._compiled=!0),e&&(f.functional=!0),i&&(f._scopeId="data-v-"+i),u?(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(u)},f._ssrRegister=a):o&&(a=c?function(){o.call(this,(f.functional?this.parent:this).$root.$options.shadowRoot)}:o),a)if(f.functional){f._injectStyles=a;var s=f.render;f.render=function(t,n){return a.call(n),s(t,n)}}else{var p=f.beforeCreate;f.beforeCreate=p?[].concat(p,a):[a]}return{exports:t,options:f}}({name:"MTab",props:{value:{type:[String,Number],default:""},data:{type:Array,default:()=>[]},average:{type:Boolean,default:!1}},data:()=>({lineLeft:0}),watch:{data:{handler(t,r){(null==t?void 0:n()(t).call(t,(t=>t.id)).join(""))!==(null==r?void 0:n()(r).call(r,(t=>t.id)).join(""))&&this.$nextTick((()=>{this.setLineStyle(this.value)}))},deep:!0,immediate:!0},value(t,n){t!==n&&this.$nextTick((()=>{this.setLineStyle(this.value)}))}},methods:{itemClick(t){let{id:n}=t;this.$emit("click",n),this.setLineStyle(n)},setLineStyle(t){if(!t)return;const{data:n}=this,r=n.length;let e=0;for(let o=0;o<r;o++){if(n[o].id===t){e+=this.$refs[`tab${n[o].id}`][0].clientWidth/2-12;break}e+=this.$refs[`tab${n[o].id}`][0].clientWidth}this.lineLeft=e}}},(function(){var t=this,n=t.$createElement,r=t._self._c||n;return r("div",{staticClass:"m-tab",class:[t.average&&"m-tab-average"]},[t._l(t.data,(function(n){return r("div",{key:n.id,ref:"tab"+n.id,refInFor:!0,staticClass:"m-tab-item",class:[t.value===n.id&&"m-tab-item-active"],attrs:{"data-id":n.id},on:{click:function(r){return t.itemClick(n)}}},[t._v(t._s(n.name))])})),t._v(" "),t.lineLeft?r("section",{staticClass:"m-tab-line",style:{transform:"translate3d("+t.lineLeft+"px, 0, 0)"}}):t._e()],2)}),[],!1,null,null,null),i=o.exports;i.install=t=>t.component(i.name,i);var u=i}(),e}()},"object"==typeof exports&&"object"==typeof module?module.exports=n():"function"==typeof define&&define.amd?define("MTab",[],n):"object"==typeof exports?exports.MTab=n():t.MTab=n();