1 line
18 KiB
JavaScript
1 line
18 KiB
JavaScript
|
|
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["pages-cars-management-sl-cars-management-sl~pages-exam-exam~pages-exam-examDetail~pages-invite2-invi~2d5eace1"],{"1f25":function(t,e,i){"use strict";i("6a54");var o=i("f5bd").default;Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var n=o(i("80b1")),s=o(i("efe5")),l=o(i("5de6")),a=o(i("fcf3"));i("64aa"),i("bf0f"),i("2797"),i("aa9c"),i("5c47"),i("0506"),i("dfcf"),i("dc8a"),i("e966"),i("5ef2"),i("dd2b");var c=o(i("9b8e"));c.default.__xfl_select=c.default.__xfl_select||new c.default;var r={name:"xfl-select",props:{list:{type:Array,default:function(){return[]}},focusShowList:null,initValue:null,isCanInput:{type:Boolean,default:!1},selectHideType:{type:String,default:"hideAll"},placeholder:{type:String,default:"请选择"},style_Container:{type:String,default:""},disabled:{type:Boolean,default:!1},showItemNum:{type:Number,default:5},listShow:{type:Boolean,default:!1},clearable:{type:Boolean,default:!0}},data:function(){return{isShowList:!1,selectText:"",activeIndex:-1,isRotate:!1,listTop__:50}},watch:{listShow:function(t,e){this.onDataChange_listShow(t,e)}},computed:{focusShowList__:function(){return null==this.focusShowList?function(){try{return!/iPhone|iPad|iPod|iOS|Android|SymbianOS|Windows Phone|coolpad|mmp|smartphone|midp|wap|xoom|symbian|j2me|blackberry|wince/i.test(navigator.userAgent)}catch(t){return!1}}():this.focusShowList},listBoxHeight__:function(){return 2*this.showItemNum},showInput:function(){return this.isCanInput&&!this.disabled},innerList:function(){var t=[],e=this.list;return e.forEach((function(e,i){var o="object"===(0,a.default)(e)&&"value"in e?e.value:e,n="object"===(0,a.default)(e)&&1==e.disabled;t.push({isActive:!1,value:o,disabled:n})})),t}},mounted:function(){c.default.__xfl_select.$on("open",this.onOtherXflSelectOpen),this.switchMgr=new d(this.onListShow,this.onListHide),this.onDataChange_listShow(this.listShow,null),this.init()},beforeDestroy:function(){c.default.__xfl_select.$off("open",this.onOtherXflSelectOpen)},methods:{onOtherXflSelectOpen:function(t){"independent"!==this.selectHideType&&"hideOthers"!==this.selectHideType&&t!==this&&this.switchMgr.close(100)},init:function(){this.clearInput(),this.setInput(this.initValue),this.changeActiveIndex(this.initValue),this.getInputBoxHeight()},getInputBoxHeight:function(){var t=this;(function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=t.selector,i=void 0===e?"selector":e,o=t.component,n=void 0===o?null:o,s=t.attemptSpaceTime,a=void 0===s?16:s,r=t.attemptSpaceRate,d=void 0===r?1.5:r,h=t.totalAttemptNum,u=void 0===h?8:h,p=t.id,v=void 0===p||p,g=t.dataset,A=void 0===g||g,b=t.rect,m=void 0===b||b,w=t.size,x=void 0===w||w,y=t.scrollOffset,I=void 0===y||y,k=t.properties,T=void 0===k?[]:k,C=t.computedStyle,S=void 0===C?[]:C,L=t.context,J=void 0===L||L,_=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,H=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,O=arguments;i="string"===typeof O[0]?O[0]:String(i),"function"!==typeof O[1]&&(n=O[1],_=O[2],H=O[3]);!n instanceof c.default&&(n=null);var j={selector:i,attemptSpaceTime:a,totalAttemptNum:u,attemptSpaceRate:d,id:v,dataset:A,rect:m,size:x,scrollOffset:I,properties:T,computedStyle:S,context:J},U=uni.createSelectorQuery();n&&U.in(n);var z,M="viewport"===i?U.selectViewport():U.selectAll(i);M.fields(j),"function"!==typeof _&&(z=new Promise((function(t){return _=t})));f((function(t,e){U.exec((function(i){var o=(0,l.default)(i,1),n=o[0];n&&0===n.length&&(n=null),n||u<=e?"function"===typeof _&&_.call(H,n):t(a),a=Math.round(a*d)}))}))()})(".show-box",void 0,(function(e){if(e){t.listTop__=e[0].height+6}}))},getIndex:function(t){var e=function(t,e){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"",o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null,n=-1;i&&("string"===typeof i?i=i.split(/\s*[\,\.]\s*/):Array.isArray(i)||(i=""));return h(t,(function(t,s,l){if(i&&(t=u(t,i)),"function"===typeof o?o(t,e,arrElem,s,l):t===e)return n=s,!1})),n}(this.innerList,t,"value");return e},i
|