| 1 |
- !function(){function e(t){return e="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},e(t)}function t(t,n,o){return(n=function(t){var n=function(t,n){if("object"!==e(t)||null===t)return t;var o=t[Symbol.toPrimitive];if(void 0!==o){var u=o.call(t,n||"default");if("object"!==e(u))return u;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===n?String:Number)(t)}(t,"string");return"symbol"===e(n)?n:String(n)}(n))in t?Object.defineProperty(t,n,{value:o,enumerable:!0,configurable:!0,writable:!0}):t[n]=o,t}function n(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var o,u,i,r,l=[],a=!0,s=!1;try{if(i=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;a=!1}else for(;!(a=(o=i.call(n)).done)&&(l.push(o.value),l.length!==t);a=!0);}catch(c){s=!0,u=c}finally{try{if(!a&&null!=n.return&&(r=n.return(),Object(r)!==r))return}finally{if(s)throw u}}return l}}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return o(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return o(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function o(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,o=new Array(t);n<t;n++)o[n]=e[n];return o}System.register(["./index-legacy-0c25f875.js"],(function(e,o){"use strict";var u,i,r,l,a,s,c,d,f,m,p,v,h,b,g,y,S,I,V,w,x,T,k,P,j,G,M,B,O;return{setters:[function(e){u=e.c,i=e.b,r=e.t,l=e.n,a=e.d,s=e.r,c=e.e,d=e.o,f=e.bk,m=e.w,p=e.a2,v=e.a,h=e.g,b=e.v,g=e.h,y=e.H,S=e.bl,I=e.W,V=e.z,w=e.bm,x=e.p,T=e.$,k=e.bn,P=e.bd,j=e.k,G=e.bo,M=e.J,B=e.O,O=e.bp}],execute:function(){var o=n(u("stepper"),2),A=o[0],C=o[1],F=function(e,t){return String(e)===String(t)},L={min:i(1),max:i(1/0),name:i(""),step:i(1),theme:String,integer:Boolean,disabled:Boolean,showPlus:r,showMinus:r,showInput:r,longPress:r,autoFixed:r,allowEmpty:Boolean,modelValue:l,inputWidth:l,buttonSize:l,placeholder:String,disablePlus:Boolean,disableMinus:Boolean,disableInput:Boolean,beforeChange:Function,defaultValue:i(1),decimalLength:l},z=a({name:A,props:L,emits:["plus","blur","minus","focus","change","overlimit","update:modelValue"],setup:function(e,n){var o,u,i,r,l,a,j=n.emit,G=function(t){var n=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],o=e.min,u=e.max,i=e.allowEmpty,r=e.decimalLength;return i&&""===t||(t=""===(t=S(String(t),!e.integer))?0:+t,t=Number.isNaN(t)?+o:t,t=n?Math.max(Math.min(+u,t),+o):t,I(r)&&(t=t.toFixed(+r))),t},M=s(),B=s((i=null!=(u=e.modelValue)?u:e.defaultValue,r=G(i),F(r,e.modelValue)||j("update:modelValue",r),r)),O=c((function(){return e.disabled||e.disableMinus||+B.value<=+e.min})),A=c((function(){return e.disabled||e.disablePlus||+B.value>=+e.max})),L=c((function(){return{width:d(e.inputWidth),height:d(e.buttonSize)}})),z=c((function(){return f(e.buttonSize)})),E=function(t){e.beforeChange?T(e.beforeChange,{args:[t],done:function(){B.value=t}}):B.value=t},N=function(){if("plus"===o&&A.value||"minus"===o&&O.value)j("overlimit",o);else{var t="minus"===o?-e.step:+e.step,n=G(k(+B.value,t));E(n),j(o)}},_=function(t){var n=t.target,o=n.value,u=e.decimalLength,i=S(String(o),!e.integer);if(I(u)&&i.includes(".")){var r=i.split(".");i="".concat(r[0],".").concat(r[1].slice(0,+u))}e.beforeChange?n.value=String(B.value):F(o,i)||(n.value=i);var l=i===String(+i);E(l?+i:i)},W=function(t){var n;e.disableInput?null==(n=M.value)||n.blur():j("focus",t)},$=function(t){var n=t.target,o=G(n.value,e.autoFixed);n.value=String(o),B.value=o,V((function(){j("blur",t),w()}))},q=function e(){a=setTimeout((function(){N(),e()}),200)},H=function(){e.longPress&&(l=!1,clearTimeout(a),a=setTimeout((function(){l=!0,N(),q()}),P))},J=function(t){e.longPress&&(clearTimeout(a),l&&x(t))},K=function(t){e.disableInput&&x(t)},U=function(e){return{onClick:function(t){x(t),o=e,N()},onTouchstartPassive:function(){o=e,H()},onTouchend:J,onTouchcancel:J}};return m((function(){return[e.max,e.min,e.integer,e.decimalLength]}),(function(){var e=G(B.value);F(e,B.value)||(B.value=e)})),m((function(){return e.modelValue}),(function(e){F(e,B.value)||(B.value=G(e))})),m(B,(function(t){j("update:modelValue",t),j("change",t,{name:e.name})})),p((function(){return e.modelValue})),function(){return v("div",{role:"group",class:C([e.theme])},[h(v("button",g({type:"button",style:z.value,class:[C("minus",{disabled:O.value}),t({},y,!O.value)],"aria-disabled":O.value||void 0},U("minus")),null),[[b,e.showMinus]]),h(v("input",{ref:M,type:e.integer?"tel":"text",role:"spinbutton",class:C("input"),value:B.value,style:L.value,disabled:e.disabled,readonly:e.disableInput,inputmode:e.integer?"numeric":"decimal",placeholder:e.placeholder,"aria-valuemax":e.max,"aria-valuemin":e.min,"aria-valuenow":B.value,onBlur:$,onInput:_,onFocus:W,onMousedown:K},null),[[b,e.showInput]]),h(v("button",g({type:"button",style:z.value,class:[C("plus",{disabled:A.value}),t({},y,!A.value)],"aria-disabled":A.value||void 0},U("plus")),null),[[b,e.showPlus]])])}}}),E=(e("S",j(z)),O({prefixKey:"",storage:sessionStorage}));e("u",G("student-register-store",{state:function(){return{token:E.get(M,""),selectGoods:[],selectVip:[],schoolId:E.get("register_school_id","")}},getters:{getToken:function(){return this.token},getGoods:function(){return this.selectGoods},getVip:function(){return this.selectVip},getSchoolId:function(){return this.schoolId}},actions:{setToken:function(e){this.token=e,E.set(M,e)},deleteToken:function(){this.token="",E.remove(M)},setGoods:function(e){this.selectGoods.push(e)},deleteGoods:function(e){var t=this.selectGoods.findIndex((function(t){return t.productSkuId===e}));this.selectGoods.splice(t,1)},setVip:function(e){this.selectVip=e},deleteVip:function(e){var t=this.selectVip.findIndex((function(t){return t.goodsId===e}));this.selectVip.splice(t,1)},selectedVip:function(e){return this.selectVip.findIndex((function(t){return t.goodsId===e}))>=0},setShoolId:function(e){this.schoolId=e,E.set("register_school_id",e)},studentLoutOut:function(){this.deleteToken(),B.replace({path:"/student-register",query:{sId:this.schoolId}})}}}))}}}))}();
|