UNPKG

shu-c-view

Version:

rollup 打包vue组件库框架

7 lines (6 loc) 14.4 kB
/*! * shu-c-view v1.3.0 * (c) 2025-10-23 * @license MIT */ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var t=require("lodash/set"),e=require("lodash/get"),r=require("lodash/isEqual"),n=require("lodash/isEmpty"),o=require("lodash/has"),i=require("lodash/assign");function u(t){return t&&"object"==typeof t&&"default"in t?t.default:t}var a=u(t),c=u(e),f=u(r),s=u(n),l=u(o),p=u(i);function g(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}var h,y,b="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},d=function(t){try{return!!t()}catch(t){return!0}},v=!d((function(){return 7!=Object.defineProperty({},1,{get:function(){return 7}})[1]})),m=function(t){return t&&t.Math==Math&&t},S=m("object"==typeof globalThis&&globalThis)||m("object"==typeof window&&window)||m("object"==typeof self&&self)||m("object"==typeof b&&b)||function(){return this}()||Function("return this")(),O=!d((function(){var t=function(){}.bind();return"function"!=typeof t||t.hasOwnProperty("prototype")})),j=O,w=Function.prototype,E=w.call,P=j&&w.bind.bind(E,E),_=j?P:function(t){return function(){return E.apply(t,arguments)}},I="object"==typeof document&&document.all,N={all:I,IS_HTMLDDA:void 0===I&&void 0!==I},T=N.all,C=N.IS_HTMLDDA?function(t){return"function"==typeof t||t===T}:function(t){return"function"==typeof t},A=d,x=C,z=/#|\.prototype\./,M=function(t,e){var r=L[F(t)];return r==G||r!=D&&(x(e)?A(e):!!e)},F=M.normalize=function(t){return String(t).replace(z,".").toLowerCase()},L=M.data={},D=M.NATIVE="N",G=M.POLYFILL="P",R=M,k={},B=C,q=N.all,U=N.IS_HTMLDDA?function(t){return"object"==typeof t?null!==t:B(t)||t===q}:function(t){return"object"==typeof t?null!==t:B(t)},V=U,$=S.document,H=V($)&&V($.createElement),W=function(t){return H?$.createElement(t):{}},X=!v&&!d((function(){return 7!=Object.defineProperty(W("div"),"a",{get:function(){return 7}}).a})),Y=v&&d((function(){return 42!=Object.defineProperty((function(){}),"prototype",{value:42,writable:!1}).prototype})),J=U,K=String,Q=TypeError,Z=function(t){if(J(t))return t;throw Q(K(t)+" is not an object")},tt=O,et=Function.prototype.call,rt=tt?et.bind(et):function(){return et.apply(et,arguments)},nt=S,ot=C,it=function(t){return ot(t)?t:void 0},ut=function(t,e){return arguments.length<2?it(nt[t]):nt[t]&&nt[t][e]},at=_({}.isPrototypeOf),ct=S,ft=ut("navigator","userAgent")||"",st=ct.process,lt=ct.Deno,pt=st&&st.versions||lt&&lt.version,gt=pt&&pt.v8;gt&&(y=(h=gt.split("."))[0]>0&&h[0]<4?1:+(h[0]+h[1])),!y&&ft&&(!(h=ft.match(/Edge\/(\d+)/))||h[1]>=74)&&(h=ft.match(/Chrome\/(\d+)/))&&(y=+h[1]);var ht=y,yt=d,bt=!!Object.getOwnPropertySymbols&&!yt((function(){var t=Symbol();return!String(t)||!(Object(t)instanceof Symbol)||!Symbol.sham&&ht&&ht<41})),dt=bt&&!Symbol.sham&&"symbol"==typeof Symbol.iterator,vt=ut,mt=C,St=at,Ot=Object,jt=dt?function(t){return"symbol"==typeof t}:function(t){var e=vt("Symbol");return mt(e)&&St(e.prototype,Ot(t))},wt=String,Et=C,Pt=function(t){try{return wt(t)}catch(t){return"Object"}},_t=TypeError,It=function(t){return null==t},Nt=function(t){if(Et(t))return t;throw _t(Pt(t)+" is not a function")},Tt=It,Ct=rt,At=C,xt=U,zt=TypeError,Mt={exports:{}},Ft=S,Lt=Object.defineProperty,Dt=function(t,e){try{Lt(Ft,t,{value:e,configurable:!0,writable:!0})}catch(r){Ft[t]=e}return e},Gt=Dt,Rt=S["__core-js_shared__"]||Gt("__core-js_shared__",{}),kt=Rt;(Mt.exports=function(t,e){return kt[t]||(kt[t]=void 0!==e?e:{})})("versions",[]).push({version:"3.26.1",mode:"global",copyright:"© 2014-2022 Denis Pushkarev (zloirock.ru)",license:"https://github.com/zloirock/core-js/blob/v3.26.1/LICENSE",source:"https://github.com/zloirock/core-js"});var Bt=It,qt=TypeError,Ut=function(t){if(Bt(t))throw qt("Can't call method on "+t);return t},Vt=Ut,$t=Object,Ht=function(t){return $t(Vt(t))},Wt=_({}.hasOwnProperty),Xt=Object.hasOwn||function(t,e){return Wt(Ht(t),e)},Yt=_,Jt=0,Kt=Math.random(),Qt=Yt(1..toString),Zt=function(t){return"Symbol("+(void 0===t?"":t)+")_"+Qt(++Jt+Kt,36)},te=S,ee=Mt.exports,re=Xt,ne=Zt,oe=bt,ie=dt,ue=ee("wks"),ae=te.Symbol,ce=ae&&ae.for,fe=ie?ae:ae&&ae.withoutSetter||ne,se=function(t){if(!re(ue,t)||!oe&&"string"!=typeof ue[t]){var e="Symbol."+t;oe&&re(ae,t)?ue[t]=ae[t]:ue[t]=ie&&ce?ce(e):fe(e)}return ue[t]},le=rt,pe=U,ge=jt,he=function(t,e){var r=t[e];return Tt(r)?void 0:Nt(r)},ye=function(t,e){var r,n;if("string"===e&&At(r=t.toString)&&!xt(n=Ct(r,t)))return n;if(At(r=t.valueOf)&&!xt(n=Ct(r,t)))return n;if("string"!==e&&At(r=t.toString)&&!xt(n=Ct(r,t)))return n;throw zt("Can't convert object to primitive value")},be=TypeError,de=se("toPrimitive"),ve=function(t,e){if(!pe(t)||ge(t))return t;var r,n=he(t,de);if(n){if(void 0===e&&(e="default"),r=le(n,t,e),!pe(r)||ge(r))return r;throw be("Can't convert object to primitive value")}return void 0===e&&(e="number"),ye(t,e)},me=ve,Se=jt,Oe=function(t){var e=me(t,"string");return Se(e)?e:e+""},je=v,we=X,Ee=Y,Pe=Z,_e=Oe,Ie=TypeError,Ne=Object.defineProperty,Te=Object.getOwnPropertyDescriptor;k.f=je?Ee?function(t,e,r){if(Pe(t),e=_e(e),Pe(r),"function"==typeof t&&"prototype"===e&&"value"in r&&"writable"in r&&!r.writable){var n=Te(t,e);n&&n.writable&&(t[e]=r.value,r={configurable:"configurable"in r?r.configurable:n.configurable,enumerable:"enumerable"in r?r.enumerable:n.enumerable,writable:!1})}return Ne(t,e,r)}:Ne:function(t,e,r){if(Pe(t),e=_e(e),Pe(r),we)try{return Ne(t,e,r)}catch(t){}if("get"in r||"set"in r)throw Ie("Accessors not supported");return"value"in r&&(t[e]=r.value),t};var Ce={exports:{}},Ae=v,xe=Xt,ze=Function.prototype,Me=Ae&&Object.getOwnPropertyDescriptor,Fe=xe(ze,"name"),Le={EXISTS:Fe,PROPER:Fe&&"something"===function(){}.name,CONFIGURABLE:Fe&&(!Ae||Ae&&Me(ze,"name").configurable)},De=C,Ge=Rt,Re=_(Function.toString);De(Ge.inspectSource)||(Ge.inspectSource=function(t){return Re(t)});var ke,Be,qe,Ue=Ge.inspectSource,Ve=C,$e=S.WeakMap,He=Ve($e)&&/native code/.test(String($e)),We=function(t,e){return{enumerable:!(1&t),configurable:!(2&t),writable:!(4&t),value:e}},Xe=k,Ye=We,Je=v?function(t,e,r){return Xe.f(t,e,Ye(1,r))}:function(t,e,r){return t[e]=r,t},Ke=Mt.exports,Qe=Zt,Ze=Ke("keys"),tr={},er=He,rr=S,nr=U,or=Je,ir=Xt,ur=Rt,ar=function(t){return Ze[t]||(Ze[t]=Qe(t))},cr=tr,fr=rr.TypeError,sr=rr.WeakMap;if(er||ur.state){var lr=ur.state||(ur.state=new sr);lr.get=lr.get,lr.has=lr.has,lr.set=lr.set,ke=function(t,e){if(lr.has(t))throw fr("Object already initialized");return e.facade=t,lr.set(t,e),e},Be=function(t){return lr.get(t)||{}},qe=function(t){return lr.has(t)}}else{var pr=ar("state");cr[pr]=!0,ke=function(t,e){if(ir(t,pr))throw fr("Object already initialized");return e.facade=t,or(t,pr,e),e},Be=function(t){return ir(t,pr)?t[pr]:{}},qe=function(t){return ir(t,pr)}}var gr={set:ke,get:Be,has:qe,enforce:function(t){return qe(t)?Be(t):ke(t,{})},getterFor:function(t){return function(e){var r;if(!nr(e)||(r=Be(e)).type!==t)throw fr("Incompatible receiver, "+t+" required");return r}}},hr=d,yr=C,br=Xt,dr=v,vr=Le.CONFIGURABLE,mr=Ue,Sr=gr.enforce,Or=gr.get,jr=Object.defineProperty,wr=dr&&!hr((function(){return 8!==jr((function(){}),"length",{value:8}).length})),Er=String(String).split("String"),Pr=Ce.exports=function(t,e,r){"Symbol("===String(e).slice(0,7)&&(e="["+String(e).replace(/^Symbol\(([^)]*)\)/,"$1")+"]"),r&&r.getter&&(e="get "+e),r&&r.setter&&(e="set "+e),(!br(t,"name")||vr&&t.name!==e)&&(dr?jr(t,"name",{value:e,configurable:!0}):t.name=e),wr&&r&&br(r,"arity")&&t.length!==r.arity&&jr(t,"length",{value:r.arity});try{r&&br(r,"constructor")&&r.constructor?dr&&jr(t,"prototype",{writable:!1}):t.prototype&&(t.prototype=void 0)}catch(t){}var n=Sr(t);return br(n,"source")||(n.source=Er.join("string"==typeof e?e:"")),t};Function.prototype.toString=Pr((function(){return yr(this)&&Or(this).source||mr(this)}),"toString");var _r=C,Ir=k,Nr=Ce.exports,Tr=Dt,Cr=C,Ar=String,xr=TypeError,zr=_,Mr=Z,Fr=function(t){if("object"==typeof t||Cr(t))return t;throw xr("Can't set "+Ar(t)+" as a prototype")},Lr=Object.setPrototypeOf||("__proto__"in{}?function(){var t,e=!1,r={};try{(t=zr(Object.getOwnPropertyDescriptor(Object.prototype,"__proto__").set))(r,[]),e=r instanceof Array}catch(t){}return function(r,n){return Mr(r),Fr(n),e?t(r,n):r.__proto__=n,r}}():void 0),Dr=C,Gr=U,Rr=Lr,kr={},Br=_,qr=Br({}.toString),Ur=Br("".slice),Vr=function(t){return Ur(qr(t),8,-1)},$r=d,Hr=Vr,Wr=Object,Xr=_("".split),Yr=$r((function(){return!Wr("z").propertyIsEnumerable(0)}))?function(t){return"String"==Hr(t)?Xr(t,""):Wr(t)}:Wr,Jr=Ut,Kr=function(t){return Yr(Jr(t))},Qr=Math.ceil,Zr=Math.floor,tn=Math.trunc||function(t){var e=+t;return(e>0?Zr:Qr)(e)},en=function(t){var e=+t;return e!=e||0===e?0:tn(e)},rn=en,nn=Math.max,on=Math.min,un=en,an=Math.min,cn=function(t){return t>0?an(un(t),9007199254740991):0},fn=Kr,sn=function(t,e){var r=rn(t);return r<0?nn(r+e,0):on(r,e)},ln=function(t){return cn(t.length)},pn=function(t){return function(e,r,n){var o,i=fn(e),u=ln(i),a=sn(n,u);if(t&&r!=r){for(;u>a;)if((o=i[a++])!=o)return!0}else for(;u>a;a++)if((t||a in i)&&i[a]===r)return t||a||0;return!t&&-1}},gn={includes:pn(!0),indexOf:pn(!1)},hn=Xt,yn=Kr,bn=gn.indexOf,dn=tr,vn=_([].push),mn=function(t,e){var r,n=yn(t),o=0,i=[];for(r in n)!hn(dn,r)&&hn(n,r)&&vn(i,r);for(;e.length>o;)hn(n,r=e[o++])&&(~bn(i,r)||vn(i,r));return i},Sn=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"].concat("length","prototype");kr.f=Object.getOwnPropertyNames||function(t){return mn(t,Sn)};var On={},jn={},wn={}.propertyIsEnumerable,En=Object.getOwnPropertyDescriptor,Pn=En&&!wn.call({1:2},1);jn.f=Pn?function(t){var e=En(this,t);return!!e&&e.enumerable}:wn;var _n=v,In=rt,Nn=jn,Tn=We,Cn=Kr,An=Oe,xn=Xt,zn=X,Mn=Object.getOwnPropertyDescriptor;On.f=_n?Mn:function(t,e){if(t=Cn(t),e=An(e),zn)try{return Mn(t,e)}catch(t){}if(xn(t,e))return Tn(!In(Nn.f,t,e),t[e])};var Fn=_(1..valueOf),Ln={};Ln[se("toStringTag")]="z";var Dn="[object z]"===String(Ln),Gn=C,Rn=Vr,kn=se("toStringTag"),Bn=Object,qn="Arguments"==Rn(function(){return arguments}()),Un=Dn?Rn:function(t){var e,r,n;return void 0===t?"Undefined":null===t?"Null":"string"==typeof(r=function(t,e){try{return t[e]}catch(t){}}(e=Bn(t),kn))?r:qn?Rn(e):"Object"==(n=Rn(e))&&Gn(e.callee)?"Arguments":n},Vn=Un,$n=String,Hn=Ut,Wn=function(t){if("Symbol"===Vn(t))throw TypeError("Cannot convert a Symbol value to a string");return $n(t)},Xn=_("".replace),Yn="[\t\n\v\f\r                 \u2028\u2029\ufeff]",Jn=RegExp("^"+Yn+Yn+"*"),Kn=RegExp(Yn+Yn+"*$"),Qn=function(t){return function(e){var r=Wn(Hn(e));return 1&t&&(r=Xn(r,Jn,"")),2&t&&(r=Xn(r,Kn,"")),r}},Zn={start:Qn(1),end:Qn(2),trim:Qn(3)},to=v,eo=S,ro=_,no=R,oo=function(t,e,r,n){n||(n={});var o=n.enumerable,i=void 0!==n.name?n.name:e;if(_r(r)&&Nr(r,i,n),n.global)o?t[e]=r:Tr(e,r);else{try{n.unsafe?t[e]&&(o=!0):delete t[e]}catch(t){}o?t[e]=r:Ir.f(t,e,{value:r,enumerable:!1,configurable:!n.nonConfigurable,writable:!n.nonWritable})}return t},io=Xt,uo=function(t,e,r){var n,o;return Rr&&Dr(n=e.constructor)&&n!==r&&Gr(o=n.prototype)&&o!==r.prototype&&Rr(t,o),t},ao=at,co=jt,fo=ve,so=d,lo=kr.f,po=On.f,go=k.f,ho=Fn,yo=Zn.trim,bo=eo.Number,vo=bo.prototype,mo=eo.TypeError,So=ro("".slice),Oo=ro("".charCodeAt),jo=function(t){var e=fo(t,"number");return"bigint"==typeof e?e:wo(e)},wo=function(t){var e,r,n,o,i,u,a,c,f=fo(t,"number");if(co(f))throw mo("Cannot convert a Symbol value to a number");if("string"==typeof f&&f.length>2)if(f=yo(f),43===(e=Oo(f,0))||45===e){if(88===(r=Oo(f,2))||120===r)return NaN}else if(48===e){switch(Oo(f,1)){case 66:case 98:n=2,o=49;break;case 79:case 111:n=8,o=55;break;default:return+f}for(u=(i=So(f,2)).length,a=0;a<u;a++)if((c=Oo(i,a))<48||c>o)return NaN;return parseInt(i,n)}return+f};if(no("Number",!bo(" 0o1")||!bo("0b1")||bo("+0x1"))){for(var Eo,Po=function(t){var e=arguments.length<1?0:bo(jo(t)),r=this;return ao(vo,r)&&so((function(){ho(r)}))?uo(Object(e),r,Po):e},_o=to?lo(bo):"MAX_VALUE,MIN_VALUE,NaN,NEGATIVE_INFINITY,POSITIVE_INFINITY,EPSILON,MAX_SAFE_INTEGER,MIN_SAFE_INTEGER,isFinite,isInteger,isNaN,isSafeInteger,parseFloat,parseInt,fromString,range".split(","),Io=0;_o.length>Io;Io++)io(bo,Eo=_o[Io])&&!io(Po,Eo)&&go(Po,Eo,po(bo,Eo));Po.prototype=vo,vo.constructor=Po,oo(eo,"Number",Po,{constructor:!0})}var No={name:"BaseGridPagination",inject:["getBaseGrid"],props:{total:{type:Number},currentPage:{type:Number,default:1},pageSize:{type:Number,default:10},layout:{type:String,default:"prev, pager, next, jumper, sizes, slot, ->, total"},isShowPagination:{type:Boolean,default:!0},pagingItems:{type:Array,default:function(){return[]}},paginationAttributes:{type:Object,default:function(){return{}}},isRenderRefreshIcon:{type:Boolean,default:!0}},watch:{currentPage:function(t,e){this.curCurrentPage=t}},data:function(){return{curCurrentPage:this.currentPage}},created:function(){this.getBaseGrid.setPaginationEl(this)},methods:{getEl:function(){return this.$refs["".concat(this._uid,"-base-grid-pagination")]},createPagingItemsNodes:function(){for(var t=[],e=0;e<this.pagingItems.length;e++){var r=this.pagingItems[e],n=null;n=l(r,"slotNode")?r.slotNode(this.$createElement):this.$createElement("span",{style:{"font-size":l(r,"icon")&&!s(r.icon)?"16px":"12px",cursor:"pointer"},class:g({},c(r,"icon",""),!0),attrs:{title:c(r,"text","")},on:c(r,"listeners",{})},l(r,"icon")&&!s(r.icon)?null:r.text),t.push(n)}return t},updateCurrentPage:function(t){this.curCurrentPage=t},_sizeChangeEvent:function(t){this.getBaseGrid.onSizeChange(t)},_currentChangeEvent:function(t){this.getBaseGrid.onCurrentChange(t)},_refreshEvent:function(){this.getBaseGrid.loadGrid()}},render:function(t){var e={};return f(this.isShowPagination,!1)&&a(e,"display","none"),t("el-pagination",{ref:"".concat(this._uid,"-base-grid-pagination"),style:e,props:p({layout:this.layout},this.paginationAttributes,{total:this.total,currentPage:this.curCurrentPage,pageSize:this.pageSize}),on:{"size-change":this._sizeChangeEvent,"current-change":this._currentChangeEvent}},[t("template",{slot:"default"},[this.isRenderRefreshIcon?t("span",{style:{"font-size":"16px",cursor:"pointer"},class:{"el-icon-refresh":!0},attrs:{title:"刷新"},on:{click:this._refreshEvent}}):t(),this.createPagingItemsNodes()])])}};exports.BaseGridPagination=No;