1;(function () { 2 if (window.ocSelectJs) return 3 window.ocSelectJs = true 4 console.log('select å è½½----') 5 6 $('.oc-slect-wrapper .oc-slect-input').click(function (e) { 7 e.stopPropagation() 8 9 const wrapper = $(this).closest('.oc-slect-wrapper') 10 const ul = wrapper.find('.oc-slect-ul') 11 const arrow = wrapper.find('.icon-arrow-down') 12 13 // å ³éå ¶å®ä¸ææ¡ 14 $('.oc-slect-wrapper .oc-slect-ul').not(ul).slideUp() 15 16 // æ¢å¤å ¶å®ç®å¤´ 17 $('.icon-arrow-down').not(arrow).css('transform', 'rotate(0deg)') 18 19 if (ul.is(':visible')) { 20 ul.slideUp() 21 arrow.css('transform', 'rotate(0deg)') 22 } else { 23 ul.slideDown() 24 arrow.css('transform', 'rotate(180deg)') 25 } 26 }) 27 28 $('.oc-slect-wrapper .oc-slect-ul').click(function (event) { 29 let _this = $(event.target) 30 if (_this.hasClass('oc-select-li')) { 31 if (_this.hasClass('disable-select-li')) { 32 event.stopPropagation() 33 return 34 } 35 let value = _this.data('value') 36 let parent = _this.parents('.oc-slect-wrapper') 37 if (value == void 0) { 38 value = _this.text() 39 } 40 console.log(value, 'value', parent) 41 parent.trigger( 42 $.Event('change', { 43 value, 44 label: _this.text(), 45 }), 46 ) 47 parent.data('value', value) 48 parent.find('.oc-slect-input>.oc-slect-label').text(_this.text()) 49 _this.siblings('.oc-select-li').removeClass('active-select-li') 50 _this.addClass('active-select-li') 51 _this.parent().slideUp() 52 } 53 }) 54 $('body').click(function () { 55 $('.oc-slect-wrapper .oc-slect-ul').slideUp() 56 // æ¢å¤ç®å¤´ 57 $('.icon-arrow-down').css('transform', 'rotate(0deg)') 58 }) 59})()
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.