| 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-2b919b1e.js"],(function(e,o){"use strict";var u,i,r,l,a,s,c,d,f,m,p,v,h,g,b,y,S,I,V,w,x,T,P,j,k,G,M,A,B;return{setters:[function(e){u=e.q,i=e.t,r=e.V,l=e.v,a=e.d,s=e.l,c=e.h,d=e.S,f=e.aP,m=e.w,p=e.N,v=e.f,h=e.a1,g=e.a2,b=e.a0,y=e.aa,S=e.aQ,I=e.y,V=e.n,w=e.aR,x=e.G,T=e.J,P=e.aS,j=e.aI,k=e.K,G=e.aT,M=e.A,A=e.aU,B=e.aV}],execute:function(){var o=n(u("stepper"),2),C=o[0],O=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},N=a({name:C,props:L,emits:["plus","blur","minus","focus","change","overlimit","update:modelValue"],setup:function(e,n){var o,u,i,r,l,a,k=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(),A=s((i=null!=(u=e.modelValue)?u:e.defaultValue,r=G(i),F(r,e.modelValue)||k("update:modelValue",r),r)),B=c((function(){return e.disabled||e.disableMinus||+A.value<=+e.min})),C=c((function(){return e.disabled||e.disablePlus||+A.value>=+e.max})),L=c((function(){return{width:d(e.inputWidth),height:d(e.buttonSize)}})),N=c((function(){return f(e.buttonSize)})),E=function(t){e.beforeChange?T(e.beforeChange,{args:[t],done:function(){A.value=t}}):A.value=t},_=function(){if("plus"===o&&C.value||"minus"===o&&B.value)k("overlimit",o);else{var t="minus"===o?-e.step:+e.step,n=G(P(+A.value,t));E(n),k(o)}},z=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(A.value):F(o,i)||(n.value=i);var l=i===String(+i);E(l?+i:i)},q=function(t){var n;e.disableInput?null==(n=M.value)||n.blur():k("focus",t)},K=function(t){var n=t.target,o=G(n.value,e.autoFixed);n.value=String(o),A.value=o,V((function(){k("blur",t),w()}))},U=function e(){a=setTimeout((function(){_(),e()}),200)},W=function(){e.longPress&&(l=!1,clearTimeout(a),a=setTimeout((function(){l=!0,_(),U()}),j))},J=function(t){e.longPress&&(clearTimeout(a),l&&x(t))},Q=function(t){e.disableInput&&x(t)},R=function(e){return{onClick:function(t){x(t),o=e,_()},onTouchstartPassive:function(){o=e,W()},onTouchend:J,onTouchcancel:J}};return m((function(){return[e.max,e.min,e.integer,e.decimalLength]}),(function(){var e=G(A.value);F(e,A.value)||(A.value=e)})),m((function(){return e.modelValue}),(function(e){F(e,A.value)||(A.value=G(e))})),m(A,(function(t){k("update:modelValue",t),k("change",t,{name:e.name})})),p((function(){return e.modelValue})),function(){return v("div",{role:"group",class:O([e.theme])},[h(v("button",b({type:"button",style:N.value,class:[O("minus",{disabled:B.value}),t({},y,!B.value)],"aria-disabled":B.value||void 0},R("minus")),null),[[g,e.showMinus]]),h(v("input",{ref:M,type:e.integer?"tel":"text",role:"spinbutton",class:O("input"),value:A.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":A.value,onBlur:K,onInput:z,onFocus:q,onMousedown:Q},null),[[g,e.showInput]]),h(v("button",b({type:"button",style:N.value,class:[O("plus",{disabled:C.value}),t({},y,!C.value)],"aria-disabled":C.value||void 0},R("plus")),null),[[g,e.showPlus]])])}}}),E=(e("S",k(N)),B({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.goodsId===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(),A.replace({path:"/student-register",query:{sId:this.schoolId}})}}}))}}}))}();
|