app-service.js 1.8 MB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221622172218221922202221222222232224222522262227222822292230223122322233223422352236223722382239224022412242224322442245224622472248224922502251225222532254225522562257225822592260226122622263226422652266226722682269227022712272227322742275227622772278227922802281228222832284228522862287228822892290229122922293229422952296229722982299230023012302230323042305230623072308230923102311231223132314231523162317231823192320232123222323232423252326232723282329233023312332233323342335233623372338233923402341234223432344234523462347234823492350235123522353235423552356235723582359236023612362236323642365236623672368236923702371237223732374237523762377237823792380238123822383238423852386238723882389239023912392239323942395239623972398239924002401240224032404240524062407240824092410241124122413241424152416241724182419242024212422242324242425242624272428242924302431243224332434243524362437243824392440244124422443244424452446244724482449245024512452245324542455245624572458245924602461246224632464246524662467246824692470247124722473247424752476247724782479248024812482248324842485248624872488248924902491249224932494249524962497249824992500250125022503250425052506250725082509251025112512251325142515251625172518251925202521252225232524252525262527252825292530253125322533253425352536253725382539254025412542254325442545254625472548254925502551255225532554255525562557255825592560256125622563256425652566256725682569257025712572257325742575257625772578257925802581258225832584258525862587258825892590259125922593259425952596259725982599260026012602260326042605260626072608260926102611261226132614261526162617261826192620262126222623262426252626262726282629263026312632263326342635263626372638263926402641264226432644264526462647264826492650265126522653265426552656265726582659266026612662266326642665266626672668266926702671267226732674267526762677267826792680268126822683268426852686268726882689269026912692269326942695269626972698269927002701270227032704270527062707270827092710271127122713271427152716271727182719272027212722272327242725272627272728272927302731273227332734273527362737273827392740274127422743274427452746274727482749275027512752275327542755275627572758275927602761276227632764276527662767276827692770277127722773277427752776277727782779278027812782278327842785278627872788278927902791279227932794279527962797279827992800280128022803280428052806280728082809281028112812281328142815281628172818281928202821282228232824282528262827282828292830283128322833283428352836283728382839284028412842284328442845284628472848284928502851285228532854285528562857285828592860286128622863286428652866286728682869287028712872287328742875287628772878287928802881288228832884288528862887288828892890289128922893289428952896289728982899290029012902290329042905290629072908290929102911291229132914291529162917291829192920292129222923292429252926292729282929293029312932293329342935293629372938293929402941294229432944294529462947294829492950295129522953295429552956295729582959296029612962296329642965296629672968296929702971297229732974297529762977297829792980298129822983298429852986298729882989299029912992299329942995299629972998299930003001300230033004300530063007300830093010301130123013301430153016301730183019302030213022302330243025302630273028302930303031303230333034303530363037303830393040304130423043304430453046304730483049305030513052305330543055305630573058305930603061306230633064306530663067306830693070307130723073307430753076307730783079308030813082308330843085308630873088308930903091309230933094309530963097309830993100310131023103310431053106310731083109311031113112311331143115311631173118311931203121312231233124312531263127312831293130313131323133313431353136313731383139314031413142314331443145314631473148314931503151315231533154315531563157315831593160316131623163316431653166316731683169317031713172317331743175317631773178317931803181318231833184318531863187318831893190319131923193319431953196319731983199320032013202320332043205320632073208320932103211321232133214321532163217321832193220322132223223322432253226322732283229323032313232323332343235323632373238323932403241324232433244324532463247324832493250325132523253325432553256325732583259326032613262326332643265326632673268326932703271327232733274327532763277327832793280328132823283328432853286328732883289329032913292329332943295329632973298329933003301330233033304330533063307330833093310331133123313331433153316331733183319332033213322332333243325332633273328332933303331333233333334333533363337333833393340334133423343334433453346334733483349335033513352335333543355335633573358335933603361336233633364336533663367336833693370337133723373337433753376337733783379338033813382338333843385338633873388338933903391339233933394339533963397339833993400340134023403340434053406340734083409341034113412341334143415341634173418341934203421342234233424342534263427342834293430343134323433343434353436343734383439344034413442344334443445344634473448344934503451345234533454345534563457345834593460346134623463346434653466346734683469347034713472347334743475347634773478347934803481348234833484348534863487348834893490349134923493349434953496349734983499350035013502350335043505350635073508350935103511351235133514351535163517351835193520352135223523352435253526352735283529353035313532353335343535353635373538353935403541354235433544354535463547354835493550355135523553355435553556355735583559356035613562356335643565356635673568356935703571357235733574357535763577357835793580358135823583358435853586358735883589359035913592359335943595359635973598359936003601360236033604360536063607360836093610361136123613361436153616361736183619362036213622362336243625362636273628362936303631363236333634363536363637363836393640364136423643364436453646364736483649365036513652365336543655365636573658365936603661366236633664366536663667366836693670367136723673367436753676367736783679368036813682368336843685368636873688368936903691369236933694369536963697369836993700370137023703370437053706370737083709371037113712371337143715371637173718371937203721372237233724372537263727372837293730373137323733373437353736373737383739374037413742374337443745374637473748374937503751375237533754375537563757375837593760376137623763376437653766376737683769377037713772377337743775377637773778377937803781378237833784378537863787378837893790379137923793379437953796379737983799380038013802380338043805380638073808380938103811381238133814381538163817381838193820382138223823382438253826382738283829383038313832383338343835383638373838383938403841384238433844384538463847384838493850385138523853385438553856385738583859386038613862386338643865386638673868386938703871387238733874387538763877387838793880388138823883388438853886388738883889389038913892389338943895389638973898389939003901390239033904390539063907390839093910391139123913391439153916391739183919392039213922392339243925392639273928392939303931393239333934393539363937393839393940394139423943394439453946394739483949395039513952395339543955395639573958395939603961396239633964396539663967396839693970397139723973397439753976397739783979398039813982398339843985398639873988398939903991399239933994399539963997399839994000400140024003400440054006400740084009401040114012401340144015401640174018401940204021402240234024402540264027402840294030403140324033403440354036403740384039404040414042404340444045404640474048404940504051405240534054405540564057405840594060406140624063406440654066406740684069407040714072407340744075407640774078407940804081408240834084408540864087408840894090409140924093409440954096409740984099410041014102410341044105410641074108410941104111411241134114411541164117411841194120412141224123412441254126412741284129413041314132413341344135413641374138413941404141414241434144414541464147414841494150415141524153415441554156415741584159416041614162416341644165416641674168416941704171417241734174417541764177417841794180418141824183418441854186418741884189419041914192419341944195419641974198419942004201420242034204420542064207420842094210421142124213421442154216421742184219422042214222422342244225422642274228422942304231423242334234423542364237423842394240424142424243424442454246424742484249425042514252425342544255425642574258425942604261426242634264426542664267426842694270427142724273427442754276427742784279428042814282428342844285428642874288428942904291429242934294429542964297429842994300430143024303430443054306430743084309431043114312431343144315431643174318431943204321432243234324432543264327432843294330433143324333433443354336433743384339434043414342434343444345434643474348434943504351435243534354435543564357435843594360436143624363436443654366436743684369437043714372437343744375437643774378437943804381438243834384438543864387438843894390439143924393439443954396439743984399440044014402440344044405440644074408440944104411441244134414441544164417441844194420442144224423442444254426442744284429443044314432443344344435443644374438443944404441444244434444444544464447444844494450445144524453445444554456445744584459446044614462446344644465446644674468446944704471447244734474447544764477447844794480448144824483448444854486448744884489449044914492449344944495449644974498449945004501450245034504450545064507450845094510451145124513451445154516451745184519452045214522452345244525452645274528452945304531453245334534453545364537453845394540454145424543454445454546454745484549455045514552455345544555455645574558455945604561456245634564456545664567456845694570457145724573457445754576457745784579458045814582458345844585458645874588458945904591459245934594459545964597459845994600460146024603460446054606460746084609461046114612461346144615461646174618461946204621462246234624462546264627462846294630463146324633463446354636463746384639464046414642464346444645464646474648464946504651465246534654465546564657465846594660466146624663466446654666466746684669467046714672467346744675467646774678467946804681468246834684468546864687468846894690469146924693469446954696469746984699470047014702470347044705470647074708470947104711471247134714471547164717471847194720472147224723472447254726472747284729473047314732473347344735473647374738473947404741474247434744474547464747474847494750475147524753475447554756475747584759476047614762476347644765476647674768476947704771477247734774477547764777477847794780478147824783478447854786478747884789479047914792479347944795479647974798479948004801480248034804480548064807480848094810481148124813481448154816481748184819482048214822482348244825482648274828482948304831483248334834483548364837483848394840484148424843484448454846484748484849485048514852485348544855485648574858485948604861486248634864486548664867486848694870487148724873487448754876487748784879488048814882488348844885488648874888488948904891489248934894489548964897489848994900490149024903490449054906490749084909491049114912491349144915491649174918491949204921492249234924492549264927492849294930493149324933493449354936493749384939494049414942494349444945494649474948494949504951495249534954495549564957495849594960496149624963496449654966496749684969497049714972497349744975497649774978497949804981498249834984498549864987498849894990499149924993499449954996499749984999500050015002500350045005500650075008500950105011501250135014501550165017501850195020502150225023502450255026502750285029503050315032503350345035503650375038503950405041504250435044504550465047504850495050505150525053505450555056505750585059506050615062506350645065506650675068506950705071507250735074507550765077507850795080508150825083508450855086508750885089509050915092509350945095509650975098509951005101510251035104510551065107510851095110511151125113511451155116511751185119512051215122512351245125512651275128512951305131513251335134513551365137513851395140514151425143514451455146514751485149515051515152515351545155515651575158515951605161516251635164516551665167516851695170517151725173517451755176517751785179518051815182518351845185518651875188518951905191519251935194519551965197519851995200520152025203520452055206520752085209521052115212521352145215521652175218521952205221522252235224522552265227522852295230523152325233523452355236523752385239524052415242524352445245524652475248524952505251525252535254525552565257525852595260526152625263526452655266526752685269527052715272527352745275527652775278527952805281528252835284528552865287528852895290529152925293529452955296529752985299530053015302530353045305530653075308530953105311531253135314531553165317531853195320532153225323532453255326532753285329533053315332533353345335533653375338533953405341534253435344534553465347534853495350535153525353535453555356535753585359536053615362536353645365536653675368536953705371537253735374537553765377537853795380538153825383538453855386538753885389539053915392539353945395539653975398539954005401540254035404540554065407540854095410541154125413541454155416541754185419542054215422542354245425542654275428542954305431543254335434543554365437543854395440544154425443544454455446544754485449545054515452545354545455545654575458545954605461546254635464546554665467546854695470547154725473547454755476547754785479548054815482548354845485548654875488548954905491549254935494549554965497549854995500550155025503550455055506550755085509551055115512551355145515551655175518551955205521552255235524552555265527552855295530553155325533553455355536553755385539554055415542554355445545554655475548554955505551555255535554555555565557555855595560556155625563556455655566556755685569557055715572557355745575557655775578557955805581558255835584558555865587558855895590559155925593559455955596559755985599560056015602560356045605560656075608560956105611561256135614561556165617561856195620562156225623562456255626562756285629563056315632563356345635563656375638563956405641564256435644564556465647564856495650565156525653565456555656565756585659566056615662566356645665566656675668566956705671567256735674567556765677567856795680568156825683568456855686568756885689569056915692569356945695569656975698569957005701570257035704570557065707570857095710571157125713571457155716571757185719572057215722572357245725572657275728572957305731573257335734573557365737573857395740574157425743574457455746574757485749575057515752575357545755575657575758575957605761576257635764576557665767576857695770577157725773577457755776577757785779578057815782578357845785578657875788578957905791579257935794579557965797579857995800580158025803580458055806580758085809581058115812581358145815581658175818581958205821582258235824582558265827582858295830583158325833583458355836583758385839584058415842584358445845584658475848584958505851585258535854585558565857585858595860586158625863586458655866586758685869587058715872587358745875587658775878587958805881588258835884588558865887588858895890589158925893589458955896589758985899590059015902590359045905590659075908590959105911591259135914591559165917591859195920592159225923592459255926592759285929593059315932593359345935593659375938593959405941594259435944594559465947594859495950595159525953595459555956595759585959596059615962596359645965596659675968596959705971597259735974597559765977597859795980598159825983598459855986598759885989599059915992599359945995599659975998599960006001600260036004600560066007600860096010601160126013601460156016601760186019602060216022602360246025602660276028602960306031603260336034603560366037603860396040604160426043604460456046604760486049605060516052605360546055605660576058605960606061606260636064606560666067606860696070607160726073607460756076607760786079608060816082608360846085608660876088608960906091609260936094609560966097609860996100610161026103610461056106610761086109611061116112611361146115611661176118611961206121612261236124612561266127612861296130613161326133613461356136613761386139614061416142614361446145614661476148614961506151615261536154615561566157615861596160616161626163616461656166616761686169617061716172617361746175617661776178617961806181618261836184618561866187618861896190619161926193619461956196619761986199620062016202620362046205620662076208620962106211621262136214621562166217621862196220622162226223622462256226622762286229623062316232623362346235623662376238623962406241624262436244624562466247624862496250625162526253625462556256625762586259626062616262626362646265626662676268626962706271627262736274627562766277627862796280628162826283628462856286628762886289629062916292629362946295629662976298629963006301630263036304630563066307630863096310631163126313631463156316631763186319632063216322632363246325632663276328632963306331633263336334633563366337633863396340634163426343634463456346634763486349635063516352635363546355635663576358635963606361636263636364636563666367636863696370637163726373637463756376637763786379638063816382638363846385638663876388638963906391639263936394639563966397639863996400640164026403640464056406640764086409641064116412641364146415641664176418641964206421642264236424642564266427642864296430643164326433643464356436643764386439644064416442644364446445644664476448644964506451645264536454645564566457645864596460646164626463646464656466646764686469647064716472647364746475647664776478647964806481648264836484648564866487648864896490649164926493649464956496649764986499650065016502650365046505650665076508650965106511651265136514651565166517651865196520652165226523652465256526652765286529653065316532653365346535653665376538653965406541654265436544654565466547654865496550655165526553655465556556655765586559656065616562656365646565656665676568656965706571657265736574657565766577657865796580658165826583658465856586658765886589659065916592659365946595659665976598659966006601660266036604660566066607660866096610661166126613661466156616661766186619662066216622662366246625662666276628662966306631663266336634663566366637663866396640664166426643664466456646664766486649665066516652665366546655665666576658665966606661666266636664666566666667666866696670667166726673667466756676667766786679668066816682668366846685668666876688668966906691669266936694669566966697669866996700670167026703670467056706670767086709671067116712671367146715671667176718671967206721672267236724672567266727672867296730673167326733673467356736673767386739674067416742674367446745674667476748674967506751675267536754675567566757675867596760676167626763676467656766676767686769677067716772677367746775677667776778677967806781678267836784678567866787678867896790679167926793679467956796679767986799680068016802680368046805680668076808680968106811681268136814681568166817681868196820682168226823682468256826682768286829683068316832683368346835683668376838683968406841684268436844684568466847684868496850685168526853685468556856685768586859686068616862686368646865686668676868686968706871687268736874687568766877687868796880688168826883688468856886688768886889689068916892689368946895689668976898689969006901690269036904690569066907690869096910691169126913691469156916691769186919692069216922692369246925692669276928692969306931693269336934693569366937693869396940694169426943694469456946694769486949695069516952695369546955695669576958695969606961696269636964696569666967696869696970697169726973697469756976697769786979698069816982698369846985698669876988698969906991699269936994699569966997699869997000700170027003700470057006700770087009701070117012701370147015701670177018701970207021702270237024702570267027702870297030703170327033703470357036703770387039704070417042704370447045704670477048704970507051705270537054705570567057705870597060706170627063706470657066706770687069707070717072707370747075707670777078707970807081708270837084708570867087708870897090709170927093709470957096709770987099710071017102710371047105710671077108710971107111711271137114711571167117711871197120712171227123712471257126712771287129713071317132713371347135713671377138713971407141714271437144714571467147714871497150715171527153715471557156715771587159716071617162716371647165716671677168716971707171717271737174717571767177717871797180718171827183718471857186718771887189719071917192719371947195719671977198719972007201720272037204720572067207720872097210721172127213721472157216721772187219722072217222722372247225722672277228722972307231723272337234723572367237723872397240724172427243724472457246724772487249725072517252725372547255725672577258725972607261726272637264726572667267726872697270727172727273727472757276727772787279728072817282728372847285728672877288728972907291729272937294729572967297729872997300730173027303730473057306730773087309731073117312731373147315731673177318731973207321732273237324732573267327732873297330733173327333733473357336733773387339734073417342734373447345734673477348734973507351735273537354735573567357735873597360736173627363736473657366736773687369737073717372737373747375737673777378737973807381738273837384738573867387738873897390739173927393739473957396739773987399740074017402740374047405740674077408740974107411741274137414741574167417741874197420742174227423742474257426742774287429743074317432743374347435743674377438743974407441744274437444744574467447744874497450745174527453745474557456745774587459746074617462746374647465746674677468746974707471747274737474747574767477747874797480748174827483748474857486748774887489749074917492749374947495749674977498749975007501750275037504750575067507750875097510751175127513751475157516751775187519752075217522752375247525752675277528752975307531753275337534753575367537753875397540754175427543754475457546754775487549755075517552755375547555755675577558755975607561756275637564756575667567756875697570757175727573757475757576757775787579758075817582758375847585758675877588758975907591759275937594759575967597759875997600760176027603760476057606760776087609761076117612761376147615761676177618761976207621762276237624762576267627762876297630763176327633763476357636763776387639764076417642764376447645764676477648764976507651765276537654765576567657765876597660766176627663766476657666766776687669767076717672767376747675767676777678767976807681768276837684768576867687768876897690769176927693769476957696769776987699770077017702770377047705770677077708770977107711771277137714771577167717771877197720772177227723772477257726772777287729773077317732773377347735773677377738773977407741774277437744774577467747774877497750775177527753775477557756775777587759776077617762776377647765776677677768776977707771777277737774777577767777777877797780778177827783778477857786778777887789779077917792779377947795779677977798779978007801780278037804780578067807780878097810781178127813781478157816781778187819782078217822782378247825782678277828782978307831783278337834783578367837783878397840784178427843784478457846784778487849785078517852785378547855785678577858785978607861786278637864786578667867786878697870787178727873787478757876787778787879788078817882788378847885788678877888788978907891789278937894789578967897789878997900790179027903790479057906790779087909791079117912791379147915791679177918791979207921792279237924792579267927792879297930793179327933793479357936793779387939794079417942794379447945794679477948794979507951795279537954795579567957795879597960796179627963796479657966796779687969797079717972797379747975797679777978797979807981798279837984798579867987798879897990799179927993799479957996799779987999800080018002800380048005800680078008800980108011801280138014801580168017801880198020802180228023802480258026802780288029803080318032803380348035803680378038803980408041804280438044804580468047804880498050805180528053805480558056805780588059806080618062806380648065806680678068806980708071807280738074807580768077807880798080808180828083808480858086808780888089809080918092809380948095809680978098809981008101810281038104810581068107810881098110811181128113811481158116811781188119812081218122812381248125812681278128812981308131813281338134813581368137813881398140814181428143814481458146814781488149815081518152815381548155815681578158815981608161816281638164816581668167816881698170817181728173817481758176817781788179818081818182818381848185818681878188818981908191819281938194819581968197819881998200820182028203820482058206820782088209821082118212821382148215821682178218821982208221822282238224822582268227822882298230823182328233823482358236823782388239824082418242824382448245824682478248824982508251825282538254825582568257825882598260826182628263826482658266826782688269827082718272827382748275827682778278827982808281828282838284828582868287828882898290829182928293829482958296829782988299830083018302830383048305830683078308830983108311831283138314831583168317831883198320832183228323832483258326832783288329833083318332833383348335833683378338833983408341834283438344834583468347834883498350835183528353835483558356835783588359836083618362836383648365836683678368836983708371837283738374837583768377837883798380838183828383838483858386838783888389839083918392839383948395839683978398839984008401840284038404840584068407840884098410841184128413841484158416841784188419842084218422842384248425842684278428842984308431843284338434843584368437843884398440844184428443844484458446844784488449845084518452845384548455845684578458845984608461846284638464846584668467846884698470847184728473847484758476847784788479848084818482848384848485848684878488848984908491849284938494849584968497849884998500850185028503850485058506850785088509851085118512851385148515851685178518851985208521852285238524852585268527852885298530853185328533853485358536853785388539854085418542854385448545854685478548854985508551855285538554855585568557855885598560856185628563856485658566856785688569857085718572857385748575857685778578857985808581858285838584858585868587858885898590859185928593859485958596859785988599860086018602860386048605860686078608860986108611861286138614861586168617861886198620862186228623862486258626862786288629863086318632863386348635863686378638863986408641864286438644864586468647864886498650865186528653865486558656865786588659866086618662866386648665866686678668866986708671867286738674867586768677867886798680868186828683868486858686868786888689869086918692869386948695869686978698869987008701870287038704870587068707870887098710871187128713871487158716871787188719872087218722872387248725872687278728872987308731873287338734873587368737873887398740874187428743874487458746874787488749875087518752875387548755875687578758875987608761876287638764876587668767876887698770877187728773877487758776877787788779878087818782878387848785878687878788878987908791879287938794879587968797879887998800880188028803880488058806880788088809881088118812881388148815881688178818881988208821882288238824882588268827882888298830883188328833883488358836883788388839884088418842884388448845884688478848884988508851885288538854885588568857885888598860886188628863886488658866886788688869887088718872887388748875887688778878887988808881888288838884888588868887888888898890889188928893889488958896889788988899890089018902890389048905890689078908890989108911891289138914891589168917891889198920892189228923892489258926892789288929893089318932893389348935893689378938893989408941894289438944894589468947894889498950895189528953895489558956895789588959896089618962896389648965896689678968896989708971897289738974897589768977897889798980898189828983898489858986898789888989899089918992899389948995899689978998899990009001900290039004900590069007900890099010901190129013901490159016901790189019902090219022902390249025902690279028902990309031903290339034903590369037903890399040904190429043904490459046904790489049905090519052905390549055905690579058905990609061906290639064906590669067906890699070907190729073907490759076907790789079908090819082908390849085908690879088908990909091909290939094909590969097909890999100910191029103910491059106910791089109911091119112911391149115911691179118911991209121912291239124912591269127912891299130913191329133913491359136913791389139914091419142914391449145914691479148914991509151915291539154915591569157915891599160916191629163916491659166916791689169917091719172917391749175917691779178917991809181918291839184918591869187918891899190919191929193919491959196919791989199920092019202920392049205920692079208920992109211921292139214921592169217921892199220922192229223922492259226922792289229923092319232923392349235923692379238923992409241924292439244924592469247924892499250925192529253925492559256925792589259926092619262926392649265926692679268926992709271927292739274927592769277927892799280928192829283928492859286928792889289929092919292929392949295929692979298929993009301930293039304930593069307930893099310931193129313931493159316931793189319932093219322932393249325932693279328932993309331933293339334933593369337933893399340934193429343934493459346934793489349935093519352935393549355935693579358935993609361936293639364936593669367936893699370937193729373937493759376937793789379938093819382938393849385938693879388938993909391939293939394939593969397939893999400940194029403940494059406940794089409941094119412941394149415941694179418941994209421942294239424942594269427942894299430943194329433943494359436943794389439944094419442944394449445944694479448944994509451945294539454945594569457945894599460946194629463946494659466946794689469947094719472947394749475947694779478947994809481948294839484948594869487948894899490949194929493949494959496949794989499950095019502950395049505950695079508950995109511951295139514951595169517951895199520952195229523952495259526952795289529953095319532953395349535953695379538953995409541954295439544954595469547954895499550955195529553955495559556955795589559956095619562956395649565956695679568956995709571957295739574957595769577957895799580958195829583958495859586958795889589959095919592959395949595959695979598959996009601960296039604960596069607960896099610961196129613961496159616961796189619962096219622962396249625962696279628962996309631963296339634963596369637963896399640964196429643964496459646964796489649965096519652965396549655965696579658965996609661966296639664966596669667966896699670967196729673967496759676967796789679968096819682968396849685968696879688968996909691969296939694969596969697969896999700970197029703970497059706970797089709971097119712971397149715971697179718971997209721972297239724972597269727972897299730973197329733973497359736973797389739974097419742974397449745974697479748974997509751975297539754975597569757975897599760976197629763976497659766976797689769977097719772977397749775977697779778977997809781978297839784978597869787978897899790979197929793979497959796979797989799980098019802980398049805980698079808980998109811981298139814981598169817981898199820982198229823982498259826982798289829983098319832983398349835983698379838983998409841984298439844984598469847984898499850985198529853985498559856985798589859986098619862986398649865986698679868986998709871987298739874987598769877987898799880988198829883988498859886988798889889989098919892989398949895989698979898989999009901990299039904990599069907990899099910991199129913991499159916991799189919992099219922992399249925992699279928992999309931993299339934993599369937993899399940994199429943994499459946994799489949995099519952995399549955995699579958995999609961996299639964996599669967996899699970997199729973997499759976997799789979998099819982998399849985998699879988998999909991999299939994999599969997999899991000010001100021000310004100051000610007100081000910010100111001210013100141001510016100171001810019100201002110022100231002410025100261002710028100291003010031100321003310034100351003610037100381003910040100411004210043100441004510046100471004810049100501005110052100531005410055100561005710058100591006010061100621006310064100651006610067100681006910070100711007210073100741007510076100771007810079100801008110082100831008410085100861008710088100891009010091100921009310094100951009610097100981009910100101011010210103101041010510106101071010810109101101011110112101131011410115101161011710118101191012010121101221012310124101251012610127101281012910130101311013210133101341013510136101371013810139101401014110142101431014410145101461014710148101491015010151101521015310154101551015610157101581015910160101611016210163101641016510166101671016810169101701017110172101731017410175101761017710178101791018010181101821018310184101851018610187101881018910190101911019210193101941019510196101971019810199102001020110202102031020410205102061020710208102091021010211102121021310214102151021610217102181021910220102211022210223102241022510226102271022810229102301023110232102331023410235102361023710238102391024010241102421024310244102451024610247102481024910250102511025210253102541025510256102571025810259102601026110262102631026410265102661026710268102691027010271102721027310274102751027610277102781027910280102811028210283102841028510286102871028810289102901029110292102931029410295102961029710298102991030010301103021030310304103051030610307103081030910310103111031210313103141031510316103171031810319103201032110322103231032410325103261032710328103291033010331103321033310334103351033610337103381033910340103411034210343103441034510346103471034810349103501035110352103531035410355103561035710358103591036010361103621036310364103651036610367103681036910370103711037210373103741037510376103771037810379103801038110382103831038410385103861038710388103891039010391103921039310394103951039610397103981039910400104011040210403104041040510406104071040810409104101041110412104131041410415104161041710418104191042010421104221042310424104251042610427104281042910430104311043210433104341043510436104371043810439104401044110442104431044410445104461044710448104491045010451104521045310454104551045610457104581045910460104611046210463104641046510466104671046810469104701047110472104731047410475104761047710478104791048010481104821048310484104851048610487104881048910490104911049210493104941049510496104971049810499105001050110502105031050410505105061050710508105091051010511105121051310514105151051610517105181051910520105211052210523105241052510526105271052810529105301053110532105331053410535105361053710538105391054010541105421054310544105451054610547105481054910550105511055210553105541055510556105571055810559105601056110562105631056410565105661056710568105691057010571105721057310574105751057610577105781057910580105811058210583105841058510586105871058810589105901059110592105931059410595105961059710598105991060010601106021060310604106051060610607106081060910610106111061210613106141061510616106171061810619106201062110622106231062410625106261062710628106291063010631106321063310634106351063610637106381063910640106411064210643106441064510646106471064810649106501065110652106531065410655106561065710658106591066010661106621066310664106651066610667106681066910670106711067210673106741067510676106771067810679106801068110682106831068410685106861068710688106891069010691106921069310694106951069610697106981069910700107011070210703107041070510706107071070810709107101071110712107131071410715107161071710718107191072010721107221072310724107251072610727107281072910730107311073210733107341073510736107371073810739107401074110742107431074410745107461074710748107491075010751107521075310754107551075610757107581075910760107611076210763107641076510766107671076810769107701077110772107731077410775107761077710778107791078010781107821078310784107851078610787107881078910790107911079210793107941079510796107971079810799108001080110802108031080410805108061080710808108091081010811108121081310814108151081610817108181081910820108211082210823108241082510826108271082810829108301083110832108331083410835108361083710838108391084010841108421084310844108451084610847108481084910850108511085210853108541085510856108571085810859108601086110862108631086410865108661086710868108691087010871108721087310874108751087610877108781087910880108811088210883108841088510886108871088810889108901089110892108931089410895108961089710898108991090010901109021090310904109051090610907109081090910910109111091210913109141091510916109171091810919109201092110922109231092410925109261092710928109291093010931109321093310934109351093610937109381093910940109411094210943109441094510946109471094810949109501095110952109531095410955109561095710958109591096010961109621096310964109651096610967109681096910970109711097210973109741097510976109771097810979109801098110982109831098410985109861098710988109891099010991109921099310994109951099610997109981099911000110011100211003110041100511006110071100811009110101101111012110131101411015110161101711018110191102011021110221102311024110251102611027110281102911030110311103211033110341103511036110371103811039110401104111042110431104411045110461104711048110491105011051110521105311054110551105611057110581105911060110611106211063110641106511066110671106811069110701107111072110731107411075110761107711078110791108011081110821108311084110851108611087110881108911090110911109211093110941109511096110971109811099111001110111102111031110411105111061110711108111091111011111111121111311114111151111611117111181111911120111211112211123111241112511126111271112811129111301113111132111331113411135111361113711138111391114011141111421114311144111451114611147111481114911150111511115211153111541115511156111571115811159111601116111162111631116411165111661116711168111691117011171111721117311174111751117611177111781117911180111811118211183111841118511186111871118811189111901119111192111931119411195111961119711198111991120011201112021120311204112051120611207112081120911210112111121211213112141121511216112171121811219112201122111222112231122411225112261122711228112291123011231112321123311234112351123611237112381123911240112411124211243112441124511246112471124811249112501125111252112531125411255112561125711258112591126011261112621126311264112651126611267112681126911270112711127211273112741127511276112771127811279112801128111282112831128411285112861128711288112891129011291112921129311294112951129611297112981129911300113011130211303113041130511306113071130811309113101131111312113131131411315113161131711318113191132011321113221132311324113251132611327113281132911330113311133211333113341133511336113371133811339113401134111342113431134411345113461134711348113491135011351113521135311354113551135611357113581135911360113611136211363113641136511366113671136811369113701137111372113731137411375113761137711378113791138011381113821138311384113851138611387113881138911390113911139211393113941139511396113971139811399114001140111402114031140411405114061140711408114091141011411114121141311414114151141611417114181141911420114211142211423114241142511426114271142811429114301143111432114331143411435114361143711438114391144011441114421144311444114451144611447114481144911450114511145211453114541145511456114571145811459114601146111462114631146411465114661146711468114691147011471114721147311474114751147611477114781147911480114811148211483114841148511486114871148811489114901149111492114931149411495114961149711498114991150011501115021150311504115051150611507115081150911510115111151211513115141151511516115171151811519115201152111522115231152411525115261152711528115291153011531115321153311534115351153611537115381153911540115411154211543115441154511546115471154811549115501155111552115531155411555115561155711558115591156011561115621156311564115651156611567115681156911570115711157211573115741157511576115771157811579115801158111582115831158411585115861158711588115891159011591115921159311594115951159611597115981159911600116011160211603116041160511606116071160811609116101161111612116131161411615116161161711618116191162011621116221162311624116251162611627116281162911630116311163211633116341163511636116371163811639116401164111642116431164411645116461164711648116491165011651116521165311654116551165611657116581165911660116611166211663116641166511666116671166811669116701167111672116731167411675116761167711678116791168011681116821168311684116851168611687116881168911690116911169211693116941169511696116971169811699117001170111702117031170411705117061170711708117091171011711117121171311714117151171611717117181171911720117211172211723117241172511726117271172811729117301173111732117331173411735117361173711738117391174011741117421174311744117451174611747117481174911750117511175211753117541175511756117571175811759117601176111762117631176411765117661176711768117691177011771117721177311774117751177611777117781177911780117811178211783117841178511786117871178811789117901179111792117931179411795117961179711798117991180011801118021180311804118051180611807118081180911810118111181211813118141181511816118171181811819118201182111822118231182411825118261182711828118291183011831118321183311834118351183611837118381183911840118411184211843118441184511846118471184811849118501185111852118531185411855118561185711858118591186011861118621186311864118651186611867118681186911870118711187211873118741187511876118771187811879118801188111882118831188411885118861188711888118891189011891118921189311894118951189611897118981189911900119011190211903119041190511906119071190811909119101191111912119131191411915119161191711918119191192011921119221192311924119251192611927119281192911930119311193211933119341193511936119371193811939119401194111942119431194411945119461194711948119491195011951119521195311954119551195611957119581195911960119611196211963119641196511966119671196811969119701197111972119731197411975119761197711978119791198011981119821198311984119851198611987119881198911990119911199211993119941199511996119971199811999120001200112002120031200412005120061200712008120091201012011120121201312014120151201612017120181201912020120211202212023120241202512026120271202812029120301203112032120331203412035120361203712038120391204012041120421204312044120451204612047120481204912050120511205212053120541205512056120571205812059120601206112062120631206412065120661206712068120691207012071120721207312074120751207612077120781207912080120811208212083120841208512086120871208812089120901209112092120931209412095120961209712098120991210012101121021210312104121051210612107121081210912110121111211212113121141211512116121171211812119121201212112122121231212412125121261212712128121291213012131121321213312134121351213612137121381213912140121411214212143121441214512146121471214812149121501215112152121531215412155121561215712158121591216012161121621216312164121651216612167121681216912170121711217212173121741217512176121771217812179121801218112182121831218412185121861218712188121891219012191121921219312194121951219612197121981219912200122011220212203122041220512206122071220812209122101221112212122131221412215122161221712218122191222012221122221222312224122251222612227122281222912230122311223212233122341223512236122371223812239122401224112242122431224412245122461224712248122491225012251122521225312254122551225612257122581225912260122611226212263122641226512266122671226812269122701227112272122731227412275122761227712278122791228012281122821228312284122851228612287122881228912290122911229212293122941229512296122971229812299123001230112302123031230412305123061230712308123091231012311123121231312314123151231612317123181231912320123211232212323123241232512326123271232812329123301233112332123331233412335123361233712338123391234012341123421234312344123451234612347123481234912350123511235212353123541235512356123571235812359123601236112362123631236412365123661236712368123691237012371123721237312374123751237612377123781237912380123811238212383123841238512386123871238812389123901239112392123931239412395123961239712398123991240012401124021240312404124051240612407124081240912410124111241212413124141241512416124171241812419124201242112422124231242412425124261242712428124291243012431124321243312434124351243612437124381243912440124411244212443124441244512446124471244812449124501245112452124531245412455124561245712458124591246012461124621246312464124651246612467124681246912470124711247212473124741247512476124771247812479124801248112482124831248412485124861248712488124891249012491124921249312494124951249612497124981249912500125011250212503125041250512506125071250812509125101251112512125131251412515125161251712518125191252012521125221252312524125251252612527125281252912530125311253212533125341253512536125371253812539125401254112542125431254412545125461254712548125491255012551125521255312554125551255612557125581255912560125611256212563125641256512566125671256812569125701257112572125731257412575125761257712578125791258012581125821258312584125851258612587125881258912590125911259212593125941259512596125971259812599126001260112602126031260412605126061260712608126091261012611126121261312614126151261612617126181261912620126211262212623126241262512626126271262812629126301263112632126331263412635126361263712638126391264012641126421264312644126451264612647126481264912650126511265212653126541265512656126571265812659126601266112662126631266412665126661266712668126691267012671126721267312674126751267612677126781267912680126811268212683126841268512686126871268812689126901269112692126931269412695126961269712698126991270012701127021270312704127051270612707127081270912710127111271212713127141271512716127171271812719127201272112722127231272412725127261272712728127291273012731127321273312734127351273612737127381273912740127411274212743127441274512746127471274812749127501275112752127531275412755127561275712758127591276012761127621276312764127651276612767127681276912770127711277212773127741277512776127771277812779127801278112782127831278412785127861278712788127891279012791127921279312794127951279612797127981279912800128011280212803128041280512806128071280812809128101281112812128131281412815128161281712818128191282012821128221282312824128251282612827128281282912830128311283212833128341283512836128371283812839128401284112842128431284412845128461284712848128491285012851128521285312854128551285612857128581285912860128611286212863128641286512866128671286812869128701287112872128731287412875128761287712878128791288012881128821288312884128851288612887128881288912890128911289212893128941289512896128971289812899129001290112902129031290412905129061290712908129091291012911129121291312914129151291612917129181291912920129211292212923129241292512926129271292812929129301293112932129331293412935129361293712938129391294012941129421294312944129451294612947129481294912950129511295212953129541295512956129571295812959129601296112962129631296412965129661296712968129691297012971129721297312974129751297612977129781297912980129811298212983129841298512986129871298812989129901299112992129931299412995129961299712998129991300013001130021300313004130051300613007130081300913010130111301213013130141301513016130171301813019130201302113022130231302413025130261302713028130291303013031130321303313034130351303613037130381303913040130411304213043130441304513046130471304813049130501305113052130531305413055130561305713058130591306013061130621306313064130651306613067130681306913070130711307213073130741307513076130771307813079130801308113082130831308413085130861308713088130891309013091130921309313094130951309613097130981309913100131011310213103131041310513106131071310813109131101311113112131131311413115131161311713118131191312013121131221312313124131251312613127131281312913130131311313213133131341313513136131371313813139131401314113142131431314413145131461314713148131491315013151131521315313154131551315613157131581315913160131611316213163131641316513166131671316813169131701317113172131731317413175131761317713178131791318013181131821318313184131851318613187131881318913190131911319213193131941319513196131971319813199132001320113202132031320413205132061320713208132091321013211132121321313214132151321613217132181321913220132211322213223132241322513226132271322813229132301323113232132331323413235132361323713238132391324013241132421324313244132451324613247132481324913250132511325213253132541325513256132571325813259132601326113262132631326413265132661326713268132691327013271132721327313274132751327613277132781327913280132811328213283132841328513286132871328813289132901329113292132931329413295132961329713298132991330013301133021330313304133051330613307133081330913310133111331213313133141331513316133171331813319133201332113322133231332413325133261332713328133291333013331133321333313334133351333613337133381333913340133411334213343133441334513346133471334813349133501335113352133531335413355133561335713358133591336013361133621336313364133651336613367133681336913370133711337213373133741337513376133771337813379133801338113382133831338413385133861338713388133891339013391133921339313394133951339613397133981339913400134011340213403134041340513406134071340813409134101341113412134131341413415134161341713418134191342013421134221342313424134251342613427134281342913430134311343213433134341343513436134371343813439134401344113442134431344413445134461344713448134491345013451134521345313454134551345613457134581345913460134611346213463134641346513466134671346813469134701347113472134731347413475134761347713478134791348013481134821348313484134851348613487134881348913490134911349213493134941349513496134971349813499135001350113502135031350413505135061350713508135091351013511135121351313514135151351613517135181351913520135211352213523135241352513526135271352813529135301353113532135331353413535135361353713538135391354013541135421354313544135451354613547135481354913550135511355213553135541355513556135571355813559135601356113562135631356413565135661356713568135691357013571135721357313574135751357613577135781357913580135811358213583135841358513586135871358813589135901359113592135931359413595135961359713598135991360013601136021360313604136051360613607136081360913610136111361213613136141361513616136171361813619136201362113622136231362413625136261362713628136291363013631136321363313634136351363613637136381363913640136411364213643136441364513646136471364813649136501365113652136531365413655136561365713658136591366013661136621366313664136651366613667136681366913670136711367213673136741367513676136771367813679136801368113682136831368413685136861368713688136891369013691136921369313694136951369613697136981369913700137011370213703137041370513706137071370813709137101371113712137131371413715137161371713718137191372013721137221372313724137251372613727137281372913730137311373213733137341373513736137371373813739137401374113742137431374413745137461374713748137491375013751137521375313754137551375613757137581375913760137611376213763137641376513766137671376813769137701377113772137731377413775137761377713778137791378013781137821378313784137851378613787137881378913790137911379213793137941379513796137971379813799138001380113802138031380413805138061380713808138091381013811138121381313814138151381613817138181381913820138211382213823138241382513826138271382813829138301383113832138331383413835138361383713838138391384013841138421384313844138451384613847138481384913850138511385213853138541385513856138571385813859138601386113862138631386413865138661386713868138691387013871138721387313874138751387613877138781387913880138811388213883138841388513886138871388813889138901389113892138931389413895138961389713898138991390013901139021390313904139051390613907139081390913910139111391213913139141391513916139171391813919139201392113922139231392413925139261392713928139291393013931139321393313934139351393613937139381393913940139411394213943139441394513946139471394813949139501395113952139531395413955139561395713958139591396013961139621396313964139651396613967139681396913970139711397213973139741397513976139771397813979139801398113982139831398413985139861398713988139891399013991139921399313994139951399613997139981399914000140011400214003140041400514006140071400814009140101401114012140131401414015140161401714018140191402014021140221402314024140251402614027140281402914030140311403214033140341403514036140371403814039140401404114042140431404414045140461404714048140491405014051140521405314054140551405614057140581405914060140611406214063140641406514066140671406814069140701407114072140731407414075140761407714078140791408014081140821408314084140851408614087140881408914090140911409214093140941409514096140971409814099141001410114102141031410414105141061410714108141091411014111141121411314114141151411614117141181411914120141211412214123141241412514126141271412814129141301413114132141331413414135141361413714138141391414014141141421414314144141451414614147141481414914150141511415214153141541415514156141571415814159141601416114162141631416414165141661416714168141691417014171141721417314174141751417614177141781417914180141811418214183141841418514186141871418814189141901419114192141931419414195141961419714198141991420014201142021420314204142051420614207142081420914210142111421214213142141421514216142171421814219142201422114222142231422414225142261422714228142291423014231142321423314234142351423614237142381423914240142411424214243142441424514246142471424814249142501425114252142531425414255142561425714258142591426014261142621426314264142651426614267142681426914270142711427214273142741427514276142771427814279142801428114282142831428414285142861428714288142891429014291142921429314294142951429614297142981429914300143011430214303143041430514306143071430814309143101431114312143131431414315143161431714318143191432014321143221432314324143251432614327143281432914330143311433214333143341433514336143371433814339143401434114342143431434414345143461434714348143491435014351143521435314354143551435614357143581435914360143611436214363143641436514366143671436814369143701437114372143731437414375143761437714378143791438014381143821438314384143851438614387143881438914390143911439214393143941439514396143971439814399144001440114402144031440414405144061440714408144091441014411144121441314414144151441614417144181441914420144211442214423144241442514426144271442814429144301443114432144331443414435144361443714438144391444014441144421444314444144451444614447144481444914450144511445214453144541445514456144571445814459144601446114462144631446414465144661446714468144691447014471144721447314474144751447614477144781447914480144811448214483144841448514486144871448814489144901449114492144931449414495144961449714498144991450014501145021450314504145051450614507145081450914510145111451214513145141451514516145171451814519145201452114522145231452414525145261452714528145291453014531145321453314534145351453614537145381453914540145411454214543145441454514546145471454814549145501455114552145531455414555145561455714558145591456014561145621456314564145651456614567145681456914570145711457214573145741457514576145771457814579145801458114582145831458414585145861458714588145891459014591145921459314594145951459614597145981459914600146011460214603146041460514606146071460814609146101461114612146131461414615146161461714618146191462014621146221462314624146251462614627146281462914630146311463214633146341463514636146371463814639146401464114642146431464414645146461464714648146491465014651146521465314654146551465614657146581465914660146611466214663146641466514666146671466814669146701467114672146731467414675146761467714678146791468014681146821468314684146851468614687146881468914690146911469214693146941469514696146971469814699147001470114702147031470414705147061470714708147091471014711147121471314714147151471614717147181471914720147211472214723147241472514726147271472814729147301473114732147331473414735147361473714738147391474014741147421474314744147451474614747147481474914750147511475214753147541475514756147571475814759147601476114762147631476414765147661476714768147691477014771147721477314774147751477614777147781477914780147811478214783147841478514786147871478814789147901479114792147931479414795147961479714798147991480014801148021480314804148051480614807148081480914810148111481214813148141481514816148171481814819148201482114822148231482414825148261482714828148291483014831148321483314834148351483614837148381483914840148411484214843148441484514846148471484814849148501485114852148531485414855148561485714858148591486014861148621486314864148651486614867148681486914870148711487214873148741487514876148771487814879148801488114882148831488414885148861488714888148891489014891148921489314894148951489614897148981489914900149011490214903149041490514906149071490814909149101491114912149131491414915149161491714918149191492014921149221492314924149251492614927149281492914930149311493214933149341493514936149371493814939149401494114942149431494414945149461494714948149491495014951149521495314954149551495614957149581495914960149611496214963149641496514966149671496814969149701497114972149731497414975149761497714978149791498014981149821498314984149851498614987149881498914990149911499214993149941499514996149971499814999150001500115002150031500415005150061500715008150091501015011150121501315014150151501615017150181501915020150211502215023150241502515026150271502815029150301503115032150331503415035150361503715038150391504015041150421504315044150451504615047150481504915050150511505215053150541505515056150571505815059150601506115062150631506415065150661506715068150691507015071150721507315074150751507615077150781507915080150811508215083150841508515086150871508815089150901509115092150931509415095150961509715098150991510015101151021510315104151051510615107151081510915110151111511215113151141511515116151171511815119151201512115122151231512415125151261512715128151291513015131151321513315134151351513615137151381513915140151411514215143151441514515146151471514815149151501515115152151531515415155151561515715158151591516015161151621516315164151651516615167151681516915170151711517215173151741517515176151771517815179151801518115182151831518415185151861518715188151891519015191151921519315194151951519615197151981519915200152011520215203152041520515206152071520815209152101521115212152131521415215152161521715218152191522015221152221522315224152251522615227152281522915230152311523215233152341523515236152371523815239152401524115242152431524415245152461524715248152491525015251152521525315254152551525615257152581525915260152611526215263152641526515266152671526815269152701527115272152731527415275152761527715278152791528015281152821528315284152851528615287152881528915290152911529215293152941529515296152971529815299153001530115302153031530415305153061530715308153091531015311153121531315314153151531615317153181531915320153211532215323153241532515326153271532815329153301533115332153331533415335153361533715338153391534015341153421534315344153451534615347153481534915350153511535215353153541535515356153571535815359153601536115362153631536415365153661536715368153691537015371153721537315374153751537615377153781537915380153811538215383153841538515386153871538815389153901539115392153931539415395153961539715398153991540015401154021540315404154051540615407154081540915410154111541215413154141541515416154171541815419154201542115422154231542415425154261542715428154291543015431154321543315434154351543615437154381543915440154411544215443154441544515446154471544815449154501545115452154531545415455154561545715458154591546015461154621546315464154651546615467154681546915470154711547215473154741547515476154771547815479154801548115482154831548415485154861548715488154891549015491154921549315494154951549615497154981549915500155011550215503155041550515506155071550815509155101551115512155131551415515155161551715518155191552015521155221552315524155251552615527155281552915530155311553215533155341553515536155371553815539155401554115542155431554415545155461554715548155491555015551155521555315554155551555615557155581555915560155611556215563155641556515566155671556815569155701557115572155731557415575155761557715578155791558015581155821558315584155851558615587155881558915590155911559215593155941559515596155971559815599156001560115602156031560415605156061560715608156091561015611156121561315614156151561615617156181561915620156211562215623156241562515626156271562815629156301563115632156331563415635156361563715638156391564015641156421564315644156451564615647156481564915650156511565215653156541565515656156571565815659156601566115662156631566415665156661566715668156691567015671156721567315674156751567615677156781567915680156811568215683156841568515686156871568815689156901569115692156931569415695156961569715698156991570015701157021570315704157051570615707157081570915710157111571215713157141571515716157171571815719157201572115722157231572415725157261572715728157291573015731157321573315734157351573615737157381573915740157411574215743157441574515746157471574815749157501575115752157531575415755157561575715758157591576015761157621576315764157651576615767157681576915770157711577215773157741577515776157771577815779157801578115782157831578415785157861578715788157891579015791157921579315794157951579615797157981579915800158011580215803158041580515806158071580815809158101581115812158131581415815158161581715818158191582015821158221582315824158251582615827158281582915830158311583215833158341583515836158371583815839158401584115842158431584415845158461584715848158491585015851158521585315854158551585615857158581585915860158611586215863158641586515866158671586815869158701587115872158731587415875158761587715878158791588015881158821588315884158851588615887158881588915890158911589215893158941589515896158971589815899159001590115902159031590415905159061590715908159091591015911159121591315914159151591615917159181591915920159211592215923159241592515926159271592815929159301593115932159331593415935159361593715938159391594015941159421594315944159451594615947159481594915950159511595215953159541595515956159571595815959159601596115962159631596415965159661596715968159691597015971159721597315974159751597615977159781597915980159811598215983159841598515986159871598815989159901599115992159931599415995159961599715998159991600016001160021600316004160051600616007160081600916010160111601216013160141601516016160171601816019160201602116022160231602416025160261602716028160291603016031160321603316034160351603616037160381603916040160411604216043160441604516046160471604816049160501605116052160531605416055160561605716058160591606016061160621606316064160651606616067160681606916070160711607216073160741607516076160771607816079160801608116082160831608416085160861608716088160891609016091160921609316094160951609616097160981609916100161011610216103161041610516106161071610816109161101611116112161131611416115161161611716118161191612016121161221612316124161251612616127161281612916130161311613216133161341613516136161371613816139161401614116142161431614416145161461614716148161491615016151161521615316154161551615616157161581615916160161611616216163161641616516166161671616816169161701617116172161731617416175161761617716178161791618016181161821618316184161851618616187161881618916190161911619216193161941619516196161971619816199162001620116202162031620416205162061620716208162091621016211162121621316214162151621616217162181621916220162211622216223162241622516226162271622816229162301623116232162331623416235162361623716238162391624016241162421624316244162451624616247162481624916250162511625216253162541625516256162571625816259162601626116262162631626416265162661626716268162691627016271162721627316274162751627616277162781627916280162811628216283162841628516286162871628816289162901629116292162931629416295162961629716298162991630016301163021630316304163051630616307163081630916310163111631216313163141631516316163171631816319163201632116322163231632416325163261632716328163291633016331163321633316334163351633616337163381633916340163411634216343163441634516346163471634816349163501635116352163531635416355163561635716358163591636016361163621636316364163651636616367163681636916370163711637216373163741637516376163771637816379163801638116382163831638416385163861638716388163891639016391163921639316394163951639616397163981639916400164011640216403164041640516406164071640816409164101641116412164131641416415164161641716418164191642016421164221642316424164251642616427164281642916430164311643216433164341643516436164371643816439164401644116442164431644416445164461644716448164491645016451164521645316454164551645616457164581645916460164611646216463164641646516466164671646816469164701647116472164731647416475164761647716478164791648016481164821648316484164851648616487164881648916490164911649216493164941649516496164971649816499165001650116502165031650416505165061650716508165091651016511165121651316514165151651616517165181651916520165211652216523165241652516526165271652816529165301653116532165331653416535165361653716538165391654016541165421654316544165451654616547165481654916550165511655216553165541655516556165571655816559165601656116562165631656416565165661656716568165691657016571165721657316574165751657616577165781657916580165811658216583165841658516586165871658816589165901659116592165931659416595165961659716598165991660016601166021660316604166051660616607166081660916610166111661216613166141661516616166171661816619166201662116622166231662416625166261662716628166291663016631166321663316634166351663616637166381663916640166411664216643166441664516646166471664816649166501665116652166531665416655166561665716658166591666016661166621666316664166651666616667166681666916670166711667216673166741667516676166771667816679166801668116682166831668416685166861668716688166891669016691166921669316694166951669616697166981669916700167011670216703167041670516706167071670816709167101671116712167131671416715167161671716718167191672016721167221672316724167251672616727167281672916730167311673216733167341673516736167371673816739167401674116742167431674416745167461674716748167491675016751167521675316754167551675616757167581675916760167611676216763167641676516766167671676816769167701677116772167731677416775167761677716778167791678016781167821678316784167851678616787167881678916790167911679216793167941679516796167971679816799168001680116802168031680416805168061680716808168091681016811168121681316814168151681616817168181681916820168211682216823168241682516826168271682816829168301683116832168331683416835168361683716838168391684016841168421684316844168451684616847168481684916850168511685216853168541685516856168571685816859168601686116862168631686416865168661686716868168691687016871168721687316874168751687616877168781687916880168811688216883168841688516886168871688816889168901689116892168931689416895168961689716898168991690016901169021690316904169051690616907169081690916910169111691216913169141691516916169171691816919169201692116922169231692416925169261692716928169291693016931169321693316934169351693616937169381693916940169411694216943169441694516946169471694816949169501695116952169531695416955169561695716958169591696016961169621696316964169651696616967169681696916970169711697216973169741697516976169771697816979169801698116982169831698416985169861698716988169891699016991169921699316994169951699616997169981699917000170011700217003170041700517006170071700817009170101701117012170131701417015170161701717018170191702017021170221702317024170251702617027170281702917030170311703217033170341703517036170371703817039170401704117042170431704417045170461704717048170491705017051170521705317054170551705617057170581705917060170611706217063170641706517066170671706817069170701707117072170731707417075170761707717078170791708017081170821708317084170851708617087170881708917090170911709217093170941709517096170971709817099171001710117102171031710417105171061710717108171091711017111171121711317114171151711617117171181711917120171211712217123171241712517126171271712817129171301713117132171331713417135171361713717138171391714017141171421714317144171451714617147171481714917150171511715217153171541715517156171571715817159171601716117162171631716417165171661716717168171691717017171171721717317174171751717617177171781717917180171811718217183171841718517186171871718817189171901719117192171931719417195171961719717198171991720017201172021720317204172051720617207172081720917210172111721217213172141721517216172171721817219172201722117222172231722417225172261722717228172291723017231172321723317234172351723617237172381723917240172411724217243172441724517246172471724817249172501725117252172531725417255172561725717258172591726017261172621726317264172651726617267172681726917270172711727217273172741727517276172771727817279172801728117282172831728417285172861728717288172891729017291172921729317294172951729617297172981729917300173011730217303173041730517306173071730817309173101731117312173131731417315173161731717318173191732017321173221732317324173251732617327173281732917330173311733217333173341733517336173371733817339173401734117342173431734417345173461734717348173491735017351173521735317354173551735617357173581735917360173611736217363173641736517366173671736817369173701737117372173731737417375173761737717378173791738017381173821738317384173851738617387173881738917390173911739217393173941739517396173971739817399174001740117402174031740417405174061740717408174091741017411174121741317414174151741617417174181741917420174211742217423174241742517426174271742817429174301743117432174331743417435174361743717438174391744017441174421744317444174451744617447174481744917450174511745217453174541745517456174571745817459174601746117462174631746417465174661746717468174691747017471174721747317474174751747617477174781747917480174811748217483174841748517486174871748817489174901749117492174931749417495174961749717498174991750017501175021750317504175051750617507175081750917510175111751217513175141751517516175171751817519175201752117522175231752417525175261752717528175291753017531175321753317534175351753617537175381753917540175411754217543175441754517546175471754817549175501755117552175531755417555175561755717558175591756017561175621756317564175651756617567175681756917570175711757217573175741757517576175771757817579175801758117582175831758417585175861758717588175891759017591175921759317594175951759617597175981759917600176011760217603176041760517606176071760817609176101761117612176131761417615176161761717618176191762017621176221762317624176251762617627176281762917630176311763217633176341763517636176371763817639176401764117642176431764417645176461764717648176491765017651176521765317654176551765617657176581765917660176611766217663176641766517666176671766817669176701767117672176731767417675176761767717678176791768017681176821768317684176851768617687176881768917690176911769217693176941769517696176971769817699177001770117702177031770417705177061770717708177091771017711177121771317714177151771617717177181771917720177211772217723177241772517726177271772817729177301773117732177331773417735177361773717738177391774017741177421774317744177451774617747177481774917750177511775217753177541775517756177571775817759177601776117762177631776417765177661776717768177691777017771177721777317774177751777617777177781777917780177811778217783177841778517786177871778817789177901779117792177931779417795177961779717798177991780017801178021780317804178051780617807178081780917810178111781217813178141781517816178171781817819178201782117822178231782417825178261782717828178291783017831178321783317834178351783617837178381783917840178411784217843178441784517846178471784817849178501785117852178531785417855178561785717858178591786017861178621786317864178651786617867178681786917870178711787217873178741787517876178771787817879178801788117882178831788417885178861788717888178891789017891178921789317894178951789617897178981789917900179011790217903179041790517906179071790817909179101791117912179131791417915179161791717918179191792017921179221792317924179251792617927179281792917930179311793217933179341793517936179371793817939179401794117942179431794417945179461794717948179491795017951179521795317954179551795617957179581795917960179611796217963179641796517966179671796817969179701797117972179731797417975179761797717978179791798017981179821798317984179851798617987179881798917990179911799217993179941799517996179971799817999180001800118002180031800418005180061800718008180091801018011180121801318014180151801618017180181801918020180211802218023180241802518026180271802818029180301803118032180331803418035180361803718038180391804018041180421804318044180451804618047180481804918050180511805218053180541805518056180571805818059180601806118062180631806418065180661806718068180691807018071180721807318074180751807618077180781807918080180811808218083180841808518086180871808818089180901809118092180931809418095180961809718098180991810018101181021810318104181051810618107181081810918110181111811218113181141811518116181171811818119181201812118122181231812418125181261812718128181291813018131181321813318134181351813618137181381813918140181411814218143181441814518146181471814818149181501815118152181531815418155181561815718158181591816018161181621816318164181651816618167181681816918170181711817218173181741817518176181771817818179181801818118182181831818418185181861818718188181891819018191181921819318194181951819618197181981819918200182011820218203182041820518206182071820818209182101821118212182131821418215182161821718218182191822018221182221822318224182251822618227182281822918230182311823218233182341823518236182371823818239182401824118242182431824418245182461824718248182491825018251182521825318254182551825618257182581825918260182611826218263182641826518266182671826818269182701827118272182731827418275182761827718278182791828018281182821828318284182851828618287182881828918290182911829218293182941829518296182971829818299183001830118302183031830418305183061830718308183091831018311183121831318314183151831618317183181831918320183211832218323183241832518326183271832818329183301833118332183331833418335183361833718338183391834018341183421834318344183451834618347183481834918350183511835218353183541835518356183571835818359183601836118362183631836418365183661836718368183691837018371183721837318374183751837618377183781837918380183811838218383183841838518386183871838818389183901839118392183931839418395183961839718398183991840018401184021840318404184051840618407184081840918410184111841218413184141841518416184171841818419184201842118422184231842418425184261842718428184291843018431184321843318434184351843618437184381843918440184411844218443184441844518446184471844818449184501845118452184531845418455184561845718458184591846018461184621846318464184651846618467184681846918470184711847218473184741847518476184771847818479184801848118482184831848418485184861848718488184891849018491184921849318494184951849618497184981849918500185011850218503185041850518506185071850818509185101851118512185131851418515185161851718518185191852018521185221852318524185251852618527185281852918530185311853218533185341853518536185371853818539185401854118542185431854418545185461854718548185491855018551185521855318554185551855618557185581855918560185611856218563185641856518566185671856818569185701857118572185731857418575185761857718578185791858018581185821858318584185851858618587185881858918590185911859218593185941859518596185971859818599186001860118602186031860418605186061860718608186091861018611186121861318614186151861618617186181861918620186211862218623186241862518626186271862818629186301863118632186331863418635186361863718638186391864018641186421864318644186451864618647186481864918650186511865218653186541865518656186571865818659186601866118662186631866418665186661866718668186691867018671186721867318674186751867618677186781867918680186811868218683186841868518686186871868818689186901869118692186931869418695186961869718698186991870018701187021870318704187051870618707187081870918710187111871218713187141871518716187171871818719187201872118722187231872418725187261872718728187291873018731187321873318734187351873618737187381873918740187411874218743187441874518746187471874818749187501875118752187531875418755187561875718758187591876018761187621876318764187651876618767187681876918770187711877218773187741877518776187771877818779187801878118782187831878418785187861878718788187891879018791187921879318794187951879618797187981879918800188011880218803188041880518806188071880818809188101881118812188131881418815188161881718818188191882018821188221882318824188251882618827188281882918830188311883218833188341883518836188371883818839188401884118842188431884418845188461884718848188491885018851188521885318854188551885618857188581885918860188611886218863188641886518866188671886818869188701887118872188731887418875188761887718878188791888018881188821888318884188851888618887188881888918890188911889218893188941889518896188971889818899189001890118902189031890418905189061890718908189091891018911189121891318914189151891618917189181891918920189211892218923189241892518926189271892818929189301893118932189331893418935189361893718938189391894018941189421894318944189451894618947189481894918950189511895218953189541895518956189571895818959189601896118962189631896418965189661896718968189691897018971189721897318974189751897618977189781897918980189811898218983189841898518986189871898818989189901899118992189931899418995189961899718998189991900019001190021900319004190051900619007190081900919010190111901219013190141901519016190171901819019190201902119022190231902419025190261902719028190291903019031190321903319034190351903619037190381903919040190411904219043190441904519046190471904819049190501905119052190531905419055190561905719058190591906019061190621906319064190651906619067190681906919070190711907219073190741907519076190771907819079190801908119082190831908419085190861908719088190891909019091190921909319094190951909619097190981909919100191011910219103191041910519106191071910819109191101911119112191131911419115191161911719118191191912019121191221912319124191251912619127191281912919130191311913219133191341913519136191371913819139191401914119142191431914419145191461914719148191491915019151191521915319154191551915619157191581915919160191611916219163191641916519166191671916819169191701917119172191731917419175191761917719178191791918019181191821918319184191851918619187191881918919190191911919219193191941919519196191971919819199192001920119202192031920419205192061920719208192091921019211192121921319214192151921619217192181921919220192211922219223192241922519226192271922819229192301923119232192331923419235192361923719238192391924019241192421924319244192451924619247192481924919250192511925219253192541925519256192571925819259192601926119262192631926419265192661926719268192691927019271192721927319274192751927619277192781927919280192811928219283192841928519286192871928819289192901929119292192931929419295192961929719298192991930019301193021930319304193051930619307193081930919310193111931219313193141931519316193171931819319193201932119322193231932419325193261932719328193291933019331193321933319334193351933619337193381933919340193411934219343193441934519346193471934819349193501935119352193531935419355193561935719358193591936019361193621936319364193651936619367193681936919370193711937219373193741937519376193771937819379193801938119382193831938419385193861938719388193891939019391193921939319394193951939619397193981939919400194011940219403194041940519406194071940819409194101941119412194131941419415194161941719418194191942019421194221942319424194251942619427194281942919430194311943219433194341943519436194371943819439194401944119442194431944419445194461944719448194491945019451194521945319454194551945619457194581945919460194611946219463194641946519466194671946819469194701947119472194731947419475194761947719478194791948019481194821948319484194851948619487194881948919490194911949219493194941949519496194971949819499195001950119502195031950419505195061950719508195091951019511195121951319514195151951619517195181951919520195211952219523195241952519526195271952819529195301953119532195331953419535195361953719538195391954019541195421954319544195451954619547195481954919550195511955219553195541955519556195571955819559195601956119562195631956419565195661956719568195691957019571195721957319574195751957619577195781957919580195811958219583195841958519586195871958819589195901959119592195931959419595195961959719598195991960019601196021960319604196051960619607196081960919610196111961219613196141961519616196171961819619196201962119622196231962419625196261962719628196291963019631196321963319634196351963619637196381963919640196411964219643196441964519646196471964819649196501965119652196531965419655196561965719658196591966019661196621966319664196651966619667196681966919670196711967219673196741967519676196771967819679196801968119682196831968419685196861968719688196891969019691196921969319694196951969619697196981969919700197011970219703197041970519706197071970819709197101971119712197131971419715197161971719718197191972019721197221972319724197251972619727197281972919730197311973219733197341973519736197371973819739197401974119742197431974419745197461974719748197491975019751197521975319754197551975619757197581975919760197611976219763197641976519766197671976819769197701977119772197731977419775197761977719778197791978019781197821978319784197851978619787197881978919790197911979219793197941979519796197971979819799198001980119802198031980419805198061980719808198091981019811198121981319814198151981619817198181981919820198211982219823198241982519826198271982819829198301983119832198331983419835198361983719838198391984019841198421984319844198451984619847198481984919850198511985219853198541985519856198571985819859198601986119862198631986419865198661986719868198691987019871198721987319874198751987619877198781987919880198811988219883198841988519886198871988819889198901989119892198931989419895198961989719898198991990019901199021990319904199051990619907199081990919910199111991219913199141991519916199171991819919199201992119922199231992419925199261992719928199291993019931199321993319934199351993619937199381993919940199411994219943199441994519946199471994819949199501995119952199531995419955199561995719958199591996019961199621996319964199651996619967199681996919970199711997219973199741997519976199771997819979199801998119982199831998419985199861998719988199891999019991199921999319994199951999619997199981999920000200012000220003200042000520006200072000820009200102001120012200132001420015200162001720018200192002020021200222002320024200252002620027200282002920030200312003220033200342003520036200372003820039200402004120042200432004420045200462004720048200492005020051200522005320054200552005620057200582005920060200612006220063200642006520066200672006820069200702007120072200732007420075200762007720078200792008020081200822008320084200852008620087200882008920090200912009220093200942009520096200972009820099201002010120102201032010420105201062010720108201092011020111201122011320114201152011620117201182011920120201212012220123201242012520126201272012820129201302013120132201332013420135201362013720138201392014020141201422014320144201452014620147201482014920150201512015220153201542015520156201572015820159201602016120162201632016420165201662016720168201692017020171201722017320174201752017620177201782017920180201812018220183201842018520186201872018820189201902019120192201932019420195201962019720198201992020020201202022020320204202052020620207202082020920210202112021220213202142021520216202172021820219202202022120222202232022420225202262022720228202292023020231202322023320234202352023620237202382023920240202412024220243202442024520246202472024820249202502025120252202532025420255202562025720258202592026020261202622026320264202652026620267202682026920270202712027220273202742027520276202772027820279202802028120282202832028420285202862028720288202892029020291202922029320294202952029620297202982029920300203012030220303203042030520306203072030820309203102031120312203132031420315203162031720318203192032020321203222032320324203252032620327203282032920330203312033220333203342033520336203372033820339203402034120342203432034420345203462034720348203492035020351203522035320354203552035620357203582035920360203612036220363203642036520366203672036820369203702037120372203732037420375203762037720378203792038020381203822038320384203852038620387203882038920390203912039220393203942039520396203972039820399204002040120402204032040420405204062040720408204092041020411204122041320414204152041620417204182041920420204212042220423204242042520426204272042820429204302043120432204332043420435204362043720438204392044020441204422044320444204452044620447204482044920450204512045220453204542045520456204572045820459204602046120462204632046420465204662046720468204692047020471204722047320474204752047620477204782047920480204812048220483204842048520486204872048820489204902049120492204932049420495204962049720498204992050020501205022050320504205052050620507205082050920510205112051220513205142051520516205172051820519205202052120522205232052420525205262052720528205292053020531205322053320534205352053620537205382053920540205412054220543205442054520546205472054820549205502055120552205532055420555205562055720558205592056020561205622056320564205652056620567205682056920570205712057220573205742057520576205772057820579205802058120582205832058420585205862058720588205892059020591205922059320594205952059620597205982059920600206012060220603206042060520606206072060820609206102061120612206132061420615206162061720618206192062020621206222062320624206252062620627206282062920630206312063220633206342063520636206372063820639206402064120642206432064420645206462064720648206492065020651206522065320654206552065620657206582065920660206612066220663206642066520666206672066820669206702067120672206732067420675206762067720678206792068020681206822068320684206852068620687206882068920690206912069220693206942069520696206972069820699207002070120702207032070420705207062070720708207092071020711207122071320714207152071620717207182071920720207212072220723207242072520726207272072820729207302073120732207332073420735207362073720738207392074020741207422074320744207452074620747207482074920750207512075220753207542075520756207572075820759207602076120762207632076420765207662076720768207692077020771207722077320774207752077620777207782077920780207812078220783207842078520786207872078820789207902079120792207932079420795207962079720798207992080020801208022080320804208052080620807208082080920810208112081220813208142081520816208172081820819208202082120822208232082420825208262082720828208292083020831208322083320834208352083620837208382083920840208412084220843208442084520846208472084820849208502085120852208532085420855208562085720858208592086020861208622086320864208652086620867208682086920870208712087220873208742087520876208772087820879208802088120882208832088420885208862088720888208892089020891208922089320894208952089620897208982089920900209012090220903209042090520906209072090820909209102091120912209132091420915209162091720918209192092020921209222092320924209252092620927209282092920930209312093220933209342093520936209372093820939209402094120942209432094420945209462094720948209492095020951209522095320954209552095620957209582095920960209612096220963209642096520966209672096820969209702097120972209732097420975209762097720978209792098020981209822098320984209852098620987209882098920990209912099220993209942099520996209972099820999210002100121002210032100421005210062100721008210092101021011210122101321014210152101621017210182101921020210212102221023210242102521026210272102821029210302103121032210332103421035210362103721038210392104021041210422104321044210452104621047210482104921050210512105221053210542105521056210572105821059210602106121062210632106421065210662106721068210692107021071210722107321074210752107621077210782107921080210812108221083210842108521086210872108821089210902109121092210932109421095210962109721098210992110021101211022110321104211052110621107211082110921110211112111221113211142111521116211172111821119211202112121122211232112421125211262112721128211292113021131211322113321134211352113621137211382113921140211412114221143211442114521146211472114821149211502115121152211532115421155211562115721158211592116021161211622116321164211652116621167211682116921170211712117221173211742117521176211772117821179211802118121182211832118421185211862118721188211892119021191211922119321194211952119621197211982119921200212012120221203212042120521206212072120821209212102121121212212132121421215212162121721218212192122021221212222122321224212252122621227212282122921230212312123221233212342123521236212372123821239212402124121242212432124421245212462124721248212492125021251212522125321254212552125621257212582125921260212612126221263212642126521266212672126821269212702127121272212732127421275212762127721278212792128021281212822128321284212852128621287212882128921290212912129221293212942129521296212972129821299213002130121302213032130421305213062130721308213092131021311213122131321314213152131621317213182131921320213212132221323213242132521326213272132821329213302133121332213332133421335213362133721338213392134021341213422134321344213452134621347213482134921350213512135221353213542135521356213572135821359213602136121362213632136421365213662136721368213692137021371213722137321374213752137621377213782137921380213812138221383213842138521386213872138821389213902139121392213932139421395213962139721398213992140021401214022140321404214052140621407214082140921410214112141221413214142141521416214172141821419214202142121422214232142421425214262142721428214292143021431214322143321434214352143621437214382143921440214412144221443214442144521446214472144821449214502145121452214532145421455214562145721458214592146021461214622146321464214652146621467214682146921470214712147221473214742147521476214772147821479214802148121482214832148421485214862148721488214892149021491214922149321494214952149621497214982149921500215012150221503215042150521506215072150821509215102151121512215132151421515215162151721518215192152021521215222152321524215252152621527215282152921530215312153221533215342153521536215372153821539215402154121542215432154421545215462154721548215492155021551215522155321554215552155621557215582155921560215612156221563215642156521566215672156821569215702157121572215732157421575215762157721578215792158021581215822158321584215852158621587215882158921590215912159221593215942159521596215972159821599216002160121602216032160421605216062160721608216092161021611216122161321614216152161621617216182161921620216212162221623216242162521626216272162821629216302163121632216332163421635216362163721638216392164021641216422164321644216452164621647216482164921650216512165221653216542165521656216572165821659216602166121662216632166421665216662166721668216692167021671216722167321674216752167621677216782167921680216812168221683216842168521686216872168821689216902169121692216932169421695216962169721698216992170021701217022170321704217052170621707217082170921710217112171221713217142171521716217172171821719217202172121722217232172421725217262172721728217292173021731217322173321734217352173621737217382173921740217412174221743217442174521746217472174821749217502175121752217532175421755217562175721758217592176021761217622176321764217652176621767217682176921770217712177221773217742177521776217772177821779217802178121782217832178421785217862178721788217892179021791217922179321794217952179621797217982179921800218012180221803218042180521806218072180821809218102181121812218132181421815218162181721818218192182021821218222182321824218252182621827218282182921830218312183221833218342183521836218372183821839218402184121842218432184421845218462184721848218492185021851218522185321854218552185621857218582185921860218612186221863218642186521866218672186821869218702187121872218732187421875218762187721878218792188021881218822188321884218852188621887218882188921890218912189221893218942189521896218972189821899219002190121902219032190421905219062190721908219092191021911219122191321914219152191621917219182191921920219212192221923219242192521926219272192821929219302193121932219332193421935219362193721938219392194021941219422194321944219452194621947219482194921950219512195221953219542195521956219572195821959219602196121962219632196421965219662196721968219692197021971219722197321974219752197621977219782197921980219812198221983219842198521986219872198821989219902199121992219932199421995219962199721998219992200022001220022200322004220052200622007220082200922010220112201222013220142201522016220172201822019220202202122022220232202422025220262202722028220292203022031220322203322034220352203622037220382203922040220412204222043220442204522046220472204822049220502205122052220532205422055220562205722058220592206022061220622206322064220652206622067220682206922070220712207222073220742207522076220772207822079220802208122082220832208422085220862208722088220892209022091220922209322094220952209622097220982209922100221012210222103221042210522106221072210822109221102211122112221132211422115221162211722118221192212022121221222212322124221252212622127221282212922130221312213222133221342213522136221372213822139221402214122142221432214422145221462214722148221492215022151221522215322154221552215622157221582215922160221612216222163221642216522166221672216822169221702217122172221732217422175221762217722178221792218022181221822218322184221852218622187221882218922190221912219222193221942219522196221972219822199222002220122202222032220422205222062220722208222092221022211222122221322214222152221622217222182221922220222212222222223222242222522226222272222822229222302223122232222332223422235222362223722238222392224022241222422224322244222452224622247222482224922250222512225222253222542225522256222572225822259222602226122262222632226422265222662226722268222692227022271222722227322274222752227622277222782227922280222812228222283222842228522286222872228822289222902229122292222932229422295222962229722298222992230022301223022230322304223052230622307223082230922310223112231222313223142231522316223172231822319223202232122322223232232422325223262232722328223292233022331223322233322334223352233622337223382233922340223412234222343223442234522346223472234822349223502235122352223532235422355223562235722358223592236022361223622236322364223652236622367223682236922370223712237222373223742237522376223772237822379223802238122382223832238422385223862238722388223892239022391223922239322394223952239622397223982239922400224012240222403224042240522406224072240822409224102241122412224132241422415224162241722418224192242022421224222242322424224252242622427224282242922430224312243222433224342243522436224372243822439224402244122442224432244422445224462244722448224492245022451224522245322454224552245622457224582245922460224612246222463224642246522466224672246822469224702247122472224732247422475224762247722478224792248022481224822248322484224852248622487224882248922490224912249222493224942249522496224972249822499225002250122502225032250422505225062250722508225092251022511225122251322514225152251622517225182251922520225212252222523225242252522526225272252822529225302253122532225332253422535225362253722538225392254022541225422254322544225452254622547225482254922550225512255222553225542255522556225572255822559225602256122562225632256422565225662256722568225692257022571225722257322574225752257622577225782257922580225812258222583225842258522586225872258822589225902259122592225932259422595225962259722598225992260022601226022260322604226052260622607226082260922610226112261222613226142261522616226172261822619226202262122622226232262422625226262262722628226292263022631226322263322634226352263622637226382263922640226412264222643226442264522646226472264822649226502265122652226532265422655226562265722658226592266022661226622266322664226652266622667226682266922670226712267222673226742267522676226772267822679226802268122682226832268422685226862268722688226892269022691226922269322694226952269622697226982269922700227012270222703227042270522706227072270822709227102271122712227132271422715227162271722718227192272022721227222272322724227252272622727227282272922730227312273222733227342273522736227372273822739227402274122742227432274422745227462274722748227492275022751227522275322754227552275622757227582275922760227612276222763227642276522766227672276822769227702277122772227732277422775227762277722778227792278022781227822278322784227852278622787227882278922790227912279222793227942279522796227972279822799228002280122802228032280422805228062280722808228092281022811228122281322814228152281622817228182281922820228212282222823228242282522826228272282822829228302283122832228332283422835228362283722838228392284022841228422284322844228452284622847228482284922850228512285222853228542285522856228572285822859228602286122862228632286422865228662286722868228692287022871228722287322874228752287622877228782287922880228812288222883228842288522886228872288822889228902289122892228932289422895228962289722898228992290022901229022290322904229052290622907229082290922910229112291222913229142291522916229172291822919229202292122922229232292422925229262292722928229292293022931229322293322934229352293622937229382293922940229412294222943229442294522946229472294822949229502295122952229532295422955229562295722958229592296022961229622296322964229652296622967229682296922970229712297222973229742297522976229772297822979229802298122982229832298422985229862298722988229892299022991229922299322994229952299622997229982299923000230012300223003230042300523006230072300823009230102301123012230132301423015230162301723018230192302023021230222302323024230252302623027230282302923030230312303223033230342303523036230372303823039230402304123042230432304423045230462304723048230492305023051230522305323054230552305623057230582305923060230612306223063230642306523066230672306823069230702307123072230732307423075230762307723078230792308023081230822308323084230852308623087230882308923090230912309223093230942309523096230972309823099231002310123102231032310423105231062310723108231092311023111231122311323114231152311623117231182311923120231212312223123231242312523126231272312823129231302313123132231332313423135231362313723138231392314023141231422314323144231452314623147231482314923150231512315223153231542315523156231572315823159231602316123162231632316423165231662316723168231692317023171231722317323174231752317623177231782317923180231812318223183231842318523186231872318823189231902319123192231932319423195231962319723198231992320023201232022320323204232052320623207232082320923210232112321223213232142321523216232172321823219232202322123222232232322423225232262322723228232292323023231232322323323234232352323623237232382323923240232412324223243232442324523246232472324823249232502325123252232532325423255232562325723258232592326023261232622326323264232652326623267232682326923270232712327223273232742327523276232772327823279232802328123282232832328423285232862328723288232892329023291232922329323294232952329623297232982329923300233012330223303233042330523306233072330823309233102331123312233132331423315233162331723318233192332023321233222332323324233252332623327233282332923330233312333223333233342333523336233372333823339233402334123342233432334423345233462334723348233492335023351233522335323354233552335623357233582335923360233612336223363233642336523366233672336823369233702337123372233732337423375233762337723378233792338023381233822338323384233852338623387233882338923390233912339223393233942339523396233972339823399234002340123402234032340423405234062340723408234092341023411234122341323414234152341623417234182341923420234212342223423234242342523426234272342823429234302343123432234332343423435234362343723438234392344023441234422344323444234452344623447234482344923450234512345223453234542345523456234572345823459234602346123462234632346423465234662346723468234692347023471234722347323474234752347623477234782347923480234812348223483234842348523486234872348823489234902349123492234932349423495234962349723498234992350023501235022350323504235052350623507235082350923510235112351223513235142351523516235172351823519235202352123522235232352423525235262352723528235292353023531235322353323534235352353623537235382353923540235412354223543235442354523546235472354823549235502355123552235532355423555235562355723558235592356023561235622356323564235652356623567235682356923570235712357223573235742357523576235772357823579235802358123582235832358423585235862358723588235892359023591235922359323594235952359623597235982359923600236012360223603236042360523606236072360823609236102361123612236132361423615236162361723618236192362023621236222362323624236252362623627236282362923630236312363223633236342363523636236372363823639236402364123642236432364423645236462364723648236492365023651236522365323654236552365623657236582365923660236612366223663236642366523666236672366823669236702367123672236732367423675236762367723678236792368023681236822368323684236852368623687236882368923690236912369223693236942369523696236972369823699237002370123702237032370423705237062370723708237092371023711237122371323714237152371623717237182371923720237212372223723237242372523726237272372823729237302373123732237332373423735237362373723738237392374023741237422374323744237452374623747237482374923750237512375223753237542375523756237572375823759237602376123762237632376423765237662376723768237692377023771237722377323774237752377623777237782377923780237812378223783237842378523786237872378823789237902379123792237932379423795237962379723798237992380023801238022380323804238052380623807238082380923810238112381223813238142381523816238172381823819238202382123822238232382423825238262382723828238292383023831238322383323834238352383623837238382383923840238412384223843238442384523846238472384823849238502385123852238532385423855238562385723858238592386023861238622386323864238652386623867238682386923870238712387223873238742387523876238772387823879238802388123882238832388423885238862388723888238892389023891238922389323894238952389623897238982389923900239012390223903239042390523906239072390823909239102391123912239132391423915239162391723918239192392023921239222392323924239252392623927239282392923930239312393223933239342393523936239372393823939239402394123942239432394423945239462394723948239492395023951239522395323954239552395623957239582395923960239612396223963239642396523966239672396823969239702397123972239732397423975239762397723978239792398023981239822398323984239852398623987239882398923990239912399223993239942399523996239972399823999240002400124002240032400424005240062400724008240092401024011240122401324014240152401624017240182401924020240212402224023240242402524026240272402824029240302403124032240332403424035240362403724038240392404024041240422404324044240452404624047240482404924050240512405224053240542405524056240572405824059240602406124062240632406424065240662406724068240692407024071240722407324074240752407624077240782407924080240812408224083240842408524086240872408824089240902409124092240932409424095240962409724098240992410024101241022410324104241052410624107241082410924110241112411224113241142411524116241172411824119241202412124122241232412424125241262412724128241292413024131241322413324134241352413624137241382413924140241412414224143241442414524146241472414824149241502415124152241532415424155241562415724158241592416024161241622416324164241652416624167241682416924170241712417224173241742417524176241772417824179241802418124182241832418424185241862418724188241892419024191241922419324194241952419624197241982419924200242012420224203242042420524206242072420824209242102421124212242132421424215242162421724218242192422024221242222422324224242252422624227242282422924230242312423224233242342423524236242372423824239242402424124242242432424424245242462424724248242492425024251242522425324254242552425624257242582425924260242612426224263242642426524266242672426824269242702427124272242732427424275242762427724278242792428024281242822428324284242852428624287242882428924290242912429224293242942429524296242972429824299243002430124302243032430424305243062430724308243092431024311243122431324314243152431624317243182431924320243212432224323243242432524326243272432824329243302433124332243332433424335243362433724338243392434024341243422434324344243452434624347243482434924350243512435224353243542435524356243572435824359243602436124362243632436424365243662436724368243692437024371243722437324374243752437624377243782437924380243812438224383243842438524386243872438824389243902439124392243932439424395243962439724398243992440024401244022440324404244052440624407244082440924410244112441224413244142441524416244172441824419244202442124422244232442424425244262442724428244292443024431244322443324434244352443624437244382443924440244412444224443244442444524446244472444824449244502445124452244532445424455244562445724458244592446024461244622446324464244652446624467244682446924470244712447224473244742447524476244772447824479244802448124482244832448424485244862448724488244892449024491244922449324494244952449624497244982449924500245012450224503245042450524506245072450824509245102451124512245132451424515245162451724518245192452024521245222452324524245252452624527245282452924530245312453224533245342453524536245372453824539245402454124542245432454424545245462454724548245492455024551245522455324554245552455624557245582455924560245612456224563245642456524566245672456824569245702457124572245732457424575245762457724578245792458024581245822458324584245852458624587245882458924590245912459224593245942459524596245972459824599246002460124602246032460424605246062460724608246092461024611246122461324614246152461624617246182461924620246212462224623246242462524626246272462824629246302463124632246332463424635246362463724638246392464024641246422464324644246452464624647246482464924650246512465224653246542465524656246572465824659246602466124662246632466424665246662466724668246692467024671246722467324674246752467624677246782467924680246812468224683246842468524686246872468824689246902469124692246932469424695246962469724698246992470024701247022470324704247052470624707247082470924710247112471224713247142471524716247172471824719247202472124722247232472424725247262472724728247292473024731247322473324734247352473624737247382473924740247412474224743247442474524746247472474824749247502475124752247532475424755247562475724758247592476024761247622476324764247652476624767247682476924770247712477224773247742477524776247772477824779247802478124782247832478424785247862478724788247892479024791247922479324794247952479624797247982479924800248012480224803248042480524806248072480824809248102481124812248132481424815248162481724818248192482024821248222482324824248252482624827248282482924830248312483224833248342483524836248372483824839248402484124842248432484424845248462484724848248492485024851248522485324854248552485624857248582485924860248612486224863248642486524866248672486824869248702487124872248732487424875248762487724878248792488024881248822488324884248852488624887248882488924890248912489224893248942489524896248972489824899249002490124902249032490424905249062490724908249092491024911249122491324914249152491624917249182491924920249212492224923249242492524926249272492824929249302493124932249332493424935249362493724938249392494024941249422494324944249452494624947249482494924950249512495224953249542495524956249572495824959249602496124962249632496424965249662496724968249692497024971249722497324974249752497624977249782497924980249812498224983249842498524986249872498824989249902499124992249932499424995249962499724998249992500025001250022500325004250052500625007250082500925010250112501225013250142501525016250172501825019250202502125022250232502425025250262502725028250292503025031250322503325034250352503625037250382503925040250412504225043250442504525046250472504825049250502505125052250532505425055250562505725058250592506025061250622506325064250652506625067250682506925070250712507225073250742507525076250772507825079250802508125082250832508425085250862508725088250892509025091250922509325094250952509625097250982509925100251012510225103251042510525106251072510825109251102511125112251132511425115251162511725118251192512025121251222512325124251252512625127251282512925130251312513225133251342513525136251372513825139251402514125142251432514425145251462514725148251492515025151251522515325154251552515625157251582515925160251612516225163251642516525166251672516825169251702517125172251732517425175251762517725178251792518025181251822518325184251852518625187251882518925190251912519225193251942519525196251972519825199252002520125202252032520425205252062520725208252092521025211252122521325214252152521625217252182521925220252212522225223252242522525226252272522825229252302523125232252332523425235252362523725238252392524025241252422524325244252452524625247252482524925250252512525225253252542525525256252572525825259252602526125262252632526425265252662526725268252692527025271252722527325274252752527625277252782527925280252812528225283252842528525286252872528825289252902529125292252932529425295252962529725298252992530025301253022530325304253052530625307253082530925310253112531225313253142531525316253172531825319253202532125322253232532425325253262532725328253292533025331253322533325334253352533625337253382533925340253412534225343253442534525346253472534825349253502535125352253532535425355253562535725358253592536025361253622536325364253652536625367253682536925370253712537225373253742537525376253772537825379253802538125382253832538425385253862538725388253892539025391253922539325394253952539625397253982539925400254012540225403254042540525406254072540825409254102541125412254132541425415254162541725418254192542025421254222542325424254252542625427254282542925430254312543225433254342543525436254372543825439254402544125442254432544425445254462544725448254492545025451254522545325454254552545625457254582545925460254612546225463254642546525466254672546825469254702547125472254732547425475254762547725478254792548025481254822548325484254852548625487254882548925490254912549225493254942549525496254972549825499255002550125502255032550425505255062550725508255092551025511255122551325514255152551625517255182551925520255212552225523255242552525526255272552825529255302553125532255332553425535255362553725538255392554025541255422554325544255452554625547255482554925550255512555225553255542555525556255572555825559255602556125562255632556425565255662556725568255692557025571255722557325574255752557625577255782557925580255812558225583255842558525586255872558825589255902559125592255932559425595255962559725598255992560025601256022560325604256052560625607256082560925610256112561225613256142561525616256172561825619256202562125622256232562425625256262562725628256292563025631256322563325634256352563625637256382563925640256412564225643256442564525646256472564825649256502565125652256532565425655256562565725658256592566025661256622566325664256652566625667256682566925670256712567225673256742567525676256772567825679256802568125682256832568425685256862568725688256892569025691256922569325694256952569625697256982569925700257012570225703257042570525706257072570825709257102571125712257132571425715257162571725718257192572025721257222572325724257252572625727257282572925730257312573225733257342573525736257372573825739257402574125742257432574425745257462574725748257492575025751257522575325754257552575625757257582575925760257612576225763257642576525766257672576825769257702577125772257732577425775257762577725778257792578025781257822578325784257852578625787257882578925790257912579225793257942579525796257972579825799258002580125802258032580425805258062580725808258092581025811258122581325814258152581625817258182581925820258212582225823258242582525826258272582825829258302583125832258332583425835258362583725838258392584025841258422584325844258452584625847258482584925850258512585225853258542585525856258572585825859258602586125862258632586425865258662586725868258692587025871258722587325874258752587625877258782587925880258812588225883258842588525886258872588825889258902589125892258932589425895258962589725898258992590025901259022590325904259052590625907259082590925910259112591225913259142591525916259172591825919259202592125922259232592425925259262592725928259292593025931259322593325934259352593625937259382593925940259412594225943259442594525946259472594825949259502595125952259532595425955259562595725958259592596025961259622596325964259652596625967259682596925970259712597225973259742597525976259772597825979259802598125982259832598425985259862598725988259892599025991259922599325994259952599625997259982599926000260012600226003260042600526006260072600826009260102601126012260132601426015260162601726018260192602026021260222602326024260252602626027260282602926030260312603226033260342603526036260372603826039260402604126042260432604426045260462604726048260492605026051260522605326054260552605626057260582605926060260612606226063260642606526066260672606826069260702607126072260732607426075260762607726078260792608026081260822608326084260852608626087260882608926090260912609226093260942609526096260972609826099261002610126102261032610426105261062610726108261092611026111261122611326114261152611626117261182611926120261212612226123261242612526126261272612826129261302613126132261332613426135261362613726138261392614026141261422614326144261452614626147261482614926150261512615226153261542615526156261572615826159261602616126162261632616426165261662616726168261692617026171261722617326174261752617626177261782617926180261812618226183261842618526186261872618826189261902619126192261932619426195261962619726198261992620026201262022620326204262052620626207262082620926210262112621226213262142621526216262172621826219262202622126222262232622426225262262622726228262292623026231262322623326234262352623626237262382623926240262412624226243262442624526246262472624826249262502625126252262532625426255262562625726258262592626026261262622626326264262652626626267262682626926270262712627226273262742627526276262772627826279262802628126282262832628426285262862628726288262892629026291262922629326294262952629626297262982629926300263012630226303263042630526306263072630826309263102631126312263132631426315263162631726318263192632026321263222632326324263252632626327263282632926330263312633226333263342633526336263372633826339263402634126342263432634426345263462634726348263492635026351263522635326354263552635626357263582635926360263612636226363263642636526366263672636826369263702637126372263732637426375263762637726378263792638026381263822638326384263852638626387263882638926390263912639226393263942639526396263972639826399264002640126402264032640426405264062640726408264092641026411264122641326414264152641626417264182641926420264212642226423264242642526426264272642826429264302643126432264332643426435264362643726438264392644026441264422644326444264452644626447264482644926450264512645226453264542645526456264572645826459264602646126462264632646426465264662646726468264692647026471264722647326474264752647626477264782647926480264812648226483264842648526486264872648826489264902649126492264932649426495264962649726498264992650026501265022650326504265052650626507265082650926510265112651226513265142651526516265172651826519265202652126522265232652426525265262652726528265292653026531265322653326534265352653626537265382653926540265412654226543265442654526546265472654826549265502655126552265532655426555265562655726558265592656026561265622656326564265652656626567265682656926570265712657226573265742657526576265772657826579265802658126582265832658426585265862658726588265892659026591265922659326594265952659626597265982659926600266012660226603266042660526606266072660826609266102661126612266132661426615266162661726618266192662026621266222662326624266252662626627266282662926630266312663226633266342663526636266372663826639266402664126642266432664426645266462664726648266492665026651266522665326654266552665626657266582665926660266612666226663266642666526666266672666826669266702667126672266732667426675266762667726678266792668026681266822668326684266852668626687266882668926690266912669226693266942669526696266972669826699267002670126702267032670426705267062670726708267092671026711267122671326714267152671626717267182671926720267212672226723267242672526726267272672826729267302673126732267332673426735267362673726738267392674026741267422674326744267452674626747267482674926750267512675226753267542675526756267572675826759267602676126762267632676426765267662676726768267692677026771267722677326774267752677626777267782677926780267812678226783267842678526786267872678826789267902679126792267932679426795267962679726798267992680026801268022680326804268052680626807268082680926810268112681226813268142681526816268172681826819268202682126822268232682426825268262682726828268292683026831268322683326834268352683626837268382683926840268412684226843268442684526846268472684826849268502685126852268532685426855268562685726858268592686026861268622686326864268652686626867268682686926870268712687226873268742687526876268772687826879268802688126882268832688426885268862688726888268892689026891268922689326894268952689626897268982689926900269012690226903269042690526906269072690826909269102691126912269132691426915269162691726918269192692026921269222692326924269252692626927269282692926930269312693226933269342693526936269372693826939269402694126942269432694426945269462694726948269492695026951269522695326954269552695626957269582695926960269612696226963269642696526966269672696826969269702697126972269732697426975269762697726978269792698026981269822698326984269852698626987269882698926990269912699226993269942699526996269972699826999270002700127002270032700427005270062700727008270092701027011270122701327014270152701627017270182701927020270212702227023270242702527026270272702827029270302703127032270332703427035270362703727038270392704027041270422704327044270452704627047270482704927050270512705227053270542705527056270572705827059270602706127062270632706427065270662706727068270692707027071270722707327074270752707627077270782707927080270812708227083270842708527086270872708827089270902709127092270932709427095270962709727098270992710027101271022710327104271052710627107271082710927110271112711227113271142711527116271172711827119271202712127122271232712427125271262712727128271292713027131271322713327134271352713627137271382713927140271412714227143271442714527146271472714827149271502715127152271532715427155271562715727158271592716027161271622716327164271652716627167271682716927170271712717227173271742717527176271772717827179271802718127182271832718427185271862718727188271892719027191271922719327194271952719627197271982719927200272012720227203272042720527206272072720827209272102721127212272132721427215272162721727218272192722027221272222722327224272252722627227272282722927230272312723227233272342723527236272372723827239272402724127242272432724427245272462724727248272492725027251272522725327254272552725627257272582725927260272612726227263272642726527266272672726827269272702727127272272732727427275272762727727278272792728027281272822728327284272852728627287272882728927290272912729227293272942729527296272972729827299273002730127302273032730427305273062730727308273092731027311273122731327314273152731627317273182731927320273212732227323273242732527326273272732827329273302733127332273332733427335273362733727338273392734027341273422734327344273452734627347273482734927350273512735227353273542735527356273572735827359273602736127362273632736427365273662736727368273692737027371273722737327374273752737627377273782737927380273812738227383273842738527386273872738827389273902739127392273932739427395273962739727398273992740027401274022740327404274052740627407274082740927410274112741227413274142741527416274172741827419274202742127422274232742427425274262742727428274292743027431274322743327434274352743627437274382743927440274412744227443274442744527446274472744827449274502745127452274532745427455274562745727458274592746027461274622746327464274652746627467274682746927470274712747227473274742747527476274772747827479274802748127482274832748427485274862748727488274892749027491274922749327494274952749627497274982749927500275012750227503275042750527506275072750827509275102751127512275132751427515275162751727518275192752027521275222752327524275252752627527275282752927530275312753227533275342753527536275372753827539275402754127542275432754427545275462754727548275492755027551275522755327554275552755627557275582755927560275612756227563275642756527566275672756827569275702757127572275732757427575275762757727578275792758027581275822758327584275852758627587275882758927590275912759227593275942759527596275972759827599276002760127602276032760427605276062760727608276092761027611276122761327614276152761627617276182761927620276212762227623276242762527626276272762827629276302763127632276332763427635276362763727638276392764027641276422764327644276452764627647276482764927650276512765227653276542765527656276572765827659276602766127662276632766427665276662766727668276692767027671276722767327674276752767627677276782767927680276812768227683276842768527686276872768827689276902769127692276932769427695276962769727698276992770027701277022770327704277052770627707277082770927710277112771227713277142771527716277172771827719277202772127722277232772427725277262772727728277292773027731277322773327734277352773627737277382773927740277412774227743277442774527746277472774827749277502775127752277532775427755277562775727758277592776027761277622776327764277652776627767277682776927770277712777227773277742777527776277772777827779277802778127782277832778427785277862778727788277892779027791277922779327794277952779627797277982779927800278012780227803278042780527806278072780827809278102781127812278132781427815278162781727818278192782027821278222782327824278252782627827278282782927830278312783227833278342783527836278372783827839278402784127842278432784427845278462784727848278492785027851278522785327854278552785627857278582785927860278612786227863278642786527866278672786827869278702787127872278732787427875278762787727878278792788027881278822788327884278852788627887278882788927890278912789227893278942789527896278972789827899279002790127902279032790427905279062790727908279092791027911279122791327914279152791627917279182791927920279212792227923279242792527926279272792827929279302793127932279332793427935279362793727938279392794027941279422794327944279452794627947279482794927950279512795227953279542795527956279572795827959279602796127962279632796427965279662796727968279692797027971279722797327974279752797627977279782797927980279812798227983279842798527986279872798827989279902799127992279932799427995279962799727998279992800028001280022800328004280052800628007280082800928010280112801228013280142801528016280172801828019280202802128022280232802428025280262802728028280292803028031280322803328034280352803628037280382803928040280412804228043280442804528046280472804828049280502805128052280532805428055280562805728058280592806028061280622806328064280652806628067280682806928070280712807228073280742807528076280772807828079280802808128082280832808428085280862808728088280892809028091280922809328094280952809628097280982809928100281012810228103281042810528106281072810828109281102811128112281132811428115281162811728118281192812028121281222812328124281252812628127281282812928130281312813228133281342813528136281372813828139281402814128142281432814428145281462814728148281492815028151281522815328154281552815628157281582815928160281612816228163281642816528166281672816828169281702817128172281732817428175281762817728178281792818028181281822818328184281852818628187281882818928190281912819228193281942819528196281972819828199282002820128202282032820428205282062820728208282092821028211282122821328214282152821628217282182821928220282212822228223282242822528226282272822828229282302823128232282332823428235282362823728238282392824028241282422824328244282452824628247282482824928250282512825228253282542825528256282572825828259282602826128262282632826428265282662826728268282692827028271282722827328274282752827628277282782827928280282812828228283282842828528286282872828828289282902829128292282932829428295282962829728298282992830028301283022830328304283052830628307283082830928310283112831228313283142831528316283172831828319283202832128322283232832428325283262832728328283292833028331283322833328334283352833628337283382833928340283412834228343283442834528346283472834828349283502835128352283532835428355283562835728358283592836028361283622836328364283652836628367283682836928370283712837228373283742837528376283772837828379283802838128382283832838428385283862838728388283892839028391283922839328394283952839628397283982839928400284012840228403284042840528406284072840828409284102841128412284132841428415284162841728418284192842028421284222842328424284252842628427284282842928430284312843228433284342843528436284372843828439284402844128442284432844428445284462844728448284492845028451284522845328454284552845628457284582845928460284612846228463284642846528466284672846828469284702847128472284732847428475284762847728478284792848028481284822848328484284852848628487284882848928490284912849228493284942849528496284972849828499285002850128502285032850428505285062850728508285092851028511285122851328514285152851628517285182851928520285212852228523285242852528526285272852828529285302853128532285332853428535285362853728538285392854028541285422854328544285452854628547285482854928550285512855228553285542855528556285572855828559285602856128562285632856428565285662856728568285692857028571285722857328574285752857628577285782857928580285812858228583285842858528586285872858828589285902859128592285932859428595285962859728598285992860028601286022860328604286052860628607286082860928610286112861228613286142861528616286172861828619286202862128622286232862428625286262862728628286292863028631286322863328634286352863628637286382863928640286412864228643286442864528646286472864828649286502865128652286532865428655286562865728658286592866028661286622866328664286652866628667286682866928670286712867228673286742867528676286772867828679286802868128682286832868428685286862868728688286892869028691286922869328694286952869628697286982869928700287012870228703287042870528706287072870828709287102871128712287132871428715287162871728718287192872028721287222872328724287252872628727287282872928730287312873228733287342873528736287372873828739287402874128742287432874428745287462874728748287492875028751287522875328754287552875628757287582875928760287612876228763287642876528766287672876828769287702877128772287732877428775287762877728778287792878028781287822878328784287852878628787287882878928790287912879228793287942879528796287972879828799288002880128802288032880428805288062880728808288092881028811288122881328814288152881628817288182881928820288212882228823288242882528826288272882828829288302883128832288332883428835288362883728838288392884028841288422884328844288452884628847288482884928850288512885228853288542885528856288572885828859288602886128862288632886428865288662886728868288692887028871288722887328874288752887628877288782887928880288812888228883288842888528886288872888828889288902889128892288932889428895288962889728898288992890028901289022890328904289052890628907289082890928910289112891228913289142891528916289172891828919289202892128922289232892428925289262892728928289292893028931289322893328934289352893628937289382893928940289412894228943289442894528946289472894828949289502895128952289532895428955289562895728958289592896028961289622896328964289652896628967289682896928970289712897228973289742897528976289772897828979289802898128982289832898428985289862898728988289892899028991289922899328994289952899628997289982899929000290012900229003290042900529006290072900829009290102901129012290132901429015290162901729018290192902029021290222902329024290252902629027290282902929030290312903229033290342903529036290372903829039290402904129042290432904429045290462904729048290492905029051290522905329054290552905629057290582905929060290612906229063290642906529066290672906829069290702907129072290732907429075290762907729078290792908029081290822908329084290852908629087290882908929090290912909229093290942909529096290972909829099291002910129102291032910429105291062910729108291092911029111291122911329114291152911629117291182911929120291212912229123291242912529126291272912829129291302913129132291332913429135291362913729138291392914029141291422914329144291452914629147291482914929150291512915229153291542915529156291572915829159291602916129162291632916429165291662916729168291692917029171291722917329174291752917629177291782917929180291812918229183291842918529186291872918829189291902919129192291932919429195291962919729198291992920029201292022920329204292052920629207292082920929210292112921229213292142921529216292172921829219292202922129222292232922429225292262922729228292292923029231292322923329234292352923629237292382923929240292412924229243292442924529246292472924829249292502925129252292532925429255292562925729258292592926029261292622926329264292652926629267292682926929270292712927229273292742927529276292772927829279292802928129282292832928429285292862928729288292892929029291292922929329294292952929629297292982929929300293012930229303293042930529306293072930829309293102931129312293132931429315293162931729318293192932029321293222932329324293252932629327293282932929330293312933229333293342933529336293372933829339293402934129342293432934429345293462934729348293492935029351293522935329354293552935629357293582935929360293612936229363293642936529366293672936829369293702937129372293732937429375293762937729378293792938029381293822938329384293852938629387293882938929390293912939229393293942939529396293972939829399294002940129402294032940429405294062940729408294092941029411294122941329414294152941629417294182941929420294212942229423294242942529426294272942829429294302943129432294332943429435294362943729438294392944029441294422944329444294452944629447294482944929450294512945229453294542945529456294572945829459294602946129462294632946429465294662946729468294692947029471294722947329474294752947629477294782947929480294812948229483294842948529486294872948829489294902949129492294932949429495294962949729498294992950029501295022950329504295052950629507295082950929510295112951229513295142951529516295172951829519295202952129522295232952429525295262952729528295292953029531295322953329534295352953629537295382953929540295412954229543295442954529546295472954829549295502955129552295532955429555295562955729558295592956029561295622956329564295652956629567295682956929570295712957229573295742957529576295772957829579295802958129582295832958429585295862958729588295892959029591295922959329594295952959629597295982959929600296012960229603296042960529606296072960829609296102961129612296132961429615296162961729618296192962029621296222962329624296252962629627296282962929630296312963229633296342963529636296372963829639296402964129642296432964429645296462964729648296492965029651296522965329654296552965629657296582965929660296612966229663296642966529666296672966829669296702967129672296732967429675296762967729678296792968029681296822968329684296852968629687296882968929690296912969229693296942969529696296972969829699297002970129702297032970429705297062970729708297092971029711297122971329714297152971629717297182971929720297212972229723297242972529726297272972829729297302973129732297332973429735297362973729738297392974029741297422974329744297452974629747297482974929750297512975229753297542975529756297572975829759297602976129762297632976429765297662976729768297692977029771297722977329774297752977629777297782977929780297812978229783297842978529786297872978829789297902979129792297932979429795297962979729798297992980029801298022980329804298052980629807298082980929810298112981229813298142981529816298172981829819298202982129822298232982429825298262982729828298292983029831298322983329834298352983629837298382983929840298412984229843298442984529846298472984829849298502985129852298532985429855298562985729858298592986029861298622986329864298652986629867298682986929870298712987229873298742987529876298772987829879298802988129882298832988429885298862988729888298892989029891298922989329894298952989629897298982989929900299012990229903299042990529906299072990829909299102991129912299132991429915299162991729918299192992029921299222992329924299252992629927299282992929930299312993229933299342993529936299372993829939299402994129942299432994429945299462994729948299492995029951299522995329954299552995629957299582995929960299612996229963299642996529966299672996829969299702997129972299732997429975299762997729978299792998029981299822998329984299852998629987299882998929990299912999229993299942999529996299972999829999300003000130002300033000430005300063000730008300093001030011300123001330014300153001630017300183001930020300213002230023300243002530026300273002830029300303003130032300333003430035300363003730038300393004030041300423004330044300453004630047300483004930050300513005230053300543005530056300573005830059300603006130062300633006430065300663006730068300693007030071300723007330074300753007630077300783007930080300813008230083300843008530086300873008830089300903009130092300933009430095300963009730098300993010030101301023010330104301053010630107301083010930110301113011230113301143011530116301173011830119301203012130122301233012430125301263012730128301293013030131301323013330134301353013630137301383013930140301413014230143301443014530146301473014830149301503015130152301533015430155301563015730158301593016030161301623016330164301653016630167301683016930170301713017230173301743017530176301773017830179301803018130182301833018430185301863018730188301893019030191301923019330194301953019630197301983019930200302013020230203302043020530206302073020830209302103021130212302133021430215302163021730218302193022030221302223022330224302253022630227302283022930230302313023230233302343023530236302373023830239302403024130242302433024430245302463024730248302493025030251302523025330254302553025630257302583025930260302613026230263302643026530266302673026830269302703027130272302733027430275302763027730278302793028030281302823028330284302853028630287302883028930290302913029230293302943029530296302973029830299303003030130302303033030430305303063030730308303093031030311303123031330314303153031630317303183031930320303213032230323303243032530326303273032830329303303033130332303333033430335303363033730338303393034030341303423034330344303453034630347303483034930350303513035230353303543035530356303573035830359303603036130362303633036430365303663036730368303693037030371303723037330374303753037630377303783037930380303813038230383303843038530386303873038830389303903039130392303933039430395303963039730398303993040030401304023040330404304053040630407304083040930410304113041230413304143041530416304173041830419304203042130422304233042430425304263042730428304293043030431304323043330434304353043630437304383043930440304413044230443304443044530446304473044830449304503045130452304533045430455304563045730458304593046030461304623046330464304653046630467304683046930470304713047230473304743047530476304773047830479304803048130482304833048430485304863048730488304893049030491304923049330494304953049630497304983049930500305013050230503305043050530506305073050830509305103051130512305133051430515305163051730518305193052030521305223052330524305253052630527305283052930530305313053230533305343053530536305373053830539305403054130542305433054430545305463054730548305493055030551305523055330554305553055630557305583055930560305613056230563305643056530566305673056830569305703057130572305733057430575305763057730578305793058030581305823058330584305853058630587305883058930590305913059230593305943059530596305973059830599306003060130602306033060430605306063060730608306093061030611306123061330614306153061630617306183061930620306213062230623306243062530626306273062830629306303063130632306333063430635306363063730638306393064030641306423064330644306453064630647306483064930650306513065230653306543065530656306573065830659306603066130662306633066430665306663066730668306693067030671306723067330674306753067630677306783067930680306813068230683306843068530686306873068830689306903069130692306933069430695306963069730698306993070030701307023070330704307053070630707307083070930710307113071230713307143071530716307173071830719307203072130722307233072430725307263072730728307293073030731307323073330734307353073630737307383073930740307413074230743307443074530746307473074830749307503075130752307533075430755307563075730758307593076030761307623076330764307653076630767307683076930770307713077230773307743077530776307773077830779307803078130782307833078430785307863078730788307893079030791307923079330794307953079630797307983079930800308013080230803308043080530806308073080830809308103081130812308133081430815308163081730818308193082030821308223082330824308253082630827308283082930830308313083230833308343083530836308373083830839308403084130842308433084430845308463084730848308493085030851308523085330854308553085630857308583085930860308613086230863308643086530866308673086830869308703087130872308733087430875308763087730878308793088030881308823088330884308853088630887308883088930890308913089230893308943089530896308973089830899309003090130902309033090430905309063090730908309093091030911309123091330914309153091630917309183091930920309213092230923309243092530926309273092830929309303093130932309333093430935309363093730938309393094030941309423094330944309453094630947309483094930950309513095230953309543095530956309573095830959309603096130962309633096430965309663096730968309693097030971309723097330974309753097630977309783097930980309813098230983309843098530986309873098830989309903099130992309933099430995309963099730998309993100031001310023100331004310053100631007310083100931010310113101231013310143101531016310173101831019310203102131022310233102431025310263102731028310293103031031310323103331034310353103631037310383103931040310413104231043310443104531046310473104831049310503105131052310533105431055310563105731058310593106031061310623106331064310653106631067310683106931070310713107231073310743107531076310773107831079310803108131082310833108431085310863108731088310893109031091310923109331094310953109631097310983109931100311013110231103311043110531106311073110831109311103111131112311133111431115311163111731118311193112031121311223112331124311253112631127311283112931130311313113231133311343113531136311373113831139311403114131142311433114431145311463114731148311493115031151311523115331154311553115631157311583115931160311613116231163311643116531166311673116831169311703117131172311733117431175311763117731178311793118031181311823118331184311853118631187311883118931190311913119231193311943119531196311973119831199312003120131202312033120431205312063120731208312093121031211312123121331214312153121631217312183121931220312213122231223312243122531226312273122831229312303123131232312333123431235312363123731238312393124031241312423124331244312453124631247312483124931250312513125231253312543125531256312573125831259312603126131262312633126431265312663126731268312693127031271312723127331274312753127631277312783127931280312813128231283312843128531286312873128831289312903129131292312933129431295312963129731298312993130031301313023130331304313053130631307313083130931310313113131231313313143131531316313173131831319313203132131322313233132431325313263132731328313293133031331313323133331334313353133631337313383133931340313413134231343313443134531346313473134831349313503135131352313533135431355313563135731358313593136031361313623136331364313653136631367313683136931370313713137231373313743137531376313773137831379313803138131382313833138431385313863138731388313893139031391313923139331394313953139631397313983139931400314013140231403314043140531406314073140831409314103141131412314133141431415314163141731418314193142031421314223142331424314253142631427314283142931430314313143231433314343143531436314373143831439314403144131442314433144431445314463144731448314493145031451314523145331454314553145631457314583145931460314613146231463314643146531466314673146831469314703147131472314733147431475314763147731478314793148031481314823148331484314853148631487314883148931490314913149231493314943149531496314973149831499315003150131502315033150431505315063150731508315093151031511315123151331514315153151631517315183151931520315213152231523315243152531526315273152831529315303153131532315333153431535315363153731538315393154031541315423154331544315453154631547315483154931550315513155231553315543155531556315573155831559315603156131562315633156431565315663156731568315693157031571315723157331574315753157631577315783157931580315813158231583315843158531586315873158831589315903159131592315933159431595315963159731598315993160031601316023160331604316053160631607316083160931610316113161231613316143161531616316173161831619316203162131622316233162431625316263162731628316293163031631316323163331634316353163631637316383163931640316413164231643316443164531646316473164831649316503165131652316533165431655316563165731658316593166031661316623166331664316653166631667316683166931670316713167231673316743167531676316773167831679316803168131682316833168431685316863168731688316893169031691316923169331694316953169631697316983169931700317013170231703317043170531706317073170831709317103171131712317133171431715317163171731718317193172031721317223172331724317253172631727317283172931730317313173231733317343173531736317373173831739317403174131742317433174431745317463174731748317493175031751317523175331754317553175631757317583175931760317613176231763317643176531766317673176831769317703177131772317733177431775317763177731778317793178031781317823178331784317853178631787317883178931790317913179231793317943179531796317973179831799318003180131802318033180431805318063180731808318093181031811318123181331814318153181631817318183181931820318213182231823318243182531826318273182831829318303183131832318333183431835318363183731838318393184031841318423184331844318453184631847318483184931850318513185231853318543185531856318573185831859318603186131862318633186431865318663186731868318693187031871318723187331874318753187631877318783187931880318813188231883318843188531886318873188831889318903189131892318933189431895318963189731898318993190031901319023190331904319053190631907319083190931910319113191231913319143191531916319173191831919319203192131922319233192431925319263192731928319293193031931319323193331934319353193631937319383193931940319413194231943319443194531946319473194831949319503195131952319533195431955319563195731958319593196031961319623196331964319653196631967319683196931970319713197231973319743197531976319773197831979319803198131982319833198431985319863198731988319893199031991319923199331994319953199631997319983199932000320013200232003320043200532006320073200832009320103201132012320133201432015320163201732018320193202032021320223202332024320253202632027320283202932030320313203232033320343203532036320373203832039320403204132042320433204432045320463204732048320493205032051320523205332054320553205632057320583205932060320613206232063320643206532066320673206832069320703207132072320733207432075320763207732078320793208032081320823208332084320853208632087320883208932090320913209232093320943209532096320973209832099321003210132102321033210432105321063210732108321093211032111321123211332114321153211632117321183211932120321213212232123321243212532126321273212832129321303213132132321333213432135321363213732138321393214032141321423214332144321453214632147321483214932150321513215232153321543215532156321573215832159321603216132162321633216432165321663216732168321693217032171321723217332174321753217632177321783217932180321813218232183321843218532186321873218832189321903219132192321933219432195321963219732198321993220032201322023220332204322053220632207322083220932210322113221232213322143221532216322173221832219322203222132222322233222432225322263222732228322293223032231322323223332234322353223632237322383223932240322413224232243322443224532246322473224832249322503225132252322533225432255322563225732258322593226032261322623226332264322653226632267322683226932270322713227232273322743227532276322773227832279322803228132282322833228432285322863228732288322893229032291322923229332294322953229632297322983229932300323013230232303323043230532306323073230832309323103231132312323133231432315323163231732318323193232032321323223232332324323253232632327323283232932330323313233232333323343233532336323373233832339323403234132342323433234432345323463234732348323493235032351323523235332354323553235632357323583235932360323613236232363323643236532366323673236832369323703237132372323733237432375323763237732378323793238032381323823238332384323853238632387323883238932390323913239232393323943239532396323973239832399324003240132402324033240432405324063240732408324093241032411324123241332414324153241632417324183241932420324213242232423324243242532426324273242832429324303243132432324333243432435324363243732438324393244032441324423244332444324453244632447324483244932450324513245232453324543245532456324573245832459324603246132462324633246432465324663246732468324693247032471324723247332474324753247632477324783247932480324813248232483324843248532486324873248832489324903249132492324933249432495324963249732498324993250032501325023250332504325053250632507325083250932510325113251232513325143251532516325173251832519325203252132522325233252432525325263252732528325293253032531325323253332534325353253632537325383253932540325413254232543325443254532546325473254832549325503255132552325533255432555325563255732558325593256032561325623256332564325653256632567325683256932570325713257232573325743257532576325773257832579325803258132582325833258432585325863258732588325893259032591325923259332594325953259632597325983259932600326013260232603326043260532606326073260832609326103261132612326133261432615326163261732618326193262032621326223262332624326253262632627326283262932630326313263232633326343263532636326373263832639326403264132642326433264432645326463264732648326493265032651326523265332654326553265632657326583265932660326613266232663326643266532666326673266832669326703267132672326733267432675326763267732678326793268032681326823268332684326853268632687326883268932690326913269232693326943269532696326973269832699327003270132702327033270432705327063270732708327093271032711327123271332714327153271632717327183271932720327213272232723327243272532726327273272832729327303273132732327333273432735327363273732738327393274032741327423274332744327453274632747327483274932750327513275232753327543275532756327573275832759327603276132762327633276432765327663276732768327693277032771327723277332774327753277632777327783277932780327813278232783327843278532786327873278832789327903279132792327933279432795327963279732798327993280032801328023280332804328053280632807328083280932810328113281232813328143281532816328173281832819328203282132822328233282432825328263282732828328293283032831328323283332834328353283632837328383283932840328413284232843328443284532846328473284832849328503285132852328533285432855328563285732858328593286032861328623286332864328653286632867328683286932870328713287232873328743287532876328773287832879328803288132882328833288432885328863288732888328893289032891328923289332894328953289632897328983289932900329013290232903329043290532906329073290832909329103291132912329133291432915329163291732918329193292032921329223292332924329253292632927329283292932930329313293232933329343293532936329373293832939329403294132942329433294432945329463294732948329493295032951329523295332954329553295632957329583295932960329613296232963329643296532966329673296832969329703297132972329733297432975329763297732978329793298032981329823298332984329853298632987329883298932990329913299232993329943299532996329973299832999330003300133002330033300433005330063300733008330093301033011330123301333014330153301633017330183301933020330213302233023330243302533026330273302833029330303303133032330333303433035330363303733038330393304033041330423304333044330453304633047330483304933050330513305233053330543305533056330573305833059330603306133062330633306433065330663306733068330693307033071330723307333074330753307633077330783307933080330813308233083330843308533086330873308833089330903309133092330933309433095330963309733098330993310033101331023310333104331053310633107331083310933110331113311233113331143311533116331173311833119331203312133122331233312433125331263312733128331293313033131331323313333134331353313633137331383313933140331413314233143331443314533146331473314833149331503315133152331533315433155331563315733158331593316033161331623316333164331653316633167331683316933170331713317233173331743317533176331773317833179331803318133182331833318433185331863318733188331893319033191331923319333194331953319633197331983319933200332013320233203332043320533206332073320833209332103321133212332133321433215332163321733218332193322033221332223322333224332253322633227332283322933230332313323233233332343323533236332373323833239332403324133242332433324433245332463324733248332493325033251332523325333254332553325633257332583325933260332613326233263332643326533266332673326833269332703327133272332733327433275332763327733278332793328033281332823328333284332853328633287332883328933290332913329233293332943329533296332973329833299333003330133302333033330433305333063330733308333093331033311333123331333314333153331633317333183331933320333213332233323333243332533326333273332833329333303333133332333333333433335333363333733338333393334033341333423334333344333453334633347333483334933350333513335233353333543335533356333573335833359333603336133362333633336433365333663336733368333693337033371333723337333374333753337633377333783337933380333813338233383333843338533386333873338833389333903339133392333933339433395333963339733398333993340033401334023340333404334053340633407334083340933410334113341233413334143341533416334173341833419334203342133422334233342433425334263342733428334293343033431334323343333434334353343633437334383343933440334413344233443334443344533446334473344833449334503345133452334533345433455334563345733458334593346033461334623346333464334653346633467334683346933470334713347233473334743347533476334773347833479334803348133482334833348433485334863348733488334893349033491334923349333494334953349633497334983349933500335013350233503335043350533506335073350833509335103351133512335133351433515335163351733518335193352033521335223352333524335253352633527335283352933530335313353233533335343353533536335373353833539335403354133542335433354433545335463354733548335493355033551335523355333554335553355633557335583355933560335613356233563335643356533566335673356833569335703357133572335733357433575335763357733578335793358033581335823358333584335853358633587335883358933590335913359233593335943359533596335973359833599336003360133602336033360433605336063360733608336093361033611336123361333614336153361633617336183361933620336213362233623336243362533626336273362833629336303363133632336333363433635336363363733638336393364033641336423364333644336453364633647336483364933650336513365233653336543365533656336573365833659336603366133662336633366433665336663366733668336693367033671336723367333674336753367633677336783367933680336813368233683336843368533686336873368833689336903369133692336933369433695336963369733698336993370033701337023370333704337053370633707337083370933710337113371233713337143371533716337173371833719337203372133722337233372433725337263372733728337293373033731337323373333734337353373633737337383373933740337413374233743337443374533746337473374833749337503375133752337533375433755337563375733758337593376033761337623376333764337653376633767337683376933770337713377233773337743377533776337773377833779337803378133782337833378433785337863378733788337893379033791337923379333794337953379633797337983379933800338013380233803338043380533806338073380833809338103381133812338133381433815338163381733818338193382033821338223382333824338253382633827338283382933830338313383233833338343383533836338373383833839338403384133842338433384433845338463384733848338493385033851338523385333854338553385633857338583385933860338613386233863338643386533866338673386833869338703387133872338733387433875338763387733878338793388033881338823388333884338853388633887338883388933890338913389233893338943389533896338973389833899339003390133902339033390433905339063390733908339093391033911339123391333914339153391633917339183391933920339213392233923339243392533926339273392833929339303393133932339333393433935339363393733938339393394033941339423394333944339453394633947339483394933950339513395233953339543395533956339573395833959339603396133962339633396433965339663396733968339693397033971339723397333974339753397633977339783397933980339813398233983339843398533986339873398833989339903399133992339933399433995339963399733998339993400034001340023400334004340053400634007340083400934010340113401234013340143401534016340173401834019340203402134022340233402434025340263402734028340293403034031340323403334034340353403634037340383403934040340413404234043340443404534046340473404834049340503405134052340533405434055340563405734058340593406034061340623406334064340653406634067340683406934070340713407234073340743407534076340773407834079340803408134082340833408434085340863408734088340893409034091340923409334094340953409634097340983409934100341013410234103341043410534106341073410834109341103411134112341133411434115341163411734118341193412034121341223412334124341253412634127341283412934130341313413234133341343413534136341373413834139341403414134142341433414434145341463414734148341493415034151341523415334154341553415634157341583415934160341613416234163341643416534166341673416834169341703417134172341733417434175341763417734178341793418034181341823418334184341853418634187341883418934190341913419234193341943419534196341973419834199342003420134202342033420434205342063420734208342093421034211342123421334214342153421634217342183421934220342213422234223342243422534226342273422834229342303423134232342333423434235342363423734238342393424034241342423424334244342453424634247342483424934250342513425234253342543425534256342573425834259342603426134262342633426434265342663426734268342693427034271342723427334274342753427634277342783427934280342813428234283342843428534286342873428834289342903429134292342933429434295342963429734298342993430034301343023430334304343053430634307343083430934310343113431234313343143431534316343173431834319343203432134322343233432434325343263432734328343293433034331343323433334334343353433634337343383433934340343413434234343343443434534346343473434834349343503435134352343533435434355343563435734358343593436034361343623436334364343653436634367343683436934370343713437234373343743437534376343773437834379343803438134382343833438434385343863438734388343893439034391343923439334394343953439634397343983439934400344013440234403344043440534406344073440834409344103441134412344133441434415344163441734418344193442034421344223442334424344253442634427344283442934430344313443234433344343443534436344373443834439344403444134442344433444434445344463444734448344493445034451344523445334454344553445634457344583445934460344613446234463344643446534466344673446834469344703447134472344733447434475344763447734478344793448034481344823448334484344853448634487344883448934490344913449234493344943449534496344973449834499345003450134502345033450434505345063450734508345093451034511345123451334514345153451634517345183451934520345213452234523345243452534526345273452834529345303453134532345333453434535345363453734538345393454034541345423454334544345453454634547345483454934550345513455234553345543455534556345573455834559345603456134562345633456434565345663456734568345693457034571345723457334574345753457634577345783457934580345813458234583345843458534586345873458834589345903459134592345933459434595345963459734598345993460034601346023460334604346053460634607346083460934610346113461234613346143461534616346173461834619346203462134622346233462434625346263462734628346293463034631346323463334634346353463634637346383463934640346413464234643346443464534646346473464834649346503465134652346533465434655346563465734658346593466034661346623466334664346653466634667346683466934670346713467234673346743467534676346773467834679346803468134682346833468434685346863468734688346893469034691346923469334694346953469634697346983469934700347013470234703347043470534706347073470834709347103471134712347133471434715347163471734718347193472034721347223472334724347253472634727347283472934730347313473234733347343473534736347373473834739347403474134742347433474434745347463474734748347493475034751347523475334754347553475634757347583475934760347613476234763347643476534766347673476834769347703477134772347733477434775347763477734778347793478034781347823478334784347853478634787347883478934790347913479234793347943479534796347973479834799348003480134802348033480434805348063480734808348093481034811348123481334814348153481634817348183481934820348213482234823348243482534826348273482834829348303483134832348333483434835348363483734838348393484034841348423484334844348453484634847348483484934850348513485234853348543485534856348573485834859348603486134862348633486434865348663486734868348693487034871348723487334874348753487634877348783487934880348813488234883348843488534886348873488834889348903489134892348933489434895348963489734898348993490034901349023490334904349053490634907349083490934910349113491234913349143491534916349173491834919349203492134922349233492434925349263492734928349293493034931349323493334934349353493634937349383493934940349413494234943349443494534946349473494834949349503495134952349533495434955349563495734958349593496034961349623496334964349653496634967349683496934970349713497234973349743497534976349773497834979349803498134982349833498434985349863498734988349893499034991349923499334994349953499634997349983499935000350013500235003350043500535006350073500835009350103501135012350133501435015350163501735018350193502035021350223502335024350253502635027350283502935030350313503235033350343503535036350373503835039350403504135042350433504435045350463504735048350493505035051350523505335054350553505635057350583505935060350613506235063350643506535066350673506835069350703507135072350733507435075350763507735078350793508035081350823508335084350853508635087350883508935090350913509235093350943509535096350973509835099351003510135102351033510435105351063510735108351093511035111351123511335114351153511635117351183511935120351213512235123351243512535126351273512835129351303513135132351333513435135351363513735138351393514035141351423514335144351453514635147351483514935150351513515235153351543515535156351573515835159351603516135162351633516435165351663516735168351693517035171351723517335174351753517635177351783517935180351813518235183351843518535186351873518835189351903519135192351933519435195351963519735198351993520035201352023520335204352053520635207352083520935210352113521235213352143521535216352173521835219352203522135222352233522435225352263522735228352293523035231352323523335234352353523635237352383523935240352413524235243352443524535246352473524835249352503525135252352533525435255352563525735258352593526035261352623526335264352653526635267352683526935270352713527235273352743527535276352773527835279352803528135282352833528435285352863528735288352893529035291352923529335294352953529635297352983529935300353013530235303353043530535306353073530835309353103531135312353133531435315353163531735318353193532035321353223532335324353253532635327353283532935330353313533235333353343533535336353373533835339353403534135342353433534435345353463534735348353493535035351353523535335354353553535635357353583535935360353613536235363353643536535366353673536835369353703537135372353733537435375353763537735378353793538035381353823538335384353853538635387353883538935390353913539235393353943539535396353973539835399354003540135402354033540435405354063540735408354093541035411354123541335414354153541635417354183541935420354213542235423354243542535426354273542835429354303543135432354333543435435354363543735438354393544035441354423544335444354453544635447354483544935450354513545235453354543545535456354573545835459354603546135462354633546435465354663546735468354693547035471354723547335474354753547635477354783547935480354813548235483354843548535486354873548835489354903549135492354933549435495354963549735498354993550035501355023550335504355053550635507355083550935510355113551235513355143551535516355173551835519355203552135522355233552435525355263552735528355293553035531355323553335534355353553635537355383553935540355413554235543355443554535546355473554835549355503555135552355533555435555355563555735558355593556035561355623556335564355653556635567355683556935570355713557235573355743557535576355773557835579355803558135582355833558435585355863558735588355893559035591355923559335594355953559635597355983559935600356013560235603356043560535606356073560835609356103561135612356133561435615356163561735618356193562035621356223562335624356253562635627356283562935630356313563235633356343563535636356373563835639356403564135642356433564435645356463564735648356493565035651356523565335654356553565635657356583565935660356613566235663356643566535666356673566835669356703567135672356733567435675356763567735678356793568035681356823568335684356853568635687356883568935690356913569235693356943569535696356973569835699357003570135702357033570435705357063570735708357093571035711357123571335714357153571635717357183571935720357213572235723357243572535726357273572835729357303573135732357333573435735357363573735738357393574035741357423574335744357453574635747357483574935750357513575235753357543575535756357573575835759357603576135762357633576435765357663576735768357693577035771357723577335774357753577635777357783577935780357813578235783357843578535786357873578835789357903579135792357933579435795357963579735798357993580035801358023580335804358053580635807358083580935810358113581235813358143581535816358173581835819358203582135822358233582435825358263582735828358293583035831358323583335834358353583635837358383583935840358413584235843358443584535846358473584835849358503585135852358533585435855358563585735858358593586035861358623586335864358653586635867358683586935870358713587235873358743587535876358773587835879358803588135882358833588435885358863588735888358893589035891358923589335894358953589635897358983589935900359013590235903359043590535906359073590835909359103591135912359133591435915359163591735918359193592035921359223592335924359253592635927359283592935930359313593235933359343593535936359373593835939359403594135942359433594435945359463594735948359493595035951359523595335954359553595635957359583595935960359613596235963359643596535966359673596835969359703597135972359733597435975359763597735978359793598035981359823598335984359853598635987359883598935990359913599235993359943599535996359973599835999360003600136002360033600436005360063600736008360093601036011360123601336014360153601636017360183601936020360213602236023360243602536026360273602836029360303603136032360333603436035360363603736038360393604036041360423604336044360453604636047360483604936050360513605236053360543605536056360573605836059360603606136062360633606436065360663606736068360693607036071360723607336074360753607636077360783607936080360813608236083360843608536086360873608836089360903609136092360933609436095360963609736098360993610036101361023610336104361053610636107361083610936110361113611236113361143611536116361173611836119361203612136122361233612436125361263612736128361293613036131361323613336134361353613636137361383613936140361413614236143361443614536146361473614836149361503615136152361533615436155361563615736158361593616036161361623616336164361653616636167361683616936170361713617236173361743617536176361773617836179361803618136182361833618436185361863618736188361893619036191361923619336194361953619636197361983619936200362013620236203362043620536206362073620836209362103621136212362133621436215362163621736218362193622036221362223622336224362253622636227362283622936230362313623236233362343623536236362373623836239362403624136242362433624436245362463624736248362493625036251362523625336254362553625636257362583625936260362613626236263362643626536266362673626836269362703627136272362733627436275362763627736278362793628036281362823628336284362853628636287362883628936290362913629236293362943629536296362973629836299363003630136302363033630436305363063630736308363093631036311363123631336314363153631636317363183631936320363213632236323363243632536326363273632836329363303633136332363333633436335363363633736338363393634036341363423634336344363453634636347363483634936350363513635236353363543635536356363573635836359363603636136362363633636436365363663636736368363693637036371363723637336374363753637636377363783637936380363813638236383363843638536386363873638836389363903639136392363933639436395363963639736398363993640036401364023640336404364053640636407364083640936410364113641236413364143641536416364173641836419364203642136422364233642436425364263642736428364293643036431364323643336434364353643636437364383643936440364413644236443364443644536446364473644836449364503645136452364533645436455364563645736458364593646036461364623646336464364653646636467364683646936470364713647236473364743647536476364773647836479364803648136482364833648436485364863648736488364893649036491364923649336494364953649636497364983649936500365013650236503365043650536506365073650836509365103651136512365133651436515365163651736518365193652036521365223652336524365253652636527365283652936530365313653236533365343653536536365373653836539365403654136542365433654436545365463654736548365493655036551365523655336554365553655636557365583655936560365613656236563365643656536566365673656836569365703657136572365733657436575365763657736578365793658036581365823658336584365853658636587365883658936590365913659236593365943659536596365973659836599366003660136602366033660436605366063660736608366093661036611366123661336614366153661636617366183661936620366213662236623366243662536626366273662836629366303663136632366333663436635366363663736638366393664036641366423664336644366453664636647366483664936650366513665236653366543665536656366573665836659366603666136662366633666436665366663666736668366693667036671366723667336674366753667636677366783667936680366813668236683366843668536686366873668836689366903669136692366933669436695366963669736698366993670036701367023670336704367053670636707367083670936710367113671236713367143671536716367173671836719367203672136722367233672436725367263672736728367293673036731367323673336734367353673636737367383673936740367413674236743367443674536746367473674836749367503675136752367533675436755367563675736758367593676036761367623676336764367653676636767367683676936770367713677236773367743677536776367773677836779367803678136782367833678436785367863678736788367893679036791367923679336794367953679636797367983679936800368013680236803368043680536806368073680836809368103681136812368133681436815368163681736818368193682036821368223682336824368253682636827368283682936830368313683236833368343683536836368373683836839368403684136842368433684436845368463684736848368493685036851368523685336854368553685636857368583685936860368613686236863368643686536866368673686836869368703687136872368733687436875368763687736878368793688036881368823688336884368853688636887368883688936890368913689236893368943689536896368973689836899369003690136902369033690436905369063690736908369093691036911369123691336914369153691636917369183691936920369213692236923369243692536926369273692836929369303693136932369333693436935369363693736938369393694036941369423694336944369453694636947369483694936950369513695236953369543695536956369573695836959369603696136962369633696436965369663696736968369693697036971369723697336974369753697636977369783697936980369813698236983369843698536986369873698836989369903699136992369933699436995369963699736998369993700037001370023700337004370053700637007370083700937010370113701237013370143701537016370173701837019370203702137022370233702437025370263702737028370293703037031370323703337034370353703637037370383703937040370413704237043370443704537046370473704837049370503705137052370533705437055370563705737058370593706037061370623706337064370653706637067370683706937070370713707237073370743707537076370773707837079370803708137082370833708437085370863708737088370893709037091370923709337094370953709637097370983709937100371013710237103371043710537106371073710837109371103711137112371133711437115371163711737118371193712037121371223712337124371253712637127371283712937130371313713237133371343713537136371373713837139371403714137142371433714437145371463714737148371493715037151371523715337154371553715637157371583715937160371613716237163371643716537166371673716837169371703717137172371733717437175371763717737178371793718037181371823718337184371853718637187371883718937190371913719237193371943719537196371973719837199372003720137202372033720437205372063720737208372093721037211372123721337214372153721637217372183721937220372213722237223372243722537226372273722837229372303723137232372333723437235372363723737238372393724037241372423724337244372453724637247372483724937250372513725237253372543725537256372573725837259372603726137262372633726437265372663726737268372693727037271372723727337274372753727637277372783727937280372813728237283372843728537286372873728837289372903729137292372933729437295372963729737298372993730037301373023730337304373053730637307373083730937310373113731237313373143731537316373173731837319373203732137322373233732437325373263732737328373293733037331373323733337334373353733637337373383733937340373413734237343373443734537346373473734837349373503735137352373533735437355373563735737358373593736037361373623736337364373653736637367373683736937370373713737237373373743737537376373773737837379373803738137382373833738437385373863738737388373893739037391373923739337394373953739637397373983739937400374013740237403374043740537406374073740837409374103741137412374133741437415374163741737418374193742037421374223742337424374253742637427374283742937430374313743237433374343743537436374373743837439374403744137442374433744437445374463744737448374493745037451374523745337454374553745637457374583745937460374613746237463374643746537466374673746837469374703747137472374733747437475374763747737478374793748037481374823748337484374853748637487374883748937490374913749237493374943749537496374973749837499375003750137502375033750437505375063750737508375093751037511375123751337514375153751637517375183751937520375213752237523375243752537526375273752837529375303753137532375333753437535375363753737538375393754037541375423754337544375453754637547375483754937550375513755237553375543755537556375573755837559375603756137562375633756437565375663756737568375693757037571375723757337574375753757637577375783757937580375813758237583375843758537586375873758837589375903759137592375933759437595375963759737598375993760037601376023760337604376053760637607376083760937610376113761237613376143761537616376173761837619376203762137622376233762437625376263762737628376293763037631376323763337634376353763637637376383763937640376413764237643376443764537646376473764837649376503765137652376533765437655376563765737658376593766037661376623766337664376653766637667376683766937670376713767237673376743767537676376773767837679376803768137682376833768437685376863768737688376893769037691376923769337694376953769637697376983769937700377013770237703377043770537706377073770837709377103771137712377133771437715377163771737718377193772037721377223772337724377253772637727377283772937730377313773237733377343773537736377373773837739377403774137742377433774437745377463774737748377493775037751377523775337754377553775637757377583775937760377613776237763377643776537766377673776837769377703777137772377733777437775377763777737778377793778037781377823778337784377853778637787377883778937790377913779237793377943779537796377973779837799378003780137802378033780437805378063780737808378093781037811378123781337814378153781637817378183781937820378213782237823378243782537826378273782837829378303783137832378333783437835378363783737838378393784037841378423784337844378453784637847378483784937850378513785237853378543785537856378573785837859378603786137862378633786437865378663786737868378693787037871378723787337874378753787637877378783787937880378813788237883378843788537886378873788837889378903789137892378933789437895378963789737898378993790037901379023790337904379053790637907379083790937910379113791237913379143791537916379173791837919379203792137922379233792437925379263792737928379293793037931379323793337934379353793637937379383793937940379413794237943379443794537946379473794837949379503795137952379533795437955379563795737958379593796037961379623796337964379653796637967379683796937970379713797237973379743797537976379773797837979379803798137982379833798437985379863798737988379893799037991379923799337994379953799637997379983799938000380013800238003380043800538006380073800838009380103801138012380133801438015380163801738018380193802038021380223802338024380253802638027380283802938030380313803238033380343803538036380373803838039380403804138042380433804438045380463804738048380493805038051380523805338054380553805638057380583805938060380613806238063380643806538066380673806838069380703807138072380733807438075380763807738078380793808038081380823808338084380853808638087380883808938090380913809238093380943809538096380973809838099381003810138102381033810438105381063810738108381093811038111381123811338114381153811638117381183811938120381213812238123381243812538126381273812838129381303813138132381333813438135381363813738138381393814038141381423814338144381453814638147381483814938150381513815238153381543815538156381573815838159381603816138162381633816438165381663816738168381693817038171381723817338174381753817638177381783817938180381813818238183381843818538186381873818838189381903819138192381933819438195381963819738198381993820038201382023820338204382053820638207382083820938210382113821238213382143821538216382173821838219382203822138222382233822438225382263822738228382293823038231382323823338234382353823638237382383823938240382413824238243382443824538246382473824838249382503825138252382533825438255382563825738258382593826038261382623826338264382653826638267382683826938270382713827238273382743827538276382773827838279382803828138282382833828438285382863828738288382893829038291382923829338294382953829638297382983829938300383013830238303383043830538306383073830838309383103831138312383133831438315383163831738318383193832038321383223832338324383253832638327383283832938330383313833238333383343833538336383373833838339383403834138342383433834438345383463834738348383493835038351383523835338354383553835638357383583835938360383613836238363383643836538366383673836838369383703837138372383733837438375383763837738378383793838038381383823838338384383853838638387383883838938390383913839238393383943839538396383973839838399384003840138402384033840438405384063840738408384093841038411384123841338414384153841638417384183841938420384213842238423384243842538426384273842838429384303843138432384333843438435384363843738438384393844038441384423844338444384453844638447384483844938450384513845238453384543845538456384573845838459384603846138462384633846438465384663846738468384693847038471384723847338474384753847638477384783847938480384813848238483384843848538486384873848838489384903849138492384933849438495384963849738498384993850038501385023850338504385053850638507385083850938510385113851238513385143851538516385173851838519385203852138522385233852438525385263852738528385293853038531385323853338534385353853638537385383853938540385413854238543385443854538546385473854838549385503855138552385533855438555385563855738558385593856038561385623856338564385653856638567385683856938570385713857238573385743857538576385773857838579385803858138582385833858438585385863858738588385893859038591385923859338594385953859638597385983859938600386013860238603386043860538606386073860838609386103861138612386133861438615386163861738618386193862038621386223862338624386253862638627386283862938630386313863238633386343863538636386373863838639386403864138642386433864438645386463864738648386493865038651386523865338654386553865638657386583865938660386613866238663386643866538666386673866838669386703867138672386733867438675386763867738678386793868038681386823868338684386853868638687386883868938690386913869238693386943869538696386973869838699387003870138702387033870438705387063870738708387093871038711387123871338714387153871638717387183871938720387213872238723387243872538726387273872838729387303873138732387333873438735387363873738738387393874038741387423874338744387453874638747387483874938750387513875238753387543875538756387573875838759387603876138762387633876438765387663876738768387693877038771387723877338774387753877638777387783877938780387813878238783387843878538786387873878838789387903879138792387933879438795387963879738798387993880038801388023880338804388053880638807388083880938810388113881238813388143881538816388173881838819388203882138822388233882438825388263882738828388293883038831388323883338834388353883638837388383883938840388413884238843388443884538846388473884838849388503885138852388533885438855388563885738858388593886038861388623886338864388653886638867388683886938870388713887238873388743887538876388773887838879388803888138882388833888438885388863888738888388893889038891388923889338894388953889638897388983889938900389013890238903389043890538906389073890838909389103891138912389133891438915389163891738918389193892038921389223892338924389253892638927389283892938930389313893238933389343893538936389373893838939389403894138942389433894438945389463894738948389493895038951389523895338954389553895638957389583895938960389613896238963389643896538966389673896838969389703897138972389733897438975389763897738978389793898038981389823898338984389853898638987389883898938990389913899238993389943899538996389973899838999390003900139002390033900439005390063900739008390093901039011390123901339014390153901639017390183901939020390213902239023390243902539026390273902839029390303903139032390333903439035390363903739038390393904039041390423904339044390453904639047390483904939050390513905239053390543905539056390573905839059390603906139062390633906439065390663906739068390693907039071390723907339074390753907639077390783907939080390813908239083390843908539086390873908839089390903909139092390933909439095390963909739098390993910039101391023910339104391053910639107391083910939110391113911239113391143911539116391173911839119391203912139122391233912439125391263912739128391293913039131391323913339134391353913639137391383913939140391413914239143391443914539146391473914839149391503915139152391533915439155391563915739158391593916039161391623916339164391653916639167391683916939170391713917239173391743917539176391773917839179391803918139182391833918439185391863918739188391893919039191391923919339194391953919639197391983919939200392013920239203392043920539206392073920839209392103921139212392133921439215392163921739218392193922039221392223922339224392253922639227392283922939230392313923239233392343923539236392373923839239392403924139242392433924439245392463924739248392493925039251392523925339254392553925639257392583925939260392613926239263392643926539266392673926839269392703927139272392733927439275392763927739278392793928039281392823928339284392853928639287392883928939290392913929239293392943929539296392973929839299393003930139302393033930439305393063930739308393093931039311393123931339314393153931639317393183931939320393213932239323393243932539326393273932839329393303933139332393333933439335393363933739338393393934039341393423934339344393453934639347393483934939350393513935239353393543935539356393573935839359393603936139362393633936439365393663936739368393693937039371393723937339374393753937639377393783937939380393813938239383393843938539386393873938839389393903939139392393933939439395393963939739398393993940039401394023940339404394053940639407394083940939410394113941239413394143941539416394173941839419394203942139422394233942439425394263942739428394293943039431394323943339434394353943639437394383943939440394413944239443394443944539446394473944839449394503945139452394533945439455394563945739458394593946039461394623946339464394653946639467394683946939470394713947239473394743947539476394773947839479394803948139482394833948439485394863948739488394893949039491394923949339494394953949639497394983949939500395013950239503395043950539506395073950839509395103951139512395133951439515395163951739518395193952039521395223952339524395253952639527395283952939530395313953239533395343953539536395373953839539395403954139542395433954439545395463954739548395493955039551395523955339554395553955639557395583955939560395613956239563395643956539566395673956839569395703957139572395733957439575395763957739578395793958039581395823958339584395853958639587395883958939590395913959239593395943959539596395973959839599396003960139602396033960439605396063960739608396093961039611396123961339614396153961639617396183961939620396213962239623396243962539626396273962839629396303963139632396333963439635396363963739638396393964039641396423964339644396453964639647396483964939650396513965239653396543965539656396573965839659396603966139662396633966439665396663966739668396693967039671396723967339674396753967639677396783967939680396813968239683396843968539686396873968839689396903969139692396933969439695396963969739698396993970039701397023970339704397053970639707397083970939710397113971239713397143971539716397173971839719397203972139722397233972439725397263972739728397293973039731397323973339734397353973639737397383973939740397413974239743397443974539746397473974839749397503975139752397533975439755397563975739758397593976039761397623976339764397653976639767397683976939770397713977239773397743977539776397773977839779397803978139782397833978439785397863978739788397893979039791397923979339794397953979639797397983979939800398013980239803398043980539806398073980839809398103981139812398133981439815398163981739818398193982039821398223982339824398253982639827398283982939830398313983239833398343983539836398373983839839398403984139842398433984439845398463984739848398493985039851398523985339854398553985639857398583985939860398613986239863398643986539866398673986839869398703987139872398733987439875398763987739878398793988039881398823988339884398853988639887398883988939890398913989239893398943989539896398973989839899399003990139902399033990439905399063990739908399093991039911399123991339914399153991639917399183991939920399213992239923399243992539926399273992839929399303993139932399333993439935399363993739938399393994039941399423994339944399453994639947399483994939950399513995239953399543995539956399573995839959399603996139962399633996439965399663996739968399693997039971399723997339974399753997639977399783997939980399813998239983399843998539986399873998839989399903999139992399933999439995399963999739998399994000040001400024000340004400054000640007400084000940010400114001240013400144001540016400174001840019400204002140022400234002440025400264002740028400294003040031400324003340034400354003640037400384003940040400414004240043400444004540046400474004840049400504005140052400534005440055400564005740058400594006040061400624006340064400654006640067400684006940070400714007240073400744007540076400774007840079400804008140082400834008440085400864008740088400894009040091400924009340094400954009640097400984009940100401014010240103401044010540106401074010840109401104011140112401134011440115401164011740118401194012040121401224012340124401254012640127401284012940130401314013240133401344013540136401374013840139401404014140142401434014440145401464014740148401494015040151401524015340154401554015640157401584015940160401614016240163401644016540166401674016840169401704017140172401734017440175401764017740178401794018040181401824018340184401854018640187401884018940190401914019240193401944019540196401974019840199402004020140202402034020440205402064020740208402094021040211402124021340214402154021640217402184021940220402214022240223402244022540226402274022840229402304023140232402334023440235402364023740238402394024040241402424024340244402454024640247402484024940250402514025240253402544025540256402574025840259402604026140262402634026440265402664026740268402694027040271402724027340274402754027640277402784027940280402814028240283402844028540286402874028840289402904029140292402934029440295402964029740298402994030040301403024030340304403054030640307403084030940310403114031240313403144031540316403174031840319403204032140322403234032440325403264032740328403294033040331403324033340334403354033640337403384033940340403414034240343403444034540346403474034840349403504035140352403534035440355403564035740358403594036040361403624036340364403654036640367403684036940370403714037240373403744037540376403774037840379403804038140382403834038440385403864038740388403894039040391403924039340394403954039640397403984039940400404014040240403404044040540406404074040840409404104041140412404134041440415404164041740418404194042040421404224042340424404254042640427404284042940430404314043240433404344043540436404374043840439404404044140442404434044440445404464044740448404494045040451404524045340454404554045640457404584045940460404614046240463404644046540466404674046840469404704047140472404734047440475404764047740478404794048040481404824048340484404854048640487404884048940490404914049240493404944049540496404974049840499405004050140502405034050440505405064050740508405094051040511405124051340514405154051640517405184051940520405214052240523405244052540526405274052840529405304053140532405334053440535405364053740538405394054040541405424054340544405454054640547405484054940550405514055240553405544055540556405574055840559405604056140562405634056440565405664056740568405694057040571405724057340574405754057640577405784057940580405814058240583405844058540586405874058840589405904059140592405934059440595405964059740598405994060040601406024060340604406054060640607406084060940610406114061240613406144061540616406174061840619406204062140622406234062440625406264062740628406294063040631406324063340634406354063640637406384063940640406414064240643406444064540646406474064840649406504065140652406534065440655406564065740658406594066040661406624066340664406654066640667406684066940670406714067240673406744067540676406774067840679406804068140682406834068440685406864068740688406894069040691406924069340694406954069640697406984069940700407014070240703407044070540706407074070840709407104071140712407134071440715407164071740718407194072040721407224072340724407254072640727407284072940730407314073240733407344073540736407374073840739407404074140742407434074440745407464074740748407494075040751407524075340754407554075640757407584075940760407614076240763407644076540766407674076840769407704077140772407734077440775407764077740778407794078040781407824078340784407854078640787407884078940790407914079240793407944079540796407974079840799408004080140802408034080440805408064080740808408094081040811408124081340814408154081640817408184081940820408214082240823408244082540826408274082840829408304083140832408334083440835408364083740838408394084040841408424084340844408454084640847408484084940850408514085240853408544085540856408574085840859408604086140862408634086440865408664086740868408694087040871408724087340874408754087640877408784087940880408814088240883408844088540886408874088840889408904089140892408934089440895408964089740898408994090040901409024090340904409054090640907409084090940910409114091240913409144091540916409174091840919409204092140922409234092440925409264092740928409294093040931409324093340934409354093640937409384093940940409414094240943409444094540946409474094840949409504095140952409534095440955409564095740958409594096040961409624096340964409654096640967409684096940970409714097240973409744097540976409774097840979409804098140982409834098440985409864098740988409894099040991409924099340994409954099640997409984099941000410014100241003410044100541006410074100841009410104101141012410134101441015410164101741018410194102041021410224102341024410254102641027410284102941030410314103241033410344103541036410374103841039410404104141042410434104441045410464104741048410494105041051410524105341054410554105641057410584105941060410614106241063410644106541066410674106841069410704107141072410734107441075410764107741078410794108041081410824108341084410854108641087410884108941090410914109241093410944109541096410974109841099411004110141102411034110441105411064110741108411094111041111411124111341114411154111641117411184111941120411214112241123411244112541126411274112841129411304113141132411334113441135411364113741138411394114041141411424114341144411454114641147411484114941150411514115241153411544115541156411574115841159411604116141162411634116441165411664116741168411694117041171411724117341174411754117641177411784117941180411814118241183411844118541186411874118841189411904119141192411934119441195411964119741198411994120041201412024120341204412054120641207412084120941210412114121241213412144121541216412174121841219412204122141222412234122441225412264122741228412294123041231412324123341234412354123641237412384123941240412414124241243412444124541246412474124841249412504125141252412534125441255412564125741258412594126041261412624126341264412654126641267412684126941270412714127241273412744127541276412774127841279412804128141282412834128441285412864128741288412894129041291412924129341294412954129641297412984129941300413014130241303413044130541306413074130841309413104131141312413134131441315413164131741318413194132041321413224132341324413254132641327413284132941330413314133241333413344133541336413374133841339413404134141342413434134441345413464134741348413494135041351413524135341354413554135641357413584135941360413614136241363413644136541366413674136841369413704137141372413734137441375413764137741378413794138041381413824138341384413854138641387413884138941390413914139241393413944139541396413974139841399414004140141402414034140441405414064140741408414094141041411414124141341414414154141641417414184141941420414214142241423414244142541426414274142841429414304143141432414334143441435414364143741438414394144041441414424144341444414454144641447414484144941450414514145241453414544145541456414574145841459414604146141462414634146441465414664146741468414694147041471414724147341474414754147641477414784147941480414814148241483414844148541486414874148841489414904149141492414934149441495414964149741498414994150041501415024150341504415054150641507415084150941510415114151241513415144151541516415174151841519415204152141522415234152441525415264152741528415294153041531415324153341534415354153641537415384153941540415414154241543415444154541546415474154841549415504155141552415534155441555415564155741558415594156041561415624156341564415654156641567415684156941570415714157241573415744157541576415774157841579415804158141582415834158441585415864158741588415894159041591415924159341594415954159641597415984159941600416014160241603416044160541606416074160841609416104161141612416134161441615416164161741618416194162041621416224162341624416254162641627416284162941630416314163241633416344163541636416374163841639416404164141642416434164441645416464164741648416494165041651416524165341654416554165641657416584165941660416614166241663416644166541666416674166841669416704167141672416734167441675416764167741678416794168041681416824168341684416854168641687416884168941690416914169241693416944169541696416974169841699417004170141702417034170441705417064170741708417094171041711417124171341714417154171641717417184171941720417214172241723417244172541726417274172841729417304173141732417334173441735417364173741738417394174041741417424174341744417454174641747417484174941750417514175241753417544175541756417574175841759417604176141762417634176441765417664176741768417694177041771417724177341774417754177641777417784177941780417814178241783417844178541786417874178841789417904179141792417934179441795417964179741798417994180041801418024180341804418054180641807418084180941810418114181241813418144181541816418174181841819418204182141822418234182441825418264182741828418294183041831418324183341834418354183641837418384183941840418414184241843418444184541846418474184841849418504185141852418534185441855418564185741858418594186041861418624186341864418654186641867418684186941870418714187241873418744187541876418774187841879418804188141882418834188441885418864188741888418894189041891418924189341894418954189641897418984189941900419014190241903419044190541906419074190841909419104191141912419134191441915419164191741918419194192041921419224192341924419254192641927419284192941930419314193241933419344193541936419374193841939419404194141942419434194441945419464194741948419494195041951419524195341954419554195641957419584195941960419614196241963419644196541966419674196841969419704197141972419734197441975419764197741978419794198041981419824198341984419854198641987419884198941990419914199241993419944199541996419974199841999420004200142002420034200442005420064200742008420094201042011420124201342014420154201642017420184201942020420214202242023420244202542026420274202842029420304203142032420334203442035420364203742038420394204042041420424204342044420454204642047420484204942050420514205242053420544205542056420574205842059420604206142062420634206442065420664206742068420694207042071420724207342074420754207642077420784207942080420814208242083420844208542086420874208842089420904209142092420934209442095420964209742098420994210042101421024210342104421054210642107421084210942110421114211242113421144211542116421174211842119421204212142122421234212442125421264212742128421294213042131421324213342134421354213642137421384213942140421414214242143421444214542146421474214842149421504215142152421534215442155421564215742158421594216042161421624216342164421654216642167421684216942170421714217242173421744217542176421774217842179421804218142182421834218442185421864218742188421894219042191421924219342194421954219642197421984219942200422014220242203422044220542206422074220842209422104221142212422134221442215422164221742218422194222042221422224222342224422254222642227422284222942230422314223242233422344223542236422374223842239422404224142242422434224442245422464224742248422494225042251422524225342254422554225642257422584225942260422614226242263422644226542266422674226842269422704227142272422734227442275422764227742278422794228042281422824228342284422854228642287422884228942290422914229242293422944229542296422974229842299423004230142302423034230442305423064230742308423094231042311423124231342314423154231642317423184231942320423214232242323423244232542326423274232842329423304233142332423334233442335423364233742338423394234042341423424234342344423454234642347423484234942350423514235242353423544235542356423574235842359423604236142362423634236442365423664236742368423694237042371423724237342374423754237642377423784237942380423814238242383423844238542386423874238842389423904239142392423934239442395423964239742398423994240042401424024240342404424054240642407424084240942410424114241242413424144241542416424174241842419424204242142422424234242442425424264242742428424294243042431424324243342434424354243642437424384243942440424414244242443424444244542446424474244842449424504245142452424534245442455424564245742458424594246042461424624246342464424654246642467424684246942470424714247242473424744247542476424774247842479424804248142482424834248442485424864248742488424894249042491424924249342494424954249642497424984249942500425014250242503425044250542506425074250842509425104251142512425134251442515425164251742518425194252042521425224252342524425254252642527425284252942530425314253242533425344253542536425374253842539425404254142542425434254442545425464254742548425494255042551425524255342554425554255642557425584255942560425614256242563425644256542566425674256842569425704257142572425734257442575425764257742578425794258042581425824258342584425854258642587425884258942590425914259242593425944259542596425974259842599426004260142602426034260442605426064260742608426094261042611426124261342614426154261642617426184261942620426214262242623426244262542626426274262842629426304263142632426334263442635426364263742638426394264042641426424264342644426454264642647426484264942650426514265242653426544265542656426574265842659426604266142662426634266442665426664266742668426694267042671426724267342674426754267642677426784267942680426814268242683426844268542686426874268842689426904269142692426934269442695426964269742698426994270042701427024270342704427054270642707427084270942710427114271242713427144271542716427174271842719427204272142722427234272442725427264272742728427294273042731427324273342734427354273642737427384273942740427414274242743427444274542746427474274842749427504275142752427534275442755427564275742758427594276042761427624276342764427654276642767427684276942770427714277242773427744277542776427774277842779427804278142782427834278442785427864278742788427894279042791427924279342794427954279642797427984279942800428014280242803428044280542806428074280842809428104281142812428134281442815428164281742818428194282042821428224282342824428254282642827428284282942830428314283242833428344283542836428374283842839428404284142842428434284442845428464284742848428494285042851428524285342854428554285642857428584285942860428614286242863428644286542866428674286842869428704287142872428734287442875428764287742878428794288042881428824288342884428854288642887428884288942890428914289242893428944289542896428974289842899429004290142902429034290442905429064290742908429094291042911429124291342914429154291642917429184291942920429214292242923429244292542926429274292842929429304293142932429334293442935429364293742938429394294042941429424294342944429454294642947429484294942950429514295242953429544295542956429574295842959429604296142962429634296442965429664296742968429694297042971429724297342974429754297642977429784297942980429814298242983429844298542986429874298842989429904299142992429934299442995429964299742998429994300043001430024300343004430054300643007430084300943010430114301243013430144301543016430174301843019430204302143022430234302443025430264302743028430294303043031430324303343034430354303643037430384303943040430414304243043430444304543046430474304843049430504305143052430534305443055430564305743058430594306043061430624306343064430654306643067430684306943070430714307243073430744307543076430774307843079430804308143082430834308443085430864308743088430894309043091430924309343094430954309643097430984309943100431014310243103431044310543106431074310843109431104311143112431134311443115431164311743118431194312043121431224312343124431254312643127431284312943130431314313243133431344313543136431374313843139431404314143142431434314443145431464314743148431494315043151431524315343154431554315643157431584315943160431614316243163431644316543166431674316843169431704317143172431734317443175431764317743178431794318043181431824318343184431854318643187431884318943190431914319243193431944319543196431974319843199432004320143202432034320443205432064320743208432094321043211432124321343214432154321643217432184321943220432214322243223432244322543226432274322843229432304323143232432334323443235432364323743238432394324043241432424324343244432454324643247432484324943250432514325243253432544325543256432574325843259432604326143262432634326443265432664326743268432694327043271432724327343274432754327643277432784327943280432814328243283432844328543286432874328843289432904329143292432934329443295432964329743298432994330043301433024330343304433054330643307433084330943310433114331243313433144331543316433174331843319433204332143322433234332443325433264332743328433294333043331433324333343334433354333643337433384333943340433414334243343433444334543346433474334843349433504335143352433534335443355433564335743358433594336043361433624336343364433654336643367433684336943370433714337243373433744337543376433774337843379433804338143382433834338443385433864338743388433894339043391433924339343394433954339643397433984339943400434014340243403434044340543406434074340843409434104341143412434134341443415434164341743418434194342043421434224342343424434254342643427434284342943430434314343243433434344343543436434374343843439434404344143442434434344443445434464344743448434494345043451434524345343454434554345643457434584345943460434614346243463434644346543466434674346843469434704347143472434734347443475434764347743478434794348043481434824348343484434854348643487434884348943490434914349243493434944349543496434974349843499435004350143502435034350443505435064350743508435094351043511435124351343514435154351643517435184351943520435214352243523435244352543526435274352843529435304353143532435334353443535435364353743538435394354043541435424354343544435454354643547435484354943550435514355243553435544355543556435574355843559435604356143562435634356443565435664356743568435694357043571435724357343574435754357643577435784357943580435814358243583435844358543586435874358843589435904359143592435934359443595435964359743598435994360043601436024360343604436054360643607436084360943610436114361243613436144361543616436174361843619436204362143622436234362443625436264362743628436294363043631436324363343634436354363643637436384363943640436414364243643436444364543646436474364843649436504365143652436534365443655436564365743658436594366043661436624366343664436654366643667436684366943670436714367243673436744367543676436774367843679436804368143682436834368443685436864368743688436894369043691436924369343694436954369643697436984369943700437014370243703437044370543706437074370843709437104371143712437134371443715437164371743718437194372043721437224372343724437254372643727437284372943730437314373243733437344373543736437374373843739437404374143742437434374443745437464374743748437494375043751437524375343754437554375643757437584375943760437614376243763437644376543766437674376843769437704377143772437734377443775437764377743778437794378043781437824378343784437854378643787437884378943790437914379243793437944379543796437974379843799438004380143802438034380443805438064380743808438094381043811438124381343814438154381643817438184381943820438214382243823438244382543826438274382843829438304383143832438334383443835438364383743838438394384043841438424384343844438454384643847438484384943850438514385243853438544385543856438574385843859438604386143862438634386443865438664386743868438694387043871438724387343874438754387643877438784387943880438814388243883438844388543886438874388843889438904389143892438934389443895438964389743898438994390043901439024390343904439054390643907439084390943910439114391243913439144391543916439174391843919439204392143922439234392443925439264392743928439294393043931439324393343934439354393643937439384393943940439414394243943439444394543946439474394843949439504395143952439534395443955439564395743958439594396043961439624396343964439654396643967439684396943970439714397243973439744397543976439774397843979439804398143982439834398443985439864398743988439894399043991439924399343994439954399643997439984399944000440014400244003440044400544006440074400844009440104401144012440134401444015440164401744018440194402044021440224402344024440254402644027440284402944030440314403244033440344403544036440374403844039440404404144042440434404444045440464404744048440494405044051440524405344054440554405644057440584405944060440614406244063440644406544066440674406844069440704407144072440734407444075440764407744078440794408044081440824408344084440854408644087440884408944090440914409244093440944409544096440974409844099441004410144102441034410444105441064410744108441094411044111441124411344114441154411644117441184411944120441214412244123441244412544126441274412844129441304413144132441334413444135441364413744138441394414044141441424414344144441454414644147441484414944150441514415244153441544415544156441574415844159441604416144162441634416444165441664416744168441694417044171441724417344174441754417644177441784417944180441814418244183441844418544186441874418844189441904419144192441934419444195441964419744198441994420044201442024420344204442054420644207442084420944210442114421244213442144421544216442174421844219442204422144222442234422444225442264422744228442294423044231442324423344234442354423644237442384423944240442414424244243442444424544246442474424844249442504425144252442534425444255442564425744258442594426044261442624426344264442654426644267442684426944270442714427244273442744427544276442774427844279442804428144282442834428444285442864428744288442894429044291442924429344294442954429644297442984429944300443014430244303443044430544306443074430844309443104431144312443134431444315443164431744318443194432044321443224432344324443254432644327443284432944330443314433244333443344433544336443374433844339443404434144342443434434444345443464434744348443494435044351443524435344354443554435644357443584435944360443614436244363443644436544366443674436844369443704437144372443734437444375443764437744378443794438044381443824438344384443854438644387443884438944390443914439244393443944439544396443974439844399444004440144402444034440444405444064440744408444094441044411444124441344414444154441644417444184441944420444214442244423444244442544426444274442844429444304443144432444334443444435444364443744438444394444044441444424444344444444454444644447444484444944450444514445244453444544445544456444574445844459444604446144462444634446444465444664446744468444694447044471444724447344474444754447644477444784447944480444814448244483444844448544486444874448844489444904449144492444934449444495444964449744498444994450044501445024450344504445054450644507445084450944510445114451244513445144451544516445174451844519445204452144522445234452444525445264452744528445294453044531445324453344534445354453644537445384453944540445414454244543445444454544546445474454844549445504455144552445534455444555445564455744558445594456044561445624456344564445654456644567445684456944570445714457244573445744457544576445774457844579445804458144582445834458444585445864458744588445894459044591445924459344594445954459644597445984459944600446014460244603446044460544606446074460844609446104461144612446134461444615446164461744618446194462044621446224462344624446254462644627446284462944630446314463244633446344463544636446374463844639446404464144642446434464444645446464464744648446494465044651446524465344654446554465644657446584465944660446614466244663446644466544666446674466844669446704467144672446734467444675446764467744678446794468044681446824468344684446854468644687446884468944690446914469244693446944469544696446974469844699447004470144702447034470444705447064470744708447094471044711447124471344714447154471644717447184471944720447214472244723447244472544726447274472844729447304473144732447334473444735447364473744738447394474044741447424474344744447454474644747447484474944750447514475244753447544475544756447574475844759447604476144762447634476444765447664476744768447694477044771447724477344774447754477644777447784477944780447814478244783447844478544786447874478844789447904479144792447934479444795447964479744798447994480044801448024480344804448054480644807448084480944810448114481244813448144481544816448174481844819448204482144822448234482444825448264482744828448294483044831448324483344834448354483644837448384483944840448414484244843448444484544846448474484844849448504485144852448534485444855448564485744858448594486044861448624486344864448654486644867448684486944870448714487244873448744487544876448774487844879448804488144882448834488444885448864488744888448894489044891448924489344894448954489644897448984489944900449014490244903449044490544906449074490844909449104491144912449134491444915449164491744918449194492044921449224492344924449254492644927449284492944930449314493244933449344493544936449374493844939449404494144942449434494444945449464494744948449494495044951449524495344954449554495644957449584495944960449614496244963449644496544966449674496844969449704497144972449734497444975449764497744978449794498044981449824498344984449854498644987449884498944990449914499244993449944499544996449974499844999450004500145002450034500445005450064500745008450094501045011450124501345014450154501645017450184501945020450214502245023450244502545026450274502845029450304503145032450334503445035450364503745038450394504045041450424504345044450454504645047450484504945050450514505245053450544505545056450574505845059450604506145062450634506445065450664506745068450694507045071450724507345074450754507645077450784507945080450814508245083450844508545086450874508845089450904509145092450934509445095450964509745098450994510045101451024510345104451054510645107451084510945110451114511245113451144511545116451174511845119451204512145122451234512445125451264512745128451294513045131451324513345134451354513645137451384513945140451414514245143451444514545146451474514845149451504515145152451534515445155451564515745158451594516045161451624516345164451654516645167451684516945170451714517245173451744517545176451774517845179451804518145182451834518445185451864518745188451894519045191451924519345194451954519645197451984519945200452014520245203452044520545206452074520845209452104521145212452134521445215452164521745218452194522045221452224522345224452254522645227452284522945230452314523245233452344523545236452374523845239452404524145242452434524445245452464524745248452494525045251452524525345254452554525645257452584525945260452614526245263452644526545266452674526845269452704527145272452734527445275452764527745278452794528045281452824528345284452854528645287452884528945290452914529245293452944529545296452974529845299453004530145302453034530445305453064530745308453094531045311453124531345314453154531645317453184531945320453214532245323453244532545326453274532845329453304533145332453334533445335453364533745338453394534045341453424534345344453454534645347453484534945350453514535245353453544535545356453574535845359453604536145362453634536445365453664536745368453694537045371453724537345374453754537645377453784537945380453814538245383453844538545386453874538845389453904539145392453934539445395453964539745398453994540045401454024540345404454054540645407454084540945410454114541245413454144541545416454174541845419454204542145422454234542445425454264542745428454294543045431454324543345434454354543645437454384543945440454414544245443454444544545446454474544845449454504545145452454534545445455454564545745458454594546045461454624546345464454654546645467454684546945470454714547245473454744547545476454774547845479454804548145482454834548445485454864548745488454894549045491454924549345494454954549645497454984549945500455014550245503455044550545506455074550845509455104551145512455134551445515455164551745518455194552045521455224552345524455254552645527455284552945530455314553245533455344553545536455374553845539455404554145542455434554445545455464554745548455494555045551455524555345554455554555645557455584555945560455614556245563455644556545566455674556845569455704557145572455734557445575455764557745578455794558045581455824558345584455854558645587455884558945590455914559245593455944559545596455974559845599456004560145602456034560445605456064560745608456094561045611456124561345614456154561645617456184561945620456214562245623456244562545626456274562845629456304563145632456334563445635456364563745638456394564045641456424564345644456454564645647456484564945650456514565245653456544565545656456574565845659456604566145662456634566445665456664566745668456694567045671456724567345674456754567645677456784567945680456814568245683456844568545686456874568845689456904569145692456934569445695456964569745698456994570045701457024570345704457054570645707457084570945710457114571245713457144571545716457174571845719457204572145722457234572445725457264572745728457294573045731457324573345734457354573645737457384573945740457414574245743457444574545746457474574845749457504575145752457534575445755457564575745758457594576045761457624576345764457654576645767457684576945770457714577245773457744577545776457774577845779457804578145782457834578445785457864578745788457894579045791457924579345794457954579645797457984579945800458014580245803458044580545806458074580845809458104581145812458134581445815458164581745818458194582045821458224582345824458254582645827458284582945830458314583245833458344583545836458374583845839458404584145842458434584445845458464584745848458494585045851458524585345854458554585645857458584585945860458614586245863458644586545866458674586845869458704587145872458734587445875458764587745878458794588045881458824588345884458854588645887458884588945890458914589245893458944589545896458974589845899459004590145902459034590445905459064590745908459094591045911459124591345914459154591645917459184591945920459214592245923459244592545926459274592845929459304593145932459334593445935459364593745938459394594045941459424594345944459454594645947459484594945950459514595245953459544595545956459574595845959459604596145962459634596445965459664596745968459694597045971459724597345974459754597645977459784597945980459814598245983459844598545986459874598845989459904599145992459934599445995459964599745998459994600046001460024600346004460054600646007460084600946010460114601246013460144601546016460174601846019460204602146022460234602446025460264602746028460294603046031460324603346034460354603646037460384603946040460414604246043460444604546046460474604846049460504605146052460534605446055460564605746058460594606046061460624606346064460654606646067460684606946070460714607246073460744607546076460774607846079460804608146082460834608446085460864608746088460894609046091460924609346094460954609646097460984609946100461014610246103461044610546106461074610846109461104611146112461134611446115461164611746118461194612046121461224612346124461254612646127461284612946130461314613246133461344613546136461374613846139461404614146142461434614446145461464614746148461494615046151461524615346154461554615646157461584615946160461614616246163461644616546166461674616846169461704617146172461734617446175461764617746178461794618046181461824618346184461854618646187461884618946190461914619246193461944619546196461974619846199462004620146202462034620446205462064620746208462094621046211462124621346214462154621646217462184621946220462214622246223462244622546226462274622846229462304623146232462334623446235462364623746238462394624046241462424624346244462454624646247462484624946250462514625246253462544625546256462574625846259462604626146262462634626446265462664626746268462694627046271462724627346274462754627646277462784627946280462814628246283462844628546286462874628846289462904629146292462934629446295462964629746298462994630046301463024630346304463054630646307463084630946310463114631246313463144631546316463174631846319463204632146322463234632446325463264632746328463294633046331463324633346334463354633646337463384633946340463414634246343463444634546346463474634846349463504635146352463534635446355463564635746358463594636046361463624636346364463654636646367463684636946370463714637246373463744637546376463774637846379463804638146382463834638446385463864638746388463894639046391463924639346394463954639646397463984639946400464014640246403464044640546406464074640846409464104641146412464134641446415464164641746418464194642046421464224642346424464254642646427464284642946430464314643246433464344643546436464374643846439464404644146442464434644446445464464644746448464494645046451464524645346454464554645646457464584645946460464614646246463464644646546466464674646846469464704647146472464734647446475464764647746478464794648046481464824648346484464854648646487464884648946490464914649246493464944649546496464974649846499465004650146502465034650446505465064650746508465094651046511465124651346514465154651646517465184651946520465214652246523465244652546526465274652846529465304653146532465334653446535465364653746538465394654046541465424654346544465454654646547465484654946550465514655246553465544655546556465574655846559465604656146562465634656446565465664656746568465694657046571465724657346574465754657646577465784657946580465814658246583465844658546586465874658846589465904659146592465934659446595465964659746598465994660046601466024660346604466054660646607466084660946610466114661246613466144661546616466174661846619466204662146622466234662446625466264662746628466294663046631466324663346634466354663646637466384663946640466414664246643466444664546646466474664846649466504665146652466534665446655466564665746658466594666046661466624666346664466654666646667466684666946670466714667246673466744667546676466774667846679466804668146682466834668446685466864668746688466894669046691466924669346694466954669646697466984669946700467014670246703467044670546706467074670846709467104671146712467134671446715467164671746718467194672046721467224672346724467254672646727467284672946730467314673246733467344673546736467374673846739467404674146742467434674446745467464674746748467494675046751467524675346754467554675646757467584675946760467614676246763467644676546766467674676846769467704677146772467734677446775467764677746778467794678046781467824678346784467854678646787467884678946790467914679246793467944679546796467974679846799468004680146802468034680446805468064680746808468094681046811468124681346814468154681646817468184681946820468214682246823468244682546826468274682846829468304683146832468334683446835468364683746838468394684046841468424684346844468454684646847468484684946850468514685246853468544685546856468574685846859468604686146862468634686446865468664686746868468694687046871468724687346874468754687646877468784687946880468814688246883468844688546886468874688846889468904689146892468934689446895468964689746898468994690046901469024690346904469054690646907469084690946910469114691246913469144691546916469174691846919469204692146922469234692446925469264692746928469294693046931469324693346934469354693646937469384693946940469414694246943469444694546946469474694846949469504695146952469534695446955469564695746958469594696046961469624696346964469654696646967469684696946970469714697246973469744697546976469774697846979469804698146982469834698446985469864698746988469894699046991469924699346994469954699646997469984699947000470014700247003470044700547006470074700847009470104701147012470134701447015470164701747018470194702047021470224702347024470254702647027470284702947030470314703247033470344703547036470374703847039470404704147042470434704447045470464704747048470494705047051470524705347054470554705647057470584705947060470614706247063470644706547066470674706847069470704707147072470734707447075470764707747078470794708047081470824708347084470854708647087470884708947090470914709247093470944709547096470974709847099471004710147102471034710447105471064710747108471094711047111471124711347114471154711647117471184711947120471214712247123471244712547126471274712847129471304713147132471334713447135471364713747138471394714047141471424714347144471454714647147471484714947150471514715247153471544715547156471574715847159471604716147162471634716447165471664716747168471694717047171471724717347174471754717647177471784717947180471814718247183471844718547186471874718847189471904719147192471934719447195471964719747198471994720047201472024720347204472054720647207472084720947210472114721247213472144721547216472174721847219472204722147222472234722447225472264722747228472294723047231472324723347234472354723647237472384723947240472414724247243472444724547246472474724847249472504725147252472534725447255472564725747258472594726047261472624726347264472654726647267472684726947270472714727247273472744727547276472774727847279472804728147282472834728447285472864728747288472894729047291472924729347294472954729647297472984729947300473014730247303473044730547306473074730847309473104731147312473134731447315473164731747318473194732047321473224732347324473254732647327473284732947330473314733247333473344733547336473374733847339473404734147342473434734447345473464734747348473494735047351473524735347354473554735647357473584735947360473614736247363473644736547366473674736847369473704737147372473734737447375473764737747378473794738047381473824738347384473854738647387473884738947390473914739247393473944739547396473974739847399474004740147402474034740447405474064740747408474094741047411474124741347414474154741647417474184741947420474214742247423474244742547426474274742847429474304743147432474334743447435474364743747438474394744047441474424744347444474454744647447474484744947450474514745247453474544745547456474574745847459474604746147462474634746447465474664746747468474694747047471474724747347474474754747647477474784747947480474814748247483474844748547486474874748847489474904749147492474934749447495474964749747498474994750047501475024750347504475054750647507475084750947510475114751247513475144751547516475174751847519475204752147522475234752447525475264752747528475294753047531475324753347534475354753647537475384753947540475414754247543475444754547546475474754847549475504755147552475534755447555475564755747558475594756047561475624756347564475654756647567475684756947570475714757247573475744757547576475774757847579475804758147582475834758447585475864758747588475894759047591475924759347594475954759647597475984759947600476014760247603476044760547606476074760847609476104761147612476134761447615476164761747618476194762047621476224762347624476254762647627476284762947630476314763247633476344763547636476374763847639476404764147642476434764447645476464764747648476494765047651476524765347654476554765647657476584765947660476614766247663476644766547666476674766847669476704767147672476734767447675476764767747678476794768047681476824768347684476854768647687476884768947690476914769247693476944769547696476974769847699477004770147702477034770447705477064770747708477094771047711477124771347714477154771647717477184771947720477214772247723477244772547726477274772847729477304773147732477334773447735477364773747738477394774047741477424774347744477454774647747477484774947750477514775247753477544775547756477574775847759477604776147762477634776447765477664776747768477694777047771477724777347774477754777647777477784777947780477814778247783477844778547786477874778847789477904779147792477934779447795477964779747798477994780047801478024780347804478054780647807478084780947810478114781247813478144781547816478174781847819478204782147822478234782447825478264782747828478294783047831478324783347834478354783647837478384783947840478414784247843478444784547846478474784847849478504785147852478534785447855478564785747858478594786047861478624786347864478654786647867478684786947870478714787247873478744787547876478774787847879478804788147882478834788447885478864788747888478894789047891478924789347894478954789647897478984789947900479014790247903479044790547906479074790847909479104791147912479134791447915479164791747918479194792047921479224792347924479254792647927479284792947930479314793247933479344793547936479374793847939479404794147942479434794447945479464794747948479494795047951479524795347954479554795647957479584795947960479614796247963479644796547966479674796847969479704797147972479734797447975479764797747978479794798047981479824798347984479854798647987479884798947990479914799247993479944799547996479974799847999480004800148002480034800448005480064800748008480094801048011480124801348014480154801648017480184801948020480214802248023480244802548026480274802848029480304803148032480334803448035480364803748038480394804048041480424804348044480454804648047480484804948050480514805248053480544805548056480574805848059480604806148062480634806448065480664806748068480694807048071480724807348074480754807648077480784807948080480814808248083480844808548086480874808848089480904809148092480934809448095480964809748098480994810048101481024810348104481054810648107481084810948110481114811248113481144811548116481174811848119481204812148122481234812448125481264812748128481294813048131481324813348134481354813648137481384813948140481414814248143481444814548146481474814848149481504815148152481534815448155481564815748158481594816048161481624816348164481654816648167481684816948170481714817248173481744817548176481774817848179481804818148182481834818448185481864818748188481894819048191481924819348194481954819648197481984819948200482014820248203482044820548206482074820848209482104821148212482134821448215482164821748218482194822048221482224822348224482254822648227482284822948230482314823248233482344823548236482374823848239482404824148242482434824448245482464824748248482494825048251482524825348254482554825648257482584825948260482614826248263482644826548266482674826848269482704827148272482734827448275482764827748278482794828048281482824828348284482854828648287482884828948290482914829248293482944829548296482974829848299483004830148302483034830448305483064830748308483094831048311483124831348314483154831648317483184831948320483214832248323483244832548326483274832848329483304833148332483334833448335483364833748338483394834048341483424834348344483454834648347483484834948350483514835248353483544835548356483574835848359483604836148362483634836448365483664836748368483694837048371483724837348374483754837648377483784837948380483814838248383483844838548386483874838848389483904839148392483934839448395483964839748398483994840048401484024840348404484054840648407484084840948410484114841248413484144841548416484174841848419484204842148422484234842448425484264842748428484294843048431484324843348434484354843648437484384843948440484414844248443484444844548446484474844848449484504845148452484534845448455484564845748458484594846048461484624846348464484654846648467484684846948470484714847248473484744847548476484774847848479484804848148482484834848448485484864848748488484894849048491484924849348494484954849648497484984849948500485014850248503485044850548506485074850848509485104851148512485134851448515485164851748518485194852048521485224852348524485254852648527485284852948530485314853248533485344853548536485374853848539485404854148542485434854448545485464854748548485494855048551485524855348554485554855648557485584855948560485614856248563485644856548566485674856848569485704857148572485734857448575485764857748578485794858048581485824858348584485854858648587485884858948590485914859248593485944859548596485974859848599486004860148602486034860448605486064860748608486094861048611486124861348614486154861648617486184861948620486214862248623486244862548626486274862848629486304863148632486334863448635486364863748638486394864048641486424864348644486454864648647486484864948650486514865248653486544865548656486574865848659486604866148662486634866448665486664866748668486694867048671486724867348674486754867648677486784867948680486814868248683486844868548686486874868848689486904869148692486934869448695486964869748698486994870048701487024870348704487054870648707487084870948710487114871248713487144871548716487174871848719487204872148722487234872448725487264872748728487294873048731487324873348734487354873648737487384873948740487414874248743487444874548746487474874848749487504875148752487534875448755487564875748758487594876048761487624876348764487654876648767487684876948770487714877248773487744877548776487774877848779487804878148782487834878448785487864878748788487894879048791487924879348794487954879648797487984879948800488014880248803488044880548806488074880848809488104881148812488134881448815488164881748818488194882048821488224882348824488254882648827488284882948830488314883248833488344883548836488374883848839488404884148842488434884448845488464884748848488494885048851488524885348854488554885648857488584885948860488614886248863488644886548866488674886848869488704887148872488734887448875488764887748878488794888048881488824888348884488854888648887488884888948890488914889248893488944889548896488974889848899489004890148902489034890448905489064890748908489094891048911489124891348914489154891648917489184891948920489214892248923489244892548926489274892848929489304893148932489334893448935489364893748938489394894048941489424894348944489454894648947489484894948950489514895248953489544895548956489574895848959489604896148962489634896448965489664896748968489694897048971489724897348974489754897648977489784897948980489814898248983489844898548986489874898848989489904899148992489934899448995489964899748998489994900049001490024900349004490054900649007490084900949010490114901249013490144901549016490174901849019490204902149022490234902449025490264902749028490294903049031490324903349034490354903649037490384903949040490414904249043490444904549046490474904849049490504905149052490534905449055490564905749058490594906049061490624906349064490654906649067490684906949070490714907249073490744907549076490774907849079490804908149082490834908449085490864908749088490894909049091490924909349094490954909649097490984909949100491014910249103491044910549106491074910849109491104911149112491134911449115491164911749118491194912049121491224912349124491254912649127491284912949130491314913249133491344913549136491374913849139491404914149142491434914449145491464914749148491494915049151491524915349154491554915649157491584915949160491614916249163491644916549166491674916849169491704917149172491734917449175491764917749178491794918049181491824918349184491854918649187491884918949190491914919249193491944919549196491974919849199492004920149202492034920449205492064920749208492094921049211492124921349214492154921649217492184921949220492214922249223492244922549226492274922849229492304923149232492334923449235492364923749238492394924049241492424924349244492454924649247492484924949250492514925249253492544925549256492574925849259492604926149262492634926449265492664926749268492694927049271492724927349274492754927649277492784927949280492814928249283492844928549286492874928849289492904929149292492934929449295492964929749298492994930049301493024930349304493054930649307493084930949310493114931249313493144931549316493174931849319493204932149322493234932449325493264932749328493294933049331493324933349334493354933649337493384933949340493414934249343493444934549346493474934849349493504935149352493534935449355493564935749358493594936049361493624936349364493654936649367493684936949370493714937249373493744937549376493774937849379493804938149382493834938449385493864938749388493894939049391493924939349394493954939649397493984939949400494014940249403494044940549406494074940849409494104941149412494134941449415494164941749418494194942049421494224942349424494254942649427494284942949430494314943249433494344943549436494374943849439494404944149442494434944449445494464944749448494494945049451494524945349454494554945649457494584945949460494614946249463494644946549466494674946849469494704947149472494734947449475494764947749478494794948049481494824948349484494854948649487494884948949490494914949249493494944949549496494974949849499495004950149502495034950449505495064950749508495094951049511495124951349514495154951649517495184951949520495214952249523495244952549526495274952849529495304953149532495334953449535495364953749538495394954049541495424954349544495454954649547495484954949550495514955249553495544955549556495574955849559495604956149562495634956449565495664956749568495694957049571495724957349574495754957649577495784957949580495814958249583495844958549586495874958849589495904959149592495934959449595495964959749598495994960049601496024960349604496054960649607496084960949610496114961249613496144961549616496174961849619496204962149622496234962449625496264962749628496294963049631496324963349634496354963649637496384963949640496414964249643496444964549646496474964849649496504965149652496534965449655496564965749658496594966049661496624966349664496654966649667496684966949670496714967249673496744967549676496774967849679496804968149682496834968449685496864968749688496894969049691496924969349694496954969649697496984969949700497014970249703497044970549706497074970849709497104971149712497134971449715497164971749718497194972049721497224972349724497254972649727497284972949730497314973249733497344973549736497374973849739497404974149742497434974449745497464974749748497494975049751497524975349754497554975649757497584975949760497614976249763497644976549766497674976849769497704977149772497734977449775497764977749778497794978049781497824978349784497854978649787497884978949790497914979249793497944979549796497974979849799498004980149802498034980449805498064980749808498094981049811498124981349814498154981649817498184981949820498214982249823498244982549826498274982849829498304983149832498334983449835498364983749838498394984049841498424984349844498454984649847498484984949850498514985249853498544985549856498574985849859498604986149862498634986449865498664986749868498694987049871498724987349874498754987649877498784987949880498814988249883498844988549886498874988849889498904989149892498934989449895498964989749898498994990049901499024990349904499054990649907499084990949910499114991249913499144991549916499174991849919499204992149922499234992449925499264992749928499294993049931499324993349934499354993649937499384993949940499414994249943499444994549946499474994849949499504995149952499534995449955499564995749958499594996049961499624996349964499654996649967499684996949970499714997249973499744997549976499774997849979499804998149982499834998449985499864998749988499894999049991499924999349994499954999649997499984999950000500015000250003500045000550006500075000850009500105001150012500135001450015500165001750018500195002050021500225002350024500255002650027500285002950030500315003250033500345003550036500375003850039500405004150042500435004450045500465004750048500495005050051500525005350054500555005650057500585005950060500615006250063500645006550066500675006850069500705007150072500735007450075500765007750078500795008050081500825008350084500855008650087500885008950090500915009250093500945009550096500975009850099501005010150102501035010450105501065010750108501095011050111501125011350114501155011650117501185011950120501215012250123501245012550126501275012850129501305013150132501335013450135501365013750138501395014050141501425014350144501455014650147501485014950150501515015250153501545015550156501575015850159501605016150162501635016450165501665016750168501695017050171501725017350174501755017650177501785017950180501815018250183501845018550186501875018850189501905019150192501935019450195501965019750198501995020050201502025020350204502055020650207502085020950210502115021250213502145021550216502175021850219502205022150222502235022450225502265022750228502295023050231502325023350234502355023650237502385023950240502415024250243502445024550246502475024850249502505025150252502535025450255502565025750258502595026050261502625026350264502655026650267502685026950270502715027250273502745027550276502775027850279502805028150282502835028450285502865028750288502895029050291502925029350294502955029650297502985029950300503015030250303503045030550306503075030850309503105031150312503135031450315503165031750318503195032050321503225032350324503255032650327503285032950330503315033250333503345033550336503375033850339503405034150342503435034450345503465034750348503495035050351503525035350354503555035650357503585035950360503615036250363503645036550366503675036850369503705037150372503735037450375503765037750378503795038050381503825038350384503855038650387503885038950390503915039250393503945039550396503975039850399504005040150402504035040450405504065040750408504095041050411504125041350414504155041650417504185041950420504215042250423504245042550426504275042850429504305043150432504335043450435504365043750438504395044050441504425044350444504455044650447504485044950450504515045250453504545045550456504575045850459504605046150462504635046450465504665046750468504695047050471504725047350474504755047650477504785047950480504815048250483504845048550486504875048850489504905049150492504935049450495504965049750498504995050050501505025050350504505055050650507505085050950510505115051250513505145051550516505175051850519505205052150522505235052450525505265052750528505295053050531505325053350534505355053650537505385053950540505415054250543505445054550546505475054850549505505055150552505535055450555505565055750558505595056050561505625056350564505655056650567505685056950570505715057250573505745057550576505775057850579505805058150582505835058450585505865058750588505895059050591505925059350594505955059650597505985059950600506015060250603506045060550606506075060850609506105061150612506135061450615506165061750618506195062050621506225062350624506255062650627506285062950630506315063250633506345063550636506375063850639506405064150642506435064450645506465064750648506495065050651506525065350654506555065650657506585065950660506615066250663506645066550666506675066850669506705067150672506735067450675506765067750678506795068050681506825068350684506855068650687506885068950690506915069250693506945069550696506975069850699507005070150702507035070450705507065070750708507095071050711507125071350714507155071650717507185071950720507215072250723507245072550726507275072850729507305073150732507335073450735507365073750738507395074050741507425074350744507455074650747507485074950750507515075250753507545075550756507575075850759507605076150762507635076450765507665076750768507695077050771507725077350774507755077650777507785077950780507815078250783507845078550786507875078850789507905079150792507935079450795507965079750798507995080050801508025080350804508055080650807508085080950810508115081250813508145081550816508175081850819508205082150822508235082450825508265082750828508295083050831508325083350834508355083650837508385083950840508415084250843508445084550846508475084850849508505085150852508535085450855508565085750858508595086050861508625086350864508655086650867508685086950870508715087250873508745087550876508775087850879508805088150882508835088450885508865088750888508895089050891508925089350894508955089650897508985089950900509015090250903509045090550906509075090850909509105091150912509135091450915509165091750918509195092050921509225092350924509255092650927509285092950930509315093250933509345093550936509375093850939509405094150942509435094450945509465094750948509495095050951509525095350954509555095650957509585095950960509615096250963509645096550966509675096850969509705097150972509735097450975509765097750978509795098050981509825098350984509855098650987509885098950990509915099250993509945099550996509975099850999510005100151002510035100451005510065100751008510095101051011510125101351014510155101651017510185101951020510215102251023510245102551026510275102851029510305103151032510335103451035510365103751038510395104051041510425104351044510455104651047510485104951050510515105251053510545105551056510575105851059510605106151062510635106451065510665106751068510695107051071510725107351074510755107651077510785107951080510815108251083510845108551086510875108851089510905109151092510935109451095510965109751098510995110051101511025110351104511055110651107511085110951110511115111251113511145111551116511175111851119511205112151122511235112451125511265112751128511295113051131511325113351134511355113651137511385113951140511415114251143511445114551146511475114851149511505115151152511535115451155511565115751158511595116051161511625116351164511655116651167511685116951170511715117251173511745117551176511775117851179511805118151182511835118451185511865118751188511895119051191511925119351194511955119651197511985119951200512015120251203512045120551206512075120851209512105121151212512135121451215512165121751218512195122051221512225122351224512255122651227512285122951230512315123251233512345123551236512375123851239512405124151242512435124451245
  1. var __defProp = Object.defineProperty;
  2. var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
  3. var __publicField = (obj, key, value) => {
  4. __defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
  5. return value;
  6. };
  7. if (typeof Promise !== "undefined" && !Promise.prototype.finally) {
  8. Promise.prototype.finally = function(callback) {
  9. const promise = this.constructor;
  10. return this.then(
  11. (value) => promise.resolve(callback()).then(() => value),
  12. (reason) => promise.resolve(callback()).then(() => {
  13. throw reason;
  14. })
  15. );
  16. };
  17. }
  18. ;
  19. if (typeof uni !== "undefined" && uni && uni.requireGlobal) {
  20. const global2 = uni.requireGlobal();
  21. ArrayBuffer = global2.ArrayBuffer;
  22. Int8Array = global2.Int8Array;
  23. Uint8Array = global2.Uint8Array;
  24. Uint8ClampedArray = global2.Uint8ClampedArray;
  25. Int16Array = global2.Int16Array;
  26. Uint16Array = global2.Uint16Array;
  27. Int32Array = global2.Int32Array;
  28. Uint32Array = global2.Uint32Array;
  29. Float32Array = global2.Float32Array;
  30. Float64Array = global2.Float64Array;
  31. BigInt64Array = global2.BigInt64Array;
  32. BigUint64Array = global2.BigUint64Array;
  33. }
  34. ;
  35. if (uni.restoreGlobal) {
  36. uni.restoreGlobal(Vue, weex, plus, setTimeout, clearTimeout, setInterval, clearInterval);
  37. }
  38. (function(vue) {
  39. "use strict";
  40. var _a;
  41. const _export_sfc = (sfc, props2) => {
  42. const target = sfc.__vccOpts || sfc;
  43. for (const [key, val] of props2) {
  44. target[key] = val;
  45. }
  46. return target;
  47. };
  48. const _sfc_main$2k = {
  49. __name: "index",
  50. setup(__props, { expose: __expose }) {
  51. __expose();
  52. const downloadFrom = (source) => {
  53. uni.getSystemInfoSync();
  54. window.location.href = "https://a.app.qq.com/o/simple.jsp?pkgname=com.lucky.luckyclient";
  55. };
  56. const __returned__ = { downloadFrom };
  57. Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
  58. return __returned__;
  59. }
  60. };
  61. function _sfc_render$2j(_ctx, _cache, $props, $setup, $data, $options) {
  62. return vue.openBlock(), vue.createElementBlock("view", { id: "app" }, [
  63. vue.createElementVNode("view", { class: "container" }, [
  64. vue.createCommentVNode(" 应用头部信息 "),
  65. vue.createElementVNode("view", { class: "app-header" }, [
  66. vue.createElementVNode("view", { class: "app-icon" }, [
  67. vue.createElementVNode("text", { class: "fas fa-book" }, "水贝商城"),
  68. vue.createElementVNode("view", { class: "official-badge" }, "官方")
  69. ]),
  70. vue.createCommentVNode(' <view class="app-info">\r\n <view class="app-title">\r\n <view class="app-name">水贝商城</view>\r\n \r\n </view>\r\n <view class="app-stats">\r\n <view class="rating">\r\n \r\n 4.56分\r\n </view>\r\n <view>1.9亿次下载</view>\r\n </view>\r\n <view class="app-stats">\r\n 124.55MB\r\n </view>\r\n </view> ')
  71. ]),
  72. vue.createCommentVNode(" 下载选项 "),
  73. vue.createElementVNode("view", { class: "download-options" }, [
  74. vue.createElementVNode("view", {
  75. class: "download-option option-primary",
  76. onClick: _cache[0] || (_cache[0] = ($event) => $setup.downloadFrom("应用宝"))
  77. }, [
  78. vue.createElementVNode("view", { class: "option-icon" }, [
  79. vue.createElementVNode("text", { class: "fas fa-shield-alt" })
  80. ]),
  81. vue.createElementVNode("view", { class: "option-content" }, [
  82. vue.createElementVNode("view", { class: "option-title" }, "通过应用宝下载"),
  83. vue.createElementVNode("view", { class: "option-desc" }, "腾讯应用宝下载,人工智能保证安全"),
  84. vue.createElementVNode("view", { class: "option-tag" }, "无病毒"),
  85. vue.createElementVNode("view", { class: "option-tag" }, "免广告骚扰")
  86. ])
  87. ]),
  88. vue.createElementVNode("view", {
  89. class: "download-option",
  90. onClick: _cache[1] || (_cache[1] = ($event) => $setup.downloadFrom("第三方浏览器"))
  91. }, [
  92. vue.createElementVNode("view", { class: "option-icon" }, [
  93. vue.createElementVNode("text", { class: "fas fa-globe" })
  94. ]),
  95. vue.createElementVNode("view", { class: "option-content" }, [
  96. vue.createElementVNode("view", { class: "option-title" }, "通过第三方浏览器下载"),
  97. vue.createElementVNode("view", { class: "option-desc" }, "无法确认是否存在安全隐患"),
  98. vue.createElementVNode("view", { class: "option-warning" }, "请注意安全风险")
  99. ])
  100. ])
  101. ]),
  102. vue.createCommentVNode(" 应用详情 "),
  103. vue.createElementVNode("view", { class: "app-details" }, [
  104. vue.createElementVNode("view", { class: "detail-item" }, [
  105. vue.createElementVNode("view", { class: "detail-label" }, "运营者:"),
  106. vue.createElementVNode("view", { class: "detail-value" }, "神州通誉软件")
  107. ]),
  108. vue.createElementVNode("view", { class: "detail-item" }, [
  109. vue.createElementVNode("view", { class: "detail-label" }, "开发者:"),
  110. vue.createElementVNode("view", { class: "detail-value" }, "神州通誉软件")
  111. ]),
  112. vue.createElementVNode("view", { class: "detail-item" }, [
  113. vue.createElementVNode("view", { class: "detail-label" }, "版本:"),
  114. vue.createElementVNode("view", { class: "detail-value" }, "1.0.0")
  115. ])
  116. ]),
  117. vue.createCommentVNode(" 底部信息 "),
  118. vue.createElementVNode("view", { class: "footer" }, [
  119. vue.createElementVNode("view", { class: "footer-links" }, [
  120. vue.createElementVNode("span", { class: "footer-link" }, "权限"),
  121. vue.createElementVNode("span", { class: "footer-link" }, "隐私"),
  122. vue.createElementVNode("span", { class: "footer-link" }, "功能"),
  123. vue.createElementVNode("span", { class: "footer-link" }, "备案")
  124. ]),
  125. vue.createElementVNode("view", null, "腾讯应用宝"),
  126. vue.createElementVNode("view", null, "该服务由应用宝技术提供")
  127. ])
  128. ])
  129. ]);
  130. }
  131. const PagesIndexIndex = /* @__PURE__ */ _export_sfc(_sfc_main$2k, [["render", _sfc_render$2j], ["__scopeId", "data-v-1cf27b2a"], ["__file", "C:/Users/EDY/Desktop/项目/shuibei/pages/index/index.vue"]]);
  132. const ON_SHOW = "onShow";
  133. const ON_HIDE = "onHide";
  134. const ON_LOAD = "onLoad";
  135. const ON_READY = "onReady";
  136. const ON_PAGE_SCROLL = "onPageScroll";
  137. const ON_REACH_BOTTOM = "onReachBottom";
  138. const ON_PULL_DOWN_REFRESH = "onPullDownRefresh";
  139. function formatAppLog(type2, filename, ...args) {
  140. if (uni.__log__) {
  141. uni.__log__(type2, filename, ...args);
  142. } else {
  143. console[type2].apply(console, [...args, filename]);
  144. }
  145. }
  146. function resolveEasycom(component, easycom) {
  147. return typeof component === "string" ? easycom : component;
  148. }
  149. const createLifeCycleHook = (lifecycle, flag2 = 0) => (hook, target = vue.getCurrentInstance()) => {
  150. !vue.isInSSRComponentSetup && vue.injectHook(lifecycle, hook, target);
  151. };
  152. const onShow = /* @__PURE__ */ createLifeCycleHook(
  153. ON_SHOW,
  154. 1 | 2
  155. /* HookFlags.PAGE */
  156. );
  157. const onHide = /* @__PURE__ */ createLifeCycleHook(
  158. ON_HIDE,
  159. 1 | 2
  160. /* HookFlags.PAGE */
  161. );
  162. const onLoad = /* @__PURE__ */ createLifeCycleHook(
  163. ON_LOAD,
  164. 2
  165. /* HookFlags.PAGE */
  166. );
  167. const onReady = /* @__PURE__ */ createLifeCycleHook(
  168. ON_READY,
  169. 2
  170. /* HookFlags.PAGE */
  171. );
  172. const onPageScroll = /* @__PURE__ */ createLifeCycleHook(
  173. ON_PAGE_SCROLL,
  174. 2
  175. /* HookFlags.PAGE */
  176. );
  177. const onReachBottom = /* @__PURE__ */ createLifeCycleHook(
  178. ON_REACH_BOTTOM,
  179. 2
  180. /* HookFlags.PAGE */
  181. );
  182. const onPullDownRefresh = /* @__PURE__ */ createLifeCycleHook(
  183. ON_PULL_DOWN_REFRESH,
  184. 2
  185. /* HookFlags.PAGE */
  186. );
  187. const fontData = [
  188. {
  189. "font_class": "arrow-down",
  190. "unicode": ""
  191. },
  192. {
  193. "font_class": "arrow-left",
  194. "unicode": ""
  195. },
  196. {
  197. "font_class": "arrow-right",
  198. "unicode": ""
  199. },
  200. {
  201. "font_class": "arrow-up",
  202. "unicode": ""
  203. },
  204. {
  205. "font_class": "auth",
  206. "unicode": ""
  207. },
  208. {
  209. "font_class": "auth-filled",
  210. "unicode": ""
  211. },
  212. {
  213. "font_class": "back",
  214. "unicode": ""
  215. },
  216. {
  217. "font_class": "bars",
  218. "unicode": ""
  219. },
  220. {
  221. "font_class": "calendar",
  222. "unicode": ""
  223. },
  224. {
  225. "font_class": "calendar-filled",
  226. "unicode": ""
  227. },
  228. {
  229. "font_class": "camera",
  230. "unicode": ""
  231. },
  232. {
  233. "font_class": "camera-filled",
  234. "unicode": ""
  235. },
  236. {
  237. "font_class": "cart",
  238. "unicode": ""
  239. },
  240. {
  241. "font_class": "cart-filled",
  242. "unicode": ""
  243. },
  244. {
  245. "font_class": "chat",
  246. "unicode": ""
  247. },
  248. {
  249. "font_class": "chat-filled",
  250. "unicode": ""
  251. },
  252. {
  253. "font_class": "chatboxes",
  254. "unicode": ""
  255. },
  256. {
  257. "font_class": "chatboxes-filled",
  258. "unicode": ""
  259. },
  260. {
  261. "font_class": "chatbubble",
  262. "unicode": ""
  263. },
  264. {
  265. "font_class": "chatbubble-filled",
  266. "unicode": ""
  267. },
  268. {
  269. "font_class": "checkbox",
  270. "unicode": ""
  271. },
  272. {
  273. "font_class": "checkbox-filled",
  274. "unicode": ""
  275. },
  276. {
  277. "font_class": "checkmarkempty",
  278. "unicode": ""
  279. },
  280. {
  281. "font_class": "circle",
  282. "unicode": ""
  283. },
  284. {
  285. "font_class": "circle-filled",
  286. "unicode": ""
  287. },
  288. {
  289. "font_class": "clear",
  290. "unicode": ""
  291. },
  292. {
  293. "font_class": "close",
  294. "unicode": ""
  295. },
  296. {
  297. "font_class": "closeempty",
  298. "unicode": ""
  299. },
  300. {
  301. "font_class": "cloud-download",
  302. "unicode": ""
  303. },
  304. {
  305. "font_class": "cloud-download-filled",
  306. "unicode": ""
  307. },
  308. {
  309. "font_class": "cloud-upload",
  310. "unicode": ""
  311. },
  312. {
  313. "font_class": "cloud-upload-filled",
  314. "unicode": ""
  315. },
  316. {
  317. "font_class": "color",
  318. "unicode": ""
  319. },
  320. {
  321. "font_class": "color-filled",
  322. "unicode": ""
  323. },
  324. {
  325. "font_class": "compose",
  326. "unicode": ""
  327. },
  328. {
  329. "font_class": "contact",
  330. "unicode": ""
  331. },
  332. {
  333. "font_class": "contact-filled",
  334. "unicode": ""
  335. },
  336. {
  337. "font_class": "down",
  338. "unicode": ""
  339. },
  340. {
  341. "font_class": "bottom",
  342. "unicode": ""
  343. },
  344. {
  345. "font_class": "download",
  346. "unicode": ""
  347. },
  348. {
  349. "font_class": "download-filled",
  350. "unicode": ""
  351. },
  352. {
  353. "font_class": "email",
  354. "unicode": ""
  355. },
  356. {
  357. "font_class": "email-filled",
  358. "unicode": ""
  359. },
  360. {
  361. "font_class": "eye",
  362. "unicode": ""
  363. },
  364. {
  365. "font_class": "eye-filled",
  366. "unicode": ""
  367. },
  368. {
  369. "font_class": "eye-slash",
  370. "unicode": ""
  371. },
  372. {
  373. "font_class": "eye-slash-filled",
  374. "unicode": ""
  375. },
  376. {
  377. "font_class": "fire",
  378. "unicode": ""
  379. },
  380. {
  381. "font_class": "fire-filled",
  382. "unicode": ""
  383. },
  384. {
  385. "font_class": "flag",
  386. "unicode": ""
  387. },
  388. {
  389. "font_class": "flag-filled",
  390. "unicode": ""
  391. },
  392. {
  393. "font_class": "folder-add",
  394. "unicode": ""
  395. },
  396. {
  397. "font_class": "folder-add-filled",
  398. "unicode": ""
  399. },
  400. {
  401. "font_class": "font",
  402. "unicode": ""
  403. },
  404. {
  405. "font_class": "forward",
  406. "unicode": ""
  407. },
  408. {
  409. "font_class": "gear",
  410. "unicode": ""
  411. },
  412. {
  413. "font_class": "gear-filled",
  414. "unicode": ""
  415. },
  416. {
  417. "font_class": "gift",
  418. "unicode": ""
  419. },
  420. {
  421. "font_class": "gift-filled",
  422. "unicode": ""
  423. },
  424. {
  425. "font_class": "hand-down",
  426. "unicode": ""
  427. },
  428. {
  429. "font_class": "hand-down-filled",
  430. "unicode": ""
  431. },
  432. {
  433. "font_class": "hand-up",
  434. "unicode": ""
  435. },
  436. {
  437. "font_class": "hand-up-filled",
  438. "unicode": ""
  439. },
  440. {
  441. "font_class": "headphones",
  442. "unicode": ""
  443. },
  444. {
  445. "font_class": "heart",
  446. "unicode": ""
  447. },
  448. {
  449. "font_class": "heart-filled",
  450. "unicode": ""
  451. },
  452. {
  453. "font_class": "help",
  454. "unicode": ""
  455. },
  456. {
  457. "font_class": "help-filled",
  458. "unicode": ""
  459. },
  460. {
  461. "font_class": "home",
  462. "unicode": ""
  463. },
  464. {
  465. "font_class": "home-filled",
  466. "unicode": ""
  467. },
  468. {
  469. "font_class": "image",
  470. "unicode": ""
  471. },
  472. {
  473. "font_class": "image-filled",
  474. "unicode": ""
  475. },
  476. {
  477. "font_class": "images",
  478. "unicode": ""
  479. },
  480. {
  481. "font_class": "images-filled",
  482. "unicode": ""
  483. },
  484. {
  485. "font_class": "info",
  486. "unicode": ""
  487. },
  488. {
  489. "font_class": "info-filled",
  490. "unicode": ""
  491. },
  492. {
  493. "font_class": "left",
  494. "unicode": ""
  495. },
  496. {
  497. "font_class": "link",
  498. "unicode": ""
  499. },
  500. {
  501. "font_class": "list",
  502. "unicode": ""
  503. },
  504. {
  505. "font_class": "location",
  506. "unicode": ""
  507. },
  508. {
  509. "font_class": "location-filled",
  510. "unicode": ""
  511. },
  512. {
  513. "font_class": "locked",
  514. "unicode": ""
  515. },
  516. {
  517. "font_class": "locked-filled",
  518. "unicode": ""
  519. },
  520. {
  521. "font_class": "loop",
  522. "unicode": ""
  523. },
  524. {
  525. "font_class": "mail-open",
  526. "unicode": ""
  527. },
  528. {
  529. "font_class": "mail-open-filled",
  530. "unicode": ""
  531. },
  532. {
  533. "font_class": "map",
  534. "unicode": ""
  535. },
  536. {
  537. "font_class": "map-filled",
  538. "unicode": ""
  539. },
  540. {
  541. "font_class": "map-pin",
  542. "unicode": ""
  543. },
  544. {
  545. "font_class": "map-pin-ellipse",
  546. "unicode": ""
  547. },
  548. {
  549. "font_class": "medal",
  550. "unicode": ""
  551. },
  552. {
  553. "font_class": "medal-filled",
  554. "unicode": ""
  555. },
  556. {
  557. "font_class": "mic",
  558. "unicode": ""
  559. },
  560. {
  561. "font_class": "mic-filled",
  562. "unicode": ""
  563. },
  564. {
  565. "font_class": "micoff",
  566. "unicode": ""
  567. },
  568. {
  569. "font_class": "micoff-filled",
  570. "unicode": ""
  571. },
  572. {
  573. "font_class": "minus",
  574. "unicode": ""
  575. },
  576. {
  577. "font_class": "minus-filled",
  578. "unicode": ""
  579. },
  580. {
  581. "font_class": "more",
  582. "unicode": ""
  583. },
  584. {
  585. "font_class": "more-filled",
  586. "unicode": ""
  587. },
  588. {
  589. "font_class": "navigate",
  590. "unicode": ""
  591. },
  592. {
  593. "font_class": "navigate-filled",
  594. "unicode": ""
  595. },
  596. {
  597. "font_class": "notification",
  598. "unicode": ""
  599. },
  600. {
  601. "font_class": "notification-filled",
  602. "unicode": ""
  603. },
  604. {
  605. "font_class": "paperclip",
  606. "unicode": ""
  607. },
  608. {
  609. "font_class": "paperplane",
  610. "unicode": ""
  611. },
  612. {
  613. "font_class": "paperplane-filled",
  614. "unicode": ""
  615. },
  616. {
  617. "font_class": "person",
  618. "unicode": ""
  619. },
  620. {
  621. "font_class": "person-filled",
  622. "unicode": ""
  623. },
  624. {
  625. "font_class": "personadd",
  626. "unicode": ""
  627. },
  628. {
  629. "font_class": "personadd-filled",
  630. "unicode": ""
  631. },
  632. {
  633. "font_class": "personadd-filled-copy",
  634. "unicode": ""
  635. },
  636. {
  637. "font_class": "phone",
  638. "unicode": ""
  639. },
  640. {
  641. "font_class": "phone-filled",
  642. "unicode": ""
  643. },
  644. {
  645. "font_class": "plus",
  646. "unicode": ""
  647. },
  648. {
  649. "font_class": "plus-filled",
  650. "unicode": ""
  651. },
  652. {
  653. "font_class": "plusempty",
  654. "unicode": ""
  655. },
  656. {
  657. "font_class": "pulldown",
  658. "unicode": ""
  659. },
  660. {
  661. "font_class": "pyq",
  662. "unicode": ""
  663. },
  664. {
  665. "font_class": "qq",
  666. "unicode": ""
  667. },
  668. {
  669. "font_class": "redo",
  670. "unicode": ""
  671. },
  672. {
  673. "font_class": "redo-filled",
  674. "unicode": ""
  675. },
  676. {
  677. "font_class": "refresh",
  678. "unicode": ""
  679. },
  680. {
  681. "font_class": "refresh-filled",
  682. "unicode": ""
  683. },
  684. {
  685. "font_class": "refreshempty",
  686. "unicode": ""
  687. },
  688. {
  689. "font_class": "reload",
  690. "unicode": ""
  691. },
  692. {
  693. "font_class": "right",
  694. "unicode": ""
  695. },
  696. {
  697. "font_class": "scan",
  698. "unicode": ""
  699. },
  700. {
  701. "font_class": "search",
  702. "unicode": ""
  703. },
  704. {
  705. "font_class": "settings",
  706. "unicode": ""
  707. },
  708. {
  709. "font_class": "settings-filled",
  710. "unicode": ""
  711. },
  712. {
  713. "font_class": "shop",
  714. "unicode": ""
  715. },
  716. {
  717. "font_class": "shop-filled",
  718. "unicode": ""
  719. },
  720. {
  721. "font_class": "smallcircle",
  722. "unicode": ""
  723. },
  724. {
  725. "font_class": "smallcircle-filled",
  726. "unicode": ""
  727. },
  728. {
  729. "font_class": "sound",
  730. "unicode": ""
  731. },
  732. {
  733. "font_class": "sound-filled",
  734. "unicode": ""
  735. },
  736. {
  737. "font_class": "spinner-cycle",
  738. "unicode": ""
  739. },
  740. {
  741. "font_class": "staff",
  742. "unicode": ""
  743. },
  744. {
  745. "font_class": "staff-filled",
  746. "unicode": ""
  747. },
  748. {
  749. "font_class": "star",
  750. "unicode": ""
  751. },
  752. {
  753. "font_class": "star-filled",
  754. "unicode": ""
  755. },
  756. {
  757. "font_class": "starhalf",
  758. "unicode": ""
  759. },
  760. {
  761. "font_class": "trash",
  762. "unicode": ""
  763. },
  764. {
  765. "font_class": "trash-filled",
  766. "unicode": ""
  767. },
  768. {
  769. "font_class": "tune",
  770. "unicode": ""
  771. },
  772. {
  773. "font_class": "tune-filled",
  774. "unicode": ""
  775. },
  776. {
  777. "font_class": "undo",
  778. "unicode": ""
  779. },
  780. {
  781. "font_class": "undo-filled",
  782. "unicode": ""
  783. },
  784. {
  785. "font_class": "up",
  786. "unicode": ""
  787. },
  788. {
  789. "font_class": "top",
  790. "unicode": ""
  791. },
  792. {
  793. "font_class": "upload",
  794. "unicode": ""
  795. },
  796. {
  797. "font_class": "upload-filled",
  798. "unicode": ""
  799. },
  800. {
  801. "font_class": "videocam",
  802. "unicode": ""
  803. },
  804. {
  805. "font_class": "videocam-filled",
  806. "unicode": ""
  807. },
  808. {
  809. "font_class": "vip",
  810. "unicode": ""
  811. },
  812. {
  813. "font_class": "vip-filled",
  814. "unicode": ""
  815. },
  816. {
  817. "font_class": "wallet",
  818. "unicode": ""
  819. },
  820. {
  821. "font_class": "wallet-filled",
  822. "unicode": ""
  823. },
  824. {
  825. "font_class": "weibo",
  826. "unicode": ""
  827. },
  828. {
  829. "font_class": "weixin",
  830. "unicode": ""
  831. }
  832. ];
  833. const getVal = (val) => {
  834. const reg = /^[0-9]*$/g;
  835. return typeof val === "number" || reg.test(val) ? val + "px" : val;
  836. };
  837. const _sfc_main$2j = {
  838. name: "UniIcons",
  839. emits: ["click"],
  840. props: {
  841. type: {
  842. type: String,
  843. default: ""
  844. },
  845. color: {
  846. type: String,
  847. default: "#333333"
  848. },
  849. size: {
  850. type: [Number, String],
  851. default: 16
  852. },
  853. customPrefix: {
  854. type: String,
  855. default: ""
  856. },
  857. fontFamily: {
  858. type: String,
  859. default: ""
  860. }
  861. },
  862. data() {
  863. return {
  864. icons: fontData
  865. };
  866. },
  867. computed: {
  868. unicode() {
  869. let code2 = this.icons.find((v2) => v2.font_class === this.type);
  870. if (code2) {
  871. return code2.unicode;
  872. }
  873. return "";
  874. },
  875. iconSize() {
  876. return getVal(this.size);
  877. },
  878. styleObj() {
  879. if (this.fontFamily !== "") {
  880. return `color: ${this.color}; font-size: ${this.iconSize}; font-family: ${this.fontFamily};`;
  881. }
  882. return `color: ${this.color}; font-size: ${this.iconSize};`;
  883. }
  884. },
  885. methods: {
  886. _onClick(e2) {
  887. this.$emit("click", e2);
  888. }
  889. }
  890. };
  891. function _sfc_render$2i(_ctx, _cache, $props, $setup, $data, $options) {
  892. return vue.openBlock(), vue.createElementBlock(
  893. "text",
  894. {
  895. style: vue.normalizeStyle($options.styleObj),
  896. class: vue.normalizeClass(["uni-icons", ["uniui-" + $props.type, $props.customPrefix, $props.customPrefix ? $props.type : ""]]),
  897. onClick: _cache[0] || (_cache[0] = (...args) => $options._onClick && $options._onClick(...args))
  898. },
  899. [
  900. vue.renderSlot(_ctx.$slots, "default", {}, void 0, true)
  901. ],
  902. 6
  903. /* CLASS, STYLE */
  904. );
  905. }
  906. const __easycom_0$g = /* @__PURE__ */ _export_sfc(_sfc_main$2j, [["render", _sfc_render$2i], ["__scopeId", "data-v-d31e1c47"], ["__file", "C:/Users/EDY/Desktop/项目/shuibei/uni_modules/uni-icons/components/uni-icons/uni-icons.vue"]]);
  907. function useToast() {
  908. const tipTitle = vue.ref("");
  909. const tipIcon = vue.ref("none");
  910. const tipEndtime = vue.ref(2e3);
  911. function Toast2(opt, to_url) {
  912. formatAppLog("log", "at hooks/useToast.js:31", "Toast", opt, to_url);
  913. if (typeof opt == "string") {
  914. to_url = opt;
  915. opt = {};
  916. }
  917. tipTitle.value = opt.title || "";
  918. tipIcon.value = opt.icon || "none";
  919. tipEndtime.value = opt.endtime || 1e3;
  920. let success = opt.success;
  921. if (tipTitle.value)
  922. uni.showToast({
  923. title: tipTitle.value,
  924. icon: tipIcon.value,
  925. duration: tipEndtime.value,
  926. success
  927. });
  928. if (to_url != void 0) {
  929. if (typeof to_url == "object") {
  930. let tab = to_url.tab || 1, url2 = to_url.url || "";
  931. formatAppLog("log", "at hooks/useToast.js:59", "tab", tab);
  932. switch (tab) {
  933. case 1:
  934. setTimeout(() => uni.switchTab({ url: url2 }), tipEndtime.value);
  935. break;
  936. case 2:
  937. setTimeout(() => uni.navigateTo({ url: url2 }), tipEndtime.value);
  938. break;
  939. case 3:
  940. setTimeout(() => {
  941. uni.navigateBack({ delta: 1 });
  942. }, tipEndtime.value);
  943. break;
  944. case 4:
  945. setTimeout(() => uni.reLaunch({ url: url2 }), tipEndtime.value);
  946. break;
  947. case 5:
  948. setTimeout(() => uni.redirectTo({ url: url2 }), tipEndtime.value);
  949. break;
  950. }
  951. } else if (typeof to_url == "function") {
  952. setTimeout(() => to_url && to_url(), tipEndtime.value);
  953. } else {
  954. setTimeout(
  955. () => uni.navigateTo({ url: to_url }),
  956. tipTitle.value ? tipEndtime.value : 0
  957. );
  958. }
  959. }
  960. }
  961. return {
  962. tipTitle,
  963. tipIcon,
  964. tipEndtime,
  965. Toast: Toast2
  966. };
  967. }
  968. let domain = "http://192.168.100.199:8081";
  969. const HTTP_REQUEST_URL = domain;
  970. const HEADER = {
  971. "content-type": "application/json"
  972. };
  973. const HEADERPARAMS = {
  974. "content-type": "application/x-www-form-urlencoded"
  975. };
  976. function baseRequest(url2, method, data, { noAuth = false, noVerify = false }, params2) {
  977. const { Toast: Toast2 } = useToast();
  978. let Url = HTTP_REQUEST_URL, header = HEADER;
  979. if (params2 != void 0) {
  980. header = HEADERPARAMS;
  981. }
  982. return new Promise((reslove, reject) => {
  983. Url = HTTP_REQUEST_URL;
  984. uni.request({
  985. url: Url + "/api/front/" + url2,
  986. method: method || "GET",
  987. header,
  988. timeout: 3e4,
  989. data: data || {},
  990. success: (res) => {
  991. if (noVerify)
  992. reslove(res.data, res);
  993. else if (res.data.code == 200)
  994. reslove(res.data, res);
  995. else if ([41e4, 410001, 410002, 401].indexOf(res.data.code) !== -1) {
  996. reject(res.data);
  997. } else
  998. Toast2({ title: res.data.message || "系统错误" });
  999. reject(res.data.message || "系统错误");
  1000. },
  1001. fail: (msg) => {
  1002. Toast2({ title: "请求失败" });
  1003. reject("请求失败");
  1004. }
  1005. });
  1006. });
  1007. }
  1008. const request = {};
  1009. ["options", "get", "post", "put", "head", "delete", "trace", "connect"].forEach(
  1010. (method) => {
  1011. request[method] = (api, data, opt, params2) => baseRequest(api, method, data, opt || {}, params2);
  1012. }
  1013. );
  1014. function getGoodDetailId(data) {
  1015. return request.get(`book/detail/${data}`);
  1016. }
  1017. function getArticleDetailId(data) {
  1018. return request.get(`product/detail/${data}`);
  1019. }
  1020. const zStatic = {
  1021. base64Arrow: "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAGQAAABkBAMAAACCzIhnAAAAD1BMVEVHcExRUVFMTExRUVFRUVE9CdWsAAAABHRSTlMAjjrY9ZnUjwAAAQFJREFUWMPt2MsNgzAMgGEEE1B1gKJmAIRYoCH7z9RCXrabh33iYktcIv35EEg5ZBh07pvxJU6MFSPOSRnjnBUjUsaciRUjMsb4xIoRCWNiYsUInzE5sWKEyxiYWDbyefqHx1zIeiYTk7mQYziTYecxHvEJjwmIT3hMQELCYSISEg4TkZj0mYTEpM8kJCU9JiMp6TEZyUmbAUhO2gxAQNJiIAKSFgMRmNQZhMCkziAEJTUGIyipMRjBSZkhCE7KDEFIUmTeGCHJxWz0zXaE0GTCG8ZFtEaS347r/1fe11YyHYVfubxayfjoHmc0YYwmmmiiiSaaaKLJ7ckyz5ve+dw3Xw2emdwm9xSbAAAAAElFTkSuQmCC",
  1022. base64ArrowWhite: "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAGQAAABkBAMAAACCzIhnAAAAElBMVEVHcEz///////////////////+IGTx/AAAABnRSTlMA/dAkXZOhASU/AAABYElEQVRYw+2YwXLCIBCGsdAHWGbyAKZ4zxi9O017rxLf/1UaWFAgA1m8dcpedNSPf/l/Vh0Ya/Wn6hN0JcGvoCqRM4C8VBFiDwBqqNuJKV0rAnCgy3AUqZE57x0iqTL8Br4U3WBf/YWaIlTKfAcELU/h9w72CSVPa3C3OCDvhpHbRp/s2vq4fHhCeiCl2A3m4Qd71DQR257mFBlMcTlbFnFWzNtHxewYEfSiaLS4el8d8nyhmKJd1CF4eOS0keLMAuSxubLBIeIGQW8YHCFFo7EH9+YDcQt9FMZEswTheaNxTHwHT8SZorJjMrEVwo4Zo0U8HSEyZvJMOg4RjnmmRr8nDYeIz3OMkbfE/QhBo+U9RnZJxjGCRh/WKmHEMWLNkfPKsGh/CWJk1JjG0kcuJggTt34VDP8aWAFhp4nybVb5+9qQhjSkIQ1pSEMa8k+Q5U9rV3dF8MpFBK+/7miVq1/HZ2qmo9D+pAAAAABJRU5ErkJggg==",
  1023. base64Flower: "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAGQAAABkBAMAAACCzIhnAAAAKlBMVEVHcEzDw8Ovr6+pqamUlJTCwsKenp61tbWxsbGysrLNzc2bm5u5ubmjo6MpovhuAAAACnRSTlMA/P79/sHDhiZS0DxZowAABBBJREFUWMPtl89rE0EUx7ctTXatB3MI1SWnDbUKPUgXqh4ED8Uf7KUVSm3ooVSpSii0Fn/gD4j4o+APiEoVmos9FO2celiqZVgwgaKHPQiCCkv+F99kM7Ozm5kxq1dfD91k9pPve9/3ZjbRNHHok/mKli4eIPNgSuRObuN9SqSEzM20iGnm0yIbqCuV7NSSSIV7uyPM6JMBYdeTOanh/QihJYZsUCSby+VkMj2AvOt0rAeQAwqE3lfKMZVlQCZk1QOCKkkVPadITCfIRNKxfoJI5+0OIFtJx14CMSg1mRSDko7VAfksRQzEbGYqxOJcVTWMCH2I1/IACNW0PWU2M8cmAVHtnH5mM1VRWtwKZjOd5JbF6s1IbaYqaotjNlPHgDAnlAizubTR6ovMYn052g/U5qcmOpi0WL8xTS/3IfSet5m8MEr5ajjF5le6dq/OJpobrdY0t3i9QgefWrxW9/1BLhk0E9m8FeUMhhXal499iD0eQRfDF+ts/tttORRerfp+oV7f4xJj82iUYm1Yzod+ZQEAlS/8mMBwKebVmCVp1f0JLS6zKd17+iwRKTARVg2SHtz3iEbBH+Q+U28zW2Jiza8Tjb1YFoYZMsJyjDqp3M9XBQdSdPLFdxEpvOB37JrHcmR/y9+LgoTlCFGZEa2sc6d4PGlweEa2JSVPoVm+IfGG3ZL037iV9oH+P+Jxc4HGVflNq1M0pivao/EopO4b/ojVCP9GjmiXOeS0DOn1o/iiccT4ORnyvBGF3yUywkQajW4Ti0SGuiy/wVSg/L8w+X/8Q+hvUx8Xd90z4oV5a1i88MbFWHz0WZZ1UrTwBGPX3Rat9AFiXRMRjoMdIdJLEOt2h7jrYOzgOamKZSWSNspOS0X8SAqRYmxRL7sg4eLzYmNehcxh3uoyud/BH2Udux4ywxFTc1xC7Mgf4vMhc5S+kSH3Y7yj+qpwIWSoPTVCOOPVthGx9FbGqrwFw6wSFxJr+17zeKcztt3u+2roAEVgUjDd+AHGuxHy2rZHaa8JMkTHEeyi85ANPO9j9BVuBRD2FY5LDMo/Sz/2hReqGIs/KiFin+CsPsYO/yvM3jL2vE8EbX7/Bf8ejtr2GLN65bioAdgLd8Bis/mD5GmP2qeqyo2ZwQEOtAjRIDH7mBKpUcMoApbZJ5UIxkEwxyMZyMxW/uKFvHCFR3SSmerHyDNQ2dF4JG6zIMpBgLfjSF9x1D6smFcYnGApjmSLICO3ecCDWrQ48geba9DI3STy2i7ax6WIB62fSyIZIiO3GFQqSURp8wCo7GhJBGwuSovJBNjb7kT6FPVnIa9qJ2Ko+l9mefGIdinaMp0yC1URYiwsdfNE45EuA5Cx9EhalfvN5s+UyItm81vaB3p4joniN+SCP7Qc1hblAAAAAElFTkSuQmCC",
  1024. base64FlowerWhite: "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAGQAAABkBAMAAACCzIhnAAAAElBMVEX///9HcEz///////////////84chYNAAAABnRSTlP/AGzCOYZj5g1nAAACfklEQVRYw+2YTVPDIBCGtza9Jw25a0bvcax30o73OOr//yvma2F3YWlpPTijXNpAHrK8LLALVPFium2vNIFSbwGKTGQA2GUiHcD29yDNy3sMIdUBQl7r2H8mOEVqAHgPkYZUS6Qc2zYhQqtjyDZEximCZwWZLIBeIgYShs2NzxKpSUehYpMJhURGb+O+w5BpMCAREKPnCDHbIY20SzhM5yxziAXpOiBXydrekT9i5XDEq4NIIHHgyU5mRGqviII4mREJJA4QJzMiILwlRJzpKxJKvCBm8OsBBbLux0tsPl4RKYm5aPu6jw1U4mGxEUR9g8M1PcqBEp/WJliNgYOXueBzS4jZSIcgY5lCtevgDSgyzE+rAfuOTQMq0yzvoGH18qju27Mayzs4fPyMziCx81NJa5RNfW7vPYK9KOfDiVkBxFHG8hAj9txuoBuSWORsFfkpBf7xKFLSeaOefEojh5jz22DJEqMP8fUyaKdQx+RnG+yXMpe8Aars8ueR1pVH/bW3FyyvPRw90upLDHwpgBDtg4aUBNkxRLXMAi03IhcZtr1m+FeI/O/JNyDmmL1djLOauSlNflBpW18RQ2bPqXI22MXXEk75KRHTnkPkYbESbdKP2ZFk0r5sIwffAjy1lx+vx7NLjB6/E7Jfv5ERKhzpN0w8IDE8IGFDv5dhz10s7GFiXRZcUeLCEG5P5nDq9k4PFDcoMpE3GY4OuxuCXhmuyNB6k0RsLIAvqp9NE5r8ZCSS8gxnUp7ODdYhZTqxuiJ9uyJJtPmpqJ7wVj+XVieS903iViHziqAhchLEJAyb7jWU647EpUofQ0ziUuXXXhDddtlllSwjgSQu7r4BRWhQqfDPMVwAAAAASUVORK5CYII=",
  1025. base64Success: "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAGQAAABkBAMAAACCzIhnAAAAElBMVEVRUVFHcExTU1NRUVFRUVFRUVFOSlSUAAAABnRSTlP/AI6+VySB3ZENAAACcElEQVRYw+2YyYKCMAyGI8hdpdxdZu7gcpdZ7jL6/s8yYheSNi0aPdqbwOffpGmaFOYPD3gj4bisN7vddv17N/JVgxn5x12IWgIaWTuO/IE3PseQbwjGPo2cgRmHFLJwdm/X643zwiqOKPPJ1nj3sjEP2iiifZWj5bhopSyGaEO2HX5fbQJzwJ+W7x/jw5ZFjsEU0PMph9xE8i5EqprKALW95eJQURkgzw98uJ/JvwGecR7bIjWWsUgVrrIfFZ2HlLy3sKETD1mmRLRMRhGVssRa0xJkdn3SpJBymBkM8+pSSDXMDNyDaToVHd2fgpNt0sjwiUZO19+jGQ+gQEg9Oq+bufmAVGihomNmjQG7UG3020vrlm7lkFnKFGU3kZ0KGAdmKe821pipQ+qEKcrZeTL2g5FsUks4cStjEZWwXg0b0n4GxmEpkWwIs5VBynjgK7xZaz1/0D7OxkVuLpsY5BQNFyLS84VBjjbg0iL2r2EQHBOxBhikuUOkdxODVF1cxHoWtPPsiyXO455Iv34hssCO8EV4ZIYTjS8SR4qYSHRiTiYQ4ZFbHi0iIhhBTi6dTCgSWRcnw4h4yGTuyTAiOGBIWGoZTgSHJQl+LcOJ4OCnW6yX2bMnJ9pidCOXtkTkTrIGpYuOynAiOF14SamMiOCk5Ke+mq8BcOrrvym8d0zKIQnWT+M1WwOQNO4fFiWb18hhERxJPx2fblbPHHyC41VyiAtKBUFBIih7JMWVoIQTFIr3lKPN80WvoLSWFPC653ioTZA0I0FrQ7qU6asaK0H7JmkSJa2ooOGVtNUsc3j9FYHkIkJy3SG6VHnfXKXGP9t4N9Q4Ye98AAAAAElFTkSuQmCC",
  1026. base64SuccessWhite: "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAGQAAABkBAMAAACCzIhnAAAAGFBMVEVHcEz///////////////////////////8dS1W+AAAAB3RSTlMAiVYk6KvDHLfaegAAAo1JREFUWMPtWEtzmzAQNhCTq910ytXpiyvxTNOr60zrayepx9d02gnX4sTm7xcEiJX2gdnkGJ1A4tOnfWqXyeR1vMRYzrcPD9v5h5MBl3/Ldvx4cxIg/FWC8X0xjLjalM54uhhCfCrRuJURX0pi3EmIqZV7O59vrRZmguStHL9b7S7ftfLwOtiZDw7AHMtmquAQ12b5Wwbnordm8g9zLLO49qc/m2n6aKnhwPOGZ08hAiNHhheiHae1lOUPGZpQkPKa3q0mOUjaRzSRaGUjpy/mmWSwySSpllcEteBKAT52KEnSbblA51pJEPxBQoiH1FP4E3s5+FJv07h6/ylD6ui7B+9fq/ehrFB98ghec9EoVtyjK8pqCHLmCBOwMWSCeWFNN4MbPAk55NhsvoFHSSVR0k5TCTTEzlUGcqV/nVp7n9oIVkmtaqbAEqEgfdgHJPwsEAyZ9r4VAZXFjpEwyaw3+H2v42KYxKhs1XvY/gSSGv+IHyUSuHXCeZhLAgVI3EjgSGo1Fb3xO0tGGU9S2/KAIbtjxpJASG73qox6w5LUq0cEOa+iIONIWIilQSQ0pPa2jgaRQAgQP7c0mITRWGxpMAmEQFN2NAQJNCV0mI6GIIEO47hlQ0ORQLd0nL+hoUjg1m6I1TRr8uYEAriBHLcVFQ5UEMiBe3XkTBEG04WXlGKGxPnMS305XQPA1Ocn2JiuAZwE66fxnKwBnDTuXxZTMq85lwW6kt5ndLqZPefiU1yvmktcUSooChJF2aMprhQlnKJQ5FxRKkcVRa+itNYU8Io2oVkY14w0NMWYlqft91Bj9VHq+ca3b43BxjWJmla0sfKohlfTVpPN+93L/yLQ/IjQ/O5Q/VR5HdL4D7mlxmjwVdELAAAAAElFTkSuQmCC",
  1027. base64Empty: "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAJYAAACWCAMAAAAL34HQAAALeGlUWHRYTUw6Y29tLmFkb2JlLnhtcAAAAAAAPD94cGFja2V0IGJlZ2luPSLvu78iIGlkPSJXNU0wTXBDZWhpSHpyZVN6TlRjemtjOWQiPz4gPHg6eG1wbWV0YSB4bWxuczp4PSJhZG9iZTpuczptZXRhLyIgeDp4bXB0az0iQWRvYmUgWE1QIENvcmUgNi4wLWMwMDIgNzkuMTY0NDg4LCAyMDIwLzA3LzEwLTIyOjA2OjUzICAgICAgICAiPiA8cmRmOlJERiB4bWxuczpyZGY9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkvMDIvMjItcmRmLXN5bnRheC1ucyMiPiA8cmRmOkRlc2NyaXB0aW9uIHJkZjphYm91dD0iIiB4bWxuczp4bXA9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC8iIHhtbG5zOmRjPSJodHRwOi8vcHVybC5vcmcvZGMvZWxlbWVudHMvMS4xLyIgeG1sbnM6eG1wTU09Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9tbS8iIHhtbG5zOnN0RXZ0PSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvc1R5cGUvUmVzb3VyY2VFdmVudCMiIHhtbG5zOnN0UmVmPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvc1R5cGUvUmVzb3VyY2VSZWYjIiB4bWxuczpwaG90b3Nob3A9Imh0dHA6Ly9ucy5hZG9iZS5jb20vcGhvdG9zaG9wLzEuMC8iIHhtbG5zOnRpZmY9Imh0dHA6Ly9ucy5hZG9iZS5jb20vdGlmZi8xLjAvIiB4bWxuczpleGlmPSJodHRwOi8vbnMuYWRvYmUuY29tL2V4aWYvMS4wLyIgeG1wOkNyZWF0b3JUb29sPSJBZG9iZSBQaG90b3Nob3AgQ0MgMjAxOSAoV2luZG93cykiIHhtcDpDcmVhdGVEYXRlPSIyMDIyLTAyLTIyVDIxOjIxOjQ1KzA4OjAwIiB4bXA6TWV0YWRhdGFEYXRlPSIyMDI0LTAxLTEzVDE5OjA5OjQwKzA4OjAwIiB4bXA6TW9kaWZ5RGF0ZT0iMjAyNC0wMS0xM1QxOTowOTo0MCswODowMCIgZGM6Zm9ybWF0PSJpbWFnZS9wbmciIHhtcE1NOkluc3RhbmNlSUQ9InhtcC5paWQ6ZWQwMWYzNWQtOWRjOC00MDBiLWEyMmQtNjM5OGZiNzVhNGRiIiB4bXBNTTpEb2N1bWVudElEPSJhZG9iZTpkb2NpZDpwaG90b3Nob3A6ZDhlMzQ3ZmEtMDY2My1jYTRiLTgzNTctNTk4YjBkNGIzOTU2IiB4bXBNTTpPcmlnaW5hbERvY3VtZW50SUQ9InhtcC5kaWQ6ZDA4MDI4MDItMzUyYS04NTRhLTkxYjctNmRlNmQ1MmViM2QwIiBwaG90b3Nob3A6Q29sb3JNb2RlPSIzIiBwaG90b3Nob3A6SUNDUHJvZmlsZT0ic1JHQiBJRUM2MTk2Ni0yLjEiIHRpZmY6T3JpZW50YXRpb249IjEiIHRpZmY6WFJlc29sdXRpb249IjMwMDAwMDAvMTAwMDAiIHRpZmY6WVJlc29sdXRpb249IjMwMDAwMDAvMTAwMDAiIHRpZmY6UmVzb2x1dGlvblVuaXQ9IjIiIGV4aWY6Q29sb3JTcGFjZT0iMSIgZXhpZjpQaXhlbFhEaW1lbnNpb249IjMwMCIgZXhpZjpQaXhlbFlEaW1lbnNpb249IjMwMCI+IDx4bXBNTTpIaXN0b3J5PiA8cmRmOlNlcT4gPHJkZjpsaSBzdEV2dDphY3Rpb249ImNyZWF0ZWQiIHN0RXZ0Omluc3RhbmNlSUQ9InhtcC5paWQ6ZDA4MDI4MDItMzUyYS04NTRhLTkxYjctNmRlNmQ1MmViM2QwIiBzdEV2dDp3aGVuPSIyMDIyLTAyLTIyVDIxOjIxOjQ1KzA4OjAwIiBzdEV2dDpzb2Z0d2FyZUFnZW50PSJBZG9iZSBQaG90b3Nob3AgQ0MgMjAxOSAoV2luZG93cykiLz4gPHJkZjpsaSBzdEV2dDphY3Rpb249InNhdmVkIiBzdEV2dDppbnN0YW5jZUlEPSJ4bXAuaWlkOjQwNjg2NzJkLWY5NDMtOTU0Mi1iMDBiLTVlMDExNmE1NmIzZSIgc3RFdnQ6d2hlbj0iMjAyNC0wMS0xM1QxMDoyNjoxNiswODowMCIgc3RFdnQ6c29mdHdhcmVBZ2VudD0iQWRvYmUgUGhvdG9zaG9wIENDIDIwMTkgKFdpbmRvd3MpIiBzdEV2dDpjaGFuZ2VkPSIvIi8+IDxyZGY6bGkgc3RFdnQ6YWN0aW9uPSJzYXZlZCIgc3RFdnQ6aW5zdGFuY2VJRD0ieG1wLmlpZDphYmJkZmUyZC0xY2Q2LTJiNDgtYjUyNS05YzlhZjdlNjA4NDMiIHN0RXZ0OndoZW49IjIwMjQtMDEtMTNUMTE6MjM6NDArMDg6MDAiIHN0RXZ0OnNvZnR3YXJlQWdlbnQ9IkFkb2JlIFBob3Rvc2hvcCBDQyAyMDE5IChXaW5kb3dzKSIgc3RFdnQ6Y2hhbmdlZD0iLyIvPiA8cmRmOmxpIHN0RXZ0OmFjdGlvbj0iY29udmVydGVkIiBzdEV2dDpwYXJhbWV0ZXJzPSJmcm9tIGFwcGxpY2F0aW9uL3ZuZC5hZG9iZS5waG90b3Nob3AgdG8gaW1hZ2UvcG5nIi8+IDxyZGY6bGkgc3RFdnQ6YWN0aW9uPSJkZXJpdmVkIiBzdEV2dDpwYXJhbWV0ZXJzPSJjb252ZXJ0ZWQgZnJvbSBhcHBsaWNhdGlvbi92bmQuYWRvYmUucGhvdG9zaG9wIHRvIGltYWdlL3BuZyIvPiA8cmRmOmxpIHN0RXZ0OmFjdGlvbj0ic2F2ZWQiIHN0RXZ0Omluc3RhbmNlSUQ9InhtcC5paWQ6YTQ5MjM5MDAtNDhiZC03YTQ1LWI4NGItYmVlZTVjOWUxYTM1IiBzdEV2dDp3aGVuPSIyMDI0LTAxLTEzVDExOjIzOjQwKzA4OjAwIiBzdEV2dDpzb2Z0d2FyZUFnZW50PSJBZG9iZSBQaG90b3Nob3AgQ0MgMjAxOSAoV2luZG93cykiIHN0RXZ0OmNoYW5nZWQ9Ii8iLz4gPHJkZjpsaSBzdEV2dDphY3Rpb249InNhdmVkIiBzdEV2dDppbnN0YW5jZUlEPSJ4bXAuaWlkOmVkMDFmMzVkLTlkYzgtNDAwYi1hMjJkLTYzOThmYjc1YTRkYiIgc3RFdnQ6d2hlbj0iMjAyNC0wMS0xM1QxOTowOTo0MCswODowMCIgc3RFdnQ6c29mdHdhcmVBZ2VudD0iQWRvYmUgUGhvdG9zaG9wIDIyLjAgKE1hY2ludG9zaCkiIHN0RXZ0OmNoYW5nZWQ9Ii8iLz4gPC9yZGY6U2VxPiA8L3htcE1NOkhpc3Rvcnk+IDx4bXBNTTpEZXJpdmVkRnJvbSBzdFJlZjppbnN0YW5jZUlEPSJ4bXAuaWlkOmFiYmRmZTJkLTFjZDYtMmI0OC1iNTI1LTljOWFmN2U2MDg0MyIgc3RSZWY6ZG9jdW1lbnRJRD0iYWRvYmU6ZG9jaWQ6cGhvdG9zaG9wOjM2ZGQ4NTQxLWQ0MWEtYmY0Yy1iZjA3LWNmNjZhNjZhMDg2MSIgc3RSZWY6b3JpZ2luYWxEb2N1bWVudElEPSJ4bXAuZGlkOmQwODAyODAyLTM1MmEtODU0YS05MWI3LTZkZTZkNTJlYjNkMCIvPiA8L3JkZjpEZXNjcmlwdGlvbj4gPC9yZGY6UkRGPiA8L3g6eG1wbWV0YT4gPD94cGFja2V0IGVuZD0iciI/Pm30U/gAAAAJcEhZcwAALiMAAC4jAXilP3YAAAA/UExURUdwTODg4O3t7e7u7unp6d7e3uTk5M/Pz8nJyePj4+jo6Pj4+MrKyszMzO7u7unp6fb29vLy8vr6+v7+/sHBweag3xAAAAAOdFJOUwAxia5pF0n+/vzX3KbULQ2DYQAACG1JREFUeNrtm4l2o7gShi20IWFrAd7/WUc7EosDWKZ976Hc7WTmdMKXv0qlqpLyeNx222233Xbbbbfddtv/mOHn8xexSNsiRH5PrbFtW4p+DetpsF4v8Gs+HA3WEwOAfwzriYxaLTVsP8X1QK0z+vqQCzewYogi60aL9SEX5oyxphYVCFTGjfSJCTmN1jBruN5KTGCUS8bhySQGHRaohmW4glwtldbOeYJYKlgvbyUuA8aFFEKc++aIM4hrRnyiMnIZKq1PrihcM3GNKboMF1Naa9X9+8T1KrxIlVbGjv3cAEHOYYMqqgUsVuJqqehV3+sjDwB+DTJp0lYtMCyZpxqjF4e+74+sRcQSFZO8UonUSEFzuUY+DKo59A2kZDatGCjzCauy/2AmhSyCq0WHEj0KTNJDmVeNhErMt1Q8W4xti4/FwMJ4jaxl05TKFiNtD3kBGrHnhiph9V0eXQc6DkyE2xX830AlKshFTErXeuCZXK/9m41wFsGSfZ4lcGeyZ98PrylJ7MWCojQZ3qSukL2QslgdngqJnTEPdTJhXvbNBoR/+7wabIxWduN/Ja5dWEivm4XSZ2uQckNzmRlHrn2lc6eiafvS4V2Hd12tesau8toZW0CtWoZYb9t+OqxdCYKYjVPF16pVbILIy/gR7MVaWMHYPCoa2VkzkX4Iry2rirXbumGyAjGC1h62YLw6ApsNKZph3fpIWHt08JovRWD62sejpXhTrhWrPpl6zZ6PW2oTG5ltlvgtF6weNYCWKeJJSfg4W6PNJlj3sVZgOXV4lc8n4RlkMTLEBDVoYc3nI09kpyzzfgWsjyzBZSNDKF2/wjh+sxYvn8Y1scxlfLF9T1RBO3wVHsnq8Fk4oGkEh/0KJPSa8T2CeWE5X9BPmgLsaRIGeNL2kshCsWoLBmdPJW5Wbz1ndAKUXjPwxXYAUpSV3fy5BJg1aa1tyVXHHMgVH31ewDVrleHr9XqC684SUF4mecR3+wW5SC2QNvxUizRv98mLDhPgYiMDb+v8g0OADxqxcnf9w01mZYJF0fUVP5LcdswbsMmy1DVs5PlE5NpNiTR8M8qAWZkOy6aN13VcoOF2/s3xn3Mes8Xza05tgR/BuNz69nlNzMR0fH45p+G4R9oxh2mKt9MF4J7K/lvWUojwF5nCgCpuRUptnZMQ3au0nSo2UsHgV3xpmeLYzGml3ZFBBzYGPCpOQRwXs1/GG1J74dlZc6JKUOtjBAz9XjVxucGWHbZVJDPJQGYDRl1Qmf1ovk2Sbghb6MQlnF7mBzM1bgOqJAPpoOQaVe+4Skcit3uqHMyG/Sh1rHNN0gAfM0nnPrmulfLVBSm20TSZSdWa0LJl2ukVyE4vTYCgP3uQkwv1TKtQWgxDzBSg80OQjCs4klKvuUzHLCfIbDKIE/S5VIGqD1iD2819pkAqTWdmeina+oZABi7X5B1MGoTJqJSchuk6JNHcgUPAcsVFk0+N0oDN68Vo7FQSmCXjx46OEtUk1lpY2ZFQGr/AcpqVato4wPUD+RhfAeyQI5sJ6l2sDwnKqNFSJvpiyJbFl3kTOjZ2ievwCR7hkUoWeV2vOLAXvB39AJoyqYa81A5cvaAidXYTFTycKDBcalVK5f3XS89kzLVl9txfL+K+p6NUnitz5KkKm7D3DrRPNq4bk7l20aFRppNilmuQI+uzTtj9wPBkTsVwM7HbJ5pwGgujyRyZDzQLNoiRFluRtQ+GzEguqRxUL+ZMFqulMzIfaP3ARj2k/txB8c+2HyjmDizCaVWtNoE5MvMlKs/4VQ7HUJZCrU6qCKcNJ2aSWUZhJZu4VI0LB4CHFdj77DRuGi28WKAxoRyZyzGVrmc0jmk1nP5QaxZo1puqq1YIAqgZb8e/rABZJWNCNxV7DSTpOO7Aail9J9nYHtua/4ouE/aS0X1qtXQzwGx+rnbi2vhF/TfZG52oc6DPo1WCi3RTDnRk7TEntoEp38gg+DjYs2opkR3JW5EpL9rU0XSK5/6LOTAVS+72x7pm60zSf5HMdldjhzJqw1FRcxXdS3ZNZp0s92FiyluUvBPoD9ynZNkBiu2NF11ofnlnQbZgKqvusj9R/f6DOzgVsahbNlXxlsxU8y7qrbTupitRyxFBKG6H3aEPUqj7YrzAymq41FXlZLlO4WLbvG2Kg4vYB+wPfWS2B5Rq8TW9ROpAZbiF6MmCTsx1NLLsx7NOoOiZup2CNbZ36xc96ErcxzuILGrmmFhimjtwKo/yTm7feTVwB61IzbnW4967Kt3cDDotGt8JKrTiUyO3Uy2PZZt9tapXEfXhWmTgcoB+JchFWsiCKvYnhmn/tKuJDbgly897FnFfkE1rQLKy810OU7xW3bEJHCD5gERtuTGuxoJqA6qI9TNMa6MbvZomsiubbPYx78YXDaaRqqsyqfSaLZdjYGHLu65rDgydXCWm1P5EvcQ828f9pcBapTILSMv1nZCAc0WzFIFsGfUi/kmAxc6cFqDSYuPSMIbs1OVrwITTQM9HVRFJ5JL56qcoFzzT1uVcd2v9jFw8BHlcWtmEI86hp5Dy/zOlK8cUp/rVseRUBqawz6kmAcPLM9l5m8h4V53Iz/2mFJaTCvF8JbsMvPjU/7crbUXart0v4WyE0LnDPcAX95Knj4VUE8HCdNdUP8BDcOXKdPl4uSWbh4LfOV0HDdfipOmu+eIRrDsNPkIT7np/8ZAzVdOd1u8wHIqeXt8VqtgiO50ePeNaGG+uO9rHiKdL71pnIun8jxEKXv2r2HYBzO/mz96vFKoMM5WLk7tQXS9U5kwCu5lk7n6++kdCFWRaTUzm0/5fClWGWTrM/AGhCrJO/ZBQhTPFLwmV7ebgcdttt91222233Xbbbf+H9h+2WEtdHVinLAAAAABJRU5ErkJggg==",
  1028. base64Error: "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAJYAAACWCAMAAAAL34HQAAALeGlUWHRYTUw6Y29tLmFkb2JlLnhtcAAAAAAAPD94cGFja2V0IGJlZ2luPSLvu78iIGlkPSJXNU0wTXBDZWhpSHpyZVN6TlRjemtjOWQiPz4gPHg6eG1wbWV0YSB4bWxuczp4PSJhZG9iZTpuczptZXRhLyIgeDp4bXB0az0iQWRvYmUgWE1QIENvcmUgNi4wLWMwMDIgNzkuMTY0NDg4LCAyMDIwLzA3LzEwLTIyOjA2OjUzICAgICAgICAiPiA8cmRmOlJERiB4bWxuczpyZGY9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkvMDIvMjItcmRmLXN5bnRheC1ucyMiPiA8cmRmOkRlc2NyaXB0aW9uIHJkZjphYm91dD0iIiB4bWxuczp4bXA9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC8iIHhtbG5zOmRjPSJodHRwOi8vcHVybC5vcmcvZGMvZWxlbWVudHMvMS4xLyIgeG1sbnM6eG1wTU09Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9tbS8iIHhtbG5zOnN0RXZ0PSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvc1R5cGUvUmVzb3VyY2VFdmVudCMiIHhtbG5zOnN0UmVmPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvc1R5cGUvUmVzb3VyY2VSZWYjIiB4bWxuczpwaG90b3Nob3A9Imh0dHA6Ly9ucy5hZG9iZS5jb20vcGhvdG9zaG9wLzEuMC8iIHhtbG5zOnRpZmY9Imh0dHA6Ly9ucy5hZG9iZS5jb20vdGlmZi8xLjAvIiB4bWxuczpleGlmPSJodHRwOi8vbnMuYWRvYmUuY29tL2V4aWYvMS4wLyIgeG1wOkNyZWF0b3JUb29sPSJBZG9iZSBQaG90b3Nob3AgQ0MgMjAxOSAoV2luZG93cykiIHhtcDpDcmVhdGVEYXRlPSIyMDIyLTAyLTIyVDIxOjIxOjQ1KzA4OjAwIiB4bXA6TWV0YWRhdGFEYXRlPSIyMDI0LTAxLTEzVDE5OjEwOjEwKzA4OjAwIiB4bXA6TW9kaWZ5RGF0ZT0iMjAyNC0wMS0xM1QxOToxMDoxMCswODowMCIgZGM6Zm9ybWF0PSJpbWFnZS9wbmciIHhtcE1NOkluc3RhbmNlSUQ9InhtcC5paWQ6MTQ3NTExNjAtZDY5MC00ZTkzLWFhNGUtNGMwYTViNGU1ZGFjIiB4bXBNTTpEb2N1bWVudElEPSJhZG9iZTpkb2NpZDpwaG90b3Nob3A6YzRiNzlkYWMtZTJmYS1iNzQ0LWIxM2ItOWU1N2VjMDhhM2YwIiB4bXBNTTpPcmlnaW5hbERvY3VtZW50SUQ9InhtcC5kaWQ6ZDA4MDI4MDItMzUyYS04NTRhLTkxYjctNmRlNmQ1MmViM2QwIiBwaG90b3Nob3A6Q29sb3JNb2RlPSIzIiBwaG90b3Nob3A6SUNDUHJvZmlsZT0ic1JHQiBJRUM2MTk2Ni0yLjEiIHRpZmY6T3JpZW50YXRpb249IjEiIHRpZmY6WFJlc29sdXRpb249IjMwMDAwMDAvMTAwMDAiIHRpZmY6WVJlc29sdXRpb249IjMwMDAwMDAvMTAwMDAiIHRpZmY6UmVzb2x1dGlvblVuaXQ9IjIiIGV4aWY6Q29sb3JTcGFjZT0iMSIgZXhpZjpQaXhlbFhEaW1lbnNpb249IjMwMCIgZXhpZjpQaXhlbFlEaW1lbnNpb249IjMwMCI+IDx4bXBNTTpIaXN0b3J5PiA8cmRmOlNlcT4gPHJkZjpsaSBzdEV2dDphY3Rpb249ImNyZWF0ZWQiIHN0RXZ0Omluc3RhbmNlSUQ9InhtcC5paWQ6ZDA4MDI4MDItMzUyYS04NTRhLTkxYjctNmRlNmQ1MmViM2QwIiBzdEV2dDp3aGVuPSIyMDIyLTAyLTIyVDIxOjIxOjQ1KzA4OjAwIiBzdEV2dDpzb2Z0d2FyZUFnZW50PSJBZG9iZSBQaG90b3Nob3AgQ0MgMjAxOSAoV2luZG93cykiLz4gPHJkZjpsaSBzdEV2dDphY3Rpb249InNhdmVkIiBzdEV2dDppbnN0YW5jZUlEPSJ4bXAuaWlkOjQwNjg2NzJkLWY5NDMtOTU0Mi1iMDBiLTVlMDExNmE1NmIzZSIgc3RFdnQ6d2hlbj0iMjAyNC0wMS0xM1QxMDoyNjoxNiswODowMCIgc3RFdnQ6c29mdHdhcmVBZ2VudD0iQWRvYmUgUGhvdG9zaG9wIENDIDIwMTkgKFdpbmRvd3MpIiBzdEV2dDpjaGFuZ2VkPSIvIi8+IDxyZGY6bGkgc3RFdnQ6YWN0aW9uPSJzYXZlZCIgc3RFdnQ6aW5zdGFuY2VJRD0ieG1wLmlpZDpjZjk1NTE1OC04MjFiLTA4NDUtYWJmNS05YTE1NGM1ZTY4NjEiIHN0RXZ0OndoZW49IjIwMjQtMDEtMTNUMTE6MDQ6MDQrMDg6MDAiIHN0RXZ0OnNvZnR3YXJlQWdlbnQ9IkFkb2JlIFBob3Rvc2hvcCBDQyAyMDE5IChXaW5kb3dzKSIgc3RFdnQ6Y2hhbmdlZD0iLyIvPiA8cmRmOmxpIHN0RXZ0OmFjdGlvbj0iY29udmVydGVkIiBzdEV2dDpwYXJhbWV0ZXJzPSJmcm9tIGFwcGxpY2F0aW9uL3ZuZC5hZG9iZS5waG90b3Nob3AgdG8gaW1hZ2UvcG5nIi8+IDxyZGY6bGkgc3RFdnQ6YWN0aW9uPSJkZXJpdmVkIiBzdEV2dDpwYXJhbWV0ZXJzPSJjb252ZXJ0ZWQgZnJvbSBhcHBsaWNhdGlvbi92bmQuYWRvYmUucGhvdG9zaG9wIHRvIGltYWdlL3BuZyIvPiA8cmRmOmxpIHN0RXZ0OmFjdGlvbj0ic2F2ZWQiIHN0RXZ0Omluc3RhbmNlSUQ9InhtcC5paWQ6ZGM1Y2IyNWItZDZlNC0yZjQ2LTgyODQtZmUwOTNlY2M2ZTkxIiBzdEV2dDp3aGVuPSIyMDI0LTAxLTEzVDExOjA0OjA0KzA4OjAwIiBzdEV2dDpzb2Z0d2FyZUFnZW50PSJBZG9iZSBQaG90b3Nob3AgQ0MgMjAxOSAoV2luZG93cykiIHN0RXZ0OmNoYW5nZWQ9Ii8iLz4gPHJkZjpsaSBzdEV2dDphY3Rpb249InNhdmVkIiBzdEV2dDppbnN0YW5jZUlEPSJ4bXAuaWlkOjE0NzUxMTYwLWQ2OTAtNGU5My1hYTRlLTRjMGE1YjRlNWRhYyIgc3RFdnQ6d2hlbj0iMjAyNC0wMS0xM1QxOToxMDoxMCswODowMCIgc3RFdnQ6c29mdHdhcmVBZ2VudD0iQWRvYmUgUGhvdG9zaG9wIDIyLjAgKE1hY2ludG9zaCkiIHN0RXZ0OmNoYW5nZWQ9Ii8iLz4gPC9yZGY6U2VxPiA8L3htcE1NOkhpc3Rvcnk+IDx4bXBNTTpEZXJpdmVkRnJvbSBzdFJlZjppbnN0YW5jZUlEPSJ4bXAuaWlkOmNmOTU1MTU4LTgyMWItMDg0NS1hYmY1LTlhMTU0YzVlNjg2MSIgc3RSZWY6ZG9jdW1lbnRJRD0iYWRvYmU6ZG9jaWQ6cGhvdG9zaG9wOjM2ZGQ4NTQxLWQ0MWEtYmY0Yy1iZjA3LWNmNjZhNjZhMDg2MSIgc3RSZWY6b3JpZ2luYWxEb2N1bWVudElEPSJ4bXAuZGlkOmQwODAyODAyLTM1MmEtODU0YS05MWI3LTZkZTZkNTJlYjNkMCIvPiA8L3JkZjpEZXNjcmlwdGlvbj4gPC9yZGY6UkRGPiA8L3g6eG1wbWV0YT4gPD94cGFja2V0IGVuZD0iciI/Ph2LDQsAAAAJcEhZcwAACxMAAAsTAQCanBgAAAA5UExURUdwTNra2s7Ozq2tre3t7dPT087OzuPj4+3t7dbW1u/v79bW1vz8/MrKytDQ0Nzc3MPDw/X19bi4uMZQDnEAAAAKdFJOUwBqEPywotz+wzqApqiTAAAHW0lEQVR42u1b25akIAwcbx2UFoj//7HLTQVBRcSZfTDnbM/uTl/KSlEkwf75eeONN95444033njjjTduR9/0/yOsbqoevObL7101tYX1HFs9QFtfZalRP+rpQVgdAFx990ZnT8L6eZItUl99jeGpf1DxdV/VP9fV1f/PFlF1bYHoVFSRC60IyVjrFRnuB8IoxpExSrstsErKHpJw1eqybNLbAQvAYkKjUrjoBgKRqAaeIjG5+qaps6hKcMWmcdSwqAJWBbAgCZZaIYbsqggqqlHNbFFa5yVR4jKvrKEErOEjNCqNSwHrfE8lpLsod/u+cOPPMPBJ+Gz5dM0cXNgclre+pSxhYI1WW5Tf9ENSMIdLCiWs6q9hwQprBVYKFqyPlx4WtoSvrT9lC/wkGt8qlkQooC3hi6sgW3Bb8gtdpSV/za/mn49pC0oYhONbfyd5hzDLFivKFpTS1gKM0we0tQCEncfgQn7Rt+DC/299i1MSRJcBC0r7VviG5KZvwV5WIUobxHyrJKy8VRjXVgFYsPu5kOtbxdhycCDuihziXVLoW7xwEiUmDgd544B46luWLW+nugMLB2BimmC3cxTNxCDg8xFtuUSNqoFsDKzY8psa+XtBNWXr74N6qxwsS5T6VL5robKl10+ZRu5S9qBvUYuJwVHzjwjrE3G33qKh+WXBgmkmCvHYquTvZ8oo7rLFA4PJgYW0MdePIRQIGUPNbSMw5lubJMKtJI6+Wk6cVFMmACO+VVryeL7ZgI8MhwS2fnNPPK0geHBRd11eJSiyL4KjrL2umm1XIpRii1MKB/mU/iCZwF+pt5z3UJ7UiF3nQqadAXC3T3xEW2IyuDBe3yDTe0+A64it2WTyYSGVHymUI/EduvSWKJ80Dtv2NbYSoQxbMkVC7yzNGIWFvDF7gRD79RYrWW/BDGti4wwLtgvO7gWKUZ8Mt94qX8vLJE70+xVNwzDm9ghNM+FX7p/jlZUId2HJD+Tf79hMe3WNrAK/30E+C8/6xOCqbqxE5JNMYrNbnaLUvJAewfCg8zF0Ba/tbviWLvPYfsGFA1PVD8ZdnjlVc/DS/o7LK4NHjOjKKbfCTSCo5XmwKbaZM4jlc9NGEYd9Ijd0QS5ZGaOR2O+DPlGyRb2nXZzgnI1GdFWF+0gh3ifyTRqvzpXI2eElk58FeHziCF5hY+hSMV9Ge/mohUTGuQ4vzHYe8bW5sNdFQ58St22Vcf5zzJbtcGT4iYQ7iz8dFuxoWRYMjAM7KCnypHOTLSqdUwYIFpndOD/6B2FBzNQxYmW/zxYE4j8yLHga1s2Rbm/O5PXtGcuNDIW1dTj5hpjGsO+7z2Kk9NP1JWDlnWKAM4H6zCUNM05KyVPHBclYzUbgjE3N3tP2JWHBmbqD4GLeCs2jhMT13lMVljwcEbetwZgtHUxVQ21ho3fE7inf2s8vzMWq0EWpfOBg5hcDSGwaF2+LaysRIzNFqRgBv2sMhi/Ix0WiW8rBKNBv4ExBI7eorx9ANazsPCb5FkSNH+Reacos+AYxaFzX76KMH65c8ytzZ40YvpFAqtgC/otn1eCmMI5K8yVRQVVwq3aVtU+jJktwjyP7x+BKv8vtoH098vXYSJcrWGJcAW11r8WVRxe5vgcuFbXqwnaEZejS6mrLwYKUg1ch2RJswTFYgMOwoau+AQsSp/FuDhVZi7J402ifgGla/GJIzGLYG5H4rnKMCUydL9wcsmZSuPikR2QmjQbWqaV2ob2RdMvaLEvFlRiXpYeTwqVOtMZF+qi0dS4uEjJKMvWuYK3S0jHZwaq7BylYp/O2uu3q04lNqudLWEJQd/3paTBz12IaLIPtzE5P1AUuW9TB8NVzaG9/TIfV+eXsWeezz6HWlptEbo4SIAeWur/Y/RZC/gmZTiLzUY2j5ct6fjKsFvxqgyQxE9sbmfYtnJMIciEKo6+FL0wziJmtkzspIcUl0PgWrL7VCKP7hl61U4WLeN+7Ieli2vZhmq0VgjDOgIyhJ62sSpDkWNZa1wiB8WoLlxzy29XpGVPgn1ut5VYcGyRLK7OCiJaDYMrAneJUkZWdw0yDgNm5nDowqLc0Kp581FO7QS4pC9S/YRW9xkVdNOj0ZHCp9anEZw3VEK/fopiDrkMObkcdJtT1g6+uzQ60bIdUPztdWZWy53m+v/zFYPOGHO4AZsalmtJNkyHrCAx1RXX7mt5g1L1pDezpkXv8wJwpVRSSaf2c26Y0rrXXxyWBptu/ovdak+VhkqjGBZUdvKygqANKA/MqZ/36kcGwFn90RnWp66ksKuHgitLFY8BU+F2ZvqpxpMY9qR3YwOUJ12fc0KUHVKdswcKXuwetErCnwvMKuXxfc/3RVJ2yFc+iosQd3X+WGSVz1UiuN2J156FyVyHbsOUp3krezaPUT/VxXqdfwvknb/Zgp+idTxTbrkLqYuKreRnhy65Gf4W0NsDoYiqf6uZsvr8V9eo6XWc5+3TVf/3N1TfeeOONN95444033njjjTfeSI1/IeOYOeO4fGAAAAAASUVORK5CYII=",
  1029. base64BackToTop: "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAMgAAADIBAMAAABfdrOtAAAAElBMVEVRUVH+/v5HcEyZmZlRUVFRUVGm1ByOAAAABnRSTlPMzADMTZAJBBGsAAAEnElEQVR42t2cS27jMAyGf7/2U+QCQeDsbeQCgZDujaC5/1UmkzaJn+JDFGcw3LdfflKibJkkDnxrL7dbg7sNt6+L4O8OYBM+B0ys+QrGkHZG+OEEQ8g6go8Bx1GIGMdpNOQyIG6XdMgnSPtKhLQDGEZFBgYMkhKFtGBb0EIEjDgFRowoBVaMGAWpMedEfxMiZtwpUsgZCqtlkCNUdpVAWigtCCCDFtLwIWeoreZCWiRYYEKGFEjDg+yRZCUH0iLRAgNyToXUNCRZyMqWhGnUN2IPm3wSlwJ7IUspyCBkIQUZhCykIIeQuRTkEDKXAuM9srrtYbrZN7Y98giZSoFd+t1OxmMITG0dcrSFXFchZ1tIvQZpYWxhBbK3hpQrkMEa0iwh5t4a+QvZvDXyF7J5a+Qv5PPW21/I5623v5DPW29/IaO3Xv5Clrw1y1/Ikrdm+Qs5svw83yNnSJ5BQb4F/F7EIEJSnThGBAXxkFQfLOviQUE8JAUPsosHBfGQfDAtHhREQ1JxIV00KIgmrnRI84S0yAd5BAXxxJUck0f6Qnwr9qmr6xF5xLMjcwn/iudIEAdWnyjkEXlQKZiRVzoqRyLbgeUKKR8Q4alY7cSnoxzSf2ggsqehKr6YVpcXpOd7H93f60cKhOd7Re2LteUF4eLqiVS1mr0ge4io6C2+soaFkJ7MuuuQs1yITEp9hwwKISIpzR2iESKSIoT0rLNwuVHQqoSIpAQJpGce60vIUSdEIuUqgPTsJ5QFZK8UIpBS8iG94GFrDjlrhfCl8CG96Llxmle4kEr6vKWBPIVo9kqDQSRk9/3cWoikcCFPAd33v4dIChPyEvLzBA6RlEYWke4JEUnhKXkLeUEKxRHJFfKCQHGucIW8IdZSRkLeEGMpYyEjiK2UsZARxFTKRMgYYillImQMMZQyFTKB2EmZCplAuFLIHT8TMoWwpQwiIVMIUwqpZP5bp5CCvCTiQKr5f5lCQN+tPCBn2ZvVDFJwIDUP0m1BYAfZYRNSsCB7BqTbhoARePIxtZ9tgwWkoJcwCalmv3MBAemtO4R6dah2HaKQqj8Zvp9sQDjvJ21+SPCBHPJDDk6QITekEV7gqCC19CpKAym9IMfckKv4olMBCeIrWwVEfvkshzQekO9r9P1/ALk+IG1eSPCDiCJfyG+FyU+A6ZCa/piZDinpz7LpkCv5gdkAEshP5emQhv7onw6pGeULyZCSUYiRDAmMkpJkCKs4JhFSq8p8hJBSVbAkhARV6ZUQoisik0FqXTmcDHLVFfbJIEFXoiiCNMpiSxGkVJaNiiBBWQArgTTaUl4JpNQWJUsgQVteXQg+AKkLxQWFGKW+5J2+eVp4S168X3CF1CltCKdTJ8lb84YK2bUBO+wZW0Pqv9nk4tKu49N45NJC5dMM5tLW5tOg59Jq6NM06dL+abFXwr/RkuvTXJwae1abtE/Dt0/ruksTvs84AZ/BCC4jHnyGVfiM3VBQFANEXEah+Ax18RlP4zNox2dkkM/wI58xTn8yDCXGYCDV3W5RGSajtXyGhG1jbpbjzpwGt/0MJft8jqC7iUbQ/QZaxdnKqcIftwAAAABJRU5ErkJggg=="
  1030. };
  1031. const _sfc_main$2i = {
  1032. name: "z-paging-empty-view",
  1033. data() {
  1034. return {};
  1035. },
  1036. props: {
  1037. // 空数据描述文字
  1038. emptyViewText: {
  1039. type: String,
  1040. default: "没有数据哦~"
  1041. },
  1042. // 空数据图片
  1043. emptyViewImg: {
  1044. type: String,
  1045. default: ""
  1046. },
  1047. // 是否显示空数据图重新加载按钮
  1048. showEmptyViewReload: {
  1049. type: Boolean,
  1050. default: false
  1051. },
  1052. // 空数据点击重新加载文字
  1053. emptyViewReloadText: {
  1054. type: String,
  1055. default: "重新加载"
  1056. },
  1057. // 是否是加载失败
  1058. isLoadFailed: {
  1059. type: Boolean,
  1060. default: false
  1061. },
  1062. // 空数据图样式
  1063. emptyViewStyle: {
  1064. type: Object,
  1065. default: function() {
  1066. return {};
  1067. }
  1068. },
  1069. // 空数据图img样式
  1070. emptyViewImgStyle: {
  1071. type: Object,
  1072. default: function() {
  1073. return {};
  1074. }
  1075. },
  1076. // 空数据图描述文字样式
  1077. emptyViewTitleStyle: {
  1078. type: Object,
  1079. default: function() {
  1080. return {};
  1081. }
  1082. },
  1083. // 空数据图重新加载按钮样式
  1084. emptyViewReloadStyle: {
  1085. type: Object,
  1086. default: function() {
  1087. return {};
  1088. }
  1089. },
  1090. // 空数据图z-index
  1091. emptyViewZIndex: {
  1092. type: Number,
  1093. default: 9
  1094. },
  1095. // 空数据图片是否使用fixed布局并铺满z-paging
  1096. emptyViewFixed: {
  1097. type: Boolean,
  1098. default: true
  1099. },
  1100. // 空数据图中布局的单位,默认为rpx
  1101. unit: {
  1102. type: String,
  1103. default: "rpx"
  1104. }
  1105. },
  1106. computed: {
  1107. emptyImg() {
  1108. return this.isLoadFailed ? zStatic.base64Error : zStatic.base64Empty;
  1109. },
  1110. finalEmptyViewStyle() {
  1111. this.emptyViewStyle["z-index"] = this.emptyViewZIndex;
  1112. return this.emptyViewStyle;
  1113. }
  1114. },
  1115. methods: {
  1116. // 点击了reload按钮
  1117. reloadClick() {
  1118. this.$emit("reload");
  1119. },
  1120. // 点击了空数据view
  1121. emptyViewClick() {
  1122. this.$emit("viewClick");
  1123. }
  1124. }
  1125. };
  1126. function _sfc_render$2h(_ctx, _cache, $props, $setup, $data, $options) {
  1127. return vue.openBlock(), vue.createElementBlock(
  1128. "view",
  1129. {
  1130. class: vue.normalizeClass({ "zp-container": true, "zp-container-fixed": $props.emptyViewFixed }),
  1131. style: vue.normalizeStyle([$options.finalEmptyViewStyle]),
  1132. onClick: _cache[1] || (_cache[1] = (...args) => $options.emptyViewClick && $options.emptyViewClick(...args))
  1133. },
  1134. [
  1135. vue.createElementVNode("view", { class: "zp-main" }, [
  1136. !$props.emptyViewImg.length ? (vue.openBlock(), vue.createElementBlock("image", {
  1137. key: 0,
  1138. class: vue.normalizeClass({ "zp-main-image-rpx": $props.unit === "rpx", "zp-main-image-px": $props.unit === "px" }),
  1139. style: vue.normalizeStyle([$props.emptyViewImgStyle]),
  1140. src: $options.emptyImg
  1141. }, null, 14, ["src"])) : (vue.openBlock(), vue.createElementBlock("image", {
  1142. key: 1,
  1143. class: vue.normalizeClass({ "zp-main-image-rpx": $props.unit === "rpx", "zp-main-image-px": $props.unit === "px" }),
  1144. mode: "aspectFit",
  1145. style: vue.normalizeStyle([$props.emptyViewImgStyle]),
  1146. src: $props.emptyViewImg
  1147. }, null, 14, ["src"])),
  1148. vue.createElementVNode(
  1149. "text",
  1150. {
  1151. class: vue.normalizeClass(["zp-main-title", { "zp-main-title-rpx": $props.unit === "rpx", "zp-main-title-px": $props.unit === "px" }]),
  1152. style: vue.normalizeStyle([$props.emptyViewTitleStyle])
  1153. },
  1154. vue.toDisplayString($props.emptyViewText),
  1155. 7
  1156. /* TEXT, CLASS, STYLE */
  1157. ),
  1158. $props.showEmptyViewReload ? (vue.openBlock(), vue.createElementBlock(
  1159. "text",
  1160. {
  1161. key: 2,
  1162. class: vue.normalizeClass({ "zp-main-error-btn": true, "zp-main-error-btn-rpx": $props.unit === "rpx", "zp-main-error-btn-px": $props.unit === "px" }),
  1163. style: vue.normalizeStyle([$props.emptyViewReloadStyle]),
  1164. onClick: _cache[0] || (_cache[0] = vue.withModifiers((...args) => $options.reloadClick && $options.reloadClick(...args), ["stop"]))
  1165. },
  1166. vue.toDisplayString($props.emptyViewReloadText),
  1167. 7
  1168. /* TEXT, CLASS, STYLE */
  1169. )) : vue.createCommentVNode("v-if", true)
  1170. ])
  1171. ],
  1172. 6
  1173. /* CLASS, STYLE */
  1174. );
  1175. }
  1176. const __easycom_0$f = /* @__PURE__ */ _export_sfc(_sfc_main$2i, [["render", _sfc_render$2h], ["__scopeId", "data-v-b7999e14"], ["__file", "C:/Users/EDY/Desktop/项目/shuibei/uni_modules/z-paging/components/z-paging-empty-view/z-paging-empty-view.vue"]]);
  1177. const c$1 = {
  1178. // 当前版本号
  1179. version: "2.8.7",
  1180. // 延迟操作的通用时间
  1181. delayTime: 100,
  1182. // 请求失败时候全局emit使用的key
  1183. errorUpdateKey: "z-paging-error-emit",
  1184. // 全局emit complete的key
  1185. completeUpdateKey: "z-paging-complete-emit",
  1186. // z-paging缓存的前缀key
  1187. cachePrefixKey: "z-paging-cache",
  1188. // 虚拟列表中列表index的key
  1189. listCellIndexKey: "zp_index",
  1190. // 虚拟列表中列表的唯一key
  1191. listCellIndexUniqueKey: "zp_unique_index"
  1192. };
  1193. const zLocalConfig = {};
  1194. const storageKey = "Z-PAGING-REFRESHER-TIME-STORAGE-KEY";
  1195. let config$2 = null;
  1196. let configLoaded = false;
  1197. let cachedSystemInfo = null;
  1198. const timeoutMap = {};
  1199. function gc(key, defaultValue) {
  1200. return () => {
  1201. _handleDefaultConfig();
  1202. if (!config$2)
  1203. return defaultValue;
  1204. const value2 = config$2[key];
  1205. return value2 === void 0 ? defaultValue : value2;
  1206. };
  1207. }
  1208. function getTouch(e2) {
  1209. let touch = null;
  1210. if (e2.touches && e2.touches.length) {
  1211. touch = e2.touches[0];
  1212. } else if (e2.changedTouches && e2.changedTouches.length) {
  1213. touch = e2.changedTouches[0];
  1214. } else if (e2.datail && e2.datail != {}) {
  1215. touch = e2.datail;
  1216. } else {
  1217. return { touchX: 0, touchY: 0 };
  1218. }
  1219. return {
  1220. touchX: touch.clientX,
  1221. touchY: touch.clientY
  1222. };
  1223. }
  1224. function getTouchFromZPaging(target) {
  1225. if (target && target.tagName && target.tagName !== "BODY" && target.tagName !== "UNI-PAGE-BODY") {
  1226. const classList = target.classList;
  1227. if (classList && classList.contains("z-paging-content")) {
  1228. return {
  1229. isFromZp: true,
  1230. isPageScroll: classList.contains("z-paging-content-page"),
  1231. isReachedTop: classList.contains("z-paging-reached-top"),
  1232. isUseChatRecordMode: classList.contains("z-paging-use-chat-record-mode")
  1233. };
  1234. } else {
  1235. return getTouchFromZPaging(target.parentNode);
  1236. }
  1237. } else {
  1238. return { isFromZp: false };
  1239. }
  1240. }
  1241. function getParent(parent) {
  1242. if (!parent)
  1243. return null;
  1244. if (parent.$refs.paging)
  1245. return parent;
  1246. return getParent(parent.$parent);
  1247. }
  1248. function consoleErr(err) {
  1249. formatAppLog("error", "at uni_modules/z-paging/components/z-paging/js/z-paging-utils.js:73", `[z-paging]${err}`);
  1250. }
  1251. function delay(callback, ms = c$1.delayTime, key) {
  1252. const timeout2 = setTimeout(callback, ms);
  1253. if (!!key) {
  1254. timeoutMap[key] && clearTimeout(timeoutMap[key]);
  1255. timeoutMap[key] = timeout2;
  1256. }
  1257. return timeout2;
  1258. }
  1259. function setRefesrherTime(time, key) {
  1260. const datas = getRefesrherTime() || {};
  1261. datas[key] = time;
  1262. uni.setStorageSync(storageKey, datas);
  1263. }
  1264. function getRefesrherTime() {
  1265. return uni.getStorageSync(storageKey);
  1266. }
  1267. function getRefesrherTimeByKey(key) {
  1268. const datas = getRefesrherTime();
  1269. return datas && datas[key] ? datas[key] : null;
  1270. }
  1271. function getRefesrherFormatTimeByKey(key, textMap) {
  1272. const time = getRefesrherTimeByKey(key);
  1273. const timeText = time ? _timeFormat(time, textMap) : textMap.none;
  1274. return `${textMap.title}${timeText}`;
  1275. }
  1276. function convertToPx(text) {
  1277. const dataType = Object.prototype.toString.call(text);
  1278. if (dataType === "[object Number]")
  1279. return text;
  1280. let isRpx = false;
  1281. if (text.indexOf("rpx") !== -1 || text.indexOf("upx") !== -1) {
  1282. text = text.replace("rpx", "").replace("upx", "");
  1283. isRpx = true;
  1284. } else if (text.indexOf("px") !== -1) {
  1285. text = text.replace("px", "");
  1286. }
  1287. if (!isNaN(text)) {
  1288. if (isRpx)
  1289. return Number(rpx2px(text));
  1290. return Number(text);
  1291. }
  1292. return 0;
  1293. }
  1294. function rpx2px(rpx) {
  1295. return uni.upx2px(rpx);
  1296. }
  1297. function getSystemInfoSync(useCache = false) {
  1298. if (useCache && cachedSystemInfo) {
  1299. return cachedSystemInfo;
  1300. }
  1301. const infoTypes = ["DeviceInfo", "AppBaseInfo", "WindowInfo"];
  1302. const { deviceInfo, appBaseInfo, windowInfo } = infoTypes.reduce((acc, key) => {
  1303. const method = `get${key}`;
  1304. if (uni[method] && uni.canIUse(method)) {
  1305. acc[key.charAt(0).toLowerCase() + key.slice(1)] = uni[method]();
  1306. }
  1307. return acc;
  1308. }, {});
  1309. if (deviceInfo && appBaseInfo && windowInfo) {
  1310. cachedSystemInfo = { ...deviceInfo, ...appBaseInfo, ...windowInfo };
  1311. } else {
  1312. cachedSystemInfo = uni.getSystemInfoSync();
  1313. }
  1314. return cachedSystemInfo;
  1315. }
  1316. function getTime() {
  1317. return (/* @__PURE__ */ new Date()).getTime();
  1318. }
  1319. function getInstanceId() {
  1320. const s2 = [];
  1321. const hexDigits = "0123456789abcdef";
  1322. for (let i2 = 0; i2 < 10; i2++) {
  1323. s2[i2] = hexDigits.substr(Math.floor(Math.random() * 16), 1);
  1324. }
  1325. return s2.join("") + getTime();
  1326. }
  1327. function wait(ms) {
  1328. return new Promise((resolve) => {
  1329. setTimeout(resolve, ms);
  1330. });
  1331. }
  1332. function isPromise(func2) {
  1333. return Object.prototype.toString.call(func2) === "[object Promise]";
  1334. }
  1335. function addUnit$1(value2, unit) {
  1336. if (Object.prototype.toString.call(value2) === "[object String]") {
  1337. let tempValue = value2;
  1338. tempValue = tempValue.replace("rpx", "").replace("upx", "").replace("px", "");
  1339. if (value2.indexOf("rpx") === -1 && value2.indexOf("upx") === -1 && value2.indexOf("px") !== -1) {
  1340. tempValue = parseFloat(tempValue) * 2;
  1341. }
  1342. value2 = tempValue;
  1343. }
  1344. return unit === "rpx" ? value2 + "rpx" : value2 / 2 + "px";
  1345. }
  1346. function deepCopy(obj) {
  1347. if (typeof obj !== "object" || obj === null)
  1348. return obj;
  1349. let newObj = Array.isArray(obj) ? [] : {};
  1350. for (let key in obj) {
  1351. if (obj.hasOwnProperty(key)) {
  1352. newObj[key] = deepCopy(obj[key]);
  1353. }
  1354. }
  1355. return newObj;
  1356. }
  1357. function useBufferedInsert(fn, delay2 = 50) {
  1358. let buffer = [];
  1359. let timer = null;
  1360. let latestArgs = [];
  1361. return function insertBuffered(data, ...args) {
  1362. const newData = Object.prototype.toString.call(data) !== "[object Array]" ? [data] : data;
  1363. buffer.push(...newData);
  1364. latestArgs = args;
  1365. if (!timer) {
  1366. timer = setTimeout(() => {
  1367. fn(buffer.length === 1 ? buffer[0] : buffer, ...latestArgs);
  1368. buffer = [];
  1369. timer = null;
  1370. }, buffer.length === 1 ? 10 : delay2);
  1371. }
  1372. };
  1373. }
  1374. function _handleDefaultConfig() {
  1375. if (configLoaded)
  1376. return;
  1377. if (zLocalConfig && Object.keys(zLocalConfig).length) {
  1378. config$2 = zLocalConfig;
  1379. }
  1380. if (!config$2 && uni.$zp) {
  1381. config$2 = uni.$zp.config;
  1382. }
  1383. config$2 = config$2 ? Object.keys(config$2).reduce((result, key) => {
  1384. result[_toCamelCase(key)] = config$2[key];
  1385. return result;
  1386. }, {}) : null;
  1387. configLoaded = true;
  1388. }
  1389. function _timeFormat(time, textMap) {
  1390. const date3 = new Date(time);
  1391. const currentDate = /* @__PURE__ */ new Date();
  1392. const dateDay = new Date(time).setHours(0, 0, 0, 0);
  1393. const currentDateDay = (/* @__PURE__ */ new Date()).setHours(0, 0, 0, 0);
  1394. const disTime = dateDay - currentDateDay;
  1395. let dayStr = "";
  1396. const timeStr = _dateTimeFormat(date3);
  1397. if (disTime === 0) {
  1398. dayStr = textMap.today;
  1399. } else if (disTime === -864e5) {
  1400. dayStr = textMap.yesterday;
  1401. } else {
  1402. dayStr = _dateDayFormat(date3, date3.getFullYear() !== currentDate.getFullYear());
  1403. }
  1404. return `${dayStr} ${timeStr}`;
  1405. }
  1406. function _dateDayFormat(date3, showYear = true) {
  1407. const year = date3.getFullYear();
  1408. const month = date3.getMonth() + 1;
  1409. const day = date3.getDate();
  1410. return showYear ? `${year}-${_fullZeroToTwo(month)}-${_fullZeroToTwo(day)}` : `${_fullZeroToTwo(month)}-${_fullZeroToTwo(day)}`;
  1411. }
  1412. function _dateTimeFormat(date3) {
  1413. const hour = date3.getHours();
  1414. const minute = date3.getMinutes();
  1415. return `${_fullZeroToTwo(hour)}:${_fullZeroToTwo(minute)}`;
  1416. }
  1417. function _fullZeroToTwo(str) {
  1418. str = str.toString();
  1419. return str.length === 1 ? "0" + str : str;
  1420. }
  1421. function _toCamelCase(value2) {
  1422. return value2.replace(/-([a-z])/g, (_2, group1) => group1.toUpperCase());
  1423. }
  1424. const u$1 = {
  1425. gc,
  1426. setRefesrherTime,
  1427. getRefesrherFormatTimeByKey,
  1428. getTouch,
  1429. getTouchFromZPaging,
  1430. getParent,
  1431. convertToPx,
  1432. getTime,
  1433. getInstanceId,
  1434. consoleErr,
  1435. delay,
  1436. wait,
  1437. isPromise,
  1438. addUnit: addUnit$1,
  1439. deepCopy,
  1440. rpx2px,
  1441. getSystemInfoSync,
  1442. useBufferedInsert
  1443. };
  1444. const Enum = {
  1445. // 当前加载类型 refresher:下拉刷新 load-more:上拉加载更多
  1446. LoadingType: {
  1447. Refresher: "refresher",
  1448. LoadMore: "load-more"
  1449. },
  1450. // 下拉刷新状态 default:默认状态 release-to-refresh:松手立即刷新 loading:刷新中 complete:刷新结束 go-f2:松手进入二楼
  1451. Refresher: {
  1452. Default: "default",
  1453. ReleaseToRefresh: "release-to-refresh",
  1454. Loading: "loading",
  1455. Complete: "complete",
  1456. GoF2: "go-f2"
  1457. },
  1458. // 底部加载更多状态 default:默认状态 loading:加载中 no-more:没有更多数据 fail:加载失败
  1459. More: {
  1460. Default: "default",
  1461. Loading: "loading",
  1462. NoMore: "no-more",
  1463. Fail: "fail"
  1464. },
  1465. // @query触发来源 user-pull-down:用户主动下拉刷新 reload:通过reload触发 refresh:通过refresh触发 load-more:通过滚动到底部加载更多或点击底部加载更多触发
  1466. QueryFrom: {
  1467. UserPullDown: "user-pull-down",
  1468. Reload: "reload",
  1469. Refresh: "refresh",
  1470. LoadMore: "load-more"
  1471. },
  1472. // 虚拟列表cell高度模式
  1473. CellHeightMode: {
  1474. // 固定高度
  1475. Fixed: "fixed",
  1476. // 动态高度
  1477. Dynamic: "dynamic"
  1478. },
  1479. // 列表缓存模式
  1480. CacheMode: {
  1481. // 默认模式,只会缓存一次
  1482. Default: "default",
  1483. // 总是缓存,每次列表刷新(下拉刷新、调用reload等)都会更新缓存
  1484. Always: "always"
  1485. }
  1486. };
  1487. const _sfc_main$2h = {
  1488. name: "z-paging-refresh",
  1489. data() {
  1490. return {
  1491. R: Enum.Refresher,
  1492. refresherTimeText: "",
  1493. zTheme: {
  1494. title: { white: "#efefef", black: "#555555" },
  1495. arrow: { white: zStatic.base64ArrowWhite, black: zStatic.base64Arrow },
  1496. flower: { white: zStatic.base64FlowerWhite, black: zStatic.base64Flower },
  1497. success: { white: zStatic.base64SuccessWhite, black: zStatic.base64Success },
  1498. indicator: { white: "#eeeeee", black: "#777777" }
  1499. }
  1500. };
  1501. },
  1502. props: [
  1503. "status",
  1504. "defaultThemeStyle",
  1505. "defaultText",
  1506. "pullingText",
  1507. "refreshingText",
  1508. "completeText",
  1509. "goF2Text",
  1510. "defaultImg",
  1511. "pullingImg",
  1512. "refreshingImg",
  1513. "completeImg",
  1514. "refreshingAnimated",
  1515. "showUpdateTime",
  1516. "updateTimeKey",
  1517. "imgStyle",
  1518. "titleStyle",
  1519. "updateTimeStyle",
  1520. "updateTimeTextMap",
  1521. "unit",
  1522. "isIos"
  1523. ],
  1524. computed: {
  1525. ts() {
  1526. return this.defaultThemeStyle;
  1527. },
  1528. // 当前状态Map
  1529. statusTextMap() {
  1530. this.updateTime();
  1531. const { R: R2, defaultText, pullingText, refreshingText, completeText, goF2Text } = this;
  1532. return {
  1533. [R2.Default]: defaultText,
  1534. [R2.ReleaseToRefresh]: pullingText,
  1535. [R2.Loading]: refreshingText,
  1536. [R2.Complete]: completeText,
  1537. [R2.GoF2]: goF2Text
  1538. };
  1539. },
  1540. // 当前状态文字
  1541. currentTitle() {
  1542. return this.statusTextMap[this.status] || this.defaultText;
  1543. },
  1544. // 左侧图片class
  1545. leftImageClass() {
  1546. const preSizeClass = `zp-r-left-image-pre-size-${this.unit}`;
  1547. if (this.status === this.R.Complete)
  1548. return preSizeClass;
  1549. return `zp-r-left-image ${preSizeClass} ${this.status === this.R.Default ? "zp-r-arrow-down" : "zp-r-arrow-top"}`;
  1550. },
  1551. // 左侧图片style
  1552. leftImageStyle() {
  1553. const showUpdateTime = this.showUpdateTime;
  1554. const size = showUpdateTime ? u$1.addUnit(36, this.unit) : u$1.addUnit(34, this.unit);
  1555. return { width: size, height: size, "margin-right": showUpdateTime ? u$1.addUnit(20, this.unit) : u$1.addUnit(9, this.unit) };
  1556. },
  1557. // 左侧图片src
  1558. leftImageSrc() {
  1559. const R2 = this.R;
  1560. const status = this.status;
  1561. if (status === R2.Default) {
  1562. if (!!this.defaultImg)
  1563. return this.defaultImg;
  1564. return this.zTheme.arrow[this.ts];
  1565. } else if (status === R2.ReleaseToRefresh) {
  1566. if (!!this.pullingImg)
  1567. return this.pullingImg;
  1568. if (!!this.defaultImg)
  1569. return this.defaultImg;
  1570. return this.zTheme.arrow[this.ts];
  1571. } else if (status === R2.Loading) {
  1572. if (!!this.refreshingImg)
  1573. return this.refreshingImg;
  1574. return this.zTheme.flower[this.ts];
  1575. } else if (status === R2.Complete) {
  1576. if (!!this.completeImg)
  1577. return this.completeImg;
  1578. return this.zTheme.success[this.ts];
  1579. } else if (status === R2.GoF2) {
  1580. return this.zTheme.arrow[this.ts];
  1581. }
  1582. return "";
  1583. },
  1584. // 右侧文字style
  1585. rightTextStyle() {
  1586. let stl = {};
  1587. stl["color"] = this.zTheme.title[this.ts];
  1588. stl["font-size"] = u$1.addUnit(30, this.unit);
  1589. return stl;
  1590. }
  1591. },
  1592. methods: {
  1593. // 添加单位
  1594. addUnit(value2, unit) {
  1595. return u$1.addUnit(value2, unit);
  1596. },
  1597. // 更新下拉刷新时间
  1598. updateTime() {
  1599. if (this.showUpdateTime) {
  1600. this.refresherTimeText = u$1.getRefesrherFormatTimeByKey(this.updateTimeKey, this.updateTimeTextMap);
  1601. }
  1602. }
  1603. }
  1604. };
  1605. function _sfc_render$2g(_ctx, _cache, $props, $setup, $data, $options) {
  1606. return vue.openBlock(), vue.createElementBlock("view", { style: { "height": "100%" } }, [
  1607. vue.createElementVNode(
  1608. "view",
  1609. {
  1610. class: vue.normalizeClass($props.showUpdateTime ? "zp-r-container zp-r-container-padding" : "zp-r-container")
  1611. },
  1612. [
  1613. vue.createElementVNode("view", { class: "zp-r-left" }, [
  1614. vue.createCommentVNode(" 非加载中(继续下拉刷新、松手立即刷新状态图片) "),
  1615. $props.status !== $data.R.Loading ? (vue.openBlock(), vue.createElementBlock("image", {
  1616. key: 0,
  1617. class: vue.normalizeClass($options.leftImageClass),
  1618. style: vue.normalizeStyle([$options.leftImageStyle, $props.imgStyle]),
  1619. src: $options.leftImageSrc
  1620. }, null, 14, ["src"])) : (vue.openBlock(), vue.createElementBlock(
  1621. vue.Fragment,
  1622. { key: 1 },
  1623. [
  1624. vue.createCommentVNode(" 加载状态图片 "),
  1625. vue.createElementVNode("image", {
  1626. class: vue.normalizeClass({ "zp-line-loading-image": $props.refreshingAnimated, "zp-r-left-image": true, "zp-r-left-image-pre-size-rpx": $props.unit === "rpx", "zp-r-left-image-pre-size-px": $props.unit === "px" }),
  1627. style: vue.normalizeStyle([$options.leftImageStyle, $props.imgStyle]),
  1628. src: $options.leftImageSrc
  1629. }, null, 14, ["src"])
  1630. ],
  1631. 2112
  1632. /* STABLE_FRAGMENT, DEV_ROOT_FRAGMENT */
  1633. )),
  1634. vue.createCommentVNode(" 在nvue中,加载状态loading使用系统loading ")
  1635. ]),
  1636. vue.createCommentVNode(" 右侧文字内容 "),
  1637. vue.createElementVNode("view", { class: "zp-r-right" }, [
  1638. vue.createCommentVNode(" 右侧下拉刷新状态文字 "),
  1639. vue.createElementVNode(
  1640. "text",
  1641. {
  1642. class: "zp-r-right-text",
  1643. style: vue.normalizeStyle([$options.rightTextStyle, $props.titleStyle])
  1644. },
  1645. vue.toDisplayString($options.currentTitle),
  1646. 5
  1647. /* TEXT, STYLE */
  1648. ),
  1649. vue.createCommentVNode(" 右侧下拉刷新时间文字 "),
  1650. $props.showUpdateTime && $data.refresherTimeText.length ? (vue.openBlock(), vue.createElementBlock(
  1651. "text",
  1652. {
  1653. key: 0,
  1654. class: vue.normalizeClass(["zp-r-right-text", { "zp-r-right-time-text-rpx": $props.unit === "rpx", "zp-r-right-time-text-px": $props.unit === "px" }]),
  1655. style: vue.normalizeStyle([{ color: $data.zTheme.title[$options.ts] }, $props.updateTimeStyle])
  1656. },
  1657. vue.toDisplayString($data.refresherTimeText),
  1658. 7
  1659. /* TEXT, CLASS, STYLE */
  1660. )) : vue.createCommentVNode("v-if", true)
  1661. ])
  1662. ],
  1663. 2
  1664. /* CLASS */
  1665. )
  1666. ]);
  1667. }
  1668. const zPagingRefresh = /* @__PURE__ */ _export_sfc(_sfc_main$2h, [["render", _sfc_render$2g], ["__scopeId", "data-v-00a16504"], ["__file", "C:/Users/EDY/Desktop/项目/shuibei/uni_modules/z-paging/components/z-paging/components/z-paging-refresh.vue"]]);
  1669. const _sfc_main$2g = {
  1670. name: "z-paging-load-more",
  1671. data() {
  1672. return {
  1673. M: Enum.More,
  1674. zTheme: {
  1675. title: { white: "#efefef", black: "#a4a4a4" },
  1676. line: { white: "#efefef", black: "#eeeeee" },
  1677. circleBorder: { white: "#aaaaaa", black: "#c8c8c8" },
  1678. circleBorderTop: { white: "#ffffff", black: "#444444" },
  1679. flower: { white: zStatic.base64FlowerWhite, black: zStatic.base64Flower },
  1680. indicator: { white: "#eeeeee", black: "#777777" }
  1681. }
  1682. };
  1683. },
  1684. props: ["zConfig"],
  1685. computed: {
  1686. ts() {
  1687. return this.c.defaultThemeStyle;
  1688. },
  1689. // 底部加载更多配置
  1690. c() {
  1691. return this.zConfig || {};
  1692. },
  1693. // 底部加载更多文字
  1694. ownLoadingMoreText() {
  1695. return {
  1696. [this.M.Default]: this.c.defaultText,
  1697. [this.M.Loading]: this.c.loadingText,
  1698. [this.M.NoMore]: this.c.noMoreText,
  1699. [this.M.Fail]: this.c.failText
  1700. }[this.finalStatus];
  1701. },
  1702. // 底部加载更多状态
  1703. finalStatus() {
  1704. if (this.c.defaultAsLoading && this.c.status === this.M.Default)
  1705. return this.M.Loading;
  1706. return this.c.status;
  1707. },
  1708. // 加载更多icon类型
  1709. finalLoadingIconType() {
  1710. return this.c.loadingIconType;
  1711. }
  1712. },
  1713. methods: {
  1714. // 点击了加载更多
  1715. doClick() {
  1716. this.$emit("doClick");
  1717. }
  1718. }
  1719. };
  1720. function _sfc_render$2f(_ctx, _cache, $props, $setup, $data, $options) {
  1721. return vue.openBlock(), vue.createElementBlock(
  1722. "view",
  1723. {
  1724. class: vue.normalizeClass(["zp-l-container", { "zp-l-container-rpx": $options.c.unit === "rpx", "zp-l-container-px": $options.c.unit === "px" }]),
  1725. style: vue.normalizeStyle([$options.c.customStyle]),
  1726. onClick: _cache[0] || (_cache[0] = (...args) => $options.doClick && $options.doClick(...args))
  1727. },
  1728. [
  1729. !$options.c.hideContent ? (vue.openBlock(), vue.createElementBlock(
  1730. vue.Fragment,
  1731. { key: 0 },
  1732. [
  1733. vue.createCommentVNode(" 底部加载更多没有更多数据分割线 "),
  1734. $options.c.showNoMoreLine && $options.finalStatus === $data.M.NoMore ? (vue.openBlock(), vue.createElementBlock(
  1735. "text",
  1736. {
  1737. key: 0,
  1738. class: vue.normalizeClass({ "zp-l-line-rpx": $options.c.unit === "rpx", "zp-l-line-px": $options.c.unit === "px" }),
  1739. style: vue.normalizeStyle([{ backgroundColor: $data.zTheme.line[$options.ts] }, $options.c.noMoreLineCustomStyle])
  1740. },
  1741. null,
  1742. 6
  1743. /* CLASS, STYLE */
  1744. )) : vue.createCommentVNode("v-if", true),
  1745. vue.createCommentVNode(" 底部加载更多loading "),
  1746. $options.finalStatus === $data.M.Loading && !!$options.c.loadingIconCustomImage ? (vue.openBlock(), vue.createElementBlock("image", {
  1747. key: 1,
  1748. src: $options.c.loadingIconCustomImage,
  1749. style: vue.normalizeStyle([$options.c.iconCustomStyle]),
  1750. class: vue.normalizeClass({ "zp-l-line-loading-custom-image": true, "zp-l-line-loading-custom-image-animated": $options.c.loadingAnimated, "zp-l-line-loading-custom-image-rpx": $options.c.unit === "rpx", "zp-l-line-loading-custom-image-px": $options.c.unit === "px" })
  1751. }, null, 14, ["src"])) : vue.createCommentVNode("v-if", true),
  1752. $options.finalStatus === $data.M.Loading && $options.finalLoadingIconType === "flower" && !$options.c.loadingIconCustomImage.length ? (vue.openBlock(), vue.createElementBlock("image", {
  1753. key: 2,
  1754. class: vue.normalizeClass({ "zp-line-loading-image": true, "zp-line-loading-image-rpx": $options.c.unit === "rpx", "zp-line-loading-image-px": $options.c.unit === "px" }),
  1755. style: vue.normalizeStyle([$options.c.iconCustomStyle]),
  1756. src: $data.zTheme.flower[$options.ts]
  1757. }, null, 14, ["src"])) : vue.createCommentVNode("v-if", true),
  1758. vue.createCommentVNode(" 底部加载更多文字 "),
  1759. $options.finalStatus === $data.M.Loading && $options.finalLoadingIconType === "circle" && !$options.c.loadingIconCustomImage.length ? (vue.openBlock(), vue.createElementBlock(
  1760. "text",
  1761. {
  1762. key: 3,
  1763. class: vue.normalizeClass(["zp-l-circle-loading-view", { "zp-l-circle-loading-view-rpx": $options.c.unit === "rpx", "zp-l-circle-loading-view-px": $options.c.unit === "px" }]),
  1764. style: vue.normalizeStyle([{ borderColor: $data.zTheme.circleBorder[$options.ts], borderTopColor: $data.zTheme.circleBorderTop[$options.ts] }, $options.c.iconCustomStyle])
  1765. },
  1766. null,
  1767. 6
  1768. /* CLASS, STYLE */
  1769. )) : vue.createCommentVNode("v-if", true),
  1770. !$options.c.isChat || !$options.c.chatDefaultAsLoading && $options.finalStatus === $data.M.Default || $options.finalStatus === $data.M.Fail ? (vue.openBlock(), vue.createElementBlock(
  1771. "text",
  1772. {
  1773. key: 4,
  1774. class: vue.normalizeClass({ "zp-l-text-rpx": $options.c.unit === "rpx", "zp-l-text-px": $options.c.unit === "px" }),
  1775. style: vue.normalizeStyle([{ color: $data.zTheme.title[$options.ts] }, $options.c.titleCustomStyle])
  1776. },
  1777. vue.toDisplayString($options.ownLoadingMoreText),
  1778. 7
  1779. /* TEXT, CLASS, STYLE */
  1780. )) : vue.createCommentVNode("v-if", true),
  1781. vue.createCommentVNode(" 底部加载更多没有更多数据分割线 "),
  1782. $options.c.showNoMoreLine && $options.finalStatus === $data.M.NoMore ? (vue.openBlock(), vue.createElementBlock(
  1783. "text",
  1784. {
  1785. key: 5,
  1786. class: vue.normalizeClass({ "zp-l-line-rpx": $options.c.unit === "rpx", "zp-l-line-px": $options.c.unit === "px" }),
  1787. style: vue.normalizeStyle([{ backgroundColor: $data.zTheme.line[$options.ts] }, $options.c.noMoreLineCustomStyle])
  1788. },
  1789. null,
  1790. 6
  1791. /* CLASS, STYLE */
  1792. )) : vue.createCommentVNode("v-if", true)
  1793. ],
  1794. 64
  1795. /* STABLE_FRAGMENT */
  1796. )) : vue.createCommentVNode("v-if", true)
  1797. ],
  1798. 6
  1799. /* CLASS, STYLE */
  1800. );
  1801. }
  1802. const zPagingLoadMore = /* @__PURE__ */ _export_sfc(_sfc_main$2g, [["render", _sfc_render$2f], ["__scopeId", "data-v-8cc5c400"], ["__file", "C:/Users/EDY/Desktop/项目/shuibei/uni_modules/z-paging/components/z-paging/components/z-paging-load-more.vue"]]);
  1803. const commonLayoutModule = {
  1804. data() {
  1805. return {
  1806. systemInfo: null,
  1807. cssSafeAreaInsetBottom: -1,
  1808. isReadyDestroy: false
  1809. };
  1810. },
  1811. computed: {
  1812. // 顶部可用距离
  1813. windowTop() {
  1814. if (!this.systemInfo)
  1815. return 0;
  1816. return this.systemInfo.windowTop || 0;
  1817. },
  1818. // 底部安全区域高度
  1819. safeAreaBottom() {
  1820. if (!this.systemInfo)
  1821. return 0;
  1822. let safeAreaBottom = 0;
  1823. safeAreaBottom = this.systemInfo.safeAreaInsets.bottom || 0;
  1824. return safeAreaBottom;
  1825. },
  1826. // 是否是比较老的webview,在一些老的webview中,需要进行一些特殊处理
  1827. isOldWebView() {
  1828. try {
  1829. const systemInfos = u$1.getSystemInfoSync(true).system.split(" ");
  1830. const deviceType = systemInfos[0];
  1831. const version2 = parseInt(systemInfos[1]);
  1832. if (deviceType === "iOS" && version2 <= 10 || deviceType === "Android" && version2 <= 6) {
  1833. return true;
  1834. }
  1835. } catch (e2) {
  1836. return false;
  1837. }
  1838. return false;
  1839. },
  1840. // 当前组件的$slots,兼容不同平台
  1841. zSlots() {
  1842. return this.$slots;
  1843. }
  1844. },
  1845. beforeDestroy() {
  1846. this.isReadyDestroy = true;
  1847. },
  1848. unmounted() {
  1849. this.isReadyDestroy = true;
  1850. },
  1851. methods: {
  1852. // 更新fixed模式下z-paging的布局
  1853. updateFixedLayout() {
  1854. this.fixed && this.$nextTick(() => {
  1855. this.systemInfo = u$1.getSystemInfoSync();
  1856. });
  1857. },
  1858. // 获取节点尺寸
  1859. _getNodeClientRect(select, inDom = true, scrollOffset = false) {
  1860. if (this.isReadyDestroy) {
  1861. return Promise.resolve(false);
  1862. }
  1863. let res = !!inDom ? uni.createSelectorQuery().in(inDom === true ? this : inDom) : uni.createSelectorQuery();
  1864. scrollOffset ? res.select(select).scrollOffset() : res.select(select).boundingClientRect();
  1865. return new Promise((resolve, reject) => {
  1866. res.exec((data) => {
  1867. resolve(data && data != "" && data != void 0 && data.length ? data : false);
  1868. });
  1869. });
  1870. },
  1871. // 获取slot="left"和slot="right"宽度并且更新布局
  1872. _updateLeftAndRightWidth(targetStyle, parentNodePrefix) {
  1873. this.$nextTick(() => {
  1874. let delayTime = 0;
  1875. setTimeout(() => {
  1876. ["left", "right"].map((position) => {
  1877. this._getNodeClientRect(`.${parentNodePrefix}-${position}`).then((res) => {
  1878. this.$set(targetStyle, position, res ? res[0].width + "px" : "0px");
  1879. });
  1880. });
  1881. }, delayTime);
  1882. });
  1883. },
  1884. // 通过获取css设置的底部安全区域占位view高度设置bottom距离(直接通过systemInfo在部分平台上无法获取到底部安全区域)
  1885. _getCssSafeAreaInsetBottom(success) {
  1886. this._getNodeClientRect(".zp-safe-area-inset-bottom").then((res) => {
  1887. this.cssSafeAreaInsetBottom = res ? res[0].height : -1;
  1888. res && success && success();
  1889. });
  1890. },
  1891. // 同步获取系统信息,兼容不同平台(供z-paging-swiper使用)
  1892. _getSystemInfoSync(useCache = false) {
  1893. return u$1.getSystemInfoSync(useCache);
  1894. }
  1895. }
  1896. };
  1897. const queryKey = "Query";
  1898. const fetchParamsKey = "FetchParams";
  1899. const fetchResultKey = "FetchResult";
  1900. const language2LocalKey = "Language2Local";
  1901. function handleQuery(callback) {
  1902. _addHandleByKey(queryKey, callback);
  1903. return this;
  1904. }
  1905. function _handleQuery(pageNo, pageSize, from, lastItem) {
  1906. const callback = _getHandleByKey(queryKey);
  1907. return callback ? callback(pageNo, pageSize, from, lastItem) : [pageNo, pageSize, from];
  1908. }
  1909. function handleFetchParams(callback) {
  1910. _addHandleByKey(fetchParamsKey, callback);
  1911. return this;
  1912. }
  1913. function _handleFetchParams(parmas, extraParams) {
  1914. const callback = _getHandleByKey(fetchParamsKey);
  1915. return callback ? callback(parmas, extraParams || {}) : { pageNo: parmas.pageNo, pageSize: parmas.pageSize, ...extraParams || {} };
  1916. }
  1917. function handleFetchResult(callback) {
  1918. _addHandleByKey(fetchResultKey, callback);
  1919. return this;
  1920. }
  1921. function _handleFetchResult(result, paging, params2) {
  1922. const callback = _getHandleByKey(fetchResultKey);
  1923. callback && callback(result, paging, params2);
  1924. return callback ? true : false;
  1925. }
  1926. function handleLanguage2Local(callback) {
  1927. _addHandleByKey(language2LocalKey, callback);
  1928. return this;
  1929. }
  1930. function _handleLanguage2Local(language, local) {
  1931. const callback = _getHandleByKey(language2LocalKey);
  1932. return callback ? callback(language, local) : local;
  1933. }
  1934. function _getApp() {
  1935. return getApp();
  1936. }
  1937. function _hasGlobalData() {
  1938. return _getApp() && _getApp().globalData;
  1939. }
  1940. function _addHandleByKey(key, callback) {
  1941. try {
  1942. setTimeout(function() {
  1943. if (_hasGlobalData()) {
  1944. _getApp().globalData[`zp_handle${key}Callback`] = callback;
  1945. }
  1946. }, 1);
  1947. } catch (_2) {
  1948. }
  1949. }
  1950. function _getHandleByKey(key) {
  1951. return _hasGlobalData() ? _getApp().globalData[`zp_handle${key}Callback`] : null;
  1952. }
  1953. const interceptor = {
  1954. handleQuery,
  1955. _handleQuery,
  1956. handleFetchParams,
  1957. _handleFetchParams,
  1958. handleFetchResult,
  1959. _handleFetchResult,
  1960. handleLanguage2Local,
  1961. _handleLanguage2Local
  1962. };
  1963. const dataHandleModule = {
  1964. props: {
  1965. // 自定义初始的pageNo,默认为1
  1966. defaultPageNo: {
  1967. type: Number,
  1968. default: u$1.gc("defaultPageNo", 1),
  1969. observer: function(newVal) {
  1970. this.pageNo = newVal;
  1971. }
  1972. },
  1973. // 自定义pageSize,默认为10
  1974. defaultPageSize: {
  1975. type: Number,
  1976. default: u$1.gc("defaultPageSize", 10),
  1977. validator: (value2) => {
  1978. if (value2 <= 0)
  1979. u$1.consoleErr("default-page-size必须大于0!");
  1980. return value2 > 0;
  1981. }
  1982. },
  1983. // 为保证数据一致,设置当前tab切换时的标识key,并在complete中传递相同key,若二者不一致,则complete将不会生效
  1984. dataKey: {
  1985. type: [Number, String, Object],
  1986. default: u$1.gc("dataKey", null)
  1987. },
  1988. // 使用缓存,若开启将自动缓存第一页的数据,默认为否。请注意,因考虑到切换tab时不同tab数据不同的情况,默认仅会缓存组件首次加载时第一次请求到的数据,后续的下拉刷新操作不会更新缓存。
  1989. useCache: {
  1990. type: Boolean,
  1991. default: u$1.gc("useCache", false)
  1992. },
  1993. // 使用缓存时缓存的key,用于区分不同列表的缓存数据,useCache为true时必须设置,否则缓存无效
  1994. cacheKey: {
  1995. type: String,
  1996. default: u$1.gc("cacheKey", null)
  1997. },
  1998. // 缓存模式,默认仅会缓存组件首次加载时第一次请求到的数据,可设置为always,即代表总是缓存,每次列表刷新(下拉刷新、调用reload等)都会更新缓存
  1999. cacheMode: {
  2000. type: String,
  2001. default: u$1.gc("cacheMode", Enum.CacheMode.Default)
  2002. },
  2003. // 自动注入的list名,可自动修改父view(包含ref="paging")中对应name的list值
  2004. autowireListName: {
  2005. type: String,
  2006. default: u$1.gc("autowireListName", "")
  2007. },
  2008. // 自动注入的query名,可自动调用父view(包含ref="paging")中的query方法
  2009. autowireQueryName: {
  2010. type: String,
  2011. default: u$1.gc("autowireQueryName", "")
  2012. },
  2013. // 获取分页数据Function,功能与@query类似。若设置了fetch则@query将不再触发
  2014. fetch: {
  2015. type: Function,
  2016. default: null
  2017. },
  2018. // fetch的附加参数,fetch配置后有效
  2019. fetchParams: {
  2020. type: Object,
  2021. default: u$1.gc("fetchParams", null)
  2022. },
  2023. // z-paging mounted后自动调用reload方法(mounted后自动调用接口),默认为是
  2024. auto: {
  2025. type: Boolean,
  2026. default: u$1.gc("auto", true)
  2027. },
  2028. // 用户下拉刷新时是否触发reload方法,默认为是
  2029. reloadWhenRefresh: {
  2030. type: Boolean,
  2031. default: u$1.gc("reloadWhenRefresh", true)
  2032. },
  2033. // reload时自动滚动到顶部,默认为是
  2034. autoScrollToTopWhenReload: {
  2035. type: Boolean,
  2036. default: u$1.gc("autoScrollToTopWhenReload", true)
  2037. },
  2038. // reload时立即自动清空原list,默认为是,若立即自动清空,则在reload之后、请求回调之前页面是空白的
  2039. autoCleanListWhenReload: {
  2040. type: Boolean,
  2041. default: u$1.gc("autoCleanListWhenReload", true)
  2042. },
  2043. // 列表刷新时自动显示下拉刷新view,默认为否
  2044. showRefresherWhenReload: {
  2045. type: Boolean,
  2046. default: u$1.gc("showRefresherWhenReload", false)
  2047. },
  2048. // 列表刷新时自动显示加载更多view,且为加载中状态,默认为否
  2049. showLoadingMoreWhenReload: {
  2050. type: Boolean,
  2051. default: u$1.gc("showLoadingMoreWhenReload", false)
  2052. },
  2053. // 组件created时立即触发reload(可解决一些情况下先看到页面再看到loading的问题),auto为true时有效。为否时将在mounted+nextTick后触发reload,默认为否
  2054. createdReload: {
  2055. type: Boolean,
  2056. default: u$1.gc("createdReload", false)
  2057. },
  2058. // 本地分页时上拉加载更多延迟时间,单位为毫秒,默认200毫秒
  2059. localPagingLoadingTime: {
  2060. type: [Number, String],
  2061. default: u$1.gc("localPagingLoadingTime", 200)
  2062. },
  2063. // 自动拼接complete中传过来的数组(使用聊天记录模式时无效)
  2064. concat: {
  2065. type: Boolean,
  2066. default: u$1.gc("concat", true)
  2067. },
  2068. // 请求失败是否触发reject,默认为是
  2069. callNetworkReject: {
  2070. type: Boolean,
  2071. default: u$1.gc("callNetworkReject", true)
  2072. },
  2073. // 父组件v-model所绑定的list的值
  2074. value: {
  2075. type: Array,
  2076. default: function() {
  2077. return [];
  2078. }
  2079. },
  2080. modelValue: {
  2081. type: Array,
  2082. default: function() {
  2083. return [];
  2084. }
  2085. }
  2086. },
  2087. data() {
  2088. return {
  2089. currentData: [],
  2090. totalData: [],
  2091. realTotalData: [],
  2092. totalLocalPagingList: [],
  2093. dataPromiseResultMap: {
  2094. reload: null,
  2095. complete: null,
  2096. localPaging: null
  2097. },
  2098. isSettingCacheList: false,
  2099. pageNo: 1,
  2100. currentRefreshPageSize: 0,
  2101. isLocalPaging: false,
  2102. isAddedData: false,
  2103. isTotalChangeFromAddData: false,
  2104. privateConcat: true,
  2105. myParentQuery: -1,
  2106. firstPageLoaded: false,
  2107. pagingLoaded: false,
  2108. loaded: false,
  2109. isUserReload: true,
  2110. fromEmptyViewReload: false,
  2111. queryFrom: "",
  2112. listRendering: false,
  2113. isHandlingRefreshToPage: false,
  2114. isFirstPageAndNoMore: false,
  2115. totalDataChangeThrow: true,
  2116. addDataFromTopBufferedInsert: u$1.useBufferedInsert(this._addDataFromTop)
  2117. };
  2118. },
  2119. computed: {
  2120. pageSize() {
  2121. return this.defaultPageSize;
  2122. },
  2123. finalConcat() {
  2124. return this.concat && this.privateConcat;
  2125. },
  2126. finalUseCache() {
  2127. if (this.useCache && !this.cacheKey) {
  2128. u$1.consoleErr("use-cache为true时,必须设置cache-key,否则缓存无效!");
  2129. }
  2130. return this.useCache && !!this.cacheKey;
  2131. },
  2132. finalCacheKey() {
  2133. return this.cacheKey ? `${c$1.cachePrefixKey}-${this.cacheKey}` : null;
  2134. },
  2135. isFirstPage() {
  2136. return this.pageNo === this.defaultPageNo;
  2137. }
  2138. },
  2139. watch: {
  2140. totalData(newVal, oldVal) {
  2141. this._totalDataChange(newVal, oldVal, this.totalDataChangeThrow);
  2142. this.totalDataChangeThrow = true;
  2143. },
  2144. currentData(newVal, oldVal) {
  2145. this._currentDataChange(newVal, oldVal);
  2146. },
  2147. useChatRecordMode(newVal, oldVal) {
  2148. if (newVal) {
  2149. this.nLoadingMoreFixedHeight = false;
  2150. }
  2151. },
  2152. value: {
  2153. handler(newVal) {
  2154. if (newVal !== this.totalData) {
  2155. this.totalDataChangeThrow = false;
  2156. this.totalData = newVal;
  2157. }
  2158. },
  2159. immediate: true
  2160. },
  2161. modelValue: {
  2162. handler(newVal) {
  2163. if (newVal !== this.totalData) {
  2164. this.totalDataChangeThrow = false;
  2165. this.totalData = newVal;
  2166. }
  2167. },
  2168. immediate: true
  2169. }
  2170. },
  2171. methods: {
  2172. // 请求结束(成功或者失败)调用此方法,将请求的结果传递给z-paging处理,第一个参数为请求结果数组,第二个参数为是否成功(默认为是)
  2173. complete(data, success = true) {
  2174. this.customNoMore = -1;
  2175. return this.addData(data, success);
  2176. },
  2177. //【保证数据一致】请求结束(成功或者失败)调用此方法,将请求的结果传递给z-paging处理,第一个参数为请求结果数组,第二个参数为dataKey,需与:data-key绑定的一致,第三个参数为是否成功(默认为是)
  2178. completeByKey(data, dataKey = null, success = true) {
  2179. if (dataKey !== null && this.dataKey !== null && dataKey !== this.dataKey) {
  2180. this.isFirstPage && this.endRefresh();
  2181. return new Promise((resolve) => resolve());
  2182. }
  2183. this.customNoMore = -1;
  2184. return this.addData(data, success);
  2185. },
  2186. //【通过total判断是否有更多数据】请求结束(成功或者失败)调用此方法,将请求的结果传递给z-paging处理,第一个参数为请求结果数组,第二个参数为total(列表总数),第三个参数为是否成功(默认为是)
  2187. completeByTotal(data, total, success = true) {
  2188. if (total == "undefined") {
  2189. this.customNoMore = -1;
  2190. } else {
  2191. const dataTypeRes = this._checkDataType(data, success, false);
  2192. data = dataTypeRes.data;
  2193. success = dataTypeRes.success;
  2194. if (total >= 0 && success) {
  2195. return new Promise((resolve, reject) => {
  2196. this.$nextTick(() => {
  2197. let nomore = false;
  2198. const realTotalDataCount = this.pageNo == this.defaultPageNo ? 0 : this.realTotalData.length;
  2199. const dataLength = this.privateConcat ? data.length : 0;
  2200. let exceedCount = realTotalDataCount + dataLength - total;
  2201. if (exceedCount >= 0) {
  2202. nomore = true;
  2203. exceedCount = this.defaultPageSize - exceedCount;
  2204. if (this.privateConcat && exceedCount > 0 && exceedCount < data.length) {
  2205. data = data.splice(0, exceedCount);
  2206. }
  2207. }
  2208. this.completeByNoMore(data, nomore, success).then((res) => resolve(res)).catch(() => reject());
  2209. });
  2210. });
  2211. }
  2212. }
  2213. return this.addData(data, success);
  2214. },
  2215. //【自行判断是否有更多数据】请求结束(成功或者失败)调用此方法,将请求的结果传递给z-paging处理,第一个参数为请求结果数组,第二个参数为是否没有更多数据,第三个参数为是否成功(默认是是)
  2216. completeByNoMore(data, nomore, success = true) {
  2217. if (nomore != "undefined") {
  2218. this.customNoMore = nomore == true ? 1 : 0;
  2219. }
  2220. return this.addData(data, success);
  2221. },
  2222. // 请求结束且请求失败时调用,支持传入请求失败原因
  2223. completeByError(errorMsg) {
  2224. this.customerEmptyViewErrorText = errorMsg;
  2225. return this.complete(false);
  2226. },
  2227. // 与上方complete方法功能一致,新版本中设置服务端回调数组请使用complete方法
  2228. addData(data, success = true) {
  2229. if (!this.fromCompleteEmit) {
  2230. this.disabledCompleteEmit = true;
  2231. this.fromCompleteEmit = false;
  2232. }
  2233. const currentTimeStamp = u$1.getTime();
  2234. const disTime = currentTimeStamp - this.requestTimeStamp;
  2235. let minDelay = this.minDelay;
  2236. if (this.isFirstPage && this.finalShowRefresherWhenReload) {
  2237. minDelay = Math.max(400, minDelay);
  2238. }
  2239. const addDataDalay = this.requestTimeStamp > 0 && disTime < minDelay ? minDelay - disTime : 0;
  2240. this.$nextTick(() => {
  2241. u$1.delay(() => {
  2242. this._addData(data, success, false);
  2243. }, this.delay > 0 ? this.delay : addDataDalay);
  2244. });
  2245. return new Promise((resolve, reject) => {
  2246. this.dataPromiseResultMap.complete = { resolve, reject };
  2247. });
  2248. },
  2249. // 从顶部添加数据,不会影响分页的pageNo和pageSize
  2250. addDataFromTop(data, toTop = true, toTopWithAnimate = true) {
  2251. (this.finalUseVirtualList ? this.addDataFromTopBufferedInsert : this._addDataFromTop)(
  2252. data,
  2253. toTop,
  2254. toTopWithAnimate
  2255. );
  2256. },
  2257. // 重新设置列表数据,调用此方法不会影响pageNo和pageSize,也不会触发请求。适用场景:当需要删除列表中某一项时,将删除对应项后的数组通过此方法传递给z-paging。(当出现类似的需要修改列表数组的场景时,请使用此方法,请勿直接修改page中:list.sync绑定的数组)
  2258. resetTotalData(data) {
  2259. this.isTotalChangeFromAddData = true;
  2260. data = Object.prototype.toString.call(data) !== "[object Array]" ? [data] : data;
  2261. this.totalData = data;
  2262. },
  2263. // 设置本地分页数据,请求结束(成功或者失败)调用此方法,将请求的结果传递给z-paging作分页处理(若调用了此方法,则上拉加载更多时内部会自动分页,不会触发@query所绑定的事件)
  2264. setLocalPaging(data, success = true) {
  2265. this.isLocalPaging = true;
  2266. this.$nextTick(() => {
  2267. this._addData(data, success, true);
  2268. });
  2269. return new Promise((resolve, reject) => {
  2270. this.dataPromiseResultMap.localPaging = { resolve, reject };
  2271. });
  2272. },
  2273. // 重新加载分页数据,pageNo会恢复为默认值,相当于下拉刷新的效果(animate为true时会展示下拉刷新动画,默认为false)
  2274. reload(animate = this.showRefresherWhenReload) {
  2275. if (animate) {
  2276. this.privateShowRefresherWhenReload = animate;
  2277. this.isUserPullDown = true;
  2278. }
  2279. if (!this.showLoadingMoreWhenReload) {
  2280. this.listRendering = true;
  2281. }
  2282. this.$nextTick(() => {
  2283. this._preReload(animate, false);
  2284. });
  2285. return new Promise((resolve, reject) => {
  2286. this.dataPromiseResultMap.reload = { resolve, reject };
  2287. });
  2288. },
  2289. // 刷新列表数据,pageNo和pageSize不会重置,列表数据会重新从服务端获取。必须保证@query绑定的方法中的pageNo和pageSize和传给服务端的一致
  2290. refresh() {
  2291. return this._handleRefreshWithDisPageNo(this.pageNo - this.defaultPageNo + 1);
  2292. },
  2293. // 刷新列表数据至指定页,例如pageNo=5时则代表刷新列表至第5页,此时pageNo会变为5,列表会展示前5页的数据。必须保证@query绑定的方法中的pageNo和pageSize和传给服务端的一致
  2294. refreshToPage(pageNo) {
  2295. this.isHandlingRefreshToPage = true;
  2296. return this._handleRefreshWithDisPageNo(pageNo + this.defaultPageNo - 1);
  2297. },
  2298. // 手动更新列表缓存数据,将自动截取v-model绑定的list中的前pageSize条覆盖缓存,请确保在list数据更新到预期结果后再调用此方法
  2299. updateCache() {
  2300. if (this.finalUseCache && this.totalData.length) {
  2301. this._saveLocalCache(this.totalData.slice(0, Math.min(this.totalData.length, this.pageSize)));
  2302. }
  2303. },
  2304. // 清空分页数据
  2305. clean() {
  2306. this._reload(true);
  2307. this._addData([], true, false);
  2308. },
  2309. // 清空分页数据
  2310. clear() {
  2311. this.clean();
  2312. },
  2313. // reload之前的一些处理
  2314. _preReload(animate = this.showRefresherWhenReload, isFromMounted = true, retryCount = 0) {
  2315. const showRefresher = this.finalRefresherEnabled && this.useCustomRefresher;
  2316. if (this.customRefresherHeight === -1 && showRefresher) {
  2317. u$1.delay(() => {
  2318. retryCount++;
  2319. if (retryCount % 10 === 0) {
  2320. this._updateCustomRefresherHeight();
  2321. }
  2322. this._preReload(animate, isFromMounted, retryCount);
  2323. }, c$1.delayTime / 2);
  2324. return;
  2325. }
  2326. this.isUserReload = true;
  2327. this.loadingType = Enum.LoadingType.Refresher;
  2328. if (animate) {
  2329. this.privateShowRefresherWhenReload = animate;
  2330. if (this.useCustomRefresher) {
  2331. this._doRefresherRefreshAnimate();
  2332. } else {
  2333. this.refresherTriggered = true;
  2334. }
  2335. } else {
  2336. this._refresherEnd(false, false, false, false);
  2337. }
  2338. this._reload(false, isFromMounted);
  2339. },
  2340. // 重新加载分页数据
  2341. _reload(isClean = false, isFromMounted = false, isUserPullDown = false) {
  2342. this.isAddedData = false;
  2343. this.insideOfPaging = -1;
  2344. this.cacheScrollNodeHeight = -1;
  2345. this.pageNo = this.defaultPageNo;
  2346. this._cleanRefresherEndTimeout();
  2347. !this.privateShowRefresherWhenReload && !isClean && this._startLoading(true);
  2348. this.firstPageLoaded = true;
  2349. this.isTotalChangeFromAddData = false;
  2350. if (!this.isSettingCacheList) {
  2351. this.totalData = [];
  2352. }
  2353. if (!isClean) {
  2354. this._emitQuery(this.pageNo, this.defaultPageSize, isUserPullDown ? Enum.QueryFrom.UserPullDown : Enum.QueryFrom.Reload);
  2355. let delay2 = 0;
  2356. u$1.delay(this._callMyParentQuery, delay2);
  2357. if (!isFromMounted && this.autoScrollToTopWhenReload) {
  2358. this._scrollToTop(false);
  2359. }
  2360. }
  2361. },
  2362. // 处理服务端返回的数组
  2363. _addData(data, success, isLocal) {
  2364. this.isAddedData = true;
  2365. this.fromEmptyViewReload = false;
  2366. this.isTotalChangeFromAddData = true;
  2367. this.refresherTriggered = false;
  2368. this._endSystemLoadingAndRefresh();
  2369. const tempIsUserPullDown = this.isUserPullDown;
  2370. if (this.showRefresherUpdateTime && this.isFirstPage) {
  2371. u$1.setRefesrherTime(u$1.getTime(), this.refresherUpdateTimeKey);
  2372. this.$refs.refresh && this.$refs.refresh.updateTime();
  2373. }
  2374. if (!isLocal && tempIsUserPullDown && this.isFirstPage) {
  2375. this.isUserPullDown = false;
  2376. }
  2377. this.listRendering = true;
  2378. this.$nextTick(() => {
  2379. u$1.delay(() => this.listRendering = false);
  2380. });
  2381. let dataTypeRes = this._checkDataType(data, success, isLocal);
  2382. data = dataTypeRes.data;
  2383. success = dataTypeRes.success;
  2384. let delayTime = c$1.delayTime;
  2385. if (this.useChatRecordMode)
  2386. delayTime = 0;
  2387. this.loadingForNow = false;
  2388. u$1.delay(() => {
  2389. this.pagingLoaded = true;
  2390. this.$nextTick(() => {
  2391. !isLocal && this._refresherEnd(delayTime > 0, true, tempIsUserPullDown);
  2392. });
  2393. });
  2394. if (this.isFirstPage) {
  2395. this.isLoadFailed = !success;
  2396. this.$emit("isLoadFailedChange", this.isLoadFailed);
  2397. if (this.finalUseCache && success && (this.cacheMode === Enum.CacheMode.Always ? true : this.isSettingCacheList)) {
  2398. this._saveLocalCache(data);
  2399. }
  2400. }
  2401. this.isSettingCacheList = false;
  2402. if (success) {
  2403. if (!(this.privateConcat === false && !this.isHandlingRefreshToPage && this.loadingStatus === Enum.More.NoMore)) {
  2404. this.loadingStatus = Enum.More.Default;
  2405. }
  2406. if (isLocal) {
  2407. this.totalLocalPagingList = data;
  2408. const localPageNo = this.defaultPageNo;
  2409. const localPageSize = this.queryFrom !== Enum.QueryFrom.Refresh ? this.defaultPageSize : this.currentRefreshPageSize;
  2410. this._localPagingQueryList(localPageNo, localPageSize, 0, (res) => {
  2411. u$1.delay(() => {
  2412. this.completeByTotal(res, this.totalLocalPagingList.length);
  2413. }, 0);
  2414. });
  2415. } else {
  2416. let dataChangeDelayTime = 0;
  2417. u$1.delay(() => {
  2418. this._currentDataChange(data, this.currentData);
  2419. this._callDataPromise(true, this.totalData);
  2420. }, dataChangeDelayTime);
  2421. }
  2422. if (this.isHandlingRefreshToPage) {
  2423. this.isHandlingRefreshToPage = false;
  2424. this.pageNo = this.defaultPageNo + Math.ceil(data.length / this.pageSize) - 1;
  2425. if (data.length % this.pageSize !== 0) {
  2426. this.customNoMore = 1;
  2427. }
  2428. }
  2429. } else {
  2430. this._currentDataChange(data, this.currentData);
  2431. this._callDataPromise(false);
  2432. this.loadingStatus = Enum.More.Fail;
  2433. this.isHandlingRefreshToPage = false;
  2434. if (this.loadingType === Enum.LoadingType.LoadMore) {
  2435. this.pageNo--;
  2436. }
  2437. }
  2438. },
  2439. // 所有数据改变时调用
  2440. _totalDataChange(newVal, oldVal, eventThrow = true) {
  2441. if ((!this.isUserReload || !this.autoCleanListWhenReload) && this.firstPageLoaded && !newVal.length && oldVal.length) {
  2442. return;
  2443. }
  2444. this._doCheckScrollViewShouldFullHeight(newVal);
  2445. if (!this.realTotalData.length && !newVal.length) {
  2446. eventThrow = false;
  2447. }
  2448. this.realTotalData = newVal;
  2449. if (eventThrow) {
  2450. this.$emit("input", newVal);
  2451. this.$emit("update:modelValue", newVal);
  2452. this.$emit("update:list", newVal);
  2453. this.$emit("listChange", newVal);
  2454. this._callMyParentList(newVal);
  2455. }
  2456. this.firstPageLoaded = false;
  2457. this.isTotalChangeFromAddData = false;
  2458. this.$nextTick(() => {
  2459. u$1.delay(() => {
  2460. this._getNodeClientRect(".zp-paging-container-content").then((res) => {
  2461. res && this.$emit("contentHeightChanged", res[0].height);
  2462. });
  2463. }, c$1.delayTime * (this.isIos ? 1 : 3));
  2464. });
  2465. },
  2466. // 当前数据改变时调用
  2467. _currentDataChange(newVal, oldVal) {
  2468. newVal = [...newVal];
  2469. this.finalUseVirtualList && this._setCellIndex(newVal, "bottom");
  2470. if (this.isFirstPage && this.finalConcat) {
  2471. this.totalData = [];
  2472. }
  2473. if (this.customNoMore !== -1) {
  2474. if (this.customNoMore === 1 || this.customNoMore !== 0 && !newVal.length) {
  2475. this.loadingStatus = Enum.More.NoMore;
  2476. }
  2477. } else {
  2478. if (!newVal.length || newVal.length && newVal.length < this.defaultPageSize) {
  2479. this.loadingStatus = Enum.More.NoMore;
  2480. }
  2481. }
  2482. if (!this.totalData.length) {
  2483. this.totalData = newVal;
  2484. } else {
  2485. if (this.finalConcat) {
  2486. this.oldScrollTop;
  2487. this.totalData = [...this.totalData, ...newVal];
  2488. } else {
  2489. this.totalData = newVal;
  2490. }
  2491. }
  2492. this.privateConcat = true;
  2493. },
  2494. // 根据pageNo处理refresh操作
  2495. _handleRefreshWithDisPageNo(pageNo) {
  2496. if (!this.isHandlingRefreshToPage && !this.realTotalData.length)
  2497. return this.reload();
  2498. if (pageNo >= 1) {
  2499. this.loading = true;
  2500. this.privateConcat = false;
  2501. const totalPageSize = pageNo * this.pageSize;
  2502. this.currentRefreshPageSize = totalPageSize;
  2503. if (this.isLocalPaging && this.isHandlingRefreshToPage) {
  2504. this._localPagingQueryList(this.defaultPageNo, totalPageSize, 0, (res) => {
  2505. this.complete(res);
  2506. });
  2507. } else {
  2508. this._emitQuery(this.defaultPageNo, totalPageSize, Enum.QueryFrom.Refresh);
  2509. this._callMyParentQuery(this.defaultPageNo, totalPageSize);
  2510. }
  2511. }
  2512. return new Promise((resolve, reject) => {
  2513. this.dataPromiseResultMap.reload = { resolve, reject };
  2514. });
  2515. },
  2516. // 本地分页请求
  2517. _localPagingQueryList(pageNo, pageSize, localPagingLoadingTime, callback) {
  2518. pageNo = Math.max(1, pageNo);
  2519. pageSize = Math.max(1, pageSize);
  2520. const totalPagingList = [...this.totalLocalPagingList];
  2521. const pageNoIndex = (pageNo - 1) * pageSize;
  2522. const finalPageNoIndex = Math.min(totalPagingList.length, pageNoIndex + pageSize);
  2523. const resultPagingList = totalPagingList.splice(pageNoIndex, finalPageNoIndex - pageNoIndex);
  2524. u$1.delay(() => callback(resultPagingList), localPagingLoadingTime);
  2525. },
  2526. // 从顶部添加数据,不会影响分页的pageNo和pageSize
  2527. _addDataFromTop(data, toTop = true, toTopWithAnimate = true) {
  2528. let addFromTop = !this.isChatRecordModeAndNotInversion;
  2529. data = Object.prototype.toString.call(data) !== "[object Array]" ? [data] : addFromTop ? data.reverse() : data;
  2530. this.finalUseVirtualList && this._setCellIndex(data, "top");
  2531. this.totalData = addFromTop ? [...data, ...this.totalData] : [...this.totalData, ...data];
  2532. if (toTop) {
  2533. u$1.delay(() => this.useChatRecordMode ? this.scrollToBottom(toTopWithAnimate) : this.scrollToTop(toTopWithAnimate));
  2534. }
  2535. },
  2536. // 存储列表缓存数据
  2537. _saveLocalCache(data) {
  2538. uni.setStorageSync(this.finalCacheKey, data);
  2539. },
  2540. // 通过缓存数据填充列表数据
  2541. _setListByLocalCache() {
  2542. this.totalData = uni.getStorageSync(this.finalCacheKey) || [];
  2543. this.isSettingCacheList = true;
  2544. },
  2545. // 修改父view的list
  2546. _callMyParentList(newVal) {
  2547. if (this.autowireListName.length) {
  2548. const myParent = u$1.getParent(this.$parent);
  2549. if (myParent && myParent[this.autowireListName]) {
  2550. myParent[this.autowireListName] = newVal;
  2551. }
  2552. }
  2553. },
  2554. // 调用父view的query
  2555. _callMyParentQuery(customPageNo = 0, customPageSize = 0) {
  2556. if (this.autowireQueryName) {
  2557. if (this.myParentQuery === -1) {
  2558. const myParent = u$1.getParent(this.$parent);
  2559. if (myParent && myParent[this.autowireQueryName]) {
  2560. this.myParentQuery = myParent[this.autowireQueryName];
  2561. }
  2562. }
  2563. if (this.myParentQuery !== -1) {
  2564. customPageSize > 0 ? this.myParentQuery(customPageNo, customPageSize) : this.myParentQuery(this.pageNo, this.defaultPageSize);
  2565. }
  2566. }
  2567. },
  2568. // emit query事件
  2569. _emitQuery(pageNo, pageSize, from) {
  2570. this.queryFrom = from;
  2571. this.requestTimeStamp = u$1.getTime();
  2572. const [lastItem] = this.realTotalData.slice(-1);
  2573. if (this.fetch) {
  2574. const fetchParams = interceptor._handleFetchParams({ pageNo, pageSize, from, lastItem: lastItem || null }, this.fetchParams);
  2575. const fetchResult = this.fetch(fetchParams);
  2576. if (!interceptor._handleFetchResult(fetchResult, this, fetchParams)) {
  2577. u$1.isPromise(fetchResult) ? fetchResult.then((res) => {
  2578. this.complete(res);
  2579. }).catch((err) => {
  2580. this.complete(false);
  2581. }) : this.complete(fetchResult);
  2582. }
  2583. } else {
  2584. this.$emit("query", ...interceptor._handleQuery(pageNo, pageSize, from, lastItem || null));
  2585. }
  2586. },
  2587. // 触发数据改变promise
  2588. _callDataPromise(success, totalList) {
  2589. for (const key in this.dataPromiseResultMap) {
  2590. const obj = this.dataPromiseResultMap[key];
  2591. if (!obj)
  2592. continue;
  2593. success ? obj.resolve({ totalList, noMore: this.loadingStatus === Enum.More.NoMore }) : this.callNetworkReject && obj.reject(`z-paging-${key}-error`);
  2594. }
  2595. },
  2596. // 检查complete data的类型
  2597. _checkDataType(data, success, isLocal) {
  2598. const dataType = Object.prototype.toString.call(data);
  2599. if (dataType === "[object Boolean]") {
  2600. success = data;
  2601. data = [];
  2602. } else if (dataType !== "[object Array]") {
  2603. data = [];
  2604. if (dataType !== "[object Undefined]" && dataType !== "[object Null]") {
  2605. u$1.consoleErr(`${isLocal ? "setLocalPaging" : "complete"}参数类型不正确,第一个参数类型必须为Array!`);
  2606. }
  2607. }
  2608. return { data, success };
  2609. }
  2610. }
  2611. };
  2612. const isObject$1 = (val) => val !== null && typeof val === "object";
  2613. const defaultDelimiters = ["{", "}"];
  2614. class BaseFormatter {
  2615. constructor() {
  2616. this._caches = /* @__PURE__ */ Object.create(null);
  2617. }
  2618. interpolate(message, values, delimiters = defaultDelimiters) {
  2619. if (!values) {
  2620. return [message];
  2621. }
  2622. let tokens = this._caches[message];
  2623. if (!tokens) {
  2624. tokens = parse(message, delimiters);
  2625. this._caches[message] = tokens;
  2626. }
  2627. return compile(tokens, values);
  2628. }
  2629. }
  2630. const RE_TOKEN_LIST_VALUE = /^(?:\d)+/;
  2631. const RE_TOKEN_NAMED_VALUE = /^(?:\w)+/;
  2632. function parse(format2, [startDelimiter, endDelimiter]) {
  2633. const tokens = [];
  2634. let position = 0;
  2635. let text = "";
  2636. while (position < format2.length) {
  2637. let char = format2[position++];
  2638. if (char === startDelimiter) {
  2639. if (text) {
  2640. tokens.push({ type: "text", value: text });
  2641. }
  2642. text = "";
  2643. let sub2 = "";
  2644. char = format2[position++];
  2645. while (char !== void 0 && char !== endDelimiter) {
  2646. sub2 += char;
  2647. char = format2[position++];
  2648. }
  2649. const isClosed = char === endDelimiter;
  2650. const type2 = RE_TOKEN_LIST_VALUE.test(sub2) ? "list" : isClosed && RE_TOKEN_NAMED_VALUE.test(sub2) ? "named" : "unknown";
  2651. tokens.push({ value: sub2, type: type2 });
  2652. } else {
  2653. text += char;
  2654. }
  2655. }
  2656. text && tokens.push({ type: "text", value: text });
  2657. return tokens;
  2658. }
  2659. function compile(tokens, values) {
  2660. const compiled = [];
  2661. let index2 = 0;
  2662. const mode = Array.isArray(values) ? "list" : isObject$1(values) ? "named" : "unknown";
  2663. if (mode === "unknown") {
  2664. return compiled;
  2665. }
  2666. while (index2 < tokens.length) {
  2667. const token = tokens[index2];
  2668. switch (token.type) {
  2669. case "text":
  2670. compiled.push(token.value);
  2671. break;
  2672. case "list":
  2673. compiled.push(values[parseInt(token.value, 10)]);
  2674. break;
  2675. case "named":
  2676. if (mode === "named") {
  2677. compiled.push(values[token.value]);
  2678. } else {
  2679. {
  2680. console.warn(`Type of token '${token.type}' and format of value '${mode}' don't match!`);
  2681. }
  2682. }
  2683. break;
  2684. case "unknown":
  2685. {
  2686. console.warn(`Detect 'unknown' type of token!`);
  2687. }
  2688. break;
  2689. }
  2690. index2++;
  2691. }
  2692. return compiled;
  2693. }
  2694. const LOCALE_ZH_HANS = "zh-Hans";
  2695. const LOCALE_ZH_HANT = "zh-Hant";
  2696. const LOCALE_EN = "en";
  2697. const LOCALE_FR = "fr";
  2698. const LOCALE_ES = "es";
  2699. const hasOwnProperty = Object.prototype.hasOwnProperty;
  2700. const hasOwn = (val, key) => hasOwnProperty.call(val, key);
  2701. const defaultFormatter = new BaseFormatter();
  2702. function include(str, parts) {
  2703. return !!parts.find((part) => str.indexOf(part) !== -1);
  2704. }
  2705. function startsWith(str, parts) {
  2706. return parts.find((part) => str.indexOf(part) === 0);
  2707. }
  2708. function normalizeLocale(locale, messages2) {
  2709. if (!locale) {
  2710. return;
  2711. }
  2712. locale = locale.trim().replace(/_/g, "-");
  2713. if (messages2 && messages2[locale]) {
  2714. return locale;
  2715. }
  2716. locale = locale.toLowerCase();
  2717. if (locale === "chinese") {
  2718. return LOCALE_ZH_HANS;
  2719. }
  2720. if (locale.indexOf("zh") === 0) {
  2721. if (locale.indexOf("-hans") > -1) {
  2722. return LOCALE_ZH_HANS;
  2723. }
  2724. if (locale.indexOf("-hant") > -1) {
  2725. return LOCALE_ZH_HANT;
  2726. }
  2727. if (include(locale, ["-tw", "-hk", "-mo", "-cht"])) {
  2728. return LOCALE_ZH_HANT;
  2729. }
  2730. return LOCALE_ZH_HANS;
  2731. }
  2732. let locales = [LOCALE_EN, LOCALE_FR, LOCALE_ES];
  2733. if (messages2 && Object.keys(messages2).length > 0) {
  2734. locales = Object.keys(messages2);
  2735. }
  2736. const lang = startsWith(locale, locales);
  2737. if (lang) {
  2738. return lang;
  2739. }
  2740. }
  2741. class I18n {
  2742. constructor({ locale, fallbackLocale, messages: messages2, watcher, formater: formater2 }) {
  2743. this.locale = LOCALE_EN;
  2744. this.fallbackLocale = LOCALE_EN;
  2745. this.message = {};
  2746. this.messages = {};
  2747. this.watchers = [];
  2748. if (fallbackLocale) {
  2749. this.fallbackLocale = fallbackLocale;
  2750. }
  2751. this.formater = formater2 || defaultFormatter;
  2752. this.messages = messages2 || {};
  2753. this.setLocale(locale || LOCALE_EN);
  2754. if (watcher) {
  2755. this.watchLocale(watcher);
  2756. }
  2757. }
  2758. setLocale(locale) {
  2759. const oldLocale = this.locale;
  2760. this.locale = normalizeLocale(locale, this.messages) || this.fallbackLocale;
  2761. if (!this.messages[this.locale]) {
  2762. this.messages[this.locale] = {};
  2763. }
  2764. this.message = this.messages[this.locale];
  2765. if (oldLocale !== this.locale) {
  2766. this.watchers.forEach((watcher) => {
  2767. watcher(this.locale, oldLocale);
  2768. });
  2769. }
  2770. }
  2771. getLocale() {
  2772. return this.locale;
  2773. }
  2774. watchLocale(fn) {
  2775. const index2 = this.watchers.push(fn) - 1;
  2776. return () => {
  2777. this.watchers.splice(index2, 1);
  2778. };
  2779. }
  2780. add(locale, message, override = true) {
  2781. const curMessages = this.messages[locale];
  2782. if (curMessages) {
  2783. if (override) {
  2784. Object.assign(curMessages, message);
  2785. } else {
  2786. Object.keys(message).forEach((key) => {
  2787. if (!hasOwn(curMessages, key)) {
  2788. curMessages[key] = message[key];
  2789. }
  2790. });
  2791. }
  2792. } else {
  2793. this.messages[locale] = message;
  2794. }
  2795. }
  2796. f(message, values, delimiters) {
  2797. return this.formater.interpolate(message, values, delimiters).join("");
  2798. }
  2799. t(key, locale, values) {
  2800. let message = this.message;
  2801. if (typeof locale === "string") {
  2802. locale = normalizeLocale(locale, this.messages);
  2803. locale && (message = this.messages[locale]);
  2804. } else {
  2805. values = locale;
  2806. }
  2807. if (!hasOwn(message, key)) {
  2808. console.warn(`Cannot translate the value of keypath ${key}. Use the value of keypath as default.`);
  2809. return key;
  2810. }
  2811. return this.formater.interpolate(message[key], values).join("");
  2812. }
  2813. }
  2814. function watchAppLocale(appVm, i18n) {
  2815. if (appVm.$watchLocale) {
  2816. appVm.$watchLocale((newLocale) => {
  2817. i18n.setLocale(newLocale);
  2818. });
  2819. } else {
  2820. appVm.$watch(() => appVm.$locale, (newLocale) => {
  2821. i18n.setLocale(newLocale);
  2822. });
  2823. }
  2824. }
  2825. function getDefaultLocale() {
  2826. if (typeof uni !== "undefined" && uni.getLocale) {
  2827. return uni.getLocale();
  2828. }
  2829. if (typeof global !== "undefined" && global.getLocale) {
  2830. return global.getLocale();
  2831. }
  2832. return LOCALE_EN;
  2833. }
  2834. function initVueI18n(locale, messages2 = {}, fallbackLocale, watcher) {
  2835. if (typeof locale !== "string") {
  2836. const options2 = [
  2837. messages2,
  2838. locale
  2839. ];
  2840. locale = options2[0];
  2841. messages2 = options2[1];
  2842. }
  2843. if (typeof locale !== "string") {
  2844. locale = getDefaultLocale();
  2845. }
  2846. if (typeof fallbackLocale !== "string") {
  2847. fallbackLocale = typeof __uniConfig !== "undefined" && __uniConfig.fallbackLocale || LOCALE_EN;
  2848. }
  2849. const i18n = new I18n({
  2850. locale,
  2851. fallbackLocale,
  2852. messages: messages2,
  2853. watcher
  2854. });
  2855. let t2 = (key, values) => {
  2856. if (typeof getApp !== "function") {
  2857. t2 = function(key2, values2) {
  2858. return i18n.t(key2, values2);
  2859. };
  2860. } else {
  2861. let isWatchedAppLocale = false;
  2862. t2 = function(key2, values2) {
  2863. const appVm = getApp().$vm;
  2864. if (appVm) {
  2865. appVm.$locale;
  2866. if (!isWatchedAppLocale) {
  2867. isWatchedAppLocale = true;
  2868. watchAppLocale(appVm, i18n);
  2869. }
  2870. }
  2871. return i18n.t(key2, values2);
  2872. };
  2873. }
  2874. return t2(key, values);
  2875. };
  2876. return {
  2877. i18n,
  2878. f(message, values, delimiters) {
  2879. return i18n.f(message, values, delimiters);
  2880. },
  2881. t(key, values) {
  2882. return t2(key, values);
  2883. },
  2884. add(locale2, message, override = true) {
  2885. return i18n.add(locale2, message, override);
  2886. },
  2887. watch(fn) {
  2888. return i18n.watchLocale(fn);
  2889. },
  2890. getLocale() {
  2891. return i18n.getLocale();
  2892. },
  2893. setLocale(newLocale) {
  2894. return i18n.setLocale(newLocale);
  2895. }
  2896. };
  2897. }
  2898. const en$1 = {
  2899. "zp.refresher.default": "Pull down to refresh",
  2900. "zp.refresher.pulling": "Release to refresh",
  2901. "zp.refresher.refreshing": "Refreshing...",
  2902. "zp.refresher.complete": "Refresh succeeded",
  2903. "zp.refresher.f2": "Refresh to enter 2f",
  2904. "zp.loadingMore.default": "Click to load more",
  2905. "zp.loadingMore.loading": "Loading...",
  2906. "zp.loadingMore.noMore": "No more data",
  2907. "zp.loadingMore.fail": "Load failed,click to reload",
  2908. "zp.emptyView.title": "No data",
  2909. "zp.emptyView.reload": "Reload",
  2910. "zp.emptyView.error": "Sorry,load failed",
  2911. "zp.refresherUpdateTime.title": "Last update: ",
  2912. "zp.refresherUpdateTime.none": "None",
  2913. "zp.refresherUpdateTime.today": "Today",
  2914. "zp.refresherUpdateTime.yesterday": "Yesterday",
  2915. "zp.systemLoading.title": "Loading..."
  2916. };
  2917. const zhHans$1 = {
  2918. "zp.refresher.default": "继续下拉刷新",
  2919. "zp.refresher.pulling": "松开立即刷新",
  2920. "zp.refresher.refreshing": "正在刷新...",
  2921. "zp.refresher.complete": "刷新成功",
  2922. "zp.refresher.f2": "松手进入二楼",
  2923. "zp.loadingMore.default": "点击加载更多",
  2924. "zp.loadingMore.loading": "正在加载...",
  2925. "zp.loadingMore.noMore": "没有更多了",
  2926. "zp.loadingMore.fail": "加载失败,点击重新加载",
  2927. "zp.emptyView.title": "没有数据哦~",
  2928. "zp.emptyView.reload": "重新加载",
  2929. "zp.emptyView.error": "很抱歉,加载失败",
  2930. "zp.refresherUpdateTime.title": "最后更新:",
  2931. "zp.refresherUpdateTime.none": "无",
  2932. "zp.refresherUpdateTime.today": "今天",
  2933. "zp.refresherUpdateTime.yesterday": "昨天",
  2934. "zp.systemLoading.title": "加载中..."
  2935. };
  2936. const zhHant$1 = {
  2937. "zp.refresher.default": "繼續下拉重繪",
  2938. "zp.refresher.pulling": "鬆開立即重繪",
  2939. "zp.refresher.refreshing": "正在重繪...",
  2940. "zp.refresher.complete": "重繪成功",
  2941. "zp.refresher.f2": "鬆手進入二樓",
  2942. "zp.loadingMore.default": "點擊加載更多",
  2943. "zp.loadingMore.loading": "正在加載...",
  2944. "zp.loadingMore.noMore": "沒有更多了",
  2945. "zp.loadingMore.fail": "加載失敗,點擊重新加載",
  2946. "zp.emptyView.title": "沒有數據哦~",
  2947. "zp.emptyView.reload": "重新加載",
  2948. "zp.emptyView.error": "很抱歉,加載失敗",
  2949. "zp.refresherUpdateTime.title": "最後更新:",
  2950. "zp.refresherUpdateTime.none": "無",
  2951. "zp.refresherUpdateTime.today": "今天",
  2952. "zp.refresherUpdateTime.yesterday": "昨天",
  2953. "zp.systemLoading.title": "加載中..."
  2954. };
  2955. const messages$1 = {
  2956. en: en$1,
  2957. "zh-Hans": zhHans$1,
  2958. "zh-Hant": zhHant$1
  2959. };
  2960. const { t: t$2 } = initVueI18n(messages$1);
  2961. const i18nModule = {
  2962. computed: {
  2963. finalLanguage() {
  2964. try {
  2965. const local = uni.getLocale();
  2966. const language = this.systemInfo.appLanguage;
  2967. return local === "auto" ? interceptor._handleLanguage2Local(language, this._language2Local(language)) : local;
  2968. } catch (e2) {
  2969. return "zh-Hans";
  2970. }
  2971. },
  2972. // 最终的下拉刷新默认状态的文字
  2973. finalRefresherDefaultText() {
  2974. return this._getI18nText("zp.refresher.default", this.refresherDefaultText);
  2975. },
  2976. // 最终的下拉刷新下拉中的文字
  2977. finalRefresherPullingText() {
  2978. return this._getI18nText("zp.refresher.pulling", this.refresherPullingText);
  2979. },
  2980. // 最终的下拉刷新中文字
  2981. finalRefresherRefreshingText() {
  2982. return this._getI18nText("zp.refresher.refreshing", this.refresherRefreshingText);
  2983. },
  2984. // 最终的下拉刷新完成文字
  2985. finalRefresherCompleteText() {
  2986. return this._getI18nText("zp.refresher.complete", this.refresherCompleteText);
  2987. },
  2988. // 最终的下拉刷新上次更新时间文字
  2989. finalRefresherUpdateTimeTextMap() {
  2990. return {
  2991. title: t$2("zp.refresherUpdateTime.title"),
  2992. none: t$2("zp.refresherUpdateTime.none"),
  2993. today: t$2("zp.refresherUpdateTime.today"),
  2994. yesterday: t$2("zp.refresherUpdateTime.yesterday")
  2995. };
  2996. },
  2997. // 最终的继续下拉进入二楼文字
  2998. finalRefresherGoF2Text() {
  2999. return this._getI18nText("zp.refresher.f2", this.refresherGoF2Text);
  3000. },
  3001. // 最终的底部加载更多默认状态文字
  3002. finalLoadingMoreDefaultText() {
  3003. return this._getI18nText("zp.loadingMore.default", this.loadingMoreDefaultText);
  3004. },
  3005. // 最终的底部加载更多加载中文字
  3006. finalLoadingMoreLoadingText() {
  3007. return this._getI18nText("zp.loadingMore.loading", this.loadingMoreLoadingText);
  3008. },
  3009. // 最终的底部加载更多没有更多数据文字
  3010. finalLoadingMoreNoMoreText() {
  3011. return this._getI18nText("zp.loadingMore.noMore", this.loadingMoreNoMoreText);
  3012. },
  3013. // 最终的底部加载更多加载失败文字
  3014. finalLoadingMoreFailText() {
  3015. return this._getI18nText("zp.loadingMore.fail", this.loadingMoreFailText);
  3016. },
  3017. // 最终的空数据图title
  3018. finalEmptyViewText() {
  3019. return this.isLoadFailed ? this.finalEmptyViewErrorText : this._getI18nText("zp.emptyView.title", this.emptyViewText);
  3020. },
  3021. // 最终的空数据图reload title
  3022. finalEmptyViewReloadText() {
  3023. return this._getI18nText("zp.emptyView.reload", this.emptyViewReloadText);
  3024. },
  3025. // 最终的空数据图加载失败文字
  3026. finalEmptyViewErrorText() {
  3027. return this.customerEmptyViewErrorText || this._getI18nText("zp.emptyView.error", this.emptyViewErrorText);
  3028. },
  3029. // 最终的系统loading title
  3030. finalSystemLoadingText() {
  3031. return this._getI18nText("zp.systemLoading.title", this.systemLoadingText);
  3032. }
  3033. },
  3034. methods: {
  3035. // 获取当前z-paging的语言
  3036. getLanguage() {
  3037. return this.finalLanguage;
  3038. },
  3039. // 获取国际化转换后的文本
  3040. _getI18nText(key, value2) {
  3041. const dataType = Object.prototype.toString.call(value2);
  3042. if (dataType === "[object Object]") {
  3043. const nextValue = value2[this.finalLanguage];
  3044. if (nextValue)
  3045. return nextValue;
  3046. } else if (dataType === "[object String]") {
  3047. return value2;
  3048. }
  3049. return t$2(key);
  3050. },
  3051. // 系统language转i18n local
  3052. _language2Local(language) {
  3053. const formatedLanguage = language.toLowerCase().replace(new RegExp("_", ""), "-");
  3054. if (formatedLanguage.indexOf("zh") !== -1) {
  3055. if (formatedLanguage === "zh" || formatedLanguage === "zh-cn" || formatedLanguage.indexOf("zh-hans") !== -1) {
  3056. return "zh-Hans";
  3057. }
  3058. return "zh-Hant";
  3059. }
  3060. if (formatedLanguage.indexOf("en") !== -1)
  3061. return "en";
  3062. return language;
  3063. }
  3064. }
  3065. };
  3066. const nvueModule = {
  3067. props: {},
  3068. data() {
  3069. return {
  3070. nRefresherLoading: false,
  3071. nListIsDragging: false,
  3072. nShowBottom: true,
  3073. nFixFreezing: false,
  3074. nShowRefresherReveal: false,
  3075. nLoadingMoreFixedHeight: false,
  3076. nShowRefresherRevealHeight: 0,
  3077. nOldShowRefresherRevealHeight: -1,
  3078. nRefresherWidth: u$1.rpx2px(750),
  3079. nListHeight: 0,
  3080. nF2Opacity: 0
  3081. };
  3082. },
  3083. computed: {},
  3084. mounted() {
  3085. },
  3086. methods: {}
  3087. };
  3088. const emptyModule = {
  3089. props: {
  3090. // 是否强制隐藏空数据图,默认为否
  3091. hideEmptyView: {
  3092. type: Boolean,
  3093. default: u$1.gc("hideEmptyView", false)
  3094. },
  3095. // 空数据图描述文字,默认为“没有数据哦~”
  3096. emptyViewText: {
  3097. type: [String, Object],
  3098. default: u$1.gc("emptyViewText", null)
  3099. },
  3100. // 是否显示空数据图重新加载按钮(无数据时),默认为否
  3101. showEmptyViewReload: {
  3102. type: Boolean,
  3103. default: u$1.gc("showEmptyViewReload", false)
  3104. },
  3105. // 加载失败时是否显示空数据图重新加载按钮,默认为是
  3106. showEmptyViewReloadWhenError: {
  3107. type: Boolean,
  3108. default: u$1.gc("showEmptyViewReloadWhenError", true)
  3109. },
  3110. // 空数据图点击重新加载文字,默认为“重新加载”
  3111. emptyViewReloadText: {
  3112. type: [String, Object],
  3113. default: u$1.gc("emptyViewReloadText", null)
  3114. },
  3115. // 空数据图图片,默认使用z-paging内置的图片
  3116. emptyViewImg: {
  3117. type: String,
  3118. default: u$1.gc("emptyViewImg", "")
  3119. },
  3120. // 空数据图“加载失败”描述文字,默认为“很抱歉,加载失败”
  3121. emptyViewErrorText: {
  3122. type: [String, Object],
  3123. default: u$1.gc("emptyViewErrorText", null)
  3124. },
  3125. // 空数据图“加载失败”图片,默认使用z-paging内置的图片
  3126. emptyViewErrorImg: {
  3127. type: String,
  3128. default: u$1.gc("emptyViewErrorImg", "")
  3129. },
  3130. // 空数据图样式
  3131. emptyViewStyle: {
  3132. type: Object,
  3133. default: u$1.gc("emptyViewStyle", {})
  3134. },
  3135. // 空数据图容器样式
  3136. emptyViewSuperStyle: {
  3137. type: Object,
  3138. default: u$1.gc("emptyViewSuperStyle", {})
  3139. },
  3140. // 空数据图img样式
  3141. emptyViewImgStyle: {
  3142. type: Object,
  3143. default: u$1.gc("emptyViewImgStyle", {})
  3144. },
  3145. // 空数据图描述文字样式
  3146. emptyViewTitleStyle: {
  3147. type: Object,
  3148. default: u$1.gc("emptyViewTitleStyle", {})
  3149. },
  3150. // 空数据图重新加载按钮样式
  3151. emptyViewReloadStyle: {
  3152. type: Object,
  3153. default: u$1.gc("emptyViewReloadStyle", {})
  3154. },
  3155. // 空数据图片是否铺满z-paging,默认为否,即填充满z-paging内列表(滚动区域)部分。若设置为否,则为填铺满整个z-paging
  3156. emptyViewFixed: {
  3157. type: Boolean,
  3158. default: u$1.gc("emptyViewFixed", false)
  3159. },
  3160. // 空数据图片是否垂直居中,默认为是,若设置为否即为从空数据容器顶部开始显示。emptyViewFixed为false时有效
  3161. emptyViewCenter: {
  3162. type: Boolean,
  3163. default: u$1.gc("emptyViewCenter", true)
  3164. },
  3165. // 加载中时是否自动隐藏空数据图,默认为是
  3166. autoHideEmptyViewWhenLoading: {
  3167. type: Boolean,
  3168. default: u$1.gc("autoHideEmptyViewWhenLoading", true)
  3169. },
  3170. // 用户下拉列表触发下拉刷新加载中时是否自动隐藏空数据图,默认为是
  3171. autoHideEmptyViewWhenPull: {
  3172. type: Boolean,
  3173. default: u$1.gc("autoHideEmptyViewWhenPull", true)
  3174. },
  3175. // 空数据view的z-index,默认为9
  3176. emptyViewZIndex: {
  3177. type: Number,
  3178. default: u$1.gc("emptyViewZIndex", 9)
  3179. }
  3180. },
  3181. data() {
  3182. return {
  3183. customerEmptyViewErrorText: ""
  3184. };
  3185. },
  3186. computed: {
  3187. finalEmptyViewImg() {
  3188. return this.isLoadFailed ? this.emptyViewErrorImg : this.emptyViewImg;
  3189. },
  3190. finalShowEmptyViewReload() {
  3191. return this.isLoadFailed ? this.showEmptyViewReloadWhenError : this.showEmptyViewReload;
  3192. },
  3193. // 是否展示空数据图
  3194. showEmpty() {
  3195. if (this.isOnly || this.hideEmptyView || this.realTotalData.length)
  3196. return false;
  3197. if (this.autoHideEmptyViewWhenLoading) {
  3198. if (this.isAddedData && !this.firstPageLoaded && !this.loading)
  3199. return true;
  3200. } else {
  3201. return true;
  3202. }
  3203. return !this.autoHideEmptyViewWhenPull && !this.isUserReload;
  3204. }
  3205. },
  3206. methods: {
  3207. // 点击了空数据view重新加载按钮
  3208. _emptyViewReload() {
  3209. let callbacked = false;
  3210. this.$emit("emptyViewReload", (reload) => {
  3211. if (reload === void 0 || reload === true) {
  3212. this.fromEmptyViewReload = true;
  3213. this.reload().catch(() => {
  3214. });
  3215. }
  3216. callbacked = true;
  3217. });
  3218. this.$nextTick(() => {
  3219. if (!callbacked) {
  3220. this.fromEmptyViewReload = true;
  3221. this.reload().catch(() => {
  3222. });
  3223. }
  3224. });
  3225. },
  3226. // 点击了空数据view
  3227. _emptyViewClick() {
  3228. this.$emit("emptyViewClick");
  3229. }
  3230. }
  3231. };
  3232. const refresherModule = {
  3233. props: {
  3234. // 下拉刷新的主题样式,支持black,white,默认black
  3235. refresherThemeStyle: {
  3236. type: String,
  3237. default: u$1.gc("refresherThemeStyle", "")
  3238. },
  3239. // 自定义下拉刷新中左侧图标的样式
  3240. refresherImgStyle: {
  3241. type: Object,
  3242. default: u$1.gc("refresherImgStyle", {})
  3243. },
  3244. // 自定义下拉刷新中右侧状态描述文字的样式
  3245. refresherTitleStyle: {
  3246. type: Object,
  3247. default: u$1.gc("refresherTitleStyle", {})
  3248. },
  3249. // 自定义下拉刷新中右侧最后更新时间文字的样式(show-refresher-update-time为true时有效)
  3250. refresherUpdateTimeStyle: {
  3251. type: Object,
  3252. default: u$1.gc("refresherUpdateTimeStyle", {})
  3253. },
  3254. // 在微信小程序和QQ小程序中,是否实时监听下拉刷新中进度,默认为否
  3255. watchRefresherTouchmove: {
  3256. type: Boolean,
  3257. default: u$1.gc("watchRefresherTouchmove", false)
  3258. },
  3259. // 底部加载更多的主题样式,支持black,white,默认black
  3260. loadingMoreThemeStyle: {
  3261. type: String,
  3262. default: u$1.gc("loadingMoreThemeStyle", "")
  3263. },
  3264. // 是否只使用下拉刷新,设置为true后将关闭mounted自动请求数据、关闭滚动到底部加载更多,强制隐藏空数据图。默认为否
  3265. refresherOnly: {
  3266. type: Boolean,
  3267. default: u$1.gc("refresherOnly", false)
  3268. },
  3269. // 自定义下拉刷新默认状态下回弹动画时间,单位为毫秒,默认为100毫秒,nvue无效
  3270. refresherDefaultDuration: {
  3271. type: [Number, String],
  3272. default: u$1.gc("refresherDefaultDuration", 100)
  3273. },
  3274. // 自定义下拉刷新结束以后延迟回弹的时间,单位为毫秒,默认为0
  3275. refresherCompleteDelay: {
  3276. type: [Number, String],
  3277. default: u$1.gc("refresherCompleteDelay", 0)
  3278. },
  3279. // 自定义下拉刷新结束回弹动画时间,单位为毫秒,默认为300毫秒(refresherEndBounceEnabled为false时,refresherCompleteDuration为设定值的1/3),nvue无效
  3280. refresherCompleteDuration: {
  3281. type: [Number, String],
  3282. default: u$1.gc("refresherCompleteDuration", 300)
  3283. },
  3284. // 自定义下拉刷新中是否允许列表滚动,默认为是
  3285. refresherRefreshingScrollable: {
  3286. type: Boolean,
  3287. default: u$1.gc("refresherRefreshingScrollable", true)
  3288. },
  3289. // 自定义下拉刷新结束状态下是否允许列表滚动,默认为否
  3290. refresherCompleteScrollable: {
  3291. type: Boolean,
  3292. default: u$1.gc("refresherCompleteScrollable", false)
  3293. },
  3294. // 是否使用自定义的下拉刷新,默认为是,即使用z-paging的下拉刷新。设置为false即代表使用uni scroll-view自带的下拉刷新,h5、App、微信小程序以外的平台不支持uni scroll-view自带的下拉刷新
  3295. useCustomRefresher: {
  3296. type: Boolean,
  3297. default: u$1.gc("useCustomRefresher", true)
  3298. },
  3299. // 自定义下拉刷新下拉帧率,默认为40,过高可能会出现抖动问题
  3300. refresherFps: {
  3301. type: [Number, String],
  3302. default: u$1.gc("refresherFps", 40)
  3303. },
  3304. // 自定义下拉刷新允许触发的最大下拉角度,默认为40度,当下拉角度小于设定值时,自定义下拉刷新动画不会被触发
  3305. refresherMaxAngle: {
  3306. type: [Number, String],
  3307. default: u$1.gc("refresherMaxAngle", 40)
  3308. },
  3309. // 自定义下拉刷新的角度由未达到最大角度变到达到最大角度时,是否继续下拉刷新手势,默认为否
  3310. refresherAngleEnableChangeContinued: {
  3311. type: Boolean,
  3312. default: u$1.gc("refresherAngleEnableChangeContinued", false)
  3313. },
  3314. // 自定义下拉刷新默认状态下的文字
  3315. refresherDefaultText: {
  3316. type: [String, Object],
  3317. default: u$1.gc("refresherDefaultText", null)
  3318. },
  3319. // 自定义下拉刷新松手立即刷新状态下的文字
  3320. refresherPullingText: {
  3321. type: [String, Object],
  3322. default: u$1.gc("refresherPullingText", null)
  3323. },
  3324. // 自定义下拉刷新刷新中状态下的文字
  3325. refresherRefreshingText: {
  3326. type: [String, Object],
  3327. default: u$1.gc("refresherRefreshingText", null)
  3328. },
  3329. // 自定义下拉刷新刷新结束状态下的文字
  3330. refresherCompleteText: {
  3331. type: [String, Object],
  3332. default: u$1.gc("refresherCompleteText", null)
  3333. },
  3334. // 自定义继续下拉进入二楼文字
  3335. refresherGoF2Text: {
  3336. type: [String, Object],
  3337. default: u$1.gc("refresherGoF2Text", null)
  3338. },
  3339. // 自定义下拉刷新默认状态下的图片
  3340. refresherDefaultImg: {
  3341. type: String,
  3342. default: u$1.gc("refresherDefaultImg", null)
  3343. },
  3344. // 自定义下拉刷新松手立即刷新状态下的图片,默认与refresherDefaultImg一致
  3345. refresherPullingImg: {
  3346. type: String,
  3347. default: u$1.gc("refresherPullingImg", null)
  3348. },
  3349. // 自定义下拉刷新刷新中状态下的图片
  3350. refresherRefreshingImg: {
  3351. type: String,
  3352. default: u$1.gc("refresherRefreshingImg", null)
  3353. },
  3354. // 自定义下拉刷新刷新结束状态下的图片
  3355. refresherCompleteImg: {
  3356. type: String,
  3357. default: u$1.gc("refresherCompleteImg", null)
  3358. },
  3359. // 自定义下拉刷新刷新中状态下是否展示旋转动画
  3360. refresherRefreshingAnimated: {
  3361. type: Boolean,
  3362. default: u$1.gc("refresherRefreshingAnimated", true)
  3363. },
  3364. // 是否开启自定义下拉刷新刷新结束回弹效果,默认为是
  3365. refresherEndBounceEnabled: {
  3366. type: Boolean,
  3367. default: u$1.gc("refresherEndBounceEnabled", true)
  3368. },
  3369. // 是否开启自定义下拉刷新,默认为是
  3370. refresherEnabled: {
  3371. type: Boolean,
  3372. default: u$1.gc("refresherEnabled", true)
  3373. },
  3374. // 设置自定义下拉刷新阈值,默认为80rpx
  3375. refresherThreshold: {
  3376. type: [Number, String],
  3377. default: u$1.gc("refresherThreshold", "80rpx")
  3378. },
  3379. // 设置系统下拉刷新默认样式,支持设置 black,white,none,none 表示不使用默认样式,默认为black
  3380. refresherDefaultStyle: {
  3381. type: String,
  3382. default: u$1.gc("refresherDefaultStyle", "black")
  3383. },
  3384. // 设置自定义下拉刷新区域背景
  3385. refresherBackground: {
  3386. type: String,
  3387. default: u$1.gc("refresherBackground", "transparent")
  3388. },
  3389. // 设置固定的自定义下拉刷新区域背景
  3390. refresherFixedBackground: {
  3391. type: String,
  3392. default: u$1.gc("refresherFixedBackground", "transparent")
  3393. },
  3394. // 设置固定的自定义下拉刷新区域高度,默认为0
  3395. refresherFixedBacHeight: {
  3396. type: [Number, String],
  3397. default: u$1.gc("refresherFixedBacHeight", 0)
  3398. },
  3399. // 设置自定义下拉刷新下拉超出阈值后继续下拉位移衰减的比例,范围0-1,值越大代表衰减越多。默认为0.65(nvue无效)
  3400. refresherOutRate: {
  3401. type: Number,
  3402. default: u$1.gc("refresherOutRate", 0.65)
  3403. },
  3404. // 是否开启下拉进入二楼功能,默认为否
  3405. refresherF2Enabled: {
  3406. type: Boolean,
  3407. default: u$1.gc("refresherF2Enabled", false)
  3408. },
  3409. // 下拉进入二楼阈值,默认为200rpx
  3410. refresherF2Threshold: {
  3411. type: [Number, String],
  3412. default: u$1.gc("refresherF2Threshold", "200rpx")
  3413. },
  3414. // 下拉进入二楼动画时间,单位为毫秒,默认为200毫秒
  3415. refresherF2Duration: {
  3416. type: [Number, String],
  3417. default: u$1.gc("refresherF2Duration", 200)
  3418. },
  3419. // 下拉进入二楼状态松手后是否弹出二楼,默认为是
  3420. showRefresherF2: {
  3421. type: Boolean,
  3422. default: u$1.gc("showRefresherF2", true)
  3423. },
  3424. // 设置自定义下拉刷新下拉时实际下拉位移与用户下拉距离的比值,默认为0.75,即代表若用户下拉10px,则实际位移为7.5px(nvue无效)
  3425. refresherPullRate: {
  3426. type: Number,
  3427. default: u$1.gc("refresherPullRate", 0.75)
  3428. },
  3429. // 是否显示最后更新时间,默认为否
  3430. showRefresherUpdateTime: {
  3431. type: Boolean,
  3432. default: u$1.gc("showRefresherUpdateTime", false)
  3433. },
  3434. // 如果需要区别不同页面的最后更新时间,请为不同页面的z-paging的`refresher-update-time-key`设置不同的字符串
  3435. refresherUpdateTimeKey: {
  3436. type: String,
  3437. default: u$1.gc("refresherUpdateTimeKey", "default")
  3438. },
  3439. // 下拉刷新时下拉到“松手立即刷新”或“松手进入二楼”状态时是否使手机短振动,默认为否(h5无效)
  3440. refresherVibrate: {
  3441. type: Boolean,
  3442. default: u$1.gc("refresherVibrate", false)
  3443. },
  3444. // 下拉刷新时是否禁止下拉刷新view跟随用户触摸竖直移动,默认为否。注意此属性只是禁止下拉刷新view移动,其他下拉刷新逻辑依然会正常触发
  3445. refresherNoTransform: {
  3446. type: Boolean,
  3447. default: u$1.gc("refresherNoTransform", false)
  3448. },
  3449. // 是否开启下拉刷新状态栏占位,适用于隐藏导航栏时,下拉刷新需要避开状态栏高度的情况,默认为否
  3450. useRefresherStatusBarPlaceholder: {
  3451. type: Boolean,
  3452. default: u$1.gc("useRefresherStatusBarPlaceholder", false)
  3453. }
  3454. },
  3455. data() {
  3456. return {
  3457. R: Enum.Refresher,
  3458. //下拉刷新状态
  3459. refresherStatus: Enum.Refresher.Default,
  3460. refresherTouchstartY: 0,
  3461. lastRefresherTouchmove: null,
  3462. refresherReachMaxAngle: true,
  3463. refresherTransform: "translateY(0px)",
  3464. refresherTransition: "",
  3465. finalRefresherDefaultStyle: "black",
  3466. refresherRevealStackCount: 0,
  3467. refresherCompleteTimeout: null,
  3468. refresherCompleteSubTimeout: null,
  3469. refresherEndTimeout: null,
  3470. isTouchmovingTimeout: null,
  3471. refresherTriggered: false,
  3472. isTouchmoving: false,
  3473. isTouchEnded: false,
  3474. isUserPullDown: false,
  3475. privateRefresherEnabled: -1,
  3476. privateShowRefresherWhenReload: false,
  3477. customRefresherHeight: -1,
  3478. showCustomRefresher: false,
  3479. doRefreshAnimateAfter: false,
  3480. isRefresherInComplete: false,
  3481. showF2: false,
  3482. f2Transform: "",
  3483. pullDownTimeStamp: 0,
  3484. moveDis: 0,
  3485. oldMoveDis: 0,
  3486. currentDis: 0,
  3487. oldCurrentMoveDis: 0,
  3488. oldRefresherTouchmoveY: 0,
  3489. oldTouchDirection: "",
  3490. oldEmitedTouchDirection: "",
  3491. oldPullingDistance: -1,
  3492. refresherThresholdUpdateTag: 0
  3493. };
  3494. },
  3495. watch: {
  3496. refresherDefaultStyle: {
  3497. handler(newVal) {
  3498. if (newVal.length) {
  3499. this.finalRefresherDefaultStyle = newVal;
  3500. }
  3501. },
  3502. immediate: true
  3503. },
  3504. refresherStatus(newVal) {
  3505. newVal === Enum.Refresher.Loading && this._cleanRefresherEndTimeout();
  3506. this.refresherVibrate && (newVal === Enum.Refresher.ReleaseToRefresh || newVal === Enum.Refresher.GoF2) && this._doVibrateShort();
  3507. this.$emit("refresherStatusChange", newVal);
  3508. this.$emit("update:refresherStatus", newVal);
  3509. },
  3510. // 监听当前下拉刷新启用/禁用状态
  3511. refresherEnabled(newVal) {
  3512. !newVal && this.endRefresh();
  3513. }
  3514. },
  3515. computed: {
  3516. pullDownDisTimeStamp() {
  3517. return 1e3 / this.refresherFps;
  3518. },
  3519. refresherThresholdUnitConverted() {
  3520. return u$1.addUnit(this.refresherThreshold, this.unit);
  3521. },
  3522. finalRefresherEnabled() {
  3523. if (this.layoutOnly || this.useChatRecordMode)
  3524. return false;
  3525. if (this.privateRefresherEnabled === -1)
  3526. return this.refresherEnabled;
  3527. return this.privateRefresherEnabled === 1;
  3528. },
  3529. finalRefresherThreshold() {
  3530. let refresherThreshold = this.refresherThresholdUnitConverted;
  3531. let idDefault = false;
  3532. if (refresherThreshold === u$1.addUnit(80, this.unit)) {
  3533. idDefault = true;
  3534. if (this.showRefresherUpdateTime) {
  3535. refresherThreshold = u$1.addUnit(120, this.unit);
  3536. }
  3537. }
  3538. if (idDefault && this.customRefresherHeight > 0)
  3539. return this.customRefresherHeight + this.finalRefresherThresholdPlaceholder;
  3540. return u$1.convertToPx(refresherThreshold) + this.finalRefresherThresholdPlaceholder;
  3541. },
  3542. finalRefresherF2Threshold() {
  3543. return u$1.convertToPx(u$1.addUnit(this.refresherF2Threshold, this.unit));
  3544. },
  3545. finalRefresherThresholdPlaceholder() {
  3546. return this.useRefresherStatusBarPlaceholder ? this.statusBarHeight : 0;
  3547. },
  3548. finalRefresherFixedBacHeight() {
  3549. return u$1.convertToPx(this.refresherFixedBacHeight);
  3550. },
  3551. finalRefresherThemeStyle() {
  3552. return this.refresherThemeStyle.length ? this.refresherThemeStyle : this.defaultThemeStyle;
  3553. },
  3554. finalRefresherOutRate() {
  3555. let rate = this.refresherOutRate;
  3556. rate = Math.max(0, rate);
  3557. rate = Math.min(1, rate);
  3558. return rate;
  3559. },
  3560. finalRefresherPullRate() {
  3561. let rate = this.refresherPullRate;
  3562. rate = Math.max(0, rate);
  3563. return rate;
  3564. },
  3565. finalRefresherTransform() {
  3566. if (this.refresherNoTransform || this.refresherTransform === "translateY(0px)")
  3567. return "none";
  3568. return this.refresherTransform;
  3569. },
  3570. finalShowRefresherWhenReload() {
  3571. return this.showRefresherWhenReload || this.privateShowRefresherWhenReload;
  3572. },
  3573. finalRefresherTriggered() {
  3574. if (!(this.finalRefresherEnabled && !this.useCustomRefresher))
  3575. return false;
  3576. return this.refresherTriggered;
  3577. },
  3578. showRefresher() {
  3579. const showRefresher = this.finalRefresherEnabled || this.useCustomRefresher && !this.useChatRecordMode;
  3580. this.active && this.customRefresherHeight === -1 && showRefresher && this.updateCustomRefresherHeight();
  3581. return showRefresher;
  3582. },
  3583. hasTouchmove() {
  3584. return this.watchRefresherTouchmove;
  3585. }
  3586. },
  3587. methods: {
  3588. // 终止下拉刷新状态
  3589. endRefresh() {
  3590. this.totalData = this.realTotalData;
  3591. this._refresherEnd();
  3592. this._endSystemLoadingAndRefresh();
  3593. this._handleScrollViewBounce({ bounce: true });
  3594. this.$nextTick(() => {
  3595. this.refresherTriggered = false;
  3596. });
  3597. },
  3598. // 手动更新自定义下拉刷新view高度
  3599. updateCustomRefresherHeight() {
  3600. u$1.delay(() => this.$nextTick(this._updateCustomRefresherHeight));
  3601. },
  3602. // 进入二楼
  3603. goF2() {
  3604. this._handleGoF2();
  3605. },
  3606. // 关闭二楼
  3607. closeF2() {
  3608. this._handleCloseF2();
  3609. },
  3610. // 自定义下拉刷新被触发
  3611. _onRefresh(fromScrollView = false, isUserPullDown = true) {
  3612. if (fromScrollView && !(this.finalRefresherEnabled && !this.useCustomRefresher))
  3613. return;
  3614. this.$emit("onRefresh");
  3615. this.$emit("Refresh");
  3616. if (this.loading || this.isRefresherInComplete)
  3617. return;
  3618. this.loadingType = Enum.LoadingType.Refresher;
  3619. if (this.nShowRefresherReveal)
  3620. return;
  3621. this.isUserPullDown = isUserPullDown;
  3622. this.isUserReload = !isUserPullDown;
  3623. this._startLoading(true);
  3624. this.refresherTriggered = true;
  3625. if (this.reloadWhenRefresh && isUserPullDown) {
  3626. this.useChatRecordMode ? this._onLoadingMore("click") : this._reload(false, false, isUserPullDown);
  3627. }
  3628. },
  3629. // 自定义下拉刷新被复位
  3630. _onRestore() {
  3631. this.refresherTriggered = "restore";
  3632. this.$emit("onRestore");
  3633. this.$emit("Restore");
  3634. },
  3635. // 进一步处理touch开始结果
  3636. _handleRefresherTouchstart(touch) {
  3637. if (!this.loading && this.isTouchEnded) {
  3638. this.isTouchmoving = false;
  3639. }
  3640. this.loadingType = Enum.LoadingType.Refresher;
  3641. this.isTouchmovingTimeout && clearTimeout(this.isTouchmovingTimeout);
  3642. this.isTouchEnded = false;
  3643. this.refresherTransition = "";
  3644. this.refresherTouchstartY = touch.touchY;
  3645. this.$emit("refresherTouchstart", this.refresherTouchstartY);
  3646. this.lastRefresherTouchmove = touch;
  3647. this._cleanRefresherCompleteTimeout();
  3648. this._cleanRefresherEndTimeout();
  3649. },
  3650. // 非app-vue或微信小程序或QQ小程序或h5平台,使用js控制下拉刷新
  3651. // 进一步处理touch中结果
  3652. _handleRefresherTouchmove(moveDis, touch) {
  3653. this.refresherReachMaxAngle = true;
  3654. this.isTouchmovingTimeout && clearTimeout(this.isTouchmovingTimeout);
  3655. this.isTouchmoving = true;
  3656. this.isTouchEnded = false;
  3657. if (moveDis >= this.finalRefresherThreshold) {
  3658. this.refresherStatus = this.refresherF2Enabled && moveDis >= this.finalRefresherF2Threshold ? Enum.Refresher.GoF2 : Enum.Refresher.ReleaseToRefresh;
  3659. } else {
  3660. this.refresherStatus = Enum.Refresher.Default;
  3661. }
  3662. this.moveDis = moveDis;
  3663. },
  3664. // 进一步处理touch结束结果
  3665. _handleRefresherTouchend(moveDis) {
  3666. this.isTouchmovingTimeout && clearTimeout(this.isTouchmovingTimeout);
  3667. this.refresherReachMaxAngle = true;
  3668. this.isTouchEnded = true;
  3669. const refresherThreshold = this.finalRefresherThreshold;
  3670. if (moveDis >= refresherThreshold && [Enum.Refresher.ReleaseToRefresh, Enum.Refresher.GoF2].indexOf(this.refresherStatus) >= 0) {
  3671. if (this.refresherStatus === Enum.Refresher.GoF2) {
  3672. this._handleGoF2();
  3673. this._refresherEnd();
  3674. } else {
  3675. u$1.delay(() => {
  3676. this._emitTouchmove({ pullingDistance: refresherThreshold, dy: this.moveDis - refresherThreshold });
  3677. }, 0.1);
  3678. this.moveDis = refresherThreshold;
  3679. this.refresherStatus = Enum.Refresher.Loading;
  3680. this._doRefresherLoad();
  3681. }
  3682. } else {
  3683. this._refresherEnd();
  3684. this.isTouchmovingTimeout = u$1.delay(() => {
  3685. this.isTouchmoving = false;
  3686. }, this.refresherDefaultDuration);
  3687. }
  3688. this.scrollEnable = true;
  3689. this.$emit("refresherTouchend", moveDis);
  3690. },
  3691. // 处理列表触摸开始事件
  3692. _handleListTouchstart() {
  3693. if (this.useChatRecordMode && this.autoHideKeyboardWhenChat) {
  3694. uni.hideKeyboard();
  3695. this.$emit("hidedKeyboard");
  3696. }
  3697. },
  3698. // 处理scroll-view bounce是否生效
  3699. _handleScrollViewBounce({ bounce }) {
  3700. if (!this.usePageScroll && !this.scrollToTopBounceEnabled) {
  3701. if (this.wxsScrollTop <= 5) {
  3702. this.refresherTransition = "";
  3703. this.scrollEnable = bounce;
  3704. } else if (bounce) {
  3705. this.scrollEnable = bounce;
  3706. }
  3707. }
  3708. },
  3709. // wxs正在下拉状态改变处理
  3710. _handleWxsPullingDownStatusChange(onPullingDown) {
  3711. this.wxsOnPullingDown = onPullingDown;
  3712. if (onPullingDown && !this.useChatRecordMode) {
  3713. this.renderPropScrollTop = 0;
  3714. }
  3715. },
  3716. // wxs正在下拉处理
  3717. _handleWxsPullingDown({ moveDis, diffDis }) {
  3718. this._emitTouchmove({ pullingDistance: moveDis, dy: diffDis });
  3719. },
  3720. // wxs触摸方向改变
  3721. _handleTouchDirectionChange({ direction }) {
  3722. this.$emit("touchDirectionChange", direction);
  3723. },
  3724. // wxs通知更新其props
  3725. _handlePropUpdate() {
  3726. this.wxsPropType = u$1.getTime().toString();
  3727. },
  3728. // 下拉刷新结束
  3729. _refresherEnd(shouldEndLoadingDelay = true, fromAddData = false, isUserPullDown = false, setLoading = true) {
  3730. if (this.loadingType === Enum.LoadingType.Refresher) {
  3731. const refresherCompleteDelay = fromAddData && (isUserPullDown || this.showRefresherWhenReload) ? this.refresherCompleteDelay : 0;
  3732. const refresherStatus = refresherCompleteDelay > 0 ? Enum.Refresher.Complete : Enum.Refresher.Default;
  3733. if (this.finalShowRefresherWhenReload) {
  3734. const stackCount = this.refresherRevealStackCount;
  3735. this.refresherRevealStackCount--;
  3736. if (stackCount > 1)
  3737. return;
  3738. }
  3739. this._cleanRefresherEndTimeout();
  3740. this.refresherEndTimeout = u$1.delay(() => {
  3741. this.refresherStatus = refresherStatus;
  3742. if (refresherStatus !== Enum.Refresher.Complete) {
  3743. this.isRefresherInComplete = false;
  3744. }
  3745. }, this.refresherStatus !== Enum.Refresher.Default && refresherStatus === Enum.Refresher.Default ? this.refresherCompleteDuration : 0);
  3746. if (refresherCompleteDelay > 0) {
  3747. this.isRefresherInComplete = true;
  3748. }
  3749. this._cleanRefresherCompleteTimeout();
  3750. this.refresherCompleteTimeout = u$1.delay(() => {
  3751. let animateDuration = 1;
  3752. const animateType = this.refresherEndBounceEnabled && fromAddData ? "cubic-bezier(0.19,1.64,0.42,0.72)" : "linear";
  3753. if (fromAddData) {
  3754. animateDuration = this.refresherEndBounceEnabled ? this.refresherCompleteDuration / 1e3 : this.refresherCompleteDuration / 3e3;
  3755. }
  3756. this.refresherTransition = `transform ${fromAddData ? animateDuration : this.refresherDefaultDuration / 1e3}s ${animateType}`;
  3757. this.wxsPropType = this.refresherTransition + "end" + u$1.getTime();
  3758. this.moveDis = 0;
  3759. if (refresherStatus === Enum.Refresher.Complete) {
  3760. if (this.refresherCompleteSubTimeout) {
  3761. clearTimeout(this.refresherCompleteSubTimeout);
  3762. this.refresherCompleteSubTimeout = null;
  3763. }
  3764. this.refresherCompleteSubTimeout = u$1.delay(() => {
  3765. this.$nextTick(() => {
  3766. this.refresherStatus = Enum.Refresher.Default;
  3767. this.isRefresherInComplete = false;
  3768. });
  3769. }, animateDuration * 800);
  3770. }
  3771. this._emitTouchmove({ pullingDistance: 0, dy: this.moveDis });
  3772. }, refresherCompleteDelay);
  3773. }
  3774. if (setLoading) {
  3775. u$1.delay(() => this.loading = false, shouldEndLoadingDelay ? 10 : 0);
  3776. isUserPullDown && this._onRestore();
  3777. }
  3778. },
  3779. // 处理进入二楼
  3780. _handleGoF2() {
  3781. if (this.showF2 || !this.refresherF2Enabled)
  3782. return;
  3783. this.$emit("refresherF2Change", "go");
  3784. if (!this.showRefresherF2)
  3785. return;
  3786. this.f2Transform = `translateY(${-this.superContentHeight}px)`;
  3787. this.showF2 = true;
  3788. u$1.delay(() => {
  3789. this.f2Transform = "translateY(0px)";
  3790. }, 100, "f2ShowDelay");
  3791. },
  3792. // 处理退出二楼
  3793. _handleCloseF2() {
  3794. if (!this.showF2 || !this.refresherF2Enabled)
  3795. return;
  3796. this.$emit("refresherF2Change", "close");
  3797. if (!this.showRefresherF2)
  3798. return;
  3799. this.f2Transform = `translateY(${-this.superContentHeight}px)`;
  3800. u$1.delay(() => {
  3801. this.showF2 = false;
  3802. this.nF2Opacity = 0;
  3803. }, this.refresherF2Duration, "f2CloseDelay");
  3804. },
  3805. // 模拟用户手动触发下拉刷新
  3806. _doRefresherRefreshAnimate() {
  3807. this._cleanRefresherCompleteTimeout();
  3808. const doRefreshAnimateAfter = !this.doRefreshAnimateAfter && this.finalShowRefresherWhenReload && this.customRefresherHeight === -1 && this.refresherThreshold === u$1.addUnit(80, this.unit);
  3809. if (doRefreshAnimateAfter) {
  3810. this.doRefreshAnimateAfter = true;
  3811. return;
  3812. }
  3813. this.refresherRevealStackCount++;
  3814. this.wxsPropType = "begin" + u$1.getTime();
  3815. this.moveDis = this.finalRefresherThreshold;
  3816. this.refresherStatus = Enum.Refresher.Loading;
  3817. this.isTouchmoving = true;
  3818. this.isTouchmovingTimeout && clearTimeout(this.isTouchmovingTimeout);
  3819. this._doRefresherLoad(false);
  3820. },
  3821. // 触发下拉刷新
  3822. _doRefresherLoad(isUserPullDown = true) {
  3823. this._onRefresh(false, isUserPullDown);
  3824. this.loading = true;
  3825. },
  3826. // 更新自定义下拉刷新view高度
  3827. _updateCustomRefresherHeight() {
  3828. this._getNodeClientRect(".zp-custom-refresher-slot-view").then((res) => {
  3829. this.customRefresherHeight = res ? res[0].height : 0;
  3830. this.showCustomRefresher = this.customRefresherHeight > 0;
  3831. if (this.doRefreshAnimateAfter) {
  3832. this.doRefreshAnimateAfter = false;
  3833. this._doRefresherRefreshAnimate();
  3834. }
  3835. });
  3836. },
  3837. // emit pullingDown事件
  3838. _emitTouchmove(e2) {
  3839. e2.viewHeight = this.finalRefresherThreshold;
  3840. e2.rate = e2.viewHeight > 0 ? e2.pullingDistance / e2.viewHeight : 0;
  3841. this.hasTouchmove && this.oldPullingDistance !== e2.pullingDistance && this.$emit("refresherTouchmove", e2);
  3842. this.oldPullingDistance = e2.pullingDistance;
  3843. },
  3844. // 清除refresherCompleteTimeout
  3845. _cleanRefresherCompleteTimeout() {
  3846. this.refresherCompleteTimeout = this._cleanTimeout(this.refresherCompleteTimeout);
  3847. },
  3848. // 清除refresherEndTimeout
  3849. _cleanRefresherEndTimeout() {
  3850. this.refresherEndTimeout = this._cleanTimeout(this.refresherEndTimeout);
  3851. }
  3852. }
  3853. };
  3854. const loadMoreModule = {
  3855. props: {
  3856. // 自定义底部加载更多样式
  3857. loadingMoreCustomStyle: {
  3858. type: Object,
  3859. default: u$1.gc("loadingMoreCustomStyle", {})
  3860. },
  3861. // 自定义底部加载更多文字样式
  3862. loadingMoreTitleCustomStyle: {
  3863. type: Object,
  3864. default: u$1.gc("loadingMoreTitleCustomStyle", {})
  3865. },
  3866. // 自定义底部加载更多加载中动画样式
  3867. loadingMoreLoadingIconCustomStyle: {
  3868. type: Object,
  3869. default: u$1.gc("loadingMoreLoadingIconCustomStyle", {})
  3870. },
  3871. // 自定义底部加载更多加载中动画图标类型,可选flower或circle,默认为flower
  3872. loadingMoreLoadingIconType: {
  3873. type: String,
  3874. default: u$1.gc("loadingMoreLoadingIconType", "flower")
  3875. },
  3876. // 自定义底部加载更多加载中动画图标图片
  3877. loadingMoreLoadingIconCustomImage: {
  3878. type: String,
  3879. default: u$1.gc("loadingMoreLoadingIconCustomImage", "")
  3880. },
  3881. // 底部加载更多加载中view是否展示旋转动画,默认为是
  3882. loadingMoreLoadingAnimated: {
  3883. type: Boolean,
  3884. default: u$1.gc("loadingMoreLoadingAnimated", true)
  3885. },
  3886. // 是否启用加载更多数据(含滑动到底部加载更多数据和点击加载更多数据),默认为是
  3887. loadingMoreEnabled: {
  3888. type: Boolean,
  3889. default: u$1.gc("loadingMoreEnabled", true)
  3890. },
  3891. // 是否启用滑动到底部加载更多数据,默认为是
  3892. toBottomLoadingMoreEnabled: {
  3893. type: Boolean,
  3894. default: u$1.gc("toBottomLoadingMoreEnabled", true)
  3895. },
  3896. // 滑动到底部状态为默认状态时,以加载中的状态展示,默认为否。若设置为是,可避免滚动到底部看到默认状态然后立刻变为加载中状态的问题,但分页数量未超过一屏时,不会显示【点击加载更多】
  3897. loadingMoreDefaultAsLoading: {
  3898. type: Boolean,
  3899. default: u$1.gc("loadingMoreDefaultAsLoading", false)
  3900. },
  3901. // 滑动到底部"默认"文字,默认为【点击加载更多】
  3902. loadingMoreDefaultText: {
  3903. type: [String, Object],
  3904. default: u$1.gc("loadingMoreDefaultText", null)
  3905. },
  3906. // 滑动到底部"加载中"文字,默认为【正在加载...】
  3907. loadingMoreLoadingText: {
  3908. type: [String, Object],
  3909. default: u$1.gc("loadingMoreLoadingText", null)
  3910. },
  3911. // 滑动到底部"没有更多"文字,默认为【没有更多了】
  3912. loadingMoreNoMoreText: {
  3913. type: [String, Object],
  3914. default: u$1.gc("loadingMoreNoMoreText", null)
  3915. },
  3916. // 滑动到底部"加载失败"文字,默认为【加载失败,点击重新加载】
  3917. loadingMoreFailText: {
  3918. type: [String, Object],
  3919. default: u$1.gc("loadingMoreFailText", null)
  3920. },
  3921. // 当没有更多数据且分页内容未超出z-paging时是否隐藏没有更多数据的view,默认为否
  3922. hideNoMoreInside: {
  3923. type: Boolean,
  3924. default: u$1.gc("hideNoMoreInside", false)
  3925. },
  3926. // 当没有更多数据且分页数组长度少于这个值时,隐藏没有更多数据的view,默认为0,代表不限制。
  3927. hideNoMoreByLimit: {
  3928. type: Number,
  3929. default: u$1.gc("hideNoMoreByLimit", 0)
  3930. },
  3931. // 是否显示默认的加载更多text,默认为是
  3932. showDefaultLoadingMoreText: {
  3933. type: Boolean,
  3934. default: u$1.gc("showDefaultLoadingMoreText", true)
  3935. },
  3936. // 是否显示没有更多数据的view
  3937. showLoadingMoreNoMoreView: {
  3938. type: Boolean,
  3939. default: u$1.gc("showLoadingMoreNoMoreView", true)
  3940. },
  3941. // 是否显示没有更多数据的分割线,默认为是
  3942. showLoadingMoreNoMoreLine: {
  3943. type: Boolean,
  3944. default: u$1.gc("showLoadingMoreNoMoreLine", true)
  3945. },
  3946. // 自定义底部没有更多数据的分割线样式
  3947. loadingMoreNoMoreLineCustomStyle: {
  3948. type: Object,
  3949. default: u$1.gc("loadingMoreNoMoreLineCustomStyle", {})
  3950. },
  3951. // 当分页未满一屏时,是否自动加载更多,默认为否(nvue无效)
  3952. insideMore: {
  3953. type: Boolean,
  3954. default: u$1.gc("insideMore", false)
  3955. },
  3956. // 距底部/右边多远时(单位px),触发 scrolltolower 事件,默认为100rpx
  3957. lowerThreshold: {
  3958. type: [Number, String],
  3959. default: u$1.gc("lowerThreshold", "100rpx")
  3960. }
  3961. },
  3962. data() {
  3963. return {
  3964. M: Enum.More,
  3965. // 底部加载更多状态
  3966. loadingStatus: Enum.More.Default,
  3967. // 在渲染之后的底部加载更多状态
  3968. loadingStatusAfterRender: Enum.More.Default,
  3969. // 底部加载更多时间戳
  3970. loadingMoreTimeStamp: 0,
  3971. // 底部加载更多slot
  3972. loadingMoreDefaultSlot: null,
  3973. // 是否展示底部加载更多
  3974. showLoadingMore: false,
  3975. // 是否是开发者自定义的加载更多,-1代表交由z-paging自行判断;1代表没有更多了;0代表还有更多数据
  3976. customNoMore: -1
  3977. };
  3978. },
  3979. computed: {
  3980. // 底部加载更多配置
  3981. zLoadMoreConfig() {
  3982. return {
  3983. status: this.loadingStatusAfterRender,
  3984. defaultAsLoading: this.loadingMoreDefaultAsLoading || this.useChatRecordMode && this.chatLoadingMoreDefaultAsLoading,
  3985. defaultThemeStyle: this.finalLoadingMoreThemeStyle,
  3986. customStyle: this.loadingMoreCustomStyle,
  3987. titleCustomStyle: this.loadingMoreTitleCustomStyle,
  3988. iconCustomStyle: this.loadingMoreLoadingIconCustomStyle,
  3989. loadingIconType: this.loadingMoreLoadingIconType,
  3990. loadingIconCustomImage: this.loadingMoreLoadingIconCustomImage,
  3991. loadingAnimated: this.loadingMoreLoadingAnimated,
  3992. showNoMoreLine: this.showLoadingMoreNoMoreLine,
  3993. noMoreLineCustomStyle: this.loadingMoreNoMoreLineCustomStyle,
  3994. defaultText: this.finalLoadingMoreDefaultText,
  3995. loadingText: this.finalLoadingMoreLoadingText,
  3996. noMoreText: this.finalLoadingMoreNoMoreText,
  3997. failText: this.finalLoadingMoreFailText,
  3998. hideContent: !this.loadingMoreDefaultAsLoading && this.listRendering,
  3999. unit: this.unit,
  4000. isChat: this.useChatRecordMode,
  4001. chatDefaultAsLoading: this.chatLoadingMoreDefaultAsLoading
  4002. };
  4003. },
  4004. // 最终的底部加载更多主题
  4005. finalLoadingMoreThemeStyle() {
  4006. return this.loadingMoreThemeStyle.length ? this.loadingMoreThemeStyle : this.defaultThemeStyle;
  4007. },
  4008. // 最终的底部加载更多触发阈值
  4009. finalLowerThreshold() {
  4010. return u$1.convertToPx(this.lowerThreshold);
  4011. },
  4012. // 是否显示默认状态下的底部加载更多
  4013. showLoadingMoreDefault() {
  4014. return this._showLoadingMore("Default");
  4015. },
  4016. // 是否显示加载中状态下的底部加载更多
  4017. showLoadingMoreLoading() {
  4018. return this._showLoadingMore("Loading");
  4019. },
  4020. // 是否显示没有更多了状态下的底部加载更多
  4021. showLoadingMoreNoMore() {
  4022. return this._showLoadingMore("NoMore");
  4023. },
  4024. // 是否显示加载失败状态下的底部加载更多
  4025. showLoadingMoreFail() {
  4026. return this._showLoadingMore("Fail");
  4027. },
  4028. // 是否显示自定义状态下的底部加载更多
  4029. showLoadingMoreCustom() {
  4030. return this._showLoadingMore("Custom");
  4031. },
  4032. // 底部加载更多固定高度
  4033. loadingMoreFixedHeight() {
  4034. return u$1.addUnit("80rpx", this.unit);
  4035. }
  4036. },
  4037. methods: {
  4038. // 页面滚动到底部时通知z-paging进行进一步处理
  4039. pageReachBottom() {
  4040. !this.useChatRecordMode && this.toBottomLoadingMoreEnabled && this._onLoadingMore("toBottom");
  4041. },
  4042. // 手动触发上拉加载更多(非必须,可依据具体需求使用)
  4043. doLoadMore(type2) {
  4044. this._onLoadingMore(type2);
  4045. },
  4046. // 通过@scroll事件检测是否滚动到了底部(顺带检测下是否滚动到了顶部)
  4047. _checkScrolledToBottom(scrollDiff, checked = false) {
  4048. if (this.cacheScrollNodeHeight === -1) {
  4049. this._getNodeClientRect(".zp-scroll-view").then((res) => {
  4050. if (res) {
  4051. const scrollNodeHeight = res[0].height;
  4052. this.cacheScrollNodeHeight = scrollNodeHeight;
  4053. if (scrollDiff - scrollNodeHeight <= this.finalLowerThreshold) {
  4054. this._onLoadingMore("toBottom");
  4055. }
  4056. }
  4057. });
  4058. } else {
  4059. if (scrollDiff - this.cacheScrollNodeHeight <= this.finalLowerThreshold) {
  4060. this._onLoadingMore("toBottom");
  4061. } else if (scrollDiff - this.cacheScrollNodeHeight <= 500 && !checked) {
  4062. u$1.delay(() => {
  4063. this._getNodeClientRect(".zp-scroll-view", true, true).then((res) => {
  4064. if (res) {
  4065. this.oldScrollTop = res[0].scrollTop;
  4066. const newScrollDiff = res[0].scrollHeight - this.oldScrollTop;
  4067. this._checkScrolledToBottom(newScrollDiff, true);
  4068. }
  4069. });
  4070. }, 150, "checkScrolledToBottomDelay");
  4071. }
  4072. if (this.oldScrollTop <= 150 && this.oldScrollTop !== 0) {
  4073. u$1.delay(() => {
  4074. if (this.oldScrollTop !== 0) {
  4075. this._getNodeClientRect(".zp-scroll-view", true, true).then((res) => {
  4076. if (res && res[0].scrollTop === 0 && this.oldScrollTop !== 0) {
  4077. this._onScrollToUpper();
  4078. }
  4079. });
  4080. }
  4081. }, 150, "checkScrolledToTopDelay");
  4082. }
  4083. }
  4084. },
  4085. // 触发加载更多时调用,from:toBottom-滑动到底部触发;click-点击加载更多触发
  4086. _onLoadingMore(from = "click") {
  4087. if (this.isIos && from === "toBottom" && !this.scrollToBottomBounceEnabled && this.scrollEnable) {
  4088. this.scrollEnable = false;
  4089. this.$nextTick(() => {
  4090. this.scrollEnable = true;
  4091. });
  4092. }
  4093. this._emitScrollEvent("scrolltolower");
  4094. if (this.isOnly || !this.loadingMoreEnabled || !(this.loadingStatus === Enum.More.Default || this.loadingStatus === Enum.More.Fail) || this.loading || this.showEmpty)
  4095. return;
  4096. this._doLoadingMore();
  4097. },
  4098. // 处理开始加载更多
  4099. _doLoadingMore() {
  4100. if (this.pageNo >= this.defaultPageNo && this.loadingStatus !== Enum.More.NoMore) {
  4101. this.pageNo++;
  4102. this._startLoading(false);
  4103. if (this.isLocalPaging) {
  4104. this._localPagingQueryList(this.pageNo, this.defaultPageSize, this.localPagingLoadingTime, (res) => {
  4105. this.completeByTotal(res, this.totalLocalPagingList.length);
  4106. this.queryFrom = Enum.QueryFrom.LoadMore;
  4107. });
  4108. } else {
  4109. this._emitQuery(this.pageNo, this.defaultPageSize, Enum.QueryFrom.LoadMore);
  4110. this._callMyParentQuery();
  4111. }
  4112. this.loadingType = Enum.LoadingType.LoadMore;
  4113. }
  4114. },
  4115. // (预处理)判断当没有更多数据且分页内容未超出z-paging时是否显示没有更多数据的view
  4116. _preCheckShowNoMoreInside(newVal, scrollViewNode, pagingContainerNode) {
  4117. if (this.loadingStatus === Enum.More.NoMore && this.hideNoMoreByLimit > 0 && newVal.length) {
  4118. this.showLoadingMore = newVal.length > this.hideNoMoreByLimit;
  4119. } else if (this.loadingStatus === Enum.More.NoMore && this.hideNoMoreInside && newVal.length || this.insideMore && this.insideOfPaging !== false && newVal.length) {
  4120. this.$nextTick(() => {
  4121. this._checkShowNoMoreInside(newVal, scrollViewNode, pagingContainerNode);
  4122. });
  4123. if (this.insideMore && this.insideOfPaging !== false && newVal.length) {
  4124. this.showLoadingMore = newVal.length;
  4125. }
  4126. } else {
  4127. this.showLoadingMore = newVal.length;
  4128. }
  4129. },
  4130. // 判断当没有更多数据且分页内容未超出z-paging时是否显示没有更多数据的view
  4131. async _checkShowNoMoreInside(totalData, oldScrollViewNode, oldPagingContainerNode) {
  4132. try {
  4133. const scrollViewNode = oldScrollViewNode || await this._getNodeClientRect(".zp-scroll-view");
  4134. if (this.usePageScroll) {
  4135. if (scrollViewNode) {
  4136. const scrollViewTotalH = scrollViewNode[0].top + scrollViewNode[0].height;
  4137. this.insideOfPaging = scrollViewTotalH < this.windowHeight;
  4138. if (this.hideNoMoreInside) {
  4139. this.showLoadingMore = !this.insideOfPaging;
  4140. }
  4141. this._updateInsideOfPaging();
  4142. }
  4143. } else {
  4144. const pagingContainerNode = oldPagingContainerNode || await this._getNodeClientRect(".zp-paging-container-content");
  4145. const pagingContainerH = pagingContainerNode ? pagingContainerNode[0].height : 0;
  4146. const scrollViewH = scrollViewNode ? scrollViewNode[0].height : 0;
  4147. this.insideOfPaging = pagingContainerH < scrollViewH;
  4148. if (this.hideNoMoreInside) {
  4149. this.showLoadingMore = !this.insideOfPaging;
  4150. }
  4151. this._updateInsideOfPaging();
  4152. }
  4153. } catch (e2) {
  4154. this.insideOfPaging = !totalData.length;
  4155. if (this.hideNoMoreInside) {
  4156. this.showLoadingMore = !this.insideOfPaging;
  4157. }
  4158. this._updateInsideOfPaging();
  4159. }
  4160. },
  4161. // 是否要展示上拉加载更多view
  4162. _showLoadingMore(type2) {
  4163. if (!this.showLoadingMoreWhenReload && (!(this.loadingStatus === Enum.More.Default ? this.nShowBottom : true) || !this.realTotalData.length))
  4164. return false;
  4165. if ((!this.showLoadingMoreWhenReload || this.isUserPullDown || this.loadingStatus !== Enum.More.Loading) && !this.showLoadingMore || !this.loadingMoreEnabled && (!this.showLoadingMoreWhenReload || this.isUserPullDown || this.loadingStatus !== Enum.More.Loading) || this.isOnly) {
  4166. return false;
  4167. }
  4168. if (this.useChatRecordMode && type2 !== "Loading")
  4169. return false;
  4170. if (!this.zSlots)
  4171. return false;
  4172. if (type2 === "Custom") {
  4173. return this.showDefaultLoadingMoreText && !(this.loadingStatus === Enum.More.NoMore && !this.showLoadingMoreNoMoreView);
  4174. }
  4175. const res = this.loadingStatus === Enum.More[type2] && this.zSlots[`loadingMore${type2}`] && (type2 === "NoMore" ? this.showLoadingMoreNoMoreView : true);
  4176. return res;
  4177. }
  4178. }
  4179. };
  4180. const loadingModule = {
  4181. props: {
  4182. // 第一次加载后自动隐藏loading slot,默认为是
  4183. autoHideLoadingAfterFirstLoaded: {
  4184. type: Boolean,
  4185. default: u$1.gc("autoHideLoadingAfterFirstLoaded", true)
  4186. },
  4187. // loading slot是否铺满屏幕并固定,默认为否
  4188. loadingFullFixed: {
  4189. type: Boolean,
  4190. default: u$1.gc("loadingFullFixed", false)
  4191. },
  4192. // 是否自动显示系统Loading:即uni.showLoading,若开启则将在刷新列表时(调用reload、refresh时)显示,下拉刷新和滚动到底部加载更多不会显示,默认为false。
  4193. autoShowSystemLoading: {
  4194. type: Boolean,
  4195. default: u$1.gc("autoShowSystemLoading", false)
  4196. },
  4197. // 显示系统Loading时是否显示透明蒙层,防止触摸穿透,默认为是(H5、App、微信小程序、百度小程序有效)
  4198. systemLoadingMask: {
  4199. type: Boolean,
  4200. default: u$1.gc("systemLoadingMask", true)
  4201. },
  4202. // 显示系统Loading时显示的文字,默认为"加载中"
  4203. systemLoadingText: {
  4204. type: [String, Object],
  4205. default: u$1.gc("systemLoadingText", null)
  4206. }
  4207. },
  4208. data() {
  4209. return {
  4210. loading: false,
  4211. loadingForNow: false
  4212. };
  4213. },
  4214. watch: {
  4215. // loading状态
  4216. loadingStatus(newVal) {
  4217. this.$emit("loadingStatusChange", newVal);
  4218. this.$nextTick(() => {
  4219. this.loadingStatusAfterRender = newVal;
  4220. });
  4221. if (this.useChatRecordMode) {
  4222. if (this.isFirstPage && (newVal === Enum.More.NoMore || newVal === Enum.More.Fail)) {
  4223. this.isFirstPageAndNoMore = true;
  4224. return;
  4225. }
  4226. }
  4227. this.isFirstPageAndNoMore = false;
  4228. },
  4229. loading(newVal) {
  4230. if (newVal) {
  4231. this.loadingForNow = newVal;
  4232. }
  4233. }
  4234. },
  4235. computed: {
  4236. // 是否显示loading
  4237. showLoading() {
  4238. if (this.firstPageLoaded || !this.loading || !this.loadingForNow)
  4239. return false;
  4240. if (this.finalShowSystemLoading) {
  4241. uni.showLoading({
  4242. title: this.finalSystemLoadingText,
  4243. mask: this.systemLoadingMask
  4244. });
  4245. }
  4246. return this.autoHideLoadingAfterFirstLoaded ? this.fromEmptyViewReload ? true : !this.pagingLoaded : this.loadingType === Enum.LoadingType.Refresher;
  4247. },
  4248. // 最终的是否显示系统loading
  4249. finalShowSystemLoading() {
  4250. return this.autoShowSystemLoading && this.loadingType === Enum.LoadingType.Refresher;
  4251. }
  4252. },
  4253. methods: {
  4254. // 处理开始加载更多状态
  4255. _startLoading(isReload = false) {
  4256. if (this.showLoadingMoreWhenReload && !this.isUserPullDown || !isReload) {
  4257. this.loadingStatus = Enum.More.Loading;
  4258. }
  4259. this.loading = true;
  4260. },
  4261. // 停止系统loading和refresh
  4262. _endSystemLoadingAndRefresh() {
  4263. this.finalShowSystemLoading && uni.hideLoading();
  4264. !this.useCustomRefresher && uni.stopPullDownRefresh();
  4265. }
  4266. }
  4267. };
  4268. const chatRecordModerModule = {
  4269. props: {
  4270. // 使用聊天记录模式,默认为否
  4271. useChatRecordMode: {
  4272. type: Boolean,
  4273. default: u$1.gc("useChatRecordMode", false)
  4274. },
  4275. // 使用聊天记录模式时滚动到顶部后,列表垂直移动偏移距离。默认0rpx。单位px(暂时无效)
  4276. chatRecordMoreOffset: {
  4277. type: [Number, String],
  4278. default: u$1.gc("chatRecordMoreOffset", "0rpx")
  4279. },
  4280. // 使用聊天记录模式时是否自动隐藏键盘:在用户触摸列表时候自动隐藏键盘,默认为是
  4281. autoHideKeyboardWhenChat: {
  4282. type: Boolean,
  4283. default: u$1.gc("autoHideKeyboardWhenChat", true)
  4284. },
  4285. // 使用聊天记录模式中键盘弹出时是否自动调整slot="bottom"高度,默认为是
  4286. autoAdjustPositionWhenChat: {
  4287. type: Boolean,
  4288. default: u$1.gc("autoAdjustPositionWhenChat", true)
  4289. },
  4290. // 使用聊天记录模式中键盘弹出时占位高度偏移距离。默认0rpx。单位px
  4291. chatAdjustPositionOffset: {
  4292. type: [Number, String],
  4293. default: u$1.gc("chatAdjustPositionOffset", "0rpx")
  4294. },
  4295. // 使用聊天记录模式中键盘弹出时是否自动滚动到底部,默认为否
  4296. autoToBottomWhenChat: {
  4297. type: Boolean,
  4298. default: u$1.gc("autoToBottomWhenChat", false)
  4299. },
  4300. // 使用聊天记录模式中reload时是否显示chatLoading,默认为否
  4301. showChatLoadingWhenReload: {
  4302. type: Boolean,
  4303. default: u$1.gc("showChatLoadingWhenReload", false)
  4304. },
  4305. // 在聊天记录模式中滑动到顶部状态为默认状态时,以加载中的状态展示,默认为是。若设置为否,则默认会显示【点击加载更多】,然后才会显示loading
  4306. chatLoadingMoreDefaultAsLoading: {
  4307. type: Boolean,
  4308. default: u$1.gc("chatLoadingMoreDefaultAsLoading", true)
  4309. }
  4310. },
  4311. data() {
  4312. return {
  4313. // 键盘高度
  4314. keyboardHeight: 0,
  4315. // 键盘高度是否未改变,此时占位高度变化不需要动画效果
  4316. isKeyboardHeightChanged: false
  4317. };
  4318. },
  4319. computed: {
  4320. finalChatRecordMoreOffset() {
  4321. return u$1.convertToPx(this.chatRecordMoreOffset);
  4322. },
  4323. finalChatAdjustPositionOffset() {
  4324. return u$1.convertToPx(this.chatAdjustPositionOffset);
  4325. },
  4326. // 聊天记录模式旋转180度style
  4327. chatRecordRotateStyle() {
  4328. let cellStyle;
  4329. cellStyle = this.useChatRecordMode ? { transform: "scaleY(-1)" } : {};
  4330. this.$emit("update:cellStyle", cellStyle);
  4331. this.$emit("cellStyleChange", cellStyle);
  4332. this.$nextTick(() => {
  4333. if (this.isFirstPage && this.isChatRecordModeAndNotInversion) {
  4334. this.$nextTick(() => {
  4335. this._scrollToBottom(false);
  4336. u$1.delay(() => {
  4337. this._scrollToBottom(false);
  4338. u$1.delay(() => {
  4339. this._scrollToBottom(false);
  4340. }, 50);
  4341. }, 50);
  4342. });
  4343. }
  4344. });
  4345. return cellStyle;
  4346. },
  4347. // 是否是聊天记录列表并且有配置transform
  4348. isChatRecordModeHasTransform() {
  4349. return this.useChatRecordMode && this.chatRecordRotateStyle && this.chatRecordRotateStyle.transform;
  4350. },
  4351. // 是否是聊天记录列表并且列表未倒置
  4352. isChatRecordModeAndNotInversion() {
  4353. return this.isChatRecordModeHasTransform && this.chatRecordRotateStyle.transform === "scaleY(1)";
  4354. },
  4355. // 是否是聊天记录列表并且列表倒置
  4356. isChatRecordModeAndInversion() {
  4357. return this.isChatRecordModeHasTransform && this.chatRecordRotateStyle.transform === "scaleY(-1)";
  4358. },
  4359. // 最终的聊天记录模式中底部安全区域的高度,如果开启了底部安全区域并且键盘未弹出,则添加底部区域高度
  4360. chatRecordModeSafeAreaBottom() {
  4361. return this.safeAreaInsetBottom && !this.keyboardHeight ? this.safeAreaBottom : 0;
  4362. }
  4363. },
  4364. mounted() {
  4365. this.addKeyboardHeightChangeListener();
  4366. },
  4367. methods: {
  4368. // 添加聊天记录
  4369. addChatRecordData(data, toBottom = true, toBottomWithAnimate = true) {
  4370. if (!this.useChatRecordMode)
  4371. return;
  4372. this.isTotalChangeFromAddData = true;
  4373. this.addDataFromTop(data, toBottom, toBottomWithAnimate);
  4374. },
  4375. // 手动触发滚动到顶部加载更多,聊天记录模式时有效
  4376. doChatRecordLoadMore() {
  4377. this.useChatRecordMode && this._onLoadingMore("click");
  4378. },
  4379. // 手动添加键盘高度变化监听
  4380. addKeyboardHeightChangeListener() {
  4381. if (this.useChatRecordMode) {
  4382. uni.onKeyboardHeightChange(this._handleKeyboardHeightChange);
  4383. }
  4384. },
  4385. // 处理键盘高度变化
  4386. _handleKeyboardHeightChange(res) {
  4387. this.$emit("keyboardHeightChange", res);
  4388. if (this.autoAdjustPositionWhenChat) {
  4389. this.isKeyboardHeightChanged = true;
  4390. this.keyboardHeight = res.height > 0 ? res.height + this.finalChatAdjustPositionOffset : res.height;
  4391. }
  4392. if (this.autoToBottomWhenChat && this.keyboardHeight > 0) {
  4393. u$1.delay(() => {
  4394. this.scrollToBottom(false);
  4395. u$1.delay(() => {
  4396. this.scrollToBottom(false);
  4397. });
  4398. });
  4399. }
  4400. }
  4401. }
  4402. };
  4403. const scrollerModule = {
  4404. props: {
  4405. // 使用页面滚动,默认为否,当设置为是时则使用页面的滚动而非此组件内部的scroll-view的滚动,使用页面滚动时z-paging无需设置确定的高度且对于长列表展示性能更高,但配置会略微繁琐
  4406. usePageScroll: {
  4407. type: Boolean,
  4408. default: u$1.gc("usePageScroll", false)
  4409. },
  4410. // 是否可以滚动,使用内置scroll-view和nvue时有效,默认为是
  4411. scrollable: {
  4412. type: Boolean,
  4413. default: u$1.gc("scrollable", true)
  4414. },
  4415. // 控制是否出现滚动条,默认为是
  4416. showScrollbar: {
  4417. type: Boolean,
  4418. default: u$1.gc("showScrollbar", true)
  4419. },
  4420. // 是否允许横向滚动,默认为否
  4421. scrollX: {
  4422. type: Boolean,
  4423. default: u$1.gc("scrollX", false)
  4424. },
  4425. // iOS设备上滚动到顶部时是否允许回弹效果,默认为否。关闭回弹效果后可使滚动到顶部与下拉刷新更连贯,但是有吸顶view时滚动到顶部时可能出现抖动。
  4426. scrollToTopBounceEnabled: {
  4427. type: Boolean,
  4428. default: u$1.gc("scrollToTopBounceEnabled", false)
  4429. },
  4430. // iOS设备上滚动到底部时是否允许回弹效果,默认为是。
  4431. scrollToBottomBounceEnabled: {
  4432. type: Boolean,
  4433. default: u$1.gc("scrollToBottomBounceEnabled", true)
  4434. },
  4435. // 在设置滚动条位置时使用动画过渡,默认为否
  4436. scrollWithAnimation: {
  4437. type: Boolean,
  4438. default: u$1.gc("scrollWithAnimation", false)
  4439. },
  4440. // 值应为某子元素id(id不能以数字开头)。设置哪个方向可滚动,则在哪个方向滚动到该元素
  4441. scrollIntoView: {
  4442. type: String,
  4443. default: u$1.gc("scrollIntoView", "")
  4444. }
  4445. },
  4446. data() {
  4447. return {
  4448. scrollTop: 0,
  4449. oldScrollTop: 0,
  4450. scrollLeft: 0,
  4451. oldScrollLeft: 0,
  4452. scrollViewStyle: {},
  4453. scrollViewContainerStyle: {},
  4454. scrollViewInStyle: {},
  4455. pageScrollTop: -1,
  4456. scrollEnable: true,
  4457. privateScrollWithAnimation: -1,
  4458. cacheScrollNodeHeight: -1,
  4459. superContentHeight: 0,
  4460. lastScrollHeight: 0,
  4461. lastScrollDirection: "",
  4462. setContentHeightPending: false
  4463. };
  4464. },
  4465. watch: {
  4466. oldScrollTop(newVal) {
  4467. !this.usePageScroll && this._scrollTopChange(newVal, false);
  4468. },
  4469. pageScrollTop(newVal) {
  4470. this.usePageScroll && this._scrollTopChange(newVal, true);
  4471. },
  4472. usePageScroll: {
  4473. handler(newVal) {
  4474. this.loaded && this.autoHeight && this._setAutoHeight(!newVal);
  4475. },
  4476. immediate: true
  4477. },
  4478. finalScrollTop(newVal) {
  4479. this.renderPropScrollTop = newVal < 6 ? 0 : 10;
  4480. }
  4481. },
  4482. computed: {
  4483. finalScrollWithAnimation() {
  4484. if (this.privateScrollWithAnimation !== -1) {
  4485. return this.privateScrollWithAnimation === 1;
  4486. }
  4487. return this.scrollWithAnimation;
  4488. },
  4489. finalScrollViewStyle() {
  4490. if (this.superContentZIndex != 1) {
  4491. this.scrollViewStyle["z-index"] = this.superContentZIndex;
  4492. this.scrollViewStyle["position"] = "relative";
  4493. }
  4494. return this.scrollViewStyle;
  4495. },
  4496. finalScrollTop() {
  4497. return this.usePageScroll ? this.pageScrollTop : this.oldScrollTop;
  4498. },
  4499. // 当前是否是旧版webview
  4500. finalIsOldWebView() {
  4501. return this.isOldWebView && !this.usePageScroll;
  4502. },
  4503. // 当前scroll-view/list-view是否允许滚动
  4504. finalScrollable() {
  4505. return this.scrollable && !this.usePageScroll && this.scrollEnable && (this.refresherCompleteScrollable ? true : this.refresherStatus !== Enum.Refresher.Complete) && (this.refresherRefreshingScrollable ? true : this.refresherStatus !== Enum.Refresher.Loading);
  4506. }
  4507. },
  4508. methods: {
  4509. // 滚动到顶部,animate为是否展示滚动动画,默认为是
  4510. scrollToTop(animate, checkReverse = true) {
  4511. if (this.useChatRecordMode && checkReverse && !this.isChatRecordModeAndNotInversion) {
  4512. this.scrollToBottom(animate, false);
  4513. return;
  4514. }
  4515. this.$nextTick(() => {
  4516. this._scrollToTop(animate, false);
  4517. });
  4518. },
  4519. // 滚动到底部,animate为是否展示滚动动画,默认为是
  4520. scrollToBottom(animate, checkReverse = true) {
  4521. if (this.useChatRecordMode && checkReverse && !this.isChatRecordModeAndNotInversion) {
  4522. this.scrollToTop(animate, false);
  4523. return;
  4524. }
  4525. this.$nextTick(() => {
  4526. this._scrollToBottom(animate);
  4527. });
  4528. },
  4529. // 滚动到指定view(vue中有效)。sel为需要滚动的view的id值,不包含"#";offset为偏移量,单位为px;animate为是否展示滚动动画,默认为否
  4530. scrollIntoViewById(sel, offset, animate) {
  4531. this._scrollIntoView(sel, offset, animate);
  4532. },
  4533. // 滚动到指定view(vue中有效)。nodeTop为需要滚动的view的top值(通过uni.createSelectorQuery()获取);offset为偏移量,单位为px;animate为是否展示滚动动画,默认为否
  4534. scrollIntoViewByNodeTop(nodeTop, offset, animate) {
  4535. this.scrollTop = this.oldScrollTop;
  4536. this.$nextTick(() => {
  4537. this._scrollIntoViewByNodeTop(nodeTop, offset, animate);
  4538. });
  4539. },
  4540. // y轴滚动到指定位置(vue中有效)。y为与顶部的距离,单位为px;offset为偏移量,单位为px;animate为是否展示滚动动画,默认为否
  4541. scrollToY(y2, offset, animate) {
  4542. this.scrollTop = this.oldScrollTop;
  4543. this.$nextTick(() => {
  4544. this._scrollToY(y2, offset, animate);
  4545. });
  4546. },
  4547. // x轴滚动到指定位置(非页面滚动且在vue中有效)。x为与左侧的距离,单位为px;offset为偏移量,单位为px;animate为是否展示滚动动画,默认为否
  4548. scrollToX(x2, offset, animate) {
  4549. this.scrollLeft = this.oldScrollLeft;
  4550. this.$nextTick(() => {
  4551. this._scrollToX(x2, offset, animate);
  4552. });
  4553. },
  4554. // 滚动到指定view(nvue中和虚拟列表中有效)。index为需要滚动的view的index(第几个,从0开始);offset为偏移量,单位为px;animate为是否展示滚动动画,默认为否
  4555. scrollIntoViewByIndex(index2, offset, animate) {
  4556. if (index2 >= this.realTotalData.length) {
  4557. u$1.consoleErr("当前滚动的index超出已渲染列表长度,请先通过refreshToPage加载到对应index页并等待渲染成功后再调用此方法!");
  4558. return;
  4559. }
  4560. this.$nextTick(() => {
  4561. if (this.finalUseVirtualList) {
  4562. const isCellFixed = this.cellHeightMode === Enum.CellHeightMode.Fixed;
  4563. u$1.delay(() => {
  4564. if (this.finalUseVirtualList) {
  4565. const scrollTop = isCellFixed ? this.virtualCellHeight * index2 : this.virtualHeightCacheList[index2].lastTotalHeight;
  4566. this.scrollToY(scrollTop, offset, animate);
  4567. }
  4568. }, isCellFixed ? 0 : 100);
  4569. }
  4570. });
  4571. },
  4572. // 滚动到指定view(nvue中有效)。view为需要滚动的view(通过`this.$refs.xxx`获取),不包含"#";offset为偏移量,单位为px;animate为是否展示滚动动画,默认为否
  4573. scrollIntoViewByView(view, offset, animate) {
  4574. this._scrollIntoView(view, offset, animate);
  4575. },
  4576. // 当使用页面滚动并且自定义下拉刷新时,请在页面的onPageScroll中调用此方法,告知z-paging当前的pageScrollTop,否则会导致在任意位置都可以下拉刷新
  4577. updatePageScrollTop(value2) {
  4578. this.pageScrollTop = value2;
  4579. },
  4580. // 当使用页面滚动并且设置了slot="top"时,默认初次加载会自动获取其高度,并使内部容器下移,当slot="top"的view高度动态改变时,在其高度需要更新时调用此方法
  4581. updatePageScrollTopHeight() {
  4582. this._updatePageScrollTopOrBottomHeight("top");
  4583. },
  4584. // 当使用页面滚动并且设置了slot="bottom"时,默认初次加载会自动获取其高度,并使内部容器下移,当slot="bottom"的view高度动态改变时,在其高度需要更新时调用此方法
  4585. updatePageScrollBottomHeight() {
  4586. this._updatePageScrollTopOrBottomHeight("bottom");
  4587. },
  4588. // 更新slot="left"和slot="right"宽度,当slot="left"或slot="right"宽度动态改变时调用
  4589. updateLeftAndRightWidth() {
  4590. if (!this.finalIsOldWebView)
  4591. return;
  4592. this.$nextTick(() => this._updateLeftAndRightWidth(this.scrollViewContainerStyle, "zp-page"));
  4593. },
  4594. // 更新z-paging内置scroll-view的scrollTop
  4595. updateScrollViewScrollTop(scrollTop, animate = true) {
  4596. this._updatePrivateScrollWithAnimation(animate);
  4597. this.scrollTop = this.oldScrollTop;
  4598. this.$nextTick(() => {
  4599. this.scrollTop = scrollTop;
  4600. this.oldScrollTop = this.scrollTop;
  4601. });
  4602. },
  4603. // 当滚动到顶部时
  4604. _onScrollToUpper() {
  4605. this._emitScrollEvent("scrolltoupper");
  4606. this.$emit("scrollTopChange", 0);
  4607. this.$nextTick(() => {
  4608. this.oldScrollTop = 0;
  4609. });
  4610. },
  4611. // 当滚动到底部时
  4612. _onScrollToLower(e2) {
  4613. (!e2.detail || !e2.detail.direction || e2.detail.direction === "bottom") && this.toBottomLoadingMoreEnabled && this._onLoadingMore(this.useChatRecordMode ? "click" : "toBottom");
  4614. },
  4615. // 滚动到顶部
  4616. _scrollToTop(animate = true, isPrivate = true) {
  4617. if (this.usePageScroll) {
  4618. this.$nextTick(() => {
  4619. uni.pageScrollTo({
  4620. scrollTop: 0,
  4621. duration: animate ? 100 : 0
  4622. });
  4623. });
  4624. return;
  4625. }
  4626. this._updatePrivateScrollWithAnimation(animate);
  4627. this.scrollTop = this.oldScrollTop;
  4628. this.$nextTick(() => {
  4629. this.scrollTop = 0;
  4630. this.oldScrollTop = this.scrollTop;
  4631. });
  4632. },
  4633. // 滚动到底部
  4634. async _scrollToBottom(animate = true) {
  4635. if (this.usePageScroll) {
  4636. this.$nextTick(() => {
  4637. uni.pageScrollTo({
  4638. scrollTop: Number.MAX_VALUE,
  4639. duration: animate ? 100 : 0
  4640. });
  4641. });
  4642. return;
  4643. }
  4644. try {
  4645. this._updatePrivateScrollWithAnimation(animate);
  4646. const pagingContainerNode = await this._getNodeClientRect(".zp-paging-container");
  4647. const scrollViewNode = await this._getNodeClientRect(".zp-scroll-view");
  4648. const pagingContainerH = pagingContainerNode ? pagingContainerNode[0].height : 0;
  4649. const scrollViewH = scrollViewNode ? scrollViewNode[0].height : 0;
  4650. if (pagingContainerH > scrollViewH) {
  4651. this.scrollTop = this.oldScrollTop;
  4652. this.$nextTick(() => {
  4653. this.scrollTop = pagingContainerH - scrollViewH + this.virtualPlaceholderTopHeight;
  4654. this.oldScrollTop = this.scrollTop;
  4655. });
  4656. }
  4657. } catch (e2) {
  4658. }
  4659. },
  4660. // 滚动到指定view
  4661. _scrollIntoView(sel, offset = 0, animate = false, finishCallback) {
  4662. try {
  4663. this.scrollTop = this.oldScrollTop;
  4664. this.$nextTick(() => {
  4665. this._getNodeClientRect("#" + sel.replace("#", ""), false).then((node2) => {
  4666. if (node2) {
  4667. this._getNodeClientRect(".zp-scroll-view-container").then((svContainerNode) => {
  4668. if (svContainerNode) {
  4669. this._scrollIntoViewByNodeTop(node2[0].top - svContainerNode[0].top, offset, animate);
  4670. finishCallback && finishCallback();
  4671. }
  4672. });
  4673. } else {
  4674. u$1.consoleErr(`无法获取${sel}的节点信息,请检查!`);
  4675. }
  4676. });
  4677. });
  4678. } catch (e2) {
  4679. }
  4680. },
  4681. // 通过nodeTop滚动到指定view
  4682. _scrollIntoViewByNodeTop(nodeTop, offset = 0, animate = false) {
  4683. if (this.isChatRecordModeAndInversion) {
  4684. this._getNodeClientRect(".zp-scroll-view").then((sNode) => {
  4685. if (sNode) {
  4686. this._scrollToY(sNode[0].height - nodeTop, offset, animate, true);
  4687. }
  4688. });
  4689. } else {
  4690. this._scrollToY(nodeTop, offset, animate, true);
  4691. }
  4692. },
  4693. // y轴滚动到指定位置
  4694. _scrollToY(y2, offset = 0, animate = false, addScrollTop = false) {
  4695. this._updatePrivateScrollWithAnimation(animate);
  4696. u$1.delay(() => {
  4697. if (this.usePageScroll) {
  4698. if (addScrollTop && this.pageScrollTop !== -1) {
  4699. y2 += this.pageScrollTop;
  4700. }
  4701. const scrollTop = y2 - offset;
  4702. uni.pageScrollTo({
  4703. scrollTop,
  4704. duration: animate ? 100 : 0
  4705. });
  4706. } else {
  4707. if (addScrollTop) {
  4708. y2 += this.oldScrollTop;
  4709. }
  4710. this.scrollTop = y2 - offset;
  4711. }
  4712. }, 10);
  4713. },
  4714. // x轴滚动到指定位置
  4715. _scrollToX(x2, offset = 0, animate = false) {
  4716. this._updatePrivateScrollWithAnimation(animate);
  4717. u$1.delay(() => {
  4718. if (!this.usePageScroll) {
  4719. this.scrollLeft = x2 - offset;
  4720. } else {
  4721. u$1.consoleErr("使用页面滚动时不支持scrollToX");
  4722. }
  4723. }, 10);
  4724. },
  4725. // scroll-view滚动中
  4726. _scroll(e2) {
  4727. this.$emit("scroll", e2);
  4728. const { scrollTop, scrollLeft, scrollHeight } = e2.detail;
  4729. if (this.watchScrollDirectionChange) {
  4730. let direction = this.oldScrollTop > scrollTop ? "top" : "bottom";
  4731. if (scrollTop <= 0 || !this.scrollEnable) {
  4732. direction = "top";
  4733. }
  4734. if (scrollTop > this.lastScrollHeight - this.scrollViewHeight - 1 && this.scrollEnable) {
  4735. direction = "bottom";
  4736. }
  4737. if (direction !== this.lastScrollDirection) {
  4738. this.$emit("scrollDirectionChange", direction);
  4739. this.lastScrollDirection = direction;
  4740. }
  4741. if (this.lastScrollHeight !== scrollHeight && !this.setContentHeightPending) {
  4742. this.setContentHeightPending = true;
  4743. u$1.delay(() => {
  4744. this.lastScrollHeight = scrollHeight;
  4745. this.setContentHeightPending = false;
  4746. });
  4747. }
  4748. }
  4749. this.finalUseVirtualList && this._updateVirtualScroll(scrollTop, this.oldScrollTop - scrollTop);
  4750. this.oldScrollTop = scrollTop;
  4751. this.oldScrollLeft = scrollLeft;
  4752. const scrollDiff = e2.detail.scrollHeight - this.oldScrollTop;
  4753. !this.isIos && this._checkScrolledToBottom(scrollDiff);
  4754. },
  4755. // emit scrolltolower/scrolltoupper事件
  4756. _emitScrollEvent(type2) {
  4757. const reversedType = type2 === "scrolltolower" ? "scrolltoupper" : "scrolltolower";
  4758. const eventType = this.useChatRecordMode && !this.isChatRecordModeAndNotInversion ? reversedType : type2;
  4759. this.$emit(eventType);
  4760. },
  4761. // 更新内置的scroll-view是否启用滚动动画
  4762. _updatePrivateScrollWithAnimation(animate) {
  4763. this.privateScrollWithAnimation = animate ? 1 : 0;
  4764. u$1.delay(() => this.$nextTick(() => {
  4765. this.privateScrollWithAnimation = -1;
  4766. }), 100, "updateScrollWithAnimationDelay");
  4767. },
  4768. // 检测scrollView是否要铺满屏幕
  4769. _doCheckScrollViewShouldFullHeight(totalData) {
  4770. if (this.autoFullHeight && this.usePageScroll && this.isTotalChangeFromAddData) {
  4771. this.$nextTick(() => {
  4772. this._checkScrollViewShouldFullHeight((scrollViewNode, pagingContainerNode) => {
  4773. this._preCheckShowNoMoreInside(totalData, scrollViewNode, pagingContainerNode);
  4774. });
  4775. });
  4776. } else {
  4777. this._preCheckShowNoMoreInside(totalData);
  4778. }
  4779. },
  4780. // 检测z-paging是否要全屏覆盖(当使用页面滚动并且不满全屏时,默认z-paging需要铺满全屏,避免数据过少时内部的empty-view无法正确展示)
  4781. async _checkScrollViewShouldFullHeight(callback) {
  4782. try {
  4783. const scrollViewNode = await this._getNodeClientRect(".zp-scroll-view");
  4784. const pagingContainerNode = await this._getNodeClientRect(".zp-paging-container-content");
  4785. if (!scrollViewNode || !pagingContainerNode)
  4786. return;
  4787. const scrollViewHeight = pagingContainerNode[0].height;
  4788. const scrollViewTop = scrollViewNode[0].top;
  4789. if (this.isAddedData && scrollViewHeight + scrollViewTop <= this.windowHeight) {
  4790. this._setAutoHeight(true, scrollViewNode);
  4791. callback(scrollViewNode, pagingContainerNode);
  4792. } else {
  4793. this._setAutoHeight(false);
  4794. callback(null, null);
  4795. }
  4796. } catch (e2) {
  4797. callback(null, null);
  4798. }
  4799. },
  4800. // 更新缓存中z-paging整个内容容器高度
  4801. async _updateCachedSuperContentHeight() {
  4802. const superContentNode = await this._getNodeClientRect(".z-paging-content");
  4803. if (superContentNode) {
  4804. this.superContentHeight = superContentNode[0].height;
  4805. }
  4806. },
  4807. // scrollTop改变时触发
  4808. _scrollTopChange(newVal, isPageScrollTop) {
  4809. this.$emit("scrollTopChange", newVal);
  4810. this.$emit("update:scrollTop", newVal);
  4811. this._checkShouldShowBackToTop(newVal);
  4812. const scrollTop = newVal > 5 ? 6 : 0;
  4813. if (isPageScrollTop && this.wxsPageScrollTop !== scrollTop) {
  4814. this.wxsPageScrollTop = scrollTop;
  4815. } else if (!isPageScrollTop && this.wxsScrollTop !== scrollTop) {
  4816. this.wxsScrollTop = scrollTop;
  4817. if (scrollTop > 6) {
  4818. this.scrollEnable = true;
  4819. }
  4820. }
  4821. },
  4822. // 更新使用页面滚动时slot="top"或"bottom"插入view的高度
  4823. _updatePageScrollTopOrBottomHeight(type2) {
  4824. if (!this.usePageScroll)
  4825. return;
  4826. this._doCheckScrollViewShouldFullHeight(this.realTotalData);
  4827. const node2 = `.zp-page-${type2}`;
  4828. const marginText = `margin${type2.slice(0, 1).toUpperCase() + type2.slice(1)}`;
  4829. const safeAreaInsetBottomAdd = this.safeAreaInsetBottom && !this.zSlots.bottom && !this.useSafeAreaPlaceholder;
  4830. this.$nextTick(() => {
  4831. let delayTime = 0;
  4832. u$1.delay(() => {
  4833. this._getNodeClientRect(node2).then((res) => {
  4834. if (res) {
  4835. let pageScrollNodeHeight = res[0].height;
  4836. if (type2 === "bottom") {
  4837. if (safeAreaInsetBottomAdd) {
  4838. pageScrollNodeHeight += this.safeAreaBottom;
  4839. }
  4840. } else {
  4841. this.cacheTopHeight = pageScrollNodeHeight;
  4842. }
  4843. this.$set(this.scrollViewStyle, marginText, `${pageScrollNodeHeight}px`);
  4844. } else if (safeAreaInsetBottomAdd) {
  4845. this.$set(this.scrollViewStyle, marginText, `${this.safeAreaBottom}px`);
  4846. }
  4847. });
  4848. }, delayTime);
  4849. });
  4850. }
  4851. }
  4852. };
  4853. const backToTopModule = {
  4854. props: {
  4855. // 自动显示点击返回顶部按钮,默认为否
  4856. autoShowBackToTop: {
  4857. type: Boolean,
  4858. default: u$1.gc("autoShowBackToTop", false)
  4859. },
  4860. // 点击返回顶部按钮显示/隐藏的阈值(滚动距离),单位为px,默认为400rpx
  4861. backToTopThreshold: {
  4862. type: [Number, String],
  4863. default: u$1.gc("backToTopThreshold", "400rpx")
  4864. },
  4865. // 点击返回顶部按钮的自定义图片地址,默认使用z-paging内置的图片
  4866. backToTopImg: {
  4867. type: String,
  4868. default: u$1.gc("backToTopImg", "")
  4869. },
  4870. // 点击返回顶部按钮返回到顶部时是否展示过渡动画,默认为是
  4871. backToTopWithAnimate: {
  4872. type: Boolean,
  4873. default: u$1.gc("backToTopWithAnimate", true)
  4874. },
  4875. // 点击返回顶部按钮与底部的距离,注意添加单位px或rpx,默认为160rpx
  4876. backToTopBottom: {
  4877. type: [Number, String],
  4878. default: u$1.gc("backToTopBottom", "160rpx")
  4879. },
  4880. // 点击返回顶部按钮的自定义样式
  4881. backToTopStyle: {
  4882. type: Object,
  4883. default: u$1.gc("backToTopStyle", {})
  4884. },
  4885. // iOS点击顶部状态栏、安卓双击标题栏时,滚动条返回顶部,只支持竖向,默认为是
  4886. enableBackToTop: {
  4887. type: Boolean,
  4888. default: u$1.gc("enableBackToTop", true)
  4889. }
  4890. },
  4891. data() {
  4892. return {
  4893. // 点击返回顶部的class
  4894. backToTopClass: "zp-back-to-top zp-back-to-top-hide",
  4895. // 上次点击返回顶部的时间
  4896. lastBackToTopShowTime: 0,
  4897. // 点击返回顶部显示的class是否在展示中,使得按钮展示/隐藏过度效果更自然
  4898. showBackToTopClass: false
  4899. };
  4900. },
  4901. computed: {
  4902. backToTopThresholdUnitConverted() {
  4903. return u$1.addUnit(this.backToTopThreshold, this.unit);
  4904. },
  4905. backToTopBottomUnitConverted() {
  4906. return u$1.addUnit(this.backToTopBottom, this.unit);
  4907. },
  4908. finalEnableBackToTop() {
  4909. return this.usePageScroll ? false : this.enableBackToTop;
  4910. },
  4911. finalBackToTopThreshold() {
  4912. return u$1.convertToPx(this.backToTopThresholdUnitConverted);
  4913. },
  4914. finalBackToTopStyle() {
  4915. const backToTopStyle = this.backToTopStyle;
  4916. if (!backToTopStyle.bottom) {
  4917. backToTopStyle.bottom = this.windowBottom + u$1.convertToPx(this.backToTopBottomUnitConverted) + "px";
  4918. }
  4919. if (!backToTopStyle.position) {
  4920. backToTopStyle.position = this.usePageScroll ? "fixed" : "absolute";
  4921. }
  4922. return backToTopStyle;
  4923. },
  4924. finalBackToTopClass() {
  4925. return `${this.backToTopClass} zp-back-to-top-${this.unit}`;
  4926. }
  4927. },
  4928. methods: {
  4929. // 点击了返回顶部
  4930. _backToTopClick() {
  4931. let callbacked = false;
  4932. this.$emit("backToTopClick", (toTop) => {
  4933. (toTop === void 0 || toTop === true) && this._handleToTop();
  4934. callbacked = true;
  4935. });
  4936. this.$nextTick(() => {
  4937. !callbacked && this._handleToTop();
  4938. });
  4939. },
  4940. // 处理滚动到顶部(聊天记录模式中为滚动到底部)
  4941. _handleToTop() {
  4942. !this.backToTopWithAnimate && this._checkShouldShowBackToTop(0);
  4943. !this.useChatRecordMode ? this.scrollToTop(this.backToTopWithAnimate) : this.scrollToBottom(this.backToTopWithAnimate);
  4944. },
  4945. // 判断是否要显示返回顶部按钮
  4946. _checkShouldShowBackToTop(scrollTop) {
  4947. if (!this.autoShowBackToTop) {
  4948. this.showBackToTopClass = false;
  4949. return;
  4950. }
  4951. if (scrollTop > this.finalBackToTopThreshold) {
  4952. if (!this.showBackToTopClass) {
  4953. this.showBackToTopClass = true;
  4954. this.lastBackToTopShowTime = (/* @__PURE__ */ new Date()).getTime();
  4955. u$1.delay(() => {
  4956. this.backToTopClass = "zp-back-to-top zp-back-to-top-show";
  4957. }, 300);
  4958. }
  4959. } else {
  4960. if (this.showBackToTopClass) {
  4961. this.backToTopClass = "zp-back-to-top zp-back-to-top-hide";
  4962. u$1.delay(() => {
  4963. this.showBackToTopClass = false;
  4964. }, (/* @__PURE__ */ new Date()).getTime() - this.lastBackToTopShowTime < 500 ? 0 : 300);
  4965. }
  4966. }
  4967. }
  4968. }
  4969. };
  4970. const virtualListModule = {
  4971. props: {
  4972. // 是否使用虚拟列表,默认为否
  4973. useVirtualList: {
  4974. type: Boolean,
  4975. default: u$1.gc("useVirtualList", false)
  4976. },
  4977. // 在使用虚拟列表时,是否使用兼容模式,默认为否
  4978. useCompatibilityMode: {
  4979. type: Boolean,
  4980. default: u$1.gc("useCompatibilityMode", false)
  4981. },
  4982. // 使用兼容模式时传递的附加数据
  4983. extraData: {
  4984. type: Object,
  4985. default: u$1.gc("extraData", {})
  4986. },
  4987. // 是否在z-paging内部循环渲染列表(内置列表),默认为否。若use-virtual-list为true,则此项恒为true
  4988. useInnerList: {
  4989. type: Boolean,
  4990. default: u$1.gc("useInnerList", false)
  4991. },
  4992. // 强制关闭inner-list,默认为false,如果为true将强制关闭innerList,适用于开启了虚拟列表后需要强制关闭inner-list的情况
  4993. forceCloseInnerList: {
  4994. type: Boolean,
  4995. default: u$1.gc("forceCloseInnerList", false)
  4996. },
  4997. // 内置列表cell的key名称,仅nvue有效,在nvue中开启use-inner-list时必须填此项
  4998. cellKeyName: {
  4999. type: String,
  5000. default: u$1.gc("cellKeyName", "")
  5001. },
  5002. // innerList样式
  5003. innerListStyle: {
  5004. type: Object,
  5005. default: u$1.gc("innerListStyle", {})
  5006. },
  5007. // innerCell样式
  5008. innerCellStyle: {
  5009. type: Object,
  5010. default: u$1.gc("innerCellStyle", {})
  5011. },
  5012. // 预加载的列表可视范围(列表高度)页数,默认为12,即预加载当前页及上下各12页的cell。此数值越大,则虚拟列表中加载的dom越多,内存消耗越大(会维持在一个稳定值),但增加预加载页面数量可缓解快速滚动短暂白屏问题
  5013. preloadPage: {
  5014. type: [Number, String],
  5015. default: u$1.gc("preloadPage", 12),
  5016. validator: (value2) => {
  5017. if (value2 <= 0)
  5018. u$1.consoleErr("preload-page必须大于0!");
  5019. return value2 > 0;
  5020. }
  5021. },
  5022. // 虚拟列表cell高度模式,默认为fixed,也就是每个cell高度完全相同,将以第一个cell高度为准进行计算。可选值【dynamic】,即代表高度是动态非固定的,【dynamic】性能低于【fixed】。
  5023. cellHeightMode: {
  5024. type: String,
  5025. default: u$1.gc("cellHeightMode", Enum.CellHeightMode.Fixed)
  5026. },
  5027. // 固定的cell高度,cellHeightMode=fixed才有效,若设置了值,则不计算第一个cell高度而使用设置的cell高度
  5028. fixedCellHeight: {
  5029. type: [Number, String],
  5030. default: u$1.gc("fixedCellHeight", 0)
  5031. },
  5032. // 虚拟列表列数,默认为1。常用于每行有多列的情况,例如每行有2列数据,需要将此值设置为2
  5033. virtualListCol: {
  5034. type: [Number, String],
  5035. default: u$1.gc("virtualListCol", 1)
  5036. },
  5037. // 虚拟列表scroll取样帧率,默认为80,过低容易出现白屏问题,过高容易出现卡顿问题
  5038. virtualScrollFps: {
  5039. type: [Number, String],
  5040. default: u$1.gc("virtualScrollFps", 80)
  5041. },
  5042. // 虚拟列表cell id的前缀,适用于一个页面有多个虚拟列表的情况,用以区分不同虚拟列表cell的id,注意:请勿传数字或以数字开头的字符串。如设置为list1,则cell的id应为:list1-zp-id-${item.zp_index}
  5043. virtualCellIdPrefix: {
  5044. type: String,
  5045. default: u$1.gc("virtualCellIdPrefix", "")
  5046. },
  5047. // 虚拟列表是否使用swiper-item包裹,默认为否,此属性为了解决vue3+(微信小程序或QQ小程序)中,使用非内置列表写法时,若z-paging在swiper-item内存在无法获取slot插入的cell高度进而导致虚拟列表失败的问题
  5048. // 仅vue3+(微信小程序或QQ小程序)+非内置列表写法虚拟列表有效,其他情况此属性设置任何值都无效,所以如果您在swiper-item内使用z-paging的非内置虚拟列表写法,将此属性设置为true即可
  5049. virtualInSwiperSlot: {
  5050. type: Boolean,
  5051. default: false
  5052. }
  5053. },
  5054. data() {
  5055. return {
  5056. virtualListKey: u$1.getInstanceId(),
  5057. virtualCellHeight: 0,
  5058. virtualScrollTimeStamp: 0,
  5059. virtualList: [],
  5060. virtualPlaceholderTopHeight: 0,
  5061. virtualPlaceholderBottomHeight: 0,
  5062. virtualTopRangeIndex: 0,
  5063. virtualBottomRangeIndex: 0,
  5064. lastVirtualTopRangeIndex: 0,
  5065. lastVirtualBottomRangeIndex: 0,
  5066. virtualItemInsertedCount: 0,
  5067. virtualHeightCacheList: [],
  5068. getCellHeightRetryCount: {
  5069. fixed: 0,
  5070. dynamic: 0
  5071. },
  5072. updateVirtualListFromDataChange: false
  5073. };
  5074. },
  5075. watch: {
  5076. // 监听总数据的改变,刷新虚拟列表布局
  5077. realTotalData() {
  5078. this.updateVirtualListRender();
  5079. },
  5080. // 监听虚拟列表渲染数组的改变并emit
  5081. virtualList(newVal) {
  5082. this.$emit("update:virtualList", newVal);
  5083. this.$emit("virtualListChange", newVal);
  5084. },
  5085. // 监听虚拟列表顶部占位高度改变并emit
  5086. virtualPlaceholderTopHeight(newVal) {
  5087. this.$emit("virtualTopHeightChange", newVal);
  5088. }
  5089. },
  5090. computed: {
  5091. virtualCellIndexKey() {
  5092. return c$1.listCellIndexKey;
  5093. },
  5094. finalUseVirtualList() {
  5095. if (this.useVirtualList && this.usePageScroll) {
  5096. u$1.consoleErr("使用页面滚动时,开启虚拟列表无效!");
  5097. }
  5098. return this.useVirtualList && !this.usePageScroll;
  5099. },
  5100. finalUseInnerList() {
  5101. return this.useInnerList || this.finalUseVirtualList && !this.forceCloseInnerList;
  5102. },
  5103. finalCellKeyName() {
  5104. return this.cellKeyName;
  5105. },
  5106. finalVirtualPageHeight() {
  5107. return this.scrollViewHeight > 0 ? this.scrollViewHeight : this.windowHeight;
  5108. },
  5109. finalFixedCellHeight() {
  5110. return u$1.convertToPx(this.fixedCellHeight);
  5111. },
  5112. fianlVirtualCellIdPrefix() {
  5113. const prefix = this.virtualCellIdPrefix ? this.virtualCellIdPrefix + "-" : "";
  5114. return prefix + "zp-id";
  5115. },
  5116. finalPlaceholderTopHeightStyle() {
  5117. return {};
  5118. },
  5119. virtualRangePageHeight() {
  5120. return this.finalVirtualPageHeight * this.preloadPage;
  5121. },
  5122. virtualScrollDisTimeStamp() {
  5123. return 1e3 / this.virtualScrollFps;
  5124. }
  5125. },
  5126. methods: {
  5127. // 在使用动态高度虚拟列表时,若在列表数组中需要插入某个item,需要调用此方法;item:需要插入的item,index:插入的cell位置,若index为2,则插入的item在原list的index=1之后,index从0开始
  5128. doInsertVirtualListItem(item, index2) {
  5129. if (this.cellHeightMode !== Enum.CellHeightMode.Dynamic)
  5130. return;
  5131. this.realTotalData.splice(index2, 0, item);
  5132. this.realTotalData = [...this.realTotalData];
  5133. this.virtualItemInsertedCount++;
  5134. if (!item || Object.prototype.toString.call(item) !== "[object Object]") {
  5135. item = { item };
  5136. }
  5137. const cellIndexKey = this.virtualCellIndexKey;
  5138. item[cellIndexKey] = `custom-${this.virtualItemInsertedCount}`;
  5139. item[c$1.listCellIndexUniqueKey] = `${this.virtualListKey}-${item[cellIndexKey]}`;
  5140. this.$nextTick(async () => {
  5141. let retryCount = 0;
  5142. while (retryCount <= 10) {
  5143. await u$1.wait(c$1.delayTime);
  5144. const cellNode = await this._getVirtualCellNodeByIndex(item[cellIndexKey]);
  5145. if (!cellNode) {
  5146. retryCount++;
  5147. continue;
  5148. }
  5149. const currentHeight = cellNode ? cellNode[0].height : 0;
  5150. const lastHeightCache = this.virtualHeightCacheList[index2 - 1];
  5151. const lastTotalHeight = lastHeightCache ? lastHeightCache.totalHeight : 0;
  5152. this.virtualHeightCacheList.splice(index2, 0, {
  5153. height: currentHeight,
  5154. lastTotalHeight,
  5155. totalHeight: lastTotalHeight + currentHeight
  5156. });
  5157. for (let i2 = index2 + 1; i2 < this.virtualHeightCacheList.length; i2++) {
  5158. const thisNode = this.virtualHeightCacheList[i2];
  5159. thisNode.lastTotalHeight += currentHeight;
  5160. thisNode.totalHeight += currentHeight;
  5161. }
  5162. this._updateVirtualScroll(this.oldScrollTop);
  5163. break;
  5164. }
  5165. });
  5166. },
  5167. // 在使用动态高度虚拟列表时,手动更新指定cell的缓存高度(当cell高度在初始化之后再次改变后调用);index:需要更新的cell在列表中的位置,从0开始
  5168. didUpdateVirtualListCell(index2) {
  5169. if (this.cellHeightMode !== Enum.CellHeightMode.Dynamic)
  5170. return;
  5171. const currentNode = this.virtualHeightCacheList[index2];
  5172. this.$nextTick(() => {
  5173. this._getVirtualCellNodeByIndex(index2).then((cellNode) => {
  5174. const cellNodeHeight = cellNode ? cellNode[0].height : 0;
  5175. const heightDis = cellNodeHeight - currentNode.height;
  5176. currentNode.height = cellNodeHeight;
  5177. currentNode.totalHeight = currentNode.lastTotalHeight + cellNodeHeight;
  5178. for (let i2 = index2 + 1; i2 < this.virtualHeightCacheList.length; i2++) {
  5179. const thisNode = this.virtualHeightCacheList[i2];
  5180. thisNode.totalHeight += heightDis;
  5181. thisNode.lastTotalHeight += heightDis;
  5182. }
  5183. });
  5184. });
  5185. },
  5186. // 在使用动态高度虚拟列表时,若删除了列表数组中的某个item,需要调用此方法以更新高度缓存数组;index:删除的cell在列表中的位置,从0开始
  5187. didDeleteVirtualListCell(index2) {
  5188. if (this.cellHeightMode !== Enum.CellHeightMode.Dynamic)
  5189. return;
  5190. const currentNode = this.virtualHeightCacheList[index2];
  5191. for (let i2 = index2 + 1; i2 < this.virtualHeightCacheList.length; i2++) {
  5192. const thisNode = this.virtualHeightCacheList[i2];
  5193. thisNode.totalHeight -= currentNode.height;
  5194. thisNode.lastTotalHeight -= currentNode.height;
  5195. }
  5196. this.virtualHeightCacheList.splice(index2, 1);
  5197. },
  5198. // 手动触发虚拟列表渲染更新,可用于解决例如修改了虚拟列表数组中元素,但展示未更新的情况
  5199. updateVirtualListRender() {
  5200. if (this.finalUseVirtualList) {
  5201. this.updateVirtualListFromDataChange = true;
  5202. this.$nextTick(() => {
  5203. this.getCellHeightRetryCount.fixed = 0;
  5204. if (this.realTotalData.length) {
  5205. this.cellHeightMode === Enum.CellHeightMode.Fixed && this.isFirstPage && this._updateFixedCellHeight();
  5206. } else {
  5207. this._resetDynamicListState(!this.isUserPullDown);
  5208. }
  5209. this._updateVirtualScroll(this.oldScrollTop);
  5210. });
  5211. }
  5212. },
  5213. // cellHeightMode为fixed时获取第一个cell高度
  5214. _updateFixedCellHeight() {
  5215. if (!this.finalFixedCellHeight) {
  5216. this.$nextTick(() => {
  5217. u$1.delay(() => {
  5218. this._getVirtualCellNodeByIndex(0).then((cellNode) => {
  5219. if (!cellNode) {
  5220. if (this.getCellHeightRetryCount.fixed > 10)
  5221. return;
  5222. this.getCellHeightRetryCount.fixed++;
  5223. this._updateFixedCellHeight();
  5224. } else {
  5225. this.virtualCellHeight = cellNode[0].height;
  5226. this._updateVirtualScroll(this.oldScrollTop);
  5227. }
  5228. });
  5229. }, c$1.delayTime, "updateFixedCellHeightDelay");
  5230. });
  5231. } else {
  5232. this.virtualCellHeight = this.finalFixedCellHeight;
  5233. }
  5234. },
  5235. // cellHeightMode为dynamic时获取每个cell高度
  5236. _updateDynamicCellHeight(list, dataFrom = "bottom") {
  5237. const dataFromTop = dataFrom === "top";
  5238. const heightCacheList = this.virtualHeightCacheList;
  5239. const currentCacheList = dataFromTop ? [] : heightCacheList;
  5240. let listTotalHeight = 0;
  5241. this.$nextTick(() => {
  5242. u$1.delay(async () => {
  5243. for (let i2 = 0; i2 < list.length; i2++) {
  5244. const cellNode = await this._getVirtualCellNodeByIndex(list[i2][this.virtualCellIndexKey]);
  5245. const currentHeight = cellNode ? cellNode[0].height : 0;
  5246. if (!cellNode) {
  5247. if (this.getCellHeightRetryCount.dynamic <= 10) {
  5248. heightCacheList.splice(heightCacheList.length - i2, i2);
  5249. this.getCellHeightRetryCount.dynamic++;
  5250. this._updateDynamicCellHeight(list, dataFrom);
  5251. }
  5252. return;
  5253. }
  5254. const lastHeightCache = currentCacheList.length ? currentCacheList.slice(-1)[0] : null;
  5255. const lastTotalHeight = lastHeightCache ? lastHeightCache.totalHeight : 0;
  5256. currentCacheList.push({
  5257. height: currentHeight,
  5258. lastTotalHeight,
  5259. totalHeight: lastTotalHeight + currentHeight
  5260. });
  5261. if (dataFromTop) {
  5262. listTotalHeight += currentHeight;
  5263. }
  5264. }
  5265. if (dataFromTop && list.length) {
  5266. for (let i2 = 0; i2 < heightCacheList.length; i2++) {
  5267. const heightCacheItem = heightCacheList[i2];
  5268. heightCacheItem.lastTotalHeight += listTotalHeight;
  5269. heightCacheItem.totalHeight += listTotalHeight;
  5270. }
  5271. this.virtualHeightCacheList = currentCacheList.concat(heightCacheList);
  5272. }
  5273. this._updateVirtualScroll(this.oldScrollTop);
  5274. }, c$1.delayTime, "updateDynamicCellHeightDelay");
  5275. });
  5276. },
  5277. // 设置cellItem的index
  5278. _setCellIndex(list, dataFrom = "bottom") {
  5279. let currentItemIndex = 0;
  5280. const cellIndexKey = this.virtualCellIndexKey;
  5281. dataFrom === "bottom" && [Enum.QueryFrom.Refresh, Enum.QueryFrom.Reload].indexOf(this.queryFrom) >= 0 && this._resetDynamicListState();
  5282. if (this.totalData.length && this.queryFrom !== Enum.QueryFrom.Refresh) {
  5283. if (dataFrom === "bottom") {
  5284. currentItemIndex = this.realTotalData.length;
  5285. const lastItem = this.realTotalData.length ? this.realTotalData.slice(-1)[0] : null;
  5286. if (lastItem && lastItem[cellIndexKey] !== void 0) {
  5287. currentItemIndex = lastItem[cellIndexKey] + 1;
  5288. }
  5289. } else if (dataFrom === "top") {
  5290. const firstItem = this.realTotalData.length ? this.realTotalData[0] : null;
  5291. if (firstItem && firstItem[cellIndexKey] !== void 0) {
  5292. currentItemIndex = firstItem[cellIndexKey] - list.length;
  5293. }
  5294. }
  5295. } else {
  5296. this._resetDynamicListState();
  5297. }
  5298. for (let i2 = 0; i2 < list.length; i2++) {
  5299. let item = list[i2];
  5300. if (!item || Object.prototype.toString.call(item) !== "[object Object]") {
  5301. item = { item };
  5302. }
  5303. if (item[c$1.listCellIndexUniqueKey]) {
  5304. item = u$1.deepCopy(item);
  5305. }
  5306. item[cellIndexKey] = currentItemIndex + i2;
  5307. item[c$1.listCellIndexUniqueKey] = `${this.virtualListKey}-${item[cellIndexKey]}`;
  5308. list[i2] = item;
  5309. }
  5310. this.getCellHeightRetryCount.dynamic = 0;
  5311. this.cellHeightMode === Enum.CellHeightMode.Dynamic && this._updateDynamicCellHeight(list, dataFrom);
  5312. },
  5313. // 更新scroll滚动(虚拟列表滚动时触发)
  5314. _updateVirtualScroll(scrollTop, scrollDiff = 0) {
  5315. const currentTimeStamp = u$1.getTime();
  5316. scrollTop === 0 && this._resetTopRange();
  5317. if (scrollTop !== 0 && this.virtualScrollTimeStamp && currentTimeStamp - this.virtualScrollTimeStamp <= this.virtualScrollDisTimeStamp) {
  5318. return;
  5319. }
  5320. this.virtualScrollTimeStamp = currentTimeStamp;
  5321. let scrollIndex = 0;
  5322. const cellHeightMode = this.cellHeightMode;
  5323. if (cellHeightMode === Enum.CellHeightMode.Fixed) {
  5324. scrollIndex = parseInt(scrollTop / this.virtualCellHeight) || 0;
  5325. this._updateFixedTopRangeIndex(scrollIndex);
  5326. this._updateFixedBottomRangeIndex(scrollIndex);
  5327. } else if (cellHeightMode === Enum.CellHeightMode.Dynamic) {
  5328. const scrollDirection = scrollDiff > 0 ? "top" : "bottom";
  5329. const rangePageHeight = this.virtualRangePageHeight;
  5330. const topRangePageOffset = scrollTop - rangePageHeight;
  5331. const bottomRangePageOffset = scrollTop + this.finalVirtualPageHeight + rangePageHeight;
  5332. let virtualBottomRangeIndex = 0;
  5333. let virtualPlaceholderBottomHeight = 0;
  5334. let reachedLimitBottom = false;
  5335. const heightCacheList = this.virtualHeightCacheList;
  5336. const lastHeightCache = !!heightCacheList ? heightCacheList.slice(-1)[0] : null;
  5337. let startTopRangeIndex = this.virtualTopRangeIndex;
  5338. if (scrollDirection === "bottom") {
  5339. for (let i2 = startTopRangeIndex; i2 < heightCacheList.length; i2++) {
  5340. const heightCacheItem = heightCacheList[i2];
  5341. if (heightCacheItem && heightCacheItem.totalHeight > topRangePageOffset) {
  5342. this.virtualTopRangeIndex = i2;
  5343. this.virtualPlaceholderTopHeight = heightCacheItem.lastTotalHeight;
  5344. break;
  5345. }
  5346. }
  5347. } else {
  5348. let topRangeMatched = false;
  5349. for (let i2 = startTopRangeIndex; i2 >= 0; i2--) {
  5350. const heightCacheItem = heightCacheList[i2];
  5351. if (heightCacheItem && heightCacheItem.totalHeight < topRangePageOffset) {
  5352. this.virtualTopRangeIndex = i2;
  5353. this.virtualPlaceholderTopHeight = heightCacheItem.lastTotalHeight;
  5354. topRangeMatched = true;
  5355. break;
  5356. }
  5357. }
  5358. !topRangeMatched && this._resetTopRange();
  5359. }
  5360. for (let i2 = this.virtualTopRangeIndex; i2 < heightCacheList.length; i2++) {
  5361. const heightCacheItem = heightCacheList[i2];
  5362. if (heightCacheItem && heightCacheItem.totalHeight > bottomRangePageOffset) {
  5363. virtualBottomRangeIndex = i2;
  5364. virtualPlaceholderBottomHeight = lastHeightCache.totalHeight - heightCacheItem.totalHeight;
  5365. reachedLimitBottom = true;
  5366. break;
  5367. }
  5368. }
  5369. if (!reachedLimitBottom || this.virtualBottomRangeIndex === 0) {
  5370. this.virtualBottomRangeIndex = this.realTotalData.length ? this.realTotalData.length - 1 : this.pageSize;
  5371. this.virtualPlaceholderBottomHeight = 0;
  5372. } else {
  5373. this.virtualBottomRangeIndex = virtualBottomRangeIndex;
  5374. this.virtualPlaceholderBottomHeight = virtualPlaceholderBottomHeight;
  5375. }
  5376. this._updateVirtualList();
  5377. }
  5378. },
  5379. // 更新fixedCell模式下topRangeIndex&placeholderTopHeight
  5380. _updateFixedTopRangeIndex(scrollIndex) {
  5381. let virtualTopRangeIndex = this.virtualCellHeight === 0 ? 0 : scrollIndex - (parseInt(this.finalVirtualPageHeight / this.virtualCellHeight) || 1) * this.preloadPage;
  5382. virtualTopRangeIndex *= this.virtualListCol;
  5383. virtualTopRangeIndex = Math.max(0, virtualTopRangeIndex);
  5384. this.virtualTopRangeIndex = virtualTopRangeIndex;
  5385. this.virtualPlaceholderTopHeight = virtualTopRangeIndex / this.virtualListCol * this.virtualCellHeight;
  5386. },
  5387. // 更新fixedCell模式下bottomRangeIndex&placeholderBottomHeight
  5388. _updateFixedBottomRangeIndex(scrollIndex) {
  5389. let virtualBottomRangeIndex = this.virtualCellHeight === 0 ? this.pageSize : scrollIndex + (parseInt(this.finalVirtualPageHeight / this.virtualCellHeight) || 1) * (this.preloadPage + 1);
  5390. virtualBottomRangeIndex *= this.virtualListCol;
  5391. virtualBottomRangeIndex = Math.min(this.realTotalData.length, virtualBottomRangeIndex);
  5392. this.virtualBottomRangeIndex = virtualBottomRangeIndex;
  5393. this.virtualPlaceholderBottomHeight = (this.realTotalData.length - virtualBottomRangeIndex) * this.virtualCellHeight / this.virtualListCol;
  5394. this._updateVirtualList();
  5395. },
  5396. // 更新virtualList
  5397. _updateVirtualList() {
  5398. const shouldUpdateList = this.updateVirtualListFromDataChange || (this.lastVirtualTopRangeIndex !== this.virtualTopRangeIndex || this.lastVirtualBottomRangeIndex !== this.virtualBottomRangeIndex);
  5399. if (shouldUpdateList) {
  5400. this.updateVirtualListFromDataChange = false;
  5401. this.lastVirtualTopRangeIndex = this.virtualTopRangeIndex;
  5402. this.lastVirtualBottomRangeIndex = this.virtualBottomRangeIndex;
  5403. this.virtualList = this.realTotalData.slice(this.virtualTopRangeIndex, this.virtualBottomRangeIndex + 1);
  5404. }
  5405. },
  5406. // 重置动态cell模式下的高度缓存数据、虚拟列表和滚动状态
  5407. _resetDynamicListState(resetVirtualList = false) {
  5408. this.virtualHeightCacheList = [];
  5409. if (resetVirtualList) {
  5410. this.virtualList = [];
  5411. }
  5412. this.virtualTopRangeIndex = 0;
  5413. this.virtualPlaceholderTopHeight = 0;
  5414. },
  5415. // 重置topRangeIndex和placeholderTopHeight
  5416. _resetTopRange() {
  5417. this.virtualTopRangeIndex = 0;
  5418. this.virtualPlaceholderTopHeight = 0;
  5419. this._updateVirtualList();
  5420. },
  5421. // 检测虚拟列表当前滚动位置,如发现滚动位置不正确则重新计算虚拟列表相关参数(为解决在App中可能出现的长时间进入后台后打开App白屏的问题)
  5422. _checkVirtualListScroll() {
  5423. if (this.finalUseVirtualList) {
  5424. this.$nextTick(() => {
  5425. this._getNodeClientRect(".zp-paging-touch-view").then((node2) => {
  5426. const currentTop = node2 ? node2[0].top : 0;
  5427. if (!node2 || currentTop === this.pagingOrgTop && this.virtualPlaceholderTopHeight !== 0) {
  5428. this._updateVirtualScroll(0);
  5429. }
  5430. });
  5431. });
  5432. }
  5433. },
  5434. // 获取对应index的虚拟列表cell节点信息
  5435. _getVirtualCellNodeByIndex(index2) {
  5436. let inDom = this.finalUseInnerList;
  5437. return this._getNodeClientRect(`#${this.fianlVirtualCellIdPrefix}-${index2}`, inDom);
  5438. },
  5439. // 处理使用内置列表时点击了cell事件
  5440. _innerCellClick(item, index2) {
  5441. this.$emit("innerCellClick", item, index2);
  5442. }
  5443. }
  5444. };
  5445. const systemInfo$1 = u$1.getSystemInfoSync();
  5446. const _sfc_main$2f = {
  5447. name: "z-paging",
  5448. components: {
  5449. zPagingRefresh,
  5450. zPagingLoadMore,
  5451. zPagingEmptyView: __easycom_0$f
  5452. },
  5453. mixins: [
  5454. commonLayoutModule,
  5455. dataHandleModule,
  5456. i18nModule,
  5457. nvueModule,
  5458. emptyModule,
  5459. refresherModule,
  5460. loadMoreModule,
  5461. loadingModule,
  5462. chatRecordModerModule,
  5463. scrollerModule,
  5464. backToTopModule,
  5465. virtualListModule
  5466. ],
  5467. data() {
  5468. return {
  5469. // --------------静态资源---------------
  5470. base64BackToTop: zStatic.base64BackToTop,
  5471. // -------------全局数据相关--------------
  5472. // 当前加载类型
  5473. loadingType: Enum.LoadingType.Refresher,
  5474. requestTimeStamp: 0,
  5475. wxsPropType: "",
  5476. renderPropScrollTop: -1,
  5477. checkScrolledToBottomTimeOut: null,
  5478. cacheTopHeight: -1,
  5479. statusBarHeight: systemInfo$1.statusBarHeight,
  5480. scrollViewHeight: 0,
  5481. pagingOrgTop: -1,
  5482. // --------------状态&判断---------------
  5483. insideOfPaging: -1,
  5484. isLoadFailed: false,
  5485. isIos: systemInfo$1.platform === "ios",
  5486. disabledBounce: false,
  5487. fromCompleteEmit: false,
  5488. disabledCompleteEmit: false,
  5489. pageLaunched: false,
  5490. active: false,
  5491. // ---------------wxs相关---------------
  5492. wxsIsScrollTopInTopRange: true,
  5493. wxsScrollTop: 0,
  5494. wxsPageScrollTop: 0,
  5495. wxsOnPullingDown: false
  5496. };
  5497. },
  5498. props: {
  5499. // 调用complete后延迟处理的时间,单位为毫秒,默认0毫秒,优先级高于minDelay
  5500. delay: {
  5501. type: [Number, String],
  5502. default: u$1.gc("delay", 0)
  5503. },
  5504. // 触发@query后最小延迟处理的时间,单位为毫秒,默认0毫秒,优先级低于delay(假设设置为300毫秒,若分页请求时间小于300毫秒,则在调用complete后延迟[300毫秒-请求时长];若请求时长大于300毫秒,则不延迟),当show-refresher-when-reload为true或reload(true)时,其最小值为400
  5505. minDelay: {
  5506. type: [Number, String],
  5507. default: u$1.gc("minDelay", 0)
  5508. },
  5509. // 设置z-paging的style,部分平台(如微信小程序)无法直接修改组件的style,可使用此属性代替
  5510. pagingStyle: {
  5511. type: Object,
  5512. default: u$1.gc("pagingStyle", {})
  5513. },
  5514. // 设置z-paging的class,优先级低于pagingStyle和height、width、maxWidth、bgColor
  5515. pagingClass: {
  5516. type: [String, Array, Object],
  5517. default: u$1.gc("pagingClass", "")
  5518. },
  5519. // z-paging的高度,优先级低于pagingStyle中设置的height;传字符串,如100px、100rpx、100%
  5520. height: {
  5521. type: String,
  5522. default: u$1.gc("height", "")
  5523. },
  5524. // z-paging的宽度,优先级低于pagingStyle中设置的width;传字符串,如100px、100rpx、100%
  5525. width: {
  5526. type: String,
  5527. default: u$1.gc("width", "")
  5528. },
  5529. // z-paging的最大宽度,优先级低于pagingStyle中设置的max-width;传字符串,如100px、100rpx、100%。默认为空,也就是铺满窗口宽度,若设置了特定值则会自动添加margin: 0 auto
  5530. maxWidth: {
  5531. type: String,
  5532. default: u$1.gc("maxWidth", "")
  5533. },
  5534. // z-paging的背景色,优先级低于pagingStyle中设置的background。传字符串,如"#ffffff"
  5535. bgColor: {
  5536. type: String,
  5537. default: u$1.gc("bgColor", "")
  5538. },
  5539. // 设置z-paging的容器(插槽的父view)的style
  5540. pagingContentStyle: {
  5541. type: Object,
  5542. default: u$1.gc("pagingContentStyle", {})
  5543. },
  5544. // z-paging是否自动高度,若自动高度则会自动铺满屏幕
  5545. autoHeight: {
  5546. type: Boolean,
  5547. default: u$1.gc("autoHeight", false)
  5548. },
  5549. // z-paging是否自动高度时,附加的高度,注意添加单位px或rpx,若需要减少高度,则传负数
  5550. autoHeightAddition: {
  5551. type: [Number, String],
  5552. default: u$1.gc("autoHeightAddition", "0px")
  5553. },
  5554. // loading(下拉刷新、上拉加载更多)的主题样式,支持black,white,默认black
  5555. defaultThemeStyle: {
  5556. type: String,
  5557. default: u$1.gc("defaultThemeStyle", "black")
  5558. },
  5559. // z-paging是否使用fixed布局,若使用fixed布局,则z-paging的父view无需固定高度,z-paging高度默认为100%,默认为是(当使用内置scroll-view滚动时有效)
  5560. fixed: {
  5561. type: Boolean,
  5562. default: u$1.gc("fixed", true)
  5563. },
  5564. // 是否开启底部安全区域适配
  5565. safeAreaInsetBottom: {
  5566. type: Boolean,
  5567. default: u$1.gc("safeAreaInsetBottom", false)
  5568. },
  5569. // 开启底部安全区域适配后,是否使用placeholder形式实现,默认为否。为否时滚动区域会自动避开底部安全区域,也就是所有滚动内容都不会挡住底部安全区域,若设置为是,则滚动时滚动内容会挡住底部安全区域,但是当滚动到底部时才会避开底部安全区域
  5570. useSafeAreaPlaceholder: {
  5571. type: Boolean,
  5572. default: u$1.gc("useSafeAreaPlaceholder", false)
  5573. },
  5574. // z-paging bottom的背景色,默认透明,传字符串,如"#ffffff"
  5575. bottomBgColor: {
  5576. type: String,
  5577. default: u$1.gc("bottomBgColor", "")
  5578. },
  5579. // slot="top"的view的z-index,默认为99,仅使用页面滚动时有效
  5580. topZIndex: {
  5581. type: Number,
  5582. default: u$1.gc("topZIndex", 99)
  5583. },
  5584. // z-paging内容容器父view的z-index,默认为1
  5585. superContentZIndex: {
  5586. type: Number,
  5587. default: u$1.gc("superContentZIndex", 1)
  5588. },
  5589. // z-paging内容容器部分的z-index,默认为1
  5590. contentZIndex: {
  5591. type: Number,
  5592. default: u$1.gc("contentZIndex", 1)
  5593. },
  5594. // z-paging二楼的z-index,默认为100
  5595. f2ZIndex: {
  5596. type: Number,
  5597. default: u$1.gc("f2ZIndex", 100)
  5598. },
  5599. // 使用页面滚动时,是否在不满屏时自动填充满屏幕,默认为是
  5600. autoFullHeight: {
  5601. type: Boolean,
  5602. default: u$1.gc("autoFullHeight", true)
  5603. },
  5604. // 是否监听列表触摸方向改变,默认为否
  5605. watchTouchDirectionChange: {
  5606. type: Boolean,
  5607. default: u$1.gc("watchTouchDirectionChange", false)
  5608. },
  5609. // 是否监听列表滚动方向改变,默认为否
  5610. watchScrollDirectionChange: {
  5611. type: Boolean,
  5612. default: u$1.gc("watchScrollDirectionChange", false)
  5613. },
  5614. // 是否只使用基础布局,设置为true后将关闭mounted自动请求数据、关闭下拉刷新和滚动到底部加载更多,强制隐藏空数据图。默认为否
  5615. layoutOnly: {
  5616. type: Boolean,
  5617. default: u$1.gc("layoutOnly", false)
  5618. },
  5619. // z-paging中布局的单位,默认为rpx
  5620. unit: {
  5621. type: String,
  5622. default: u$1.gc("unit", "rpx")
  5623. }
  5624. },
  5625. created() {
  5626. if (this.createdReload && !this.isOnly && this.auto) {
  5627. this._startLoading();
  5628. this.$nextTick(this._preReload);
  5629. }
  5630. },
  5631. mounted() {
  5632. this.active = true;
  5633. this.wxsPropType = u$1.getTime().toString();
  5634. this.renderJsIgnore;
  5635. if (!this.createdReload && !this.isOnly && this.auto) {
  5636. u$1.delay(() => this.$nextTick(this._preReload), 0);
  5637. }
  5638. this.finalUseCache && this._setListByLocalCache();
  5639. this.$nextTick(() => {
  5640. this.systemInfo = u$1.getSystemInfoSync();
  5641. !this.usePageScroll && this.autoHeight && this._setAutoHeight();
  5642. this.loaded = true;
  5643. u$1.delay(() => {
  5644. this.updateFixedLayout();
  5645. this._updateCachedSuperContentHeight();
  5646. this._updateScrollViewHeight();
  5647. });
  5648. });
  5649. this.updatePageScrollTopHeight();
  5650. this.updatePageScrollBottomHeight();
  5651. this.updateLeftAndRightWidth();
  5652. if (this.finalRefresherEnabled && this.useCustomRefresher) {
  5653. this.$nextTick(() => {
  5654. this.isTouchmoving = true;
  5655. });
  5656. }
  5657. if (!this.layoutOnly) {
  5658. this._onEmit();
  5659. }
  5660. },
  5661. destroyed() {
  5662. this._handleUnmounted();
  5663. },
  5664. unmounted() {
  5665. this._handleUnmounted();
  5666. },
  5667. watch: {
  5668. defaultThemeStyle: {
  5669. handler(newVal) {
  5670. if (newVal.length) {
  5671. this.finalRefresherDefaultStyle = newVal;
  5672. }
  5673. },
  5674. immediate: true
  5675. },
  5676. autoHeight(newVal) {
  5677. this.loaded && !this.usePageScroll && this._setAutoHeight(newVal);
  5678. },
  5679. autoHeightAddition(newVal) {
  5680. this.loaded && !this.usePageScroll && this.autoHeight && this._setAutoHeight(newVal);
  5681. }
  5682. },
  5683. computed: {
  5684. // 当前z-paging的内置样式
  5685. finalPagingStyle() {
  5686. const pagingStyle = { ...this.pagingStyle };
  5687. if (!this.systemInfo)
  5688. return pagingStyle;
  5689. const { windowTop, windowBottom } = this;
  5690. if (!this.usePageScroll && this.fixed) {
  5691. if (windowTop && !pagingStyle.top) {
  5692. pagingStyle.top = windowTop + "px";
  5693. }
  5694. if (windowBottom && !pagingStyle.bottom) {
  5695. pagingStyle.bottom = windowBottom + "px";
  5696. }
  5697. }
  5698. if (this.bgColor.length && !pagingStyle["background"]) {
  5699. pagingStyle["background"] = this.bgColor;
  5700. }
  5701. if (this.height.length && !pagingStyle["height"]) {
  5702. pagingStyle["height"] = this.height;
  5703. }
  5704. if (this.width.length && !pagingStyle["width"]) {
  5705. pagingStyle["width"] = this.width;
  5706. }
  5707. if (this.maxWidth.length && !pagingStyle["max-width"]) {
  5708. pagingStyle["max-width"] = this.maxWidth;
  5709. pagingStyle["margin"] = "0 auto";
  5710. }
  5711. return pagingStyle;
  5712. },
  5713. // 当前z-paging内容的样式
  5714. finalPagingContentStyle() {
  5715. if (this.contentZIndex != 1) {
  5716. this.pagingContentStyle["z-index"] = this.contentZIndex;
  5717. this.pagingContentStyle["position"] = "relative";
  5718. }
  5719. return this.pagingContentStyle;
  5720. },
  5721. // 最终的当前开启安全区域适配后,是否使用placeholder形式实现。如果slot=bottom存在,则应当交由固定在底部的view处理,因此需排除此情况
  5722. finalUseSafeAreaPlaceholder() {
  5723. return this.useSafeAreaPlaceholder && !this.zSlots.bottom;
  5724. },
  5725. renderJsIgnore() {
  5726. if (this.usePageScroll && this.useChatRecordMode || !this.refresherEnabled && this.scrollable || !this.useCustomRefresher) {
  5727. this.$nextTick(() => {
  5728. this.renderPropScrollTop = 10;
  5729. });
  5730. }
  5731. return 0;
  5732. },
  5733. windowHeight() {
  5734. if (!this.systemInfo)
  5735. return 0;
  5736. return this.systemInfo.windowHeight || 0;
  5737. },
  5738. windowBottom() {
  5739. if (!this.systemInfo)
  5740. return 0;
  5741. return this.systemInfo.windowBottom || 0;
  5742. },
  5743. // 是否是ios+h5
  5744. isIosAndH5() {
  5745. return false;
  5746. },
  5747. // 是否是只使用基础布局或者只使用下拉刷新
  5748. isOnly() {
  5749. return this.layoutOnly || this.refresherOnly;
  5750. }
  5751. },
  5752. methods: {
  5753. // 当前版本号
  5754. getVersion() {
  5755. return `z-paging v${c$1.version}`;
  5756. },
  5757. // 设置nvue List的specialEffects
  5758. setSpecialEffects(args) {
  5759. this.setListSpecialEffects(args);
  5760. },
  5761. // 与setSpecialEffects等效,兼容旧版本
  5762. setListSpecialEffects(args) {
  5763. this.nFixFreezing = args && Object.keys(args).length;
  5764. if (this.isIos) {
  5765. this.privateRefresherEnabled = 0;
  5766. }
  5767. !this.usePageScroll && this.$refs["zp-n-list"].setSpecialEffects(args);
  5768. },
  5769. // 当app长时间进入后台后进入前台,因系统内存管理导致app重新加载时,进行一些适配处理
  5770. _handlePageLaunch() {
  5771. if (this.pageLaunched) {
  5772. this.refresherThresholdUpdateTag = 1;
  5773. this.$nextTick(() => {
  5774. this.refresherThresholdUpdateTag = 0;
  5775. });
  5776. this._checkVirtualListScroll();
  5777. }
  5778. this.pageLaunched = true;
  5779. },
  5780. // 使手机发生较短时间的振动(15ms)
  5781. _doVibrateShort() {
  5782. if (this.isIos) {
  5783. const UISelectionFeedbackGenerator = plus.ios.importClass("UISelectionFeedbackGenerator");
  5784. const feedbackGenerator = new UISelectionFeedbackGenerator();
  5785. feedbackGenerator.init();
  5786. setTimeout(() => {
  5787. feedbackGenerator.selectionChanged();
  5788. }, 0);
  5789. } else {
  5790. plus.device.vibrate(15);
  5791. }
  5792. },
  5793. // 设置z-paging高度
  5794. async _setAutoHeight(shouldFullHeight = true, scrollViewNode = null) {
  5795. const heightKey = "min-height";
  5796. try {
  5797. if (shouldFullHeight) {
  5798. let finalScrollViewNode = scrollViewNode || await this._getNodeClientRect(".zp-scroll-view");
  5799. let finalScrollBottomNode = await this._getNodeClientRect(".zp-page-bottom");
  5800. if (finalScrollViewNode) {
  5801. const scrollViewTop = finalScrollViewNode[0].top;
  5802. let scrollViewHeight = this.windowHeight - scrollViewTop;
  5803. scrollViewHeight -= finalScrollBottomNode ? finalScrollBottomNode[0].height : 0;
  5804. const additionHeight = u$1.convertToPx(this.autoHeightAddition);
  5805. let importantSuffix = " !important";
  5806. const finalHeight = scrollViewHeight + additionHeight - (this.insideMore ? 1 : 0) + "px" + importantSuffix;
  5807. this.$set(this.scrollViewStyle, heightKey, finalHeight);
  5808. this.$set(this.scrollViewInStyle, heightKey, finalHeight);
  5809. }
  5810. } else {
  5811. this.$delete(this.scrollViewStyle, heightKey);
  5812. this.$delete(this.scrollViewInStyle, heightKey);
  5813. }
  5814. } catch (e2) {
  5815. }
  5816. },
  5817. // 更新scroll-view高度
  5818. async _updateScrollViewHeight() {
  5819. const scrollViewNode = await this._getNodeClientRect(".zp-scroll-view");
  5820. if (scrollViewNode) {
  5821. const scrollViewNodeHeight = scrollViewNode[0].height;
  5822. this.scrollViewHeight = scrollViewNodeHeight;
  5823. this.pagingOrgTop = scrollViewNode[0].top;
  5824. }
  5825. },
  5826. // 组件销毁后续处理
  5827. _handleUnmounted() {
  5828. this.active = false;
  5829. if (!this.layoutOnly) {
  5830. this._offEmit();
  5831. }
  5832. this.useChatRecordMode && uni.offKeyboardHeightChange(this._handleKeyboardHeightChange);
  5833. },
  5834. // 触发更新是否超出页面状态
  5835. _updateInsideOfPaging() {
  5836. this.insideMore && this.insideOfPaging === true && setTimeout(this.doLoadMore, 200);
  5837. },
  5838. // 清除timeout
  5839. _cleanTimeout(timeout2) {
  5840. if (timeout2) {
  5841. clearTimeout(timeout2);
  5842. timeout2 = null;
  5843. }
  5844. return timeout2;
  5845. },
  5846. // 添加全局emit监听
  5847. _onEmit() {
  5848. uni.$on(c$1.errorUpdateKey, (errorMsg) => {
  5849. if (this.loading) {
  5850. if (!!errorMsg) {
  5851. this.customerEmptyViewErrorText = errorMsg;
  5852. }
  5853. this.complete(false).catch(() => {
  5854. });
  5855. }
  5856. });
  5857. uni.$on(c$1.completeUpdateKey, (data) => {
  5858. setTimeout(() => {
  5859. if (this.loading) {
  5860. if (!this.disabledCompleteEmit) {
  5861. const type2 = data.type || "normal";
  5862. const list = data.list || data;
  5863. const rule = data.rule;
  5864. this.fromCompleteEmit = true;
  5865. switch (type2) {
  5866. case "normal":
  5867. this.complete(list);
  5868. break;
  5869. case "total":
  5870. this.completeByTotal(list, rule);
  5871. break;
  5872. case "nomore":
  5873. this.completeByNoMore(list, rule);
  5874. break;
  5875. case "key":
  5876. this.completeByKey(list, rule);
  5877. break;
  5878. }
  5879. } else {
  5880. this.disabledCompleteEmit = false;
  5881. }
  5882. }
  5883. }, 1);
  5884. });
  5885. },
  5886. // 销毁全局emit和listener监听
  5887. _offEmit() {
  5888. uni.$off(c$1.errorUpdateKey);
  5889. uni.$off(c$1.completeUpdateKey);
  5890. }
  5891. }
  5892. };
  5893. const block0$3 = (Comp) => {
  5894. (Comp.$renderjs || (Comp.$renderjs = [])).push("pagingRenderjs");
  5895. (Comp.$renderjsModules || (Comp.$renderjsModules = {}))["pagingRenderjs"] = "463e3cc3";
  5896. };
  5897. const block1 = (Comp) => {
  5898. (Comp.$wxs || (Comp.$wxs = [])).push("pagingWxs");
  5899. (Comp.$wxsModules || (Comp.$wxsModules = {}))["pagingWxs"] = "42613348";
  5900. };
  5901. function _sfc_render$2e(_ctx, _cache, $props, $setup, $data, $options) {
  5902. const _component_z_paging_refresh = vue.resolveComponent("z-paging-refresh");
  5903. const _component_z_paging_load_more = vue.resolveComponent("z-paging-load-more");
  5904. const _component_z_paging_empty_view = resolveEasycom(vue.resolveDynamicComponent("z-paging-empty-view"), __easycom_0$f);
  5905. return vue.openBlock(), vue.createElementBlock(
  5906. "view",
  5907. {
  5908. class: vue.normalizeClass([{ "z-paging-content": true, "z-paging-content-full": !_ctx.usePageScroll, "z-paging-content-fixed": !_ctx.usePageScroll && _ctx.fixed, "z-paging-content-page": _ctx.usePageScroll, "z-paging-reached-top": _ctx.renderPropScrollTop < 1, "z-paging-use-chat-record-mode": _ctx.useChatRecordMode }, _ctx.pagingClass]),
  5909. style: vue.normalizeStyle([_ctx.finalPagingStyle])
  5910. },
  5911. [
  5912. vue.createCommentVNode(" 二楼view "),
  5913. _ctx.showF2 && _ctx.showRefresherF2 ? (vue.openBlock(), vue.createElementBlock(
  5914. "view",
  5915. {
  5916. key: 0,
  5917. onTouchmove: _cache[0] || (_cache[0] = vue.withModifiers(() => {
  5918. }, ["stop", "prevent"])),
  5919. class: "zp-f2-content",
  5920. style: vue.normalizeStyle([{ "transform": _ctx.f2Transform, "transition": `transform .2s linear`, "height": _ctx.superContentHeight + "px", "z-index": _ctx.f2ZIndex }])
  5921. },
  5922. [
  5923. vue.renderSlot(_ctx.$slots, "f2", {}, void 0, true)
  5924. ],
  5925. 36
  5926. /* STYLE, NEED_HYDRATION */
  5927. )) : vue.createCommentVNode("v-if", true),
  5928. vue.createCommentVNode(" 顶部固定的slot "),
  5929. _ctx.zSlots.top ? (vue.openBlock(), vue.createElementBlock(
  5930. vue.Fragment,
  5931. { key: 1 },
  5932. [
  5933. !_ctx.usePageScroll ? vue.renderSlot(_ctx.$slots, "top", { key: 0 }, void 0, true) : (vue.openBlock(), vue.createElementBlock(
  5934. "view",
  5935. {
  5936. key: 1,
  5937. class: "zp-page-top",
  5938. onTouchmove: _cache[1] || (_cache[1] = vue.withModifiers(() => {
  5939. }, ["stop", "prevent"])),
  5940. style: vue.normalizeStyle([{ "top": `${_ctx.windowTop}px`, "z-index": _ctx.topZIndex }])
  5941. },
  5942. [
  5943. vue.renderSlot(_ctx.$slots, "top", {}, void 0, true)
  5944. ],
  5945. 36
  5946. /* STYLE, NEED_HYDRATION */
  5947. ))
  5948. ],
  5949. 64
  5950. /* STABLE_FRAGMENT */
  5951. )) : vue.createCommentVNode("v-if", true),
  5952. vue.createElementVNode(
  5953. "view",
  5954. {
  5955. class: vue.normalizeClass({ "zp-view-super": true, "zp-scroll-view-super": !_ctx.usePageScroll }),
  5956. style: vue.normalizeStyle([_ctx.finalScrollViewStyle])
  5957. },
  5958. [
  5959. _ctx.zSlots.left ? (vue.openBlock(), vue.createElementBlock(
  5960. "view",
  5961. {
  5962. key: 0,
  5963. class: vue.normalizeClass({ "zp-page-left": true, "zp-absoulte": _ctx.finalIsOldWebView })
  5964. },
  5965. [
  5966. vue.renderSlot(_ctx.$slots, "left", {}, void 0, true)
  5967. ],
  5968. 2
  5969. /* CLASS */
  5970. )) : vue.createCommentVNode("v-if", true),
  5971. vue.createElementVNode(
  5972. "view",
  5973. {
  5974. class: vue.normalizeClass({ "zp-scroll-view-container": true, "zp-absoulte": _ctx.finalIsOldWebView }),
  5975. style: vue.normalizeStyle([_ctx.scrollViewContainerStyle])
  5976. },
  5977. [
  5978. vue.createElementVNode("scroll-view", {
  5979. ref: "zp-scroll-view",
  5980. class: vue.normalizeClass({ "zp-scroll-view": true, "zp-scroll-view-absolute": !_ctx.usePageScroll, "zp-scroll-view-hide-scrollbar": !_ctx.showScrollbar }),
  5981. style: vue.normalizeStyle([_ctx.chatRecordRotateStyle]),
  5982. "scroll-top": _ctx.scrollTop,
  5983. "scroll-left": _ctx.scrollLeft,
  5984. "scroll-x": _ctx.scrollX,
  5985. "scroll-y": _ctx.finalScrollable,
  5986. "enable-back-to-top": _ctx.finalEnableBackToTop,
  5987. "show-scrollbar": _ctx.showScrollbar,
  5988. "scroll-with-animation": _ctx.finalScrollWithAnimation,
  5989. "scroll-into-view": _ctx.scrollIntoView,
  5990. "lower-threshold": _ctx.finalLowerThreshold,
  5991. "upper-threshold": 5,
  5992. "refresher-enabled": _ctx.finalRefresherEnabled && !_ctx.useCustomRefresher,
  5993. "refresher-threshold": _ctx.finalRefresherThreshold,
  5994. "refresher-default-style": _ctx.finalRefresherDefaultStyle,
  5995. "refresher-background": _ctx.refresherBackground,
  5996. "refresher-triggered": _ctx.finalRefresherTriggered,
  5997. onScroll: _cache[12] || (_cache[12] = (...args) => _ctx._scroll && _ctx._scroll(...args)),
  5998. onScrolltolower: _cache[13] || (_cache[13] = (...args) => _ctx._onScrollToLower && _ctx._onScrollToLower(...args)),
  5999. onScrolltoupper: _cache[14] || (_cache[14] = (...args) => _ctx._onScrollToUpper && _ctx._onScrollToUpper(...args)),
  6000. onRefresherrestore: _cache[15] || (_cache[15] = (...args) => _ctx._onRestore && _ctx._onRestore(...args)),
  6001. onRefresherrefresh: _cache[16] || (_cache[16] = ($event) => _ctx._onRefresh(true))
  6002. }, [
  6003. vue.createElementVNode(
  6004. "view",
  6005. {
  6006. class: "zp-paging-touch-view",
  6007. onTouchstart: _cache[4] || (_cache[4] = (...args) => _ctx.pagingWxs.touchstart && _ctx.pagingWxs.touchstart(...args)),
  6008. onTouchmove: _cache[5] || (_cache[5] = (...args) => _ctx.pagingWxs.touchmove && _ctx.pagingWxs.touchmove(...args)),
  6009. onTouchend: _cache[6] || (_cache[6] = (...args) => _ctx.pagingWxs.touchend && _ctx.pagingWxs.touchend(...args)),
  6010. onTouchcancel: _cache[7] || (_cache[7] = (...args) => _ctx.pagingWxs.touchend && _ctx.pagingWxs.touchend(...args)),
  6011. onMousedown: _cache[8] || (_cache[8] = (...args) => _ctx.pagingWxs.mousedown && _ctx.pagingWxs.mousedown(...args)),
  6012. onMousemove: _cache[9] || (_cache[9] = (...args) => _ctx.pagingWxs.mousemove && _ctx.pagingWxs.mousemove(...args)),
  6013. onMouseup: _cache[10] || (_cache[10] = (...args) => _ctx.pagingWxs.mouseup && _ctx.pagingWxs.mouseup(...args)),
  6014. onMouseleave: _cache[11] || (_cache[11] = (...args) => _ctx.pagingWxs.mouseleave && _ctx.pagingWxs.mouseleave(...args))
  6015. },
  6016. [
  6017. _ctx.finalRefresherFixedBacHeight > 0 ? (vue.openBlock(), vue.createElementBlock(
  6018. "view",
  6019. {
  6020. key: 0,
  6021. class: "zp-fixed-bac-view",
  6022. style: vue.normalizeStyle([{ "background": _ctx.refresherFixedBackground, "height": `${_ctx.finalRefresherFixedBacHeight}px` }])
  6023. },
  6024. null,
  6025. 4
  6026. /* STYLE */
  6027. )) : vue.createCommentVNode("v-if", true),
  6028. vue.createElementVNode("view", {
  6029. class: "zp-paging-main",
  6030. style: vue.normalizeStyle([_ctx.scrollViewInStyle, { "transform": _ctx.finalRefresherTransform, "transition": _ctx.refresherTransition }]),
  6031. "change:prop": _ctx.pagingWxs.propObserver,
  6032. prop: vue.wp(_ctx.wxsPropType),
  6033. "data-refresherThreshold": _ctx.finalRefresherThreshold,
  6034. "data-refresherF2Enabled": _ctx.refresherF2Enabled,
  6035. "data-refresherF2Threshold": _ctx.finalRefresherF2Threshold,
  6036. "data-isIos": _ctx.isIos,
  6037. "data-loading": _ctx.loading || _ctx.isRefresherInComplete,
  6038. "data-useChatRecordMode": _ctx.useChatRecordMode,
  6039. "data-refresherEnabled": _ctx.finalRefresherEnabled,
  6040. "data-useCustomRefresher": _ctx.useCustomRefresher,
  6041. "data-pageScrollTop": _ctx.wxsPageScrollTop,
  6042. "data-scrollTop": _ctx.wxsScrollTop,
  6043. "data-refresherMaxAngle": _ctx.refresherMaxAngle,
  6044. "data-refresherNoTransform": _ctx.refresherNoTransform,
  6045. "data-refresherAecc": _ctx.refresherAngleEnableChangeContinued,
  6046. "data-usePageScroll": _ctx.usePageScroll,
  6047. "data-watchTouchDirectionChange": _ctx.watchTouchDirectionChange,
  6048. "data-oldIsTouchmoving": _ctx.isTouchmoving,
  6049. "data-refresherOutRate": _ctx.finalRefresherOutRate,
  6050. "data-refresherPullRate": _ctx.finalRefresherPullRate,
  6051. "data-hasTouchmove": _ctx.hasTouchmove,
  6052. "change:renderPropIsIosAndH5": _ctx.pagingRenderjs.renderPropIsIosAndH5Change,
  6053. renderPropIsIosAndH5: vue.wp(_ctx.isIosAndH5)
  6054. }, [
  6055. _ctx.showRefresher ? (vue.openBlock(), vue.createElementBlock(
  6056. "view",
  6057. {
  6058. key: 0,
  6059. class: "zp-custom-refresher-view",
  6060. style: vue.normalizeStyle([{ "margin-top": `-${_ctx.finalRefresherThreshold + _ctx.refresherThresholdUpdateTag}px`, "background": _ctx.refresherBackground, "opacity": _ctx.isTouchmoving ? 1 : 0 }])
  6061. },
  6062. [
  6063. vue.createElementVNode(
  6064. "view",
  6065. {
  6066. class: "zp-custom-refresher-container",
  6067. style: vue.normalizeStyle([{ "height": `${_ctx.finalRefresherThreshold}px`, "background": _ctx.refresherBackground }])
  6068. },
  6069. [
  6070. _ctx.useRefresherStatusBarPlaceholder ? (vue.openBlock(), vue.createElementBlock(
  6071. "view",
  6072. {
  6073. key: 0,
  6074. class: "zp-custom-refresher-status-bar-placeholder",
  6075. style: vue.normalizeStyle([{ "height": `${_ctx.statusBarHeight}px` }])
  6076. },
  6077. null,
  6078. 4
  6079. /* STYLE */
  6080. )) : vue.createCommentVNode("v-if", true),
  6081. vue.createCommentVNode(" 下拉刷新view "),
  6082. vue.createElementVNode("view", { class: "zp-custom-refresher-slot-view" }, [
  6083. !(_ctx.zSlots.refresherComplete && _ctx.refresherStatus === _ctx.R.Complete) && !(_ctx.zSlots.refresherF2 && _ctx.refresherStatus === _ctx.R.GoF2) ? vue.renderSlot(_ctx.$slots, "refresher", {
  6084. key: 0,
  6085. refresherStatus: _ctx.refresherStatus
  6086. }, void 0, true) : vue.createCommentVNode("v-if", true)
  6087. ]),
  6088. _ctx.zSlots.refresherComplete && _ctx.refresherStatus === _ctx.R.Complete ? vue.renderSlot(_ctx.$slots, "refresherComplete", { key: 1 }, void 0, true) : _ctx.zSlots.refresherF2 && _ctx.refresherStatus === _ctx.R.GoF2 ? vue.renderSlot(_ctx.$slots, "refresherF2", { key: 2 }, void 0, true) : !_ctx.showCustomRefresher ? (vue.openBlock(), vue.createBlock(_component_z_paging_refresh, {
  6089. key: 3,
  6090. ref: "refresh",
  6091. class: "zp-custom-refresher-refresh",
  6092. style: vue.normalizeStyle([{ "height": `${_ctx.finalRefresherThreshold - _ctx.finalRefresherThresholdPlaceholder}px` }]),
  6093. status: _ctx.refresherStatus,
  6094. defaultThemeStyle: _ctx.finalRefresherThemeStyle,
  6095. defaultText: _ctx.finalRefresherDefaultText,
  6096. isIos: _ctx.isIos,
  6097. pullingText: _ctx.finalRefresherPullingText,
  6098. refreshingText: _ctx.finalRefresherRefreshingText,
  6099. completeText: _ctx.finalRefresherCompleteText,
  6100. goF2Text: _ctx.finalRefresherGoF2Text,
  6101. defaultImg: _ctx.refresherDefaultImg,
  6102. pullingImg: _ctx.refresherPullingImg,
  6103. refreshingImg: _ctx.refresherRefreshingImg,
  6104. completeImg: _ctx.refresherCompleteImg,
  6105. refreshingAnimated: _ctx.refresherRefreshingAnimated,
  6106. showUpdateTime: _ctx.showRefresherUpdateTime,
  6107. updateTimeKey: _ctx.refresherUpdateTimeKey,
  6108. updateTimeTextMap: _ctx.finalRefresherUpdateTimeTextMap,
  6109. imgStyle: _ctx.refresherImgStyle,
  6110. titleStyle: _ctx.refresherTitleStyle,
  6111. updateTimeStyle: _ctx.refresherUpdateTimeStyle,
  6112. unit: _ctx.unit
  6113. }, null, 8, ["style", "status", "defaultThemeStyle", "defaultText", "isIos", "pullingText", "refreshingText", "completeText", "goF2Text", "defaultImg", "pullingImg", "refreshingImg", "completeImg", "refreshingAnimated", "showUpdateTime", "updateTimeKey", "updateTimeTextMap", "imgStyle", "titleStyle", "updateTimeStyle", "unit"])) : vue.createCommentVNode("v-if", true)
  6114. ],
  6115. 4
  6116. /* STYLE */
  6117. )
  6118. ],
  6119. 4
  6120. /* STYLE */
  6121. )) : vue.createCommentVNode("v-if", true),
  6122. vue.createElementVNode(
  6123. "view",
  6124. {
  6125. class: "zp-paging-container",
  6126. style: vue.normalizeStyle([{ justifyContent: _ctx.useChatRecordMode ? "flex-end" : "flex-start" }])
  6127. },
  6128. [
  6129. vue.createCommentVNode(" 全屏Loading "),
  6130. _ctx.showLoading && _ctx.zSlots.loading && !_ctx.loadingFullFixed ? vue.renderSlot(_ctx.$slots, "loading", { key: 0 }, void 0, true) : vue.createCommentVNode("v-if", true),
  6131. vue.createCommentVNode(" 主体内容 "),
  6132. vue.createElementVNode(
  6133. "view",
  6134. {
  6135. class: "zp-paging-container-content",
  6136. style: vue.normalizeStyle([_ctx.finalPlaceholderTopHeightStyle, _ctx.finalPagingContentStyle])
  6137. },
  6138. [
  6139. vue.createCommentVNode(" 虚拟列表顶部占位view "),
  6140. _ctx.useVirtualList ? (vue.openBlock(), vue.createElementBlock(
  6141. "view",
  6142. {
  6143. key: 0,
  6144. class: "zp-virtual-placeholder",
  6145. style: vue.normalizeStyle([{ height: _ctx.virtualPlaceholderTopHeight + "px" }])
  6146. },
  6147. null,
  6148. 4
  6149. /* STYLE */
  6150. )) : vue.createCommentVNode("v-if", true),
  6151. vue.renderSlot(_ctx.$slots, "default", {}, void 0, true),
  6152. vue.createCommentVNode(" 内置列表&虚拟列表 "),
  6153. _ctx.finalUseInnerList ? (vue.openBlock(), vue.createElementBlock(
  6154. vue.Fragment,
  6155. { key: 1 },
  6156. [
  6157. vue.renderSlot(_ctx.$slots, "header", {}, void 0, true),
  6158. vue.createElementVNode(
  6159. "view",
  6160. {
  6161. class: "zp-list-container",
  6162. style: vue.normalizeStyle([_ctx.innerListStyle])
  6163. },
  6164. [
  6165. _ctx.finalUseVirtualList ? (vue.openBlock(true), vue.createElementBlock(
  6166. vue.Fragment,
  6167. { key: 0 },
  6168. vue.renderList(_ctx.virtualList, (item, index2) => {
  6169. return vue.openBlock(), vue.createElementBlock("view", {
  6170. class: "zp-list-cell",
  6171. style: vue.normalizeStyle([_ctx.innerCellStyle]),
  6172. id: `${_ctx.fianlVirtualCellIdPrefix}-${item[_ctx.virtualCellIndexKey]}`,
  6173. key: item["zp_unique_index"],
  6174. onClick: ($event) => _ctx._innerCellClick(item, _ctx.virtualTopRangeIndex + index2)
  6175. }, [
  6176. _ctx.useCompatibilityMode ? (vue.openBlock(), vue.createElementBlock("view", { key: 0 }, "使用兼容模式请在组件源码z-paging.vue第105行中注释这一行,并打开下面一行注释")) : (vue.openBlock(), vue.createElementBlock(
  6177. vue.Fragment,
  6178. { key: 1 },
  6179. [
  6180. vue.createCommentVNode(' <zp-public-virtual-cell v-if="useCompatibilityMode" :extraData="extraData" :item="item" :index="virtualTopRangeIndex+index" /> '),
  6181. vue.renderSlot(_ctx.$slots, "cell", {
  6182. item,
  6183. index: _ctx.virtualTopRangeIndex + index2
  6184. }, void 0, true)
  6185. ],
  6186. 2112
  6187. /* STABLE_FRAGMENT, DEV_ROOT_FRAGMENT */
  6188. ))
  6189. ], 12, ["id", "onClick"]);
  6190. }),
  6191. 128
  6192. /* KEYED_FRAGMENT */
  6193. )) : (vue.openBlock(true), vue.createElementBlock(
  6194. vue.Fragment,
  6195. { key: 1 },
  6196. vue.renderList(_ctx.realTotalData, (item, index2) => {
  6197. return vue.openBlock(), vue.createElementBlock("view", {
  6198. class: "zp-list-cell",
  6199. key: index2,
  6200. onClick: ($event) => _ctx._innerCellClick(item, index2)
  6201. }, [
  6202. vue.renderSlot(_ctx.$slots, "cell", {
  6203. item,
  6204. index: index2
  6205. }, void 0, true)
  6206. ], 8, ["onClick"]);
  6207. }),
  6208. 128
  6209. /* KEYED_FRAGMENT */
  6210. ))
  6211. ],
  6212. 4
  6213. /* STYLE */
  6214. ),
  6215. vue.renderSlot(_ctx.$slots, "footer", {}, void 0, true)
  6216. ],
  6217. 64
  6218. /* STABLE_FRAGMENT */
  6219. )) : vue.createCommentVNode("v-if", true),
  6220. vue.createCommentVNode(" 聊天记录模式加载更多loading "),
  6221. _ctx.useChatRecordMode && _ctx.realTotalData.length >= _ctx.defaultPageSize && (_ctx.loadingStatus !== _ctx.M.NoMore || _ctx.zSlots.chatNoMore) && (_ctx.realTotalData.length || _ctx.showChatLoadingWhenReload && _ctx.showLoading) && !_ctx.isFirstPageAndNoMore ? (vue.openBlock(), vue.createElementBlock(
  6222. "view",
  6223. {
  6224. key: 2,
  6225. style: vue.normalizeStyle([_ctx.chatRecordRotateStyle])
  6226. },
  6227. [
  6228. _ctx.loadingStatus === _ctx.M.NoMore && _ctx.zSlots.chatNoMore ? vue.renderSlot(_ctx.$slots, "chatNoMore", { key: 0 }, void 0, true) : (vue.openBlock(), vue.createElementBlock(
  6229. vue.Fragment,
  6230. { key: 1 },
  6231. [
  6232. _ctx.zSlots.chatLoading ? vue.renderSlot(_ctx.$slots, "chatLoading", {
  6233. key: 0,
  6234. loadingMoreStatus: _ctx.loadingStatus
  6235. }, void 0, true) : (vue.openBlock(), vue.createBlock(_component_z_paging_load_more, {
  6236. key: 1,
  6237. onDoClick: _cache[2] || (_cache[2] = ($event) => _ctx._onLoadingMore("click")),
  6238. zConfig: _ctx.zLoadMoreConfig
  6239. }, null, 8, ["zConfig"]))
  6240. ],
  6241. 64
  6242. /* STABLE_FRAGMENT */
  6243. ))
  6244. ],
  6245. 4
  6246. /* STYLE */
  6247. )) : vue.createCommentVNode("v-if", true),
  6248. vue.createCommentVNode(" 虚拟列表底部占位view "),
  6249. _ctx.useVirtualList ? (vue.openBlock(), vue.createElementBlock(
  6250. "view",
  6251. {
  6252. key: 3,
  6253. class: "zp-virtual-placeholder",
  6254. style: vue.normalizeStyle([{ height: _ctx.virtualPlaceholderBottomHeight + "px" }])
  6255. },
  6256. null,
  6257. 4
  6258. /* STYLE */
  6259. )) : vue.createCommentVNode("v-if", true),
  6260. vue.createCommentVNode(" 上拉加载更多view "),
  6261. _ctx.showLoadingMoreDefault ? vue.renderSlot(_ctx.$slots, "loadingMoreDefault", { key: 4 }, void 0, true) : _ctx.showLoadingMoreLoading ? vue.renderSlot(_ctx.$slots, "loadingMoreLoading", { key: 5 }, void 0, true) : _ctx.showLoadingMoreNoMore ? vue.renderSlot(_ctx.$slots, "loadingMoreNoMore", { key: 6 }, void 0, true) : _ctx.showLoadingMoreFail ? vue.renderSlot(_ctx.$slots, "loadingMoreFail", { key: 7 }, void 0, true) : _ctx.showLoadingMoreCustom ? (vue.openBlock(), vue.createBlock(_component_z_paging_load_more, {
  6262. key: 8,
  6263. onDoClick: _cache[3] || (_cache[3] = ($event) => _ctx._onLoadingMore("click")),
  6264. zConfig: _ctx.zLoadMoreConfig
  6265. }, null, 8, ["zConfig"])) : vue.createCommentVNode("v-if", true),
  6266. vue.createCommentVNode(" 底部安全区域useSafeAreaPlaceholder模式占位,此时占位不再固定在底部而是跟随页面一起滚动 "),
  6267. vue.createCommentVNode(" 如果底部slot=bottom存在,占位区域会插入在slot=bottom下方,不再跟随页面滚动,因此这里就没必要显示了 "),
  6268. vue.createCommentVNode(" 聊天记录模式因为列表倒置,此处不需要显示底部安全区域,另行处理 "),
  6269. _ctx.safeAreaInsetBottom && _ctx.finalUseSafeAreaPlaceholder && !_ctx.useChatRecordMode ? (vue.openBlock(), vue.createElementBlock(
  6270. "view",
  6271. {
  6272. key: 9,
  6273. class: "zp-safe-area-placeholder",
  6274. style: vue.normalizeStyle([{ height: _ctx.safeAreaBottom + "px" }])
  6275. },
  6276. null,
  6277. 4
  6278. /* STYLE */
  6279. )) : vue.createCommentVNode("v-if", true)
  6280. ],
  6281. 4
  6282. /* STYLE */
  6283. ),
  6284. vue.createCommentVNode(" 空数据图 "),
  6285. _ctx.showEmpty ? (vue.openBlock(), vue.createElementBlock(
  6286. "view",
  6287. {
  6288. key: 1,
  6289. class: vue.normalizeClass({ "zp-empty-view": true, "zp-empty-view-center": _ctx.emptyViewCenter }),
  6290. style: vue.normalizeStyle([_ctx.emptyViewSuperStyle, _ctx.chatRecordRotateStyle])
  6291. },
  6292. [
  6293. _ctx.zSlots.empty ? vue.renderSlot(_ctx.$slots, "empty", {
  6294. key: 0,
  6295. isLoadFailed: _ctx.isLoadFailed
  6296. }, void 0, true) : (vue.openBlock(), vue.createBlock(_component_z_paging_empty_view, {
  6297. key: 1,
  6298. emptyViewImg: _ctx.finalEmptyViewImg,
  6299. emptyViewText: _ctx.finalEmptyViewText,
  6300. showEmptyViewReload: _ctx.finalShowEmptyViewReload,
  6301. emptyViewReloadText: _ctx.finalEmptyViewReloadText,
  6302. isLoadFailed: _ctx.isLoadFailed,
  6303. emptyViewStyle: _ctx.emptyViewStyle,
  6304. emptyViewTitleStyle: _ctx.emptyViewTitleStyle,
  6305. emptyViewImgStyle: _ctx.emptyViewImgStyle,
  6306. emptyViewReloadStyle: _ctx.emptyViewReloadStyle,
  6307. emptyViewZIndex: _ctx.emptyViewZIndex,
  6308. emptyViewFixed: _ctx.emptyViewFixed,
  6309. unit: _ctx.unit,
  6310. onReload: _ctx._emptyViewReload,
  6311. onViewClick: _ctx._emptyViewClick
  6312. }, null, 8, ["emptyViewImg", "emptyViewText", "showEmptyViewReload", "emptyViewReloadText", "isLoadFailed", "emptyViewStyle", "emptyViewTitleStyle", "emptyViewImgStyle", "emptyViewReloadStyle", "emptyViewZIndex", "emptyViewFixed", "unit", "onReload", "onViewClick"]))
  6313. ],
  6314. 6
  6315. /* CLASS, STYLE */
  6316. )) : vue.createCommentVNode("v-if", true)
  6317. ],
  6318. 4
  6319. /* STYLE */
  6320. )
  6321. ], 12, ["change:prop", "prop", "data-refresherThreshold", "data-refresherF2Enabled", "data-refresherF2Threshold", "data-isIos", "data-loading", "data-useChatRecordMode", "data-refresherEnabled", "data-useCustomRefresher", "data-pageScrollTop", "data-scrollTop", "data-refresherMaxAngle", "data-refresherNoTransform", "data-refresherAecc", "data-usePageScroll", "data-watchTouchDirectionChange", "data-oldIsTouchmoving", "data-refresherOutRate", "data-refresherPullRate", "data-hasTouchmove", "change:renderPropIsIosAndH5", "renderPropIsIosAndH5"])
  6322. ],
  6323. 32
  6324. /* NEED_HYDRATION */
  6325. )
  6326. ], 46, ["scroll-top", "scroll-left", "scroll-x", "scroll-y", "enable-back-to-top", "show-scrollbar", "scroll-with-animation", "scroll-into-view", "lower-threshold", "refresher-enabled", "refresher-threshold", "refresher-default-style", "refresher-background", "refresher-triggered"])
  6327. ],
  6328. 6
  6329. /* CLASS, STYLE */
  6330. ),
  6331. _ctx.zSlots.right ? (vue.openBlock(), vue.createElementBlock(
  6332. "view",
  6333. {
  6334. key: 1,
  6335. class: vue.normalizeClass({ "zp-page-right": true, "zp-absoulte zp-right": _ctx.finalIsOldWebView })
  6336. },
  6337. [
  6338. vue.renderSlot(_ctx.$slots, "right", {}, void 0, true)
  6339. ],
  6340. 2
  6341. /* CLASS */
  6342. )) : vue.createCommentVNode("v-if", true)
  6343. ],
  6344. 6
  6345. /* CLASS, STYLE */
  6346. ),
  6347. vue.createCommentVNode(" 底部固定的slot "),
  6348. vue.createElementVNode(
  6349. "view",
  6350. {
  6351. class: "zp-page-bottom-container",
  6352. style: vue.normalizeStyle({ "background": _ctx.bottomBgColor })
  6353. },
  6354. [
  6355. _ctx.zSlots.bottom ? (vue.openBlock(), vue.createElementBlock(
  6356. vue.Fragment,
  6357. { key: 0 },
  6358. [
  6359. vue.createCommentVNode(" 非页面滚动底部插槽(父容器开启flex,中间列表设置了flex:1,通过中间列表撑开固定在底部) "),
  6360. !_ctx.usePageScroll ? vue.renderSlot(_ctx.$slots, "bottom", { key: 0 }, void 0, true) : (vue.openBlock(), vue.createElementBlock(
  6361. vue.Fragment,
  6362. { key: 1 },
  6363. [
  6364. vue.createCommentVNode(" 页面滚动底部插槽(通过position: fixed固定在底部) "),
  6365. vue.createElementVNode(
  6366. "view",
  6367. {
  6368. class: "zp-page-bottom",
  6369. onTouchmove: _cache[17] || (_cache[17] = vue.withModifiers(() => {
  6370. }, ["stop", "prevent"])),
  6371. style: vue.normalizeStyle([{ "bottom": `${_ctx.windowBottom}px`, "background": _ctx.bottomBgColor }])
  6372. },
  6373. [
  6374. vue.renderSlot(_ctx.$slots, "bottom", {}, void 0, true),
  6375. vue.createCommentVNode(" 页面滚动底部安全区域占位(仅slot=bottom存在时展示在slot=bottom插入的view下方,当slot=bottom不存在时,通过控制容器的marginBottom设置底部安全区域间距) "),
  6376. _ctx.safeAreaInsetBottom ? (vue.openBlock(), vue.createElementBlock(
  6377. "view",
  6378. {
  6379. key: 0,
  6380. style: vue.normalizeStyle([{ height: _ctx.safeAreaBottom + "px" }])
  6381. },
  6382. null,
  6383. 4
  6384. /* STYLE */
  6385. )) : vue.createCommentVNode("v-if", true)
  6386. ],
  6387. 36
  6388. /* STYLE, NEED_HYDRATION */
  6389. )
  6390. ],
  6391. 2112
  6392. /* STABLE_FRAGMENT, DEV_ROOT_FRAGMENT */
  6393. ))
  6394. ],
  6395. 64
  6396. /* STABLE_FRAGMENT */
  6397. )) : vue.createCommentVNode("v-if", true),
  6398. vue.createCommentVNode(" 非页面滚动底部安全区域占位(无论slot=bottom是否存在)"),
  6399. vue.createCommentVNode(" 如果useSafeAreaPlaceholder开启了并且slot=bottom不存在就不显示这个占位view了,因为此时useSafeAreaPlaceholder会是跟随滚动的状态 "),
  6400. vue.createCommentVNode(" 聊天记录模式因为列表倒置,此处不需要显示底部安全区域,另行处理 "),
  6401. _ctx.safeAreaInsetBottom && !_ctx.usePageScroll && !_ctx.finalUseSafeAreaPlaceholder && !_ctx.useChatRecordMode ? (vue.openBlock(), vue.createElementBlock(
  6402. "view",
  6403. {
  6404. key: 1,
  6405. style: vue.normalizeStyle([{ height: _ctx.safeAreaBottom + "px" }])
  6406. },
  6407. null,
  6408. 4
  6409. /* STYLE */
  6410. )) : vue.createCommentVNode("v-if", true),
  6411. vue.createCommentVNode(" 聊天记录模式底部占位 "),
  6412. _ctx.useChatRecordMode && _ctx.autoAdjustPositionWhenChat ? (vue.openBlock(), vue.createElementBlock(
  6413. vue.Fragment,
  6414. { key: 2 },
  6415. [
  6416. vue.createElementVNode(
  6417. "view",
  6418. {
  6419. style: vue.normalizeStyle([{ height: _ctx.chatRecordModeSafeAreaBottom + "px" }])
  6420. },
  6421. null,
  6422. 4
  6423. /* STYLE */
  6424. ),
  6425. vue.createElementVNode(
  6426. "view",
  6427. {
  6428. class: "zp-page-bottom-keyboard-placeholder-animate",
  6429. style: vue.normalizeStyle([{ height: _ctx.keyboardHeight + "px" }])
  6430. },
  6431. null,
  6432. 4
  6433. /* STYLE */
  6434. )
  6435. ],
  6436. 64
  6437. /* STABLE_FRAGMENT */
  6438. )) : vue.createCommentVNode("v-if", true)
  6439. ],
  6440. 4
  6441. /* STYLE */
  6442. ),
  6443. vue.createCommentVNode(" 点击返回顶部view "),
  6444. _ctx.showBackToTopClass ? (vue.openBlock(), vue.createElementBlock(
  6445. "view",
  6446. {
  6447. key: 2,
  6448. class: vue.normalizeClass(_ctx.finalBackToTopClass),
  6449. style: vue.normalizeStyle([_ctx.finalBackToTopStyle]),
  6450. onClick: _cache[18] || (_cache[18] = vue.withModifiers((...args) => _ctx._backToTopClick && _ctx._backToTopClick(...args), ["stop"]))
  6451. },
  6452. [
  6453. _ctx.zSlots.backToTop ? vue.renderSlot(_ctx.$slots, "backToTop", { key: 0 }, void 0, true) : (vue.openBlock(), vue.createElementBlock("image", {
  6454. key: 1,
  6455. class: vue.normalizeClass(["zp-back-to-top-img", { "zp-back-to-top-img-inversion": _ctx.useChatRecordMode && !_ctx.backToTopImg.length }]),
  6456. src: _ctx.backToTopImg.length ? _ctx.backToTopImg : _ctx.base64BackToTop
  6457. }, null, 10, ["src"]))
  6458. ],
  6459. 6
  6460. /* CLASS, STYLE */
  6461. )) : vue.createCommentVNode("v-if", true),
  6462. vue.createCommentVNode(" 全屏Loading(铺满z-paging并固定) "),
  6463. _ctx.showLoading && _ctx.zSlots.loading && _ctx.loadingFullFixed ? (vue.openBlock(), vue.createElementBlock("view", {
  6464. key: 3,
  6465. class: "zp-loading-fixed"
  6466. }, [
  6467. vue.renderSlot(_ctx.$slots, "loading", {}, void 0, true)
  6468. ])) : vue.createCommentVNode("v-if", true)
  6469. ],
  6470. 6
  6471. /* CLASS, STYLE */
  6472. );
  6473. }
  6474. if (typeof block0$3 === "function")
  6475. block0$3(_sfc_main$2f);
  6476. if (typeof block1 === "function")
  6477. block1(_sfc_main$2f);
  6478. const __easycom_1$5 = /* @__PURE__ */ _export_sfc(_sfc_main$2f, [["render", _sfc_render$2e], ["__scopeId", "data-v-1aa372d7"], ["__file", "C:/Users/EDY/Desktop/项目/shuibei/uni_modules/z-paging/components/z-paging/z-paging.vue"]]);
  6479. function useZPaging(paging) {
  6480. const cPaging = !!paging ? paging.value || paging : null;
  6481. onPullDownRefresh(() => {
  6482. if (!cPaging || !cPaging.value)
  6483. return;
  6484. cPaging.value.reload().catch(() => {
  6485. });
  6486. });
  6487. onPageScroll((e2) => {
  6488. if (!cPaging || !cPaging.value)
  6489. return;
  6490. cPaging.value.updatePageScrollTop(e2.scrollTop);
  6491. e2.scrollTop < 10 && cPaging.value.doChatRecordLoadMore();
  6492. });
  6493. onReachBottom(() => {
  6494. if (!cPaging || !cPaging.value)
  6495. return;
  6496. cPaging.value.pageReachBottom();
  6497. });
  6498. }
  6499. const _sfc_main$2e = {
  6500. props: {
  6501. modelValue: {
  6502. type: [String, Number],
  6503. default: ""
  6504. },
  6505. title: {
  6506. type: String,
  6507. default: ""
  6508. },
  6509. description: {
  6510. type: String,
  6511. default: ""
  6512. },
  6513. options: {
  6514. type: Array,
  6515. default: () => {
  6516. return [];
  6517. }
  6518. },
  6519. valueKey: {
  6520. type: String,
  6521. default: "value"
  6522. },
  6523. labelKey: {
  6524. type: String,
  6525. default: "name"
  6526. }
  6527. },
  6528. data() {
  6529. return {
  6530. show: false,
  6531. current: ""
  6532. };
  6533. },
  6534. created() {
  6535. if (this.modelValue) {
  6536. this.options.forEach((ele) => {
  6537. if (ele[this.valueKey] == this.modelValue) {
  6538. this.current = ele[this.labelKey];
  6539. }
  6540. });
  6541. }
  6542. },
  6543. emits: ["update:modelValue"],
  6544. watch: {
  6545. modelValue() {
  6546. this.options.forEach((ele) => {
  6547. if (ele[this.valueKey] == this.modelValue) {
  6548. this.current = ele[this.labelKey];
  6549. }
  6550. });
  6551. }
  6552. },
  6553. methods: {
  6554. hideKeyboard() {
  6555. uni.hideKeyboard();
  6556. },
  6557. select(e2) {
  6558. this.$emit("update:modelValue", e2[this.valueKey]);
  6559. this.current = e2[this.labelKey];
  6560. }
  6561. }
  6562. };
  6563. function _sfc_render$2d(_ctx, _cache, $props, $setup, $data, $options) {
  6564. const _component_up_input = vue.resolveComponent("up-input");
  6565. const _component_up_action_sheet = vue.resolveComponent("up-action-sheet");
  6566. return vue.openBlock(), vue.createElementBlock("view", { class: "u-action-sheet-data" }, [
  6567. vue.createElementVNode("view", { class: "u-action-sheet-data__trigger" }, [
  6568. vue.renderSlot(_ctx.$slots, "trigger", {}, void 0, true),
  6569. !_ctx.$slots["trigger"] ? (vue.openBlock(), vue.createBlock(_component_up_input, {
  6570. key: 0,
  6571. modelValue: $data.current,
  6572. disabled: "",
  6573. disabledColor: "#ffffff",
  6574. placeholder: $props.title,
  6575. border: "none"
  6576. }, null, 8, ["modelValue", "placeholder"])) : vue.createCommentVNode("v-if", true),
  6577. vue.createElementVNode("view", {
  6578. onClick: _cache[0] || (_cache[0] = ($event) => $data.show = true),
  6579. class: "u-action-sheet-data__trigger__cover"
  6580. })
  6581. ]),
  6582. vue.createVNode(_component_up_action_sheet, {
  6583. show: $data.show,
  6584. actions: $props.options,
  6585. title: $props.title,
  6586. safeAreaInsetBottom: "",
  6587. description: $props.description,
  6588. onClose: _cache[1] || (_cache[1] = ($event) => $data.show = false),
  6589. onSelect: $options.select
  6590. }, null, 8, ["show", "actions", "title", "description", "onSelect"])
  6591. ]);
  6592. }
  6593. const uActionSheetData = /* @__PURE__ */ _export_sfc(_sfc_main$2e, [["render", _sfc_render$2d], ["__scopeId", "data-v-2ac4c00c"], ["__file", "C:/Users/EDY/Desktop/项目/shuibei/uni_modules/uview-plus/components/u-action-sheet-data/u-action-sheet-data.vue"]]);
  6594. const __vite_glob_0_0 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
  6595. __proto__: null,
  6596. default: uActionSheetData
  6597. }, Symbol.toStringTag, { value: "Module" }));
  6598. const defineMixin = (options2) => {
  6599. return options2;
  6600. };
  6601. const version = "3";
  6602. {
  6603. formatAppLog("log", "at uni_modules/uview-plus/libs/config/config.js:5", `
  6604. %c uview-plus V${version} %c https://ijry.github.io/uview-plus/
  6605. `, "color: #ffffff; background: #3c9cff; padding:5px 0;", "color: #3c9cff;background: #ffffff; padding:5px 0;");
  6606. }
  6607. const config$1 = {
  6608. v: version,
  6609. version,
  6610. // 主题名称
  6611. type: [
  6612. "primary",
  6613. "success",
  6614. "info",
  6615. "error",
  6616. "warning"
  6617. ],
  6618. // 颜色部分,本来可以通过scss的:export导出供js使用,但是奈何nvue不支持
  6619. color: {
  6620. "u-primary": "#2979ff",
  6621. "u-warning": "#ff9900",
  6622. "u-success": "#19be6b",
  6623. "u-error": "#fa3534",
  6624. "u-info": "#909399",
  6625. "u-main-color": "#303133",
  6626. "u-content-color": "#606266",
  6627. "u-tips-color": "#909399",
  6628. "u-light-color": "#c0c4cc",
  6629. "up-primary": "#2979ff",
  6630. "up-warning": "#ff9900",
  6631. "up-success": "#19be6b",
  6632. "up-error": "#fa3534",
  6633. "up-info": "#909399",
  6634. "up-main-color": "#303133",
  6635. "up-content-color": "#606266",
  6636. "up-tips-color": "#909399",
  6637. "up-light-color": "#c0c4cc"
  6638. },
  6639. // 字体图标地址
  6640. iconUrl: "https://at.alicdn.com/t/font_2225171_8kdcwk4po24.ttf",
  6641. // 自定义图标
  6642. customIcon: {
  6643. family: "",
  6644. url: ""
  6645. },
  6646. customIcons: {},
  6647. // 自定义图标与unicode对应关系
  6648. // 默认单位,可以通过配置为rpx,那么在用于传入组件大小参数为数值时,就默认为rpx
  6649. unit: "px",
  6650. // 拦截器
  6651. interceptor: {
  6652. navbarLeftClick: null
  6653. },
  6654. // 只加载一次字体
  6655. loadFontOnce: false
  6656. };
  6657. const zIndex = {
  6658. toast: 10090,
  6659. noNetwork: 10080,
  6660. // popup包含popup,actionsheet,keyboard,picker的值
  6661. popup: 10075,
  6662. mask: 10070,
  6663. navbar: 980,
  6664. topTips: 975,
  6665. sticky: 970,
  6666. indexListSticky: 965
  6667. };
  6668. const color$3 = {
  6669. primary: "#3c9cff",
  6670. info: "#909399",
  6671. default: "#909399",
  6672. warning: "#f9ae3d",
  6673. error: "#f56c6c",
  6674. success: "#5ac725",
  6675. mainColor: "#303133",
  6676. contentColor: "#606266",
  6677. tipsColor: "#909399",
  6678. lightColor: "#c0c4cc",
  6679. borderColor: "#e4e7ed"
  6680. };
  6681. const { toString } = Object.prototype;
  6682. function isArray(val) {
  6683. return toString.call(val) === "[object Array]";
  6684. }
  6685. function isObject(val) {
  6686. return val !== null && typeof val === "object";
  6687. }
  6688. function isDate(val) {
  6689. return toString.call(val) === "[object Date]";
  6690. }
  6691. function isURLSearchParams(val) {
  6692. return typeof URLSearchParams !== "undefined" && val instanceof URLSearchParams;
  6693. }
  6694. function forEach(obj, fn) {
  6695. if (obj === null || typeof obj === "undefined") {
  6696. return;
  6697. }
  6698. if (typeof obj !== "object") {
  6699. obj = [obj];
  6700. }
  6701. if (isArray(obj)) {
  6702. for (let i2 = 0, l2 = obj.length; i2 < l2; i2++) {
  6703. fn.call(null, obj[i2], i2, obj);
  6704. }
  6705. } else {
  6706. for (const key in obj) {
  6707. if (Object.prototype.hasOwnProperty.call(obj, key)) {
  6708. fn.call(null, obj[key], key, obj);
  6709. }
  6710. }
  6711. }
  6712. }
  6713. function isPlainObject(obj) {
  6714. return Object.prototype.toString.call(obj) === "[object Object]";
  6715. }
  6716. function deepMerge$2() {
  6717. const result = {};
  6718. function assignValue(val, key) {
  6719. if (typeof result[key] === "object" && typeof val === "object") {
  6720. result[key] = deepMerge$2(result[key], val);
  6721. } else if (typeof val === "object") {
  6722. result[key] = deepMerge$2({}, val);
  6723. } else {
  6724. result[key] = val;
  6725. }
  6726. }
  6727. for (let i2 = 0, l2 = arguments.length; i2 < l2; i2++) {
  6728. forEach(arguments[i2], assignValue);
  6729. }
  6730. return result;
  6731. }
  6732. function isUndefined(val) {
  6733. return typeof val === "undefined";
  6734. }
  6735. function encode(val) {
  6736. return encodeURIComponent(val).replace(/%40/gi, "@").replace(/%3A/gi, ":").replace(/%24/g, "$").replace(/%2C/gi, ",").replace(/%20/g, "+").replace(/%5B/gi, "[").replace(/%5D/gi, "]");
  6737. }
  6738. function buildURL(url2, params2) {
  6739. if (!params2) {
  6740. return url2;
  6741. }
  6742. let serializedParams;
  6743. if (isURLSearchParams(params2)) {
  6744. serializedParams = params2.toString();
  6745. } else {
  6746. const parts = [];
  6747. forEach(params2, (val, key) => {
  6748. if (val === null || typeof val === "undefined") {
  6749. return;
  6750. }
  6751. if (isArray(val)) {
  6752. key = `${key}[]`;
  6753. } else {
  6754. val = [val];
  6755. }
  6756. forEach(val, (v2) => {
  6757. if (isDate(v2)) {
  6758. v2 = v2.toISOString();
  6759. } else if (isObject(v2)) {
  6760. v2 = JSON.stringify(v2);
  6761. }
  6762. parts.push(`${encode(key)}=${encode(v2)}`);
  6763. });
  6764. });
  6765. serializedParams = parts.join("&");
  6766. }
  6767. if (serializedParams) {
  6768. const hashmarkIndex = url2.indexOf("#");
  6769. if (hashmarkIndex !== -1) {
  6770. url2 = url2.slice(0, hashmarkIndex);
  6771. }
  6772. url2 += (url2.indexOf("?") === -1 ? "?" : "&") + serializedParams;
  6773. }
  6774. return url2;
  6775. }
  6776. function isAbsoluteURL(url2) {
  6777. return /^([a-z][a-z\d+\-.]*:)?\/\//i.test(url2);
  6778. }
  6779. function combineURLs(baseURL, relativeURL) {
  6780. return relativeURL ? `${baseURL.replace(/\/+$/, "")}/${relativeURL.replace(/^\/+/, "")}` : baseURL;
  6781. }
  6782. function buildFullPath(baseURL, requestedURL) {
  6783. if (baseURL && !isAbsoluteURL(requestedURL)) {
  6784. return combineURLs(baseURL, requestedURL);
  6785. }
  6786. return requestedURL;
  6787. }
  6788. function settle(resolve, reject, response) {
  6789. const { validateStatus } = response.config;
  6790. const status = response.statusCode;
  6791. if (status && (!validateStatus || validateStatus(status))) {
  6792. resolve(response);
  6793. } else {
  6794. reject(response);
  6795. }
  6796. }
  6797. const mergeKeys$1 = (keys, config2) => {
  6798. const config3 = {};
  6799. keys.forEach((prop) => {
  6800. if (!isUndefined(config2[prop])) {
  6801. config3[prop] = config2[prop];
  6802. }
  6803. });
  6804. return config3;
  6805. };
  6806. const adapter = (config2) => new Promise((resolve, reject) => {
  6807. const fullPath = buildURL(buildFullPath(config2.baseURL, config2.url), config2.params);
  6808. const _config = {
  6809. url: fullPath,
  6810. header: config2.header,
  6811. complete: (response) => {
  6812. config2.fullPath = fullPath;
  6813. response.config = config2;
  6814. try {
  6815. if (typeof response.data === "string") {
  6816. response.data = JSON.parse(response.data);
  6817. }
  6818. } catch (e2) {
  6819. }
  6820. settle(resolve, reject, response);
  6821. }
  6822. };
  6823. let requestTask;
  6824. if (config2.method === "UPLOAD") {
  6825. delete _config.header["content-type"];
  6826. delete _config.header["Content-Type"];
  6827. const otherConfig = {
  6828. filePath: config2.filePath,
  6829. name: config2.name
  6830. };
  6831. const optionalKeys = [
  6832. "files",
  6833. "timeout",
  6834. "formData"
  6835. ];
  6836. requestTask = uni.uploadFile({ ..._config, ...otherConfig, ...mergeKeys$1(optionalKeys, config2) });
  6837. } else if (config2.method === "DOWNLOAD") {
  6838. if (!isUndefined(config2.timeout)) {
  6839. _config.timeout = config2.timeout;
  6840. }
  6841. requestTask = uni.downloadFile(_config);
  6842. } else {
  6843. const optionalKeys = [
  6844. "data",
  6845. "method",
  6846. "timeout",
  6847. "dataType",
  6848. "responseType",
  6849. "sslVerify",
  6850. "firstIpv4"
  6851. ];
  6852. requestTask = uni.request({ ..._config, ...mergeKeys$1(optionalKeys, config2) });
  6853. }
  6854. if (config2.getTask) {
  6855. config2.getTask(requestTask, config2);
  6856. }
  6857. });
  6858. const dispatchRequest = (config2) => adapter(config2);
  6859. function InterceptorManager() {
  6860. this.handlers = [];
  6861. }
  6862. InterceptorManager.prototype.use = function use(fulfilled, rejected) {
  6863. this.handlers.push({
  6864. fulfilled,
  6865. rejected
  6866. });
  6867. return this.handlers.length - 1;
  6868. };
  6869. InterceptorManager.prototype.eject = function eject(id) {
  6870. if (this.handlers[id]) {
  6871. this.handlers[id] = null;
  6872. }
  6873. };
  6874. InterceptorManager.prototype.forEach = function forEach2(fn) {
  6875. this.handlers.forEach((h2) => {
  6876. if (h2 !== null) {
  6877. fn(h2);
  6878. }
  6879. });
  6880. };
  6881. const mergeKeys = (keys, globalsConfig, config2) => {
  6882. const config3 = {};
  6883. keys.forEach((prop) => {
  6884. if (!isUndefined(config2[prop])) {
  6885. config3[prop] = config2[prop];
  6886. } else if (!isUndefined(globalsConfig[prop])) {
  6887. config3[prop] = globalsConfig[prop];
  6888. }
  6889. });
  6890. return config3;
  6891. };
  6892. const mergeConfig = (globalsConfig, config2 = {}) => {
  6893. const method = config2.method || globalsConfig.method || "GET";
  6894. let config3 = {
  6895. baseURL: globalsConfig.baseURL || "",
  6896. method,
  6897. url: config2.url || "",
  6898. params: config2.params || {},
  6899. custom: { ...globalsConfig.custom || {}, ...config2.custom || {} },
  6900. header: deepMerge$2(globalsConfig.header || {}, config2.header || {})
  6901. };
  6902. const defaultToConfig2Keys = ["getTask", "validateStatus"];
  6903. config3 = { ...config3, ...mergeKeys(defaultToConfig2Keys, globalsConfig, config2) };
  6904. if (method === "DOWNLOAD") {
  6905. if (!isUndefined(config2.timeout)) {
  6906. config3.timeout = config2.timeout;
  6907. } else if (!isUndefined(globalsConfig.timeout)) {
  6908. config3.timeout = globalsConfig.timeout;
  6909. }
  6910. } else if (method === "UPLOAD") {
  6911. delete config3.header["content-type"];
  6912. delete config3.header["Content-Type"];
  6913. const uploadKeys = [
  6914. "files",
  6915. "filePath",
  6916. "name",
  6917. "timeout",
  6918. "formData"
  6919. ];
  6920. uploadKeys.forEach((prop) => {
  6921. if (!isUndefined(config2[prop])) {
  6922. config3[prop] = config2[prop];
  6923. }
  6924. });
  6925. if (isUndefined(config3.timeout) && !isUndefined(globalsConfig.timeout)) {
  6926. config3.timeout = globalsConfig.timeout;
  6927. }
  6928. } else {
  6929. const defaultsKeys = [
  6930. "data",
  6931. "timeout",
  6932. "dataType",
  6933. "responseType",
  6934. "sslVerify",
  6935. "firstIpv4"
  6936. ];
  6937. config3 = { ...config3, ...mergeKeys(defaultsKeys, globalsConfig, config2) };
  6938. }
  6939. return config3;
  6940. };
  6941. const defaults = {
  6942. baseURL: "",
  6943. header: {},
  6944. method: "GET",
  6945. dataType: "json",
  6946. responseType: "text",
  6947. custom: {},
  6948. timeout: 6e4,
  6949. sslVerify: true,
  6950. firstIpv4: false,
  6951. validateStatus: function validateStatus(status) {
  6952. return status >= 200 && status < 300;
  6953. }
  6954. };
  6955. var clone = function() {
  6956. function _instanceof(obj, type2) {
  6957. return type2 != null && obj instanceof type2;
  6958. }
  6959. var nativeMap;
  6960. try {
  6961. nativeMap = Map;
  6962. } catch (_2) {
  6963. nativeMap = function() {
  6964. };
  6965. }
  6966. var nativeSet;
  6967. try {
  6968. nativeSet = Set;
  6969. } catch (_2) {
  6970. nativeSet = function() {
  6971. };
  6972. }
  6973. var nativePromise;
  6974. try {
  6975. nativePromise = Promise;
  6976. } catch (_2) {
  6977. nativePromise = function() {
  6978. };
  6979. }
  6980. function clone2(parent, circular, depth, prototype, includeNonEnumerable) {
  6981. if (typeof circular === "object") {
  6982. depth = circular.depth;
  6983. prototype = circular.prototype;
  6984. includeNonEnumerable = circular.includeNonEnumerable;
  6985. circular = circular.circular;
  6986. }
  6987. var allParents = [];
  6988. var allChildren = [];
  6989. var useBuffer = typeof Buffer != "undefined";
  6990. if (typeof circular == "undefined")
  6991. circular = true;
  6992. if (typeof depth == "undefined")
  6993. depth = Infinity;
  6994. function _clone(parent2, depth2) {
  6995. if (parent2 === null)
  6996. return null;
  6997. if (depth2 === 0)
  6998. return parent2;
  6999. var child;
  7000. var proto;
  7001. if (typeof parent2 != "object") {
  7002. return parent2;
  7003. }
  7004. if (_instanceof(parent2, nativeMap)) {
  7005. child = new nativeMap();
  7006. } else if (_instanceof(parent2, nativeSet)) {
  7007. child = new nativeSet();
  7008. } else if (_instanceof(parent2, nativePromise)) {
  7009. child = new nativePromise(function(resolve, reject) {
  7010. parent2.then(function(value2) {
  7011. resolve(_clone(value2, depth2 - 1));
  7012. }, function(err) {
  7013. reject(_clone(err, depth2 - 1));
  7014. });
  7015. });
  7016. } else if (clone2.__isArray(parent2)) {
  7017. child = [];
  7018. } else if (clone2.__isRegExp(parent2)) {
  7019. child = new RegExp(parent2.source, __getRegExpFlags(parent2));
  7020. if (parent2.lastIndex)
  7021. child.lastIndex = parent2.lastIndex;
  7022. } else if (clone2.__isDate(parent2)) {
  7023. child = new Date(parent2.getTime());
  7024. } else if (useBuffer && Buffer.isBuffer(parent2)) {
  7025. if (Buffer.from) {
  7026. child = Buffer.from(parent2);
  7027. } else {
  7028. child = new Buffer(parent2.length);
  7029. parent2.copy(child);
  7030. }
  7031. return child;
  7032. } else if (_instanceof(parent2, Error)) {
  7033. child = Object.create(parent2);
  7034. } else {
  7035. if (typeof prototype == "undefined") {
  7036. proto = Object.getPrototypeOf(parent2);
  7037. child = Object.create(proto);
  7038. } else {
  7039. child = Object.create(prototype);
  7040. proto = prototype;
  7041. }
  7042. }
  7043. if (circular) {
  7044. var index2 = allParents.indexOf(parent2);
  7045. if (index2 != -1) {
  7046. return allChildren[index2];
  7047. }
  7048. allParents.push(parent2);
  7049. allChildren.push(child);
  7050. }
  7051. if (_instanceof(parent2, nativeMap)) {
  7052. parent2.forEach(function(value2, key) {
  7053. var keyChild = _clone(key, depth2 - 1);
  7054. var valueChild = _clone(value2, depth2 - 1);
  7055. child.set(keyChild, valueChild);
  7056. });
  7057. }
  7058. if (_instanceof(parent2, nativeSet)) {
  7059. parent2.forEach(function(value2) {
  7060. var entryChild = _clone(value2, depth2 - 1);
  7061. child.add(entryChild);
  7062. });
  7063. }
  7064. for (var i2 in parent2) {
  7065. var attrs = Object.getOwnPropertyDescriptor(parent2, i2);
  7066. if (attrs) {
  7067. child[i2] = _clone(parent2[i2], depth2 - 1);
  7068. }
  7069. try {
  7070. var objProperty = Object.getOwnPropertyDescriptor(parent2, i2);
  7071. if (objProperty.set === "undefined") {
  7072. continue;
  7073. }
  7074. child[i2] = _clone(parent2[i2], depth2 - 1);
  7075. } catch (e2) {
  7076. if (e2 instanceof TypeError) {
  7077. continue;
  7078. } else if (e2 instanceof ReferenceError) {
  7079. continue;
  7080. }
  7081. }
  7082. }
  7083. if (Object.getOwnPropertySymbols) {
  7084. var symbols = Object.getOwnPropertySymbols(parent2);
  7085. for (var i2 = 0; i2 < symbols.length; i2++) {
  7086. var symbol = symbols[i2];
  7087. var descriptor = Object.getOwnPropertyDescriptor(parent2, symbol);
  7088. if (descriptor && !descriptor.enumerable && !includeNonEnumerable) {
  7089. continue;
  7090. }
  7091. child[symbol] = _clone(parent2[symbol], depth2 - 1);
  7092. Object.defineProperty(child, symbol, descriptor);
  7093. }
  7094. }
  7095. if (includeNonEnumerable) {
  7096. var allPropertyNames = Object.getOwnPropertyNames(parent2);
  7097. for (var i2 = 0; i2 < allPropertyNames.length; i2++) {
  7098. var propertyName = allPropertyNames[i2];
  7099. var descriptor = Object.getOwnPropertyDescriptor(parent2, propertyName);
  7100. if (descriptor && descriptor.enumerable) {
  7101. continue;
  7102. }
  7103. child[propertyName] = _clone(parent2[propertyName], depth2 - 1);
  7104. Object.defineProperty(child, propertyName, descriptor);
  7105. }
  7106. }
  7107. return child;
  7108. }
  7109. return _clone(parent, depth);
  7110. }
  7111. clone2.clonePrototype = function clonePrototype(parent) {
  7112. if (parent === null)
  7113. return null;
  7114. var c2 = function() {
  7115. };
  7116. c2.prototype = parent;
  7117. return new c2();
  7118. };
  7119. function __objToStr(o2) {
  7120. return Object.prototype.toString.call(o2);
  7121. }
  7122. clone2.__objToStr = __objToStr;
  7123. function __isDate(o2) {
  7124. return typeof o2 === "object" && __objToStr(o2) === "[object Date]";
  7125. }
  7126. clone2.__isDate = __isDate;
  7127. function __isArray(o2) {
  7128. return typeof o2 === "object" && __objToStr(o2) === "[object Array]";
  7129. }
  7130. clone2.__isArray = __isArray;
  7131. function __isRegExp(o2) {
  7132. return typeof o2 === "object" && __objToStr(o2) === "[object RegExp]";
  7133. }
  7134. clone2.__isRegExp = __isRegExp;
  7135. function __getRegExpFlags(re2) {
  7136. var flags = "";
  7137. if (re2.global)
  7138. flags += "g";
  7139. if (re2.ignoreCase)
  7140. flags += "i";
  7141. if (re2.multiline)
  7142. flags += "m";
  7143. return flags;
  7144. }
  7145. clone2.__getRegExpFlags = __getRegExpFlags;
  7146. return clone2;
  7147. }();
  7148. class Request {
  7149. /**
  7150. * @param {Object} arg - 全局配置
  7151. * @param {String} arg.baseURL - 全局根路径
  7152. * @param {Object} arg.header - 全局header
  7153. * @param {String} arg.method = [GET|POST|PUT|DELETE|CONNECT|HEAD|OPTIONS|TRACE] - 全局默认请求方式
  7154. * @param {String} arg.dataType = [json] - 全局默认的dataType
  7155. * @param {String} arg.responseType = [text|arraybuffer] - 全局默认的responseType。支付宝小程序不支持
  7156. * @param {Object} arg.custom - 全局默认的自定义参数
  7157. * @param {Number} arg.timeout - 全局默认的超时时间,单位 ms。默认60000。H5(HBuilderX 2.9.9+)、APP(HBuilderX 2.9.9+)、微信小程序(2.10.0)、支付宝小程序
  7158. * @param {Boolean} arg.sslVerify - 全局默认的是否验证 ssl 证书。默认true.仅App安卓端支持(HBuilderX 2.3.3+)
  7159. * @param {Boolean} arg.withCredentials - 全局默认的跨域请求时是否携带凭证(cookies)。默认false。仅H5支持(HBuilderX 2.6.15+)
  7160. * @param {Boolean} arg.firstIpv4 - 全DNS解析时优先使用ipv4。默认false。仅 App-Android 支持 (HBuilderX 2.8.0+)
  7161. * @param {Function(statusCode):Boolean} arg.validateStatus - 全局默认的自定义验证器。默认statusCode >= 200 && statusCode < 300
  7162. */
  7163. constructor(arg = {}) {
  7164. if (!isPlainObject(arg)) {
  7165. arg = {};
  7166. formatAppLog("warn", "at uni_modules/uview-plus/libs/luch-request/core/Request.js:40", "设置全局参数必须接收一个Object");
  7167. }
  7168. this.config = clone({ ...defaults, ...arg });
  7169. this.interceptors = {
  7170. request: new InterceptorManager(),
  7171. response: new InterceptorManager()
  7172. };
  7173. }
  7174. /**
  7175. * @Function
  7176. * @param {Request~setConfigCallback} f - 设置全局默认配置
  7177. */
  7178. setConfig(f2) {
  7179. this.config = f2(this.config);
  7180. }
  7181. middleware(config2) {
  7182. config2 = mergeConfig(this.config, config2);
  7183. const chain = [dispatchRequest, void 0];
  7184. let promise2 = Promise.resolve(config2);
  7185. this.interceptors.request.forEach((interceptor2) => {
  7186. chain.unshift(interceptor2.fulfilled, interceptor2.rejected);
  7187. });
  7188. this.interceptors.response.forEach((interceptor2) => {
  7189. chain.push(interceptor2.fulfilled, interceptor2.rejected);
  7190. });
  7191. while (chain.length) {
  7192. promise2 = promise2.then(chain.shift(), chain.shift());
  7193. }
  7194. return promise2;
  7195. }
  7196. /**
  7197. * @Function
  7198. * @param {Object} config - 请求配置项
  7199. * @prop {String} options.url - 请求路径
  7200. * @prop {Object} options.data - 请求参数
  7201. * @prop {Object} [options.responseType = config.responseType] [text|arraybuffer] - 响应的数据类型
  7202. * @prop {Object} [options.dataType = config.dataType] - 如果设为 json,会尝试对返回的数据做一次 JSON.parse
  7203. * @prop {Object} [options.header = config.header] - 请求header
  7204. * @prop {Object} [options.method = config.method] - 请求方法
  7205. * @returns {Promise<unknown>}
  7206. */
  7207. request(config2 = {}) {
  7208. return this.middleware(config2);
  7209. }
  7210. get(url2, options2 = {}) {
  7211. return this.middleware({
  7212. url: url2,
  7213. method: "GET",
  7214. ...options2
  7215. });
  7216. }
  7217. post(url2, data, options2 = {}) {
  7218. return this.middleware({
  7219. url: url2,
  7220. data,
  7221. method: "POST",
  7222. ...options2
  7223. });
  7224. }
  7225. put(url2, data, options2 = {}) {
  7226. return this.middleware({
  7227. url: url2,
  7228. data,
  7229. method: "PUT",
  7230. ...options2
  7231. });
  7232. }
  7233. delete(url2, data, options2 = {}) {
  7234. return this.middleware({
  7235. url: url2,
  7236. data,
  7237. method: "DELETE",
  7238. ...options2
  7239. });
  7240. }
  7241. options(url2, data, options2 = {}) {
  7242. return this.middleware({
  7243. url: url2,
  7244. data,
  7245. method: "OPTIONS",
  7246. ...options2
  7247. });
  7248. }
  7249. upload(url2, config2 = {}) {
  7250. config2.url = url2;
  7251. config2.method = "UPLOAD";
  7252. return this.middleware(config2);
  7253. }
  7254. download(url2, config2 = {}) {
  7255. config2.url = url2;
  7256. config2.method = "DOWNLOAD";
  7257. return this.middleware(config2);
  7258. }
  7259. }
  7260. const http = new Request();
  7261. function email(value2) {
  7262. return /^\w+((-\w+)|(\.\w+))*\@[A-Za-z0-9]+((\.|-)[A-Za-z0-9]+)*\.[A-Za-z0-9]+$/.test(value2);
  7263. }
  7264. function mobile(value2) {
  7265. return /^1[23456789]\d{9}$/.test(value2);
  7266. }
  7267. function url(value2) {
  7268. return /^((https|http|ftp|rtsp|mms):\/\/)(([0-9a-zA-Z_!~*'().&=+$%-]+: )?[0-9a-zA-Z_!~*'().&=+$%-]+@)?(([0-9]{1,3}.){3}[0-9]{1,3}|([0-9a-zA-Z_!~*'()-]+.)*([0-9a-zA-Z][0-9a-zA-Z-]{0,61})?[0-9a-zA-Z].[a-zA-Z]{2,6})(:[0-9]{1,4})?((\/?)|(\/[0-9a-zA-Z_!~*'().;?:@&=+$,%#-]+)+\/?)$/.test(value2);
  7269. }
  7270. function date(value2) {
  7271. if (!value2)
  7272. return false;
  7273. if (typeof value2 === "number") {
  7274. if (value2.toString().length !== 10 && value2.toString().length !== 13) {
  7275. return false;
  7276. }
  7277. return !isNaN(new Date(value2).getTime());
  7278. }
  7279. if (typeof value2 === "string") {
  7280. const numV = Number(value2);
  7281. if (!isNaN(numV)) {
  7282. if (numV.toString().length === 10 || numV.toString().length === 13) {
  7283. return !isNaN(new Date(numV).getTime());
  7284. }
  7285. }
  7286. if (value2.length < 10 || value2.length > 19) {
  7287. return false;
  7288. }
  7289. const dateRegex = /^\d{4}[-\/]\d{2}[-\/]\d{2}( \d{1,2}:\d{2}(:\d{2})?)?$/;
  7290. if (!dateRegex.test(value2)) {
  7291. return false;
  7292. }
  7293. const dateValue = new Date(value2);
  7294. return !isNaN(dateValue.getTime());
  7295. }
  7296. return false;
  7297. }
  7298. function dateISO(value2) {
  7299. return /^\d{4}[\/\-](0?[1-9]|1[012])[\/\-](0?[1-9]|[12][0-9]|3[01])$/.test(value2);
  7300. }
  7301. function number(value2) {
  7302. return /^[\+-]?(\d+\.?\d*|\.\d+|\d\.\d+e\+\d+)$/.test(value2);
  7303. }
  7304. function string$1(value2) {
  7305. return typeof value2 === "string";
  7306. }
  7307. function digits(value2) {
  7308. return /^\d+$/.test(value2);
  7309. }
  7310. function idCard(value2) {
  7311. return /^[1-9]\d{5}[1-9]\d{3}((0\d)|(1[0-2]))(([0|1|2]\d)|3[0-1])\d{3}([0-9]|X)$/.test(
  7312. value2
  7313. );
  7314. }
  7315. function carNo(value2) {
  7316. const xreg = /^[京津沪渝冀豫云辽黑湘皖鲁新苏浙赣鄂桂甘晋蒙陕吉闽贵粤青藏川宁琼使领A-Z]{1}[A-Z]{1}(([0-9]{5}[DF]$)|([DF][A-HJ-NP-Z0-9][0-9]{4}$))/;
  7317. const creg = /^[京津沪渝冀豫云辽黑湘皖鲁新苏浙赣鄂桂甘晋蒙陕吉闽贵粤青藏川宁琼使领A-Z]{1}[A-Z]{1}[A-HJ-NP-Z0-9]{4}[A-HJ-NP-Z0-9挂学警港澳]{1}$/;
  7318. if (value2.length === 7) {
  7319. return creg.test(value2);
  7320. }
  7321. if (value2.length === 8) {
  7322. return xreg.test(value2);
  7323. }
  7324. return false;
  7325. }
  7326. function amount(value2) {
  7327. return /^[1-9]\d*(,\d{3})*(\.\d{1,2})?$|^0\.\d{1,2}$/.test(value2);
  7328. }
  7329. function chinese(value2) {
  7330. const reg = /^[\u4e00-\u9fa5]+$/gi;
  7331. return reg.test(value2);
  7332. }
  7333. function letter(value2) {
  7334. return /^[a-zA-Z]*$/.test(value2);
  7335. }
  7336. function enOrNum(value2) {
  7337. const reg = /^[0-9a-zA-Z]*$/g;
  7338. return reg.test(value2);
  7339. }
  7340. function contains(value2, param) {
  7341. return value2.indexOf(param) >= 0;
  7342. }
  7343. function range$2(value2, param) {
  7344. return value2 >= param[0] && value2 <= param[1];
  7345. }
  7346. function rangeLength(value2, param) {
  7347. return value2.length >= param[0] && value2.length <= param[1];
  7348. }
  7349. function landline(value2) {
  7350. const reg = /^\d{3,4}-\d{7,8}(-\d{3,4})?$/;
  7351. return reg.test(value2);
  7352. }
  7353. function empty(value2) {
  7354. switch (typeof value2) {
  7355. case "undefined":
  7356. return true;
  7357. case "string":
  7358. if (value2.replace(/(^[ \t\n\r]*)|([ \t\n\r]*$)/g, "").length == 0)
  7359. return true;
  7360. break;
  7361. case "boolean":
  7362. if (!value2)
  7363. return true;
  7364. break;
  7365. case "number":
  7366. if (value2 === 0 || isNaN(value2))
  7367. return true;
  7368. break;
  7369. case "object":
  7370. if (value2 === null || value2.length === 0)
  7371. return true;
  7372. for (const i2 in value2) {
  7373. return false;
  7374. }
  7375. return true;
  7376. }
  7377. return false;
  7378. }
  7379. function jsonString(value2) {
  7380. if (typeof value2 === "string") {
  7381. try {
  7382. const obj = JSON.parse(value2);
  7383. if (typeof obj === "object" && obj) {
  7384. return true;
  7385. }
  7386. return false;
  7387. } catch (e2) {
  7388. return false;
  7389. }
  7390. }
  7391. return false;
  7392. }
  7393. function array(value2) {
  7394. if (typeof Array.isArray === "function") {
  7395. return Array.isArray(value2);
  7396. }
  7397. return Object.prototype.toString.call(value2) === "[object Array]";
  7398. }
  7399. function object(value2) {
  7400. return Object.prototype.toString.call(value2) === "[object Object]";
  7401. }
  7402. function objectPromise(value2) {
  7403. return Object.prototype.toString.call(value2) === "[object Promise]";
  7404. }
  7405. function code(value2, len = 6) {
  7406. return new RegExp(`^\\d{${len}}$`).test(value2);
  7407. }
  7408. function func(value2) {
  7409. return typeof value2 === "function";
  7410. }
  7411. function promise(value2) {
  7412. return objectPromise(value2) && func(value2.then) && func(value2.catch);
  7413. }
  7414. function image(value2) {
  7415. const newValue = value2.split("?")[0];
  7416. const IMAGE_REGEXP = /\.(jpeg|jpg|gif|png|svg|webp|jfif|bmp|dpg)/i;
  7417. return IMAGE_REGEXP.test(newValue);
  7418. }
  7419. function video(value2) {
  7420. const VIDEO_REGEXP = /\.(mp4|mpg|mpeg|dat|asf|avi|rm|rmvb|mov|wmv|flv|mkv|m3u8)/i;
  7421. return VIDEO_REGEXP.test(value2);
  7422. }
  7423. function regExp(o2) {
  7424. return o2 && Object.prototype.toString.call(o2) === "[object RegExp]";
  7425. }
  7426. const test = {
  7427. email,
  7428. mobile,
  7429. url,
  7430. date,
  7431. dateISO,
  7432. number,
  7433. digits,
  7434. idCard,
  7435. carNo,
  7436. amount,
  7437. chinese,
  7438. letter,
  7439. enOrNum,
  7440. contains,
  7441. range: range$2,
  7442. rangeLength,
  7443. empty,
  7444. isEmpty: empty,
  7445. jsonString,
  7446. landline,
  7447. object,
  7448. array,
  7449. code,
  7450. func,
  7451. promise,
  7452. video,
  7453. image,
  7454. regExp,
  7455. string: string$1
  7456. };
  7457. function strip(num, precision = 15) {
  7458. return +parseFloat(Number(num).toPrecision(precision));
  7459. }
  7460. function digitLength(num) {
  7461. const eSplit = num.toString().split(/[eE]/);
  7462. const len = (eSplit[0].split(".")[1] || "").length - +(eSplit[1] || 0);
  7463. return len > 0 ? len : 0;
  7464. }
  7465. function float2Fixed(num) {
  7466. if (num.toString().indexOf("e") === -1) {
  7467. return Number(num.toString().replace(".", ""));
  7468. }
  7469. const dLen = digitLength(num);
  7470. return dLen > 0 ? strip(Number(num) * Math.pow(10, dLen)) : Number(num);
  7471. }
  7472. function checkBoundary(num) {
  7473. {
  7474. if (num > Number.MAX_SAFE_INTEGER || num < Number.MIN_SAFE_INTEGER) {
  7475. formatAppLog("warn", "at uni_modules/uview-plus/libs/function/digit.js:45", `${num} 超出了精度限制,结果可能不正确`);
  7476. }
  7477. }
  7478. }
  7479. function iteratorOperation(arr, operation) {
  7480. const [num1, num2, ...others] = arr;
  7481. let res = operation(num1, num2);
  7482. others.forEach((num) => {
  7483. res = operation(res, num);
  7484. });
  7485. return res;
  7486. }
  7487. function times$1(...nums) {
  7488. if (nums.length > 2) {
  7489. return iteratorOperation(nums, times$1);
  7490. }
  7491. const [num1, num2] = nums;
  7492. const num1Changed = float2Fixed(num1);
  7493. const num2Changed = float2Fixed(num2);
  7494. const baseNum = digitLength(num1) + digitLength(num2);
  7495. const leftValue = num1Changed * num2Changed;
  7496. checkBoundary(leftValue);
  7497. return leftValue / Math.pow(10, baseNum);
  7498. }
  7499. function divide(...nums) {
  7500. if (nums.length > 2) {
  7501. return iteratorOperation(nums, divide);
  7502. }
  7503. const [num1, num2] = nums;
  7504. const num1Changed = float2Fixed(num1);
  7505. const num2Changed = float2Fixed(num2);
  7506. checkBoundary(num1Changed);
  7507. checkBoundary(num2Changed);
  7508. return times$1(num1Changed / num2Changed, strip(Math.pow(10, digitLength(num2) - digitLength(num1))));
  7509. }
  7510. function round(num, ratio) {
  7511. const base = Math.pow(10, ratio);
  7512. let result = divide(Math.round(Math.abs(times$1(num, base))), base);
  7513. if (num < 0 && result !== 0) {
  7514. result = times$1(result, -1);
  7515. }
  7516. return result;
  7517. }
  7518. function range$1(min = 0, max = 0, value2 = 0) {
  7519. return Math.max(min, Math.min(max, Number(value2)));
  7520. }
  7521. function getPx(value2, unit = false) {
  7522. if (number(value2)) {
  7523. return unit ? `${value2}px` : Number(value2);
  7524. }
  7525. if (/(rpx|upx)$/.test(value2)) {
  7526. return unit ? `${uni.upx2px(parseInt(value2))}px` : Number(uni.upx2px(parseInt(value2)));
  7527. }
  7528. return unit ? `${parseInt(value2)}px` : parseInt(value2);
  7529. }
  7530. function sleep(value2 = 30) {
  7531. return new Promise((resolve) => {
  7532. setTimeout(() => {
  7533. resolve();
  7534. }, value2);
  7535. });
  7536. }
  7537. function os() {
  7538. return uni.getDeviceInfo().platform.toLowerCase();
  7539. }
  7540. function sys() {
  7541. return uni.getSystemInfoSync();
  7542. }
  7543. function getWindowInfo() {
  7544. let ret = {};
  7545. ret = uni.getWindowInfo();
  7546. return ret;
  7547. }
  7548. function getDeviceInfo() {
  7549. let ret = {};
  7550. ret = uni.getDeviceInfo();
  7551. return ret;
  7552. }
  7553. function random(min, max) {
  7554. if (min >= 0 && max > 0 && max >= min) {
  7555. const gab = max - min + 1;
  7556. return Math.floor(Math.random() * gab + min);
  7557. }
  7558. return 0;
  7559. }
  7560. function guid(len = 32, firstU = true, radix = null) {
  7561. const chars = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz".split("");
  7562. const uuid = [];
  7563. radix = radix || chars.length;
  7564. if (len) {
  7565. for (let i2 = 0; i2 < len; i2++)
  7566. uuid[i2] = chars[0 | Math.random() * radix];
  7567. } else {
  7568. let r2;
  7569. uuid[8] = uuid[13] = uuid[18] = uuid[23] = "-";
  7570. uuid[14] = "4";
  7571. for (let i2 = 0; i2 < 36; i2++) {
  7572. if (!uuid[i2]) {
  7573. r2 = 0 | Math.random() * 16;
  7574. uuid[i2] = chars[i2 == 19 ? r2 & 3 | 8 : r2];
  7575. }
  7576. }
  7577. }
  7578. if (firstU) {
  7579. uuid.shift();
  7580. return `u${uuid.join("")}`;
  7581. }
  7582. return uuid.join("");
  7583. }
  7584. function $parent(name2 = void 0) {
  7585. let parent = this.$parent;
  7586. while (parent) {
  7587. name2 = name2.replace(/up-([a-zA-Z0-9-_]+)/g, "u-$1");
  7588. if (parent.$options && parent.$options.name !== name2) {
  7589. parent = parent.$parent;
  7590. } else {
  7591. return parent;
  7592. }
  7593. }
  7594. return false;
  7595. }
  7596. function addStyle(customStyle, target = "object") {
  7597. if (empty(customStyle) || typeof customStyle === "object" && target === "object" || target === "string" && typeof customStyle === "string") {
  7598. return customStyle;
  7599. }
  7600. if (target === "object") {
  7601. customStyle = trim(customStyle);
  7602. const styleArray = customStyle.split(";");
  7603. const style = {};
  7604. for (let i2 = 0; i2 < styleArray.length; i2++) {
  7605. if (styleArray[i2]) {
  7606. const item = styleArray[i2].split(":");
  7607. style[trim(item[0])] = trim(item[1]);
  7608. }
  7609. }
  7610. return style;
  7611. }
  7612. let string2 = "";
  7613. if (typeof customStyle === "object") {
  7614. customStyle.forEach((val, i2) => {
  7615. const key = i2.replace(/([A-Z])/g, "-$1").toLowerCase();
  7616. string2 += `${key}:${val};`;
  7617. });
  7618. }
  7619. return trim(string2);
  7620. }
  7621. function addUnit(value2 = "auto", unit = "") {
  7622. if (!unit) {
  7623. unit = config$1.unit || "px";
  7624. }
  7625. if (unit == "rpx" && number(String(value2))) {
  7626. value2 = value2 * 2;
  7627. }
  7628. value2 = String(value2);
  7629. return number(value2) ? `${value2}${unit}` : value2;
  7630. }
  7631. function deepClone(obj) {
  7632. if ([null, void 0, NaN, false].includes(obj))
  7633. return obj;
  7634. if (typeof obj !== "object" && typeof obj !== "function") {
  7635. return obj;
  7636. }
  7637. const o2 = array(obj) ? [] : {};
  7638. for (const i2 in obj) {
  7639. if (obj.hasOwnProperty(i2)) {
  7640. o2[i2] = typeof obj[i2] === "object" ? deepClone(obj[i2]) : obj[i2];
  7641. }
  7642. }
  7643. return o2;
  7644. }
  7645. function deepMerge$1(targetOrigin = {}, source = {}) {
  7646. let target = deepClone(targetOrigin);
  7647. if (typeof target !== "object" || typeof source !== "object")
  7648. return false;
  7649. for (const prop in source) {
  7650. if (!source.hasOwnProperty(prop))
  7651. continue;
  7652. if (prop in target) {
  7653. if (source[prop] == null) {
  7654. target[prop] = source[prop];
  7655. } else if (typeof target[prop] !== "object") {
  7656. target[prop] = source[prop];
  7657. } else if (typeof source[prop] !== "object") {
  7658. target[prop] = source[prop];
  7659. } else if (target[prop].concat && source[prop].concat) {
  7660. target[prop] = target[prop].concat(source[prop]);
  7661. } else {
  7662. target[prop] = deepMerge$1(target[prop], source[prop]);
  7663. }
  7664. } else {
  7665. target[prop] = source[prop];
  7666. }
  7667. }
  7668. return target;
  7669. }
  7670. function shallowMerge(target, source = {}) {
  7671. if (typeof target !== "object" || typeof source !== "object")
  7672. return false;
  7673. for (const prop in source) {
  7674. if (!source.hasOwnProperty(prop))
  7675. continue;
  7676. if (prop in target) {
  7677. if (source[prop] == null) {
  7678. target[prop] = source[prop];
  7679. } else if (typeof target[prop] !== "object") {
  7680. target[prop] = source[prop];
  7681. } else if (typeof source[prop] !== "object") {
  7682. target[prop] = source[prop];
  7683. } else if (target[prop].concat && source[prop].concat) {
  7684. target[prop] = target[prop].concat(source[prop]);
  7685. } else {
  7686. target[prop] = shallowMerge(target[prop], source[prop]);
  7687. }
  7688. } else {
  7689. target[prop] = source[prop];
  7690. }
  7691. }
  7692. return target;
  7693. }
  7694. function error(err) {
  7695. {
  7696. formatAppLog("error", "at uni_modules/uview-plus/libs/function/index.js:304", `uView提示:${err}`);
  7697. }
  7698. }
  7699. function randomArray(array3 = []) {
  7700. return array3.sort(() => Math.random() - 0.5);
  7701. }
  7702. if (!String.prototype.padStart) {
  7703. String.prototype.padStart = function(maxLength, fillString = " ") {
  7704. if (Object.prototype.toString.call(fillString) !== "[object String]") {
  7705. throw new TypeError(
  7706. "fillString must be String"
  7707. );
  7708. }
  7709. const str = this;
  7710. if (str.length >= maxLength)
  7711. return String(str);
  7712. const fillLength = maxLength - str.length;
  7713. let times2 = Math.ceil(fillLength / fillString.length);
  7714. while (times2 >>= 1) {
  7715. fillString += fillString;
  7716. if (times2 === 1) {
  7717. fillString += fillString;
  7718. }
  7719. }
  7720. return fillString.slice(0, fillLength) + str;
  7721. };
  7722. }
  7723. function timeFormat(dateTime = null, formatStr = "yyyy-mm-dd") {
  7724. let date3;
  7725. if (!dateTime) {
  7726. date3 = /* @__PURE__ */ new Date();
  7727. } else if (/^\d{10}$/.test(dateTime.toString().trim())) {
  7728. date3 = new Date(dateTime * 1e3);
  7729. } else if (typeof dateTime === "string" && /^\d+$/.test(dateTime.trim())) {
  7730. date3 = new Date(Number(dateTime));
  7731. } else if (typeof dateTime === "string" && /^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}\.\d{3}Z$/.test(dateTime)) {
  7732. date3 = new Date(dateTime);
  7733. } else {
  7734. date3 = new Date(
  7735. typeof dateTime === "string" ? dateTime.replace(/-/g, "/") : dateTime
  7736. );
  7737. }
  7738. const timeSource = {
  7739. "y": date3.getFullYear().toString(),
  7740. // 年
  7741. "m": (date3.getMonth() + 1).toString().padStart(2, "0"),
  7742. // 月
  7743. "d": date3.getDate().toString().padStart(2, "0"),
  7744. // 日
  7745. "h": date3.getHours().toString().padStart(2, "0"),
  7746. // 时
  7747. "M": date3.getMinutes().toString().padStart(2, "0"),
  7748. // 分
  7749. "s": date3.getSeconds().toString().padStart(2, "0")
  7750. // 秒
  7751. // 有其他格式化字符需求可以继续添加,必须转化成字符串
  7752. };
  7753. for (const key in timeSource) {
  7754. const [ret] = new RegExp(`${key}+`).exec(formatStr) || [];
  7755. if (ret) {
  7756. const beginIndex = key === "y" && ret.length === 2 ? 2 : 0;
  7757. formatStr = formatStr.replace(ret, timeSource[key].slice(beginIndex));
  7758. }
  7759. }
  7760. return formatStr;
  7761. }
  7762. function timeFrom(timestamp = null, format2 = "yyyy-mm-dd") {
  7763. if (timestamp == null)
  7764. timestamp = Number(/* @__PURE__ */ new Date());
  7765. timestamp = parseInt(timestamp);
  7766. if (timestamp.toString().length == 10)
  7767. timestamp *= 1e3;
  7768. let timer = (/* @__PURE__ */ new Date()).getTime() - timestamp;
  7769. timer = parseInt(timer / 1e3);
  7770. let tips = "";
  7771. switch (true) {
  7772. case timer < 300:
  7773. tips = "刚刚";
  7774. break;
  7775. case (timer >= 300 && timer < 3600):
  7776. tips = `${parseInt(timer / 60)}分钟前`;
  7777. break;
  7778. case (timer >= 3600 && timer < 86400):
  7779. tips = `${parseInt(timer / 3600)}小时前`;
  7780. break;
  7781. case (timer >= 86400 && timer < 2592e3):
  7782. tips = `${parseInt(timer / 86400)}天前`;
  7783. break;
  7784. default:
  7785. if (format2 === false) {
  7786. if (timer >= 2592e3 && timer < 365 * 86400) {
  7787. tips = `${parseInt(timer / (86400 * 30))}个月前`;
  7788. } else {
  7789. tips = `${parseInt(timer / (86400 * 365))}年前`;
  7790. }
  7791. } else {
  7792. tips = timeFormat(timestamp, format2);
  7793. }
  7794. }
  7795. return tips;
  7796. }
  7797. function trim(str, pos = "both") {
  7798. str = String(str);
  7799. if (pos == "both") {
  7800. return str.replace(/^\s+|\s+$/g, "");
  7801. }
  7802. if (pos == "left") {
  7803. return str.replace(/^\s*/, "");
  7804. }
  7805. if (pos == "right") {
  7806. return str.replace(/(\s*$)/g, "");
  7807. }
  7808. if (pos == "all") {
  7809. return str.replace(/\s+/g, "");
  7810. }
  7811. return str;
  7812. }
  7813. function queryParams(data = {}, isPrefix = true, arrayFormat = "brackets") {
  7814. const prefix = isPrefix ? "?" : "";
  7815. const _result = [];
  7816. if (["indices", "brackets", "repeat", "comma"].indexOf(arrayFormat) == -1)
  7817. arrayFormat = "brackets";
  7818. for (const key in data) {
  7819. const value2 = data[key];
  7820. if (["", void 0, null].indexOf(value2) >= 0) {
  7821. continue;
  7822. }
  7823. if (value2.constructor === Array) {
  7824. switch (arrayFormat) {
  7825. case "indices":
  7826. for (let i2 = 0; i2 < value2.length; i2++) {
  7827. _result.push(`${key}[${i2}]=${value2[i2]}`);
  7828. }
  7829. break;
  7830. case "brackets":
  7831. value2.forEach((_value) => {
  7832. _result.push(`${key}[]=${_value}`);
  7833. });
  7834. break;
  7835. case "repeat":
  7836. value2.forEach((_value) => {
  7837. _result.push(`${key}=${_value}`);
  7838. });
  7839. break;
  7840. case "comma":
  7841. let commaStr = "";
  7842. value2.forEach((_value) => {
  7843. commaStr += (commaStr ? "," : "") + _value;
  7844. });
  7845. _result.push(`${key}=${commaStr}`);
  7846. break;
  7847. default:
  7848. value2.forEach((_value) => {
  7849. _result.push(`${key}[]=${_value}`);
  7850. });
  7851. }
  7852. } else {
  7853. _result.push(`${key}=${value2}`);
  7854. }
  7855. }
  7856. return _result.length ? prefix + _result.join("&") : "";
  7857. }
  7858. function toast(title, duration = 2e3) {
  7859. uni.showToast({
  7860. title: String(title),
  7861. icon: "none",
  7862. duration
  7863. });
  7864. }
  7865. function type2icon(type2 = "success", fill = false) {
  7866. if (["primary", "info", "error", "warning", "success"].indexOf(type2) == -1)
  7867. type2 = "success";
  7868. let iconName = "";
  7869. switch (type2) {
  7870. case "primary":
  7871. iconName = "info-circle";
  7872. break;
  7873. case "info":
  7874. iconName = "info-circle";
  7875. break;
  7876. case "error":
  7877. iconName = "close-circle";
  7878. break;
  7879. case "warning":
  7880. iconName = "error-circle";
  7881. break;
  7882. case "success":
  7883. iconName = "checkmark-circle";
  7884. break;
  7885. default:
  7886. iconName = "checkmark-circle";
  7887. }
  7888. if (fill)
  7889. iconName += "-fill";
  7890. return iconName;
  7891. }
  7892. function priceFormat(number3, decimals = 0, decimalPoint = ".", thousandsSeparator = ",") {
  7893. number3 = `${number3}`.replace(/[^0-9+-Ee.]/g, "");
  7894. const n2 = !isFinite(+number3) ? 0 : +number3;
  7895. const prec = !isFinite(+decimals) ? 0 : Math.abs(decimals);
  7896. const sep = typeof thousandsSeparator === "undefined" ? "," : thousandsSeparator;
  7897. const dec = typeof decimalPoint === "undefined" ? "." : decimalPoint;
  7898. let s2 = "";
  7899. s2 = (prec ? round(n2, prec) + "" : `${Math.round(n2)}`).split(".");
  7900. const re2 = /(-?\d+)(\d{3})/;
  7901. while (re2.test(s2[0])) {
  7902. s2[0] = s2[0].replace(re2, `$1${sep}$2`);
  7903. }
  7904. if ((s2[1] || "").length < prec) {
  7905. s2[1] = s2[1] || "";
  7906. s2[1] += new Array(prec - s2[1].length + 1).join("0");
  7907. }
  7908. return s2.join(dec);
  7909. }
  7910. function getDuration(value2, unit = true) {
  7911. const valueNum = parseInt(value2);
  7912. if (unit) {
  7913. if (/s$/.test(value2))
  7914. return value2;
  7915. return value2 > 30 ? `${value2}ms` : `${value2}s`;
  7916. }
  7917. if (/ms$/.test(value2))
  7918. return valueNum;
  7919. if (/s$/.test(value2))
  7920. return valueNum > 30 ? valueNum : valueNum * 1e3;
  7921. return valueNum;
  7922. }
  7923. function padZero$1(value2) {
  7924. return `00${value2}`.slice(-2);
  7925. }
  7926. function formValidate(instance, event) {
  7927. const formItem = $parent.call(instance, "u-form-item");
  7928. const form = $parent.call(instance, "u-form");
  7929. if (formItem && form) {
  7930. form.validateField(formItem.prop, () => {
  7931. }, event);
  7932. }
  7933. }
  7934. function getProperty(obj, key) {
  7935. if (typeof obj !== "object" || null == obj) {
  7936. return "";
  7937. }
  7938. if (typeof key !== "string" || key === "") {
  7939. return "";
  7940. }
  7941. if (key.indexOf(".") !== -1) {
  7942. const keys = key.split(".");
  7943. let firstObj = obj[keys[0]] || {};
  7944. for (let i2 = 1; i2 < keys.length; i2++) {
  7945. if (firstObj) {
  7946. firstObj = firstObj[keys[i2]];
  7947. }
  7948. }
  7949. return firstObj;
  7950. }
  7951. return obj[key];
  7952. }
  7953. function setProperty(obj, key, value2) {
  7954. if (typeof obj !== "object" || null == obj) {
  7955. return;
  7956. }
  7957. const inFn = function(_obj, keys, v2) {
  7958. if (keys.length === 1) {
  7959. _obj[keys[0]] = v2;
  7960. return;
  7961. }
  7962. while (keys.length > 1) {
  7963. const k2 = keys[0];
  7964. if (!_obj[k2] || typeof _obj[k2] !== "object") {
  7965. _obj[k2] = {};
  7966. }
  7967. keys.shift();
  7968. inFn(_obj[k2], keys, v2);
  7969. }
  7970. };
  7971. if (typeof key !== "string" || key === "")
  7972. ;
  7973. else if (key.indexOf(".") !== -1) {
  7974. const keys = key.split(".");
  7975. inFn(obj, keys, value2);
  7976. } else {
  7977. obj[key] = value2;
  7978. }
  7979. }
  7980. function page() {
  7981. const pages2 = getCurrentPages();
  7982. return `/${pages2[pages2.length - 1].route || ""}`;
  7983. }
  7984. function pages() {
  7985. const pages2 = getCurrentPages();
  7986. return pages2;
  7987. }
  7988. function getValueByPath(obj, path) {
  7989. const pathArr = path.split(".");
  7990. return pathArr.reduce((acc, curr) => {
  7991. return acc && acc[curr] !== void 0 ? acc[curr] : void 0;
  7992. }, obj);
  7993. }
  7994. function genLightColor(textColor, lightness = 95) {
  7995. const rgb = parseColorWithoutDOM(textColor);
  7996. const hsl = rgbToHsl(rgb.r, rgb.g, rgb.b);
  7997. const bgHsl = {
  7998. h: hsl.h,
  7999. s: hsl.s,
  8000. l: Math.min(lightness, 95)
  8001. };
  8002. return hslToHex(bgHsl.h, bgHsl.s, bgHsl.l);
  8003. }
  8004. function parseColorWithoutDOM(colorStr) {
  8005. const str = colorStr.toLowerCase().trim();
  8006. if (str.startsWith("#")) {
  8007. const hex = str.replace("#", "");
  8008. const fullHex = hex.length === 3 ? hex.split("").map((c2) => c2 + c2).join("") : hex;
  8009. return {
  8010. r: parseInt(fullHex.substring(0, 2), 16),
  8011. g: parseInt(fullHex.substring(2, 4), 16),
  8012. b: parseInt(fullHex.substring(4, 6), 16)
  8013. };
  8014. }
  8015. const rgbMatch = str.match(/rgba?\((\d+),\s*(\d+),\s*(\d+)/);
  8016. if (rgbMatch) {
  8017. return {
  8018. r: +rgbMatch[1],
  8019. g: +rgbMatch[2],
  8020. b: +rgbMatch[3]
  8021. };
  8022. }
  8023. throw new Error("Invalid color format");
  8024. }
  8025. function rgbToHsl(r2, g2, b2) {
  8026. r2 /= 255, g2 /= 255, b2 /= 255;
  8027. const max = Math.max(r2, g2, b2), min = Math.min(r2, g2, b2);
  8028. let h2, s2, l2 = (max + min) / 2;
  8029. if (max === min) {
  8030. h2 = s2 = 0;
  8031. } else {
  8032. const d2 = max - min;
  8033. s2 = l2 > 0.5 ? d2 / (2 - max - min) : d2 / (max + min);
  8034. switch (max) {
  8035. case r2:
  8036. h2 = (g2 - b2) / d2 + (g2 < b2 ? 6 : 0);
  8037. break;
  8038. case g2:
  8039. h2 = (b2 - r2) / d2 + 2;
  8040. break;
  8041. case b2:
  8042. h2 = (r2 - g2) / d2 + 4;
  8043. break;
  8044. }
  8045. h2 = (h2 * 60).toFixed(1);
  8046. }
  8047. return { h: +h2, s: +(s2 * 100).toFixed(1), l: +(l2 * 100).toFixed(1) };
  8048. }
  8049. function hslToHex(h2, s2, l2) {
  8050. l2 /= 100;
  8051. const a2 = s2 * Math.min(l2, 1 - l2) / 100;
  8052. const f2 = (n2) => {
  8053. const k2 = (n2 + h2 / 30) % 12;
  8054. const color2 = l2 - a2 * Math.max(Math.min(k2 - 3, 9 - k2, 1), -1);
  8055. return Math.round(255 * color2).toString(16).padStart(2, "0");
  8056. };
  8057. return `#${f2(0)}${f2(8)}${f2(4)}`;
  8058. }
  8059. const index = {
  8060. range: range$1,
  8061. getPx,
  8062. sleep,
  8063. os,
  8064. sys,
  8065. getWindowInfo,
  8066. random,
  8067. guid,
  8068. $parent,
  8069. addStyle,
  8070. addUnit,
  8071. deepClone,
  8072. deepMerge: deepMerge$1,
  8073. shallowMerge,
  8074. error,
  8075. randomArray,
  8076. timeFormat,
  8077. timeFrom,
  8078. trim,
  8079. queryParams,
  8080. toast,
  8081. type2icon,
  8082. priceFormat,
  8083. getDuration,
  8084. padZero: padZero$1,
  8085. formValidate,
  8086. getProperty,
  8087. setProperty,
  8088. page,
  8089. pages,
  8090. getValueByPath,
  8091. genLightColor
  8092. };
  8093. const ActionSheet = {
  8094. // action-sheet组件
  8095. actionSheet: {
  8096. show: false,
  8097. title: "",
  8098. description: "",
  8099. actions: [],
  8100. index: "",
  8101. cancelText: "",
  8102. closeOnClickAction: true,
  8103. safeAreaInsetBottom: true,
  8104. openType: "",
  8105. closeOnClickOverlay: true,
  8106. round: 0,
  8107. wrapMaxHeight: "600px"
  8108. }
  8109. };
  8110. const Album = {
  8111. // album 组件
  8112. album: {
  8113. urls: [],
  8114. keyName: "",
  8115. singleSize: 180,
  8116. multipleSize: 70,
  8117. space: 6,
  8118. singleMode: "scaleToFill",
  8119. multipleMode: "aspectFill",
  8120. maxCount: 9,
  8121. previewFullImage: true,
  8122. rowCount: 3,
  8123. showMore: true,
  8124. autoWrap: false,
  8125. unit: "px",
  8126. stop: true
  8127. }
  8128. };
  8129. const Alert = {
  8130. // alert警告组件
  8131. alert: {
  8132. title: "",
  8133. type: "warning",
  8134. description: "",
  8135. closable: false,
  8136. showIcon: false,
  8137. effect: "light",
  8138. center: false,
  8139. fontSize: 14,
  8140. transitionMode: "fade",
  8141. duration: 0,
  8142. icon: "",
  8143. value: true
  8144. }
  8145. };
  8146. const Avatar = {
  8147. // avatar 组件
  8148. avatar: {
  8149. src: "",
  8150. shape: "circle",
  8151. size: 40,
  8152. mode: "scaleToFill",
  8153. text: "",
  8154. bgColor: "#c0c4cc",
  8155. color: "#ffffff",
  8156. fontSize: 18,
  8157. icon: "",
  8158. mpAvatar: false,
  8159. randomBgColor: false,
  8160. defaultUrl: "",
  8161. colorIndex: "",
  8162. name: ""
  8163. }
  8164. };
  8165. const AvatarGroup = {
  8166. // avatarGroup 组件
  8167. avatarGroup: {
  8168. urls: [],
  8169. maxCount: 5,
  8170. shape: "circle",
  8171. mode: "scaleToFill",
  8172. showMore: true,
  8173. size: 40,
  8174. keyName: "",
  8175. gap: 0.5,
  8176. extraValue: 0
  8177. }
  8178. };
  8179. const Backtop = {
  8180. // backtop组件
  8181. backtop: {
  8182. mode: "circle",
  8183. icon: "arrow-upward",
  8184. text: "",
  8185. duration: 100,
  8186. scrollTop: 0,
  8187. top: 400,
  8188. bottom: 100,
  8189. right: 20,
  8190. zIndex: 9,
  8191. iconStyle: {
  8192. color: "#909399",
  8193. fontSize: "19px"
  8194. }
  8195. }
  8196. };
  8197. const Badge = {
  8198. // 徽标数组件
  8199. badge: {
  8200. isDot: false,
  8201. value: "",
  8202. show: true,
  8203. max: 999,
  8204. type: "error",
  8205. showZero: false,
  8206. bgColor: null,
  8207. color: null,
  8208. shape: "circle",
  8209. numberType: "overflow",
  8210. offset: [],
  8211. inverted: false,
  8212. absolute: false
  8213. }
  8214. };
  8215. const Button = {
  8216. // button组件
  8217. button: {
  8218. hairline: false,
  8219. type: "info",
  8220. size: "normal",
  8221. shape: "square",
  8222. plain: false,
  8223. disabled: false,
  8224. loading: false,
  8225. loadingText: "",
  8226. loadingMode: "spinner",
  8227. loadingSize: 15,
  8228. openType: "",
  8229. formType: "",
  8230. appParameter: "",
  8231. hoverStopPropagation: true,
  8232. lang: "en",
  8233. sessionFrom: "",
  8234. sendMessageTitle: "",
  8235. sendMessagePath: "",
  8236. sendMessageImg: "",
  8237. showMessageCard: false,
  8238. dataName: "",
  8239. throttleTime: 0,
  8240. hoverStartTime: 0,
  8241. hoverStayTime: 200,
  8242. text: "",
  8243. icon: "",
  8244. iconColor: "",
  8245. color: "",
  8246. stop: true
  8247. }
  8248. };
  8249. const zhHans = {
  8250. "up.common.cancel": "取消",
  8251. "up.common.confirm": "确定",
  8252. "up.common.start": "开始",
  8253. "up.common.end": "结束",
  8254. "up.common.stop": "停止",
  8255. "up.common.copy": "复制",
  8256. "up.common.none": "暂无",
  8257. "up.common.tip": "提示",
  8258. "up.common.success": "成功",
  8259. "up.common.fail": "失败",
  8260. "up.common.close": "关闭",
  8261. "up.common.preview": "预览",
  8262. "up.common.re-select": "重选",
  8263. "up.common.rotate": "旋转",
  8264. "up.common.pleaseChoose": "请选择",
  8265. "up.common.loading": "加载中",
  8266. "up.common.loading2": "正在加载",
  8267. "up.common.inOperation": "操作中",
  8268. "up.common.settings": "设置",
  8269. "up.common.retry": "重试",
  8270. "up.common.search": "搜索",
  8271. "up.common.more": "更多",
  8272. "up.common.video": "视频",
  8273. "up.common.file": "文件",
  8274. "up.week.one": "一",
  8275. "up.week.two": "二",
  8276. "up.week.three": "三",
  8277. "up.week.four": "四",
  8278. "up.week.five": "五",
  8279. "up.week.six": "六",
  8280. "up.week.seven": "日",
  8281. "up.barcode.error": "生成条码失败",
  8282. "up.calendar.chooseDates": "日期选择",
  8283. "up.calendar.disabled": "该日期已禁用",
  8284. "up.calendar.daysExceed": "选择天数不能超过{days}天",
  8285. "up.cityLocate.locateCity": "定位城市",
  8286. "up.cityLocate.fail": "定位失败,请点击重试。",
  8287. "up.cityLocate.locating": "定位中",
  8288. "up.code.send": "获取验证码",
  8289. "up.code.resendAfter": "X秒重新获取",
  8290. "up.code.resend": "重新获取",
  8291. "up.cropper.emptyWidhtOrHeight": "裁剪框的宽或高没有设置",
  8292. "up.empty.car": "购物车为空",
  8293. "up.empty.page": "页面不存在",
  8294. "up.empty.search": "没有搜索结果",
  8295. "up.empty.address": "没有收货地址",
  8296. "up.empty.wifi": "没有WiFi",
  8297. "up.empty.order": "订单为空",
  8298. "up.empty.coupon": "没有优惠券",
  8299. "up.empty.favor": "暂无收藏",
  8300. "up.empty.permission": "无权限",
  8301. "up.empty.history": "无历史记录",
  8302. "up.empty.news": "无新闻列表",
  8303. "up.empty.message": "消息列表为空",
  8304. "up.empty.list": "列表为空",
  8305. "up.empty.data": "数据为空",
  8306. "up.empty.comment": "暂无评论",
  8307. "up.link.copyed": "链接已复制,请在浏览器打开",
  8308. "up.loadmoe.loadmore": "加载更多",
  8309. "up.loadmoe.nomore": "没有更多了",
  8310. "up.noNetwork.text": "哎呀,网络信号丢失",
  8311. "up.noNetwork.pleaseCheck": "请检查网络,或前往",
  8312. "up.noNetwork.connect": "网络已连接",
  8313. "up.noNetwork.disconnect": "无网络连接",
  8314. "up.pagination.previous": "上一页",
  8315. "up.pagination.next": "下一页",
  8316. "up.pullRefresh.pull": "下拉刷新",
  8317. "up.pullRefresh.release": "释放刷新",
  8318. "up.pullRefresh.refreshing": "正在刷新",
  8319. "up.readMore.expand": "展开阅读全文",
  8320. "up.readMore.fold": "收起",
  8321. "up.search.placeholder": "请输入关键字",
  8322. "up.signature.penSize": "笔画大小",
  8323. "up.signature.penColor": "笔画颜色",
  8324. "up.upload.sizeExceed": "超过大小限制",
  8325. "up.upload.uploading": "上传中",
  8326. "up.upload.previewImageFail": "预览图片失败",
  8327. "up.upload.previewVideoFail": "预览视频失败"
  8328. };
  8329. const zhHant = {
  8330. "up.common.cancel": "取消",
  8331. "up.common.confirm": "确定",
  8332. "up.common.start": "開始",
  8333. "up.common.end": "結束",
  8334. "up.common.stop": "停止",
  8335. "up.common.copy": "複製",
  8336. "up.common.none": "暫無",
  8337. "up.common.tip": "提示",
  8338. "up.common.success": "成功",
  8339. "up.common.fail": "失敗",
  8340. "up.common.close": "關閉",
  8341. "up.common.preview": "預覽",
  8342. "up.common.re-select": "重選",
  8343. "up.common.rotate": "旋轉",
  8344. "up.common.pleaseChoose": "請選擇",
  8345. "up.common.loading": "加載中",
  8346. "up.common.loading2": "正在加載",
  8347. "up.common.inOperation": "操作中",
  8348. "up.common.settings": "設置",
  8349. "up.common.retry": "重試",
  8350. "up.common.search": "搜索",
  8351. "up.common.more": "更多",
  8352. "up.common.video": "視頻",
  8353. "up.common.file": "文件",
  8354. "up.week.one": "一",
  8355. "up.week.two": "二",
  8356. "up.week.three": "三",
  8357. "up.week.four": "四",
  8358. "up.week.five": "五",
  8359. "up.week.six": "六",
  8360. "up.week.seven": "日",
  8361. "up.barcode.error": "生成條碼失敗",
  8362. "up.calendar.chooseDates": "日期選擇",
  8363. "up.calendar.disabled": "該日期已禁用",
  8364. "up.calendar.daysExceed": "選擇天數不能超過{days}天",
  8365. "up.cityLocate.locateCity": "定位城市",
  8366. "up.cityLocate.fail": "定位失敗,請點擊重試。",
  8367. "up.cityLocate.locating": "定位中",
  8368. "up.code.send": "獲取驗證碼",
  8369. "up.code.resendAfter": "X秒重新獲取",
  8370. "up.code.resend": "重新獲取",
  8371. "up.cropper.emptyWidhtOrHeight": "裁剪框的寬或高沒有設置",
  8372. "up.empty.car": "購物車為空",
  8373. "up.empty.page": "頁面不存在",
  8374. "up.empty.search": "沒有搜索結果",
  8375. "up.empty.address": "沒有收貨地址",
  8376. "up.empty.wifi": "沒有WiFi",
  8377. "up.empty.order": "訂單為空",
  8378. "up.empty.coupon": "沒有優惠券",
  8379. "up.empty.favor": "暫無收藏",
  8380. "up.empty.permission": "無權限",
  8381. "up.empty.history": "無歷史記錄",
  8382. "up.empty.news": "無新聞列表",
  8383. "up.empty.message": "消息列表為空",
  8384. "up.empty.list": "列表為空",
  8385. "up.empty.data": "數據為空",
  8386. "up.empty.comment": "暫無評論",
  8387. "up.link.copyed": "鏈接已複製,請在瀏覽器打開",
  8388. "up.loadmoe.loadmore": "加載更多",
  8389. "up.loadmoe.nomore": "沒有更多了",
  8390. "up.noNetwork.text": "哎呀,網絡信號丟失",
  8391. "up.noNetwork.pleaseCheck": "請檢查網絡,或前往",
  8392. "up.noNetwork.connect": "網絡已連接",
  8393. "up.noNetwork.disconnect": "無網絡連接",
  8394. "up.pagination.previous": "上一頁",
  8395. "up.pagination.next": "下一頁",
  8396. "up.pullRefresh.pull": "下拉刷新",
  8397. "up.pullRefresh.release": "釋放刷新",
  8398. "up.pullRefresh.refreshing": "正在刷新",
  8399. "up.readMore.expand": "展開閱讀全文",
  8400. "up.readMore.fold": "收起",
  8401. "up.search.placeholder": "請輸入關鍵字",
  8402. "up.signature.penSize": "筆畫大小",
  8403. "up.signature.penColor": "筆畫顏色",
  8404. "up.upload.sizeExceed": "超過大小限制",
  8405. "up.upload.uploading": "上傳中",
  8406. "up.upload.previewImageFail": "預覽圖片失敗",
  8407. "up.upload.previewVideoFail": "預覽視頻失敗"
  8408. };
  8409. const en = {
  8410. "up.common.cancel": "Cancel",
  8411. "up.common.confirm": "Confirm",
  8412. "up.common.start": "Start",
  8413. "up.common.end": "End",
  8414. "up.common.stop": "Stop",
  8415. "up.common.copy": "Copy",
  8416. "up.common.none": "None",
  8417. "up.common.tip": "Tip",
  8418. "up.common.success": "Success",
  8419. "up.common.fail": "Fail",
  8420. "up.common.close": "Close",
  8421. "up.common.preview": "Preview",
  8422. "up.common.re-select": "Re-select",
  8423. "up.common.rotate": "Rotate",
  8424. "up.common.pleaseChoose": "Please choose",
  8425. "up.common.loading": "Loading",
  8426. "up.common.loading2": "Loading",
  8427. "up.common.inOperation": "In operation",
  8428. "up.common.settings": "Settings",
  8429. "up.common.retry": "Retry",
  8430. "up.common.search": "Search",
  8431. "up.common.more": "More",
  8432. "up.common.video": "Video",
  8433. "up.common.file": "File",
  8434. "up.week.one": "Mon",
  8435. "up.week.two": "Tue",
  8436. "up.week.three": "Wed",
  8437. "up.week.four": "Thu",
  8438. "up.week.five": "Fri",
  8439. "up.week.six": "Sat",
  8440. "up.week.seven": "Sun",
  8441. "up.barcode.error": "Failed to generate barcode",
  8442. "up.calendar.chooseDates": "Date selection",
  8443. "up.calendar.disabled": "This date is disabled",
  8444. "up.calendar.daysExceed": "The number of selected days cannot exceed {days} days",
  8445. "up.cityLocate.locateCity": "Locate city",
  8446. "up.cityLocate.fail": "Location failed, please click to retry.",
  8447. "up.cityLocate.locating": "Locating",
  8448. "up.code.send": "Get verification code",
  8449. "up.code.resendAfter": "Resend after X seconds",
  8450. "up.code.resend": "Resend",
  8451. "up.cropper.emptyWidhtOrHeight": "The width or height of the cropping box is not set",
  8452. "up.empty.car": "Shopping cart is empty",
  8453. "up.empty.page": "Page not found",
  8454. "up.empty.search": "No search results",
  8455. "up.empty.address": "No shipping address",
  8456. "up.empty.wifi": "No WiFi",
  8457. "up.empty.order": "Order is empty",
  8458. "up.empty.coupon": "No coupons",
  8459. "up.empty.favor": "No favorites",
  8460. "up.empty.permission": "No permission",
  8461. "up.empty.history": "No history",
  8462. "up.empty.news": "No news list",
  8463. "up.empty.message": "Message list is empty",
  8464. "up.empty.list": "List is empty",
  8465. "up.empty.data": "Data is empty",
  8466. "up.empty.comment": "No comments",
  8467. "up.link.copyed": "Link copied, please open in browser",
  8468. "up.loadmoe.loadmore": "Load more",
  8469. "up.loadmoe.nomore": "No more",
  8470. "up.noNetwork.text": "Oops, network signal lost",
  8471. "up.noNetwork.pleaseCheck": "Please check the network, or go to",
  8472. "up.noNetwork.connect": "Network connected",
  8473. "up.noNetwork.disconnect": "No network connection",
  8474. "up.pagination.previous": "Previous",
  8475. "up.pagination.next": "Next",
  8476. "up.pullRefresh.pull": "Pull to refresh",
  8477. "up.pullRefresh.release": "Release to refresh",
  8478. "up.pullRefresh.refreshing": "Refreshing",
  8479. "up.readMore.expand": "Expand to read more",
  8480. "up.readMore.fold": "Collapse",
  8481. "up.search.placeholder": "Please enter keywords",
  8482. "up.signature.penSize": "Stroke size",
  8483. "up.signature.penColor": "Stroke color",
  8484. "up.upload.sizeExceed": "Size limit exceeded",
  8485. "up.upload.uploading": "Uploading",
  8486. "up.upload.previewImageFail": "Failed to preview image",
  8487. "up.upload.previewVideoFail": "Failed to preview video"
  8488. };
  8489. const es = {
  8490. "up.common.cancel": "Cancelar",
  8491. "up.common.confirm": "Confirmar",
  8492. "up.common.start": "Iniciar",
  8493. "up.common.end": "Finalizar",
  8494. "up.common.stop": "Detener",
  8495. "up.common.copy": "Copiar",
  8496. "up.common.none": "Ninguno",
  8497. "up.common.tip": "Consejo",
  8498. "up.common.success": "Éxito",
  8499. "up.common.fail": "Fallido",
  8500. "up.common.close": "Cerrar",
  8501. "up.common.preview": "Vista previa",
  8502. "up.common.re-select": "Re seleccionar",
  8503. "up.common.rotate": "Rotar",
  8504. "up.common.pleaseChoose": "Por favor seleccione",
  8505. "up.common.loading": "Cargando",
  8506. "up.common.loading2": "Cargando",
  8507. "up.common.inOperation": "En operación",
  8508. "up.common.settings": "Configuración",
  8509. "up.common.retry": "Reintentar",
  8510. "up.common.search": "Buscar",
  8511. "up.common.more": "Más",
  8512. "up.common.video": "Vídeo",
  8513. "up.common.file": "Archivo",
  8514. "up.week.one": "Lun",
  8515. "up.week.two": "Mar",
  8516. "up.week.three": "Mié",
  8517. "up.week.four": "Jue",
  8518. "up.week.five": "Vie",
  8519. "up.week.six": "Sáb",
  8520. "up.week.seven": "Dom",
  8521. "up.barcode.error": "Error al generar código de barras",
  8522. "up.calendar.chooseDates": "Selección de fecha",
  8523. "up.calendar.disabled": "Esta fecha está deshabilitada",
  8524. "up.calendar.daysExceed": "Los días seleccionados no pueden exceder {days} días",
  8525. "up.cityLocate.locateCity": "Localizar ciudad",
  8526. "up.cityLocate.fail": "Error de localización, haga clic para reintentar.",
  8527. "up.cityLocate.locating": "Localizando",
  8528. "up.code.send": "Obtener código de verificación",
  8529. "up.code.resendAfter": "Reenviar en X segundos",
  8530. "up.code.resend": "Reenviar",
  8531. "up.cropper.emptyWidhtOrHeight": "El ancho o alto del recorte no está configurado",
  8532. "up.empty.car": "Carrito de compras vacío",
  8533. "up.empty.page": "Página no encontrada",
  8534. "up.empty.search": "Sin resultados de búsqueda",
  8535. "up.empty.address": "Sin dirección de envío",
  8536. "up.empty.wifi": "Sin WiFi",
  8537. "up.empty.order": "Pedido vacío",
  8538. "up.empty.coupon": "Sin cupones",
  8539. "up.empty.favor": "Sin favoritos",
  8540. "up.empty.permission": "Sin permisos",
  8541. "up.empty.history": "Sin historial",
  8542. "up.empty.news": "Sin noticias",
  8543. "up.empty.message": "Lista de mensajes vacía",
  8544. "up.empty.list": "Lista vacía",
  8545. "up.empty.data": "Datos vacíos",
  8546. "up.empty.comment": "Sin comentarios",
  8547. "up.link.copyed": "Enlace copiado, por favor abra en el navegador",
  8548. "up.loadmoe.loadmore": "Cargar más",
  8549. "up.loadmoe.nomore": "No hay más",
  8550. "up.noNetwork.text": "¡Ups! Se perdió la señal de red",
  8551. "up.noNetwork.pleaseCheck": "Por favor verifique la red, o vaya a",
  8552. "up.noNetwork.connect": "Red conectada",
  8553. "up.noNetwork.disconnect": "Sin conexión a internet",
  8554. "up.pagination.previous": "Página anterior",
  8555. "up.pagination.next": "Página siguiente",
  8556. "up.pullRefresh.pull": "Deslizar hacia abajo para actualizar",
  8557. "up.pullRefresh.release": "Soltar para actualizar",
  8558. "up.pullRefresh.refreshing": "Actualizando",
  8559. "up.readMore.expand": "Expandir para leer más",
  8560. "up.readMore.fold": "Contraer",
  8561. "up.search.placeholder": "Ingrese palabra clave",
  8562. "up.signature.penSize": "Tamaño del trazo",
  8563. "up.signature.penColor": "Color del trazo",
  8564. "up.upload.sizeExceed": "Excede el límite de tamaño",
  8565. "up.upload.uploading": "Subiendo",
  8566. "up.upload.previewImageFail": "Error al previsualizar imagen",
  8567. "up.upload.previewVideoFail": "Error al previsualizar vídeo"
  8568. };
  8569. const fr = {
  8570. "up.common.cancel": "Annuler",
  8571. "up.common.confirm": "Confirmer",
  8572. "up.common.start": "Démarrer",
  8573. "up.common.end": "Terminer",
  8574. "up.common.stop": "Arrêter",
  8575. "up.common.copy": "Copier",
  8576. "up.common.none": "Aucun",
  8577. "up.common.tip": "Conseil",
  8578. "up.common.success": "Succès",
  8579. "up.common.fail": "Échec",
  8580. "up.common.close": "Fermer",
  8581. "up.common.preview": "Aperçu",
  8582. "up.common.re-select": "Resélectionner",
  8583. "up.common.rotate": "Rotation",
  8584. "up.common.pleaseChoose": "Veuillez choisir",
  8585. "up.common.loading": "Chargement",
  8586. "up.common.loading2": "Chargement en cours",
  8587. "up.common.inOperation": "En cours d'opération",
  8588. "up.common.settings": "Paramètres",
  8589. "up.common.retry": "Réessayer",
  8590. "up.common.search": "Rechercher",
  8591. "up.common.more": "Plus",
  8592. "up.common.video": "Vidéo",
  8593. "up.common.file": "Fichier",
  8594. "up.week.one": "Lun",
  8595. "up.week.two": "Mar",
  8596. "up.week.three": "Mer",
  8597. "up.week.four": "Jeu",
  8598. "up.week.five": "Ven",
  8599. "up.week.six": "Sam",
  8600. "up.week.seven": "Dim",
  8601. "up.barcode.error": "Échec de génération du code-barres",
  8602. "up.calendar.chooseDates": "Sélection de dates",
  8603. "up.calendar.disabled": "Cette date est désactivée",
  8604. "up.calendar.daysExceed": "Le nombre de jours sélectionnés ne peut pas dépasser {days} jours",
  8605. "up.cityLocate.locateCity": "Localiser la ville",
  8606. "up.cityLocate.fail": "Échec de localisation, veuillez cliquer pour réessayer.",
  8607. "up.cityLocate.locating": "Localisation en cours",
  8608. "up.code.send": "Obtenir le code de vérification",
  8609. "up.code.resendAfter": "Renvoyer dans X secondes",
  8610. "up.code.resend": "Renvoyer",
  8611. "up.cropper.emptyWidhtOrHeight": "La largeur ou la hauteur de recadrage n'est pas définie",
  8612. "up.empty.car": "Panier vide",
  8613. "up.empty.page": "Page introuvable",
  8614. "up.empty.search": "Aucun résultat de recherche",
  8615. "up.empty.address": "Aucune adresse de livraison",
  8616. "up.empty.wifi": "Aucun Wi-Fi",
  8617. "up.empty.order": "Commande vide",
  8618. "up.empty.coupon": "Aucun coupon",
  8619. "up.empty.favor": "Aucun favori",
  8620. "up.empty.permission": "Aucune autorisation",
  8621. "up.empty.history": "Aucun historique",
  8622. "up.empty.news": "Aucune actualité",
  8623. "up.empty.message": "Liste de messages vide",
  8624. "up.empty.list": "Liste vide",
  8625. "up.empty.data": "Données vides",
  8626. "up.empty.comment": "Aucun commentaire",
  8627. "up.link.copyed": "Lien copié, veuillez ouvrir dans le navigateur",
  8628. "up.loadmoe.loadmore": "Charger plus",
  8629. "up.loadmoe.nomore": "Plus de contenu",
  8630. "up.noNetwork.text": "Oups, le signal réseau est perdu",
  8631. "up.noNetwork.pleaseCheck": "Veuillez vérifier le réseau, ou aller à",
  8632. "up.noNetwork.connect": "Réseau connecté",
  8633. "up.noNetwork.disconnect": "Aucune connexion réseau",
  8634. "up.pagination.previous": "Page précédente",
  8635. "up.pagination.next": "Page suivante",
  8636. "up.pullRefresh.pull": "Tirer pour actualiser",
  8637. "up.pullRefresh.release": "Relâcher pour actualiser",
  8638. "up.pullRefresh.refreshing": "Actualisation en cours",
  8639. "up.readMore.expand": "Développer pour lire la suite",
  8640. "up.readMore.fold": "Réduire",
  8641. "up.search.placeholder": "Veuillez saisir un mot-clé",
  8642. "up.signature.penSize": "Taille du trait",
  8643. "up.signature.penColor": "Couleur du trait",
  8644. "up.upload.sizeExceed": "Dépassement de la limite de taille",
  8645. "up.upload.uploading": "Téléchargement en cours",
  8646. "up.upload.previewImageFail": "Échec de l'aperçu de l'image",
  8647. "up.upload.previewVideoFail": "Échec de l'aperçu de la vidéo"
  8648. };
  8649. const de = {
  8650. "up.common.cancel": "Abbrechen",
  8651. "up.common.confirm": "Bestätigen",
  8652. "up.common.start": "Start",
  8653. "up.common.end": "Ende",
  8654. "up.common.stop": "Stopp",
  8655. "up.common.copy": "Kopieren",
  8656. "up.common.none": "Keine",
  8657. "up.common.tip": "Hinweis",
  8658. "up.common.success": "Erfolg",
  8659. "up.common.fail": "Fehlgeschlagen",
  8660. "up.common.close": "Schließen",
  8661. "up.common.preview": "Vorschau",
  8662. "up.common.re-select": "Erneut auswählen",
  8663. "up.common.rotate": "Drehen",
  8664. "up.common.pleaseChoose": "Bitte wählen",
  8665. "up.common.loading": "Laden",
  8666. "up.common.loading2": "Wird geladen",
  8667. "up.common.inOperation": "In Bearbeitung",
  8668. "up.common.settings": "Einstellungen",
  8669. "up.common.retry": "Wiederholen",
  8670. "up.common.search": "Suchen",
  8671. "up.common.more": "Mehr",
  8672. "up.common.video": "Video",
  8673. "up.common.file": "Datei",
  8674. "up.week.one": "Mo",
  8675. "up.week.two": "Di",
  8676. "up.week.three": "Mi",
  8677. "up.week.four": "Do",
  8678. "up.week.five": "Fr",
  8679. "up.week.six": "Sa",
  8680. "up.week.seven": "So",
  8681. "up.barcode.error": "Barcode-Generierung fehlgeschlagen",
  8682. "up.calendar.chooseDates": "Datumsauswahl",
  8683. "up.calendar.disabled": "Dieses Datum ist deaktiviert",
  8684. "up.calendar.daysExceed": "Die Anzahl der ausgewählten Tage darf {days} Tage nicht überschreiten",
  8685. "up.cityLocate.locateCity": "Stadt lokalisieren",
  8686. "up.cityLocate.fail": "Lokalisierung fehlgeschlagen, bitte klicken Sie zum Wiederholen.",
  8687. "up.cityLocate.locating": "Lokalisierung läuft",
  8688. "up.code.send": "Bestätigungscode erhalten",
  8689. "up.code.resendAfter": "Erneut senden in X Sekunden",
  8690. "up.code.resend": "Erneut senden",
  8691. "up.cropper.emptyWidhtOrHeight": "Breite oder Höhe des Zuschneidebereichs nicht festgelegt",
  8692. "up.empty.car": "Warenkorb ist leer",
  8693. "up.empty.page": "Seite existiert nicht",
  8694. "up.empty.search": "Keine Suchergebnisse",
  8695. "up.empty.address": "Keine Lieferadresse",
  8696. "up.empty.wifi": "Kein WLAN",
  8697. "up.empty.order": "Bestellungen sind leer",
  8698. "up.empty.coupon": "Keine Gutscheine",
  8699. "up.empty.favor": "Keine Favoriten",
  8700. "up.empty.permission": "Keine Berechtigung",
  8701. "up.empty.history": "Kein Verlauf",
  8702. "up.empty.news": "Keine Nachrichtenliste",
  8703. "up.empty.message": "Nachrichtenliste ist leer",
  8704. "up.empty.list": "Liste ist leer",
  8705. "up.empty.data": "Daten sind leer",
  8706. "up.empty.comment": "Keine Kommentare",
  8707. "up.link.copyed": "Link kopiert, bitte im Browser öffnen",
  8708. "up.loadmoe.loadmore": "Mehr laden",
  8709. "up.loadmoe.nomore": "Keine weiteren Daten",
  8710. "up.noNetwork.text": "Ups, Netzwerksignal verloren",
  8711. "up.noNetwork.pleaseCheck": "Bitte überprüfen Sie das Netzwerk oder gehen Sie zu",
  8712. "up.noNetwork.connect": "Netzwerk verbunden",
  8713. "up.noNetwork.disconnect": "Keine Netzwerkverbindung",
  8714. "up.pagination.previous": "Vorherige Seite",
  8715. "up.pagination.next": "Nächste Seite",
  8716. "up.pullRefresh.pull": "Zum Aktualisieren nach unten ziehen",
  8717. "up.pullRefresh.release": "Loslassen zum Aktualisieren",
  8718. "up.pullRefresh.refreshing": "Aktualisierung läuft",
  8719. "up.readMore.expand": "Erweitern zum vollständigen Lesen",
  8720. "up.readMore.fold": "Einklappen",
  8721. "up.search.placeholder": "Bitte Schlüsselwort eingeben",
  8722. "up.signature.penSize": "Strichstärke",
  8723. "up.signature.penColor": "Strichfarbe",
  8724. "up.upload.sizeExceed": "Größenbegrenzung überschritten",
  8725. "up.upload.uploading": "Upload läuft",
  8726. "up.upload.previewImageFail": "Bildvorschau fehlgeschlagen",
  8727. "up.upload.previewVideoFail": "Videovorschau fehlgeschlagen"
  8728. };
  8729. const ko = {
  8730. "up.common.cancel": "취소",
  8731. "up.common.confirm": "확인",
  8732. "up.common.start": "시작",
  8733. "up.common.end": "종료",
  8734. "up.common.stop": "정지",
  8735. "up.common.copy": "복사",
  8736. "up.common.none": "없음",
  8737. "up.common.tip": "팁",
  8738. "up.common.success": "성공",
  8739. "up.common.fail": "실패",
  8740. "up.common.close": "닫기",
  8741. "up.common.preview": "미리보기",
  8742. "up.common.re-select": "재선택",
  8743. "up.common.rotate": "회전",
  8744. "up.common.pleaseChoose": "선택해주세요",
  8745. "up.common.loading": "로딩중",
  8746. "up.common.loading2": "로딩중",
  8747. "up.common.inOperation": "작업중",
  8748. "up.common.settings": "설정",
  8749. "up.common.retry": "재시도",
  8750. "up.common.search": "검색",
  8751. "up.common.more": "더보기",
  8752. "up.common.video": "비디오",
  8753. "up.common.file": "파일",
  8754. "up.week.one": "월",
  8755. "up.week.two": "화",
  8756. "up.week.three": "수",
  8757. "up.week.four": "목",
  8758. "up.week.five": "금",
  8759. "up.week.six": "토",
  8760. "up.week.seven": "일",
  8761. "up.barcode.error": "바코드 생성 실패",
  8762. "up.calendar.chooseDates": "날짜 선택",
  8763. "up.calendar.disabled": "해당 날짜는 사용할 수 없습니다",
  8764. "up.calendar.daysExceed": "선택한 날짜 수가 {days}일을 초과할 수 없습니다",
  8765. "up.cityLocate.locateCity": "도시 위치 찾기",
  8766. "up.cityLocate.fail": "위치 찾기 실패, 다시 시도하려면 클릭하세요.",
  8767. "up.cityLocate.locating": "위치 찾는 중",
  8768. "up.code.send": "인증코드 받기",
  8769. "up.code.resendAfter": "X초 후 재전송",
  8770. "up.code.resend": "재전송",
  8771. "up.cropper.emptyWidhtOrHeight": "자르기 영역의 너비 또는 높이가 설정되지 않았습니다",
  8772. "up.empty.car": "장바구니가 비어 있습니다",
  8773. "up.empty.page": "페이지가 존재하지 않습니다",
  8774. "up.empty.search": "검색 결과가 없습니다",
  8775. "up.empty.address": "배송 주소가 없습니다",
  8776. "up.empty.wifi": "Wi-Fi가 없습니다",
  8777. "up.empty.order": "주문이 없습니다",
  8778. "up.empty.coupon": "쿠폰이 없습니다",
  8779. "up.empty.favor": "즐겨찾기가 없습니다",
  8780. "up.empty.permission": "권한이 없습니다",
  8781. "up.empty.history": "기록이 없습니다",
  8782. "up.empty.news": "뉴스가 없습니다",
  8783. "up.empty.message": "메시지가 없습니다",
  8784. "up.empty.list": "목록이 비어 있습니다",
  8785. "up.empty.data": "데이터가 없습니다",
  8786. "up.empty.comment": "댓글이 없습니다",
  8787. "up.link.copyed": "링크가 복사되었습니다. 브라우저에서 열어주세요",
  8788. "up.loadmoe.loadmore": "더 불러오기",
  8789. "up.loadmoe.nomore": "더 이상 데이터가 없습니다",
  8790. "up.noNetwork.text": "네트워크 신호가 없습니다",
  8791. "up.noNetwork.pleaseCheck": "네트워크를 확인하거나 이동하세요",
  8792. "up.noNetwork.connect": "네트워크 연결됨",
  8793. "up.noNetwork.disconnect": "네트워크 연결 끊김",
  8794. "up.pagination.previous": "이전 페이지",
  8795. "up.pagination.next": "다음 페이지",
  8796. "up.pullRefresh.pull": "당겨서 새로고침",
  8797. "up.pullRefresh.release": "놓아서 새로고침",
  8798. "up.pullRefresh.refreshing": "새로고침 중",
  8799. "up.readMore.expand": "펼쳐서 전체 보기",
  8800. "up.readMore.fold": "접기",
  8801. "up.search.placeholder": "키워드를 입력하세요",
  8802. "up.signature.penSize": "선 굵기",
  8803. "up.signature.penColor": "선 색상",
  8804. "up.upload.sizeExceed": "용량 제한 초과",
  8805. "up.upload.uploading": "업로드 중",
  8806. "up.upload.previewImageFail": "이미지 미리보기 실패",
  8807. "up.upload.previewVideoFail": "비디오 미리보기 실패"
  8808. };
  8809. const ja = {
  8810. "up.common.cancel": "キャンセル",
  8811. "up.common.confirm": "確認",
  8812. "up.common.start": "開始",
  8813. "up.common.end": "終了",
  8814. "up.common.stop": "停止",
  8815. "up.common.copy": "コピー",
  8816. "up.common.none": "なし",
  8817. "up.common.tip": "ヒント",
  8818. "up.common.success": "成功",
  8819. "up.common.fail": "失敗",
  8820. "up.common.close": "閉じる",
  8821. "up.common.preview": "プレビュー",
  8822. "up.common.re-select": "再選択",
  8823. "up.common.rotate": "回転",
  8824. "up.common.pleaseChoose": "選択してください",
  8825. "up.common.loading": "読み込み中",
  8826. "up.common.loading2": "読み込み中",
  8827. "up.common.inOperation": "操作中",
  8828. "up.common.settings": "設定",
  8829. "up.common.retry": "再試行",
  8830. "up.common.search": "検索",
  8831. "up.common.more": "もっと見る",
  8832. "up.common.video": "ビデオ",
  8833. "up.common.file": "ファイル",
  8834. "up.week.one": "月",
  8835. "up.week.two": "火",
  8836. "up.week.three": "水",
  8837. "up.week.four": "木",
  8838. "up.week.five": "金",
  8839. "up.week.six": "土",
  8840. "up.week.seven": "日",
  8841. "up.barcode.error": "バーコードの生成に失敗しました",
  8842. "up.calendar.chooseDates": "日付選択",
  8843. "up.calendar.disabled": "この日付は無効です",
  8844. "up.calendar.daysExceed": "選択日数は{days}日を超えることはできません",
  8845. "up.cityLocate.locateCity": "都市の位置を特定",
  8846. "up.cityLocate.fail": "位置特定に失敗しました。再試行するにはクリックしてください。",
  8847. "up.cityLocate.locating": "位置特定中",
  8848. "up.code.send": "認証コードを取得",
  8849. "up.code.resendAfter": "X秒後に再送信",
  8850. "up.code.resend": "再送信",
  8851. "up.cropper.emptyWidhtOrHeight": "切り抜き枠の幅または高さが設定されていません",
  8852. "up.empty.car": "ショッピングカートは空です",
  8853. "up.empty.page": "ページが存在しません",
  8854. "up.empty.search": "検索結果がありません",
  8855. "up.empty.address": "配送先住所がありません",
  8856. "up.empty.wifi": "Wi-Fiがありません",
  8857. "up.empty.order": "注文がありません",
  8858. "up.empty.coupon": "クーポンがありません",
  8859. "up.empty.favor": "お気に入りがありません",
  8860. "up.empty.permission": "権限がありません",
  8861. "up.empty.history": "履歴がありません",
  8862. "up.empty.news": "ニュースがありません",
  8863. "up.empty.message": "メッセージがありません",
  8864. "up.empty.list": "リストが空です",
  8865. "up.empty.data": "データがありません",
  8866. "up.empty.comment": "コメントがありません",
  8867. "up.link.copyed": "リンクがコピーされました。ブラウザで開いてください",
  8868. "up.loadmoe.loadmore": "さらに読み込む",
  8869. "up.loadmoe.nomore": "これ以上データがありません",
  8870. "up.noNetwork.text": "ネットワーク信号が失われました",
  8871. "up.noNetwork.pleaseCheck": "ネットワークを確認するか、移動してください",
  8872. "up.noNetwork.connect": "ネットワーク接続済み",
  8873. "up.noNetwork.disconnect": "ネットワーク未接続",
  8874. "up.pagination.previous": "前へ",
  8875. "up.pagination.next": "次へ",
  8876. "up.pullRefresh.pull": "引き下げて更新",
  8877. "up.pullRefresh.release": "指を離して更新",
  8878. "up.pullRefresh.refreshing": "更新中",
  8879. "up.readMore.expand": "全文表示",
  8880. "up.readMore.fold": "折りたたむ",
  8881. "up.search.placeholder": "キーワードを入力してください",
  8882. "up.signature.penSize": "線の太さ",
  8883. "up.signature.penColor": "線の色",
  8884. "up.upload.sizeExceed": "サイズ制限を超えています",
  8885. "up.upload.uploading": "アップロード中",
  8886. "up.upload.previewImageFail": "画像プレビュー失敗",
  8887. "up.upload.previewVideoFail": "ビデオプレビュー失敗"
  8888. };
  8889. const ru = {
  8890. "up.common.cancel": "Отмена",
  8891. "up.common.confirm": "Подтвердить",
  8892. "up.common.start": "Начало",
  8893. "up.common.end": "Конец",
  8894. "up.common.stop": "Стоп",
  8895. "up.common.copy": "Копировать",
  8896. "up.common.none": "Нет",
  8897. "up.common.tip": "Подсказка",
  8898. "up.common.success": "Успех",
  8899. "up.common.fail": "Ошибка",
  8900. "up.common.close": "Закрыть",
  8901. "up.common.preview": "Предпросмотр",
  8902. "up.common.re-select": "Выбрать снова",
  8903. "up.common.rotate": "Повернуть",
  8904. "up.common.pleaseChoose": "Пожалуйста, выберите",
  8905. "up.common.loading": "Загрузка",
  8906. "up.common.loading2": "Загружается",
  8907. "up.common.inOperation": "В процессе",
  8908. "up.common.settings": "Настройки",
  8909. "up.common.retry": "Повторить",
  8910. "up.common.search": "Поиск",
  8911. "up.common.more": "Больше",
  8912. "up.common.video": "Видео",
  8913. "up.common.file": "Файл",
  8914. "up.week.one": "Пн",
  8915. "up.week.two": "Вт",
  8916. "up.week.three": "Ср",
  8917. "up.week.four": "Чт",
  8918. "up.week.five": "Пт",
  8919. "up.week.six": "Сб",
  8920. "up.week.seven": "Вс",
  8921. "up.barcode.error": "Ошибка генерации штрихкода",
  8922. "up.calendar.chooseDates": "Выбор даты",
  8923. "up.calendar.disabled": "Эта дата отключена",
  8924. "up.calendar.daysExceed": "Количество выбранных дней не может превышать {days} дней",
  8925. "up.cityLocate.locateCity": "Определение города",
  8926. "up.cityLocate.fail": "Ошибка определения местоположения, нажмите для повтора.",
  8927. "up.cityLocate.locating": "Определение местоположения",
  8928. "up.code.send": "Получить код подтверждения",
  8929. "up.code.resendAfter": "Повторная отправка через X секунд",
  8930. "up.code.resend": "Отправить снова",
  8931. "up.cropper.emptyWidhtOrHeight": "Ширина или высота области обрезки не задана",
  8932. "up.empty.car": "Корзина пуста",
  8933. "up.empty.page": "Страница не существует",
  8934. "up.empty.search": "Нет результатов поиска",
  8935. "up.empty.address": "Нет адреса доставки",
  8936. "up.empty.wifi": "Нет Wi-Fi",
  8937. "up.empty.order": "Заказы отсутствуют",
  8938. "up.empty.coupon": "Нет купонов",
  8939. "up.empty.favor": "Нет избранного",
  8940. "up.empty.permission": "Нет разрешения",
  8941. "up.empty.history": "Нет истории",
  8942. "up.empty.news": "Нет новостей",
  8943. "up.empty.message": "Список сообщений пуст",
  8944. "up.empty.list": "Список пуст",
  8945. "up.empty.data": "Нет данных",
  8946. "up.empty.comment": "Нет комментариев",
  8947. "up.link.copyed": "Ссылка скопирована, откройте в браузере",
  8948. "up.loadmoe.loadmore": "Загрузить еще",
  8949. "up.loadmoe.nomore": "Больше нет данных",
  8950. "up.noNetwork.text": "Ой, потеряно сетевое соединение",
  8951. "up.noNetwork.pleaseCheck": "Проверьте сеть или перейдите к",
  8952. "up.noNetwork.connect": "Сеть подключена",
  8953. "up.noNetwork.disconnect": "Нет сетевого подключения",
  8954. "up.pagination.previous": "Предыдущая страница",
  8955. "up.pagination.next": "Следующая страница",
  8956. "up.pullRefresh.pull": "Потяните вниз для обновления",
  8957. "up.pullRefresh.release": "Отпустите для обновления",
  8958. "up.pullRefresh.refreshing": "Обновление",
  8959. "up.readMore.expand": "Развернуть для полного чтения",
  8960. "up.readMore.fold": "Свернуть",
  8961. "up.search.placeholder": "Введите ключевое слово",
  8962. "up.signature.penSize": "Размер штриха",
  8963. "up.signature.penColor": "Цвет штриха",
  8964. "up.upload.sizeExceed": "Превышен лимит размера",
  8965. "up.upload.uploading": "Загрузка",
  8966. "up.upload.previewImageFail": "Ошибка предпросмотра изображения",
  8967. "up.upload.previewVideoFail": "Ошибка предпросмотра видео"
  8968. };
  8969. let settings = {
  8970. lang: uni.getLocale(),
  8971. locales: {
  8972. en,
  8973. es,
  8974. fr,
  8975. de,
  8976. ko,
  8977. ja,
  8978. ru,
  8979. "zh-Hant": zhHant,
  8980. "zh-Hans": zhHans
  8981. }
  8982. };
  8983. uni.onLocaleChange((locale) => {
  8984. settings.lang = locale;
  8985. });
  8986. function t$1(value2, params2 = {}) {
  8987. if (value2) {
  8988. let result = settings.locales[settings.lang][value2] || value2;
  8989. Object.keys(params2).forEach((key) => {
  8990. const reg = new RegExp(`{${key}}`, "g");
  8991. result = result.replace(reg, params2[key]);
  8992. });
  8993. return result;
  8994. } else {
  8995. return value2;
  8996. }
  8997. }
  8998. const Calendar$1 = {
  8999. // calendar 组件
  9000. calendar: {
  9001. title: t$1("up.calendar.chooseDates"),
  9002. showTitle: true,
  9003. showSubtitle: true,
  9004. mode: "single",
  9005. startText: t$1("up.common.start"),
  9006. endText: t$1("up.common.end"),
  9007. customList: [],
  9008. color: "#3c9cff",
  9009. minDate: 0,
  9010. maxDate: 0,
  9011. defaultDate: null,
  9012. maxCount: Number.MAX_SAFE_INTEGER,
  9013. // Infinity
  9014. rowHeight: 56,
  9015. formatter: null,
  9016. showLunar: false,
  9017. showMark: true,
  9018. confirmText: t$1("up.common.confirm"),
  9019. confirmDisabledText: t$1("up.common.confirm"),
  9020. show: false,
  9021. closeOnClickOverlay: false,
  9022. readonly: false,
  9023. showConfirm: true,
  9024. maxRange: Number.MAX_SAFE_INTEGER,
  9025. // Infinity
  9026. rangePrompt: "",
  9027. showRangePrompt: true,
  9028. allowSameDay: false,
  9029. round: 0,
  9030. monthNum: 3,
  9031. weekText: [t$1("up.week.one"), t$1("up.week.two"), t$1("up.week.three"), t$1("up.week.four"), t$1("up.week.five"), t$1("up.week.six"), t$1("up.week.seven")],
  9032. forbidDays: [],
  9033. forbidDaysToast: t$1("up.calendar.disabled"),
  9034. monthFormat: "",
  9035. pageInline: false
  9036. }
  9037. };
  9038. const CarKeyboard = {
  9039. // 车牌号键盘
  9040. carKeyboard: {
  9041. random: false
  9042. }
  9043. };
  9044. const Card = {
  9045. // card组件的props
  9046. card: {
  9047. full: false,
  9048. title: "",
  9049. titleColor: "#303133",
  9050. titleSize: "15px",
  9051. subTitle: "",
  9052. subTitleColor: "#909399",
  9053. subTitleSize: "13px",
  9054. border: true,
  9055. index: "",
  9056. margin: "15px",
  9057. borderRadius: "8px",
  9058. headStyle: {},
  9059. bodyStyle: {},
  9060. footStyle: {},
  9061. headBorderBottom: true,
  9062. footBorderTop: true,
  9063. thumb: "",
  9064. thumbWidth: "30px",
  9065. thumbCircle: false,
  9066. padding: "15px",
  9067. paddingHead: "",
  9068. paddingBody: "",
  9069. paddingFoot: "",
  9070. showHead: true,
  9071. showFoot: true,
  9072. boxShadow: "none"
  9073. }
  9074. };
  9075. const Cell = {
  9076. // cell组件的props
  9077. cell: {
  9078. customClass: "",
  9079. title: "",
  9080. label: "",
  9081. value: "",
  9082. icon: "",
  9083. disabled: false,
  9084. border: true,
  9085. center: false,
  9086. url: "",
  9087. linkType: "navigateTo",
  9088. clickable: false,
  9089. isLink: false,
  9090. required: false,
  9091. arrowDirection: "",
  9092. iconStyle: {},
  9093. rightIconStyle: {},
  9094. rightIcon: "arrow-right",
  9095. titleStyle: {},
  9096. size: "",
  9097. stop: true,
  9098. name: ""
  9099. }
  9100. };
  9101. const CellGroup = {
  9102. // cell-group组件的props
  9103. cellGroup: {
  9104. title: "",
  9105. border: true,
  9106. customStyle: {}
  9107. }
  9108. };
  9109. const Checkbox = {
  9110. // checkbox组件
  9111. checkbox: {
  9112. name: "",
  9113. shape: "",
  9114. size: "",
  9115. checkbox: false,
  9116. disabled: "",
  9117. activeColor: "",
  9118. inactiveColor: "",
  9119. iconSize: "",
  9120. iconColor: "",
  9121. label: "",
  9122. labelSize: "",
  9123. labelColor: "",
  9124. labelDisabled: ""
  9125. }
  9126. };
  9127. const CheckboxGroup = {
  9128. // checkbox-group组件
  9129. checkboxGroup: {
  9130. name: "",
  9131. value: [],
  9132. shape: "square",
  9133. disabled: false,
  9134. activeColor: "#2979ff",
  9135. inactiveColor: "#c8c9cc",
  9136. size: 18,
  9137. placement: "row",
  9138. labelSize: 14,
  9139. labelColor: "#303133",
  9140. labelDisabled: false,
  9141. iconColor: "#ffffff",
  9142. iconSize: 12,
  9143. iconPlacement: "left",
  9144. borderBottom: false
  9145. }
  9146. };
  9147. const CircleProgress = {
  9148. // circleProgress 组件
  9149. circleProgress: {
  9150. percentage: 30
  9151. }
  9152. };
  9153. const Code = {
  9154. // code 组件
  9155. code: {
  9156. seconds: 60,
  9157. startText: t$1("up.code.send"),
  9158. changeText: t$1("up.code.resendAfter"),
  9159. endText: t$1("up.code.resend"),
  9160. keepRunning: false,
  9161. uniqueKey: ""
  9162. }
  9163. };
  9164. const CodeInput = {
  9165. // codeInput 组件
  9166. codeInput: {
  9167. adjustPosition: true,
  9168. maxlength: 6,
  9169. dot: false,
  9170. mode: "box",
  9171. hairline: false,
  9172. space: 10,
  9173. value: "",
  9174. focus: false,
  9175. bold: false,
  9176. color: "#606266",
  9177. fontSize: 18,
  9178. size: 35,
  9179. disabledKeyboard: false,
  9180. borderColor: "#c9cacc",
  9181. disabledDot: true
  9182. }
  9183. };
  9184. const Col = {
  9185. // col 组件
  9186. col: {
  9187. span: 12,
  9188. offset: 0,
  9189. justify: "start",
  9190. align: "stretch",
  9191. textAlign: "left"
  9192. }
  9193. };
  9194. const Collapse = {
  9195. // collapse 组件
  9196. collapse: {
  9197. value: null,
  9198. accordion: false,
  9199. border: true
  9200. }
  9201. };
  9202. const CollapseItem = {
  9203. // collapseItem 组件
  9204. collapseItem: {
  9205. title: "",
  9206. value: "",
  9207. label: "",
  9208. disabled: false,
  9209. isLink: true,
  9210. clickable: true,
  9211. border: true,
  9212. align: "left",
  9213. name: "",
  9214. icon: "",
  9215. duration: 300,
  9216. showRight: true,
  9217. titleStyle: {},
  9218. iconStyle: {},
  9219. rightIconStyle: {},
  9220. cellCustomStyle: {},
  9221. cellCustomClass: ""
  9222. }
  9223. };
  9224. const ColumnNotice = {
  9225. // columnNotice 组件
  9226. columnNotice: {
  9227. text: "",
  9228. icon: "volume",
  9229. mode: "",
  9230. color: "#f9ae3d",
  9231. bgColor: "#fdf6ec",
  9232. fontSize: 14,
  9233. speed: 80,
  9234. step: false,
  9235. duration: 1500,
  9236. disableTouch: true,
  9237. justifyContent: "flex-start"
  9238. }
  9239. };
  9240. const CountDown = {
  9241. // u-count-down 计时器组件
  9242. countDown: {
  9243. time: 0,
  9244. format: "HH:mm:ss",
  9245. autoStart: true,
  9246. millisecond: false
  9247. }
  9248. };
  9249. const CountTo = {
  9250. // countTo 组件
  9251. countTo: {
  9252. startVal: 0,
  9253. endVal: 0,
  9254. duration: 2e3,
  9255. autoplay: true,
  9256. decimals: 0,
  9257. useEasing: true,
  9258. decimal: ".",
  9259. color: "#606266",
  9260. fontSize: 22,
  9261. bold: false,
  9262. separator: ""
  9263. }
  9264. };
  9265. const DatetimePicker = {
  9266. // datetimePicker 组件
  9267. datetimePicker: {
  9268. show: false,
  9269. popupMode: "bottom",
  9270. showToolbar: true,
  9271. value: "",
  9272. title: "",
  9273. mode: "datetime",
  9274. maxDate: new Date((/* @__PURE__ */ new Date()).getFullYear() + 10, 0, 1).getTime(),
  9275. minDate: new Date((/* @__PURE__ */ new Date()).getFullYear() - 10, 0, 1).getTime(),
  9276. minHour: 0,
  9277. maxHour: 23,
  9278. minMinute: 0,
  9279. maxMinute: 59,
  9280. filter: null,
  9281. formatter: null,
  9282. loading: false,
  9283. itemHeight: 44,
  9284. cancelText: t$1("up.common.cancel"),
  9285. confirmText: t$1("up.common.confirm"),
  9286. cancelColor: "#909193",
  9287. confirmColor: "#3c9cff",
  9288. visibleItemCount: 5,
  9289. closeOnClickOverlay: false,
  9290. defaultIndex: [],
  9291. inputBorder: "surround",
  9292. disabled: false,
  9293. disabledColor: "",
  9294. placeholder: t$1("up.common.pleaseChoose"),
  9295. inputProps: {},
  9296. pageInline: false
  9297. }
  9298. };
  9299. const Divider = {
  9300. // divider组件
  9301. divider: {
  9302. dashed: false,
  9303. hairline: true,
  9304. dot: false,
  9305. textPosition: "center",
  9306. text: "",
  9307. textSize: 14,
  9308. textColor: "#909399",
  9309. lineColor: "#dcdfe6"
  9310. }
  9311. };
  9312. const Empty = {
  9313. // empty组件
  9314. empty: {
  9315. icon: "",
  9316. text: "",
  9317. textColor: "#c0c4cc",
  9318. textSize: 14,
  9319. iconColor: "#c0c4cc",
  9320. iconSize: 90,
  9321. mode: "data",
  9322. width: 160,
  9323. height: 160,
  9324. show: true,
  9325. marginTop: 0
  9326. }
  9327. };
  9328. const Form = {
  9329. // form 组件
  9330. form: {
  9331. model: {},
  9332. rules: {},
  9333. errorType: "message",
  9334. borderBottom: true,
  9335. labelPosition: "left",
  9336. labelWidth: 45,
  9337. labelAlign: "left",
  9338. labelStyle: {}
  9339. }
  9340. };
  9341. const GormItem = {
  9342. // formItem 组件
  9343. formItem: {
  9344. label: "",
  9345. prop: "",
  9346. rules: [],
  9347. borderBottom: "",
  9348. labelPosition: "",
  9349. labelWidth: "",
  9350. rightIcon: "",
  9351. leftIcon: "",
  9352. required: false,
  9353. leftIconStyle: ""
  9354. }
  9355. };
  9356. const Gap = {
  9357. // gap组件
  9358. gap: {
  9359. bgColor: "transparent",
  9360. height: 20,
  9361. marginTop: 0,
  9362. marginBottom: 0,
  9363. customStyle: {}
  9364. }
  9365. };
  9366. const Grid = {
  9367. // grid组件
  9368. grid: {
  9369. col: 3,
  9370. border: false,
  9371. align: "left"
  9372. }
  9373. };
  9374. const GridItem = {
  9375. // grid-item组件
  9376. gridItem: {
  9377. name: null,
  9378. bgColor: "transparent"
  9379. }
  9380. };
  9381. const {
  9382. color: color$2
  9383. } = config$1;
  9384. const Icon = {
  9385. // icon组件
  9386. icon: {
  9387. name: "",
  9388. color: color$2["u-content-color"],
  9389. size: "16px",
  9390. bold: false,
  9391. index: "",
  9392. hoverClass: "",
  9393. customPrefix: "uicon",
  9394. label: "",
  9395. labelPos: "right",
  9396. labelSize: "15px",
  9397. labelColor: color$2["u-content-color"],
  9398. space: "3px",
  9399. imgMode: "",
  9400. width: "",
  9401. height: "",
  9402. top: 0,
  9403. stop: false
  9404. }
  9405. };
  9406. const Image$1 = {
  9407. // image组件
  9408. image: {
  9409. src: "",
  9410. mode: "aspectFill",
  9411. width: "300",
  9412. height: "225",
  9413. shape: "square",
  9414. radius: 0,
  9415. lazyLoad: true,
  9416. showMenuByLongpress: true,
  9417. loadingIcon: "photo",
  9418. errorIcon: "error-circle",
  9419. showLoading: true,
  9420. showError: true,
  9421. fade: true,
  9422. webp: false,
  9423. duration: 500,
  9424. bgColor: "#f3f4f6"
  9425. }
  9426. };
  9427. const IndexAnchor = {
  9428. // indexAnchor 组件
  9429. indexAnchor: {
  9430. text: "",
  9431. color: "#606266",
  9432. size: 14,
  9433. bgColor: "#f1f1f1",
  9434. height: 32
  9435. }
  9436. };
  9437. const IndexList = {
  9438. // indexList 组件
  9439. indexList: {
  9440. inactiveColor: "#606266",
  9441. activeColor: "#5677fc",
  9442. indexList: [],
  9443. sticky: true,
  9444. customNavHeight: 0,
  9445. safeBottomFix: false
  9446. }
  9447. };
  9448. const Input = {
  9449. // index 组件
  9450. input: {
  9451. value: "",
  9452. type: "text",
  9453. fixed: false,
  9454. disabled: false,
  9455. disabledColor: "#f5f7fa",
  9456. clearable: false,
  9457. password: false,
  9458. maxlength: 140,
  9459. placeholder: null,
  9460. placeholderClass: "input-placeholder",
  9461. placeholderStyle: "color: #c0c4cc",
  9462. showWordLimit: false,
  9463. confirmType: "done",
  9464. confirmHold: false,
  9465. holdKeyboard: false,
  9466. focus: false,
  9467. autoBlur: false,
  9468. disableDefaultPadding: false,
  9469. cursor: -1,
  9470. cursorSpacing: 30,
  9471. selectionStart: -1,
  9472. selectionEnd: -1,
  9473. adjustPosition: true,
  9474. inputAlign: "left",
  9475. fontSize: "15px",
  9476. color: "#303133",
  9477. prefixIcon: "",
  9478. prefixIconStyle: "",
  9479. suffixIcon: "",
  9480. suffixIconStyle: "",
  9481. border: "surround",
  9482. readonly: false,
  9483. shape: "square",
  9484. formatter: null,
  9485. cursorColor: "",
  9486. passwordVisibilityToggle: true
  9487. }
  9488. };
  9489. const Keyboard = {
  9490. // 键盘组件
  9491. keyboard: {
  9492. mode: "number",
  9493. dotDisabled: false,
  9494. tooltip: true,
  9495. showTips: true,
  9496. tips: "",
  9497. showCancel: true,
  9498. showConfirm: true,
  9499. random: false,
  9500. safeAreaInsetBottom: true,
  9501. closeOnClickOverlay: true,
  9502. show: false,
  9503. overlay: true,
  9504. zIndex: 10075,
  9505. cancelText: t$1("up.common.cancel"),
  9506. confirmText: t$1("up.common.confirm"),
  9507. autoChange: false
  9508. }
  9509. };
  9510. const Line = {
  9511. // line组件
  9512. line: {
  9513. color: "#d6d7d9",
  9514. length: "100%",
  9515. direction: "row",
  9516. hairline: true,
  9517. margin: 0,
  9518. dashed: false
  9519. }
  9520. };
  9521. const LineProgress = {
  9522. // lineProgress 组件
  9523. lineProgress: {
  9524. activeColor: "#19be6b",
  9525. inactiveColor: "#ececec",
  9526. percentage: 0,
  9527. showText: true,
  9528. height: 12,
  9529. fromRight: false
  9530. }
  9531. };
  9532. const {
  9533. color: color$1
  9534. } = config$1;
  9535. const Link = {
  9536. // link超链接组件props参数
  9537. link: {
  9538. color: color$1["u-primary"],
  9539. fontSize: 15,
  9540. underLine: false,
  9541. href: "",
  9542. mpTips: t$1("up.link.copyed"),
  9543. lineColor: "",
  9544. text: ""
  9545. }
  9546. };
  9547. const List = {
  9548. // list 组件
  9549. list: {
  9550. showScrollbar: false,
  9551. lowerThreshold: 50,
  9552. upperThreshold: 0,
  9553. scrollTop: 0,
  9554. offsetAccuracy: 10,
  9555. enableFlex: false,
  9556. pagingEnabled: false,
  9557. scrollable: true,
  9558. scrollIntoView: "",
  9559. scrollWithAnimation: false,
  9560. enableBackToTop: false,
  9561. height: 0,
  9562. width: 0,
  9563. preLoadScreen: 1
  9564. }
  9565. };
  9566. const ListItem = {
  9567. // listItem 组件
  9568. listItem: {
  9569. anchor: ""
  9570. }
  9571. };
  9572. const {
  9573. color
  9574. } = config$1;
  9575. const LoadingIcon = {
  9576. // loading-icon加载中图标组件
  9577. loadingIcon: {
  9578. show: true,
  9579. color: color["u-tips-color"],
  9580. textColor: color["u-tips-color"],
  9581. vertical: false,
  9582. mode: "spinner",
  9583. size: 24,
  9584. textSize: 15,
  9585. text: "",
  9586. timingFunction: "ease-in-out",
  9587. duration: 1200,
  9588. inactiveColor: ""
  9589. }
  9590. };
  9591. const LoadingPage = {
  9592. // loading-page组件
  9593. loadingPage: {
  9594. loadingText: t$1("up.common.loading2"),
  9595. image: "",
  9596. loadingMode: "circle",
  9597. loading: false,
  9598. bgColor: "#ffffff",
  9599. color: "#C8C8C8",
  9600. fontSize: 19,
  9601. iconSize: 28,
  9602. loadingColor: "#C8C8C8",
  9603. zIndex: 10
  9604. }
  9605. };
  9606. const Loadmore = {
  9607. // loadmore 组件
  9608. loadmore: {
  9609. status: "loadmore",
  9610. bgColor: "transparent",
  9611. icon: true,
  9612. fontSize: 14,
  9613. iconSize: 17,
  9614. color: "#606266",
  9615. loadingIcon: "spinner",
  9616. loadmoreText: t$1("up.loadmoe.loadmore"),
  9617. loadingText: t$1("up.common.loading2") + "...",
  9618. nomoreText: t$1("up.loadmoe.nomore"),
  9619. isDot: false,
  9620. iconColor: "#b7b7b7",
  9621. marginTop: 10,
  9622. marginBottom: 10,
  9623. height: "auto",
  9624. line: false,
  9625. lineColor: "#E6E8EB",
  9626. dashed: false
  9627. }
  9628. };
  9629. const Modal = {
  9630. // modal 组件
  9631. modal: {
  9632. show: false,
  9633. title: "",
  9634. content: "",
  9635. confirmText: t$1("up.common.confirm"),
  9636. cancelText: t$1("up.common.cancel"),
  9637. showConfirmButton: true,
  9638. showCancelButton: false,
  9639. confirmColor: "#2979ff",
  9640. cancelColor: "#606266",
  9641. buttonReverse: false,
  9642. zoom: true,
  9643. asyncClose: false,
  9644. closeOnClickOverlay: false,
  9645. negativeTop: 0,
  9646. width: "650rpx",
  9647. confirmButtonShape: "",
  9648. duration: 400,
  9649. contentTextAlign: "left",
  9650. asyncCloseTip: t$1("up.common.inOperatio") + "...",
  9651. asyncCancelClose: false,
  9652. contentStyle: {}
  9653. }
  9654. };
  9655. const Navbar = {
  9656. // navbar 组件
  9657. navbar: {
  9658. safeAreaInsetTop: true,
  9659. placeholder: false,
  9660. fixed: true,
  9661. border: false,
  9662. leftIcon: "arrow-left",
  9663. leftText: "",
  9664. rightText: "",
  9665. rightIcon: "",
  9666. title: "",
  9667. titleColor: "",
  9668. bgColor: "#ffffff",
  9669. titleWidth: "400rpx",
  9670. height: "44px",
  9671. leftIconSize: 20,
  9672. leftIconColor: color$3.mainColor,
  9673. autoBack: false,
  9674. titleStyle: ""
  9675. }
  9676. };
  9677. const NoNetwork = {
  9678. // noNetwork
  9679. noNetwork: {
  9680. tips: t$1("up.noNetwork.text"),
  9681. zIndex: "",
  9682. image: "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAASwAAAEsCAYAAAB5fY51AAAAAXNSR0IArs4c6QAAAERlWElmTU0AKgAAAAgAAYdpAAQAAAABAAAAGgAAAAAAA6ABAAMAAAABAAEAAKACAAQAAAABAAABLKADAAQAAAABAAABLAAAAADYYILnAABAAElEQVR4Ae29CZhkV3kefNeq6m2W7tn3nl0aCbHIAgmQPGB+sLCNzSID9g9PYrAf57d/+4+DiW0cy8QBJ06c2In/PLFDHJ78+MGCGNsYgyxwIwktwEijAc1ohtmnZ+2Z7p5eq6vu9r/vuXWrq25VdVV1V3dXVX9Hmj73nv285963vvOd75yraeIEAUFAEBAEBAFBQBAQBAQBQUAQEAQEAUFAEBAEBAFBQBAQBAQBQUAQEAQEAUFAEBAEBAFBQBAQBAQBQUAQEAQEAUFAEBAEBAFBQBAQBAQBQUAQEAQEAUFAEBAEBAFBQBAQBAQBQUAQEAQEAUFAEBAEBAFBQBAQBAQBQUAQEAQEAUFAEBAEBAFBQBAQBAQBQUAQEAQEAUFAEBAEBAFBQBAQBAQBQUAQEAQEAUFAEBAEBAFBQBAQBAQBQUAQEAQEAUFAEBAEBAFBQBAQBAQBQUAQEAQEAUFAEBAEBAFBQBAQBAQBQUAQEAQEAUFAEBAEBAFBQBAQBAQBQUAQEAQEAUFAEBAEBAFBQBAQBAQBQUAQEAQEAUFAEBAEBAFBQBAQBAQBQUAQEAQEAUFAEBAEBAFBQBAQBAQBQUAQEAQEAUFAEBAEBAFBQBAQBAQBQUAQEAQEAUFAEBAEBAFBQBAQBAQBQUAQaD8E9PbrkvRopSMwMBBYRs+5O/yJS68cPnzYXel4tFP/jXbqjPRFEAiCQNe6Bw/6gdFn9Oy9Q90LLG2DgBBW2wyldIQIPPPCte2a5q3jtR+4ff/4wuBuXotrDwSEsNpjHKUXQODppy+udYJMEUEZgbd94DvnNwlA7YGAEFZ7jOOK78Xp06eTTkq7sxwQhmXuf/754VXl4iSstRAQwmqt8ZLWlkHg0UcD49qYfUjXfLtMtOZ7npExJu4iqZWLl7DWQUAIq3XGSlpaAYHD77q8xwuCOSUoXw8Sl0eMux977DGzQjES3AIICGG1wCBJEysj8PXnz230XXdr5RQFMYbRvWnv6w8UhMhliyGwYghr4Pjg3oEXL34ey9zyC9tiD2ml5h47dr1LN7S6CMjz/A3PvHh1Z6UyJby5EVgRhKUe7Kz/JU0LfvrJo5f+Y3MPibSuFgQGBgasYSd9l6GDsup0WS/T/9RTp9fXmU2SNwECdQ92E7S57iaMeJnPQLK6ixkDLfjlb7546RfrLkQyNBcC3dsP6oHWMd9G+V3JgwPHh7rnm1/yLQ8CbU9Y33zp0j+nZFUMb/DHmB7+SHGY3LUKAk8cObtD00xlHDrfNge+Z2ozU3c9dvx4Yr5lSL6lR6CtCWvg6OAPw9z538ZhhZRl6XrwhW8du1KX/iNejtwvPQIDR8+vSRqJ/obU7GupjdNdh2gW0ZDypJBFR6BtB2rg2OVtuub9JcmpHIpBoK1xfffLzx4f7C0XL2HNiYDp6bs9z23Ypn1fC1Y/9PCFDc3ZW2lVHIG2JKzTp4Ok7nv/G6Q054MIvda+bNb74pEgKGtwGAdL7pcfAa8vOKEZ2kyjWuLr7uDh+/qvN6o8KWdxEWhLwroyeek/g4zuqwU6kNrhyZcu/UktaSXN8iNwuL9/RuvVXtJ9PbPQ1vhmcP6t9+47u9ByJP/SIdB2hDVw9MJHQFYfrQdCph84evFX68kjaZcPAZJWwjMXRFpJ2zr91tfuvrh8vZCa54NA2xGWrunvmg8QWCJ/N4ir7fCYDxatkOeBB7an501agXbygVdvv9IK/ZQ2FiPQdi9osGbH+zRNf7y4m9Xu9Me7N9nv0HXdr5ZS4psHgXpJC9P/wDRTx0Vn1TxjWG9LGrbaUm/Fi5meSvcrkxf/Cg/ow9XqAUk91v3qHT97r6471dJKfHMi8Oyzgx1Z03t1YAQVT2MwgsC3u+yXHzi0faQ5eyGtqgWBtpOw2Ol9+/TM+sTOn8L08MtzgQCy+tOHXr3jA0JWc6HU/HF5Scssr4jXcYqfP6V/T8iq+ceyWgvbUsKKOn38eJAYyl56TAuCEr2WYei//9Crd/5GlFb81kdASVopSFrerKRlaoZj9HR+700H10+0fg+lB21NWBxe2lhNHsUpDZr27mi4dV379R9+za4/iO7Fbx8ECknLCPTsTDJ17O33bJpqnx6u7J60PWFxeAcCbMV56dJfQKf1bkMLfuGh1+76zMoe9vbuPUnLsb2DtmOe5HSxvXsrvWtLBEhaTx29+Ma27Jx0ShAQBAQBQUAQEAQEAUFAEBAEBAFBQBAQBAQBQUAQEAQEAUFAEBAEBAFBQBAQBAQBQUAQaEsEVoQdVluO3BJ06ptHL34b1XRjp4Ch6Rq24+kmjG4Nwwg+9uA9u/73EjRBqhAEihAoe3xwUQq5WTYEzp0b3ZnV/Ncf6O/9AvY9wlh/6dy3X7ncN512Zw9BVLXjuAP4np44vnQtkZoEgVkEhLBmsWiKqwsXpjbPBOn3gRfenwnc+7GBe+zsjclvonFDS9nA9Iy/u3x9+vAP3735VPk4CRUEFhcBIazFxbfm0k9fHD7k+v4nQFaPQIrx8Gmyx/GJ0J/t7ez7mw0b9MmaC2pQQgh0/ZSm4g5TwueWWtqLt0HuVy4CQljLPPYnB0depTn+b3t+8B4t0AdBUv93h2H9xc6da0aXs2m+r1WQsLRnl7NdUvfKRkAIa5nG//r1oGtsZvjTgev/kqYHF/TA+AXoqv4npJemOEiQU1Eo2l+G0movBK1UBBPU7s9E1+ILAkuNgKwSLjXiqO/khVtvARH8dxDBRkMzPrF/V+9/BlG5y9CUqlXinHv9mRPXtvuus88L9H3JPv2zD2yXExCqAicJBIFWRwAvv3Xqwq0/Pnn+lv/K+ZvfPH3p9p5W75O0fxaBp793ce3AwIDMWmYhafiVgNtwSMsXeHp4eNXJC8Nf0PAdRCiuf/XgrnWUqsqotcvnl9DmRkCdweX4b9N7+m/ih+mbMraLM14yJVwcXItKpT1VRve+ArC3Qqn+3gM7132jKEGZm6tXg86J7OhDfuA/iHwPUpfUZSfu2L59tXxEoQxeyxkEgjKeOnLxHb4RqC+NY5H3+2953d4XlrNN7Vq3ENYij+yZwbG9jpt9GkBPQ5H9zgP9607OVeWp87cOQtn9zwJf+xDMNFfj+jryPqXpxj8c2Nn7P+SXey70lidu4IXzb0DNB4tr9751+HV7zxSHyd1CERDCWiiCc+QPjUCnsaqmZ62O5IN7N/VUNP48ee7mAZDTf4Tt049iUG4Guv4ZfNLos9UIbo7qJWoJEHjy+bP7fNsoOcnW0A0/aacef8PdG28sQTNWTBVCWIs01OfPj66BpfqTmq732UnjgT1bei+Vq4pTv7HM8Ceg2/o1qLQug7T+FaaM3IqTLZdewpoHgYEjV9fphvOj+OShWa5V+CxvZtpzv/LwG/aNl4uXsPoRwI+4uEYjAJ2GmdG8L0FK2mYa+tsrkdXZy+P7x2ZuHdW14P+BLdank9q6Qwd3rf+ckFWjR6Tx5Q2cP58K9Jm3VCIr1ogt48lO237r3//96YofeG18y9q7RFklXITxPXV+5DchKb3ZDMy37Nu5tuxG4R9cHH6b42QfAzlds+3EPXu2rfrBIjRFilwkBIIR7SHoJDurFU89ZOd680Gke6JaWomvjoBIWNUxqivFD87fej0e0n8Fwvr0/t1rnyqX+QfnRz7g+8FX8Rv8vL3auF/IqhxKzR2WCPxXqKeq3krDTdj2ierpJEUtCIgOqxaUakwzNBR0D09yiqePHOjveyOkpxLr9VMXb73V97S/h3nDXx7Y2fdPkAYbncW1IgIDxy5vM7LZt/hgrnLtxyaBrJNxv/72N+6tuNhSLp+EVUZACKsyNnXHvHL+1qcgNf2KbSXu2bt9dcmS9qlzo/fARgcmCtpzB3b1/Vg5QiuslLowENyDWDn8cSjl98PgdBviu03N+rl9/WufLEwr18uDwLdevLTF1YK3xnVZ2HI1bUxrT7z5zTuXdRP78qCyeLUKYTUI25OXbm4JPO00TBj+6I7+db8ZL3ZwMOiYdG4dA1lN9HWte2iuI2NAVPapC8O/CGPR34Ip/AZIbIMo7yX8G9QMbcS09P+2b1vf5XgdrXaPfiYns9oeLLEd8D1/B7Dp0E1jGP042pXQj7RKf546cmGzp+tv1TRf6YQD35/QO3seP3xow5IfC9QqmM23naJ0ny9ysXwgq98BWc0kVhv/Nhalbqe8kd/Fr8MOSEr3zEVWrwyO3I29hl+E9LUHGf+nAXI6sGPdd8uV2YphIKnE5IyL6bLxk7cn3bdkHHefrpvJAExMZ1uBZmqeNzXtfzUzk/m/ens7LjV7Px+8d9e1579/44l0duZtge+Np5zEEw8c2pBu9na3YvtEwmrAqNE8IZvNHsep5//yjl3r/0O8yFOXbv0QCO05gP0JGIL+fjw+uj91YeRh/Dp/PtCDM7Zpfmjvjt6Xo7hW9ycmJjaYduf7Hdf/8HTGfa3rG9rYxLSWnsloPg7fijZV8oFM2Ja2a9t6EJd7bCztvHP7us4rrdD/r3/7ct9I99jEI4cOiQ3dIg2YEFYDgOUJDFj1e8TqX7cT4kImXuQr5279A4DeBEX8ayvprU4N3rovcALot/TH13T0fXDTJn0qXk4r3k9OTm4y7a6PzjjORzOOvn1kbEqbnEprPhRzwAKzwFLHk05hv6Yd6N+o3R6beG50aPSdr3qV6IJKkVp5ITIlXOCYn4Yexr0w/DO6YXymHFlR0e5r7tsM3fxgJbI6fW1ivTeT+SsYmr54cFff+5Cu5X+hb94Merp6/J/PusGvTE6724eGJ7RpSFOkKPCUZvBPBccoHBet3Rwe13rX9tw/PjXzZ5hKvr8SfhWKkeA2REAIa4GD6p0feRdWBnvxjv2PckVhVfBf4A29uG/X2i+Ui2eYn8n8NryuDr3jPfWSFV5k44UT137eshIP2K7/64cObbheqZ6lCp+Ydt8TBO7vTM5od1+/NR4SFVhoLpKKt410lnE8LTMzo3V2dLznxLkhYgQ9obiVjEDln7mVjEodfYcpw+MAsftg/7qSDbAnb97sCSb0Yei2fqOcbovVqKNnNO8HmAE9Cv3Wp+uoWjt27HpXNqH9WTKR+kBHKqEFbvo5y3N/avfu4g23R45f3WGa1k9ZicTd0zPTf/f6O7f8dT311Jp2fHzmgJlI/N70jPPe4bEZ6Kg4qw0lqlrLiNKBiLWerpTW25PUbkPXZViW62ecHz+4d8PXojTirzwEyhq8rTwYFtRjvpX/rlwJ+iSXugPbMuyKBOHo3geRJtuT7PujcmVUCuPJlhnL/9NUqvMD2eyM5sxMaIlE4n7XML907tyNjcxHQjty4sZv66Z1xEok/xNW5n4uZSf+8sT5m++vVO58wkEu5sR09pd9w/rWyET2vReujiqygrSopn/zKZN5qMeirotKeTyolm7p/+X06Wvr51ue5Gt9BISwFjiGsLl6N6SrvylXDNTK70D4mX071pwtF88w6Jd/DG/1E1u26NOV0pQL71y3/8PJVOcHMzPTWkcCH2YGOaTTaS2RTN6f1fQvvvDK1bdnbO2JZCr1SeRfn05Pa1PTU0gXJBKW+ecnzlxvCGndhFQ1NRP8bcY1/vjS9bF1V26MwHwsVKiXa3etYVw1TNhYJ3TDjQCO42jJVMcez7J+t9YyJF37ISCEtahjGjxkGDr2DJZ31D8h5vUQJL5RPkXlUMM07u3qSGidICvkzzuSlmlZb0olrK9hD9v9JCrPC196JoPMAolFg6CV+PPj54YeyWecx8Vk2v1Q0rSfhFT18LnBmzBRyNalp5qrSuq7kiAsh4SFa7oZ9M0wzI+cPHOjZPo9V1kS1z4ICGEt4lhiCvZrSa2jol7qzPXJPk6nIGbVbWfUvcr7hO9MP97ZVXpggOu6ajplYStj7l1XvbRMXbPAbp6HzSSBlkraNknrvfVCcPt2sHYi7f3pTDb47KUbYxuvKqkKpYBXKBnV869c3WgbDEixAck0FGFFfEzJzbIsO9C1TyrcymWWsLZGIHoW2rqTzdo5dXyykz0NC8l779i5vu4zwM+eHVntGP5jqVTq/6AkVc5NZ3wNH2lVxNWZNIukMSjiNd9z0+CHp5DXAdX4SAg203w8GB5IATtODHzdK8C15kEjhXvNS9rWA11dnfcMDY9prscss48RySakrOLWqODCoIKAgkuVgsS0urtD60haeV1YYVbbtjUn6/74HXvW/11huFy3PwKzT1r797Upe3jq4sib9u9Y+wxe+vh7W1N7jx49v6ZzbffnQD4/Cj1Pfjx54XiBls6GVuTUc9mQsOIO9mPQFdkIRlz4fy5JLm2ZMOqTcJaXIqpcqnixVe+rdbZ3dbc2OT0D0wZIibHSksmklslknvx+//q3PiKnXcTQae/b+LPQ3r1t0969cOL6G7o6E09qgZegdMJBpVQ1DbKCpyUt6oPKz/4NEJalCAuZFIuEVBJd+jgLh4rvAiFqUVGkhJZMWFp3Z0obGSu/d5gSnWmavuO6h+/cvYHSobgVgoAYjrb4QPMUiGtj1/79jBMkLBwiTlMASlYzTkhWCJyTrGAyMOFkst/BoYMmuIIyGJYcMXMMdNwHPhYN1qWS1t6ZLGaKZL8yzFXTr15BooLLMugHMBRNKgW+It8y9TEcJGt4rvcRFCCEVQbFdg0Swmrxkb0+cf2XOzq73kgdFieEXF2jdEUJKQH6SVWQrNjtZDKlpTPp38U58iUbthk/Ph7sN6zg/xudSGvD4xkq6otcnnjyF0XRRTflkyC0IIJE1JG0QbqGNpMNp5xFhRTcZDNoj66988SFm5vv3LX+WkGUXLYxAuXnCW3c4XbqGs9hwjv+a9lsuN+ahOJSCoLjNDAFvVUll0p1aNPp6adTweSflEszPO48oFn+4yOTmR+6enOshKyYhzWpf/jDuuf6x2aV/qNRaPG/1d0gUXWCA0uu7GhMmkqmerEc8KOVU0lMuyFQ+Ylut562YX9Sncmf7Ojo3BDZWbGLtMkiUVXSWTFNuMqWuYG530f7+/tnGFboxsfdd9mm8XdDo9O7rg6NFq0CFqZr5DWlK9qV0fZqGvZchSuPlevB2VmG/hOV4yWm3RAQwmrhEcW64qu4ykfJho52Vp3J8quBYQooqWDKADftBd6HD+5efyoKj/zR8ew/hWXY56/cnFh7a3RCTTGjuMX0SVB9qzu1qfQM+jO3dBW1g6uVSHv/qVNX10Vh4rc3AkJYLTy+WA/8ou9kJjo7bOh+DLVFZ64TEbCyBktxI5PJZj56R//Gx+NdH5vM4vuI+p8NXh9LjU1iw3EZhXc8TyPuuV9wDaaCfBjTM06N0hVWQmHBDzvSDZ5tvqYR7ZAymh8BIazmH6OKLbzv0KZvJEz3ZzEFnEolaEtV2XEaCLKadrIz//TQnk1/EU85NuH8th8Yf4j9gMZUOrNkZEVZCnsbtTU9KW18GqcKFyjh420sd2+j33pg3F8uTsLaDwEhrBYf04O7N/2t7/o/C2FoGnsIy/YGlvAwSfCvZzLOe+8oR1ZT3u/5uvHJC9dGtJlMrfqjslXVHwjpat2aLi2rjFFLjUSrFUjlO0juddXSSXx7ICCE1QbjiHO0/hofbPgwpnDTOR2V6hWNQqGUx34890noet5yaO+Gko3Y45PO7/uB/lvnrwxrWdha1absbgxo1FWtwplXqYSJY5Nn5lU3bLHQmGA/yko0plVSSjMjIITVzKNTR9sO7dv8RSeb/T9BWmMkKv4D+YzBXuljV7yxd+zfte6VeHGKrHTz4+cv38JWmyUmKzSGG5z7VndoE7kz3uPtq+Welvhwm39weVjOyaoFsBZPI4TV4gNY2Pw79mz8KyebeRIH+VEZTaX0sf27+v794TKmCxNTzr/2NOPj5wZBVjjdYSklq6jN69dyKuhqmWztivYob+RTSkPbe/xMdlMUJn77IiCE1W5jq+s4dYEO6mzsYAmvi/+CrH7LDYxPcBq4HGTFVcG1ULLT5orS1ULIkoSFI2cMHKG8obiXcteOCAhhtdmo6gaOh4EWWlkyYU9gvHswXfgV19d/7+LVkSWfBrItJJhObL/p7elQR8fUZnEV70XxPc01sM+xrzhU7toRgZIHuh07uZL6xA3LBaYB+Ar8rBsfz34YX1j+D5eu317QNGy2xPquSE4mDuXb2IujY2AgytNE67RiKFshzuwCR5s9ZSMlsK0QEMJqq+GkBKOF5yFzRoidK5BoFCeMjM/8mG+a//Xy0Li55KYLBRiTrGjwOQ1br4VMBQuKVJeQKVPxMLlvPwSEsNpsTEECmBLSgbHUpwD1YGwse59l2p+9fmuig4fiNZIowrqq/6Xeqm9Vh9JbjcOKvqFtACX7gV8kTVZvkaRoRQSEsFpx1OZoM2iKxxuHLtDcsZlgLzYZfv7m7XSv+r7fIm234XSP/8o5ktWqzqSyZr89PoXPYDTYkZvziw0NLluKayoEyq4iNVULpTF1IaDjHHZmoAW4aep9geN8fiLt998cGYdtVp7K6iqzXGJFUCAi7jdkuapsBJKcPBwgyP8YRyV7B04Q3dDbpY3jg6gupoMNla5U41BbUN9n0sr1ScKaHwEhrOYfo7paCAW0WiWknihhW/0Tabf/6tDtxpIVSIhGnz1dSXUkDL8fSHKi4/lWPId9Kp3Vxqegp8J/m9f14D6DQ/nmb281FwgkZ1Dj7bnSSFx7ICCE1R7jmO8FJJr8jCvjeNrIxFjDJBpKVaSlXhwDw384MyucBoLAGEfHI5ptO6n1YAq4FjorH9IWjUOnFlF3pj62aui3whbI33ZGQAir/UY3XCVEvzgdw/8NcSyGUhSlpVWQrFg2p39xp0JYLyIohaXxdZ2FGofG6yi85/QS32F0Asu8URgu1+2JgCjd22xcsVElPC85169Gaa1YTkRWJKpSqooBiQQzONvq9sRULKKxtzzAEJw1api2EFZjoW3K0oSwmnJY5tcoSD09HanEDztubnfO/IopyUWC6sUmZUpW5aSqkgwgK04DxxaZrFivacCaIdAuH9zaM1rSDgloOwSEsNpoSMenvU93dXb+EE5taFivKElRqd67qrNmsqIF+yjMF/i56MV2JqadYKxXMDXM6+4Wu04pf/kQEMJaPuwbWvPticwj4Il/NnTrdl7JrqaDC5wTUle1GmdWWVCw1+JotjA6PgnThsIdQrXknF8arkJi/+R355dbcrUaArU9ha3WqxXW3tHR9C5dN//T9eEJ3aGdUwP7T0V7F86Mr0VW4mF6o2NTS/ilaB2HDmb8wA2+08AuS1FNjIAQVhMPTi1NgwRkGKbxRxMz3uaJSRzVUkumOtLwo6Zc7aOkVdEhynN9NQ1cyuNqeEqD67mX9TXGyxXbJhFthYAQVosP58S0909czfqJqzdGODVqaG/IUbCWr2p0yukfp4FUtDfeir1yl8IPUGjPHFy/fqJyKolpJwSEsFp4NEfT6Z3YBvOp8MvMc0hAi9hHNQ1cBrJil5TUZxhfXsTuSdFNhoAQVpMNSD3NMTzzU1PZYAM/ProYkg3UV5rHT8lXmA7SwnwEq4FLLVkRI04HM+n0LdvzvlEPZpK2tREQwmrR8ZucCd7hePr7rw2N5PfxLUZXON1zHKz4kb0KnIttP6Njk8tyaimbwXPrsW/yq3v3bhoqaJZctjkCQlgtOMCYCnU4GedTI+NpQ32XbxH7QOmKG5nzdIWZJz8HNkKygqI9TmSL2JSiovGVn0A39c8WBcpN2yMghNWCQ4zPc0HRbr6GEs6chJFnmfl3knZO4/hmII1B6fiFG9br0s6qAeXPp2WUrhzHeXH/jr6n5pNf8rQuAkJYLTZ2kK7Wul7w6zeGx9DyUsZovOodOizosTg1TM9k1Wogpa7lIisOF+w48E/7E5B1Y/cgtdizsBKbK6c1tNioT6X9n3MDcyePOo7OoJqrC6S0+ZIYV+GSOHxvc18PJCxXG4ed13I727axqTp9yk9rX1jutkj9S4+ASFhLj/m8axwdDdbgELxfGsLpoZyqVXPVU1QugVJUV0dC27p+FaaBWWxknq6ceAljTNMiAf/BoUMbJpewWqmqSRAQCatJBqKWZpgJ731Zx9pJM4aK0hXe5vlKVFEbKFlxs3PvqpSSqpbzKztRm+gnEkktnU6/2GFMfa4wXK5XDgJCWC0y1iAR6/Z49iOjY7C5qkG6mk+3SFQGlEP8FFdnygrNFqBsn1OxP5+K5pGHbcBhqhT8fqu/v39mHkVIljZAQAirRQYx7Wj3Zj3tddQjVVJ4l50CMjHe8mqOTJCCvmoTyIrENXx7Uinbm4Gs2PZUqkObnp76i0N7N36tWl8kvn0RaGnCGhgILKPn3B3+xKVXDh8+nPseX3sOlpt13+P4uonv71WeDqLr1ampFB8S1JrulNaHc9rTMxltcpofOeWns0rTLkeIZUHRnpm5YibMf7kc9UudzYNAyyrd8ZLpWvfgQT8w+oyevXeo++bBtaEtQd9s1/ffRsV3I6eDJCp+nourgH04UZQnhIYfWm1o8xdUGCU8/E/bil89sH3dlQUVJplbHoGWJaxnXri2HTvd1nEEcCBS3z++MLi75UejQgcmJjL92ax/gNJPo6QekhVXAbdvXI3D+XQ1Bcxiu02zTAEjKFIdHTQS/S8Hd2/4YhQm/spFoCUJ6+mnL651gkwRQRmBt33gO+c3teNQYin/oG6aKX5rcKEukqqoWN+Ij5vy81v8UATDG0WGC21jlJ96K6wKPpWd8H8jChN/ZSPQcoR1+vTppJPS7iw3bIZl7n/++eFV5eJaOczX9Z2YvM1LPxWpocBHKv8qHHdMqSphGUqqahaThfj40ITBcbLnsDj6oXvu2bS4n96JVy73TYtASxHWo48GxrUx+5Cu+XY5RH3PMzLGxF0ktXLxrRoGNVPPfNtOolIrgElLGYH2wbZqcipdIFVFlDbfGhqfj9bskCaHHS/7gTt3r73Y+BqkxFZFoKUI6/C7Lu/Bl1jmlKB8PUhcHjHufuyxx/g5lbZw+BL7bX4EoiZqyS0T0uM0j1+82QSl+ua+bhxj7GjD2LicwWkLzaarigbKsmDJ7gcTmezMBw/t3ixntUfAiK8QaBmzhq8/f26j77pbaxo3w+jetPf1B5D2RE3pmzyR4/nH+Mti4Wx1dUrCHO0lSVGqskFUnakkpn6mhu086jgYHkWTW3Wbo4Tli6L5gqYHE47vfeDufVv+YflaIjU3KwItIWEdO3a9Szc0ElDNDqcLbHjmxas7a87QxAnX9ljfxcr+Mzs29ykpi1O8iJjoR/cm5o7dnUl89LRLW93dyWmVIip+Kp7pmlWqIvQ8Mga9Gslm3Efu3LX+K008HNK0ZUSgplnGMrZPGxgYsIKeXa/TA61jPu0w0+7xBx/cd3M+eZspD0wbDgWm+RXP13cODY/jWGKuGAb48jG+agNpilbqlKZoWDqDY2AyjtNUlupzYZlKpXgaxIVMNv0zd+/d+uxcaSVuZSPQ/IT13TN34QRvZW81n6HSDdMLUqmjh9tgd//Fi8OHEl3JL3Z2dh3MzGA7XU664llVWRz/QhLjNYmsmaWp/DjCjqIDdlaZTOZZ1/A+fGj7hjP5OLkQBMog0NSE9cSRszuswNhdpt31BRnazM3U9IuPHDrUuG+419eChqU+cvzqjp7u5P9KJpMPpqc51Zv9QntLkFQBEqZluVCw/7nhaP9i376+8YIouRQEyiLQtIQ1cPT8GjOw7vE8tyFtxBrb2MBXdh579FF99g0vC0nzB548ebNHT2l/aFmJj1BPBYyav9EFLaQ+jdPAVNL8/pZ13a8qiJLLOhAAjvrTRy/d0enbF+69d0tzHFhWR/vnk7Rple6mp+9uFFkRGF8LVj/08IUN8wGp2fIcPLh+4sCu9R+F3ucj0MLf4vaVVnChqYWmdaQS2jpY2vd0djh86Vqh7c3Yxm8dudTPxaW0lrn7yJEjZW0Tm7HdC2lT0xKW1xecgHE3FDWNcb7uDh6+r/96Y0prjlIO7ur7TOD5b3ayzt9ylY0Gl83qKFXZsCXrXdOlrV3djf2LBr556JOshLDmMWhPPXV6vav5O5jVxYLUhNl3iIbV8yiqpbI0bQcP85C2Xu0l3dczC0XUN4Pzb71339mFltOM+Q/0rzu5f2fvu1zH+QDOt3uZ0pbVRMRFouJK5qqeTkhVqyBdtdUmhGV5JI4cudrpd5kHiyp3tTU/8s6r+4rC2vCmaQmLWJO0Ep65INJK2tbpt75298U2HLuiLh3oX/95L+0/kHUyvwTieiUJHVEimVzy1UKeWMqv2pCoKEVFRNXT1aHawnBx80eAZj7TwcxdAc5Gi5fiaNnNT37nCk4xaV/X1IRF2B94YHt63qQVaCcfePX2K+07fMU9U7qtHev+xE/7r3cc70O+6w1gxuV0dHZiusgvJS/O7IskRXLs6KCxqj+B26t9a3uUREWi4plbQlTFYzXvu+7tB3EIUGel/L6e3TNw5NS8zYAqldss4YvzBC9C7559drAja3qvDoyg6pwCP+KBZaVOPPjazS1vMLpQKE9fuPnawDB+EqehPwzWuAuSl8LPg90WVxhJJPWQCUmPBAWTBEz1TFUGpqO3wYYvIPgr2az35a2b1/50V6f1e1NTlVcvEzB0xRekj67usu5FmS2/crvQcaol/zeeObfTSOj91dIq28PxiaOHDx9quy8LtQxhcZBqIS0Dhkl2l/3yA4e2j1Qb2JUUD1Iyz1waOQib0vsxKXsAFvH3wMB0JySwtZC+DBPTN5BOCEnhrI1BuKe9l6tIzsVCiD6E0DOabrwI2elZ09aP7N3aNxjheXvK+a1OENa0EFYEyYL9rz072Ju03ZpNQKj7Xd899cKhNrA9LASvZTY/s9GcHoK0XsrakLS8UklLxyl+/rj+/Qfu2367sJNyTS7SuZfneO7ffweBGScu3NwAqWgrTvTc5jjBZmw87tMCfRXYKQWOgula4OiBOQUZ7DZuhrAGdQXxV0zPuCaGnkv3VPGHOpPw7+QPR62OM5HhdNddGOeX2kmCbSnC4mDlSStVTFr4eLljdHV+702vWz9R66Cu5HS5h5hmHvz3QiOxwJTRo2BGgY06dm7OVhewYGAY6s75oD+ZDs4JPY9JyqSCQ7ABqftd5VFM3/j2Ja4mtsWpJQSq6ZXu5UZTKeJnsHpohiYPRqBn04nkS2+CQWW59BK2dAjwS0Y4IHDz2ERWG8Gnwm7iK9W3sFmbvrqGPzw6gW8eTmvTM07XmTPX28KYd7EQ3rjnvv1QFHbPt3zT9DcMPHd+13zzN1s+/hC2rKOo7NjeQdsxT5LEWrYjbdLw05eHtwWe9jl0542u62HZHZIVpalY/yIlP5X3MHYddLLZfy4fmYiBhNuB509vw+rG3tKY+kOwGHLi7W/cS91jS7v4s9TSnZHGLx8CICH9lXNDX+zpWfXuycnaBV2e3e567nAm4973qv0bzy1fD5qr5oEB7KXt0u7B3Loh7yhWVfypbOalh9+wr6U3mbfklLC5Hi1pDRE4ef7Wj+EEiZ+amqpvJT2bzWjJRLIPR3n9riA5i4DZg720DSIrlsrvHXSZ9p7ZGlrzSgirNcetqVp9/vz5FJTqj6JRejTdq6eBMzNpHP9s//QrF4bvrydfO6f1JrCX1mvcXlo98Kembjotr3wXwmrnp36J+pYNeh5JdqRem83O77gxkpxtW3bgOZ/g1HKJmt3U1Rw+3D+zrc89aunagnWzpq6PdxujLz388L4F78tdbtCEsJZ7BFq8/sHBoMPX/I9hyrGgnuDUUZzrnnz7yQu3HlxQQW2Ued++fZmJ1e5LoPB5k5ZpWCPXz+08du+99zrtAI0QVjuM4jL2YcIZeh+2+9wF49MFtYJSlgmHE0g/JlLWLJQPg7RmhtyXsJ18eja0tivsXhj6xy9ve/mRR5TRcG2ZmjyViN9NPkDN3Dz1FW5z9XM4i+s1ME1YcFNpUIrVLHzJzHnwjl0bn1twgW1UwPHjxxPXpztejR0HFTc+F3YXRwxdfdM9W08D0zrs4wtLaM5rkbCac1xaolWOvurhZIPIih0OdVm2haNTfqUlAFjCRnJP4HBn+iUqz6tVa2nGpTe/etsP2o2s2G8hrGqjL/FlEQC5GHghfplSUSMdvwaEA/9+4vjpa3c2stx2KIsfUek2dr+EuXNF2xEjSJx98w/tbFt7NiGsdniSl6EPp84O3W/Z1oPzXRms1GRKWdCJdeCIlJ+vlGYlh997r+70+EPH8NHJEtLCauCph+7bmj81ox1xEsJqx1Fdij4Zxi9AT2KSYBrtslgxhOD2gWOyz7AstFzx6zFHj1mGobYUYAgC9cHge3ddK5uhjQKFsNpoMJeqK6+8cm0X6noXiWUxHA8WxAdWNyQM45HFKL8dyiRpueM7jllmMGpnjO+1w9fNaxmXxiogaqlR0jQdAkeOBPjczrnOiQ6jw88ESSOA6KT7iQzOHEvavu1pZsLQg4QPP/DdZG9Xx/vWrOr+mfR03SvtNffdxleAQIgvTzjBT0w409Mpu2faufZy+vDhw5WPMa25dEnYqggIYbXqyNXY7i/jCyvdfmaVb5hdVsLp9LJGp43j1/1A7/RdvdMwPRzEboRnLVHe9vEvL3eXBOB4ZMta22H+TiqV2LJQ26u5u6Bju44Z3J7O/Lvp6cwPmBanOwQ4uNHRTWMK21bSvh1Mm642nTWCtKkH07rnTE72aOO0XZq7bIltVQSEsFp15HLthg5J/+aJE12m3tVjOPYq1/dW4cTjHnwMYhXOce8xDd3y/PJW6OpMdsTRVy4iK/rKMR/jwvz825VIHFzT3fkx13UW/dnhRy3GJyeeHEs7n1XNibUPFvY6vtGDw5vV9w0Vofn81qGhZfDhi3HX8SfQ/3HPMse9CWcCX0gel2OIFJIt+2fRH7qWRaYJG85NxldGzV4tGayFSLQ24+q9ULyu9gJfMU5ELTn6wUISTl03NHz1KzyiJLqmX657OLLdSJgoXTO7cBxyN172blier4YCvBsFdSNXV2dC35tKJrbzfPfFdjwvC/qs9MSMxxNRsSqmT6LhUDQHE+jUBE7UnATXTuLsrRn01K2l/x6+qItiR3TNG8V59KNB0DGSfNXGUXwJY2Gm+osNhpSvEBDCasIHgVLTt75/aQ0MnXpBNb2QgNYEntfr4wu/nBYpKQLtxtdwAh0SBX3VDe7nM/Ha5vf1Fb/CURS2bCTAWWuxR229qRsbQQQbUed61LfW14JVKKsTJ5sk8WUcHbtlNANyTOhgcmAGKH7p3m1FWpqtuZCu+LByVdKHVMjpKEQrBwIW9tnpXOIH+QTDSH/D9f0bmCLewDn1I4HmwtAypPDZ/oe9oXKf/aMPsWxSs/RR13FHrURiZE1gDR86tKHEdCDMKX+XCwEhrOVCvqBeHNaW6ui11/mWDtLQ1kEiWodXE4rwYgepAPssTPCMOjIdAk94TZ8pMZjch8HjDorGFUTUAwlkh64be0A9/ZCatiDZWtOyE7ClQmIdJICJFYhA+TRV4Fo5/QIHiUvrTEbkVRCxiJfsSBbfYk87OTExXxdazY5yUgiRKfpHQ1YSkONmAZY+gV4NIeVFfCXoLNA5h/Plb5LzWAyzF+IVXdNnvO/6GcsyhjC1vmWZ7s2pO3fdOqzriy9asnJxZREoerDLppDAhiIAEtCfO3F5rW0a6z1PX4/nf53nG5RqqrpieSnULEVh8cx4E7ugH78H8tG9eP/24oVezY+pkpA8b/abhPF8le75BqdsXUtaFeaTlTI2IByEoU1l8oq1mkokcZHElIRoWmpejMMCMyCvQXyy7JjjuUcgOl4tLCzCMpTHgFpcgkViX/dH/ax2Szf8m2Yqc/MN+1r7BM/C/rfCtRDWEozSkbMjq7NTY5t13dqE6dhG3wsSqlp+C9DDi0ifLrqmT1f6BgUaPjiHN0lJAGAfvpWcI4XjiHIMF6ocO/EjmMa9HeelQ1LT1PRpoce/sJwOTCQtc+kfGQp6Uxl+9JWtmL+jNEaJ0gKBgbsygR58B4sHfwV5aliVWg3vCHv6ymHcdG868IzrVsK6pnd71+/dsmXxbD3m3/W2ybn0T1/bQFe5I8euX+9ybuqbXMPbDA7ZCKV4uMOecyz+9OfmWvj9x9zEw6JW+JuOX298WhE6qtwLEV3TL1tb/AWj7sqwfqaro/sdmcyM+vBp2XzzDEzaBiQsNH+e+eeTjQ+ohwqnG0BYhfVzNYKrkOmpyauYYH8KvD8G6RPBszrC6Jq+ystl0ghzXEZjR5+O4+iZwTh+eG7Yqa5rq/3hGzzTSkXKn4YgIITVABjBP+ZzP7i8ydasrZCetuCHvIvFRs92SEdlpnCYE2LOQi12OA7RNf1yjrphHIyE9yOXPnfNMDg70DpdTf8DWDKs5rRvMVwChAWrUgh21HzllD0NrigqlxKVC7bKQuOOWeGiuI7OTkhb6T8C/Xw3xkel9cXxj6eIxiY3Hhx3X9dHsWJwDaa3l1+zd9Mt/F4tUk/ijWnP+/DBb8++LWqvnh0c7NDGta0pO7kl6zpb8AJzEUr91kYEFdeBRCt69Nm4+AsSl6jwjVGckY6VwPwUpLhLURx9xliWvxFHi/w+zB0SWCnLsVpxnoXesSI2ngp4zmRJXPgf/0IleGH51R6uwjeX5MR76qtITh7+8N9Cp4GF7Sm8Zl1s35pVXVomm/5c1vG+Wm284njHJeJq44/FjixUAld8w7uijW6+xo3MhW2S6+oIVHumqpewglJ87+LFtcFUcqur+1vxwPcZJqYPMOyhXw6GKI4+4/GwQpjCBhe+6XDIpFb06PM+np5hhS5eXzw9bLJ2pBLGv4Fe36BU4kA6IQGw8MUY6MJywVeqDs54Z69zrWdY7jI3G1ZtUiSV6zzDI3IqLLew/wu9jspl+yywrA1pEed5QceXPT3jBb/DLrA5ua5UHZ/4eMTbFx+fwvE3DJO8fANrjlctL7giJhRx9MrfR89R+VgJ1Y6currONuwd0FNsxwtV02mPlWGLy1TxlPHf6Hh8PH9xesvw9yRM+5PIRT2ZIgVKKZxWUY/PT8aTFPji0i3m4Ed1hDWV/7uY9bNGtiGqAyorJRWSqCgdkrQiR5KddrwPlsq8xfhG6efvx8dvtiQczDdmmPaldDBxSVYeZ3GJXxUMWzxq5d4fPz7Ym7X1HTAL2A7NqtJHEQ3qtCPjw3LoxB/v+OMZ5VVzR5aHWRuErYA+y4uu6fM+Xl9J/lh7bFvbY+vmv0bWos9tsXAWSLIiaSnyApHxJz6SbFSFuXTw8i86r5vVRW1m+6IHmUREAuI0lcREP5q2ztWPrO9/YK54xsXHI56+cePvj3qBfimZNS+J5FWMcrjptThsRd4dPX9+DcwEd5iQphwozfkCwJKaLv9ewHYKeicfSudwShcnJDBBOD3MTwGRO0cqLIj73jQTaejDBYaPHTBgJ/i5+HyYijd95sFhRzkzB7yL2IrCtGwezj9nOQVTUlfPwiicifnu5J0qHHd8mXHIG6ZD7JQqIk9kJK6QwAokMWRUhMaSeJ0vcfaiXNhs7PyuwpYV51Vh+EM/Pu2M9GckpyiOuZm2Wvtom+Y4me8xPbvIIujzPu6Wbvyt1ejL3U7Sv/v754ZHsORwaX3KGdwiJhO5pzY+Mivk/urVq52jTnIXlEc78LKu8qAMx/G8kHhyOicosz0ovM3IrIDKb15HSvDoOoqv+hMLYCOWI8ash0vmufryZVcqLz4u8fym3ov1xT/EVp4UDUTn4/iS0xW+sZTMojASmLqGp64iH4FRXJQ2TKj+lv7JVRTVxwQkm9APyaboGnGMzSVR6VR87ipsVT645ovOzi5tamb6zzB1/nqzjz+s9YetwLioZW5C8jq08K9+1IxS8yQsfF6ap1WL2BK8VOaJc6NbPcPrx7wJ++hmHQUPvOaQgMJ3ETtVlERDP0wVsQ19uPgcLQyt/Dc+p4jlL6k/1xa2qVyh5ApEzEoErm/DsPOTXV3de6anq36roFyRdYWVbVSshHJEMt98saIXfIu9koplYZL6m/hUz7kS/Jt0/PE8+Jj6X/Y6k+fv2tA1BKIvB/OC8WnGAmp5dpqx3XW36fjgYK/upXbhFd+BrRlqn16MfkrspkoC4hnirYjbUVWzs4rHx8uL3cerjwt0TA4RcBcsuX8Rn97q54okVsCKJJ9YkSvy1gJR4aOtnAr6OJP+L13d+BKBKMEzHhAfgDh6yzD+vqHjTDDvYpAxLqwEfVdbE9bpIEi6V27tdLP+LnzPrWS/XrRTnz5d4e79+LNY7r4kP+Z7Jv7z1LyPL0B4Tb+ci9cXLy+eJ54e8Rw//rqqcUR+HOrgYVprJbBl5E2w63oI64J7k8mUDZLGhmAXs19ucVkxP8gKQu4ptCxbMy2TW3KAGI4u1P207ztH3CDx/7bL+Cdse8h1Zy5ev7Dp8uHD7blJuy0J69TV8XW6l92Dl3cbLG6g98idbhDgdANcY1ZY9o2N4mpNr96GRf1Da3Wui0RW69F1bWslvp81LD2xDTOGu9DhQzBc7AcYfYlkAqo6A6ozqHNBYJTESGitTGShsp0qQSxT4AcoPJQw0LBlEPhBFakHDjoLvY+XgVIyg7WK77tG8n9pvpHXBbXL+OMBd7FN6KLu+uf27esbX9RHdIkLbxvCGhgYsDb3v2a7obt7YHakpKmYiqgE2ioqJbzIOszXcSov/DAzRRNehyJKvPx4+igv/ZLKEaCkoZxUFMYXE1I8f7Xyq/UHp9CkAlfbCF3NdlhS7IQguA0N2wiJYy1ktC5IISb1Okr5jSYruy2SGlYkIkKLSC3yy/WrUWGzSnjaTUX/QEhYQuNewLCdwBFKRkpOuAfr4sBnwwfDg6B0MHagORhBHNqHw5WxTwYav6lAt/42MBLfrYZXHO9w3Ftr/B0Hp0pY+tkD29ddAz5ln8NGjddSlNPyhHV8aKjbzAS7Dd3egRcvgRHJWyrHASw9Pyp+vlSxEluH0jWAGQF9VVZMpxHVRZ/xSKQU4PR5Xy0+/sLQZCFS9DN/XKtSeh5WrL2x+sMyZv+W67+vwz5eC7oDx12rm9pakNg639B68XL3Qh+2Bm94DySxHhg0daBHSQhiCbyyyMS9SDi8RhEHyYP1qD9qak0S4VGn5VYrSTRKEkKHWYYiHuQmCYb/YKYLqS+3H5LYckxJmz6qhSYJ5yNgzgtuclESpncBfN8Fj3lgJdCSGpHcGECoxrouMoHjzO+4evLLMB1VKxJV8Wyj8Q80Ix043jnTu32hlTdkh08Yn7UWcnio9Qs3pzZm0lN7LCOxIdIZxbuQ1+lAVFFxJB7aMeUIiPkiPRPjo2v6dPF4FVjHnxi/oQK0Az/bymf5uI7ayGLj6eM63nrbF5VNXzV7nv3HViQL3JAEaSV1z0iBNJIgJBCYkSKJYbdjEiSHw7a0BI5s6QBBbINUswMUsQ6E11UojZGccA9dcZDBdQY+TgyFTgkiEKYyIBvstAQzIRk8cBJ+A2j4gZFDFWAqjAp3V5IhQYYwwUJ57ByS0QINzMYK8FyrRxt3KNbXb2qG/UVNT5wDyCt6/A0boGbdqzPA4tD21SPquWihPy1FWHjQzYs3xnZkM95ePIZd8RccBx1xez/UPowp46I4+uVcLD9/8Plq0Gfy6Jp+uez5uqPyY+UtNN5DuVQc06drpv4bIDXsjtsMpdkOSC79QK4Xog3PzwF4IBNCBiIhpBSpoE8jioqWaM2KCRuOqwLXgIQItKIe0lCYD/lZjoqgGIo0+J++SsmMKA8eqQ21qHuUh2PfzQHN6vgG6vVK8GfmQhcbr3Yff+AEi3rtdCtNF8u/eIWD2ATXx4Mg0XH1Vr/hm7sDQw8PvyvTrriKWocEE0C6oM/kJRJHrAykgj6WGlq+JUifu6YfS6pu4/UVa6AgQcXKi78ApekhcWFBwMstEkTX9MvVHw+Lt2ex+4+Pg62CxgsHEwZbAdgWIJfA+ICkfDRYtyAwWWB7Ay8F8VT/KB0bOJ4Gx/CQfUKSwZGrJJs8iZHYgB0zMB+zk8hopQ8hEcEog2ERASIBAOL5fIrVIKLxXKtzKPZLgZUckvGf+/nH5HsK0+Uz3316zeAjj3D23Lwu90w0ZwNpiZ72UnvwfO/AXIFnXfLBxLOsHn6yiLqmr3oQ04LHX9hq6TFHI6txrlYWkHj98UT1lh8vryR/rIKq6aO204drdP8hRWF3itmLUw42QnW1CSTSA2IAIXkWOBYKLWw8wjVqNkEaFqjFwLQNJhWI4ZiFoiq6QX0SbsEo6HMoWVFCYprwjw6FP65BXCSoXJwiOwpnFK9A6yiWkQhRDwA9XAfpwLS/AqnqSKP7jwapquiznXFXMn6x8Yg/X/HySvLHKqiaPlZfvf0H6BloAM/v3tpzHkJwUx59Uxb4GE5Lfnt2ZGS16SX3+F5mq4llfegtwnaSR6J5EC8hPUV6IDaS6aDnoZ5DpYe6AtdgOr4pyhXLNPH0KKCo/DDP7N+S+mI6qHzbQr7AbdgW+iylWn0l5cf6E29ftfSN6L9lGl04x30tOtMHklmLhxpClW9BL4S1T+i2uNPRp+0FflD0AN9A9LHnmHGBBfJCE3QL9ALiguoJqiu+64gDzWGIIAlhzhaSDsMV/yjJi3BxyY9khP9BXBSzEMY/AFORGMmM1yyKZfmm+ZKuJf4uMHV1THEj+o+S864E7zYd/8Dliqp2MamvPbt9uw4dY/M4DnXTuMuXx/scK9iHLcbryzfKwvOJBSGNPl10Tb8WV0xYyMFymDdXXv46Kq+ueChJQI4WlSUqf8StOf5CNdXqr9afxe8/Gm6AoLAqGKyCGLSG350ACFzKM2FvaeOseEhFOsjItdQ2S6wYYmkOdl2+CfLBvmpIV55vYY2Qn6uAxAWC40zbhxSmWArcQj0TSIiSU37mx0kgVesgLereOSz8E5EWJa6Qzyh1hZEcO7xY4Ct9WLfNvwa+5xA2h6uGP6vMPxMsZ8WNf0Gf+cOCw9usq51a5+kNG9Sn1IjJsjoO0LI7EpVra/vxhPdFs7JyjYriohlbTAKGxO1C6oJEljseOLqmTxfPX66OucJK66OUNzuDjK7p05UIbGwX25I/vrj4BYrnD0uZ/Rtvfzz9fPsPIkgkbL0DZNMFRVEHFEY2ZCBTcwMLdfCsCCVN4SwpE9YG+ARNgD24IDHYSYB1yNCYDkLRFoC8oOUG40AKQx5IYyAmlQ6SF7dDoSof0hbJiApzqLs43aPc5UG+AvVQ/4T7nGQFQiJ5kdbAkmgH2Sz0FaWB4gLrad22v4nmuvPt/yzCc1+V4t0e4z93r8PYwDCvNANxLSthkai0jmCf5+jq6y6Y4SkjTfoKprgWufj9Dg3AozBmiK7pl3H8WDH3u0YfLY6u6c/HVS2vSvsxoygyTF2q/qNenEyjJ5NJPYGPRidME1M1/JYqwyoNq32Ihu4J0z5M+WA2DoqwEI9wfmEaEhQJzPNsKNOh0jJwrfRVJqbnNOrC6IGwQFzgHiKrpCuq2kE+FizrMXWE7IWCEKemg7hSiimOQchNIC3EchqpHlBO95TshQThkwF5TL9k+Mm/MZLGzVo3AlQdLzagDle1vCYd/wU9/5Z5ZcyZPnNow/J8ZHZZCGtsbKw3rdn7nIzTx42o0WfP1cPKuYJ6XPFs5q7p8zmKx5v8cdcxDeMPOR1fj+gh4X10TV/dukiC+nJPeLy8eH1hrtm/UVvpKxcrP2oL/dlcs1eQ9PCeo73wGcp+R2Xyvlp74vH19B9EkoA2CYKUlcQqJCQj6vkoyBjh/IurcJiy4Zxy2FMptRBO7sK3kClR0UYUZAX+wMqfC1ICiYHMYBsKSQsSFKaAUEqZLoiK00ASFsgpN0UEUWE6yOkiiArE6NmUb91OWwAAEuNJREFUszCNxA0c/uBoF04W86YOarWQAYjGmHBBEIkUiXEqib025hNmInWknv6zKo77Sh3/RvcfSx5Xl4O4yr5Y7NxiuEEQFT4uvs8yrF5VvosX28LLS185vsiRHkc9YPiJtrCbJIzHyx3gJdfpl80flZWPR6qIxJghus7xjSqj4E9UNn2VvN76Csqq6XIR+48OYEeGlcAaXhLfQwxNQcgQEI9IErOOxBUuCuDLz9Arm5iyOTaYy7Jty8hAb2VCm43ZmwnwQTbgFpAWyA4SGEKhaMdgYNpngKAcpeMCAfFjYGE4yAqco3RZ0LorUqOkxVkf6AgzvFBPFbISSsOUD+WRrWijpcwbmI4Gomj4yxAIv4bPVU+q9sfxk/EP36UlfP49N3vNWr/m9CZdX/zzjDDofAoW3XHVr9NPHdB8p2+uORl/mjFLUktMbBTtkSJbpLCRxYyD5OpJps/4+DJuvq5IIgoLqfi3pLzcRuloM7QSzKImsBSWG80LVKkxkSvOkFHaCjL5QvrPN9rwvaSVtEg2ICmQCNRQkGjwnlOpNktMxdds+GxcRFrIyCmhTQMEUJjl4qwtzPbAOVC8o0DUZroGiMmBpEUfRBZ4DvRUJC4/1GOpij1ML9XU0PJdFxIZGsOpJkkOQ0YdFh5CPodKl0WfRqQkVUhTIEf1iN4GkdJU4Rx/xsJfHkpfMv4cd+IAUJb1+YdkfSU7NXp6+/bti7qquKiEdfVq0Gl2TO2DonYzAcUTCv0slCB8FuGia/q8j7iAPl30aNIPHVKq55w+00MvjFLo05WmV8H5P9XLzydVF/H0xbGl9UGfjm226B98po2u6fO+0f3H9M7SbT1h+FoS00ybSmm+5/RZHxzbwWvVHtSvNuLRR4BKl0vPtHRhWh1SESUsNBkH0qjvNiAx4MA1JDBc4yBmTPmwJArJCFM+dA1SE5XsmFIqRTzKUrZYkMio78IUkauFoW6Mcbin1GWrOR8nqOEUEUQFmuK3ZdEw6NFg92s9j3XLp0CIsAuS8VdPkcKhCZ9/KAc81x/c3NdzFjy6KHZc0YPNh7VhDg9jYnh4co9n2dvx1nLalys7Rimx2xLGigfEJBQ0Xr149FkBVb04BQiTlPAFbTiDxRGKM1pJf5AgarPKG0sQu413N07hkCANO5m0fSebtCwziW5DqMISHTRMJCDF23inYbmsauNCHq+Vn1ta5dErzKN8psP/RiIXVpAegKJQ30Y06AQSEXdAIpdL0wbTNsLpoSIeCwRJHZYBpTusIFAIlPC0iqL5AxoCcmLPQkkLdITRCc0dSFqQD1A51g4pLOXmhZCwDMO2BpH9q6ZtDoU4oKQIy5yEynFnv+mzw+0+/q3Sf5yT4aYs89zq1alLIK7wYeQANcCpgW5AOaqIARzxcudrXrMTz+cuFAxBI1Rw06eLKz3xsnDikt+Mmr9mWBlXrbySeJAlTt8MXJImXHRNv0zx2GpWZ3r0KKqzXHlRHH26+fQf+mkbg56ADjppUuihMJl7BEhGtmnj+4Phj1lEUAzjaQcgJkzcqPPmlI/yjdJV8Trf/+hbeYyP0uMS0zSVF8SEaSELxkhR6a7IC1IVHkNMBWEkCljxYQ7YXgWKrDCHw2ohJDDKSkr5Tst3TANBp7DdgkTFKSOpxYMtV2i3hXQoJjwbBo3L4oibAajdXmSbCl01PEvi6x3PetMvwfi3cv+xHpPRk8GZvo6Oq5y5FvZlvtfqQZ5v5igfH7iRdHqrn/H24McyEb6ejCUxkCwqEATi8JDNKtWRIxI6wrLj+aOyQgIqLT/KTZ+OLYnCFGHE60PdSgzIgVmcfrbt5evjYkB97VeNyv8plx/UYoChElhYgB7KtD3PAUWRpejIVNzNAjNzyDuYRqnrMF5dIx4CkTrlAJQRps2FhZIX5lqYwfFLOygTBeSmkUhDEgNvIC7MR5ML6JhozoCpn+858G1utbH4j7BRT0Z9VlZzbTyOKJCKeCjkqYbkFBJh+DXCPVcKuXKIFURlm8WBoZSFOBCYmk6i33ioT+Kw1CegEMspcFfe+M8+rRySNum/YUwm9I7TPT04NWOBDg/nwtz16xMbEp3mPswIOuI6G7wBSlynz1pQWZEIP0smIcEEWN3QsfJDn+nj9FFSPh73wilgdE2f+eOumo4pPqWI2kI/LKu4RVXLq7H/kJopRUFhnkj4joNT9KC/BlZgAIVD1I+cwASVUBgCIsF1KEQxJLpGPKHGP5LYrAs5ikREnmJ61KF4K5cG1+REVS6HC1JauGroYYcOrLWUEp6MSF0UpoZgK5hV2dgEzeNLYbMBnRQZEUPnOwGMT6GOp57Kg/0WTCMYjnsQHpDmlJFTR5IcNt/alvV1PdF5NsKcLSpGG03L6QcjnWDpeIXqgFYb//A9wGi1+fMPDeqY7nae6uvT530KKp+JebkhHJyX6Fqz33X83tCgRr1d6gXBH+XnFtEwDmEVMBfAtbK7UvHxVTb1gGLQokbFVBZMDtUJHmT+dsPxmqSRU2nkrxkWxhfbOfEVwLov4sIaonSRr1qZy6vy8xliPbn+qPjYHxSm6mJwdB357DfaVtJ/BMLeW0/ayVQSR6TA5AB7h8kwmFeRrFBUSFYkJk7GsM+F5SuiCQmFBEriCskHYcxfEM9ozBjBS/yaKD//rBzndjD3BHswAcmqwFdhOWGugCw5owwpEt9sxMlVGWQEK4GlcAOi1XAcL6eLICfdcMFmNDnH7xdO/YTCHTkxM2B6EiSPbuXmHrZO5eJy4Iu6lfo2Gu8orFfA+PM9UMjnHpBIx9v+/Q9Wm8nMfcMTE1d7u7vP4Ec6fzy1wqOGP3xI63JHjgT2/rsy/boTbMP0pe78dVUWS5wjK0VUjIqNN3kA62ZYeIcfxofXDFNFUZBTT4W6m71mWBlXrb4yWSoEYWh0jVIUdJEmzA6o18mRDN7dCplCEkK8IiP4WRAU9OO8j5wimZB3SAhKYlJEphLkJCaSEP7PEdxsfVG5UWFxP6qPPngTlvBED6IWLN8dTPmg8ocFPPRXWBdlFWqqCEmLlhAgLRtKdLaAkpQNfRUM6DUQGOUiTimNEaT7FvRVw/F6K91XG4/mHf9KPaovvJ36jzfSS1mpc6mUdhnvhZL4a0GjZsKBKK+n0+kt0AHvztCAsIzjeeAeUKVPF1l101cBWCICxcGmcPalUeHRnyguIsJYej79fFnpKxdjrKhu+spVK69Ke+OW6SXlh7Xk/8b7D5umJKY6nUiQAEmp5ZKoD5Ay8kTFzcAsJIrL+ZREYCWAaU4ubXRNP8wfpuSuGubHMwCJhSuGPCiYJIMw5GV6xkfY0Wd+WoPiBAlEhvnzNluw3SKZYTkQHIQ5J1RQDg7Lw/QQGUIdFp4wcC9KgQ/7KkxjucEHROVmc3ZaCFfEjMxUvlPvBZ0WhT1Q1zG06hQKyGPA9qEh4bPRJuO/0p//WvoPyXpa77BPr9L1mn64QiJRT0vlP3jg1oyn0/th1dnN6VOkQyh8wVRuPpLUH9GHi+sckD4vLaj43NSHLwfv8cKjbGxdgc97JUpFpIRbpovKYHTUltkpHYkyEqNYf1gWfZU+Vn+JiMZERS4qKyTAMv1hmwoItLT/aL6OL9cn8A4mknhDkR5CUuh43ExhAXjnIQVxRQ9UwnU1JM73meHISINzlY/1Ir3jwNQBtui5IpU3K2mFZbEUEhgJiHlZhkqI8rws7hPFxBHlZ5romu1CGRSv2HyQEQiLPkwefJcSk2o0mU+F8Z46KswbKd8qvRUWiq7BsuoYlF/q+Jd839p4/KNnFHhw+Fbc819r/y3dHO7qsk9D2lLPBvEq59SLXC6CYSCq1OTk5F48g+FxLyQSvvyzhFK8taaYL1ACiYdkkSOg/HVO4irmAySLlR8+yHy5wnaWysTF7YmnRxdyecMXFDcxx3KjNCUEGUtb2r4Iixwh5qebxEG58v2Hkh0ERqlLp5kClNLkngLSyF8XExrZi089SYbFm9DRg1FCbEKyoxQE8sqFkTOgTwrDVIPCP/k8qpRcGrxMEXmxnpwjUeXbhjpgA2bBNsp0HPQWOiwNOnddw5YcNIdSFyzTlUKehEbrLDxDNn7osjCXPw5FO22qgPfKHn/pf8XxxxetvSvYlX8BxBVKCdGDmPPDhz0W+Oijjxof//jHt+Hh2oko/qKqFx4l0BJQmQIwS3RNn/fxZXqGFbq4nQzimI9tKFs+S1S1KJ9XoQkEfUQwtKg98fSzefMMwmx5F28/IqK2RLjM2b54/gX0H0v6+IiDZSVgHJogfYWNzDMUpCtsUkKg4pKIUJAsnNTlkjNWzfBCPMOhi8JAiCSqPBmyMFVQ1OdctQwLywNZ5cPCpDl80D6IhjzBASQF0sUeREpSJCyE4ceSpJXbEO2612AHepaTSRn/YrtEAD3n8xV/ntv4+S96nyGRO9gccQZmEPiBK3bRi5kPHcG+v2T32n2+53bxNY8oQyWIB0SR9OmqxMeTh5lm/8azx8srEbCQNSqTpUTX+eagwCiPqiWeQAXO/olHV2tPaYUFjWCxsQJjt7MV564K6iOB2Xj1adNGa3PqDMFl4XwSSnAQCUIibqFPlwtTwbiOkoSR+JvLx3KYv9BXaSrlLyifSegQBNMFTAWhiIeFArRZnoX+8Y2EzKhbnuNlYO9wFpZXkwoH5Kmj/6qOFTz+0n8+Y4Y/2pVIcJqY35+YJ6wjEN33ZzL9kPY3hWjx6Sv+RcByLIQAZZYQJSn2C944FRF/QkvjQ31XZDcV04GVPOGl+WdJEhVGbaNPV3d7Va7ZP83U/1ACgzTjkg4gjUFvHhGWkrPAPnnBLNeFSEKKfAbzOu9yBAUdVj6cZURpZuU3XOUILioD93x2IEnxxFGc9c6M+M93cHSNZVzHquBQDeMn4x898wQ2us7pgGvAbyU8/z5e5EupVEqtJirCgp4KHxVI7sbrQIYKHyKF3+yvIvEEX8FsQNk9qXwgBpgQwNo7p9OKrukzfdzF08+WTmYrV35YF+tU8bEpYImInGtLVH+8PkzZ8iQcVpjrawXCLOHH5uo/9JmWjbXHJMQcNhVW8bOklbsumnJw7Q+cgtVK2mJxAUNNKKncp54KHuzAwnjCE01B1UIHA1A80ik/IkdIfTj6mE8MXh2sSKZhdHUd+IcDykwFLj4eMv7Fv+il75c8/xEmeHaojD+jZ4LgbsPVVvO5iutg4oSAFCCiAqVp/jrUKRU8mzVexsube05ff3tiD0Q1wkP/ojrYgeiaftiheHsjLKL4GrudTxYvb0H9h94bpzeAwCD4cAqJf5SmlBjFH5D8ChVC1Q8KyIkrjtgbE64y4lqtINJHel5Hq4q4ZdsYzsWBWaU+rkFWtFzQbiNNnWciNbT/qD4+Hitq/FdE/3mWzmvQU+W4hZZPenQuRHRNfylcvfVjpUqz0Tj6dNE1/fm4euufTx1z5am3/hr6z6lj9A9ElneKwPJ3IYEVEpqKys0YFeUhoDBP4TV/+bjVIkfqKuu8/ixC/+tqR73111V4DYnrrb+G8a+h1tkk9dY/m7MxV7XUzwdP3ApBgCYG6Co+L6/+kcB4X0g0ERFFzwXjojBc5q8ZhqOKtWEoROmLEwSWBIHowVySyqSS5kIABEYhisRFEov8SgRWGD6K9OMgq8IwBIkTBBYXASGsxcW3pUoHgfF5iIiLPv9x+03kuLxMqaqsUj1KJL4gsFgICGEtFrJtUG6OwDhtJHHhqLOl+dBAG0AnXRAEBAFBQBAQBAQBQUAQEAQEAUFAEBAEBAFBQBAQBAQBQUAQEAQEAUFAEBAEBAFBQBAQBAQBQUAQEAQEAUFAEBAEBAFBQBAQBAQBQUAQEAQEAUFAEBAEBAFBQBAQBAQBQUAQEAQEAUFAEBAEBAFBQBAQBAQBQUAQEAQEAUFAEBAEBAFBQBAQBAQBQUAQEAQEAUFAEBAEBAFBQBAQBAQBQUAQEAQEAUFAEBAEBAFBQBAQBAQBQUAQEAQEAUFAEBAEBAFBQBAQBAQBQUAQEAQEAUFAEBAEBAFBQBAQBAQBQUAQEAQEAUFAEBAEBAFBQBAQBAQBQUAQEAQEAUFAEBAEBAFBQBAQBAQBQUAQEAQEAUFAEBAEBAFBQBAQBAQBQUAQEAQEAUFAEBAEBAFBQBAQBAQBQUAQEAQEAUFAEBAEBAFBQBAQBAQBQUAQEAQEAUFAEBAEBAFBQBAQBAQBQUAQEAQEAUFAEBAEBAFBQBAQBAQBQUAQEAQEAUFAEBAEBAFBQBAQBAQBQUAQEAQEAUFAEBAEBAFBQBAQBAQBQUAQEAQEAUFAEBAEBAFBQBAQBAQBQUAQEAQEAUFAEBAEBAFBQBAQBAQBQUAQEAQEAUFAEBAEBAFBQBAQBAQBQUAQEAQEAUFAEBAEBAFBQBAQBAQBQUAQEAQEAUFAEBAEBAFBQBAQBAQBQUAQEAQEAUFAEBAEBIGVhMD/D0fV/fpMMM+gAAAAAElFTkSuQmCC"
  9683. }
  9684. };
  9685. const NoticeBar = {
  9686. // noticeBar
  9687. noticeBar: {
  9688. text: [],
  9689. direction: "row",
  9690. step: false,
  9691. icon: "volume",
  9692. mode: "",
  9693. color: "#f9ae3d",
  9694. bgColor: "#fdf6ec",
  9695. speed: 80,
  9696. fontSize: 14,
  9697. duration: 2e3,
  9698. disableTouch: true,
  9699. url: "",
  9700. linkType: "navigateTo",
  9701. justifyContent: "flex-start"
  9702. }
  9703. };
  9704. const Notify = {
  9705. // notify组件
  9706. notify: {
  9707. top: 0,
  9708. type: "primary",
  9709. color: "#ffffff",
  9710. bgColor: "",
  9711. message: "",
  9712. duration: 3e3,
  9713. fontSize: 15,
  9714. safeAreaInsetTop: false
  9715. }
  9716. };
  9717. const NumberBox = {
  9718. // 步进器组件
  9719. numberBox: {
  9720. name: "",
  9721. value: 0,
  9722. min: 1,
  9723. max: Number.MAX_SAFE_INTEGER,
  9724. step: 1,
  9725. integer: false,
  9726. disabled: false,
  9727. disabledInput: false,
  9728. asyncChange: false,
  9729. inputWidth: 35,
  9730. showMinus: true,
  9731. showPlus: true,
  9732. decimalLength: null,
  9733. longPress: true,
  9734. color: "#323233",
  9735. buttonWidth: 30,
  9736. buttonSize: 30,
  9737. buttonRadius: "0px",
  9738. bgColor: "#EBECEE",
  9739. disabledBgColor: "#f7f8fa",
  9740. inputBgColor: "#EBECEE",
  9741. cursorSpacing: 100,
  9742. disableMinus: false,
  9743. disablePlus: false,
  9744. iconStyle: "",
  9745. miniMode: false
  9746. }
  9747. };
  9748. const NumberKeyboard = {
  9749. // 数字键盘
  9750. numberKeyboard: {
  9751. mode: "number",
  9752. dotDisabled: false,
  9753. random: false
  9754. }
  9755. };
  9756. const Overlay = {
  9757. // overlay组件
  9758. overlay: {
  9759. show: false,
  9760. zIndex: 10070,
  9761. duration: 300,
  9762. opacity: 0.5
  9763. }
  9764. };
  9765. const Parse = {
  9766. // parse
  9767. parse: {
  9768. copyLink: true,
  9769. errorImg: "",
  9770. lazyLoad: false,
  9771. loadingImg: "",
  9772. pauseVideo: true,
  9773. previewImg: true,
  9774. setTitle: true,
  9775. showImgMenu: true
  9776. }
  9777. };
  9778. const Picker = {
  9779. // picker
  9780. picker: {
  9781. show: false,
  9782. popupMode: "bottom",
  9783. showToolbar: true,
  9784. title: "",
  9785. columns: [],
  9786. loading: false,
  9787. itemHeight: 44,
  9788. cancelText: t$1("up.common.cancel"),
  9789. confirmText: t$1("up.common.confirm"),
  9790. cancelColor: "#909193",
  9791. confirmColor: "",
  9792. visibleItemCount: 5,
  9793. keyName: "text",
  9794. valueName: "value",
  9795. closeOnClickOverlay: false,
  9796. defaultIndex: [],
  9797. immediateChange: true,
  9798. zIndex: 10076,
  9799. disabled: false,
  9800. disabledColor: "",
  9801. placeholder: t$1("up.common.pleaseChoose"),
  9802. inputProps: {},
  9803. bgColor: "",
  9804. round: 0,
  9805. duration: 300,
  9806. overlayOpacity: 0.5,
  9807. pageInline: false
  9808. }
  9809. };
  9810. const Popup = {
  9811. // popup组件
  9812. popup: {
  9813. show: false,
  9814. overlay: true,
  9815. mode: "bottom",
  9816. duration: 300,
  9817. closeable: false,
  9818. overlayStyle: {},
  9819. closeOnClickOverlay: true,
  9820. zIndex: 10075,
  9821. safeAreaInsetBottom: true,
  9822. safeAreaInsetTop: false,
  9823. closeIconPos: "top-right",
  9824. round: 0,
  9825. zoom: true,
  9826. bgColor: "",
  9827. overlayOpacity: 0.5,
  9828. pageInline: false
  9829. }
  9830. };
  9831. const Radio = {
  9832. // radio组件
  9833. radio: {
  9834. name: "",
  9835. shape: "",
  9836. disabled: "",
  9837. labelDisabled: "",
  9838. activeColor: "",
  9839. inactiveColor: "",
  9840. iconSize: "",
  9841. labelSize: "",
  9842. label: "",
  9843. labelColor: "",
  9844. size: "",
  9845. iconColor: "",
  9846. placement: ""
  9847. }
  9848. };
  9849. const RadioGroup = {
  9850. // radio-group组件
  9851. radioGroup: {
  9852. value: "",
  9853. disabled: false,
  9854. shape: "circle",
  9855. activeColor: "#2979ff",
  9856. inactiveColor: "#c8c9cc",
  9857. name: "",
  9858. size: 18,
  9859. placement: "row",
  9860. label: "",
  9861. labelColor: "#303133",
  9862. labelSize: 14,
  9863. labelDisabled: false,
  9864. iconColor: "#ffffff",
  9865. iconSize: 12,
  9866. borderBottom: false,
  9867. iconPlacement: "left",
  9868. gap: "10px"
  9869. }
  9870. };
  9871. const Rate = {
  9872. // rate组件
  9873. rate: {
  9874. value: 1,
  9875. count: 5,
  9876. disabled: false,
  9877. size: 18,
  9878. inactiveColor: "#b2b2b2",
  9879. activeColor: "#FA3534",
  9880. gutter: 4,
  9881. minCount: 1,
  9882. allowHalf: false,
  9883. activeIcon: "star-fill",
  9884. inactiveIcon: "star",
  9885. touchable: true
  9886. }
  9887. };
  9888. const ReadMore = {
  9889. // readMore
  9890. readMore: {
  9891. showHeight: 400,
  9892. toggle: false,
  9893. closeText: t$1("up.readMore.expand"),
  9894. openText: t$1("up.readMore.fold"),
  9895. color: "#2979ff",
  9896. fontSize: 14,
  9897. textIndent: "2em",
  9898. name: ""
  9899. }
  9900. };
  9901. const Row = {
  9902. // row
  9903. row: {
  9904. gutter: 0,
  9905. justify: "start",
  9906. align: "center"
  9907. }
  9908. };
  9909. const RowNotice = {
  9910. // rowNotice
  9911. rowNotice: {
  9912. text: "",
  9913. icon: "volume",
  9914. mode: "",
  9915. color: "#f9ae3d",
  9916. bgColor: "#fdf6ec",
  9917. fontSize: 14,
  9918. speed: 80
  9919. }
  9920. };
  9921. const ScrollList = {
  9922. // scrollList
  9923. scrollList: {
  9924. indicatorWidth: 50,
  9925. indicatorBarWidth: 20,
  9926. indicator: true,
  9927. indicatorColor: "#f2f2f2",
  9928. indicatorActiveColor: "#3c9cff",
  9929. indicatorStyle: ""
  9930. }
  9931. };
  9932. const Search = {
  9933. // search
  9934. search: {
  9935. shape: "round",
  9936. bgColor: "#f2f2f2",
  9937. placeholder: t$1("up.search.placeholder"),
  9938. clearabled: true,
  9939. focus: false,
  9940. showAction: true,
  9941. actionStyle: {},
  9942. actionText: t$1("up.common.search"),
  9943. inputAlign: "left",
  9944. inputStyle: {},
  9945. disabled: false,
  9946. borderColor: "transparent",
  9947. searchIconColor: "#909399",
  9948. searchIconSize: 22,
  9949. color: "#606266",
  9950. placeholderColor: "#909399",
  9951. searchIcon: "search",
  9952. iconPosition: "left",
  9953. margin: "0",
  9954. animation: false,
  9955. value: "",
  9956. maxlength: "-1",
  9957. height: 32,
  9958. label: null
  9959. }
  9960. };
  9961. const Section = {
  9962. // u-section组件
  9963. section: {
  9964. title: "",
  9965. subTitle: t$1("up.common.more"),
  9966. right: true,
  9967. fontSize: 15,
  9968. bold: true,
  9969. color: "#303133",
  9970. subColor: "#909399",
  9971. showLine: true,
  9972. lineColor: "",
  9973. arrow: true
  9974. }
  9975. };
  9976. const Skeleton = {
  9977. // skeleton
  9978. skeleton: {
  9979. loading: true,
  9980. animate: true,
  9981. rows: 0,
  9982. rowsWidth: "100%",
  9983. rowsHeight: 18,
  9984. title: true,
  9985. titleWidth: "50%",
  9986. titleHeight: 18,
  9987. avatar: false,
  9988. avatarSize: 32,
  9989. avatarShape: "circle"
  9990. }
  9991. };
  9992. const Slider = {
  9993. // slider组件
  9994. slider: {
  9995. value: 0,
  9996. blockSize: 18,
  9997. min: 0,
  9998. max: 100,
  9999. step: 1,
  10000. activeColor: "#2979ff",
  10001. inactiveColor: "#c0c4cc",
  10002. blockColor: "#ffffff",
  10003. showValue: false,
  10004. disabled: false,
  10005. blockStyle: {},
  10006. useNative: false,
  10007. height: "2px",
  10008. innerStyle: {}
  10009. }
  10010. };
  10011. const StatusBar = {
  10012. // statusBar
  10013. statusBar: {
  10014. bgColor: "transparent",
  10015. height: 0
  10016. }
  10017. };
  10018. const Steps = {
  10019. // steps组件
  10020. steps: {
  10021. direction: "row",
  10022. current: 0,
  10023. activeColor: "#3c9cff",
  10024. inactiveColor: "#969799",
  10025. activeIcon: "",
  10026. inactiveIcon: "",
  10027. dot: false
  10028. }
  10029. };
  10030. const StepsItem = {
  10031. // steps-item组件
  10032. stepsItem: {
  10033. title: "",
  10034. desc: "",
  10035. iconSize: 17,
  10036. error: false
  10037. }
  10038. };
  10039. const Sticky = {
  10040. // sticky组件
  10041. sticky: {
  10042. offsetTop: 0,
  10043. customNavHeight: 0,
  10044. disabled: false,
  10045. bgColor: "transparent",
  10046. zIndex: "",
  10047. index: ""
  10048. }
  10049. };
  10050. const Subsection = {
  10051. // subsection组件
  10052. subsection: {
  10053. list: [],
  10054. current: 0,
  10055. activeColor: "#3c9cff",
  10056. inactiveColor: "#303133",
  10057. mode: "button",
  10058. fontSize: 12,
  10059. bold: true,
  10060. bgColor: "#eeeeef",
  10061. keyName: "name",
  10062. activeColorKeyName: "activeColorKey",
  10063. inactiveColorKeyName: "inactiveColorKey",
  10064. disabled: false
  10065. }
  10066. };
  10067. const SwipeAction = {
  10068. // swipe-action组件
  10069. swipeAction: {
  10070. autoClose: true
  10071. }
  10072. };
  10073. const SwipeActionItem = {
  10074. // swipeActionItem 组件
  10075. swipeActionItem: {
  10076. show: false,
  10077. closeOnClick: true,
  10078. name: "",
  10079. disabled: false,
  10080. threshold: 20,
  10081. autoClose: true,
  10082. options: [],
  10083. duration: 300
  10084. }
  10085. };
  10086. const Swiper = {
  10087. // swiper 组件
  10088. swiper: {
  10089. list: [],
  10090. indicator: false,
  10091. indicatorActiveColor: "#FFFFFF",
  10092. indicatorInactiveColor: "rgba(255, 255, 255, 0.35)",
  10093. indicatorStyle: "",
  10094. indicatorMode: "line",
  10095. autoplay: true,
  10096. current: 0,
  10097. currentItemId: "",
  10098. interval: 3e3,
  10099. duration: 300,
  10100. circular: false,
  10101. previousMargin: 0,
  10102. nextMargin: 0,
  10103. acceleration: false,
  10104. displayMultipleItems: 1,
  10105. easingFunction: "default",
  10106. keyName: "url",
  10107. imgMode: "aspectFill",
  10108. height: 130,
  10109. bgColor: "#f3f4f6",
  10110. radius: 4,
  10111. loading: false,
  10112. showTitle: false
  10113. }
  10114. };
  10115. const SwipterIndicator = {
  10116. // swiperIndicator 组件
  10117. swiperIndicator: {
  10118. length: 0,
  10119. current: 0,
  10120. indicatorActiveColor: "",
  10121. indicatorInactiveColor: "",
  10122. indicatorMode: "line"
  10123. }
  10124. };
  10125. const Switch = {
  10126. // switch
  10127. switch: {
  10128. loading: false,
  10129. disabled: false,
  10130. size: 25,
  10131. activeColor: "#2979ff",
  10132. inactiveColor: "#ffffff",
  10133. value: false,
  10134. activeValue: true,
  10135. inactiveValue: false,
  10136. asyncChange: false,
  10137. space: 0
  10138. }
  10139. };
  10140. const Tabbar = {
  10141. // tabbar
  10142. tabbar: {
  10143. value: null,
  10144. safeAreaInsetBottom: true,
  10145. border: true,
  10146. zIndex: 1,
  10147. activeColor: "#1989fa",
  10148. inactiveColor: "#7d7e80",
  10149. fixed: true,
  10150. placeholder: true,
  10151. borderColor: "",
  10152. backgroundColor: ""
  10153. }
  10154. };
  10155. const TabbarItem = {
  10156. //
  10157. tabbarItem: {
  10158. name: null,
  10159. icon: "",
  10160. badge: null,
  10161. dot: false,
  10162. text: "",
  10163. badgeStyle: "top: 6px;right:2px;",
  10164. mode: ""
  10165. }
  10166. };
  10167. const Tabs = {
  10168. //
  10169. tabs: {
  10170. duration: 300,
  10171. list: [],
  10172. lineColor: "",
  10173. activeStyle: {
  10174. color: "#303133"
  10175. },
  10176. inactiveStyle: {
  10177. color: "#606266"
  10178. },
  10179. lineWidth: 20,
  10180. lineHeight: 3,
  10181. lineBgSize: "cover",
  10182. itemStyle: {
  10183. height: "44px"
  10184. },
  10185. scrollable: true,
  10186. current: 0,
  10187. keyName: "name",
  10188. iconStyle: {}
  10189. }
  10190. };
  10191. const Tag = {
  10192. // tag 组件
  10193. tag: {
  10194. type: "primary",
  10195. disabled: false,
  10196. size: "medium",
  10197. shape: "square",
  10198. text: "",
  10199. bgColor: "",
  10200. color: "",
  10201. borderColor: "",
  10202. closeColor: "#C6C7CB",
  10203. name: "",
  10204. plainFill: false,
  10205. plain: false,
  10206. closable: false,
  10207. show: true,
  10208. icon: "",
  10209. iconColor: "",
  10210. textSize: "",
  10211. height: "",
  10212. padding: "",
  10213. borderRadius: "",
  10214. autoBgColor: 0
  10215. }
  10216. };
  10217. const Text = {
  10218. // text 组件
  10219. text: {
  10220. type: "",
  10221. show: true,
  10222. text: "",
  10223. prefixIcon: "",
  10224. suffixIcon: "",
  10225. mode: "",
  10226. href: "",
  10227. format: "",
  10228. call: false,
  10229. openType: "",
  10230. bold: false,
  10231. block: false,
  10232. lines: "",
  10233. color: "#303133",
  10234. size: 15,
  10235. iconStyle: {
  10236. fontSize: "15px"
  10237. },
  10238. decoration: "none",
  10239. margin: 0,
  10240. lineHeight: "",
  10241. align: "left",
  10242. wordWrap: "normal",
  10243. flex1: true
  10244. }
  10245. };
  10246. const Textarea = {
  10247. // textarea 组件
  10248. textarea: {
  10249. value: "",
  10250. placeholder: "",
  10251. placeholderClass: "textarea-placeholder",
  10252. placeholderStyle: "color: #c0c4cc",
  10253. height: 70,
  10254. confirmType: "done",
  10255. disabled: false,
  10256. count: false,
  10257. focus: false,
  10258. autoHeight: false,
  10259. fixed: false,
  10260. cursorSpacing: 0,
  10261. cursor: "",
  10262. showConfirmBar: true,
  10263. selectionStart: -1,
  10264. selectionEnd: -1,
  10265. adjustPosition: true,
  10266. disableDefaultPadding: false,
  10267. holdKeyboard: false,
  10268. maxlength: 140,
  10269. border: "surround",
  10270. formatter: null
  10271. }
  10272. };
  10273. const Toast = {
  10274. // toast组件
  10275. toast: {
  10276. zIndex: 10090,
  10277. loading: false,
  10278. message: "",
  10279. icon: "",
  10280. type: "",
  10281. loadingMode: "",
  10282. show: "",
  10283. overlay: false,
  10284. position: "center",
  10285. params: {},
  10286. duration: 2e3,
  10287. isTab: false,
  10288. url: "",
  10289. callback: null,
  10290. back: false
  10291. }
  10292. };
  10293. const Toolbar = {
  10294. // toolbar 组件
  10295. toolbar: {
  10296. show: true,
  10297. cancelText: t$1("up.common.cancel"),
  10298. confirmText: t$1("up.common.confirm"),
  10299. cancelColor: "#909193",
  10300. confirmColor: "",
  10301. title: ""
  10302. }
  10303. };
  10304. const Tooltip = {
  10305. // tooltip 组件
  10306. tooltip: {
  10307. text: "",
  10308. copyText: "",
  10309. size: 14,
  10310. color: "#606266",
  10311. bgColor: "transparent",
  10312. direction: "top",
  10313. zIndex: 10071,
  10314. showCopy: true,
  10315. buttons: [],
  10316. overlay: true,
  10317. showToast: true,
  10318. popupBgColor: "",
  10319. triggerMode: "longpress"
  10320. }
  10321. };
  10322. const Transition = {
  10323. // transition动画组件的props
  10324. transition: {
  10325. show: false,
  10326. mode: "fade",
  10327. duration: "300",
  10328. timingFunction: "ease-out"
  10329. }
  10330. };
  10331. const Upload = {
  10332. // upload组件
  10333. upload: {
  10334. accept: "image",
  10335. extension: [],
  10336. capture: ["album", "camera"],
  10337. compressed: true,
  10338. camera: "back",
  10339. maxDuration: 60,
  10340. uploadIcon: "camera-fill",
  10341. uploadIconColor: "#D3D4D6",
  10342. useBeforeRead: false,
  10343. previewFullImage: true,
  10344. maxCount: 52,
  10345. disabled: false,
  10346. imageMode: "aspectFill",
  10347. name: "",
  10348. sizeType: ["original", "compressed"],
  10349. multiple: false,
  10350. deletable: true,
  10351. maxSize: Number.MAX_VALUE,
  10352. fileList: [],
  10353. uploadText: "",
  10354. width: 80,
  10355. height: 80,
  10356. previewImage: true,
  10357. autoDelete: false,
  10358. autoUpload: false,
  10359. autoUploadApi: "",
  10360. autoUploadAuthUrl: "",
  10361. autoUploadDriver: "",
  10362. autoUploadHeader: {},
  10363. getVideoThumb: false,
  10364. customAfterAutoUpload: false,
  10365. videoPreviewObjectFit: "cover"
  10366. }
  10367. };
  10368. const props$1x = {
  10369. ...ActionSheet,
  10370. ...Album,
  10371. ...Alert,
  10372. ...Avatar,
  10373. ...AvatarGroup,
  10374. ...Backtop,
  10375. ...Badge,
  10376. ...Button,
  10377. ...Calendar$1,
  10378. ...CarKeyboard,
  10379. ...Card,
  10380. ...Cell,
  10381. ...CellGroup,
  10382. ...Checkbox,
  10383. ...CheckboxGroup,
  10384. ...CircleProgress,
  10385. ...Code,
  10386. ...CodeInput,
  10387. ...Col,
  10388. ...Collapse,
  10389. ...CollapseItem,
  10390. ...ColumnNotice,
  10391. ...CountDown,
  10392. ...CountTo,
  10393. ...DatetimePicker,
  10394. ...Divider,
  10395. ...Empty,
  10396. ...Form,
  10397. ...GormItem,
  10398. ...Gap,
  10399. ...Grid,
  10400. ...GridItem,
  10401. ...Icon,
  10402. ...Image$1,
  10403. ...IndexAnchor,
  10404. ...IndexList,
  10405. ...Input,
  10406. ...Keyboard,
  10407. ...Line,
  10408. ...LineProgress,
  10409. ...Link,
  10410. ...List,
  10411. ...ListItem,
  10412. ...LoadingIcon,
  10413. ...LoadingPage,
  10414. ...Loadmore,
  10415. ...Modal,
  10416. ...Navbar,
  10417. ...NoNetwork,
  10418. ...NoticeBar,
  10419. ...Notify,
  10420. ...NumberBox,
  10421. ...NumberKeyboard,
  10422. ...Overlay,
  10423. ...Parse,
  10424. ...Picker,
  10425. ...Popup,
  10426. ...Radio,
  10427. ...RadioGroup,
  10428. ...Rate,
  10429. ...ReadMore,
  10430. ...Row,
  10431. ...RowNotice,
  10432. ...ScrollList,
  10433. ...Search,
  10434. ...Section,
  10435. ...Skeleton,
  10436. ...Slider,
  10437. ...StatusBar,
  10438. ...Steps,
  10439. ...StepsItem,
  10440. ...Sticky,
  10441. ...Subsection,
  10442. ...SwipeAction,
  10443. ...SwipeActionItem,
  10444. ...Swiper,
  10445. ...SwipterIndicator,
  10446. ...Switch,
  10447. ...Tabbar,
  10448. ...TabbarItem,
  10449. ...Tabs,
  10450. ...Tag,
  10451. ...Text,
  10452. ...Textarea,
  10453. ...Toast,
  10454. ...Toolbar,
  10455. ...Tooltip,
  10456. ...Transition,
  10457. ...Upload
  10458. };
  10459. function setConfig$1(configs) {
  10460. shallowMerge(config$1, configs.config || {});
  10461. shallowMerge(props$1x, configs.props || {});
  10462. shallowMerge(color$3, configs.color || {});
  10463. shallowMerge(zIndex, configs.zIndex || {});
  10464. }
  10465. if (uni && uni.upuiParams) {
  10466. formatAppLog("log", "at uni_modules/uview-plus/libs/config/props.js:206", "setting uview-plus");
  10467. let temp = uni.upuiParams();
  10468. if (temp.httpIns) {
  10469. temp.httpIns(http);
  10470. }
  10471. if (temp.options) {
  10472. setConfig$1(temp.options);
  10473. }
  10474. }
  10475. const props$1w = defineMixin({
  10476. props: {
  10477. color: {
  10478. type: String,
  10479. default: () => props$1x.line.color
  10480. },
  10481. // 长度,竖向时表现为高度,横向时表现为长度,可以为百分比,带px单位的值等
  10482. length: {
  10483. type: [String, Number],
  10484. default: () => props$1x.line.length
  10485. },
  10486. // 线条方向,col-竖向,row-横向
  10487. direction: {
  10488. type: String,
  10489. default: () => props$1x.line.direction
  10490. },
  10491. // 是否显示细边框
  10492. hairline: {
  10493. type: Boolean,
  10494. default: () => props$1x.line.hairline
  10495. },
  10496. // 线条与上下左右元素的间距,字符串形式,如"30px"、"20px 30px"
  10497. margin: {
  10498. type: [String, Number],
  10499. default: () => props$1x.line.margin
  10500. },
  10501. // 是否虚线,true-虚线,false-实线
  10502. dashed: {
  10503. type: Boolean,
  10504. default: () => props$1x.line.dashed
  10505. }
  10506. }
  10507. });
  10508. const mpMixin = defineMixin({});
  10509. class Router {
  10510. constructor() {
  10511. this.config = {
  10512. type: "navigateTo",
  10513. url: "",
  10514. delta: 1,
  10515. // navigateBack页面后退时,回退的层数
  10516. params: {},
  10517. // 传递的参数
  10518. animationType: "pop-in",
  10519. // 窗口动画,只在APP有效
  10520. animationDuration: 300,
  10521. // 窗口动画持续时间,单位毫秒,只在APP有效
  10522. intercept: false
  10523. // 是否需要拦截
  10524. };
  10525. this.route = this.route.bind(this);
  10526. }
  10527. // 判断url前面是否有"/",如果没有则加上,否则无法跳转
  10528. addRootPath(url2) {
  10529. return url2[0] === "/" ? url2 : `/${url2}`;
  10530. }
  10531. // 整合路由参数
  10532. mixinParam(url2, params2) {
  10533. url2 = url2 && this.addRootPath(url2);
  10534. let query = "";
  10535. if (/.*\/.*\?.*=.*/.test(url2)) {
  10536. query = queryParams(params2, false);
  10537. return url2 += `&${query}`;
  10538. }
  10539. query = queryParams(params2);
  10540. return url2 += query;
  10541. }
  10542. // 对外的方法名称
  10543. async route(options2 = {}, params2 = {}) {
  10544. let mergeConfig2 = {};
  10545. if (typeof options2 === "string") {
  10546. mergeConfig2.url = this.mixinParam(options2, params2);
  10547. mergeConfig2.type = "navigateTo";
  10548. } else {
  10549. mergeConfig2 = deepMerge$1(this.config, options2);
  10550. mergeConfig2.url = this.mixinParam(options2.url, options2.params);
  10551. }
  10552. if (mergeConfig2.url === page())
  10553. return;
  10554. if (params2.intercept) {
  10555. this.config.intercept = params2.intercept;
  10556. }
  10557. mergeConfig2.params = params2;
  10558. mergeConfig2 = deepMerge$1(this.config, mergeConfig2);
  10559. if (typeof uni.$u.routeIntercept === "function") {
  10560. const isNext = await new Promise((resolve, reject) => {
  10561. uni.$u.routeIntercept(mergeConfig2, resolve);
  10562. });
  10563. isNext && this.openPage(mergeConfig2);
  10564. } else {
  10565. this.openPage(mergeConfig2);
  10566. }
  10567. }
  10568. // 执行路由跳转
  10569. openPage(config2) {
  10570. const {
  10571. url: url2,
  10572. type: type2,
  10573. delta,
  10574. animationType,
  10575. animationDuration
  10576. } = config2;
  10577. if (config2.type == "navigateTo" || config2.type == "to") {
  10578. uni.navigateTo({
  10579. url: url2,
  10580. animationType,
  10581. animationDuration
  10582. });
  10583. }
  10584. if (config2.type == "redirectTo" || config2.type == "redirect") {
  10585. uni.redirectTo({
  10586. url: url2
  10587. });
  10588. }
  10589. if (config2.type == "switchTab" || config2.type == "tab") {
  10590. uni.switchTab({
  10591. url: url2
  10592. });
  10593. }
  10594. if (config2.type == "reLaunch" || config2.type == "launch") {
  10595. uni.reLaunch({
  10596. url: url2
  10597. });
  10598. }
  10599. if (config2.type == "navigateBack" || config2.type == "back") {
  10600. uni.navigateBack({
  10601. delta
  10602. });
  10603. }
  10604. }
  10605. }
  10606. const route = new Router().route;
  10607. const mixin = defineMixin({
  10608. // 定义每个组件都可能需要用到的外部样式以及类名
  10609. props: {
  10610. // 每个组件都有的父组件传递的样式,可以为字符串或者对象形式
  10611. customStyle: {
  10612. type: [Object, String],
  10613. default: () => ({})
  10614. },
  10615. customClass: {
  10616. type: String,
  10617. default: ""
  10618. },
  10619. // 跳转的页面路径
  10620. url: {
  10621. type: String,
  10622. default: ""
  10623. },
  10624. // 页面跳转的类型
  10625. linkType: {
  10626. type: String,
  10627. default: "navigateTo"
  10628. }
  10629. },
  10630. data() {
  10631. return {};
  10632. },
  10633. onLoad() {
  10634. this.$u.getRect = this.$uGetRect;
  10635. },
  10636. created() {
  10637. this.$u.getRect = this.$uGetRect;
  10638. },
  10639. computed: {
  10640. // 在2.x版本中,将会把$u挂载到uni对象下,导致在模板中无法使用uni.$u.xxx形式
  10641. // 所以这里通过computed计算属性将其附加到this.$u上,就可以在模板或者js中使用uni.$u.xxx
  10642. // 只在nvue环境通过此方式引入完整的$u,其他平台会出现性能问题,非nvue则按需引入(主要原因是props过大)
  10643. $u() {
  10644. return deepMerge$1(uni.$u, {
  10645. props: void 0,
  10646. http: void 0,
  10647. mixin: void 0
  10648. });
  10649. },
  10650. /**
  10651. * 生成bem规则类名
  10652. * 由于微信小程序,H5,nvue之间绑定class的差异,无法通过:class="[bem()]"的形式进行同用
  10653. * 故采用如下折中做法,最后返回的是数组(一般平台)或字符串(支付宝和字节跳动平台),类似['a', 'b', 'c']或'a b c'的形式
  10654. * @param {String} name 组件名称
  10655. * @param {Array} fixed 一直会存在的类名
  10656. * @param {Array} change 会根据变量值为true或者false而出现或者隐藏的类名
  10657. * @returns {Array|string}
  10658. */
  10659. bem() {
  10660. return function(name2, fixed, change) {
  10661. const prefix = `u-${name2}--`;
  10662. const classes = {};
  10663. if (fixed) {
  10664. fixed.map((item) => {
  10665. classes[prefix + this[item]] = true;
  10666. });
  10667. }
  10668. if (change) {
  10669. change.map((item) => {
  10670. this[item] ? classes[prefix + item] = this[item] : delete classes[prefix + item];
  10671. });
  10672. }
  10673. return Object.keys(classes);
  10674. };
  10675. }
  10676. },
  10677. methods: {
  10678. // 跳转某一个页面
  10679. openPage(urlKey = "url") {
  10680. const url2 = this[urlKey];
  10681. if (url2) {
  10682. route({ type: this.linkType, url: url2 });
  10683. }
  10684. },
  10685. navTo(url2 = "", linkType = "navigateTo") {
  10686. route({ type: this.linkType, url: url2 });
  10687. },
  10688. // 查询节点信息
  10689. // 目前此方法在支付宝小程序中无法获取组件跟接点的尺寸,为支付宝的bug(2020-07-21)
  10690. // 解决办法为在组件根部再套一个没有任何作用的view元素
  10691. $uGetRect(selector, all) {
  10692. return new Promise((resolve) => {
  10693. uni.createSelectorQuery().in(this)[all ? "selectAll" : "select"](selector).boundingClientRect((rect) => {
  10694. if (all && Array.isArray(rect) && rect.length) {
  10695. resolve(rect);
  10696. }
  10697. if (!all && rect) {
  10698. resolve(rect);
  10699. }
  10700. }).exec();
  10701. });
  10702. },
  10703. getParentData(parentName = "") {
  10704. if (!this.parent)
  10705. this.parent = {};
  10706. this.parent = $parent.call(this, parentName);
  10707. if (this.parent.children) {
  10708. this.parent.children.indexOf(this) === -1 && this.parent.children.push(this);
  10709. }
  10710. if (this.parent && this.parentData) {
  10711. Object.keys(this.parentData).map((key) => {
  10712. this.parentData[key] = this.parent[key];
  10713. });
  10714. }
  10715. },
  10716. // 阻止事件冒泡
  10717. preventEvent(e2) {
  10718. e2 && typeof e2.stopPropagation === "function" && e2.stopPropagation();
  10719. },
  10720. // 空操作
  10721. noop(e2) {
  10722. this.preventEvent(e2);
  10723. }
  10724. },
  10725. onReachBottom() {
  10726. uni.$emit("uOnReachBottom");
  10727. },
  10728. beforeUnmount() {
  10729. if (this.parent && test.array(this.parent.children)) {
  10730. const childrenList = this.parent.children;
  10731. childrenList.map((child, index2) => {
  10732. if (child === this) {
  10733. childrenList.splice(index2, 1);
  10734. }
  10735. });
  10736. }
  10737. }
  10738. });
  10739. const _sfc_main$2d = {
  10740. name: "u-line",
  10741. mixins: [mpMixin, mixin, props$1w],
  10742. computed: {
  10743. lineStyle() {
  10744. const style = {};
  10745. style.margin = this.margin;
  10746. if (this.direction === "row") {
  10747. style.borderBottomWidth = "1px";
  10748. style.borderBottomStyle = this.dashed ? "dashed" : "solid";
  10749. style.width = addUnit(this.length);
  10750. if (this.hairline)
  10751. style.transform = "scaleY(0.5)";
  10752. } else {
  10753. style.borderLeftWidth = "1px";
  10754. style.borderLeftStyle = this.dashed ? "dashed" : "solid";
  10755. style.height = addUnit(this.length);
  10756. if (this.hairline)
  10757. style.transform = "scaleX(0.5)";
  10758. }
  10759. style.borderColor = this.color;
  10760. return deepMerge$1(style, addStyle(this.customStyle));
  10761. }
  10762. }
  10763. };
  10764. function _sfc_render$2c(_ctx, _cache, $props, $setup, $data, $options) {
  10765. return vue.openBlock(), vue.createElementBlock(
  10766. "view",
  10767. {
  10768. class: "u-line",
  10769. style: vue.normalizeStyle([$options.lineStyle])
  10770. },
  10771. null,
  10772. 4
  10773. /* STYLE */
  10774. );
  10775. }
  10776. const __easycom_1$4 = /* @__PURE__ */ _export_sfc(_sfc_main$2d, [["render", _sfc_render$2c], ["__scopeId", "data-v-72791e59"], ["__file", "C:/Users/EDY/Desktop/项目/shuibei/uni_modules/uview-plus/components/u-line/u-line.vue"]]);
  10777. const __vite_glob_0_55 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
  10778. __proto__: null,
  10779. default: __easycom_1$4
  10780. }, Symbol.toStringTag, { value: "Module" }));
  10781. const props$1v = defineMixin({
  10782. props: {
  10783. // 是否显示组件
  10784. show: {
  10785. type: Boolean,
  10786. default: () => props$1x.loadingIcon.show
  10787. },
  10788. // 颜色
  10789. color: {
  10790. type: String,
  10791. default: () => props$1x.loadingIcon.color
  10792. },
  10793. // 提示文字颜色
  10794. textColor: {
  10795. type: String,
  10796. default: () => props$1x.loadingIcon.textColor
  10797. },
  10798. // 文字和图标是否垂直排列
  10799. vertical: {
  10800. type: Boolean,
  10801. default: () => props$1x.loadingIcon.vertical
  10802. },
  10803. // 模式选择,circle-圆形,spinner-花朵形,semicircle-半圆形
  10804. mode: {
  10805. type: String,
  10806. default: () => props$1x.loadingIcon.mode
  10807. },
  10808. // 图标大小,单位默认px
  10809. size: {
  10810. type: [String, Number],
  10811. default: () => props$1x.loadingIcon.size
  10812. },
  10813. // 文字大小
  10814. textSize: {
  10815. type: [String, Number],
  10816. default: () => props$1x.loadingIcon.textSize
  10817. },
  10818. // 文字内容
  10819. text: {
  10820. type: [String, Number],
  10821. default: () => props$1x.loadingIcon.text
  10822. },
  10823. // 动画模式
  10824. timingFunction: {
  10825. type: String,
  10826. default: () => props$1x.loadingIcon.timingFunction
  10827. },
  10828. // 动画执行周期时间
  10829. duration: {
  10830. type: [String, Number],
  10831. default: () => props$1x.loadingIcon.duration
  10832. },
  10833. // mode=circle时的暗边颜色
  10834. inactiveColor: {
  10835. type: String,
  10836. default: () => props$1x.loadingIcon.inactiveColor
  10837. }
  10838. }
  10839. });
  10840. function colorGradient(startColor = "rgb(0, 0, 0)", endColor = "rgb(255, 255, 255)", step = 10) {
  10841. const startRGB = hexToRgb(startColor, false);
  10842. const startR = startRGB[0];
  10843. const startG = startRGB[1];
  10844. const startB = startRGB[2];
  10845. const endRGB = hexToRgb(endColor, false);
  10846. const endR = endRGB[0];
  10847. const endG = endRGB[1];
  10848. const endB = endRGB[2];
  10849. const sR = (endR - startR) / step;
  10850. const sG = (endG - startG) / step;
  10851. const sB = (endB - startB) / step;
  10852. const colorArr = [];
  10853. for (let i2 = 0; i2 < step; i2++) {
  10854. let hex = rgbToHex(`rgb(${Math.round(sR * i2 + startR)},${Math.round(sG * i2 + startG)},${Math.round(sB * i2 + startB)})`);
  10855. if (i2 === 0)
  10856. hex = rgbToHex(startColor);
  10857. if (i2 === step - 1)
  10858. hex = rgbToHex(endColor);
  10859. colorArr.push(hex);
  10860. }
  10861. return colorArr;
  10862. }
  10863. function hexToRgb(sColor, str = true) {
  10864. const reg = /^#([0-9a-fA-f]{3}|[0-9a-fA-f]{6})$/;
  10865. sColor = String(sColor).toLowerCase();
  10866. if (sColor && reg.test(sColor)) {
  10867. if (sColor.length === 4) {
  10868. let sColorNew = "#";
  10869. for (let i2 = 1; i2 < 4; i2 += 1) {
  10870. sColorNew += sColor.slice(i2, i2 + 1).concat(sColor.slice(i2, i2 + 1));
  10871. }
  10872. sColor = sColorNew;
  10873. }
  10874. const sColorChange = [];
  10875. for (let i2 = 1; i2 < 7; i2 += 2) {
  10876. sColorChange.push(parseInt(`0x${sColor.slice(i2, i2 + 2)}`));
  10877. }
  10878. if (!str) {
  10879. return sColorChange;
  10880. }
  10881. return `rgb(${sColorChange[0]},${sColorChange[1]},${sColorChange[2]})`;
  10882. }
  10883. if (/^(rgb|RGB)/.test(sColor)) {
  10884. const arr = sColor.replace(/(?:\(|\)|rgb|RGB)*/g, "").split(",");
  10885. return arr.map((val) => Number(val));
  10886. }
  10887. return sColor;
  10888. }
  10889. function rgbToHex(rgb) {
  10890. const _this = rgb;
  10891. const reg = /^#([0-9a-fA-f]{3}|[0-9a-fA-f]{6})$/;
  10892. if (/^(rgb|RGB)/.test(_this)) {
  10893. const aColor = _this.replace(/(?:\(|\)|rgb|RGB)*/g, "").split(",");
  10894. let strHex = "#";
  10895. for (let i2 = 0; i2 < aColor.length; i2++) {
  10896. let hex = Number(aColor[i2]).toString(16);
  10897. hex = String(hex).length == 1 ? `${0}${hex}` : hex;
  10898. if (hex === "0") {
  10899. hex += hex;
  10900. }
  10901. strHex += hex;
  10902. }
  10903. if (strHex.length !== 7) {
  10904. strHex = _this;
  10905. }
  10906. return strHex;
  10907. }
  10908. if (reg.test(_this)) {
  10909. const aNum = _this.replace(/#/, "").split("");
  10910. if (aNum.length === 6) {
  10911. return _this;
  10912. }
  10913. if (aNum.length === 3) {
  10914. let numHex = "#";
  10915. for (let i2 = 0; i2 < aNum.length; i2 += 1) {
  10916. numHex += aNum[i2] + aNum[i2];
  10917. }
  10918. return numHex;
  10919. }
  10920. } else {
  10921. return _this;
  10922. }
  10923. }
  10924. function colorToRgba(color2, alpha) {
  10925. color2 = rgbToHex(color2);
  10926. const reg = /^#([0-9a-fA-f]{3}|[0-9a-fA-f]{6})$/;
  10927. let sColor = String(color2).toLowerCase();
  10928. if (sColor && reg.test(sColor)) {
  10929. if (sColor.length === 4) {
  10930. let sColorNew = "#";
  10931. for (let i2 = 1; i2 < 4; i2 += 1) {
  10932. sColorNew += sColor.slice(i2, i2 + 1).concat(sColor.slice(i2, i2 + 1));
  10933. }
  10934. sColor = sColorNew;
  10935. }
  10936. const sColorChange = [];
  10937. for (let i2 = 1; i2 < 7; i2 += 2) {
  10938. sColorChange.push(parseInt(`0x${sColor.slice(i2, i2 + 2)}`));
  10939. }
  10940. return `rgba(${sColorChange.join(",")},${alpha})`;
  10941. }
  10942. return sColor;
  10943. }
  10944. const colorGradient$1 = {
  10945. colorGradient,
  10946. hexToRgb,
  10947. rgbToHex,
  10948. colorToRgba
  10949. };
  10950. const _sfc_main$2c = {
  10951. name: "u-loading-icon",
  10952. mixins: [mpMixin, mixin, props$1v],
  10953. data() {
  10954. return {
  10955. // Array.form可以通过一个伪数组对象创建指定长度的数组
  10956. // https://developer.mozilla.org/zh-CN/docs/Web/JavaScript/Reference/Global_Objects/Array/from
  10957. array12: Array.from({
  10958. length: 12
  10959. }),
  10960. // 这里需要设置默认值为360,否则在安卓nvue上,会延迟一个duration周期后才执行
  10961. // 在iOS nvue上,则会一开始默认执行两个周期的动画
  10962. aniAngel: 360,
  10963. // 动画旋转角度
  10964. webviewHide: false,
  10965. // 监听webview的状态,如果隐藏了页面,则停止动画,以免性能消耗
  10966. loading: false
  10967. // 是否运行中,针对nvue使用
  10968. };
  10969. },
  10970. computed: {
  10971. // 当为circle类型时,给其另外三边设置一个更轻一些的颜色
  10972. // 之所以需要这么做的原因是,比如父组件传了color为红色,那么需要另外的三个边为浅红色
  10973. // 而不能是固定的某一个其他颜色(因为这个固定的颜色可能浅蓝,导致效果没有那么细腻良好)
  10974. otherBorderColor() {
  10975. const lightColor = colorGradient(this.color, "#ffffff", 100)[80];
  10976. if (this.mode === "circle") {
  10977. return this.inactiveColor ? this.inactiveColor : lightColor;
  10978. } else {
  10979. return "transparent";
  10980. }
  10981. }
  10982. },
  10983. watch: {
  10984. show(n2) {
  10985. }
  10986. },
  10987. mounted() {
  10988. this.init();
  10989. },
  10990. methods: {
  10991. addUnit,
  10992. addStyle,
  10993. init() {
  10994. setTimeout(() => {
  10995. this.show && this.addEventListenerToWebview();
  10996. }, 20);
  10997. },
  10998. // 监听webview的显示与隐藏
  10999. addEventListenerToWebview() {
  11000. const pages2 = getCurrentPages();
  11001. const page2 = pages2[pages2.length - 1];
  11002. const currentWebview = page2.$getAppWebview();
  11003. currentWebview.addEventListener("hide", () => {
  11004. this.webviewHide = true;
  11005. });
  11006. currentWebview.addEventListener("show", () => {
  11007. this.webviewHide = false;
  11008. });
  11009. }
  11010. }
  11011. };
  11012. function _sfc_render$2b(_ctx, _cache, $props, $setup, $data, $options) {
  11013. return _ctx.show ? (vue.openBlock(), vue.createElementBlock(
  11014. "view",
  11015. {
  11016. key: 0,
  11017. class: vue.normalizeClass(["u-loading-icon", [_ctx.vertical && "u-loading-icon--vertical"]]),
  11018. style: vue.normalizeStyle([$options.addStyle(_ctx.customStyle)])
  11019. },
  11020. [
  11021. !$data.webviewHide ? (vue.openBlock(), vue.createElementBlock(
  11022. "view",
  11023. {
  11024. key: 0,
  11025. class: vue.normalizeClass(["u-loading-icon__spinner", [`u-loading-icon__spinner--${_ctx.mode}`]]),
  11026. ref: "ani",
  11027. style: vue.normalizeStyle({
  11028. color: _ctx.color,
  11029. width: $options.addUnit(_ctx.size),
  11030. height: $options.addUnit(_ctx.size),
  11031. borderTopColor: _ctx.color,
  11032. borderBottomColor: $options.otherBorderColor,
  11033. borderLeftColor: $options.otherBorderColor,
  11034. borderRightColor: $options.otherBorderColor,
  11035. "animation-duration": `${_ctx.duration}ms`,
  11036. "animation-timing-function": _ctx.mode === "semicircle" || _ctx.mode === "circle" ? _ctx.timingFunction : ""
  11037. })
  11038. },
  11039. [
  11040. _ctx.mode === "spinner" ? (vue.openBlock(true), vue.createElementBlock(
  11041. vue.Fragment,
  11042. { key: 0 },
  11043. vue.renderList($data.array12, (item, index2) => {
  11044. return vue.openBlock(), vue.createElementBlock("view", {
  11045. key: index2,
  11046. class: "u-loading-icon__dot"
  11047. });
  11048. }),
  11049. 128
  11050. /* KEYED_FRAGMENT */
  11051. )) : vue.createCommentVNode("v-if", true)
  11052. ],
  11053. 6
  11054. /* CLASS, STYLE */
  11055. )) : vue.createCommentVNode("v-if", true),
  11056. _ctx.text ? (vue.openBlock(), vue.createElementBlock(
  11057. "text",
  11058. {
  11059. key: 1,
  11060. class: "u-loading-icon__text",
  11061. style: vue.normalizeStyle({
  11062. fontSize: $options.addUnit(_ctx.textSize),
  11063. color: _ctx.textColor
  11064. })
  11065. },
  11066. vue.toDisplayString(_ctx.text),
  11067. 5
  11068. /* TEXT, STYLE */
  11069. )) : vue.createCommentVNode("v-if", true)
  11070. ],
  11071. 6
  11072. /* CLASS, STYLE */
  11073. )) : vue.createCommentVNode("v-if", true);
  11074. }
  11075. const __easycom_0$e = /* @__PURE__ */ _export_sfc(_sfc_main$2c, [["render", _sfc_render$2b], ["__scopeId", "data-v-2af81691"], ["__file", "C:/Users/EDY/Desktop/项目/shuibei/uni_modules/uview-plus/components/u-loading-icon/u-loading-icon.vue"]]);
  11076. const __vite_glob_0_59 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
  11077. __proto__: null,
  11078. default: __easycom_0$e
  11079. }, Symbol.toStringTag, { value: "Module" }));
  11080. const props$1u = defineMixin({
  11081. props: {
  11082. // 背景颜色(默认transparent)
  11083. bgColor: {
  11084. type: String,
  11085. default: () => props$1x.gap.bgColor
  11086. },
  11087. // 分割槽高度,单位px(默认30)
  11088. height: {
  11089. type: [String, Number],
  11090. default: () => props$1x.gap.height
  11091. },
  11092. // 与上一个组件的距离
  11093. marginTop: {
  11094. type: [String, Number],
  11095. default: () => props$1x.gap.marginTop
  11096. },
  11097. // 与下一个组件的距离
  11098. marginBottom: {
  11099. type: [String, Number],
  11100. default: () => props$1x.gap.marginBottom
  11101. }
  11102. }
  11103. });
  11104. const _sfc_main$2b = {
  11105. name: "u-gap",
  11106. mixins: [mpMixin, mixin, props$1u],
  11107. computed: {
  11108. gapStyle() {
  11109. const style = {
  11110. backgroundColor: this.bgColor,
  11111. height: addUnit(this.height),
  11112. marginTop: addUnit(this.marginTop),
  11113. marginBottom: addUnit(this.marginBottom)
  11114. };
  11115. return deepMerge$1(style, addStyle(this.customStyle));
  11116. }
  11117. }
  11118. };
  11119. function _sfc_render$2a(_ctx, _cache, $props, $setup, $data, $options) {
  11120. return vue.openBlock(), vue.createElementBlock(
  11121. "view",
  11122. {
  11123. class: "u-gap",
  11124. style: vue.normalizeStyle([$options.gapStyle])
  11125. },
  11126. null,
  11127. 4
  11128. /* STYLE */
  11129. );
  11130. }
  11131. const __easycom_1$3 = /* @__PURE__ */ _export_sfc(_sfc_main$2b, [["render", _sfc_render$2a], ["__file", "C:/Users/EDY/Desktop/项目/shuibei/uni_modules/uview-plus/components/u-gap/u-gap.vue"]]);
  11132. const __vite_glob_0_43 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
  11133. __proto__: null,
  11134. default: __easycom_1$3
  11135. }, Symbol.toStringTag, { value: "Module" }));
  11136. const props$1t = defineMixin({
  11137. props: {
  11138. // 是否展示组件
  11139. show: {
  11140. type: Boolean,
  11141. default: () => props$1x.transition.show
  11142. },
  11143. // 使用的动画模式
  11144. mode: {
  11145. type: String,
  11146. default: () => props$1x.transition.mode
  11147. },
  11148. // 动画的执行时间,单位ms
  11149. duration: {
  11150. type: [String, Number],
  11151. default: () => props$1x.transition.duration
  11152. },
  11153. // 使用的动画过渡函数
  11154. timingFunction: {
  11155. type: String,
  11156. default: () => props$1x.transition.timingFunction
  11157. }
  11158. }
  11159. });
  11160. const getClassNames = (name2) => ({
  11161. enter: `u-${name2}-enter u-${name2}-enter-active`,
  11162. "enter-to": `u-${name2}-enter-to u-${name2}-enter-active`,
  11163. leave: `u-${name2}-leave u-${name2}-leave-active`,
  11164. "leave-to": `u-${name2}-leave-to u-${name2}-leave-active`
  11165. });
  11166. const transitionMixin = {
  11167. methods: {
  11168. // 组件被点击发出事件
  11169. clickHandler() {
  11170. this.$emit("click");
  11171. },
  11172. // vue版本的组件进场处理
  11173. async vueEnter() {
  11174. const classNames = getClassNames(this.mode);
  11175. this.status = "enter";
  11176. this.$emit("beforeEnter");
  11177. this.inited = true;
  11178. this.display = true;
  11179. this.classes = classNames.enter;
  11180. await vue.nextTick();
  11181. {
  11182. await sleep(20);
  11183. this.$emit("enter");
  11184. this.transitionEnded = false;
  11185. this.$emit("afterEnter");
  11186. this.classes = classNames["enter-to"];
  11187. }
  11188. },
  11189. // 动画离场处理
  11190. async vueLeave() {
  11191. if (!this.display)
  11192. return;
  11193. const classNames = getClassNames(this.mode);
  11194. this.status = "leave";
  11195. this.$emit("beforeLeave");
  11196. this.classes = classNames.leave;
  11197. await vue.nextTick();
  11198. {
  11199. this.transitionEnded = false;
  11200. this.$emit("leave");
  11201. setTimeout(this.onTransitionEnd, this.duration);
  11202. this.classes = classNames["leave-to"];
  11203. }
  11204. },
  11205. // 完成过渡后触发
  11206. onTransitionEnd() {
  11207. if (this.transitionEnded)
  11208. return;
  11209. this.transitionEnded = true;
  11210. this.$emit(this.status === "leave" ? "afterLeave" : "afterEnter");
  11211. if (!this.show && this.display) {
  11212. this.display = false;
  11213. this.inited = false;
  11214. }
  11215. }
  11216. }
  11217. };
  11218. const _sfc_main$2a = {
  11219. name: "u-transition",
  11220. data() {
  11221. return {
  11222. inited: false,
  11223. // 是否显示/隐藏组件
  11224. viewStyle: {},
  11225. // 组件内部的样式
  11226. status: "",
  11227. // 记录组件动画的状态
  11228. transitionEnded: false,
  11229. // 组件是否结束的标记
  11230. display: false,
  11231. // 组件是否展示
  11232. classes: ""
  11233. // 应用的类名
  11234. };
  11235. },
  11236. emits: ["click", "beforeEnter", "enter", "afterEnter", "beforeLeave", "leave", "afterLeave"],
  11237. computed: {
  11238. mergeStyle() {
  11239. const { viewStyle, customStyle } = this;
  11240. return {
  11241. transitionDuration: `${this.duration}ms`,
  11242. // display: `${this.display ? '' : 'none'}`,
  11243. transitionTimingFunction: this.timingFunction,
  11244. // 避免自定义样式影响到动画属性,所以写在viewStyle前面
  11245. ...addStyle(customStyle),
  11246. ...viewStyle
  11247. };
  11248. }
  11249. },
  11250. // 将mixin挂在到组件中,实际上为一个vue格式对象。
  11251. mixins: [mpMixin, mixin, transitionMixin, props$1t],
  11252. watch: {
  11253. show: {
  11254. handler(newVal) {
  11255. newVal ? this.vueEnter() : this.vueLeave();
  11256. },
  11257. // 表示同时监听初始化时的props的show的意思
  11258. immediate: true
  11259. }
  11260. }
  11261. };
  11262. function _sfc_render$29(_ctx, _cache, $props, $setup, $data, $options) {
  11263. return $data.inited ? (vue.openBlock(), vue.createElementBlock(
  11264. "view",
  11265. {
  11266. key: 0,
  11267. class: vue.normalizeClass(["u-transition", $data.classes]),
  11268. ref: "u-transition",
  11269. onClick: _cache[0] || (_cache[0] = (...args) => _ctx.clickHandler && _ctx.clickHandler(...args)),
  11270. style: vue.normalizeStyle([$options.mergeStyle]),
  11271. onTouchmove: _cache[1] || (_cache[1] = (...args) => _ctx.noop && _ctx.noop(...args))
  11272. },
  11273. [
  11274. vue.renderSlot(_ctx.$slots, "default", {}, void 0, true)
  11275. ],
  11276. 38
  11277. /* CLASS, STYLE, NEED_HYDRATION */
  11278. )) : vue.createCommentVNode("v-if", true);
  11279. }
  11280. const __easycom_2$1 = /* @__PURE__ */ _export_sfc(_sfc_main$2a, [["render", _sfc_render$29], ["__scopeId", "data-v-5cec8177"], ["__file", "C:/Users/EDY/Desktop/项目/shuibei/uni_modules/uview-plus/components/u-transition/u-transition.vue"]]);
  11281. const __vite_glob_0_124 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
  11282. __proto__: null,
  11283. default: __easycom_2$1
  11284. }, Symbol.toStringTag, { value: "Module" }));
  11285. const props$1s = defineMixin({
  11286. props: {
  11287. // 是否显示遮罩
  11288. show: {
  11289. type: Boolean,
  11290. default: () => props$1x.overlay.show
  11291. },
  11292. // 层级z-index
  11293. zIndex: {
  11294. type: [String, Number],
  11295. default: () => props$1x.overlay.zIndex
  11296. },
  11297. // 遮罩的过渡时间,单位为ms
  11298. duration: {
  11299. type: [String, Number],
  11300. default: () => props$1x.overlay.duration
  11301. },
  11302. // 不透明度值,当做rgba的第四个参数
  11303. opacity: {
  11304. type: [String, Number],
  11305. default: () => props$1x.overlay.opacity
  11306. }
  11307. }
  11308. });
  11309. const _sfc_main$29 = {
  11310. name: "u-overlay",
  11311. mixins: [mpMixin, mixin, props$1s],
  11312. computed: {
  11313. overlayStyle() {
  11314. const style = {
  11315. position: "fixed",
  11316. top: 0,
  11317. left: 0,
  11318. right: 0,
  11319. zIndex: this.zIndex,
  11320. bottom: 0,
  11321. "background-color": `rgba(0, 0, 0, ${this.opacity})`
  11322. };
  11323. return deepMerge$1(style, addStyle(this.customStyle));
  11324. }
  11325. },
  11326. emits: ["click"],
  11327. methods: {
  11328. clickHandler() {
  11329. this.$emit("click");
  11330. }
  11331. }
  11332. };
  11333. function _sfc_render$28(_ctx, _cache, $props, $setup, $data, $options) {
  11334. const _component_u_transition = resolveEasycom(vue.resolveDynamicComponent("u-transition"), __easycom_2$1);
  11335. return vue.openBlock(), vue.createBlock(_component_u_transition, {
  11336. show: _ctx.show,
  11337. "custom-class": "u-overlay",
  11338. duration: _ctx.duration,
  11339. "custom-style": $options.overlayStyle,
  11340. onClick: $options.clickHandler,
  11341. onTouchmove: vue.withModifiers(_ctx.noop, ["stop", "prevent"])
  11342. }, {
  11343. default: vue.withCtx(() => [
  11344. vue.renderSlot(_ctx.$slots, "default", {}, void 0, true)
  11345. ]),
  11346. _: 3
  11347. /* FORWARDED */
  11348. }, 8, ["show", "duration", "custom-style", "onClick", "onTouchmove"]);
  11349. }
  11350. const __easycom_0$d = /* @__PURE__ */ _export_sfc(_sfc_main$29, [["render", _sfc_render$28], ["__scopeId", "data-v-9112bed9"], ["__file", "C:/Users/EDY/Desktop/项目/shuibei/uni_modules/uview-plus/components/u-overlay/u-overlay.vue"]]);
  11351. const __vite_glob_0_72 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
  11352. __proto__: null,
  11353. default: __easycom_0$d
  11354. }, Symbol.toStringTag, { value: "Module" }));
  11355. const props$1r = defineMixin({
  11356. props: {
  11357. bgColor: {
  11358. type: String,
  11359. default: () => props$1x.statusBar.bgColor
  11360. },
  11361. // 状态栏获取得高度
  11362. height: {
  11363. type: Number,
  11364. default: () => props$1x.statusBar.height
  11365. }
  11366. }
  11367. });
  11368. const _sfc_main$28 = {
  11369. name: "u-status-bar",
  11370. mixins: [mpMixin, mixin, props$1r],
  11371. data() {
  11372. return {
  11373. isH5: false
  11374. };
  11375. },
  11376. created() {
  11377. },
  11378. emits: ["update:height"],
  11379. computed: {
  11380. style() {
  11381. const style = {};
  11382. let sheight = getWindowInfo().statusBarHeight;
  11383. this.$emit("update:height", sheight);
  11384. if (sheight == 0) {
  11385. this.isH5 = true;
  11386. } else {
  11387. style.height = addUnit(sheight, "px");
  11388. }
  11389. style.backgroundColor = this.bgColor;
  11390. return deepMerge$1(style, addStyle(this.customStyle));
  11391. }
  11392. }
  11393. };
  11394. function _sfc_render$27(_ctx, _cache, $props, $setup, $data, $options) {
  11395. return vue.openBlock(), vue.createElementBlock(
  11396. "view",
  11397. {
  11398. style: vue.normalizeStyle([$options.style]),
  11399. class: vue.normalizeClass(["u-status-bar", [$data.isH5 && "u-safe-area-inset-top"]])
  11400. },
  11401. [
  11402. vue.renderSlot(_ctx.$slots, "default", {}, void 0, true)
  11403. ],
  11404. 6
  11405. /* CLASS, STYLE */
  11406. );
  11407. }
  11408. const __easycom_0$c = /* @__PURE__ */ _export_sfc(_sfc_main$28, [["render", _sfc_render$27], ["__scopeId", "data-v-eb8e0cdd"], ["__file", "C:/Users/EDY/Desktop/项目/shuibei/uni_modules/uview-plus/components/u-status-bar/u-status-bar.vue"]]);
  11409. const __vite_glob_0_98 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
  11410. __proto__: null,
  11411. default: __easycom_0$c
  11412. }, Symbol.toStringTag, { value: "Module" }));
  11413. const props$1q = defineMixin({
  11414. props: {}
  11415. });
  11416. const _sfc_main$27 = {
  11417. name: "u-safe-bottom",
  11418. mixins: [mpMixin, mixin, props$1q],
  11419. data() {
  11420. return {
  11421. safeAreaBottomHeight: 0,
  11422. isNvue: false
  11423. };
  11424. },
  11425. computed: {
  11426. style() {
  11427. const style = {};
  11428. return deepMerge$1(style, addStyle(this.customStyle));
  11429. }
  11430. },
  11431. mounted() {
  11432. }
  11433. };
  11434. function _sfc_render$26(_ctx, _cache, $props, $setup, $data, $options) {
  11435. return vue.openBlock(), vue.createElementBlock(
  11436. "view",
  11437. {
  11438. class: vue.normalizeClass(["u-safe-bottom", [!$data.isNvue && "u-safe-area-inset-bottom"]]),
  11439. style: vue.normalizeStyle([$options.style])
  11440. },
  11441. null,
  11442. 6
  11443. /* CLASS, STYLE */
  11444. );
  11445. }
  11446. const __easycom_0$b = /* @__PURE__ */ _export_sfc(_sfc_main$27, [["render", _sfc_render$26], ["__scopeId", "data-v-f3d22cfe"], ["__file", "C:/Users/EDY/Desktop/项目/shuibei/uni_modules/uview-plus/components/u-safe-bottom/u-safe-bottom.vue"]]);
  11447. const __vite_glob_0_90 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
  11448. __proto__: null,
  11449. default: __easycom_0$b
  11450. }, Symbol.toStringTag, { value: "Module" }));
  11451. const props$1p = defineMixin({
  11452. props: {
  11453. // 是否展示弹窗
  11454. show: {
  11455. type: Boolean,
  11456. default: () => props$1x.popup.show
  11457. },
  11458. // 是否显示遮罩
  11459. overlay: {
  11460. type: Boolean,
  11461. default: () => props$1x.popup.overlay
  11462. },
  11463. // 弹出的方向,可选值为 top bottom right left center
  11464. mode: {
  11465. type: String,
  11466. default: () => props$1x.popup.mode
  11467. },
  11468. // 动画时长,单位ms
  11469. duration: {
  11470. type: [String, Number],
  11471. default: () => props$1x.popup.duration
  11472. },
  11473. // 是否显示关闭图标
  11474. closeable: {
  11475. type: Boolean,
  11476. default: () => props$1x.popup.closeable
  11477. },
  11478. // 自定义遮罩的样式
  11479. overlayStyle: {
  11480. type: [Object, String],
  11481. default: () => props$1x.popup.overlayStyle
  11482. },
  11483. // 点击遮罩是否关闭弹窗
  11484. closeOnClickOverlay: {
  11485. type: Boolean,
  11486. default: () => props$1x.popup.closeOnClickOverlay
  11487. },
  11488. // 层级
  11489. zIndex: {
  11490. type: [String, Number],
  11491. default: () => props$1x.popup.zIndex
  11492. },
  11493. // 是否为iPhoneX留出底部安全距离
  11494. safeAreaInsetBottom: {
  11495. type: Boolean,
  11496. default: () => props$1x.popup.safeAreaInsetBottom
  11497. },
  11498. // 是否留出顶部安全距离(状态栏高度)
  11499. safeAreaInsetTop: {
  11500. type: Boolean,
  11501. default: () => props$1x.popup.safeAreaInsetTop
  11502. },
  11503. // 自定义关闭图标位置,top-left为左上角,top-right为右上角,bottom-left为左下角,bottom-right为右下角
  11504. closeIconPos: {
  11505. type: String,
  11506. default: () => props$1x.popup.closeIconPos
  11507. },
  11508. // 是否显示圆角
  11509. round: {
  11510. type: [Boolean, String, Number],
  11511. default: () => props$1x.popup.round
  11512. },
  11513. // mode=center,也即中部弹出时,是否使用缩放模式
  11514. zoom: {
  11515. type: Boolean,
  11516. default: () => props$1x.popup.zoom
  11517. },
  11518. // 弹窗背景色,设置为transparent可去除白色背景
  11519. bgColor: {
  11520. type: String,
  11521. default: () => props$1x.popup.bgColor
  11522. },
  11523. // 遮罩的透明度,0-1之间
  11524. overlayOpacity: {
  11525. type: [Number, String],
  11526. default: () => props$1x.popup.overlayOpacity
  11527. },
  11528. // 是否页面内展示
  11529. pageInline: {
  11530. type: Boolean,
  11531. default: () => props$1x.popup.pageInline
  11532. }
  11533. }
  11534. });
  11535. const _sfc_main$26 = {
  11536. name: "u-popup",
  11537. mixins: [mpMixin, mixin, props$1p],
  11538. data() {
  11539. return {
  11540. overlayDuration: this.duration + 50
  11541. };
  11542. },
  11543. watch: {
  11544. show(newValue, oldValue) {
  11545. }
  11546. },
  11547. computed: {
  11548. transitionStyle() {
  11549. const style = {
  11550. display: "flex"
  11551. };
  11552. if (!this.pageInline) {
  11553. style.zIndex = this.zIndex;
  11554. style.position = "fixed";
  11555. }
  11556. style[this.mode] = 0;
  11557. if (this.mode === "left") {
  11558. return deepMerge$1(style, {
  11559. bottom: 0,
  11560. top: 0
  11561. });
  11562. } else if (this.mode === "right") {
  11563. return deepMerge$1(style, {
  11564. bottom: 0,
  11565. top: 0
  11566. });
  11567. } else if (this.mode === "top") {
  11568. return deepMerge$1(style, {
  11569. left: 0,
  11570. right: 0
  11571. });
  11572. } else if (this.mode === "bottom") {
  11573. return deepMerge$1(style, {
  11574. left: 0,
  11575. right: 0
  11576. });
  11577. } else if (this.mode === "center") {
  11578. return deepMerge$1(style, {
  11579. alignItems: "center",
  11580. "justify-content": "center",
  11581. top: 0,
  11582. left: 0,
  11583. right: 0,
  11584. bottom: 0
  11585. });
  11586. }
  11587. },
  11588. contentStyle() {
  11589. const style = {};
  11590. getWindowInfo();
  11591. if (this.mode !== "center") {
  11592. style.flex = 1;
  11593. }
  11594. if (this.bgColor) {
  11595. style.backgroundColor = this.bgColor;
  11596. }
  11597. if (this.round) {
  11598. const value2 = addUnit(this.round);
  11599. if (this.mode === "top") {
  11600. style.borderBottomLeftRadius = value2;
  11601. style.borderBottomRightRadius = value2;
  11602. } else if (this.mode === "bottom") {
  11603. style.borderTopLeftRadius = value2;
  11604. style.borderTopRightRadius = value2;
  11605. } else if (this.mode === "center") {
  11606. style.borderRadius = value2;
  11607. }
  11608. }
  11609. return deepMerge$1(style, addStyle(this.customStyle));
  11610. },
  11611. position() {
  11612. if (this.mode === "center") {
  11613. return this.zoom ? "fade-zoom" : "fade";
  11614. }
  11615. if (this.mode === "left") {
  11616. return "slide-left";
  11617. }
  11618. if (this.mode === "right") {
  11619. return "slide-right";
  11620. }
  11621. if (this.mode === "bottom") {
  11622. return "slide-up";
  11623. }
  11624. if (this.mode === "top") {
  11625. return "slide-down";
  11626. }
  11627. }
  11628. },
  11629. emits: ["open", "close", "click", "update:show"],
  11630. methods: {
  11631. // 点击遮罩
  11632. overlayClick() {
  11633. if (this.closeOnClickOverlay) {
  11634. this.$emit("update:show", false);
  11635. this.$emit("close");
  11636. }
  11637. },
  11638. open(e2) {
  11639. this.$emit("update:show", true);
  11640. },
  11641. close(e2) {
  11642. this.$emit("update:show", false);
  11643. this.$emit("close");
  11644. },
  11645. afterEnter() {
  11646. this.$emit("open");
  11647. },
  11648. clickHandler() {
  11649. if (this.mode === "center") {
  11650. this.overlayClick();
  11651. }
  11652. this.$emit("click");
  11653. }
  11654. }
  11655. };
  11656. function _sfc_render$25(_ctx, _cache, $props, $setup, $data, $options) {
  11657. const _component_u_overlay = resolveEasycom(vue.resolveDynamicComponent("u-overlay"), __easycom_0$d);
  11658. const _component_u_status_bar = resolveEasycom(vue.resolveDynamicComponent("u-status-bar"), __easycom_0$c);
  11659. const _component_up_icon = vue.resolveComponent("up-icon");
  11660. const _component_u_safe_bottom = resolveEasycom(vue.resolveDynamicComponent("u-safe-bottom"), __easycom_0$b);
  11661. const _component_u_transition = resolveEasycom(vue.resolveDynamicComponent("u-transition"), __easycom_2$1);
  11662. return vue.openBlock(), vue.createElementBlock(
  11663. "view",
  11664. {
  11665. class: vue.normalizeClass(["u-popup", [_ctx.customClass]]),
  11666. style: vue.normalizeStyle({
  11667. width: _ctx.show == false ? "0px" : "",
  11668. height: _ctx.show == false ? "0px" : ""
  11669. })
  11670. },
  11671. [
  11672. vue.createElementVNode("view", { class: "u-popup__trigger" }, [
  11673. vue.renderSlot(_ctx.$slots, "trigger", {}, void 0, true),
  11674. vue.createElementVNode("view", {
  11675. onClick: _cache[0] || (_cache[0] = (...args) => $options.open && $options.open(...args)),
  11676. class: "u-popup__trigger__cover"
  11677. })
  11678. ]),
  11679. _ctx.overlay ? (vue.openBlock(), vue.createBlock(_component_u_overlay, {
  11680. key: 0,
  11681. show: _ctx.show && _ctx.pageInline == false,
  11682. onClick: $options.overlayClick,
  11683. zIndex: _ctx.zIndex,
  11684. duration: $data.overlayDuration,
  11685. customStyle: _ctx.overlayStyle,
  11686. opacity: _ctx.overlayOpacity
  11687. }, null, 8, ["show", "onClick", "zIndex", "duration", "customStyle", "opacity"])) : vue.createCommentVNode("v-if", true),
  11688. vue.createVNode(_component_u_transition, {
  11689. show: _ctx.show,
  11690. customStyle: $options.transitionStyle,
  11691. mode: _ctx.pageInline ? "none" : $options.position,
  11692. duration: _ctx.duration,
  11693. onAfterEnter: $options.afterEnter,
  11694. onClick: $options.clickHandler
  11695. }, {
  11696. default: vue.withCtx(() => [
  11697. vue.createCommentVNode(" @click.stop不能去除,去除会导致居中模式下点击内容区域触发关闭弹窗 "),
  11698. vue.createElementVNode(
  11699. "view",
  11700. {
  11701. class: "u-popup__content",
  11702. style: vue.normalizeStyle([$options.contentStyle]),
  11703. onClick: _cache[2] || (_cache[2] = vue.withModifiers((...args) => _ctx.noop && _ctx.noop(...args), ["stop"])),
  11704. onTouchmove: _cache[3] || (_cache[3] = vue.withModifiers((...args) => _ctx.noop && _ctx.noop(...args), ["stop", "prevent"]))
  11705. },
  11706. [
  11707. _ctx.safeAreaInsetTop ? (vue.openBlock(), vue.createBlock(_component_u_status_bar, { key: 0 })) : vue.createCommentVNode("v-if", true),
  11708. vue.renderSlot(_ctx.$slots, "default", {}, void 0, true),
  11709. _ctx.closeable ? (vue.openBlock(), vue.createElementBlock(
  11710. "view",
  11711. {
  11712. key: 1,
  11713. onClick: _cache[1] || (_cache[1] = vue.withModifiers((...args) => $options.close && $options.close(...args), ["stop"])),
  11714. class: vue.normalizeClass(["u-popup__content__close", ["u-popup__content__close--" + _ctx.closeIconPos]]),
  11715. "hover-class": "u-popup__content__close--hover",
  11716. "hover-stay-time": "150"
  11717. },
  11718. [
  11719. vue.createVNode(_component_up_icon, {
  11720. name: "close",
  11721. color: "#909399",
  11722. size: "18",
  11723. bold: ""
  11724. })
  11725. ],
  11726. 2
  11727. /* CLASS */
  11728. )) : vue.createCommentVNode("v-if", true),
  11729. _ctx.safeAreaInsetBottom ? (vue.openBlock(), vue.createBlock(_component_u_safe_bottom, { key: 2 })) : vue.createCommentVNode("v-if", true)
  11730. ],
  11731. 36
  11732. /* STYLE, NEED_HYDRATION */
  11733. ),
  11734. vue.renderSlot(_ctx.$slots, "bottom", {}, void 0, true)
  11735. ]),
  11736. _: 3
  11737. /* FORWARDED */
  11738. }, 8, ["show", "customStyle", "mode", "duration", "onAfterEnter", "onClick"])
  11739. ],
  11740. 6
  11741. /* CLASS, STYLE */
  11742. );
  11743. }
  11744. const __easycom_2 = /* @__PURE__ */ _export_sfc(_sfc_main$26, [["render", _sfc_render$25], ["__scopeId", "data-v-05c24e9b"], ["__file", "C:/Users/EDY/Desktop/项目/shuibei/uni_modules/uview-plus/components/u-popup/u-popup.vue"]]);
  11745. const __vite_glob_0_79 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
  11746. __proto__: null,
  11747. default: __easycom_2
  11748. }, Symbol.toStringTag, { value: "Module" }));
  11749. const openType = defineMixin({
  11750. props: {
  11751. openType: String
  11752. },
  11753. methods: {
  11754. onGetUserInfo(event) {
  11755. this.$emit("getuserinfo", event.detail);
  11756. },
  11757. onContact(event) {
  11758. this.$emit("contact", event.detail);
  11759. },
  11760. onGetPhoneNumber(event) {
  11761. this.$emit("getphonenumber", event.detail);
  11762. },
  11763. onError(event) {
  11764. this.$emit("error", event.detail);
  11765. },
  11766. onLaunchApp(event) {
  11767. this.$emit("launchapp", event.detail);
  11768. },
  11769. onOpenSetting(event) {
  11770. this.$emit("opensetting", event.detail);
  11771. }
  11772. }
  11773. });
  11774. const buttonMixin = defineMixin({
  11775. props: {
  11776. lang: String,
  11777. sessionFrom: String,
  11778. sendMessageTitle: String,
  11779. sendMessagePath: String,
  11780. sendMessageImg: String,
  11781. showMessageCard: Boolean,
  11782. appParameter: String,
  11783. formType: String,
  11784. openType: String
  11785. }
  11786. });
  11787. const props$1o = defineMixin({
  11788. props: {
  11789. // 操作菜单是否展示 (默认false)
  11790. show: {
  11791. type: Boolean,
  11792. default: () => props$1x.actionSheet.show
  11793. },
  11794. // 标题
  11795. title: {
  11796. type: String,
  11797. default: () => props$1x.actionSheet.title
  11798. },
  11799. // 选项上方的描述信息
  11800. description: {
  11801. type: String,
  11802. default: () => props$1x.actionSheet.description
  11803. },
  11804. // 数据
  11805. actions: {
  11806. type: Array,
  11807. default: () => props$1x.actionSheet.actions
  11808. },
  11809. // 取消按钮的文字,不为空时显示按钮
  11810. cancelText: {
  11811. type: String,
  11812. default: () => props$1x.actionSheet.cancelText
  11813. },
  11814. // 点击某个菜单项时是否关闭弹窗
  11815. closeOnClickAction: {
  11816. type: Boolean,
  11817. default: () => props$1x.actionSheet.closeOnClickAction
  11818. },
  11819. // 处理底部安全区(默认true)
  11820. safeAreaInsetBottom: {
  11821. type: Boolean,
  11822. default: () => props$1x.actionSheet.safeAreaInsetBottom
  11823. },
  11824. // 小程序的打开方式
  11825. openType: {
  11826. type: String,
  11827. default: () => props$1x.actionSheet.openType
  11828. },
  11829. // 点击遮罩是否允许关闭 (默认true)
  11830. closeOnClickOverlay: {
  11831. type: Boolean,
  11832. default: () => props$1x.actionSheet.closeOnClickOverlay
  11833. },
  11834. // 圆角值
  11835. round: {
  11836. type: [Boolean, String, Number],
  11837. default: () => props$1x.actionSheet.round
  11838. },
  11839. // 选项区域最大高度
  11840. wrapMaxHeight: {
  11841. type: [String],
  11842. default: () => props$1x.actionSheet.wrapMaxHeight
  11843. }
  11844. }
  11845. });
  11846. const _sfc_main$25 = {
  11847. name: "u-action-sheet",
  11848. // 一些props参数和methods方法,通过mixin混入,因为其他文件也会用到
  11849. mixins: [openType, buttonMixin, mixin, props$1o],
  11850. data() {
  11851. return {};
  11852. },
  11853. computed: {
  11854. // 操作项目的样式
  11855. itemStyle() {
  11856. return (index2) => {
  11857. let style = {};
  11858. if (this.actions[index2].color)
  11859. style.color = this.actions[index2].color;
  11860. if (this.actions[index2].fontSize)
  11861. style.fontSize = addUnit(this.actions[index2].fontSize);
  11862. if (this.actions[index2].disabled)
  11863. style.color = "#c0c4cc";
  11864. return style;
  11865. };
  11866. }
  11867. },
  11868. emits: ["close", "select", "update:show"],
  11869. methods: {
  11870. // 关闭操作菜单事件处理
  11871. closeHandler() {
  11872. if (this.closeOnClickOverlay) {
  11873. this.$emit("update:show", false);
  11874. this.$emit("close");
  11875. }
  11876. },
  11877. // 点击取消按钮
  11878. cancel() {
  11879. this.$emit("update:show", false);
  11880. this.$emit("close");
  11881. },
  11882. // 选择操作项处理
  11883. selectHandler(index2) {
  11884. const item = this.actions[index2];
  11885. if (item && !item.disabled && !item.loading) {
  11886. this.$emit("select", item);
  11887. if (this.closeOnClickAction) {
  11888. this.$emit("update:show", false);
  11889. this.$emit("close");
  11890. }
  11891. }
  11892. }
  11893. }
  11894. };
  11895. function _sfc_render$24(_ctx, _cache, $props, $setup, $data, $options) {
  11896. const _component_up_icon = vue.resolveComponent("up-icon");
  11897. const _component_u_line = resolveEasycom(vue.resolveDynamicComponent("u-line"), __easycom_1$4);
  11898. const _component_u_loading_icon = resolveEasycom(vue.resolveDynamicComponent("u-loading-icon"), __easycom_0$e);
  11899. const _component_u_gap = resolveEasycom(vue.resolveDynamicComponent("u-gap"), __easycom_1$3);
  11900. const _component_u_popup = resolveEasycom(vue.resolveDynamicComponent("u-popup"), __easycom_2);
  11901. return vue.openBlock(), vue.createBlock(_component_u_popup, {
  11902. show: _ctx.show,
  11903. mode: "bottom",
  11904. onClose: $options.closeHandler,
  11905. safeAreaInsetBottom: _ctx.safeAreaInsetBottom,
  11906. round: _ctx.round
  11907. }, {
  11908. default: vue.withCtx(() => [
  11909. vue.createElementVNode("view", { class: "u-action-sheet" }, [
  11910. vue.createCommentVNode(" 顶部标题区域 "),
  11911. _ctx.title ? (vue.openBlock(), vue.createElementBlock("view", {
  11912. key: 0,
  11913. class: "u-action-sheet__header"
  11914. }, [
  11915. vue.createElementVNode(
  11916. "text",
  11917. { class: "u-action-sheet__header__title u-line-1" },
  11918. vue.toDisplayString(_ctx.title),
  11919. 1
  11920. /* TEXT */
  11921. ),
  11922. vue.createElementVNode("view", {
  11923. class: "u-action-sheet__header__icon-wrap",
  11924. onClick: _cache[0] || (_cache[0] = vue.withModifiers((...args) => $options.cancel && $options.cancel(...args), ["stop"]))
  11925. }, [
  11926. vue.createVNode(_component_up_icon, {
  11927. name: "close",
  11928. size: "17",
  11929. color: "#c8c9cc",
  11930. bold: ""
  11931. })
  11932. ])
  11933. ])) : vue.createCommentVNode("v-if", true),
  11934. vue.createCommentVNode(" 描述信息 "),
  11935. _ctx.description ? (vue.openBlock(), vue.createElementBlock(
  11936. "text",
  11937. {
  11938. key: 1,
  11939. class: "u-action-sheet__description",
  11940. style: vue.normalizeStyle([{
  11941. marginTop: `${_ctx.title && _ctx.description ? 0 : "18px"}`
  11942. }])
  11943. },
  11944. vue.toDisplayString(_ctx.description),
  11945. 5
  11946. /* TEXT, STYLE */
  11947. )) : vue.createCommentVNode("v-if", true),
  11948. vue.renderSlot(_ctx.$slots, "default", {}, () => [
  11949. vue.createCommentVNode(" 分割线 "),
  11950. _ctx.description ? (vue.openBlock(), vue.createBlock(_component_u_line, { key: 0 })) : vue.createCommentVNode("v-if", true),
  11951. vue.createCommentVNode(" 操作项列表 "),
  11952. vue.createElementVNode(
  11953. "scroll-view",
  11954. {
  11955. "scroll-y": "",
  11956. class: "u-action-sheet__item-wrap",
  11957. style: vue.normalizeStyle({ maxHeight: _ctx.wrapMaxHeight })
  11958. },
  11959. [
  11960. (vue.openBlock(true), vue.createElementBlock(
  11961. vue.Fragment,
  11962. null,
  11963. vue.renderList(_ctx.actions, (item, index2) => {
  11964. return vue.openBlock(), vue.createElementBlock("view", { key: index2 }, [
  11965. vue.createElementVNode("view", {
  11966. class: "u-action-sheet__item-wrap__item",
  11967. onClick: vue.withModifiers(($event) => $options.selectHandler(index2), ["stop"]),
  11968. "hover-class": !item.disabled && !item.loading ? "u-action-sheet--hover" : "",
  11969. "hover-stay-time": 150
  11970. }, [
  11971. !item.loading ? (vue.openBlock(), vue.createElementBlock(
  11972. vue.Fragment,
  11973. { key: 0 },
  11974. [
  11975. vue.createElementVNode(
  11976. "text",
  11977. {
  11978. class: "u-action-sheet__item-wrap__item__name",
  11979. style: vue.normalizeStyle([$options.itemStyle(index2)])
  11980. },
  11981. vue.toDisplayString(item.name),
  11982. 5
  11983. /* TEXT, STYLE */
  11984. ),
  11985. item.subname ? (vue.openBlock(), vue.createElementBlock(
  11986. "text",
  11987. {
  11988. key: 0,
  11989. class: "u-action-sheet__item-wrap__item__subname"
  11990. },
  11991. vue.toDisplayString(item.subname),
  11992. 1
  11993. /* TEXT */
  11994. )) : vue.createCommentVNode("v-if", true)
  11995. ],
  11996. 64
  11997. /* STABLE_FRAGMENT */
  11998. )) : (vue.openBlock(), vue.createElementBlock(
  11999. vue.Fragment,
  12000. { key: 1 },
  12001. [
  12002. vue.createCommentVNode(" 加载状态图标 "),
  12003. vue.createVNode(_component_u_loading_icon, {
  12004. "custom-class": "van-action-sheet__loading",
  12005. size: "18",
  12006. mode: "circle"
  12007. })
  12008. ],
  12009. 2112
  12010. /* STABLE_FRAGMENT, DEV_ROOT_FRAGMENT */
  12011. ))
  12012. ], 8, ["onClick", "hover-class"]),
  12013. vue.createCommentVNode(" 选项间分割线 "),
  12014. index2 !== _ctx.actions.length - 1 ? (vue.openBlock(), vue.createBlock(_component_u_line, { key: 0 })) : vue.createCommentVNode("v-if", true)
  12015. ]);
  12016. }),
  12017. 128
  12018. /* KEYED_FRAGMENT */
  12019. ))
  12020. ],
  12021. 4
  12022. /* STYLE */
  12023. )
  12024. ], true),
  12025. vue.createCommentVNode(" 取消按钮前的分割区域 "),
  12026. _ctx.cancelText ? (vue.openBlock(), vue.createBlock(_component_u_gap, {
  12027. key: 2,
  12028. bgColor: "#eaeaec",
  12029. height: "6"
  12030. })) : vue.createCommentVNode("v-if", true),
  12031. vue.createCommentVNode(" 取消按钮 "),
  12032. _ctx.cancelText ? (vue.openBlock(), vue.createElementBlock("view", {
  12033. key: 3,
  12034. class: "u-action-sheet__item-wrap__item u-action-sheet__cancel",
  12035. "hover-class": "u-action-sheet--hover",
  12036. onClick: _cache[2] || (_cache[2] = (...args) => $options.cancel && $options.cancel(...args))
  12037. }, [
  12038. vue.createElementVNode(
  12039. "text",
  12040. {
  12041. onTouchmove: _cache[1] || (_cache[1] = vue.withModifiers(() => {
  12042. }, ["stop", "prevent"])),
  12043. "hover-stay-time": 150,
  12044. class: "u-action-sheet__cancel-text"
  12045. },
  12046. vue.toDisplayString(_ctx.cancelText),
  12047. 33
  12048. /* TEXT, NEED_HYDRATION */
  12049. )
  12050. ])) : vue.createCommentVNode("v-if", true)
  12051. ])
  12052. ]),
  12053. _: 3
  12054. /* FORWARDED */
  12055. }, 8, ["show", "onClose", "safeAreaInsetBottom", "round"]);
  12056. }
  12057. const uActionSheet = /* @__PURE__ */ _export_sfc(_sfc_main$25, [["render", _sfc_render$24], ["__scopeId", "data-v-69669810"], ["__file", "C:/Users/EDY/Desktop/项目/shuibei/uni_modules/uview-plus/components/u-action-sheet/u-action-sheet.vue"]]);
  12058. const __vite_glob_0_1 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
  12059. __proto__: null,
  12060. default: uActionSheet
  12061. }, Symbol.toStringTag, { value: "Module" }));
  12062. const _sfc_main$24 = {
  12063. name: "up-agreement",
  12064. props: {
  12065. urlProtocol: {
  12066. type: String,
  12067. default: "/pages/user_agreement/agreement/info?title=用户协议"
  12068. },
  12069. urlPrivacy: {
  12070. type: String,
  12071. default: "/pages/user_agreement/agreement/info?title=隐私政策"
  12072. }
  12073. },
  12074. emits: ["confirm"],
  12075. data() {
  12076. return {
  12077. show: false
  12078. };
  12079. },
  12080. methods: {
  12081. close() {
  12082. plus.runtime.quit();
  12083. },
  12084. confirm() {
  12085. this.show = false;
  12086. this.$emit("confirm", 1);
  12087. },
  12088. showModal() {
  12089. this.show = true;
  12090. },
  12091. urlClick(type2) {
  12092. uni.navigateTo({
  12093. url: this[type2]
  12094. });
  12095. }
  12096. }
  12097. };
  12098. function _sfc_render$23(_ctx, _cache, $props, $setup, $data, $options) {
  12099. const _component_up_modal = vue.resolveComponent("up-modal");
  12100. return vue.openBlock(), vue.createElementBlock("view", { class: "up-agreement" }, [
  12101. vue.createVNode(_component_up_modal, {
  12102. show: $data.show,
  12103. "onUpdate:show": _cache[2] || (_cache[2] = ($event) => $data.show = $event),
  12104. showCancelButton: "",
  12105. onConfirm: $options.confirm,
  12106. onCancel: $options.close,
  12107. confirmText: "阅读并同意"
  12108. }, {
  12109. default: vue.withCtx(() => [
  12110. vue.createElementVNode("view", { class: "agreement-content" }, [
  12111. vue.renderSlot(_ctx.$slots, "default", {}, () => [
  12112. vue.createTextVNode(" 我们非常重视您的个人信息和隐私保护。为了更好地保障您的个人权益,在您使用我们的产品前, 请务必审慎阅读《"),
  12113. vue.createElementVNode("text", {
  12114. class: "agreement-url",
  12115. onClick: _cache[0] || (_cache[0] = ($event) => $options.urlClick("urlProtocol"))
  12116. }, "用户协议"),
  12117. vue.createTextVNode("》 和《"),
  12118. vue.createElementVNode("text", {
  12119. class: "agreement-url",
  12120. onClick: _cache[1] || (_cache[1] = ($event) => $options.urlClick("urlPrivacy"))
  12121. }, "隐私政策"),
  12122. vue.createTextVNode("》内的所有条款, 尤其是:1.我们对您的个人信息的收集/保存/使用/对外提供/保护等规则条款,以及您的用户权利等条款;2. 约定我们的限制责任、免责 条款;3.其他以颜色或加粗进行标识的重要条款。如您对以上协议有任何疑问,请先不要同意,您点击“同意并继续”的行为即表示您已阅读 完毕并同意以上协议的全部内容。 ")
  12123. ], true)
  12124. ])
  12125. ]),
  12126. _: 3
  12127. /* FORWARDED */
  12128. }, 8, ["show", "onConfirm", "onCancel"])
  12129. ]);
  12130. }
  12131. const uAgreement = /* @__PURE__ */ _export_sfc(_sfc_main$24, [["render", _sfc_render$23], ["__scopeId", "data-v-1bf68e1e"], ["__file", "C:/Users/EDY/Desktop/项目/shuibei/uni_modules/uview-plus/components/u-agreement/u-agreement.vue"]]);
  12132. const __vite_glob_0_2 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
  12133. __proto__: null,
  12134. default: uAgreement
  12135. }, Symbol.toStringTag, { value: "Module" }));
  12136. const props$1n = defineMixin({
  12137. props: {
  12138. // 图片地址,Array<String>|Array<Object>形式
  12139. urls: {
  12140. type: Array,
  12141. default: () => props$1x.album.urls
  12142. },
  12143. // 指定从数组的对象元素中读取哪个属性作为图片地址
  12144. keyName: {
  12145. type: String,
  12146. default: () => props$1x.album.keyName
  12147. },
  12148. // 单图时,图片长边的长度
  12149. singleSize: {
  12150. type: [String, Number],
  12151. default: () => props$1x.album.singleSize
  12152. },
  12153. // 多图时,图片边长
  12154. multipleSize: {
  12155. type: [String, Number],
  12156. default: () => props$1x.album.multipleSize
  12157. },
  12158. // 多图时,图片水平和垂直之间的间隔
  12159. space: {
  12160. type: [String, Number],
  12161. default: () => props$1x.album.space
  12162. },
  12163. // 单图时,图片缩放裁剪的模式
  12164. singleMode: {
  12165. type: String,
  12166. default: () => props$1x.album.singleMode
  12167. },
  12168. // 多图时,图片缩放裁剪的模式
  12169. multipleMode: {
  12170. type: String,
  12171. default: () => props$1x.album.multipleMode
  12172. },
  12173. // 最多展示的图片数量,超出时最后一个位置将会显示剩余图片数量
  12174. maxCount: {
  12175. type: [String, Number],
  12176. default: () => props$1x.album.maxCount
  12177. },
  12178. // 是否可以预览图片
  12179. previewFullImage: {
  12180. type: Boolean,
  12181. default: () => props$1x.album.previewFullImage
  12182. },
  12183. // 每行展示图片数量,如设置,singleSize和multipleSize将会无效
  12184. rowCount: {
  12185. type: [String, Number],
  12186. default: () => props$1x.album.rowCount
  12187. },
  12188. // 超出maxCount时是否显示查看更多的提示
  12189. showMore: {
  12190. type: Boolean,
  12191. default: () => props$1x.album.showMore
  12192. },
  12193. // 图片形状,circle-圆形,square-方形
  12194. shape: {
  12195. type: String,
  12196. default: () => props$1x.image.shape
  12197. },
  12198. // 圆角,单位任意
  12199. radius: {
  12200. type: [String, Number],
  12201. default: () => props$1x.image.radius
  12202. },
  12203. // 自适应换行
  12204. autoWrap: {
  12205. type: Boolean,
  12206. default: () => props$1x.album.autoWrap
  12207. },
  12208. // 单位
  12209. unit: {
  12210. type: [String],
  12211. default: () => props$1x.album.unit
  12212. },
  12213. // 阻止点击冒泡
  12214. stop: {
  12215. type: Boolean,
  12216. default: () => props$1x.album.stop
  12217. }
  12218. }
  12219. });
  12220. const _sfc_main$23 = {
  12221. name: "u-album",
  12222. mixins: [mpMixin, mixin, props$1n],
  12223. data() {
  12224. return {
  12225. // 单图的宽度
  12226. singleWidth: 0,
  12227. // 单图的高度
  12228. singleHeight: 0,
  12229. // 单图时,如果无法获取图片的尺寸信息,让图片宽度默认为容器的一定百分比
  12230. singlePercent: 0.6
  12231. };
  12232. },
  12233. watch: {
  12234. urls: {
  12235. immediate: true,
  12236. handler(newVal) {
  12237. if (newVal.length === 1) {
  12238. this.getImageRect();
  12239. }
  12240. }
  12241. }
  12242. },
  12243. computed: {
  12244. /**
  12245. * 计算图片样式
  12246. * @param {Number} index1 - 行索引
  12247. * @param {Number} index2 - 列索引
  12248. * @returns {Object} 图片样式对象
  12249. */
  12250. imageStyle() {
  12251. return (index1, index2) => {
  12252. const { space, rowCount, multipleSize, urls } = this, rowLen = this.showUrls.length;
  12253. this.urls.length;
  12254. const style = {
  12255. marginRight: addUnit(space),
  12256. marginBottom: addUnit(space)
  12257. };
  12258. if (index1 === rowLen && !this.autoWrap)
  12259. style.marginBottom = 0;
  12260. if (!this.autoWrap) {
  12261. if (index2 === rowCount || index1 === rowLen && index2 === this.showUrls[index1 - 1].length)
  12262. style.marginRight = 0;
  12263. }
  12264. return style;
  12265. };
  12266. },
  12267. /**
  12268. * 将图片地址数组划分为二维数组,用于按行显示
  12269. * @returns {Array} 二维数组,每个子数组代表一行图片
  12270. */
  12271. showUrls() {
  12272. if (this.autoWrap) {
  12273. return [this.urls.slice(0, this.maxCount)];
  12274. } else {
  12275. const arr = [];
  12276. this.urls.map((item, index2) => {
  12277. if (index2 + 1 <= this.maxCount) {
  12278. const itemIndex = Math.floor(index2 / this.rowCount);
  12279. if (!arr[itemIndex]) {
  12280. arr[itemIndex] = [];
  12281. }
  12282. arr[itemIndex].push(item);
  12283. }
  12284. });
  12285. return arr;
  12286. }
  12287. },
  12288. /**
  12289. * 计算图片宽度
  12290. * @returns {String} 图片宽度样式值
  12291. */
  12292. imageWidth() {
  12293. return addUnit(
  12294. this.urls.length === 1 ? this.singleWidth : this.multipleSize,
  12295. this.unit
  12296. );
  12297. },
  12298. /**
  12299. * 计算图片高度
  12300. * @returns {String} 图片高度样式值
  12301. */
  12302. imageHeight() {
  12303. return addUnit(
  12304. this.urls.length === 1 ? this.singleHeight : this.multipleSize,
  12305. this.unit
  12306. );
  12307. },
  12308. /**
  12309. * 计算相册总宽度,用于外部组件对齐
  12310. * 此变量无实际用途,仅仅是为了利用computed特性,让其在urls长度等变化时,重新计算图片的宽度
  12311. * @returns {Number} 相册宽度
  12312. */
  12313. albumWidth() {
  12314. let width = 0;
  12315. if (this.urls.length === 1) {
  12316. width = this.singleWidth;
  12317. } else {
  12318. width = this.showUrls[0].length * this.multipleSize + this.space * (this.showUrls[0].length - 1);
  12319. }
  12320. this.$emit("albumWidth", width);
  12321. return width;
  12322. }
  12323. },
  12324. emits: ["preview", "albumWidth"],
  12325. methods: {
  12326. addUnit,
  12327. /**
  12328. * 点击图片预览
  12329. * @param {Event} e - 点击事件对象
  12330. * @param {String} url - 当前点击图片的地址
  12331. */
  12332. onPreviewTap(e2, url2) {
  12333. const urls = this.urls.map((item) => {
  12334. return this.getSrc(item);
  12335. });
  12336. if (this.previewFullImage) {
  12337. uni.previewImage({
  12338. current: url2,
  12339. urls
  12340. });
  12341. this.stop && this.preventEvent(e2);
  12342. } else {
  12343. this.$emit("preview", {
  12344. urls,
  12345. currentIndex: urls.indexOf(url2)
  12346. });
  12347. }
  12348. },
  12349. /**
  12350. * 获取图片地址
  12351. * @param {String|Object} item - 图片项,可以是字符串或对象
  12352. * @returns {String} 图片地址
  12353. */
  12354. getSrc(item) {
  12355. return test.object(item) ? this.keyName && item[this.keyName] || item.src : item;
  12356. },
  12357. /**
  12358. * 单图时,获取图片的尺寸
  12359. * 在小程序中,需要将网络图片的的域名添加到小程序的download域名才可能获取尺寸
  12360. * 在没有添加的情况下,让单图宽度默认为盒子的一定宽度(singlePercent)
  12361. */
  12362. getImageRect() {
  12363. const src = this.getSrc(this.urls[0]);
  12364. uni.getImageInfo({
  12365. src,
  12366. success: (res) => {
  12367. let singleSize = this.singleSize;
  12368. let unit = "";
  12369. if (Number.isNaN(Number(this.singleSize))) {
  12370. unit = this.singleSize.replace(/\d+/g, "");
  12371. singleSize = Number(this.singleSize.replace(/\D+/g, ""), 10);
  12372. }
  12373. const isHorizotal = res.width >= res.height;
  12374. this.singleWidth = isHorizotal ? singleSize : res.width / res.height * singleSize;
  12375. this.singleHeight = !isHorizotal ? singleSize : res.height / res.width * this.singleWidth;
  12376. if (unit != null && unit !== "") {
  12377. this.singleWidth = this.singleWidth + unit;
  12378. this.singleHeight = this.singleHeight + unit;
  12379. }
  12380. },
  12381. fail: () => {
  12382. this.getComponentWidth();
  12383. }
  12384. });
  12385. },
  12386. /**
  12387. * 获取组件的宽度,用于计算单图显示尺寸
  12388. */
  12389. async getComponentWidth() {
  12390. await sleep(30);
  12391. this.$uGetRect(".u-album__row").then((size) => {
  12392. this.singleWidth = size.width * this.singlePercent;
  12393. });
  12394. }
  12395. }
  12396. };
  12397. function _sfc_render$22(_ctx, _cache, $props, $setup, $data, $options) {
  12398. const _component_up_text = vue.resolveComponent("up-text");
  12399. return vue.openBlock(), vue.createElementBlock("view", { class: "u-album" }, [
  12400. vue.createCommentVNode(" 相册行容器,每行显示 rowCount 个图片 "),
  12401. (vue.openBlock(true), vue.createElementBlock(
  12402. vue.Fragment,
  12403. null,
  12404. vue.renderList($options.showUrls, (arr, index2) => {
  12405. return vue.openBlock(), vue.createElementBlock("view", {
  12406. class: "u-album__row",
  12407. ref_for: true,
  12408. ref: "u-album__row",
  12409. forComputedUse: $options.albumWidth,
  12410. key: index2,
  12411. style: vue.normalizeStyle({ flexWrap: _ctx.autoWrap ? "wrap" : "nowrap" })
  12412. }, [
  12413. vue.createCommentVNode(" 图片包装容器 "),
  12414. (vue.openBlock(true), vue.createElementBlock(
  12415. vue.Fragment,
  12416. null,
  12417. vue.renderList(arr, (item, index1) => {
  12418. return vue.openBlock(), vue.createElementBlock("view", {
  12419. class: "u-album__row__wrapper",
  12420. key: index1,
  12421. style: vue.normalizeStyle([$options.imageStyle(index2 + 1, index1 + 1)]),
  12422. onClick: ($event) => $options.onPreviewTap($event, $options.getSrc(item))
  12423. }, [
  12424. vue.createCommentVNode(" 图片显示 "),
  12425. vue.createElementVNode("image", {
  12426. src: $options.getSrc(item),
  12427. mode: _ctx.urls.length === 1 ? $options.imageHeight > 0 ? _ctx.singleMode : "widthFix" : _ctx.multipleMode,
  12428. style: vue.normalizeStyle([
  12429. {
  12430. width: $options.imageWidth,
  12431. height: $options.imageHeight,
  12432. borderRadius: _ctx.shape == "circle" ? "10000px" : $options.addUnit(_ctx.radius)
  12433. }
  12434. ])
  12435. }, null, 12, ["src", "mode"]),
  12436. vue.createCommentVNode(" 超出最大显示数量时的更多提示 "),
  12437. _ctx.showMore && _ctx.urls.length > _ctx.rowCount * $options.showUrls.length && index2 === $options.showUrls.length - 1 && index1 === $options.showUrls[$options.showUrls.length - 1].length - 1 ? (vue.openBlock(), vue.createElementBlock(
  12438. "view",
  12439. {
  12440. key: 0,
  12441. class: "u-album__row__wrapper__text",
  12442. style: vue.normalizeStyle({
  12443. borderRadius: _ctx.shape == "circle" ? "50%" : $options.addUnit(_ctx.radius)
  12444. })
  12445. },
  12446. [
  12447. vue.createVNode(_component_up_text, {
  12448. text: `+${_ctx.urls.length - _ctx.maxCount}`,
  12449. color: "#fff",
  12450. size: _ctx.multipleSize * 0.3,
  12451. align: "center",
  12452. customStyle: "justify-content: center"
  12453. }, null, 8, ["text", "size"])
  12454. ],
  12455. 4
  12456. /* STYLE */
  12457. )) : vue.createCommentVNode("v-if", true)
  12458. ], 12, ["onClick"]);
  12459. }),
  12460. 128
  12461. /* KEYED_FRAGMENT */
  12462. ))
  12463. ], 12, ["forComputedUse"]);
  12464. }),
  12465. 128
  12466. /* KEYED_FRAGMENT */
  12467. ))
  12468. ]);
  12469. }
  12470. const uAlbum = /* @__PURE__ */ _export_sfc(_sfc_main$23, [["render", _sfc_render$22], ["__scopeId", "data-v-96d28356"], ["__file", "C:/Users/EDY/Desktop/项目/shuibei/uni_modules/uview-plus/components/u-album/u-album.vue"]]);
  12471. const __vite_glob_0_3 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
  12472. __proto__: null,
  12473. default: uAlbum
  12474. }, Symbol.toStringTag, { value: "Module" }));
  12475. const props$1m = defineMixin({
  12476. props: {
  12477. // 显示文字
  12478. title: {
  12479. type: String,
  12480. default: () => props$1x.alert.title
  12481. },
  12482. // 主题,success/warning/info/error
  12483. type: {
  12484. type: String,
  12485. default: () => props$1x.alert.type
  12486. },
  12487. // 辅助性文字
  12488. description: {
  12489. type: String,
  12490. default: () => props$1x.alert.description
  12491. },
  12492. // 是否可关闭
  12493. closable: {
  12494. type: Boolean,
  12495. default: () => props$1x.alert.closable
  12496. },
  12497. // 是否显示图标
  12498. showIcon: {
  12499. type: Boolean,
  12500. default: () => props$1x.alert.showIcon
  12501. },
  12502. // 浅或深色调,light-浅色,dark-深色
  12503. effect: {
  12504. type: String,
  12505. default: () => props$1x.alert.effect
  12506. },
  12507. // 文字是否居中
  12508. center: {
  12509. type: Boolean,
  12510. default: () => props$1x.alert.center
  12511. },
  12512. // 字体大小
  12513. fontSize: {
  12514. type: [String, Number],
  12515. default: () => props$1x.alert.fontSize
  12516. },
  12517. // 动画类型
  12518. transitionMode: {
  12519. type: [String],
  12520. default: () => props$1x.alert.transitionMode
  12521. },
  12522. // 自动定时关闭毫秒
  12523. duration: {
  12524. type: [Number],
  12525. default: () => props$1x.alert.duration
  12526. },
  12527. // 自定义图标
  12528. icon: {
  12529. type: [String],
  12530. default: () => props$1x.alert.icon
  12531. },
  12532. // 是否显示
  12533. modelValue: {
  12534. type: [String],
  12535. default: () => props$1x.alert.value
  12536. }
  12537. }
  12538. });
  12539. const _sfc_main$22 = {
  12540. name: "u-alert",
  12541. mixins: [mpMixin, mixin, props$1m],
  12542. data() {
  12543. return {
  12544. // 控制组件显示隐藏
  12545. show: true
  12546. };
  12547. },
  12548. computed: {
  12549. // 根据不同的主题类型返回对应的图标颜色
  12550. iconColor() {
  12551. return this.effect === "light" ? this.type : "#fff";
  12552. },
  12553. // 不同主题对应不同的图标
  12554. iconName() {
  12555. if (this.icon)
  12556. return this.icon;
  12557. switch (this.type) {
  12558. case "success":
  12559. return "checkmark-circle-fill";
  12560. case "error":
  12561. return "close-circle-fill";
  12562. case "warning":
  12563. return "error-circle-fill";
  12564. case "info":
  12565. return "info-circle-fill";
  12566. case "primary":
  12567. return "more-circle-fill";
  12568. default:
  12569. return "error-circle-fill";
  12570. }
  12571. }
  12572. },
  12573. emits: ["click", "close", "closed", "update:modelValue"],
  12574. watch: {
  12575. modelValue: {
  12576. handler(newVal) {
  12577. this.show = newVal;
  12578. },
  12579. immediate: true
  12580. },
  12581. show: {
  12582. handler(newVal) {
  12583. this.$emit("update:modelValue", newVal);
  12584. if (!newVal && this.duration > 0) {
  12585. this.$emit("closed");
  12586. }
  12587. }
  12588. }
  12589. },
  12590. mounted() {
  12591. if (this.duration > 0) {
  12592. setTimeout(() => {
  12593. this.closeHandler();
  12594. }, this.duration);
  12595. }
  12596. },
  12597. methods: {
  12598. addUnit,
  12599. addStyle,
  12600. // 点击内容区域触发click事件
  12601. clickHandler() {
  12602. this.$emit("click");
  12603. },
  12604. // 点击关闭按钮触发close事件并隐藏组件
  12605. closeHandler() {
  12606. this.show = false;
  12607. this.$emit("close");
  12608. }
  12609. }
  12610. };
  12611. function _sfc_render$21(_ctx, _cache, $props, $setup, $data, $options) {
  12612. const _component_up_icon = vue.resolveComponent("up-icon");
  12613. const _component_up_transition = vue.resolveComponent("up-transition");
  12614. return vue.openBlock(), vue.createBlock(_component_up_transition, {
  12615. mode: _ctx.transitionMode,
  12616. show: $data.show
  12617. }, {
  12618. default: vue.withCtx(() => [
  12619. vue.createElementVNode(
  12620. "view",
  12621. {
  12622. class: vue.normalizeClass(["u-alert", [`u-alert--${_ctx.type}--${_ctx.effect}`]]),
  12623. onClick: _cache[1] || (_cache[1] = vue.withModifiers((...args) => $options.clickHandler && $options.clickHandler(...args), ["stop"])),
  12624. style: vue.normalizeStyle([$options.addStyle(_ctx.customStyle)])
  12625. },
  12626. [
  12627. vue.createCommentVNode(" 左侧图标 "),
  12628. _ctx.showIcon ? (vue.openBlock(), vue.createElementBlock("view", {
  12629. key: 0,
  12630. class: "u-alert__icon"
  12631. }, [
  12632. vue.createVNode(_component_up_icon, {
  12633. name: $options.iconName,
  12634. size: "18",
  12635. color: $options.iconColor
  12636. }, null, 8, ["name", "color"])
  12637. ])) : vue.createCommentVNode("v-if", true),
  12638. vue.createCommentVNode(" 内容区域 "),
  12639. vue.createElementVNode(
  12640. "view",
  12641. {
  12642. class: "u-alert__content",
  12643. style: vue.normalizeStyle([{
  12644. paddingRight: _ctx.closable ? "20px" : 0
  12645. }])
  12646. },
  12647. [
  12648. vue.createCommentVNode(" 标题 "),
  12649. _ctx.title ? (vue.openBlock(), vue.createElementBlock(
  12650. "text",
  12651. {
  12652. key: 0,
  12653. class: vue.normalizeClass(["u-alert__content__title", [_ctx.effect === "dark" ? "u-alert__text--dark" : `u-alert__text--${_ctx.type}--light`]]),
  12654. style: vue.normalizeStyle([{
  12655. fontSize: $options.addUnit(_ctx.fontSize),
  12656. textAlign: _ctx.center ? "center" : "left"
  12657. }])
  12658. },
  12659. vue.toDisplayString(_ctx.title),
  12660. 7
  12661. /* TEXT, CLASS, STYLE */
  12662. )) : vue.createCommentVNode("v-if", true),
  12663. vue.createCommentVNode(" 描述信息 "),
  12664. _ctx.description ? (vue.openBlock(), vue.createElementBlock(
  12665. "text",
  12666. {
  12667. key: 1,
  12668. class: vue.normalizeClass(["u-alert__content__desc", [_ctx.effect === "dark" ? "u-alert__text--dark" : `u-alert__text--${_ctx.type}--light`]]),
  12669. style: vue.normalizeStyle([{
  12670. fontSize: $options.addUnit(_ctx.fontSize),
  12671. textAlign: _ctx.center ? "center" : "left"
  12672. }])
  12673. },
  12674. vue.toDisplayString(_ctx.description),
  12675. 7
  12676. /* TEXT, CLASS, STYLE */
  12677. )) : vue.createCommentVNode("v-if", true)
  12678. ],
  12679. 4
  12680. /* STYLE */
  12681. ),
  12682. vue.createCommentVNode(" 关闭按钮 "),
  12683. _ctx.closable ? (vue.openBlock(), vue.createElementBlock("view", {
  12684. key: 1,
  12685. class: "u-alert__close",
  12686. onClick: _cache[0] || (_cache[0] = vue.withModifiers((...args) => $options.closeHandler && $options.closeHandler(...args), ["stop"]))
  12687. }, [
  12688. vue.renderSlot(_ctx.$slots, "close", {}, () => [
  12689. vue.createVNode(_component_up_icon, {
  12690. name: "close",
  12691. color: $options.iconColor,
  12692. size: "15"
  12693. }, null, 8, ["color"])
  12694. ], true)
  12695. ])) : vue.createCommentVNode("v-if", true)
  12696. ],
  12697. 6
  12698. /* CLASS, STYLE */
  12699. )
  12700. ]),
  12701. _: 3
  12702. /* FORWARDED */
  12703. }, 8, ["mode", "show"]);
  12704. }
  12705. const uAlert = /* @__PURE__ */ _export_sfc(_sfc_main$22, [["render", _sfc_render$21], ["__scopeId", "data-v-158e540a"], ["__file", "C:/Users/EDY/Desktop/项目/shuibei/uni_modules/uview-plus/components/u-alert/u-alert.vue"]]);
  12706. const __vite_glob_0_4 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
  12707. __proto__: null,
  12708. default: uAlert
  12709. }, Symbol.toStringTag, { value: "Module" }));
  12710. const props$1l = defineMixin({
  12711. props: {
  12712. // 头像图片路径(不能为相对路径)
  12713. src: {
  12714. type: String,
  12715. default: () => props$1x.avatar.src
  12716. },
  12717. // 头像形状,circle-圆形,square-方形
  12718. shape: {
  12719. type: String,
  12720. default: () => props$1x.avatar.shape
  12721. },
  12722. // 头像尺寸
  12723. size: {
  12724. type: [String, Number],
  12725. default: () => props$1x.avatar.size
  12726. },
  12727. // 裁剪模式
  12728. mode: {
  12729. type: String,
  12730. default: () => props$1x.avatar.mode
  12731. },
  12732. // 显示的文字
  12733. text: {
  12734. type: String,
  12735. default: () => props$1x.avatar.text
  12736. },
  12737. // 背景色
  12738. bgColor: {
  12739. type: String,
  12740. default: () => props$1x.avatar.bgColor
  12741. },
  12742. // 文字颜色
  12743. color: {
  12744. type: String,
  12745. default: () => props$1x.avatar.color
  12746. },
  12747. // 文字大小
  12748. fontSize: {
  12749. type: [String, Number],
  12750. default: () => props$1x.avatar.fontSize
  12751. },
  12752. // 显示的图标
  12753. icon: {
  12754. type: String,
  12755. default: () => props$1x.avatar.icon
  12756. },
  12757. // 显示小程序头像,只对百度,微信,QQ小程序有效
  12758. mpAvatar: {
  12759. type: Boolean,
  12760. default: () => props$1x.avatar.mpAvatar
  12761. },
  12762. // 是否使用随机背景色
  12763. randomBgColor: {
  12764. type: Boolean,
  12765. default: () => props$1x.avatar.randomBgColor
  12766. },
  12767. // 加载失败的默认头像(组件有内置默认图片)
  12768. defaultUrl: {
  12769. type: String,
  12770. default: () => props$1x.avatar.defaultUrl
  12771. },
  12772. // 如果配置了randomBgColor为true,且配置了此值,则从默认的背景色数组中取出对应索引的颜色值,取值0-19之间
  12773. colorIndex: {
  12774. type: [String, Number],
  12775. // 校验参数规则,索引在0-19之间
  12776. validator(n2) {
  12777. return test.range(n2, [0, 19]) || n2 === "";
  12778. },
  12779. default: () => props$1x.avatar.colorIndex
  12780. },
  12781. // 组件标识符
  12782. name: {
  12783. type: String,
  12784. default: () => props$1x.avatar.name
  12785. }
  12786. }
  12787. });
  12788. const base64Avatar = "data:image/jpg;base64,/9j/4QAYRXhpZgAASUkqAAgAAAAAAAAAAAAAAP/sABFEdWNreQABAAQAAAA8AAD/4QMraHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wLwA8P3hwYWNrZXQgYmVnaW49Iu+7vyIgaWQ9Ilc1TTBNcENlaGlIenJlU3pOVGN6a2M5ZCI/PiA8eDp4bXBtZXRhIHhtbG5zOng9ImFkb2JlOm5zOm1ldGEvIiB4OnhtcHRrPSJBZG9iZSBYTVAgQ29yZSA1LjMtYzAxMSA2Ni4xNDU2NjEsIDIwMTIvMDIvMDYtMTQ6NTY6MjcgICAgICAgICI+IDxyZGY6UkRGIHhtbG5zOnJkZj0iaHR0cDovL3d3dy53My5vcmcvMTk5OS8wMi8yMi1yZGYtc3ludGF4LW5zIyI+IDxyZGY6RGVzY3JpcHRpb24gcmRmOmFib3V0PSIiIHhtbG5zOnhtcD0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wLyIgeG1sbnM6eG1wTU09Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9tbS8iIHhtbG5zOnN0UmVmPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvc1R5cGUvUmVzb3VyY2VSZWYjIiB4bXA6Q3JlYXRvclRvb2w9IkFkb2JlIFBob3Rvc2hvcCBDUzYgKFdpbmRvd3MpIiB4bXBNTTpJbnN0YW5jZUlEPSJ4bXAuaWlkOjREMEQwRkY0RjgwNDExRUE5OTY2RDgxODY3NkJFODMxIiB4bXBNTTpEb2N1bWVudElEPSJ4bXAuZGlkOjREMEQwRkY1RjgwNDExRUE5OTY2RDgxODY3NkJFODMxIj4gPHhtcE1NOkRlcml2ZWRGcm9tIHN0UmVmOmluc3RhbmNlSUQ9InhtcC5paWQ6NEQwRDBGRjJGODA0MTFFQTk5NjZEODE4Njc2QkU4MzEiIHN0UmVmOmRvY3VtZW50SUQ9InhtcC5kaWQ6NEQwRDBGRjNGODA0MTFFQTk5NjZEODE4Njc2QkU4MzEiLz4gPC9yZGY6RGVzY3JpcHRpb24+IDwvcmRmOlJERj4gPC94OnhtcG1ldGE+IDw/eHBhY2tldCBlbmQ9InIiPz7/7gAOQWRvYmUAZMAAAAAB/9sAhAAGBAQEBQQGBQUGCQYFBgkLCAYGCAsMCgoLCgoMEAwMDAwMDBAMDg8QDw4MExMUFBMTHBsbGxwfHx8fHx8fHx8fAQcHBw0MDRgQEBgaFREVGh8fHx8fHx8fHx8fHx8fHx8fHx8fHx8fHx8fHx8fHx8fHx8fHx8fHx8fHx8fHx8fHx//wAARCADIAMgDAREAAhEBAxEB/8QAcQABAQEAAwEBAAAAAAAAAAAAAAUEAQMGAgcBAQAAAAAAAAAAAAAAAAAAAAAQAAIBAwICBgkDBQAAAAAAAAABAhEDBCEFMVFBYXGREiKBscHRMkJSEyOh4XLxYjNDFBEBAAAAAAAAAAAAAAAAAAAAAP/aAAwDAQACEQMRAD8A/fAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHbHFyZ/Dam+yLA+Z2L0Pjtyj2poD4AAAAAAAAAAAAAAAAAAAAAAAAKWFs9y6lcvvwQeqj8z9wFaziY1n/HbUX9XF97A7QAGXI23EvJ1goyfzR0YEfN269jeZ+a03pNe0DIAAAAAAAAAAAAAAAAAAAACvtO3RcVkXlWutuL9YFYAAAAAOJRjKLjJVi9GmB5/csH/mu1h/in8PU+QGMAAAAAAAAAAAAAAAAAAaMDG/6MmMH8C80+xAelSSVFolwQAAAAAAAHVlWI37ErUulaPk+hgeYnCUJuElSUXRrrQHAAAAAAAAAAAAAAAAABa2Oz4bM7r4zdF2ICmAAAAAAAAAg7zZ8GX41wuJP0rRgYAAAAAAAAAAAAAAAAAD0m2R8ODaXU33tsDSAAAAAAAAAlb9HyWZcnJd9PcBHAAAAAAAAAAAAAAAAAPS7e64Vn+KA0AAAAAAAAAJm+v8Ftf3ewCKAAAAAAAAAAAAAAAAAX9muqeGo9NttP06+0DcAAAAAAAAAjb7dTu2ra+VOT9P8AQCWAAAAAAAAAAAAAAAAAUNmyPt5Ltv4bui/kuAF0AAAAAAADiUlGLlJ0SVW+oDzOXfd/Ind6JPRdS0QHSAAAAAAAAAAAAAAAAAE2nVaNcGB6Lbs6OTao9LsF51z60BrAAAAAABJ3jOVHjW3r/sa9QEgAAAAAAAAAAAAAAAAAAAPu1duWriuW34ZR4MC9hbnZyEoy8l36XwfYBsAAADaSq9EuLAlZ+7xSdrGdW9Hc5dgEdtt1erfFgAAAAAAAAAAAAAAAAADVjbblX6NR8MH80tEBRs7HYivyzlN8lovaBPzduvY0m6eK10TXtAyAarO55lpJK54orolr+4GqO/Xaea1FvqbXvA+Z77kNeW3GPbV+4DJfzcm/pcm3H6Vou5AdAFLC2ed2Pjv1txa8sV8T6wOL+yZEKu1JXFy4MDBOE4ScZxcZLinoB8gAAAAAAAAAAAB242LeyJ+C3GvN9C7QLmJtePYpKS+5c+p8F2IDYAANJqj1T4oCfk7Nj3G5Wn9qXJax7gJ93Z82D8sVNc4v30A6Xg5i42Z+iLfqARwcyT0sz9MWvWBps7LlTf5Grce9/oBTxdtxseklHxT+uWr9AGoAB138ezfj4bsFJdD6V2MCPm7RdtJzs1uW1xXzL3gTgAAAAAAAAADRhYc8q74I6RWs5ckB6GxYtWLat21SK731sDsAAAAAAAAAAAAAAAASt021NO/YjrxuQXT1oCOAAAAAAABzGLlJRSq26JAelwsWONYjbXxcZvmwO8AAAAAAAAAAAAAAAAAAef3TEWPkVivx3NY9T6UBiAAAAAABo2+VmGXblddIJ8eivRUD0oAAAAAAAAAAAAAAAAAAAYt4tKeFKVNYNSXfRgefAAAAAAAAr7VuSSWPedKaW5v1MCsAAAAAAAAAAAAAAAAAAIe6bj96Ts2n+JPzSXzP3ATgAAAAAAAAFbbt1UUrOQ9FpC4/UwK6aaqtU+DAAAAAAAAAAAAAAA4lKMIuUmoxWrb4ARNx3R3q2rLpa4Sl0y/YCcAAAAAAAAAAANmFud7G8r89r6X0dgFvGzLGRGtuWvTF6NAdwAAAAAAAAAAAy5W442PVN+K59EePp5ARMvOv5MvO6QXCC4AZwAAAAAAAAAAAAAcxlKLUotprg1owN+PvORborq+7Hnwl3gUbO74VzRydt8pKn68ANcJwmqwkpLmnUDkAAAAfNy9atqtyagut0AxXt5xIV8Fbj6lRd7Am5G65V6qUvtwfyx94GMAAAAAAAAAAAAAAAAAAAOU2nVOj5gdsc3LiqRvTpyqwOxbnnrhdfpSfrQB7pnv/AGvuS9gHXPMy5/Fem1yq0v0A6W29XqwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAf//Z";
  12789. const _sfc_main$21 = {
  12790. name: "u-avatar",
  12791. mixins: [mpMixin, mixin, props$1l],
  12792. data() {
  12793. return {
  12794. // 如果配置randomBgColor参数为true,在图标或者文字的模式下,会随机从中取出一个颜色值当做背景色
  12795. colors: [
  12796. "#ffb34b",
  12797. "#f2bba9",
  12798. "#f7a196",
  12799. "#f18080",
  12800. "#88a867",
  12801. "#bfbf39",
  12802. "#89c152",
  12803. "#94d554",
  12804. "#f19ec2",
  12805. "#afaae4",
  12806. "#e1b0df",
  12807. "#c38cc1",
  12808. "#72dcdc",
  12809. "#9acdcb",
  12810. "#77b1cc",
  12811. "#448aca",
  12812. "#86cefa",
  12813. "#98d1ee",
  12814. "#73d1f1",
  12815. "#80a7dc"
  12816. ],
  12817. avatarUrl: this.src,
  12818. allowMp: false
  12819. };
  12820. },
  12821. watch: {
  12822. // 监听头像src的变化,赋值给内部的avatarUrl变量,因为图片加载失败时,需要修改图片的src为默认值
  12823. // 而组件内部不能直接修改props的值,所以需要一个中间变量
  12824. src: {
  12825. immediate: true,
  12826. handler(newVal) {
  12827. this.avatarUrl = newVal;
  12828. if (!newVal) {
  12829. this.errorHandler();
  12830. }
  12831. }
  12832. }
  12833. },
  12834. computed: {
  12835. imageStyle() {
  12836. const style = {};
  12837. return style;
  12838. }
  12839. },
  12840. created() {
  12841. this.init();
  12842. },
  12843. emits: ["click"],
  12844. methods: {
  12845. addStyle,
  12846. addUnit,
  12847. random,
  12848. init() {
  12849. },
  12850. // 判断传入的name属性,是否图片路径,只要带有"/"均认为是图片形式
  12851. isImg() {
  12852. return this.src.indexOf("/") !== -1;
  12853. },
  12854. // 图片加载时失败时触发
  12855. errorHandler() {
  12856. this.avatarUrl = this.defaultUrl || base64Avatar;
  12857. },
  12858. clickHandler(e2) {
  12859. this.$emit("click", this.name, e2);
  12860. }
  12861. }
  12862. };
  12863. function _sfc_render$20(_ctx, _cache, $props, $setup, $data, $options) {
  12864. const _component_up_icon = vue.resolveComponent("up-icon");
  12865. const _component_up_text = vue.resolveComponent("up-text");
  12866. return vue.openBlock(), vue.createElementBlock(
  12867. "view",
  12868. {
  12869. class: vue.normalizeClass(["u-avatar", [`u-avatar--${_ctx.shape}`]]),
  12870. style: vue.normalizeStyle([{
  12871. backgroundColor: _ctx.text || _ctx.icon ? _ctx.randomBgColor ? $data.colors[_ctx.colorIndex !== "" ? _ctx.colorIndex : $options.random(0, 19)] : _ctx.bgColor : "transparent",
  12872. width: $options.addUnit(_ctx.size),
  12873. height: $options.addUnit(_ctx.size)
  12874. }, $options.addStyle(_ctx.customStyle)]),
  12875. onClick: _cache[1] || (_cache[1] = (...args) => $options.clickHandler && $options.clickHandler(...args))
  12876. },
  12877. [
  12878. vue.renderSlot(_ctx.$slots, "default", {}, () => [
  12879. _ctx.mpAvatar && $data.allowMp ? (vue.openBlock(), vue.createElementBlock(
  12880. vue.Fragment,
  12881. { key: 0 },
  12882. [],
  12883. 64
  12884. /* STABLE_FRAGMENT */
  12885. )) : _ctx.icon ? (vue.openBlock(), vue.createBlock(_component_up_icon, {
  12886. key: 1,
  12887. name: _ctx.icon,
  12888. size: _ctx.fontSize,
  12889. color: _ctx.color
  12890. }, null, 8, ["name", "size", "color"])) : _ctx.text ? (vue.openBlock(), vue.createBlock(_component_up_text, {
  12891. key: 2,
  12892. text: _ctx.text,
  12893. size: _ctx.fontSize,
  12894. color: _ctx.color,
  12895. align: "center",
  12896. customStyle: "justify-content: center"
  12897. }, null, 8, ["text", "size", "color"])) : (vue.openBlock(), vue.createElementBlock("image", {
  12898. key: 3,
  12899. class: vue.normalizeClass(["u-avatar__image", [`u-avatar__image--${_ctx.shape}`]]),
  12900. src: $data.avatarUrl || _ctx.defaultUrl,
  12901. mode: _ctx.mode,
  12902. onError: _cache[0] || (_cache[0] = (...args) => $options.errorHandler && $options.errorHandler(...args)),
  12903. style: vue.normalizeStyle([{
  12904. width: $options.addUnit(_ctx.size),
  12905. height: $options.addUnit(_ctx.size)
  12906. }])
  12907. }, null, 46, ["src", "mode"]))
  12908. ], true)
  12909. ],
  12910. 6
  12911. /* CLASS, STYLE */
  12912. );
  12913. }
  12914. const __easycom_0$a = /* @__PURE__ */ _export_sfc(_sfc_main$21, [["render", _sfc_render$20], ["__scopeId", "data-v-34d954f9"], ["__file", "C:/Users/EDY/Desktop/项目/shuibei/uni_modules/uview-plus/components/u-avatar/u-avatar.vue"]]);
  12915. const __vite_glob_0_6 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
  12916. __proto__: null,
  12917. default: __easycom_0$a
  12918. }, Symbol.toStringTag, { value: "Module" }));
  12919. const props$1k = defineMixin({
  12920. props: {
  12921. // 头像图片组
  12922. urls: {
  12923. type: Array,
  12924. default: () => props$1x.avatarGroup.urls
  12925. },
  12926. // 最多展示的头像数量
  12927. maxCount: {
  12928. type: [String, Number],
  12929. default: () => props$1x.avatarGroup.maxCount
  12930. },
  12931. // 头像形状
  12932. shape: {
  12933. type: String,
  12934. default: () => props$1x.avatarGroup.shape
  12935. },
  12936. // 图片裁剪模式
  12937. mode: {
  12938. type: String,
  12939. default: () => props$1x.avatarGroup.mode
  12940. },
  12941. // 超出maxCount时是否显示查看更多的提示
  12942. showMore: {
  12943. type: Boolean,
  12944. default: () => props$1x.avatarGroup.showMore
  12945. },
  12946. // 头像大小
  12947. size: {
  12948. type: [String, Number],
  12949. default: () => props$1x.avatarGroup.size
  12950. },
  12951. // 指定从数组的对象元素中读取哪个属性作为图片地址
  12952. keyName: {
  12953. type: String,
  12954. default: () => props$1x.avatarGroup.keyName
  12955. },
  12956. // 头像之间的遮挡比例
  12957. gap: {
  12958. type: [String, Number],
  12959. validator(value2) {
  12960. return value2 >= 0 && value2 <= 1;
  12961. },
  12962. default: () => props$1x.avatarGroup.gap
  12963. },
  12964. // 需额外显示的值
  12965. extraValue: {
  12966. type: [Number, String],
  12967. default: () => props$1x.avatarGroup.extraValue
  12968. }
  12969. }
  12970. });
  12971. const _sfc_main$20 = {
  12972. name: "u-avatar-group",
  12973. mixins: [mpMixin, mixin, props$1k],
  12974. data() {
  12975. return {};
  12976. },
  12977. computed: {
  12978. showUrl() {
  12979. return this.urls.slice(0, this.maxCount);
  12980. }
  12981. },
  12982. emits: ["showMore"],
  12983. methods: {
  12984. addUnit,
  12985. testObject: test.object,
  12986. clickHandler() {
  12987. this.$emit("showMore");
  12988. }
  12989. }
  12990. };
  12991. function _sfc_render$1$(_ctx, _cache, $props, $setup, $data, $options) {
  12992. const _component_u_avatar = resolveEasycom(vue.resolveDynamicComponent("u-avatar"), __easycom_0$a);
  12993. const _component_up_text = vue.resolveComponent("up-text");
  12994. return vue.openBlock(), vue.createElementBlock("view", { class: "u-avatar-group" }, [
  12995. (vue.openBlock(true), vue.createElementBlock(
  12996. vue.Fragment,
  12997. null,
  12998. vue.renderList($options.showUrl, (item, index2) => {
  12999. return vue.openBlock(), vue.createElementBlock(
  13000. "view",
  13001. {
  13002. class: "u-avatar-group__item",
  13003. key: index2,
  13004. style: vue.normalizeStyle({
  13005. marginLeft: index2 === 0 ? 0 : $options.addUnit(-_ctx.size * _ctx.gap)
  13006. })
  13007. },
  13008. [
  13009. vue.createVNode(_component_u_avatar, {
  13010. size: _ctx.size,
  13011. shape: _ctx.shape,
  13012. mode: _ctx.mode,
  13013. src: $options.testObject(item) ? _ctx.keyName && item[_ctx.keyName] || item.url : item
  13014. }, null, 8, ["size", "shape", "mode", "src"]),
  13015. _ctx.showMore && index2 === $options.showUrl.length - 1 && (_ctx.urls.length > _ctx.maxCount || _ctx.extraValue > 0) ? (vue.openBlock(), vue.createElementBlock("view", {
  13016. key: 0,
  13017. class: "u-avatar-group__item__show-more",
  13018. onClick: _cache[0] || (_cache[0] = (...args) => $options.clickHandler && $options.clickHandler(...args))
  13019. }, [
  13020. vue.createVNode(_component_up_text, {
  13021. color: "#ffffff",
  13022. size: _ctx.size * 0.4,
  13023. text: `+${_ctx.extraValue || _ctx.urls.length - $options.showUrl.length}`,
  13024. align: "center",
  13025. customStyle: "justify-content: center"
  13026. }, null, 8, ["size", "text"])
  13027. ])) : vue.createCommentVNode("v-if", true)
  13028. ],
  13029. 4
  13030. /* STYLE */
  13031. );
  13032. }),
  13033. 128
  13034. /* KEYED_FRAGMENT */
  13035. ))
  13036. ]);
  13037. }
  13038. const uAvatarGroup = /* @__PURE__ */ _export_sfc(_sfc_main$20, [["render", _sfc_render$1$], ["__scopeId", "data-v-3bd09520"], ["__file", "C:/Users/EDY/Desktop/项目/shuibei/uni_modules/uview-plus/components/u-avatar-group/u-avatar-group.vue"]]);
  13039. const __vite_glob_0_5 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
  13040. __proto__: null,
  13041. default: uAvatarGroup
  13042. }, Symbol.toStringTag, { value: "Module" }));
  13043. const props$1j = defineMixin({
  13044. props: {
  13045. // 返回顶部的形状,circle-圆形,square-方形
  13046. mode: {
  13047. type: String,
  13048. default: () => props$1x.backtop.mode
  13049. },
  13050. // 自定义图标
  13051. icon: {
  13052. type: String,
  13053. default: () => props$1x.backtop.icon
  13054. },
  13055. // 提示文字
  13056. text: {
  13057. type: String,
  13058. default: () => props$1x.backtop.text
  13059. },
  13060. // 返回顶部滚动时间
  13061. duration: {
  13062. type: [String, Number],
  13063. default: () => props$1x.backtop.duration
  13064. },
  13065. // 滚动距离
  13066. scrollTop: {
  13067. type: [String, Number],
  13068. default: () => props$1x.backtop.scrollTop
  13069. },
  13070. // 距离顶部多少距离显示,单位px
  13071. top: {
  13072. type: [String, Number],
  13073. default: () => props$1x.backtop.top
  13074. },
  13075. // 返回顶部按钮到底部的距离,单位px
  13076. bottom: {
  13077. type: [String, Number],
  13078. default: () => props$1x.backtop.bottom
  13079. },
  13080. // 返回顶部按钮到右边的距离,单位px
  13081. right: {
  13082. type: [String, Number],
  13083. default: () => props$1x.backtop.right
  13084. },
  13085. // 层级
  13086. zIndex: {
  13087. type: [String, Number],
  13088. default: () => props$1x.backtop.zIndex
  13089. },
  13090. // 图标的样式,对象形式
  13091. iconStyle: {
  13092. type: Object,
  13093. default: () => props$1x.backtop.iconStyle
  13094. }
  13095. }
  13096. });
  13097. const _sfc_main$1$ = {
  13098. name: "u-back-top",
  13099. mixins: [mpMixin, mixin, props$1j],
  13100. computed: {
  13101. backTopStyle() {
  13102. const style = {
  13103. bottom: addUnit(this.bottom),
  13104. right: addUnit(this.right),
  13105. width: "40px",
  13106. height: "40px",
  13107. position: "fixed",
  13108. zIndex: 10
  13109. };
  13110. return style;
  13111. },
  13112. show() {
  13113. return getPx(this.scrollTop) > getPx(this.top);
  13114. },
  13115. contentStyle() {
  13116. const style = {};
  13117. let radius = 0;
  13118. if (this.mode === "circle") {
  13119. radius = "100px";
  13120. } else {
  13121. radius = "4px";
  13122. }
  13123. style.borderTopLeftRadius = radius;
  13124. style.borderTopRightRadius = radius;
  13125. style.borderBottomLeftRadius = radius;
  13126. style.borderBottomRightRadius = radius;
  13127. return deepMerge$1(style, addStyle(this.customStyle));
  13128. }
  13129. },
  13130. emits: ["click"],
  13131. methods: {
  13132. backToTop() {
  13133. uni.pageScrollTo({
  13134. scrollTop: 0,
  13135. duration: this.duration
  13136. });
  13137. this.$emit("click");
  13138. }
  13139. }
  13140. };
  13141. function _sfc_render$1_(_ctx, _cache, $props, $setup, $data, $options) {
  13142. const _component_up_icon = vue.resolveComponent("up-icon");
  13143. const _component_u_transition = resolveEasycom(vue.resolveDynamicComponent("u-transition"), __easycom_2$1);
  13144. return vue.openBlock(), vue.createBlock(_component_u_transition, {
  13145. mode: "fade",
  13146. customStyle: $options.backTopStyle,
  13147. show: $options.show
  13148. }, {
  13149. default: vue.withCtx(() => [
  13150. !_ctx.$slots.default && !_ctx.$slots.$default ? (vue.openBlock(), vue.createElementBlock(
  13151. "view",
  13152. {
  13153. key: 0,
  13154. class: "u-back-top",
  13155. style: vue.normalizeStyle([$options.contentStyle]),
  13156. onClick: _cache[0] || (_cache[0] = (...args) => $options.backToTop && $options.backToTop(...args))
  13157. },
  13158. [
  13159. vue.createVNode(_component_up_icon, {
  13160. name: _ctx.icon,
  13161. "custom-style": _ctx.iconStyle
  13162. }, null, 8, ["name", "custom-style"]),
  13163. _ctx.text ? (vue.openBlock(), vue.createElementBlock(
  13164. "text",
  13165. {
  13166. key: 0,
  13167. class: "u-back-top__text"
  13168. },
  13169. vue.toDisplayString(_ctx.text),
  13170. 1
  13171. /* TEXT */
  13172. )) : vue.createCommentVNode("v-if", true)
  13173. ],
  13174. 4
  13175. /* STYLE */
  13176. )) : vue.renderSlot(_ctx.$slots, "default", { key: 1 }, void 0, true)
  13177. ]),
  13178. _: 3
  13179. /* FORWARDED */
  13180. }, 8, ["customStyle", "show"]);
  13181. }
  13182. const uBackTop = /* @__PURE__ */ _export_sfc(_sfc_main$1$, [["render", _sfc_render$1_], ["__scopeId", "data-v-91347e36"], ["__file", "C:/Users/EDY/Desktop/项目/shuibei/uni_modules/uview-plus/components/u-back-top/u-back-top.vue"]]);
  13183. const __vite_glob_0_7 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
  13184. __proto__: null,
  13185. default: uBackTop
  13186. }, Symbol.toStringTag, { value: "Module" }));
  13187. const props$1i = defineMixin({
  13188. props: {
  13189. // 是否显示圆点
  13190. isDot: {
  13191. type: Boolean,
  13192. default: () => props$1x.badge.isDot
  13193. },
  13194. // 显示的内容
  13195. value: {
  13196. type: [Number, String],
  13197. default: () => props$1x.badge.value
  13198. },
  13199. // 显示的内容
  13200. modelValue: {
  13201. type: [Number, String],
  13202. default: () => props$1x.badge.modelValue
  13203. },
  13204. // 是否显示
  13205. show: {
  13206. type: Boolean,
  13207. default: () => props$1x.badge.show
  13208. },
  13209. // 最大值,超过最大值会显示 '{max}+'
  13210. max: {
  13211. type: [Number, String],
  13212. default: () => props$1x.badge.max
  13213. },
  13214. // 主题类型,error|warning|success|primary
  13215. type: {
  13216. type: String,
  13217. default: () => props$1x.badge.type
  13218. },
  13219. // 当数值为 0 时,是否展示 Badge
  13220. showZero: {
  13221. type: Boolean,
  13222. default: () => props$1x.badge.showZero
  13223. },
  13224. // 背景颜色,优先级比type高,如设置,type参数会失效
  13225. bgColor: {
  13226. type: [String, null],
  13227. default: () => props$1x.badge.bgColor
  13228. },
  13229. // 字体颜色
  13230. color: {
  13231. type: [String, null],
  13232. default: () => props$1x.badge.color
  13233. },
  13234. // 徽标形状,circle-四角均为圆角,horn-左下角为直角
  13235. shape: {
  13236. type: String,
  13237. default: () => props$1x.badge.shape
  13238. },
  13239. // 设置数字的显示方式,overflow|ellipsis|limit
  13240. // overflow会根据max字段判断,超出显示`${max}+`
  13241. // ellipsis会根据max判断,超出显示`${max}...`
  13242. // limit会依据1000作为判断条件,超出1000,显示`${value/1000}K`,比如2.2k、3.34w,最多保留2位小数
  13243. numberType: {
  13244. type: String,
  13245. default: () => props$1x.badge.numberType
  13246. },
  13247. // 设置badge的位置偏移,格式为 [x, y],也即设置的为top和right的值,absolute为true时有效
  13248. offset: {
  13249. type: Array,
  13250. default: () => props$1x.badge.offset
  13251. },
  13252. // 是否反转背景和字体颜色
  13253. inverted: {
  13254. type: Boolean,
  13255. default: () => props$1x.badge.inverted
  13256. },
  13257. // 是否绝对定位
  13258. absolute: {
  13259. type: Boolean,
  13260. default: () => props$1x.badge.absolute
  13261. }
  13262. }
  13263. });
  13264. const _sfc_main$1_ = {
  13265. name: "u-badge",
  13266. mixins: [mpMixin, props$1i, mixin],
  13267. computed: {
  13268. // 是否将badge中心与父组件右上角重合
  13269. boxStyle() {
  13270. let style = {};
  13271. return style;
  13272. },
  13273. // 整个组件的样式
  13274. badgeStyle() {
  13275. const style = {};
  13276. if (this.color) {
  13277. style.color = this.color;
  13278. }
  13279. if (this.bgColor && !this.inverted) {
  13280. style.backgroundColor = this.bgColor;
  13281. }
  13282. if (this.absolute) {
  13283. style.position = "absolute";
  13284. if (this.offset.length) {
  13285. const top = this.offset[0];
  13286. const right = this.offset[1] || top;
  13287. style.top = addUnit(top);
  13288. style.right = addUnit(right);
  13289. }
  13290. }
  13291. return style;
  13292. },
  13293. showValue() {
  13294. switch (this.numberType) {
  13295. case "overflow":
  13296. return Number(this.value) > Number(this.max) ? this.max + "+" : this.value;
  13297. case "ellipsis":
  13298. return Number(this.value) > Number(this.max) ? "..." : this.value;
  13299. case "limit":
  13300. return Number(this.value) > 999 ? Number(this.value) >= 9999 ? Math.floor(this.value / 1e4 * 100) / 100 + "w" : Math.floor(this.value / 1e3 * 100) / 100 + "k" : this.value;
  13301. default:
  13302. return Number(this.value);
  13303. }
  13304. }
  13305. },
  13306. methods: {
  13307. addStyle
  13308. }
  13309. };
  13310. function _sfc_render$1Z(_ctx, _cache, $props, $setup, $data, $options) {
  13311. return _ctx.show && ((Number(_ctx.value) === 0 ? _ctx.showZero : true) || _ctx.isDot) ? (vue.openBlock(), vue.createElementBlock(
  13312. "text",
  13313. {
  13314. key: 0,
  13315. class: vue.normalizeClass([[_ctx.isDot ? "u-badge--dot" : "u-badge--not-dot", _ctx.inverted && "u-badge--inverted", _ctx.shape === "horn" && "u-badge--horn", `u-badge--${_ctx.type}${_ctx.inverted ? "--inverted" : ""}`], "u-badge"]),
  13316. style: vue.normalizeStyle([$options.addStyle(_ctx.customStyle), $options.badgeStyle])
  13317. },
  13318. vue.toDisplayString(_ctx.isDot ? "" : $options.showValue),
  13319. 7
  13320. /* TEXT, CLASS, STYLE */
  13321. )) : vue.createCommentVNode("v-if", true);
  13322. }
  13323. const __easycom_0$9 = /* @__PURE__ */ _export_sfc(_sfc_main$1_, [["render", _sfc_render$1Z], ["__scopeId", "data-v-06cca9b7"], ["__file", "C:/Users/EDY/Desktop/项目/shuibei/uni_modules/uview-plus/components/u-badge/u-badge.vue"]]);
  13324. const __vite_glob_0_8 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
  13325. __proto__: null,
  13326. default: __easycom_0$9
  13327. }, Symbol.toStringTag, { value: "Module" }));
  13328. const _sfc_main$1Z = {
  13329. name: "u-barcode",
  13330. props: {
  13331. // 条码值
  13332. value: {
  13333. type: [String, Number],
  13334. required: true
  13335. },
  13336. // 条码格式
  13337. format: {
  13338. type: String,
  13339. default: "auto",
  13340. validator: function(value2) {
  13341. return [
  13342. "auto",
  13343. "CODE128",
  13344. "CODE128A",
  13345. "CODE128B",
  13346. "CODE128C",
  13347. "EAN13",
  13348. "EAN8",
  13349. "EAN5",
  13350. "EAN2",
  13351. "UPC",
  13352. "UPCA",
  13353. "UPCE",
  13354. "CODE39",
  13355. "ITF",
  13356. "ITF14",
  13357. "MSI",
  13358. "MSI10",
  13359. "MSI11",
  13360. "MSI1010",
  13361. "MSI1110",
  13362. "pharmacode",
  13363. "codabar"
  13364. ].includes(value2);
  13365. }
  13366. },
  13367. // 宽度
  13368. width: {
  13369. type: Number,
  13370. default: 200
  13371. },
  13372. // 高度
  13373. height: {
  13374. type: Number,
  13375. default: 80
  13376. },
  13377. // 是否显示文本
  13378. displayValue: {
  13379. type: Boolean,
  13380. default: true
  13381. },
  13382. // 文本内容
  13383. text: {
  13384. type: String,
  13385. default: void 0
  13386. },
  13387. // 字体选项
  13388. fontOptions: {
  13389. type: String,
  13390. default: ""
  13391. },
  13392. // 字体
  13393. font: {
  13394. type: String,
  13395. default: "monospace"
  13396. },
  13397. // 文本对齐方式
  13398. textAlign: {
  13399. type: String,
  13400. default: "center"
  13401. },
  13402. // 文本位置
  13403. textPosition: {
  13404. type: String,
  13405. default: "bottom"
  13406. },
  13407. // 文本边距
  13408. textMargin: {
  13409. type: Number,
  13410. default: 2
  13411. },
  13412. // 字体大小
  13413. fontSize: {
  13414. type: Number,
  13415. default: 14
  13416. },
  13417. // 背景色
  13418. background: {
  13419. type: String,
  13420. default: "#ffffff"
  13421. },
  13422. // 条码颜色
  13423. lineColor: {
  13424. type: String,
  13425. default: "#000000"
  13426. },
  13427. // 边距
  13428. margin: {
  13429. type: Number,
  13430. default: 10
  13431. },
  13432. // 上边距
  13433. marginTop: {
  13434. type: Number,
  13435. default: void 0
  13436. },
  13437. // 下边距
  13438. marginBottom: {
  13439. type: Number,
  13440. default: void 0
  13441. },
  13442. // 左边距
  13443. marginLeft: {
  13444. type: Number,
  13445. default: void 0
  13446. },
  13447. // 右边距
  13448. marginRight: {
  13449. type: Number,
  13450. default: void 0
  13451. },
  13452. // 使用canvas还是生成图片
  13453. useCanvas: {
  13454. type: Boolean,
  13455. default: true
  13456. }
  13457. },
  13458. data() {
  13459. return {
  13460. canvasId: "barcode-" + Math.random().toString(36).substr(2, 9),
  13461. barcodeImage: "",
  13462. showCanvas: false,
  13463. canvasWidth: 0,
  13464. canvasHeight: 0,
  13465. calcSizeDone: false,
  13466. error: ""
  13467. };
  13468. },
  13469. watch: {
  13470. value() {
  13471. this.generateBarcode();
  13472. },
  13473. format() {
  13474. this.generateBarcode();
  13475. },
  13476. width() {
  13477. this.generateBarcode();
  13478. },
  13479. height() {
  13480. this.generateBarcode();
  13481. },
  13482. displayValue() {
  13483. this.generateBarcode();
  13484. },
  13485. text() {
  13486. this.generateBarcode();
  13487. },
  13488. font() {
  13489. this.generateBarcode();
  13490. },
  13491. textAlign() {
  13492. this.generateBarcode();
  13493. },
  13494. textPosition() {
  13495. this.generateBarcode();
  13496. },
  13497. textMargin() {
  13498. this.generateBarcode();
  13499. },
  13500. fontSize() {
  13501. this.generateBarcode();
  13502. },
  13503. background() {
  13504. this.generateBarcode();
  13505. },
  13506. lineColor() {
  13507. this.generateBarcode();
  13508. },
  13509. margin() {
  13510. this.generateBarcode();
  13511. }
  13512. },
  13513. mounted() {
  13514. this.$nextTick(() => {
  13515. this.generateBarcode();
  13516. });
  13517. },
  13518. methods: {
  13519. /**
  13520. * 生成条形码
  13521. * @author jry <ijry@qq.com>
  13522. * @param {String|Number} value - 条码值
  13523. * @param {Object} options - 条码配置选项
  13524. */
  13525. generateBarcode() {
  13526. const margin = this.margin;
  13527. const options2 = {
  13528. format: this.format || "auto",
  13529. width: this.width,
  13530. height: this.height,
  13531. displayValue: this.displayValue,
  13532. text: this.text,
  13533. fontOptions: this.fontOptions || "",
  13534. font: this.font || "monospace",
  13535. textAlign: this.textAlign || "center",
  13536. textPosition: this.textPosition || "bottom",
  13537. textMargin: this.textMargin !== void 0 ? this.textMargin : 2,
  13538. fontSize: this.fontSize || 20,
  13539. background: this.background || "#ffffff",
  13540. lineColor: this.lineColor || "#000000",
  13541. margin,
  13542. marginTop: this.marginTop !== void 0 ? this.marginTop : margin,
  13543. marginBottom: this.marginBottom !== void 0 ? this.marginBottom : margin,
  13544. marginLeft: this.marginLeft !== void 0 ? this.marginLeft : margin,
  13545. marginRight: this.marginRight !== void 0 ? this.marginRight : margin
  13546. };
  13547. Object.keys(options2).forEach((key) => {
  13548. if (options2[key] === void 0) {
  13549. delete options2[key];
  13550. }
  13551. });
  13552. if (this.useCanvas) {
  13553. this.showCanvas = true;
  13554. this.$nextTick(() => {
  13555. this.renderToCanvas(options2);
  13556. });
  13557. } else {
  13558. this.showCanvas = false;
  13559. this.renderToImage(options2);
  13560. }
  13561. },
  13562. /**
  13563. * 渲染条形码到canvas
  13564. * @author jry <ijry@qq.com>
  13565. * @param {Object} options - 条码配置选项
  13566. */
  13567. async renderToCanvas(options2) {
  13568. try {
  13569. this.calculateCanvasSize(options2);
  13570. await vue.nextTick();
  13571. const ctx = uni.createCanvasContext(this.canvasId, this);
  13572. ctx.setFillStyle(options2.background);
  13573. ctx.fillRect(0, 0, this.canvasWidth, this.canvasHeight);
  13574. const barcodeData = this.encodeBarcode(this.value, options2.format);
  13575. if (barcodeData) {
  13576. this.drawBarcode(ctx, barcodeData, options2);
  13577. }
  13578. ctx.draw(false, () => {
  13579. this.$emit("rendered", { type: "canvas", id: this.canvasId });
  13580. });
  13581. } catch (error2) {
  13582. formatAppLog("error", "at uni_modules/uview-plus/components/u-barcode/u-barcode.vue:293", "生成条码失败:", error2);
  13583. this.error = error2.message || t$1("up.barcode.error");
  13584. this.$emit("error", error2);
  13585. }
  13586. },
  13587. /**
  13588. * 渲染条形码为图片
  13589. * @author jry <ijry@qq.com>
  13590. * @param {Object} options - 条码配置选项
  13591. */
  13592. renderToImage(options2) {
  13593. try {
  13594. this.calculateCanvasSize(options2);
  13595. const tempCanvasId = "temp-" + this.canvasId;
  13596. const ctx = uni.createCanvasContext(tempCanvasId, this);
  13597. ctx.setFillStyle(options2.background);
  13598. ctx.fillRect(0, 0, this.canvasWidth, this.canvasHeight);
  13599. const barcodeData = this.encodeBarcode(this.value, options2.format);
  13600. if (barcodeData) {
  13601. this.drawBarcode(ctx, barcodeData, options2);
  13602. }
  13603. ctx.draw(false, () => {
  13604. setTimeout(() => {
  13605. uni.canvasToTempFilePath({
  13606. canvasId: tempCanvasId,
  13607. success: (res) => {
  13608. this.barcodeImage = res.tempFilePath;
  13609. this.$emit("rendered", { type: "image", value: this.value, path: res.tempFilePath });
  13610. },
  13611. fail: (error2) => {
  13612. formatAppLog("error", "at uni_modules/uview-plus/components/u-barcode/u-barcode.vue:337", "生成条码图片失败:", error2);
  13613. this.$emit("error", error2);
  13614. }
  13615. }, this);
  13616. }, 100);
  13617. });
  13618. } catch (error2) {
  13619. formatAppLog("error", "at uni_modules/uview-plus/components/u-barcode/u-barcode.vue:344", "生成条码图片失败:", error2);
  13620. this.$emit("error", error2);
  13621. }
  13622. },
  13623. /**
  13624. * 计算canvas尺寸
  13625. * @author jry <ijry@qq.com>
  13626. * @param {Object} options - 条码配置选项
  13627. */
  13628. calculateCanvasSize(options2) {
  13629. let width = options2.width;
  13630. let height = options2.height;
  13631. const marginLeft = options2.marginLeft;
  13632. const marginRight = options2.marginRight;
  13633. const marginTop = options2.marginTop;
  13634. const marginBottom = options2.marginBottom;
  13635. let textHeight = 0;
  13636. if (options2.displayValue !== false) {
  13637. textHeight = options2.fontSize + options2.textMargin;
  13638. }
  13639. if (options2.textPosition === "top" || options2.textPosition === "bottom") {
  13640. height += textHeight;
  13641. }
  13642. width += marginLeft + marginRight;
  13643. height += marginTop + marginBottom;
  13644. this.canvasWidth = Math.max(width, 100);
  13645. this.canvasHeight = Math.max(height, 60 + textHeight);
  13646. this.calcSizeDone = true;
  13647. },
  13648. /**
  13649. * 编码条形码数据
  13650. * @author jry <ijry@qq.com>
  13651. * @param {String|Number} value - 条码值
  13652. * @param {String} format - 条码格式
  13653. * @returns {String|null} 条形码编码数据
  13654. */
  13655. encodeBarcode(value2, format2) {
  13656. try {
  13657. switch (format2) {
  13658. case "CODE128":
  13659. case "auto":
  13660. return this.encodeCode128(value2);
  13661. case "CODE39":
  13662. return this.encodeCode39(value2);
  13663. case "EAN13":
  13664. return this.encodeEAN13(value2);
  13665. case "EAN8":
  13666. return this.encodeEAN8(value2);
  13667. case "EAN5":
  13668. case "EAN2":
  13669. return this.encodeEAN52(value2, format2);
  13670. case "UPC":
  13671. case "UPCA":
  13672. return this.encodeUPCA(value2);
  13673. case "UPCE":
  13674. return this.encodeUPCE(value2);
  13675. default:
  13676. return this.encodeCode128(value2);
  13677. }
  13678. } catch (error2) {
  13679. formatAppLog("error", "at uni_modules/uview-plus/components/u-barcode/u-barcode.vue:418", "条码编码失败:", error2);
  13680. throw error2;
  13681. }
  13682. },
  13683. /**
  13684. * 添加右侧安静区(至少2个模块宽度的空白)
  13685. * @author jry <ijry@qq.com>
  13686. * @param {String} data - 要编码的数据
  13687. * @returns {String|null} 编码后的条形码数据
  13688. */
  13689. encodeCode128(data) {
  13690. const CODE128_START_CODE_B = 104;
  13691. const CODE128_STOP = 106;
  13692. const CODE128_CODE_B_CHARS = " !\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~";
  13693. const codes = [];
  13694. let checksum = CODE128_START_CODE_B;
  13695. codes.push(CODE128_START_CODE_B);
  13696. for (let i2 = 0; i2 < data.length; i2++) {
  13697. const char = data[i2];
  13698. const code2 = CODE128_CODE_B_CHARS.indexOf(char);
  13699. if (code2 === -1) {
  13700. throw new Error("Invalid character in CODE128: " + char);
  13701. }
  13702. codes.push(code2);
  13703. checksum += code2 * (i2 + 1);
  13704. }
  13705. codes.push(checksum % 103);
  13706. codes.push(CODE128_STOP);
  13707. let barcode = "";
  13708. for (let i2 = 0; i2 < codes.length; i2++) {
  13709. const code2 = codes[i2];
  13710. barcode += this.getCode128Pattern(code2);
  13711. }
  13712. barcode += "00000";
  13713. return barcode;
  13714. },
  13715. /**
  13716. * 获取CODE128编码模式
  13717. * @author jry <ijry@qq.com>
  13718. * @param {Number} code - 字符编码
  13719. * @returns {String} 条形码二进制模式
  13720. */
  13721. getCode128Pattern(code2) {
  13722. const patterns = [
  13723. "11011001100",
  13724. "11001101100",
  13725. "11001100110",
  13726. "10010011000",
  13727. "10010001100",
  13728. "10001001100",
  13729. "10011001000",
  13730. "10011000100",
  13731. "10001100100",
  13732. "11001001000",
  13733. "11001000100",
  13734. "11000100100",
  13735. "10110011100",
  13736. "10011011100",
  13737. "10011001110",
  13738. "10111001100",
  13739. "10011101100",
  13740. "10011100110",
  13741. "11001110010",
  13742. "11001011100",
  13743. "11001001110",
  13744. "11011100100",
  13745. "11001110100",
  13746. "11101101110",
  13747. "11101001100",
  13748. "11100101100",
  13749. "11100100110",
  13750. "11101100100",
  13751. "11100110100",
  13752. "11100110010",
  13753. "11011011000",
  13754. "11011000110",
  13755. "11000110110",
  13756. "10100011000",
  13757. "10001011000",
  13758. "10001000110",
  13759. "10110001000",
  13760. "10001101000",
  13761. "10001100010",
  13762. "11010001000",
  13763. "11000101000",
  13764. "11000100010",
  13765. "10110111000",
  13766. "10110001110",
  13767. "10001101110",
  13768. "10111011000",
  13769. "10111000110",
  13770. "10001110110",
  13771. "11101110110",
  13772. "11010001110",
  13773. "11000101110",
  13774. "11011101000",
  13775. "11011100010",
  13776. "11011101110",
  13777. "11101011000",
  13778. "11101000110",
  13779. "11100010110",
  13780. "11101101000",
  13781. "11101100010",
  13782. "11100011010",
  13783. "11101111010",
  13784. "11001000010",
  13785. "11110001010",
  13786. "10100110000",
  13787. "10100001100",
  13788. "10010110000",
  13789. "10010000110",
  13790. "10000101100",
  13791. "10000100110",
  13792. "10110010000",
  13793. "10110000100",
  13794. "10011010000",
  13795. "10011000010",
  13796. "10000110100",
  13797. "10000110010",
  13798. "11000010010",
  13799. "11001010000",
  13800. "11110111010",
  13801. "11000010100",
  13802. "10001111010",
  13803. "10100111100",
  13804. "10010111100",
  13805. "10010011110",
  13806. "10111100100",
  13807. "10011110100",
  13808. "10011110010",
  13809. "11110100100",
  13810. "11110010100",
  13811. "11110010010",
  13812. "11011011110",
  13813. "11011110110",
  13814. "11110110110",
  13815. "10101111000",
  13816. "10100011110",
  13817. "10001011110",
  13818. "10111101000",
  13819. "10111100010",
  13820. "11110101000",
  13821. "11110100010",
  13822. "10111011110",
  13823. "10111101110",
  13824. "11101011110",
  13825. "11110101110",
  13826. "11010000100",
  13827. "11010010000",
  13828. "11010011100",
  13829. "11000111010"
  13830. ];
  13831. return patterns[code2] || "";
  13832. },
  13833. /**
  13834. * CODE39编码实现
  13835. * @author jry <ijry@qq.com>
  13836. * @param {String} data - 要编码的数据
  13837. * @returns {String|null} 编码后的条形码数据
  13838. */
  13839. encodeCode39(data) {
  13840. const codes = {
  13841. "0": "101000111011101",
  13842. "1": "111010001010111",
  13843. "2": "101110001010111",
  13844. "3": "111011100010101",
  13845. "4": "101000111010111",
  13846. "5": "111010001110101",
  13847. "6": "101110001110101",
  13848. "7": "101000101110111",
  13849. "8": "111010001011101",
  13850. "9": "101110001011101",
  13851. "A": "111010100010111",
  13852. "B": "101110100010111",
  13853. "C": "111011101000101",
  13854. "D": "101011100010111",
  13855. "E": "111010111000101",
  13856. "F": "101110111000101",
  13857. "G": "101010001110111",
  13858. "H": "111010100011101",
  13859. "I": "101110100011101",
  13860. "J": "101011100011101",
  13861. "K": "111010101000111",
  13862. "L": "101110101000111",
  13863. "M": "111011101010001",
  13864. "N": "101011101000111",
  13865. "O": "111010111010001",
  13866. "P": "101110111010001",
  13867. "Q": "101010111000111",
  13868. "R": "111010101110001",
  13869. "S": "101110101110001",
  13870. "T": "101011101110001",
  13871. "U": "111000101010111",
  13872. "V": "100011101010111",
  13873. "W": "111000111010101",
  13874. "X": "100010111010111",
  13875. "Y": "111000101110101",
  13876. "Z": "100011101110101",
  13877. "-": "100010101110111",
  13878. ".": "111000101011101",
  13879. " ": "100011101011101",
  13880. "*": "100010111011101",
  13881. // 起始和终止字符
  13882. "$": "100010001000101",
  13883. "/": "100010001010001",
  13884. "+": "100010100010001",
  13885. "%": "101000100010001"
  13886. };
  13887. data = data.toUpperCase();
  13888. let barcode = codes["*"];
  13889. for (let i2 = 0; i2 < data.length; i2++) {
  13890. const char = data[i2];
  13891. if (codes[char]) {
  13892. barcode += "0";
  13893. barcode += codes[char];
  13894. } else {
  13895. throw new Error("Invalid character in CODE39: " + char);
  13896. }
  13897. }
  13898. barcode += "0";
  13899. barcode += codes["*"];
  13900. return barcode;
  13901. },
  13902. /**
  13903. * EAN13编码实现
  13904. * @author jry <ijry@qq.com>
  13905. * @param {String} data - 13位数字字符串
  13906. * @returns {String|null} 编码后的条形码数据
  13907. */
  13908. encodeEAN13(data) {
  13909. if (!/^\d{13}$/.test(data)) {
  13910. throw new Error("EAN13 must be 13 digits");
  13911. }
  13912. let sum = 0;
  13913. for (let i2 = 0; i2 < 12; i2++) {
  13914. const digit = parseInt(data[i2]);
  13915. sum += i2 % 2 === 0 ? digit : digit * 3;
  13916. }
  13917. const checkDigit = (10 - sum % 10) % 10;
  13918. if (parseInt(data[12]) !== checkDigit) {
  13919. throw new Error("Invalid EAN13 check digit");
  13920. }
  13921. const leftData = data.substring(1, 7);
  13922. const rightData = data.substring(7, 13);
  13923. let barcode = "101";
  13924. const firstDigit = parseInt(data[0]);
  13925. const leftPatterns = [
  13926. [
  13927. "LLLLLL",
  13928. "LLGLGG",
  13929. "LLGGLG",
  13930. "LLGGGL",
  13931. "LGLLGG",
  13932. "LGGLLG",
  13933. "LGGGLL",
  13934. "LGLGLG",
  13935. "LGLGGL",
  13936. "LGGLGL"
  13937. ]
  13938. ];
  13939. const pattern2 = leftPatterns[0][firstDigit];
  13940. const leftOdd = [
  13941. "0001101",
  13942. "0011001",
  13943. "0010011",
  13944. "0111101",
  13945. "0100011",
  13946. "0110001",
  13947. "0101111",
  13948. "0111011",
  13949. "0110111",
  13950. "0001011"
  13951. ];
  13952. const leftEven = [
  13953. "0100111",
  13954. "0110011",
  13955. "0011011",
  13956. "0100001",
  13957. "0011101",
  13958. "0111001",
  13959. "0000101",
  13960. "0010001",
  13961. "0001001",
  13962. "0010111"
  13963. ];
  13964. for (let i2 = 0; i2 < leftData.length; i2++) {
  13965. const digit = parseInt(leftData[i2]);
  13966. if (pattern2[i2] === "L") {
  13967. barcode += leftOdd[digit];
  13968. } else {
  13969. barcode += leftEven[digit];
  13970. }
  13971. }
  13972. barcode += "01010";
  13973. const rightCodes = [
  13974. "1110010",
  13975. "1100110",
  13976. "1101100",
  13977. "1000010",
  13978. "1011100",
  13979. "1001110",
  13980. "1010000",
  13981. "1000100",
  13982. "1001000",
  13983. "1110100"
  13984. ];
  13985. for (let i2 = 0; i2 < rightData.length; i2++) {
  13986. const digit = parseInt(rightData[i2]);
  13987. barcode += rightCodes[digit];
  13988. }
  13989. barcode += "101";
  13990. return barcode;
  13991. },
  13992. /**
  13993. * EAN8编码实现
  13994. * @author jry <ijry@qq.com>
  13995. * @param {String} data - 8位数字字符串
  13996. * @returns {String|null} 编码后的条形码数据
  13997. */
  13998. encodeEAN8(data) {
  13999. if (!/^\d{8}$/.test(data)) {
  14000. throw new Error("EAN8 must be 8 digits");
  14001. }
  14002. let sum = 0;
  14003. for (let i2 = 0; i2 < 7; i2++) {
  14004. const digit = parseInt(data[i2]);
  14005. sum += digit * (i2 % 2 === 0 ? 3 : 1);
  14006. }
  14007. const checkDigit = (10 - sum % 10) % 10;
  14008. if (parseInt(data[7]) !== checkDigit) {
  14009. throw new Error("Invalid EAN8 check digit");
  14010. }
  14011. const leftData = data.substring(0, 4);
  14012. const rightData = data.substring(4, 8);
  14013. let barcode = "101";
  14014. const leftOdd = [
  14015. "0001101",
  14016. "0011001",
  14017. "0010011",
  14018. "0111101",
  14019. "0100011",
  14020. "0110001",
  14021. "0101111",
  14022. "0111011",
  14023. "0110111",
  14024. "0001011"
  14025. ];
  14026. for (let i2 = 0; i2 < leftData.length; i2++) {
  14027. const digit = parseInt(leftData[i2]);
  14028. barcode += leftOdd[digit];
  14029. }
  14030. barcode += "01010";
  14031. const rightCodes = [
  14032. "1110010",
  14033. "1100110",
  14034. "1101100",
  14035. "1000010",
  14036. "1011100",
  14037. "1001110",
  14038. "1010000",
  14039. "1000100",
  14040. "1001000",
  14041. "1110100"
  14042. ];
  14043. for (let i2 = 0; i2 < rightData.length; i2++) {
  14044. const digit = parseInt(rightData[i2]);
  14045. barcode += rightCodes[digit];
  14046. }
  14047. barcode += "101";
  14048. return barcode;
  14049. },
  14050. /**
  14051. * EAN5/EAN2编码实现
  14052. * @author jry <ijry@qq.com>
  14053. * @param {String} data - 2位或5位数字字符串
  14054. * @param {String} format - 格式类型(EAN5或EAN2)
  14055. * @returns {String|null} 编码后的条形码数据
  14056. */
  14057. encodeEAN52(data, format2) {
  14058. const length = format2 === "EAN5" ? 5 : 2;
  14059. if (!new RegExp(`^\\d{${length}}$`).test(data)) {
  14060. throw new Error(`${format2} must be ${length} digits`);
  14061. }
  14062. const codes = [
  14063. "0001101",
  14064. "0011001",
  14065. "0010011",
  14066. "0111101",
  14067. "0100011",
  14068. "0110001",
  14069. "0101111",
  14070. "0111011",
  14071. "0110111",
  14072. "0001011"
  14073. ];
  14074. let checksum = 0;
  14075. for (let i2 = 0; i2 < data.length; i2++) {
  14076. checksum += parseInt(data[i2]) * (i2 % 2 === 0 ? 3 : 1);
  14077. }
  14078. let barcode = "1011";
  14079. for (let i2 = 0; i2 < data.length; i2++) {
  14080. if (i2 > 0) {
  14081. barcode += "01";
  14082. }
  14083. const digit = parseInt(data[i2]);
  14084. const code2 = codes[digit];
  14085. barcode += code2;
  14086. }
  14087. return barcode;
  14088. },
  14089. /**
  14090. * UPCA编码实现
  14091. * @author jry <ijry@qq.com>
  14092. * @param {String} data - 11位或12位数字字符串
  14093. * @returns {String|null} 编码后的条形码数据
  14094. */
  14095. encodeUPCA(data) {
  14096. if (/^\d{11}$/.test(data)) {
  14097. let sum = 0;
  14098. for (let i2 = 0; i2 < 11; i2++) {
  14099. const digit = parseInt(data[i2]);
  14100. sum += i2 % 2 === 0 ? digit * 3 : digit;
  14101. }
  14102. const checkDigit = (10 - sum % 10) % 10;
  14103. data += checkDigit;
  14104. }
  14105. if (!/^\d{12}$/.test(data)) {
  14106. throw new Error("UPC-A must be 11 or 12 digits");
  14107. }
  14108. return this.encodeEAN13("0" + data);
  14109. },
  14110. /**
  14111. * UPCE编码实现
  14112. * @author jry <ijry@qq.com>
  14113. * @param {String} data - 6位或8位数字字符串
  14114. * @returns {String|null} 编码后的条形码数据
  14115. */
  14116. encodeUPCE(data) {
  14117. if (/^\d{7}$/.test(data)) {
  14118. let sum = 0;
  14119. for (let i2 = 0; i2 < 7; i2++) {
  14120. const digit = parseInt(data[i2]);
  14121. sum += i2 % 2 === 0 ? digit * 3 : digit;
  14122. }
  14123. const checkDigit2 = (10 - sum % 10) % 10;
  14124. data += checkDigit2;
  14125. }
  14126. if (!/^\d{8}$/.test(data)) {
  14127. throw new Error("UPC-E must be 7 or 8 digits");
  14128. }
  14129. if (data[0] !== "0" && data[0] !== "1") {
  14130. throw new Error("UPC-E must start with 0 or 1");
  14131. }
  14132. const leftOdd = [
  14133. "0001101",
  14134. "0011001",
  14135. "0010011",
  14136. "0111101",
  14137. "0100011",
  14138. "0110001",
  14139. "0101111",
  14140. "0111011",
  14141. "0110111",
  14142. "0001011"
  14143. ];
  14144. const leftEven = [
  14145. "0100111",
  14146. "0110011",
  14147. "0011011",
  14148. "0100001",
  14149. "0011101",
  14150. "0111001",
  14151. "0000101",
  14152. "0010001",
  14153. "0001001",
  14154. "0010111"
  14155. ];
  14156. data[0];
  14157. const checkDigit = data[7];
  14158. const middleData = data.substring(1, 7);
  14159. let pattern2;
  14160. if (checkDigit === "0" || checkDigit === "1" || checkDigit === "2") {
  14161. pattern2 = "EEEEOO";
  14162. } else if (checkDigit === "3") {
  14163. pattern2 = "EEEEOO";
  14164. } else if (checkDigit === "4") {
  14165. pattern2 = "EEEOOO";
  14166. } else {
  14167. pattern2 = "EEOOOO";
  14168. }
  14169. let barcode = "101";
  14170. for (let i2 = 0; i2 < middleData.length; i2++) {
  14171. const digit = parseInt(middleData[i2]);
  14172. if (pattern2[i2] === "E") {
  14173. barcode += leftEven[digit];
  14174. } else {
  14175. barcode += leftOdd[digit];
  14176. }
  14177. }
  14178. barcode += "010101";
  14179. barcode += "101";
  14180. return barcode;
  14181. },
  14182. /**
  14183. * 绘制条形码
  14184. * @author jry <ijry@qq.com>
  14185. * @param {Object} ctx - canvas上下文
  14186. * @param {String} barcodeData - 条形码数据
  14187. * @param {Object} options - 条码配置选项
  14188. */
  14189. drawBarcode(ctx, barcodeData, options2) {
  14190. if (!barcodeData)
  14191. return;
  14192. const marginLeft = options2.marginLeft;
  14193. const marginTop = options2.marginTop;
  14194. const marginBottom = options2.marginBottom;
  14195. const textHeight = options2.displayValue !== false ? options2.fontSize + options2.textMargin : 0;
  14196. const height = options2.height;
  14197. const moduleWidth = Math.max(1, (this.canvasWidth - marginLeft - (options2.marginRight || 10)) / barcodeData.length);
  14198. ctx.setFillStyle(options2.lineColor);
  14199. let barcodeY = marginTop;
  14200. if (options2.displayValue !== false && options2.textPosition === "top") {
  14201. barcodeY += textHeight;
  14202. }
  14203. let x2 = marginLeft;
  14204. for (let i2 = 0; i2 < barcodeData.length; i2++) {
  14205. if (barcodeData[i2] === "1") {
  14206. ctx.fillRect(x2, barcodeY, moduleWidth, height);
  14207. }
  14208. x2 += moduleWidth;
  14209. }
  14210. if (options2.displayValue !== false) {
  14211. const text = options2.text || this.value;
  14212. let textY;
  14213. ctx.setFillStyle(options2.lineColor);
  14214. ctx.setFontSize(options2.fontSize);
  14215. ctx.setTextAlign(options2.textAlign);
  14216. let textX;
  14217. switch (options2.textAlign) {
  14218. case "left":
  14219. textX = marginLeft;
  14220. break;
  14221. case "right":
  14222. textX = this.canvasWidth - options2.marginRight;
  14223. break;
  14224. default:
  14225. textX = this.canvasWidth / 2;
  14226. }
  14227. if (options2.textPosition === "top") {
  14228. textY = marginTop + options2.fontSize - 3;
  14229. } else {
  14230. textY = barcodeY + height + options2.textMargin + options2.fontSize;
  14231. if (textY > this.canvasHeight - marginBottom) {
  14232. textY = this.canvasHeight - marginBottom - 2;
  14233. }
  14234. }
  14235. ctx.fillText(text, textX, textY);
  14236. }
  14237. }
  14238. }
  14239. };
  14240. function _sfc_render$1Y(_ctx, _cache, $props, $setup, $data, $options) {
  14241. return $data.calcSizeDone ? (vue.openBlock(), vue.createElementBlock("view", {
  14242. key: 0,
  14243. class: "u-barcode"
  14244. }, [
  14245. $data.showCanvas && !$data.error ? (vue.openBlock(), vue.createElementBlock("canvas", {
  14246. key: 0,
  14247. id: $data.canvasId,
  14248. "canvas-id": $data.canvasId,
  14249. style: vue.normalizeStyle({ width: $data.canvasWidth + "px", height: $data.canvasHeight + "px" })
  14250. }, null, 12, ["id", "canvas-id"])) : !$data.showCanvas && !$data.error ? (vue.openBlock(), vue.createElementBlock("image", {
  14251. key: 1,
  14252. src: $data.barcodeImage,
  14253. style: vue.normalizeStyle({ width: $data.canvasWidth + "px", height: $data.canvasHeight + "px" }),
  14254. mode: "aspectFit"
  14255. }, null, 12, ["src"])) : (vue.openBlock(), vue.createElementBlock(
  14256. "view",
  14257. {
  14258. key: 2,
  14259. class: "error-container",
  14260. style: vue.normalizeStyle({ width: $data.canvasWidth + "px", height: $data.canvasHeight + "px" })
  14261. },
  14262. [
  14263. vue.createElementVNode(
  14264. "text",
  14265. { class: "error-text" },
  14266. vue.toDisplayString($data.error),
  14267. 1
  14268. /* TEXT */
  14269. )
  14270. ],
  14271. 4
  14272. /* STYLE */
  14273. ))
  14274. ])) : vue.createCommentVNode("v-if", true);
  14275. }
  14276. const uBarcode = /* @__PURE__ */ _export_sfc(_sfc_main$1Z, [["render", _sfc_render$1Y], ["__scopeId", "data-v-f3ca37b6"], ["__file", "C:/Users/EDY/Desktop/项目/shuibei/uni_modules/uview-plus/components/u-barcode/u-barcode.vue"]]);
  14277. const __vite_glob_0_9 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
  14278. __proto__: null,
  14279. default: uBarcode
  14280. }, Symbol.toStringTag, { value: "Module" }));
  14281. const propsBox = defineMixin({
  14282. props: {
  14283. // 背景色
  14284. bgColors: {
  14285. type: [Array],
  14286. default: ["#EEFCFF", "#FCF8FF", "#FDF8F2"]
  14287. },
  14288. // 高度
  14289. height: {
  14290. type: [String],
  14291. default: "160px"
  14292. },
  14293. // 圆角
  14294. borderRadius: {
  14295. type: [String],
  14296. default: "6px"
  14297. },
  14298. // 间隔
  14299. gap: {
  14300. type: [String],
  14301. default: "15px"
  14302. }
  14303. }
  14304. });
  14305. const _sfc_main$1Y = {
  14306. name: "up-box",
  14307. data() {
  14308. return {};
  14309. },
  14310. mixins: [mpMixin, mixin, propsBox],
  14311. computed: {},
  14312. emits: [],
  14313. methods: {
  14314. addStyle
  14315. }
  14316. };
  14317. function _sfc_render$1X(_ctx, _cache, $props, $setup, $data, $options) {
  14318. return vue.openBlock(), vue.createElementBlock(
  14319. "view",
  14320. {
  14321. class: "u-box",
  14322. style: vue.normalizeStyle([{ height: _ctx.height }, $options.addStyle(_ctx.customStyle)])
  14323. },
  14324. [
  14325. vue.createElementVNode(
  14326. "view",
  14327. {
  14328. class: "u-box__left",
  14329. style: vue.normalizeStyle({ borderRadius: _ctx.borderRadius, backgroundColor: _ctx.bgColors[0] })
  14330. },
  14331. [
  14332. vue.renderSlot(_ctx.$slots, "left", {}, () => [
  14333. vue.createTextVNode("左")
  14334. ], true)
  14335. ],
  14336. 4
  14337. /* STYLE */
  14338. ),
  14339. vue.createElementVNode(
  14340. "view",
  14341. {
  14342. class: "u-box__gap",
  14343. style: vue.normalizeStyle({ width: _ctx.gap, height: _ctx.height })
  14344. },
  14345. null,
  14346. 4
  14347. /* STYLE */
  14348. ),
  14349. vue.createElementVNode("view", { class: "u-box__right" }, [
  14350. vue.createElementVNode(
  14351. "view",
  14352. {
  14353. class: "u-box__right-top",
  14354. style: vue.normalizeStyle({ borderRadius: _ctx.borderRadius, backgroundColor: _ctx.bgColors[1] })
  14355. },
  14356. [
  14357. vue.renderSlot(_ctx.$slots, "rightTop", {}, () => [
  14358. vue.createTextVNode("右上")
  14359. ], true)
  14360. ],
  14361. 4
  14362. /* STYLE */
  14363. ),
  14364. vue.createElementVNode(
  14365. "view",
  14366. {
  14367. class: "u-box__right-gap",
  14368. style: vue.normalizeStyle({ height: _ctx.gap })
  14369. },
  14370. null,
  14371. 4
  14372. /* STYLE */
  14373. ),
  14374. vue.createElementVNode(
  14375. "view",
  14376. {
  14377. class: "u-box__right-bottom",
  14378. style: vue.normalizeStyle({ borderRadius: _ctx.borderRadius, backgroundColor: _ctx.bgColors[2] })
  14379. },
  14380. [
  14381. vue.renderSlot(_ctx.$slots, "rightBottom", {}, () => [
  14382. vue.createTextVNode("右下")
  14383. ], true)
  14384. ],
  14385. 4
  14386. /* STYLE */
  14387. )
  14388. ])
  14389. ],
  14390. 4
  14391. /* STYLE */
  14392. );
  14393. }
  14394. const uBox = /* @__PURE__ */ _export_sfc(_sfc_main$1Y, [["render", _sfc_render$1X], ["__scopeId", "data-v-5409417d"], ["__file", "C:/Users/EDY/Desktop/项目/shuibei/uni_modules/uview-plus/components/u-box/u-box.vue"]]);
  14395. const __vite_glob_0_10 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
  14396. __proto__: null,
  14397. default: uBox
  14398. }, Symbol.toStringTag, { value: "Module" }));
  14399. const props$1h = defineMixin({
  14400. props: {
  14401. // 是否细边框
  14402. hairline: {
  14403. type: Boolean,
  14404. default: () => props$1x.button.hairline
  14405. },
  14406. // 按钮的预置样式,info,primary,error,warning,success
  14407. type: {
  14408. type: String,
  14409. default: () => props$1x.button.type
  14410. },
  14411. // 按钮尺寸,large,normal,small,mini
  14412. size: {
  14413. type: String,
  14414. default: () => props$1x.button.size
  14415. },
  14416. // 按钮形状,circle(两边为半圆),square(带圆角)
  14417. shape: {
  14418. type: String,
  14419. default: () => props$1x.button.shape
  14420. },
  14421. // 按钮是否镂空
  14422. plain: {
  14423. type: Boolean,
  14424. default: () => props$1x.button.plain
  14425. },
  14426. // 是否禁止状态
  14427. disabled: {
  14428. type: Boolean,
  14429. default: () => props$1x.button.disabled
  14430. },
  14431. // 是否加载中
  14432. loading: {
  14433. type: Boolean,
  14434. default: () => props$1x.button.loading
  14435. },
  14436. // 加载中提示文字
  14437. loadingText: {
  14438. type: [String, Number],
  14439. default: () => props$1x.button.loadingText
  14440. },
  14441. // 加载状态图标类型
  14442. loadingMode: {
  14443. type: String,
  14444. default: () => props$1x.button.loadingMode
  14445. },
  14446. // 加载图标大小
  14447. loadingSize: {
  14448. type: [String, Number],
  14449. default: () => props$1x.button.loadingSize
  14450. },
  14451. // 开放能力,具体请看uniapp稳定关于button组件部分说明
  14452. // https://uniapp.dcloud.io/component/button
  14453. openType: {
  14454. type: String,
  14455. default: () => props$1x.button.openType
  14456. },
  14457. // 用于 <form> 组件,点击分别会触发 <form> 组件的 submit/reset 事件
  14458. // 取值为submit(提交表单),reset(重置表单)
  14459. formType: {
  14460. type: String,
  14461. default: () => props$1x.button.formType
  14462. },
  14463. // 打开 APP 时,向 APP 传递的参数,open-type=launchApp时有效
  14464. // 只微信小程序、QQ小程序有效
  14465. appParameter: {
  14466. type: String,
  14467. default: () => props$1x.button.appParameter
  14468. },
  14469. // 指定是否阻止本节点的祖先节点出现点击态,微信小程序有效
  14470. hoverStopPropagation: {
  14471. type: Boolean,
  14472. default: () => props$1x.button.hoverStopPropagation
  14473. },
  14474. // 指定返回用户信息的语言,zh_CN 简体中文,zh_TW 繁体中文,en 英文。只微信小程序有效
  14475. lang: {
  14476. type: String,
  14477. default: () => props$1x.button.lang
  14478. },
  14479. // 会话来源,open-type="contact"时有效。只微信小程序有效
  14480. sessionFrom: {
  14481. type: String,
  14482. default: () => props$1x.button.sessionFrom
  14483. },
  14484. // 会话内消息卡片标题,open-type="contact"时有效
  14485. // 默认当前标题,只微信小程序有效
  14486. sendMessageTitle: {
  14487. type: String,
  14488. default: () => props$1x.button.sendMessageTitle
  14489. },
  14490. // 会话内消息卡片点击跳转小程序路径,open-type="contact"时有效
  14491. // 默认当前分享路径,只微信小程序有效
  14492. sendMessagePath: {
  14493. type: String,
  14494. default: () => props$1x.button.sendMessagePath
  14495. },
  14496. // 会话内消息卡片图片,open-type="contact"时有效
  14497. // 默认当前页面截图,只微信小程序有效
  14498. sendMessageImg: {
  14499. type: String,
  14500. default: () => props$1x.button.sendMessageImg
  14501. },
  14502. // 是否显示会话内消息卡片,设置此参数为 true,用户进入客服会话会在右下角显示"可能要发送的小程序"提示,
  14503. // 用户点击后可以快速发送小程序消息,open-type="contact"时有效
  14504. showMessageCard: {
  14505. type: Boolean,
  14506. default: () => props$1x.button.showMessageCard
  14507. },
  14508. // 额外传参参数,用于小程序的data-xxx属性,通过target.dataset.name获取
  14509. dataName: {
  14510. type: String,
  14511. default: () => props$1x.button.dataName
  14512. },
  14513. // 节流,一定时间内只能触发一次
  14514. throttleTime: {
  14515. type: [String, Number],
  14516. default: () => props$1x.button.throttleTime
  14517. },
  14518. // 按住后多久出现点击态,单位毫秒
  14519. hoverStartTime: {
  14520. type: [String, Number],
  14521. default: () => props$1x.button.hoverStartTime
  14522. },
  14523. // 手指松开后点击态保留时间,单位毫秒
  14524. hoverStayTime: {
  14525. type: [String, Number],
  14526. default: () => props$1x.button.hoverStayTime
  14527. },
  14528. // 按钮文字,之所以通过props传入,是因为slot传入的话
  14529. // nvue中无法控制文字的样式
  14530. text: {
  14531. type: [String, Number],
  14532. default: () => props$1x.button.text
  14533. },
  14534. // 按钮图标
  14535. icon: {
  14536. type: String,
  14537. default: () => props$1x.button.icon
  14538. },
  14539. // 按钮图标
  14540. iconColor: {
  14541. type: String,
  14542. default: () => props$1x.button.icon
  14543. },
  14544. // 按钮颜色,支持传入linear-gradient渐变色
  14545. color: {
  14546. type: String,
  14547. default: () => props$1x.button.color
  14548. },
  14549. // 停止冒泡
  14550. stop: {
  14551. type: Boolean,
  14552. default: () => props$1x.button.stop
  14553. }
  14554. }
  14555. });
  14556. let flag;
  14557. function throttle(func2, wait2 = 500, immediate = true) {
  14558. if (immediate) {
  14559. if (!flag) {
  14560. flag = true;
  14561. typeof func2 === "function" && func2();
  14562. setTimeout(() => {
  14563. flag = false;
  14564. }, wait2);
  14565. }
  14566. } else if (!flag) {
  14567. flag = true;
  14568. setTimeout(() => {
  14569. flag = false;
  14570. typeof func2 === "function" && func2();
  14571. }, wait2);
  14572. }
  14573. }
  14574. const _sfc_main$1X = {
  14575. name: "u-button",
  14576. mixins: [mpMixin, mixin, props$1h],
  14577. data() {
  14578. return {};
  14579. },
  14580. computed: {
  14581. // 生成bem风格的类名
  14582. bemClass() {
  14583. if (!this.color) {
  14584. return this.bem(
  14585. "button",
  14586. ["type", "shape", "size"],
  14587. ["disabled", "plain", "hairline"]
  14588. );
  14589. } else {
  14590. return this.bem(
  14591. "button",
  14592. ["shape", "size"],
  14593. ["disabled", "plain", "hairline"]
  14594. );
  14595. }
  14596. },
  14597. loadingColor() {
  14598. if (this.plain) {
  14599. return this.color ? this.color : color$3[`u-${this.type}`];
  14600. }
  14601. if (this.type === "info") {
  14602. return "#c9c9c9";
  14603. }
  14604. return "rgb(200, 200, 200)";
  14605. },
  14606. iconColorCom() {
  14607. if (this.iconColor)
  14608. return this.iconColor;
  14609. if (this.plain) {
  14610. return this.color ? this.color : this.type;
  14611. } else {
  14612. return this.type === "info" ? "#000000" : "#ffffff";
  14613. }
  14614. },
  14615. baseColor() {
  14616. let style = {};
  14617. if (this.color) {
  14618. style.color = this.plain ? this.color : "white";
  14619. if (!this.plain) {
  14620. style["background-color"] = this.color;
  14621. }
  14622. if (this.color.indexOf("gradient") !== -1) {
  14623. style.borderTopWidth = 0;
  14624. style.borderRightWidth = 0;
  14625. style.borderBottomWidth = 0;
  14626. style.borderLeftWidth = 0;
  14627. if (!this.plain) {
  14628. style.backgroundImage = this.color;
  14629. }
  14630. } else {
  14631. style.borderColor = this.color;
  14632. style.borderWidth = "1px";
  14633. style.borderStyle = "solid";
  14634. }
  14635. }
  14636. return style;
  14637. },
  14638. // nvue版本按钮的字体不会继承父组件的颜色,需要对每一个text组件进行单独的设置
  14639. nvueTextStyle() {
  14640. let style = {};
  14641. if (this.type === "info") {
  14642. style.color = "#323233";
  14643. }
  14644. if (this.color) {
  14645. style.color = this.plain ? this.color : "white";
  14646. }
  14647. style.fontSize = this.textSize + "px";
  14648. return style;
  14649. },
  14650. // 字体大小
  14651. textSize() {
  14652. let fontSize = 14, { size } = this;
  14653. if (size === "large")
  14654. fontSize = 16;
  14655. if (size === "normal")
  14656. fontSize = 14;
  14657. if (size === "small")
  14658. fontSize = 12;
  14659. if (size === "mini")
  14660. fontSize = 10;
  14661. return fontSize;
  14662. }
  14663. },
  14664. emits: [
  14665. "click",
  14666. "getphonenumber",
  14667. "getuserinfo",
  14668. "error",
  14669. "opensetting",
  14670. "launchapp",
  14671. "agreeprivacyauthorization"
  14672. ],
  14673. methods: {
  14674. addStyle,
  14675. clickHandler(e2) {
  14676. if (!this.disabled && !this.loading) {
  14677. throttle(() => {
  14678. this.$emit("click", e2);
  14679. }, this.throttleTime);
  14680. }
  14681. this.stop && this.preventEvent(e2);
  14682. },
  14683. // 下面为对接uniapp官方按钮开放能力事件回调的对接
  14684. getphonenumber(res) {
  14685. this.$emit("getphonenumber", res);
  14686. },
  14687. getuserinfo(res) {
  14688. this.$emit("getuserinfo", res);
  14689. },
  14690. error(res) {
  14691. this.$emit("error", res);
  14692. },
  14693. opensetting(res) {
  14694. this.$emit("opensetting", res);
  14695. },
  14696. launchapp(res) {
  14697. this.$emit("launchapp", res);
  14698. },
  14699. agreeprivacyauthorization(res) {
  14700. this.$emit("agreeprivacyauthorization", res);
  14701. }
  14702. }
  14703. };
  14704. function _sfc_render$1W(_ctx, _cache, $props, $setup, $data, $options) {
  14705. const _component_u_loading_icon = resolveEasycom(vue.resolveDynamicComponent("u-loading-icon"), __easycom_0$e);
  14706. const _component_up_icon = vue.resolveComponent("up-icon");
  14707. return vue.openBlock(), vue.createElementBlock("button", {
  14708. "hover-start-time": Number(_ctx.hoverStartTime),
  14709. "hover-stay-time": Number(_ctx.hoverStayTime),
  14710. "form-type": _ctx.formType,
  14711. "open-type": _ctx.openType,
  14712. "app-parameter": _ctx.appParameter,
  14713. "hover-stop-propagation": _ctx.hoverStopPropagation,
  14714. "send-message-title": _ctx.sendMessageTitle,
  14715. "send-message-path": _ctx.sendMessagePath,
  14716. lang: _ctx.lang,
  14717. "data-name": _ctx.dataName,
  14718. "session-from": _ctx.sessionFrom,
  14719. "send-message-img": _ctx.sendMessageImg,
  14720. "show-message-card": _ctx.showMessageCard,
  14721. onGetphonenumber: _cache[0] || (_cache[0] = (...args) => $options.getphonenumber && $options.getphonenumber(...args)),
  14722. onGetuserinfo: _cache[1] || (_cache[1] = (...args) => $options.getuserinfo && $options.getuserinfo(...args)),
  14723. onError: _cache[2] || (_cache[2] = (...args) => $options.error && $options.error(...args)),
  14724. onOpensetting: _cache[3] || (_cache[3] = (...args) => $options.opensetting && $options.opensetting(...args)),
  14725. onLaunchapp: _cache[4] || (_cache[4] = (...args) => $options.launchapp && $options.launchapp(...args)),
  14726. onAgreeprivacyauthorization: _cache[5] || (_cache[5] = (...args) => $options.agreeprivacyauthorization && $options.agreeprivacyauthorization(...args)),
  14727. "hover-class": !_ctx.disabled && !_ctx.loading ? "u-button--active" : "",
  14728. class: vue.normalizeClass(["u-button u-reset-button", $options.bemClass]),
  14729. style: vue.normalizeStyle([$options.baseColor, $options.addStyle(_ctx.customStyle)]),
  14730. onClick: _cache[6] || (_cache[6] = (...args) => $options.clickHandler && $options.clickHandler(...args))
  14731. }, [
  14732. _ctx.loading ? (vue.openBlock(), vue.createElementBlock(
  14733. vue.Fragment,
  14734. { key: 0 },
  14735. [
  14736. vue.createVNode(_component_u_loading_icon, {
  14737. mode: _ctx.loadingMode,
  14738. size: _ctx.loadingSize * 1.15,
  14739. color: $options.loadingColor
  14740. }, null, 8, ["mode", "size", "color"]),
  14741. vue.createElementVNode(
  14742. "text",
  14743. {
  14744. class: "u-button__loading-text",
  14745. style: vue.normalizeStyle([{ fontSize: $options.textSize + "px" }])
  14746. },
  14747. vue.toDisplayString(_ctx.loadingText || _ctx.text),
  14748. 5
  14749. /* TEXT, STYLE */
  14750. )
  14751. ],
  14752. 64
  14753. /* STABLE_FRAGMENT */
  14754. )) : (vue.openBlock(), vue.createElementBlock(
  14755. vue.Fragment,
  14756. { key: 1 },
  14757. [
  14758. _ctx.icon ? (vue.openBlock(), vue.createBlock(_component_up_icon, {
  14759. key: 0,
  14760. name: _ctx.icon,
  14761. color: $options.iconColorCom,
  14762. size: $options.textSize * 1.35,
  14763. customStyle: { marginRight: "2px" }
  14764. }, null, 8, ["name", "color", "size"])) : vue.createCommentVNode("v-if", true),
  14765. vue.renderSlot(_ctx.$slots, "default", {}, () => [
  14766. vue.createElementVNode(
  14767. "text",
  14768. {
  14769. class: "u-button__text",
  14770. style: vue.normalizeStyle([{ fontSize: $options.textSize + "px" }])
  14771. },
  14772. vue.toDisplayString(_ctx.text),
  14773. 5
  14774. /* TEXT, STYLE */
  14775. )
  14776. ], true)
  14777. ],
  14778. 64
  14779. /* STABLE_FRAGMENT */
  14780. ))
  14781. ], 46, ["hover-start-time", "hover-stay-time", "form-type", "open-type", "app-parameter", "hover-stop-propagation", "send-message-title", "send-message-path", "lang", "data-name", "session-from", "send-message-img", "show-message-card", "hover-class"]);
  14782. }
  14783. const __easycom_0$8 = /* @__PURE__ */ _export_sfc(_sfc_main$1X, [["render", _sfc_render$1W], ["__scopeId", "data-v-5ce41ee6"], ["__file", "C:/Users/EDY/Desktop/项目/shuibei/uni_modules/uview-plus/components/u-button/u-button.vue"]]);
  14784. const __vite_glob_0_11 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
  14785. __proto__: null,
  14786. default: __easycom_0$8
  14787. }, Symbol.toStringTag, { value: "Module" }));
  14788. const _sfc_main$1W = {
  14789. name: "u-calendar-header",
  14790. mixins: [mpMixin, mixin],
  14791. props: {
  14792. // 标题
  14793. title: {
  14794. type: String,
  14795. default: ""
  14796. },
  14797. // 副标题
  14798. subtitle: {
  14799. type: String,
  14800. default: ""
  14801. },
  14802. // 是否显示标题
  14803. showTitle: {
  14804. type: Boolean,
  14805. default: true
  14806. },
  14807. // 是否显示副标题
  14808. showSubtitle: {
  14809. type: Boolean,
  14810. default: true
  14811. },
  14812. // 星期文本
  14813. weekText: {
  14814. type: Array,
  14815. default: () => {
  14816. return [];
  14817. }
  14818. }
  14819. },
  14820. data() {
  14821. return {};
  14822. },
  14823. methods: {
  14824. name() {
  14825. }
  14826. }
  14827. };
  14828. function _sfc_render$1V(_ctx, _cache, $props, $setup, $data, $options) {
  14829. return vue.openBlock(), vue.createElementBlock("view", { class: "u-calendar-header u-border-bottom" }, [
  14830. $props.showTitle ? (vue.openBlock(), vue.createElementBlock(
  14831. "text",
  14832. {
  14833. key: 0,
  14834. class: "u-calendar-header__title"
  14835. },
  14836. vue.toDisplayString($props.title),
  14837. 1
  14838. /* TEXT */
  14839. )) : vue.createCommentVNode("v-if", true),
  14840. $props.showSubtitle ? (vue.openBlock(), vue.createElementBlock(
  14841. "text",
  14842. {
  14843. key: 1,
  14844. class: "u-calendar-header__subtitle"
  14845. },
  14846. vue.toDisplayString($props.subtitle),
  14847. 1
  14848. /* TEXT */
  14849. )) : vue.createCommentVNode("v-if", true),
  14850. vue.createElementVNode("view", { class: "u-calendar-header__weekdays" }, [
  14851. vue.createElementVNode(
  14852. "text",
  14853. { class: "u-calendar-header__weekdays__weekday" },
  14854. vue.toDisplayString($props.weekText[0]),
  14855. 1
  14856. /* TEXT */
  14857. ),
  14858. vue.createElementVNode(
  14859. "text",
  14860. { class: "u-calendar-header__weekdays__weekday" },
  14861. vue.toDisplayString($props.weekText[1]),
  14862. 1
  14863. /* TEXT */
  14864. ),
  14865. vue.createElementVNode(
  14866. "text",
  14867. { class: "u-calendar-header__weekdays__weekday" },
  14868. vue.toDisplayString($props.weekText[2]),
  14869. 1
  14870. /* TEXT */
  14871. ),
  14872. vue.createElementVNode(
  14873. "text",
  14874. { class: "u-calendar-header__weekdays__weekday" },
  14875. vue.toDisplayString($props.weekText[3]),
  14876. 1
  14877. /* TEXT */
  14878. ),
  14879. vue.createElementVNode(
  14880. "text",
  14881. { class: "u-calendar-header__weekdays__weekday" },
  14882. vue.toDisplayString($props.weekText[4]),
  14883. 1
  14884. /* TEXT */
  14885. ),
  14886. vue.createElementVNode(
  14887. "text",
  14888. { class: "u-calendar-header__weekdays__weekday" },
  14889. vue.toDisplayString($props.weekText[5]),
  14890. 1
  14891. /* TEXT */
  14892. ),
  14893. vue.createElementVNode(
  14894. "text",
  14895. { class: "u-calendar-header__weekdays__weekday" },
  14896. vue.toDisplayString($props.weekText[6]),
  14897. 1
  14898. /* TEXT */
  14899. )
  14900. ])
  14901. ]);
  14902. }
  14903. const uHeader = /* @__PURE__ */ _export_sfc(_sfc_main$1W, [["render", _sfc_render$1V], ["__scopeId", "data-v-7f0f7602"], ["__file", "C:/Users/EDY/Desktop/项目/shuibei/uni_modules/uview-plus/components/u-calendar/header.vue"]]);
  14904. var e$1 = function() {
  14905. var t2 = 1e3, e2 = 6e4, n2 = 36e5, r2 = "millisecond", s2 = "second", i2 = "minute", u2 = "hour", a2 = "day", o2 = "week", c2 = "month", f2 = "quarter", h2 = "year", d2 = "date", l2 = "Invalid Date", $2 = /^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/, y2 = /\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g, M2 = { name: "en", weekdays: "Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"), months: "January_February_March_April_May_June_July_August_September_October_November_December".split("_"), ordinal: function(t3) {
  14906. var e3 = ["th", "st", "nd", "rd"], n3 = t3 % 100;
  14907. return "[" + t3 + (e3[(n3 - 20) % 10] || e3[n3] || e3[0]) + "]";
  14908. } }, g2 = function(t3, e3, n3) {
  14909. var r3 = String(t3);
  14910. return !r3 || r3.length >= e3 ? t3 : "" + Array(e3 + 1 - r3.length).join(n3) + t3;
  14911. }, v2 = { s: g2, z: function(t3) {
  14912. var e3 = -t3.utcOffset(), n3 = Math.abs(e3), r3 = Math.floor(n3 / 60), s3 = n3 % 60;
  14913. return (e3 <= 0 ? "+" : "-") + g2(r3, 2, "0") + ":" + g2(s3, 2, "0");
  14914. }, m: function t3(e3, n3) {
  14915. if (e3.date() < n3.date())
  14916. return -t3(n3, e3);
  14917. var r3 = 12 * (n3.year() - e3.year()) + (n3.month() - e3.month()), s3 = e3.clone().add(r3, c2), i3 = n3 - s3 < 0, u3 = e3.clone().add(r3 + (i3 ? -1 : 1), c2);
  14918. return +(-(r3 + (n3 - s3) / (i3 ? s3 - u3 : u3 - s3)) || 0);
  14919. }, a: function(t3) {
  14920. return t3 < 0 ? Math.ceil(t3) || 0 : Math.floor(t3);
  14921. }, p: function(t3) {
  14922. return { M: c2, y: h2, w: o2, d: a2, D: d2, h: u2, m: i2, s: s2, ms: r2, Q: f2 }[t3] || String(t3 || "").toLowerCase().replace(/s$/, "");
  14923. }, u: function(t3) {
  14924. return void 0 === t3;
  14925. } }, m2 = "en", D2 = {};
  14926. D2[m2] = M2;
  14927. var p2 = "$isDayjsObject", S2 = function(t3) {
  14928. return t3 instanceof _2 || !(!t3 || !t3[p2]);
  14929. }, w2 = function t3(e3, n3, r3) {
  14930. var s3;
  14931. if (!e3)
  14932. return m2;
  14933. if ("string" == typeof e3) {
  14934. var i3 = e3.toLowerCase();
  14935. D2[i3] && (s3 = i3), n3 && (D2[i3] = n3, s3 = i3);
  14936. var u3 = e3.split("-");
  14937. if (!s3 && u3.length > 1)
  14938. return t3(u3[0]);
  14939. } else {
  14940. var a3 = e3.name;
  14941. D2[a3] = e3, s3 = a3;
  14942. }
  14943. return !r3 && s3 && (m2 = s3), s3 || !r3 && m2;
  14944. }, b2 = function(t3, e3) {
  14945. if (S2(t3))
  14946. return t3.clone();
  14947. var n3 = "object" == typeof e3 ? e3 : {};
  14948. return n3.date = t3, n3.args = arguments, new _2(n3);
  14949. }, O2 = v2;
  14950. O2.l = w2, O2.i = S2, O2.w = function(t3, e3) {
  14951. return b2(t3, { locale: e3.$L, utc: e3.$u, x: e3.$x, $offset: e3.$offset });
  14952. };
  14953. var _2 = function() {
  14954. function M3(t3) {
  14955. this.$L = w2(t3.locale, null, true), this.parse(t3), this.$x = this.$x || t3.x || {}, this[p2] = true;
  14956. }
  14957. var g3 = M3.prototype;
  14958. return g3.parse = function(t3) {
  14959. this.$d = function(t4) {
  14960. var e3 = t4.date, n3 = t4.utc;
  14961. if (null === e3)
  14962. return /* @__PURE__ */ new Date(NaN);
  14963. if (O2.u(e3))
  14964. return /* @__PURE__ */ new Date();
  14965. if (e3 instanceof Date)
  14966. return new Date(e3);
  14967. if ("string" == typeof e3 && !/Z$/i.test(e3)) {
  14968. var r3 = e3.match($2);
  14969. if (r3) {
  14970. var s3 = r3[2] - 1 || 0, i3 = (r3[7] || "0").substring(0, 3);
  14971. return n3 ? new Date(Date.UTC(r3[1], s3, r3[3] || 1, r3[4] || 0, r3[5] || 0, r3[6] || 0, i3)) : new Date(r3[1], s3, r3[3] || 1, r3[4] || 0, r3[5] || 0, r3[6] || 0, i3);
  14972. }
  14973. }
  14974. return new Date(e3);
  14975. }(t3), this.init();
  14976. }, g3.init = function() {
  14977. var t3 = this.$d;
  14978. this.$y = t3.getFullYear(), this.$M = t3.getMonth(), this.$D = t3.getDate(), this.$W = t3.getDay(), this.$H = t3.getHours(), this.$m = t3.getMinutes(), this.$s = t3.getSeconds(), this.$ms = t3.getMilliseconds();
  14979. }, g3.$utils = function() {
  14980. return O2;
  14981. }, g3.isValid = function() {
  14982. return !(this.$d.toString() === l2);
  14983. }, g3.isSame = function(t3, e3) {
  14984. var n3 = b2(t3);
  14985. return this.startOf(e3) <= n3 && n3 <= this.endOf(e3);
  14986. }, g3.isAfter = function(t3, e3) {
  14987. return b2(t3) < this.startOf(e3);
  14988. }, g3.isBefore = function(t3, e3) {
  14989. return this.endOf(e3) < b2(t3);
  14990. }, g3.$g = function(t3, e3, n3) {
  14991. return O2.u(t3) ? this[e3] : this.set(n3, t3);
  14992. }, g3.unix = function() {
  14993. return Math.floor(this.valueOf() / 1e3);
  14994. }, g3.valueOf = function() {
  14995. return this.$d.getTime();
  14996. }, g3.startOf = function(t3, e3) {
  14997. var n3 = this, r3 = !!O2.u(e3) || e3, f3 = O2.p(t3), l3 = function(t4, e4) {
  14998. var s3 = O2.w(n3.$u ? Date.UTC(n3.$y, e4, t4) : new Date(n3.$y, e4, t4), n3);
  14999. return r3 ? s3 : s3.endOf(a2);
  15000. }, $3 = function(t4, e4) {
  15001. return O2.w(n3.toDate()[t4].apply(n3.toDate("s"), (r3 ? [0, 0, 0, 0] : [23, 59, 59, 999]).slice(e4)), n3);
  15002. }, y3 = this.$W, M4 = this.$M, g4 = this.$D, v3 = "set" + (this.$u ? "UTC" : "");
  15003. switch (f3) {
  15004. case h2:
  15005. return r3 ? l3(1, 0) : l3(31, 11);
  15006. case c2:
  15007. return r3 ? l3(1, M4) : l3(0, M4 + 1);
  15008. case o2:
  15009. var m3 = this.$locale().weekStart || 0, D3 = (y3 < m3 ? y3 + 7 : y3) - m3;
  15010. return l3(r3 ? g4 - D3 : g4 + (6 - D3), M4);
  15011. case a2:
  15012. case d2:
  15013. return $3(v3 + "Hours", 0);
  15014. case u2:
  15015. return $3(v3 + "Minutes", 1);
  15016. case i2:
  15017. return $3(v3 + "Seconds", 2);
  15018. case s2:
  15019. return $3(v3 + "Milliseconds", 3);
  15020. default:
  15021. return this.clone();
  15022. }
  15023. }, g3.endOf = function(t3) {
  15024. return this.startOf(t3, false);
  15025. }, g3.$set = function(t3, e3) {
  15026. var n3, o3 = O2.p(t3), f3 = "set" + (this.$u ? "UTC" : ""), l3 = (n3 = {}, n3[a2] = f3 + "Date", n3[d2] = f3 + "Date", n3[c2] = f3 + "Month", n3[h2] = f3 + "FullYear", n3[u2] = f3 + "Hours", n3[i2] = f3 + "Minutes", n3[s2] = f3 + "Seconds", n3[r2] = f3 + "Milliseconds", n3)[o3], $3 = o3 === a2 ? this.$D + (e3 - this.$W) : e3;
  15027. if (o3 === c2 || o3 === h2) {
  15028. var y3 = this.clone().set(d2, 1);
  15029. y3.$d[l3]($3), y3.init(), this.$d = y3.set(d2, Math.min(this.$D, y3.daysInMonth())).$d;
  15030. } else
  15031. l3 && this.$d[l3]($3);
  15032. return this.init(), this;
  15033. }, g3.set = function(t3, e3) {
  15034. return this.clone().$set(t3, e3);
  15035. }, g3.get = function(t3) {
  15036. return this[O2.p(t3)]();
  15037. }, g3.add = function(r3, f3) {
  15038. var d3, l3 = this;
  15039. r3 = Number(r3);
  15040. var $3 = O2.p(f3), y3 = function(t3) {
  15041. var e3 = b2(l3);
  15042. return O2.w(e3.date(e3.date() + Math.round(t3 * r3)), l3);
  15043. };
  15044. if ($3 === c2)
  15045. return this.set(c2, this.$M + r3);
  15046. if ($3 === h2)
  15047. return this.set(h2, this.$y + r3);
  15048. if ($3 === a2)
  15049. return y3(1);
  15050. if ($3 === o2)
  15051. return y3(7);
  15052. var M4 = (d3 = {}, d3[i2] = e2, d3[u2] = n2, d3[s2] = t2, d3)[$3] || 1, g4 = this.$d.getTime() + r3 * M4;
  15053. return O2.w(g4, this);
  15054. }, g3.subtract = function(t3, e3) {
  15055. return this.add(-1 * t3, e3);
  15056. }, g3.format = function(t3) {
  15057. var e3 = this, n3 = this.$locale();
  15058. if (!this.isValid())
  15059. return n3.invalidDate || l2;
  15060. var r3 = t3 || "YYYY-MM-DDTHH:mm:ssZ", s3 = O2.z(this), i3 = this.$H, u3 = this.$m, a3 = this.$M, o3 = n3.weekdays, c3 = n3.months, f3 = n3.meridiem, h3 = function(t4, n4, s4, i4) {
  15061. return t4 && (t4[n4] || t4(e3, r3)) || s4[n4].slice(0, i4);
  15062. }, d3 = function(t4) {
  15063. return O2.s(i3 % 12 || 12, t4, "0");
  15064. }, $3 = f3 || function(t4, e4, n4) {
  15065. var r4 = t4 < 12 ? "AM" : "PM";
  15066. return n4 ? r4.toLowerCase() : r4;
  15067. };
  15068. return r3.replace(y2, function(t4, r4) {
  15069. return r4 || function(t5) {
  15070. switch (t5) {
  15071. case "YY":
  15072. return String(e3.$y).slice(-2);
  15073. case "YYYY":
  15074. return O2.s(e3.$y, 4, "0");
  15075. case "M":
  15076. return a3 + 1;
  15077. case "MM":
  15078. return O2.s(a3 + 1, 2, "0");
  15079. case "MMM":
  15080. return h3(n3.monthsShort, a3, c3, 3);
  15081. case "MMMM":
  15082. return h3(c3, a3);
  15083. case "D":
  15084. return e3.$D;
  15085. case "DD":
  15086. return O2.s(e3.$D, 2, "0");
  15087. case "d":
  15088. return String(e3.$W);
  15089. case "dd":
  15090. return h3(n3.weekdaysMin, e3.$W, o3, 2);
  15091. case "ddd":
  15092. return h3(n3.weekdaysShort, e3.$W, o3, 3);
  15093. case "dddd":
  15094. return o3[e3.$W];
  15095. case "H":
  15096. return String(i3);
  15097. case "HH":
  15098. return O2.s(i3, 2, "0");
  15099. case "h":
  15100. return d3(1);
  15101. case "hh":
  15102. return d3(2);
  15103. case "a":
  15104. return $3(i3, u3, true);
  15105. case "A":
  15106. return $3(i3, u3, false);
  15107. case "m":
  15108. return String(u3);
  15109. case "mm":
  15110. return O2.s(u3, 2, "0");
  15111. case "s":
  15112. return String(e3.$s);
  15113. case "ss":
  15114. return O2.s(e3.$s, 2, "0");
  15115. case "SSS":
  15116. return O2.s(e3.$ms, 3, "0");
  15117. case "Z":
  15118. return s3;
  15119. }
  15120. return null;
  15121. }(t4) || s3.replace(":", "");
  15122. });
  15123. }, g3.utcOffset = function() {
  15124. return 15 * -Math.round(this.$d.getTimezoneOffset() / 15);
  15125. }, g3.diff = function(r3, d3, l3) {
  15126. var $3, y3 = this, M4 = O2.p(d3), g4 = b2(r3), v3 = (g4.utcOffset() - this.utcOffset()) * e2, m3 = this - g4, D3 = function() {
  15127. return O2.m(y3, g4);
  15128. };
  15129. switch (M4) {
  15130. case h2:
  15131. $3 = D3() / 12;
  15132. break;
  15133. case c2:
  15134. $3 = D3();
  15135. break;
  15136. case f2:
  15137. $3 = D3() / 3;
  15138. break;
  15139. case o2:
  15140. $3 = (m3 - v3) / 6048e5;
  15141. break;
  15142. case a2:
  15143. $3 = (m3 - v3) / 864e5;
  15144. break;
  15145. case u2:
  15146. $3 = m3 / n2;
  15147. break;
  15148. case i2:
  15149. $3 = m3 / e2;
  15150. break;
  15151. case s2:
  15152. $3 = m3 / t2;
  15153. break;
  15154. default:
  15155. $3 = m3;
  15156. }
  15157. return l3 ? $3 : O2.a($3);
  15158. }, g3.daysInMonth = function() {
  15159. return this.endOf(c2).$D;
  15160. }, g3.$locale = function() {
  15161. return D2[this.$L];
  15162. }, g3.locale = function(t3, e3) {
  15163. if (!t3)
  15164. return this.$L;
  15165. var n3 = this.clone(), r3 = w2(t3, e3, true);
  15166. return r3 && (n3.$L = r3), n3;
  15167. }, g3.clone = function() {
  15168. return O2.w(this.$d, this);
  15169. }, g3.toDate = function() {
  15170. return new Date(this.valueOf());
  15171. }, g3.toJSON = function() {
  15172. return this.isValid() ? this.toISOString() : null;
  15173. }, g3.toISOString = function() {
  15174. return this.$d.toISOString();
  15175. }, g3.toString = function() {
  15176. return this.$d.toUTCString();
  15177. }, M3;
  15178. }(), k2 = _2.prototype;
  15179. return b2.prototype = k2, [["$ms", r2], ["$s", s2], ["$m", i2], ["$H", u2], ["$W", a2], ["$M", c2], ["$y", h2], ["$D", d2]].forEach(function(t3) {
  15180. k2[t3[1]] = function(e3) {
  15181. return this.$g(e3, t3[0], t3[1]);
  15182. };
  15183. }), b2.extend = function(t3, e3) {
  15184. return t3.$i || (t3(e3, _2, b2), t3.$i = true), b2;
  15185. }, b2.locale = w2, b2.isDayjs = S2, b2.unix = function(t3) {
  15186. return b2(1e3 * t3);
  15187. }, b2.en = D2[m2], b2.Ls = D2, b2.p = {}, b2;
  15188. }();
  15189. const _sfc_main$1V = {
  15190. name: "u-calendar-month",
  15191. mixins: [mpMixin, mixin],
  15192. props: {
  15193. // 是否显示月份背景色
  15194. showMark: {
  15195. type: Boolean,
  15196. default: true
  15197. },
  15198. // 主题色,对底部按钮和选中日期有效
  15199. color: {
  15200. type: String,
  15201. default: "#3c9cff"
  15202. },
  15203. // 月份数据
  15204. months: {
  15205. type: Array,
  15206. default: () => []
  15207. },
  15208. // 日期选择类型
  15209. mode: {
  15210. type: String,
  15211. default: "single"
  15212. },
  15213. // 日期行高
  15214. rowHeight: {
  15215. type: [String, Number],
  15216. default: 58
  15217. },
  15218. // mode=multiple时,最多可选多少个日期
  15219. maxCount: {
  15220. type: [String, Number],
  15221. default: Infinity
  15222. },
  15223. // mode=range时,第一个日期底部的提示文字
  15224. startText: {
  15225. type: String,
  15226. default: "开始"
  15227. },
  15228. // mode=range时,最后一个日期底部的提示文字
  15229. endText: {
  15230. type: String,
  15231. default: "结束"
  15232. },
  15233. // 默认选中的日期,mode为multiple或range是必须为数组格式
  15234. defaultDate: {
  15235. type: [Array, String, Date],
  15236. default: null
  15237. },
  15238. // 最小的可选日期
  15239. minDate: {
  15240. type: [String, Number],
  15241. default: 0
  15242. },
  15243. // 最大可选日期
  15244. maxDate: {
  15245. type: [String, Number],
  15246. default: 0
  15247. },
  15248. // 如果没有设置maxDate,则往后推多少个月
  15249. maxMonth: {
  15250. type: [String, Number],
  15251. default: 2
  15252. },
  15253. // 是否为只读状态,只读状态下禁止选择日期
  15254. readonly: {
  15255. type: Boolean,
  15256. default: () => props$1x.calendar.readonly
  15257. },
  15258. // 日期区间最多可选天数,默认无限制,mode = range时有效
  15259. maxRange: {
  15260. type: [Number, String],
  15261. default: Infinity
  15262. },
  15263. // 范围选择超过最多可选天数时的提示文案,mode = range时有效
  15264. rangePrompt: {
  15265. type: String,
  15266. default: ""
  15267. },
  15268. // 范围选择超过最多可选天数时,是否展示提示文案,mode = range时有效
  15269. showRangePrompt: {
  15270. type: Boolean,
  15271. default: true
  15272. },
  15273. // 是否允许日期范围的起止时间为同一天,mode = range时有效
  15274. allowSameDay: {
  15275. type: Boolean,
  15276. default: false
  15277. },
  15278. forbidDays: {
  15279. type: Array,
  15280. default: () => []
  15281. },
  15282. forbidDaysToast: {
  15283. type: String,
  15284. default: ""
  15285. }
  15286. },
  15287. data() {
  15288. return {
  15289. // 每个日期的宽度
  15290. width: 0,
  15291. // 当前选中的日期item
  15292. item: {},
  15293. selected: []
  15294. };
  15295. },
  15296. watch: {
  15297. selectedChange: {
  15298. immediate: true,
  15299. handler(n2) {
  15300. this.setDefaultDate();
  15301. }
  15302. }
  15303. },
  15304. computed: {
  15305. // 多个条件的变化,会引起选中日期的变化,这里统一管理监听
  15306. selectedChange() {
  15307. return [this.minDate, this.maxDate, this.defaultDate];
  15308. },
  15309. dayStyle(index1, index2, item) {
  15310. return (index12, index22, item2) => {
  15311. const style = {};
  15312. let week = item2.week;
  15313. const dayWidth = Number(parseFloat(this.width / 7).toFixed(3).slice(0, -1));
  15314. style.height = addUnit(this.rowHeight, "px");
  15315. if (index22 === 0) {
  15316. week = (week === 0 ? 7 : week) - 1;
  15317. style.marginLeft = addUnit(week * dayWidth, "px");
  15318. }
  15319. if (this.mode === "range") {
  15320. style.paddingLeft = 0;
  15321. style.paddingRight = 0;
  15322. style.paddingBottom = 0;
  15323. style.paddingTop = 0;
  15324. }
  15325. return style;
  15326. };
  15327. },
  15328. daySelectStyle() {
  15329. return (index1, index2, item) => {
  15330. let date3 = e$1(item.date).format("YYYY-MM-DD"), style = {};
  15331. if (this.selected.some((item2) => this.dateSame(item2, date3))) {
  15332. style.backgroundColor = this.color;
  15333. }
  15334. if (this.mode === "single") {
  15335. if (date3 === this.selected[0]) {
  15336. style.borderTopLeftRadius = "3px";
  15337. style.borderBottomLeftRadius = "3px";
  15338. style.borderTopRightRadius = "3px";
  15339. style.borderBottomRightRadius = "3px";
  15340. }
  15341. } else if (this.mode === "range") {
  15342. if (this.selected.length >= 2) {
  15343. const len = this.selected.length - 1;
  15344. if (this.dateSame(date3, this.selected[0])) {
  15345. style.borderTopLeftRadius = "3px";
  15346. style.borderBottomLeftRadius = "3px";
  15347. }
  15348. if (this.dateSame(date3, this.selected[len])) {
  15349. style.borderTopRightRadius = "3px";
  15350. style.borderBottomRightRadius = "3px";
  15351. }
  15352. if (e$1(date3).isAfter(e$1(this.selected[0])) && e$1(date3).isBefore(e$1(this.selected[len]))) {
  15353. style.backgroundColor = colorGradient(this.color, "#ffffff", 100)[90];
  15354. style.opacity = 0.7;
  15355. }
  15356. } else if (this.selected.length === 1) {
  15357. style.borderTopLeftRadius = "3px";
  15358. style.borderBottomLeftRadius = "3px";
  15359. }
  15360. } else {
  15361. if (this.selected.some((item2) => this.dateSame(item2, date3))) {
  15362. style.borderTopLeftRadius = "3px";
  15363. style.borderBottomLeftRadius = "3px";
  15364. style.borderTopRightRadius = "3px";
  15365. style.borderBottomRightRadius = "3px";
  15366. }
  15367. }
  15368. return style;
  15369. };
  15370. },
  15371. // 某个日期是否被选中
  15372. textStyle() {
  15373. return (item) => {
  15374. const date3 = e$1(item.date).format("YYYY-MM-DD"), style = {};
  15375. if (this.selected.some((item2) => this.dateSame(item2, date3))) {
  15376. style.color = "#ffffff";
  15377. }
  15378. if (this.mode === "range") {
  15379. const len = this.selected.length - 1;
  15380. if (e$1(date3).isAfter(e$1(this.selected[0])) && e$1(date3).isBefore(e$1(this.selected[len]))) {
  15381. style.color = this.color;
  15382. }
  15383. }
  15384. return style;
  15385. };
  15386. },
  15387. // 获取底部的提示文字
  15388. getBottomInfo() {
  15389. return (index1, index2, item) => {
  15390. const date3 = e$1(item.date).format("YYYY-MM-DD");
  15391. const bottomInfo = item.bottomInfo;
  15392. if (this.mode === "range" && this.selected.length > 0) {
  15393. if (this.selected.length === 1) {
  15394. if (this.dateSame(date3, this.selected[0]))
  15395. return this.startText;
  15396. else
  15397. return bottomInfo;
  15398. } else {
  15399. const len = this.selected.length - 1;
  15400. if (this.dateSame(date3, this.selected[0]) && this.dateSame(date3, this.selected[1]) && len === 1) {
  15401. return `${this.startText}/${this.endText}`;
  15402. } else if (this.dateSame(date3, this.selected[0])) {
  15403. return this.startText;
  15404. } else if (this.dateSame(date3, this.selected[len])) {
  15405. return this.endText;
  15406. } else {
  15407. return bottomInfo;
  15408. }
  15409. }
  15410. } else {
  15411. return bottomInfo;
  15412. }
  15413. };
  15414. }
  15415. },
  15416. mounted() {
  15417. this.init();
  15418. },
  15419. emits: ["monthSelected", "updateMonthTop"],
  15420. methods: {
  15421. init() {
  15422. this.$emit("monthSelected", this.selected);
  15423. this.$nextTick(() => {
  15424. sleep(10).then(() => {
  15425. this.getWrapperWidth();
  15426. this.getMonthRect();
  15427. });
  15428. });
  15429. },
  15430. monthTitle(item) {
  15431. if (uni.getLocale() == "zh-Hans" || uni.getLocale() == "zh-Hant") {
  15432. return item.year + "年" + (item.month < 10 ? "0" + item.month : item.month) + "月";
  15433. } else {
  15434. return (item.month < 10 ? "0" + item.month : item.month) + "/" + item.year;
  15435. }
  15436. },
  15437. isForbid(item) {
  15438. let date3 = e$1(item.date).format("YYYY-MM-DD");
  15439. if (this.mode !== "range" && this.forbidDays.includes(date3)) {
  15440. return true;
  15441. }
  15442. return false;
  15443. },
  15444. // 判断两个日期是否相等
  15445. dateSame(date1, date22) {
  15446. return e$1(date1).isSame(e$1(date22));
  15447. },
  15448. // 获取月份数据区域的宽度,因为nvue不支持百分比,所以无法通过css设置每个日期item的宽度
  15449. getWrapperWidth() {
  15450. this.$uGetRect(".u-calendar-month-wrapper").then((size) => {
  15451. this.width = size.width;
  15452. });
  15453. },
  15454. getMonthRect() {
  15455. const promiseAllArr = this.months.map((item, index2) => this.getMonthRectByPromise(
  15456. `u-calendar-month-${index2}`
  15457. ));
  15458. Promise.all(promiseAllArr).then(
  15459. (sizes) => {
  15460. let height = 1;
  15461. const topArr = [];
  15462. for (let i2 = 0; i2 < this.months.length; i2++) {
  15463. topArr[i2] = height;
  15464. height += sizes[i2].height;
  15465. }
  15466. this.$emit("updateMonthTop", topArr);
  15467. }
  15468. );
  15469. },
  15470. // 获取每个月份区域的尺寸
  15471. getMonthRectByPromise(el) {
  15472. return new Promise((resolve) => {
  15473. this.$uGetRect(`.${el}`).then((size) => {
  15474. resolve(size);
  15475. });
  15476. });
  15477. },
  15478. // 点击某一个日期
  15479. clickHandler(index1, index2, item) {
  15480. if (this.readonly) {
  15481. return;
  15482. }
  15483. this.item = item;
  15484. const date3 = e$1(item.date).format("YYYY-MM-DD");
  15485. if (item.disabled)
  15486. return;
  15487. if (this.isForbid(item)) {
  15488. uni.showToast({
  15489. title: this.forbidDaysToast
  15490. });
  15491. return;
  15492. }
  15493. let selected = deepClone(this.selected);
  15494. if (this.mode === "single") {
  15495. selected = [date3];
  15496. } else if (this.mode === "multiple") {
  15497. if (selected.some((item2) => this.dateSame(item2, date3))) {
  15498. const itemIndex = selected.findIndex((item2) => item2 === date3);
  15499. selected.splice(itemIndex, 1);
  15500. } else {
  15501. if (selected.length < this.maxCount)
  15502. selected.push(date3);
  15503. }
  15504. } else {
  15505. if (selected.length === 0 || selected.length >= 2) {
  15506. selected = [date3];
  15507. } else if (selected.length === 1) {
  15508. const existsDate = selected[0];
  15509. if (e$1(date3).isBefore(existsDate)) {
  15510. selected = [date3];
  15511. } else if (e$1(date3).isAfter(existsDate)) {
  15512. if (e$1(e$1(date3).subtract(this.maxRange, "day")).isAfter(e$1(selected[0])) && this.showRangePrompt) {
  15513. if (this.rangePrompt) {
  15514. toast(this.rangePrompt);
  15515. } else {
  15516. toast(t$1("up.calendar.daysExceed", { days: this.maxRange }));
  15517. }
  15518. return;
  15519. }
  15520. selected.push(date3);
  15521. const startDate = selected[0];
  15522. const endDate = selected[1];
  15523. const arr = [];
  15524. let i2 = 0;
  15525. do {
  15526. arr.push(e$1(startDate).add(i2, "day").format("YYYY-MM-DD"));
  15527. i2++;
  15528. } while (e$1(startDate).add(i2, "day").isBefore(e$1(endDate)));
  15529. arr.push(endDate);
  15530. selected = arr;
  15531. } else {
  15532. if (selected[0] === date3 && !this.allowSameDay)
  15533. return;
  15534. selected.push(date3);
  15535. }
  15536. }
  15537. }
  15538. this.setSelected(selected);
  15539. },
  15540. // 设置默认日期
  15541. setDefaultDate() {
  15542. if (!this.defaultDate) {
  15543. const selected = [e$1().format("YYYY-MM-DD")];
  15544. return this.setSelected(selected, false);
  15545. }
  15546. let defaultDate = [];
  15547. const minDate = this.minDate || e$1().format("YYYY-MM-DD");
  15548. const maxDate = this.maxDate || e$1(minDate).add(this.maxMonth - 1, "month").format("YYYY-MM-DD");
  15549. if (this.mode === "single") {
  15550. if (!test.array(this.defaultDate)) {
  15551. defaultDate = [e$1(this.defaultDate).format("YYYY-MM-DD")];
  15552. } else {
  15553. defaultDate = [this.defaultDate[0]];
  15554. }
  15555. } else {
  15556. if (!test.array(this.defaultDate))
  15557. return;
  15558. defaultDate = this.defaultDate;
  15559. }
  15560. defaultDate = defaultDate.filter((item) => {
  15561. return e$1(item).isAfter(e$1(minDate).subtract(1, "day")) && e$1(item).isBefore(e$1(
  15562. maxDate
  15563. ).add(1, "day"));
  15564. });
  15565. this.setSelected(defaultDate, false);
  15566. },
  15567. setSelected(selected, event = true) {
  15568. this.selected = selected;
  15569. event && this.$emit("monthSelected", this.selected, "tap");
  15570. }
  15571. }
  15572. };
  15573. function _sfc_render$1U(_ctx, _cache, $props, $setup, $data, $options) {
  15574. return vue.openBlock(), vue.createElementBlock(
  15575. "view",
  15576. {
  15577. class: "u-calendar-month-wrapper",
  15578. ref: "u-calendar-month-wrapper"
  15579. },
  15580. [
  15581. (vue.openBlock(true), vue.createElementBlock(
  15582. vue.Fragment,
  15583. null,
  15584. vue.renderList($props.months, (item, index2) => {
  15585. return vue.openBlock(), vue.createElementBlock("view", {
  15586. key: index2,
  15587. class: vue.normalizeClass([`u-calendar-month-${index2}`]),
  15588. ref_for: true,
  15589. ref: `u-calendar-month-${index2}`,
  15590. id: `month-${index2}`
  15591. }, [
  15592. index2 !== 0 ? (vue.openBlock(), vue.createElementBlock(
  15593. "text",
  15594. {
  15595. key: 0,
  15596. class: "u-calendar-month__title"
  15597. },
  15598. vue.toDisplayString($options.monthTitle(item)),
  15599. 1
  15600. /* TEXT */
  15601. )) : vue.createCommentVNode("v-if", true),
  15602. vue.createElementVNode("view", { class: "u-calendar-month__days" }, [
  15603. $props.showMark ? (vue.openBlock(), vue.createElementBlock("view", {
  15604. key: 0,
  15605. class: "u-calendar-month__days__month-mark-wrapper"
  15606. }, [
  15607. vue.createElementVNode(
  15608. "text",
  15609. { class: "u-calendar-month__days__month-mark-wrapper__text" },
  15610. vue.toDisplayString(item.month),
  15611. 1
  15612. /* TEXT */
  15613. )
  15614. ])) : vue.createCommentVNode("v-if", true),
  15615. (vue.openBlock(true), vue.createElementBlock(
  15616. vue.Fragment,
  15617. null,
  15618. vue.renderList(item.date, (item1, index1) => {
  15619. return vue.openBlock(), vue.createElementBlock("view", {
  15620. class: vue.normalizeClass(["u-calendar-month__days__day", [item1.selected && "u-calendar-month__days__day__select--selected"]]),
  15621. key: index1,
  15622. style: vue.normalizeStyle([$options.dayStyle(index2, index1, item1)]),
  15623. onClick: ($event) => $options.clickHandler(index2, index1, item1)
  15624. }, [
  15625. vue.createElementVNode(
  15626. "view",
  15627. {
  15628. class: "u-calendar-month__days__day__select",
  15629. style: vue.normalizeStyle([$options.daySelectStyle(index2, index1, item1)])
  15630. },
  15631. [
  15632. vue.createElementVNode(
  15633. "text",
  15634. {
  15635. class: vue.normalizeClass(["u-calendar-month__days__day__select__info", [item1.disabled || $options.isForbid(item1) ? "u-calendar-month__days__day__select__info--disabled" : ""]]),
  15636. style: vue.normalizeStyle([$options.textStyle(item1)])
  15637. },
  15638. vue.toDisplayString(item1.day),
  15639. 7
  15640. /* TEXT, CLASS, STYLE */
  15641. ),
  15642. $options.getBottomInfo(index2, index1, item1) ? (vue.openBlock(), vue.createElementBlock(
  15643. "text",
  15644. {
  15645. key: 0,
  15646. class: vue.normalizeClass(["u-calendar-month__days__day__select__buttom-info", [item1.disabled || $options.isForbid(item1) ? "u-calendar-month__days__day__select__buttom-info--disabled" : ""]]),
  15647. style: vue.normalizeStyle([$options.textStyle(item1)])
  15648. },
  15649. vue.toDisplayString($options.getBottomInfo(index2, index1, item1)),
  15650. 7
  15651. /* TEXT, CLASS, STYLE */
  15652. )) : vue.createCommentVNode("v-if", true),
  15653. item1.dot ? (vue.openBlock(), vue.createElementBlock("text", {
  15654. key: 1,
  15655. class: "u-calendar-month__days__day__select__dot"
  15656. })) : vue.createCommentVNode("v-if", true)
  15657. ],
  15658. 4
  15659. /* STYLE */
  15660. )
  15661. ], 14, ["onClick"]);
  15662. }),
  15663. 128
  15664. /* KEYED_FRAGMENT */
  15665. ))
  15666. ])
  15667. ], 10, ["id"]);
  15668. }),
  15669. 128
  15670. /* KEYED_FRAGMENT */
  15671. ))
  15672. ],
  15673. 512
  15674. /* NEED_PATCH */
  15675. );
  15676. }
  15677. const uMonth = /* @__PURE__ */ _export_sfc(_sfc_main$1V, [["render", _sfc_render$1U], ["__scopeId", "data-v-3c847935"], ["__file", "C:/Users/EDY/Desktop/项目/shuibei/uni_modules/uview-plus/components/u-calendar/month.vue"]]);
  15678. const props$1g = defineMixin({
  15679. props: {
  15680. // 日历顶部标题
  15681. title: {
  15682. type: String,
  15683. default: () => props$1x.calendar.title
  15684. },
  15685. // 是否显示标题
  15686. showTitle: {
  15687. type: Boolean,
  15688. default: () => props$1x.calendar.showTitle
  15689. },
  15690. // 是否显示副标题
  15691. showSubtitle: {
  15692. type: Boolean,
  15693. default: () => props$1x.calendar.showSubtitle
  15694. },
  15695. // 日期类型选择,single-选择单个日期,multiple-可以选择多个日期,range-选择日期范围
  15696. mode: {
  15697. type: String,
  15698. default: () => props$1x.calendar.mode
  15699. },
  15700. // mode=range时,第一个日期底部的提示文字
  15701. startText: {
  15702. type: String,
  15703. default: () => props$1x.calendar.startText
  15704. },
  15705. // mode=range时,最后一个日期底部的提示文字
  15706. endText: {
  15707. type: String,
  15708. default: () => props$1x.calendar.endText
  15709. },
  15710. // 自定义列表
  15711. customList: {
  15712. type: Array,
  15713. default: () => props$1x.calendar.customList
  15714. },
  15715. // 主题色,对底部按钮和选中日期有效
  15716. color: {
  15717. type: String,
  15718. default: () => props$1x.calendar.color
  15719. },
  15720. // 最小的可选日期
  15721. minDate: {
  15722. type: [String, Number],
  15723. default: () => props$1x.calendar.minDate
  15724. },
  15725. // 最大可选日期
  15726. maxDate: {
  15727. type: [String, Number],
  15728. default: () => props$1x.calendar.maxDate
  15729. },
  15730. // 默认选中的日期,mode为multiple或range是必须为数组格式
  15731. defaultDate: {
  15732. type: [Array, String, Date, null],
  15733. default: () => props$1x.calendar.defaultDate
  15734. },
  15735. // mode=multiple时,最多可选多少个日期
  15736. maxCount: {
  15737. type: [String, Number],
  15738. default: () => props$1x.calendar.maxCount
  15739. },
  15740. // 日期行高
  15741. rowHeight: {
  15742. type: [String, Number],
  15743. default: () => props$1x.calendar.rowHeight
  15744. },
  15745. // 日期格式化函数
  15746. formatter: {
  15747. type: [Function, null],
  15748. default: () => props$1x.calendar.formatter
  15749. },
  15750. // 是否显示农历
  15751. showLunar: {
  15752. type: Boolean,
  15753. default: () => props$1x.calendar.showLunar
  15754. },
  15755. // 是否显示月份背景色
  15756. showMark: {
  15757. type: Boolean,
  15758. default: () => props$1x.calendar.showMark
  15759. },
  15760. // 确定按钮的文字
  15761. confirmText: {
  15762. type: String,
  15763. default: () => props$1x.calendar.confirmText
  15764. },
  15765. // 确认按钮处于禁用状态时的文字
  15766. confirmDisabledText: {
  15767. type: String,
  15768. default: () => props$1x.calendar.confirmDisabledText
  15769. },
  15770. // 是否显示日历弹窗
  15771. show: {
  15772. type: Boolean,
  15773. default: () => props$1x.calendar.show
  15774. },
  15775. // 是否允许点击遮罩关闭日历
  15776. closeOnClickOverlay: {
  15777. type: Boolean,
  15778. default: () => props$1x.calendar.closeOnClickOverlay
  15779. },
  15780. // 是否为只读状态,只读状态下禁止选择日期
  15781. readonly: {
  15782. type: Boolean,
  15783. default: () => props$1x.calendar.readonly
  15784. },
  15785. // 是否展示确认按钮
  15786. showConfirm: {
  15787. type: Boolean,
  15788. default: () => props$1x.calendar.showConfirm
  15789. },
  15790. // 日期区间最多可选天数,默认无限制,mode = range时有效
  15791. maxRange: {
  15792. type: [Number, String],
  15793. default: () => props$1x.calendar.maxRange
  15794. },
  15795. // 范围选择超过最多可选天数时的提示文案,mode = range时有效
  15796. rangePrompt: {
  15797. type: String,
  15798. default: () => props$1x.calendar.rangePrompt
  15799. },
  15800. // 范围选择超过最多可选天数时,是否展示提示文案,mode = range时有效
  15801. showRangePrompt: {
  15802. type: Boolean,
  15803. default: () => props$1x.calendar.showRangePrompt
  15804. },
  15805. // 是否允许日期范围的起止时间为同一天,mode = range时有效
  15806. allowSameDay: {
  15807. type: Boolean,
  15808. default: () => props$1x.calendar.allowSameDay
  15809. },
  15810. // 圆角值
  15811. round: {
  15812. type: [Boolean, String, Number],
  15813. default: () => props$1x.calendar.round
  15814. },
  15815. // 最多展示月份数量
  15816. monthNum: {
  15817. type: [Number, String],
  15818. default: 3
  15819. },
  15820. // 星期文案
  15821. weekText: {
  15822. type: Array,
  15823. default: props$1x.calendar.weekText
  15824. },
  15825. forbidDays: {
  15826. type: Array,
  15827. default: props$1x.calendar.forbidDays
  15828. },
  15829. forbidDaysToast: {
  15830. type: String,
  15831. default: props$1x.calendar.forbidDaysToast
  15832. },
  15833. monthFormat: {
  15834. type: String,
  15835. default: props$1x.calendar.monthFormat
  15836. },
  15837. // 是否页面内展示
  15838. pageInline: {
  15839. type: Boolean,
  15840. default: props$1x.calendar.pageInline
  15841. }
  15842. }
  15843. });
  15844. var Calendar = {
  15845. /**
  15846. * 农历1900-2100的润大小信息表
  15847. * @Array Of Property
  15848. * @return Hex
  15849. */
  15850. lunarInfo: [
  15851. 19416,
  15852. 19168,
  15853. 42352,
  15854. 21717,
  15855. 53856,
  15856. 55632,
  15857. 91476,
  15858. 22176,
  15859. 39632,
  15860. 21970,
  15861. // 1900-1909
  15862. 19168,
  15863. 42422,
  15864. 42192,
  15865. 53840,
  15866. 119381,
  15867. 46400,
  15868. 54944,
  15869. 44450,
  15870. 38320,
  15871. 84343,
  15872. // 1910-1919
  15873. 18800,
  15874. 42160,
  15875. 46261,
  15876. 27216,
  15877. 27968,
  15878. 109396,
  15879. 11104,
  15880. 38256,
  15881. 21234,
  15882. 18800,
  15883. // 1920-1929
  15884. 25958,
  15885. 54432,
  15886. 59984,
  15887. 28309,
  15888. 23248,
  15889. 11104,
  15890. 100067,
  15891. 37600,
  15892. 116951,
  15893. 51536,
  15894. // 1930-1939
  15895. 54432,
  15896. 120998,
  15897. 46416,
  15898. 22176,
  15899. 107956,
  15900. 9680,
  15901. 37584,
  15902. 53938,
  15903. 43344,
  15904. 46423,
  15905. // 1940-1949
  15906. 27808,
  15907. 46416,
  15908. 86869,
  15909. 19872,
  15910. 42416,
  15911. 83315,
  15912. 21168,
  15913. 43432,
  15914. 59728,
  15915. 27296,
  15916. // 1950-1959
  15917. 44710,
  15918. 43856,
  15919. 19296,
  15920. 43748,
  15921. 42352,
  15922. 21088,
  15923. 62051,
  15924. 55632,
  15925. 23383,
  15926. 22176,
  15927. // 1960-1969
  15928. 38608,
  15929. 19925,
  15930. 19152,
  15931. 42192,
  15932. 54484,
  15933. 53840,
  15934. 54616,
  15935. 46400,
  15936. 46752,
  15937. 103846,
  15938. // 1970-1979
  15939. 38320,
  15940. 18864,
  15941. 43380,
  15942. 42160,
  15943. 45690,
  15944. 27216,
  15945. 27968,
  15946. 44870,
  15947. 43872,
  15948. 38256,
  15949. // 1980-1989
  15950. 19189,
  15951. 18800,
  15952. 25776,
  15953. 29859,
  15954. 59984,
  15955. 27480,
  15956. 23232,
  15957. 43872,
  15958. 38613,
  15959. 37600,
  15960. // 1990-1999
  15961. 51552,
  15962. 55636,
  15963. 54432,
  15964. 55888,
  15965. 30034,
  15966. 22176,
  15967. 43959,
  15968. 9680,
  15969. 37584,
  15970. 51893,
  15971. // 2000-2009
  15972. 43344,
  15973. 46240,
  15974. 47780,
  15975. 44368,
  15976. 21977,
  15977. 19360,
  15978. 42416,
  15979. 86390,
  15980. 21168,
  15981. 43312,
  15982. // 2010-2019
  15983. 31060,
  15984. 27296,
  15985. 44368,
  15986. 23378,
  15987. 19296,
  15988. 42726,
  15989. 42208,
  15990. 53856,
  15991. 60005,
  15992. 54576,
  15993. // 2020-2029
  15994. 23200,
  15995. 30371,
  15996. 38608,
  15997. 19195,
  15998. 19152,
  15999. 42192,
  16000. 118966,
  16001. 53840,
  16002. 54560,
  16003. 56645,
  16004. // 2030-2039
  16005. 46496,
  16006. 22224,
  16007. 21938,
  16008. 18864,
  16009. 42359,
  16010. 42160,
  16011. 43600,
  16012. 111189,
  16013. 27936,
  16014. 44448,
  16015. // 2040-2049
  16016. /** Add By JJonline@JJonline.Cn**/
  16017. 84835,
  16018. 37744,
  16019. 18936,
  16020. 18800,
  16021. 25776,
  16022. 92326,
  16023. 59984,
  16024. 27424,
  16025. 108228,
  16026. 43744,
  16027. // 2050-2059
  16028. 41696,
  16029. 53987,
  16030. 51552,
  16031. 54615,
  16032. 54432,
  16033. 55888,
  16034. 23893,
  16035. 22176,
  16036. 42704,
  16037. 21972,
  16038. // 2060-2069
  16039. 21200,
  16040. 43448,
  16041. 43344,
  16042. 46240,
  16043. 46758,
  16044. 44368,
  16045. 21920,
  16046. 43940,
  16047. 42416,
  16048. 21168,
  16049. // 2070-2079
  16050. 45683,
  16051. 26928,
  16052. 29495,
  16053. 27296,
  16054. 44368,
  16055. 84821,
  16056. 19296,
  16057. 42352,
  16058. 21732,
  16059. 53600,
  16060. // 2080-2089
  16061. 59752,
  16062. 54560,
  16063. 55968,
  16064. 92838,
  16065. 22224,
  16066. 19168,
  16067. 43476,
  16068. 41680,
  16069. 53584,
  16070. 62034,
  16071. // 2090-2099
  16072. 54560
  16073. ],
  16074. // 2100
  16075. /**
  16076. * 公历每个月份的天数普通表
  16077. * @Array Of Property
  16078. * @return Number
  16079. */
  16080. solarMonth: [31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31],
  16081. /**
  16082. * 天干地支之天干速查表
  16083. * @Array Of Property trans["甲","乙","丙","丁","戊","己","庚","辛","壬","癸"]
  16084. * @return Cn string
  16085. */
  16086. Gan: ["甲", "乙", "丙", "丁", "戊", "己", "庚", "辛", "壬", "癸"],
  16087. /**
  16088. * 天干地支之地支速查表
  16089. * @Array Of Property
  16090. * @trans["子","丑","寅","卯","辰","巳","午","未","申","酉","戌","亥"]
  16091. * @return Cn string
  16092. */
  16093. Zhi: ["子", "丑", "寅", "卯", "辰", "巳", "午", "未", "申", "酉", "戌", "亥"],
  16094. /**
  16095. * 天干地支之地支速查表<=>生肖
  16096. * @Array Of Property
  16097. * @trans["鼠","牛","虎","兔","龙","蛇","马","羊","猴","鸡","狗","猪"]
  16098. * @return Cn string
  16099. */
  16100. Animals: ["鼠", "牛", "虎", "兔", "龙", "蛇", "马", "羊", "猴", "鸡", "狗", "猪"],
  16101. /**
  16102. * 24节气速查表
  16103. * @Array Of Property
  16104. * @trans["小寒","大寒","立春","雨水","惊蛰","春分","清明","谷雨","立夏","小满","芒种","夏至","小暑","大暑","立秋","处暑","白露","秋分","寒露","霜降","立冬","小雪","大雪","冬至"]
  16105. * @return Cn string
  16106. */
  16107. solarTerm: ["小寒", "大寒", "立春", "雨水", "惊蛰", "春分", "清明", "谷雨", "立夏", "小满", "芒种", "夏至", "小暑", "大暑", "立秋", "处暑", "白露", "秋分", "寒露", "霜降", "立冬", "小雪", "大雪", "冬至"],
  16108. /**
  16109. * 1900-2100各年的24节气日期速查表
  16110. * @Array Of Property
  16111. * @return 0x string For splice
  16112. */
  16113. sTermInfo: [
  16114. "9778397bd097c36b0b6fc9274c91aa",
  16115. "97b6b97bd19801ec9210c965cc920e",
  16116. "97bcf97c3598082c95f8c965cc920f",
  16117. "97bd0b06bdb0722c965ce1cfcc920f",
  16118. "b027097bd097c36b0b6fc9274c91aa",
  16119. "97b6b97bd19801ec9210c965cc920e",
  16120. "97bcf97c359801ec95f8c965cc920f",
  16121. "97bd0b06bdb0722c965ce1cfcc920f",
  16122. "b027097bd097c36b0b6fc9274c91aa",
  16123. "97b6b97bd19801ec9210c965cc920e",
  16124. "97bcf97c359801ec95f8c965cc920f",
  16125. "97bd0b06bdb0722c965ce1cfcc920f",
  16126. "b027097bd097c36b0b6fc9274c91aa",
  16127. "9778397bd19801ec9210c965cc920e",
  16128. "97b6b97bd19801ec95f8c965cc920f",
  16129. "97bd09801d98082c95f8e1cfcc920f",
  16130. "97bd097bd097c36b0b6fc9210c8dc2",
  16131. "9778397bd197c36c9210c9274c91aa",
  16132. "97b6b97bd19801ec95f8c965cc920e",
  16133. "97bd09801d98082c95f8e1cfcc920f",
  16134. "97bd097bd097c36b0b6fc9210c8dc2",
  16135. "9778397bd097c36c9210c9274c91aa",
  16136. "97b6b97bd19801ec95f8c965cc920e",
  16137. "97bcf97c3598082c95f8e1cfcc920f",
  16138. "97bd097bd097c36b0b6fc9210c8dc2",
  16139. "9778397bd097c36c9210c9274c91aa",
  16140. "97b6b97bd19801ec9210c965cc920e",
  16141. "97bcf97c3598082c95f8c965cc920f",
  16142. "97bd097bd097c35b0b6fc920fb0722",
  16143. "9778397bd097c36b0b6fc9274c91aa",
  16144. "97b6b97bd19801ec9210c965cc920e",
  16145. "97bcf97c3598082c95f8c965cc920f",
  16146. "97bd097bd097c35b0b6fc920fb0722",
  16147. "9778397bd097c36b0b6fc9274c91aa",
  16148. "97b6b97bd19801ec9210c965cc920e",
  16149. "97bcf97c359801ec95f8c965cc920f",
  16150. "97bd097bd097c35b0b6fc920fb0722",
  16151. "9778397bd097c36b0b6fc9274c91aa",
  16152. "97b6b97bd19801ec9210c965cc920e",
  16153. "97bcf97c359801ec95f8c965cc920f",
  16154. "97bd097bd097c35b0b6fc920fb0722",
  16155. "9778397bd097c36b0b6fc9274c91aa",
  16156. "97b6b97bd19801ec9210c965cc920e",
  16157. "97bcf97c359801ec95f8c965cc920f",
  16158. "97bd097bd07f595b0b6fc920fb0722",
  16159. "9778397bd097c36b0b6fc9210c8dc2",
  16160. "9778397bd19801ec9210c9274c920e",
  16161. "97b6b97bd19801ec95f8c965cc920f",
  16162. "97bd07f5307f595b0b0bc920fb0722",
  16163. "7f0e397bd097c36b0b6fc9210c8dc2",
  16164. "9778397bd097c36c9210c9274c920e",
  16165. "97b6b97bd19801ec95f8c965cc920f",
  16166. "97bd07f5307f595b0b0bc920fb0722",
  16167. "7f0e397bd097c36b0b6fc9210c8dc2",
  16168. "9778397bd097c36c9210c9274c91aa",
  16169. "97b6b97bd19801ec9210c965cc920e",
  16170. "97bd07f1487f595b0b0bc920fb0722",
  16171. "7f0e397bd097c36b0b6fc9210c8dc2",
  16172. "9778397bd097c36b0b6fc9274c91aa",
  16173. "97b6b97bd19801ec9210c965cc920e",
  16174. "97bcf7f1487f595b0b0bb0b6fb0722",
  16175. "7f0e397bd097c35b0b6fc920fb0722",
  16176. "9778397bd097c36b0b6fc9274c91aa",
  16177. "97b6b97bd19801ec9210c965cc920e",
  16178. "97bcf7f1487f595b0b0bb0b6fb0722",
  16179. "7f0e397bd097c35b0b6fc920fb0722",
  16180. "9778397bd097c36b0b6fc9274c91aa",
  16181. "97b6b97bd19801ec9210c965cc920e",
  16182. "97bcf7f1487f531b0b0bb0b6fb0722",
  16183. "7f0e397bd097c35b0b6fc920fb0722",
  16184. "9778397bd097c36b0b6fc9274c91aa",
  16185. "97b6b97bd19801ec9210c965cc920e",
  16186. "97bcf7f1487f531b0b0bb0b6fb0722",
  16187. "7f0e397bd07f595b0b6fc920fb0722",
  16188. "9778397bd097c36b0b6fc9274c91aa",
  16189. "97b6b97bd19801ec9210c9274c920e",
  16190. "97bcf7f0e47f531b0b0bb0b6fb0722",
  16191. "7f0e397bd07f595b0b0bc920fb0722",
  16192. "9778397bd097c36b0b6fc9210c91aa",
  16193. "97b6b97bd197c36c9210c9274c920e",
  16194. "97bcf7f0e47f531b0b0bb0b6fb0722",
  16195. "7f0e397bd07f595b0b0bc920fb0722",
  16196. "9778397bd097c36b0b6fc9210c8dc2",
  16197. "9778397bd097c36c9210c9274c920e",
  16198. "97b6b7f0e47f531b0723b0b6fb0722",
  16199. "7f0e37f5307f595b0b0bc920fb0722",
  16200. "7f0e397bd097c36b0b6fc9210c8dc2",
  16201. "9778397bd097c36b0b70c9274c91aa",
  16202. "97b6b7f0e47f531b0723b0b6fb0721",
  16203. "7f0e37f1487f595b0b0bb0b6fb0722",
  16204. "7f0e397bd097c35b0b6fc9210c8dc2",
  16205. "9778397bd097c36b0b6fc9274c91aa",
  16206. "97b6b7f0e47f531b0723b0b6fb0721",
  16207. "7f0e27f1487f595b0b0bb0b6fb0722",
  16208. "7f0e397bd097c35b0b6fc920fb0722",
  16209. "9778397bd097c36b0b6fc9274c91aa",
  16210. "97b6b7f0e47f531b0723b0b6fb0721",
  16211. "7f0e27f1487f531b0b0bb0b6fb0722",
  16212. "7f0e397bd097c35b0b6fc920fb0722",
  16213. "9778397bd097c36b0b6fc9274c91aa",
  16214. "97b6b7f0e47f531b0723b0b6fb0721",
  16215. "7f0e27f1487f531b0b0bb0b6fb0722",
  16216. "7f0e397bd097c35b0b6fc920fb0722",
  16217. "9778397bd097c36b0b6fc9274c91aa",
  16218. "97b6b7f0e47f531b0723b0b6fb0721",
  16219. "7f0e27f1487f531b0b0bb0b6fb0722",
  16220. "7f0e397bd07f595b0b0bc920fb0722",
  16221. "9778397bd097c36b0b6fc9274c91aa",
  16222. "97b6b7f0e47f531b0723b0787b0721",
  16223. "7f0e27f0e47f531b0b0bb0b6fb0722",
  16224. "7f0e397bd07f595b0b0bc920fb0722",
  16225. "9778397bd097c36b0b6fc9210c91aa",
  16226. "97b6b7f0e47f149b0723b0787b0721",
  16227. "7f0e27f0e47f531b0723b0b6fb0722",
  16228. "7f0e397bd07f595b0b0bc920fb0722",
  16229. "9778397bd097c36b0b6fc9210c8dc2",
  16230. "977837f0e37f149b0723b0787b0721",
  16231. "7f07e7f0e47f531b0723b0b6fb0722",
  16232. "7f0e37f5307f595b0b0bc920fb0722",
  16233. "7f0e397bd097c35b0b6fc9210c8dc2",
  16234. "977837f0e37f14998082b0787b0721",
  16235. "7f07e7f0e47f531b0723b0b6fb0721",
  16236. "7f0e37f1487f595b0b0bb0b6fb0722",
  16237. "7f0e397bd097c35b0b6fc9210c8dc2",
  16238. "977837f0e37f14998082b0787b06bd",
  16239. "7f07e7f0e47f531b0723b0b6fb0721",
  16240. "7f0e27f1487f531b0b0bb0b6fb0722",
  16241. "7f0e397bd097c35b0b6fc920fb0722",
  16242. "977837f0e37f14998082b0787b06bd",
  16243. "7f07e7f0e47f531b0723b0b6fb0721",
  16244. "7f0e27f1487f531b0b0bb0b6fb0722",
  16245. "7f0e397bd097c35b0b6fc920fb0722",
  16246. "977837f0e37f14998082b0787b06bd",
  16247. "7f07e7f0e47f531b0723b0b6fb0721",
  16248. "7f0e27f1487f531b0b0bb0b6fb0722",
  16249. "7f0e397bd07f595b0b0bc920fb0722",
  16250. "977837f0e37f14998082b0787b06bd",
  16251. "7f07e7f0e47f531b0723b0b6fb0721",
  16252. "7f0e27f1487f531b0b0bb0b6fb0722",
  16253. "7f0e397bd07f595b0b0bc920fb0722",
  16254. "977837f0e37f14998082b0787b06bd",
  16255. "7f07e7f0e47f149b0723b0787b0721",
  16256. "7f0e27f0e47f531b0b0bb0b6fb0722",
  16257. "7f0e397bd07f595b0b0bc920fb0722",
  16258. "977837f0e37f14998082b0723b06bd",
  16259. "7f07e7f0e37f149b0723b0787b0721",
  16260. "7f0e27f0e47f531b0723b0b6fb0722",
  16261. "7f0e397bd07f595b0b0bc920fb0722",
  16262. "977837f0e37f14898082b0723b02d5",
  16263. "7ec967f0e37f14998082b0787b0721",
  16264. "7f07e7f0e47f531b0723b0b6fb0722",
  16265. "7f0e37f1487f595b0b0bb0b6fb0722",
  16266. "7f0e37f0e37f14898082b0723b02d5",
  16267. "7ec967f0e37f14998082b0787b0721",
  16268. "7f07e7f0e47f531b0723b0b6fb0722",
  16269. "7f0e37f1487f531b0b0bb0b6fb0722",
  16270. "7f0e37f0e37f14898082b0723b02d5",
  16271. "7ec967f0e37f14998082b0787b06bd",
  16272. "7f07e7f0e47f531b0723b0b6fb0721",
  16273. "7f0e37f1487f531b0b0bb0b6fb0722",
  16274. "7f0e37f0e37f14898082b072297c35",
  16275. "7ec967f0e37f14998082b0787b06bd",
  16276. "7f07e7f0e47f531b0723b0b6fb0721",
  16277. "7f0e27f1487f531b0b0bb0b6fb0722",
  16278. "7f0e37f0e37f14898082b072297c35",
  16279. "7ec967f0e37f14998082b0787b06bd",
  16280. "7f07e7f0e47f531b0723b0b6fb0721",
  16281. "7f0e27f1487f531b0b0bb0b6fb0722",
  16282. "7f0e37f0e366aa89801eb072297c35",
  16283. "7ec967f0e37f14998082b0787b06bd",
  16284. "7f07e7f0e47f149b0723b0787b0721",
  16285. "7f0e27f1487f531b0b0bb0b6fb0722",
  16286. "7f0e37f0e366aa89801eb072297c35",
  16287. "7ec967f0e37f14998082b0723b06bd",
  16288. "7f07e7f0e47f149b0723b0787b0721",
  16289. "7f0e27f0e47f531b0723b0b6fb0722",
  16290. "7f0e37f0e366aa89801eb072297c35",
  16291. "7ec967f0e37f14998082b0723b06bd",
  16292. "7f07e7f0e37f14998083b0787b0721",
  16293. "7f0e27f0e47f531b0723b0b6fb0722",
  16294. "7f0e37f0e366aa89801eb072297c35",
  16295. "7ec967f0e37f14898082b0723b02d5",
  16296. "7f07e7f0e37f14998082b0787b0721",
  16297. "7f07e7f0e47f531b0723b0b6fb0722",
  16298. "7f0e36665b66aa89801e9808297c35",
  16299. "665f67f0e37f14898082b0723b02d5",
  16300. "7ec967f0e37f14998082b0787b0721",
  16301. "7f07e7f0e47f531b0723b0b6fb0722",
  16302. "7f0e36665b66a449801e9808297c35",
  16303. "665f67f0e37f14898082b0723b02d5",
  16304. "7ec967f0e37f14998082b0787b06bd",
  16305. "7f07e7f0e47f531b0723b0b6fb0721",
  16306. "7f0e36665b66a449801e9808297c35",
  16307. "665f67f0e37f14898082b072297c35",
  16308. "7ec967f0e37f14998082b0787b06bd",
  16309. "7f07e7f0e47f531b0723b0b6fb0721",
  16310. "7f0e26665b66a449801e9808297c35",
  16311. "665f67f0e37f1489801eb072297c35",
  16312. "7ec967f0e37f14998082b0787b06bd",
  16313. "7f07e7f0e47f531b0723b0b6fb0721",
  16314. "7f0e27f1487f531b0b0bb0b6fb0722"
  16315. ],
  16316. /**
  16317. * 数字转中文速查表
  16318. * @Array Of Property
  16319. * @trans ['日','一','二','三','四','五','六','七','八','九','十']
  16320. * @return Cn string
  16321. */
  16322. nStr1: ["日", "一", "二", "三", "四", "五", "六", "七", "八", "九", "十"],
  16323. /**
  16324. * 日期转农历称呼速查表
  16325. * @Array Of Property
  16326. * @trans ['初','十','廿','卅']
  16327. * @return Cn string
  16328. */
  16329. nStr2: ["初", "十", "廿", "卅"],
  16330. /**
  16331. * 月份转农历称呼速查表
  16332. * @Array Of Property
  16333. * @trans ['正','一','二','三','四','五','六','七','八','九','十','冬','腊']
  16334. * @return Cn string
  16335. */
  16336. nStr3: ["正", "二", "三", "四", "五", "六", "七", "八", "九", "十", "冬", "腊"],
  16337. /**
  16338. * 返回农历y年一整年的总天数
  16339. * @param lunar Year
  16340. * @return Number
  16341. * @eg:var count = calendar.lYearDays(1987) ;//count=387
  16342. */
  16343. lYearDays: function(y2) {
  16344. var i2;
  16345. var sum = 348;
  16346. for (i2 = 32768; i2 > 8; i2 >>= 1) {
  16347. sum += this.lunarInfo[y2 - 1900] & i2 ? 1 : 0;
  16348. }
  16349. return sum + this.leapDays(y2);
  16350. },
  16351. /**
  16352. * 返回农历y年闰月是哪个月;若y年没有闰月 则返回0
  16353. * @param lunar Year
  16354. * @return Number (0-12)
  16355. * @eg:var leapMonth = calendar.leapMonth(1987) ;//leapMonth=6
  16356. */
  16357. leapMonth: function(y2) {
  16358. return this.lunarInfo[y2 - 1900] & 15;
  16359. },
  16360. /**
  16361. * 返回农历y年闰月的天数 若该年没有闰月则返回0
  16362. * @param lunar Year
  16363. * @return Number (0、29、30)
  16364. * @eg:var leapMonthDay = calendar.leapDays(1987) ;//leapMonthDay=29
  16365. */
  16366. leapDays: function(y2) {
  16367. if (this.leapMonth(y2)) {
  16368. return this.lunarInfo[y2 - 1900] & 65536 ? 30 : 29;
  16369. }
  16370. return 0;
  16371. },
  16372. /**
  16373. * 返回农历y年m月(非闰月)的总天数,计算m为闰月时的天数请使用leapDays方法
  16374. * @param lunar Year
  16375. * @return Number (-1、29、30)
  16376. * @eg:var MonthDay = calendar.monthDays(1987,9) ;//MonthDay=29
  16377. */
  16378. monthDays: function(y2, m2) {
  16379. if (m2 > 12 || m2 < 1) {
  16380. return -1;
  16381. }
  16382. return this.lunarInfo[y2 - 1900] & 65536 >> m2 ? 30 : 29;
  16383. },
  16384. /**
  16385. * 返回公历(!)y年m月的天数
  16386. * @param solar Year
  16387. * @return Number (-1、28、29、30、31)
  16388. * @eg:var solarMonthDay = calendar.leapDays(1987) ;//solarMonthDay=30
  16389. */
  16390. solarDays: function(y2, m2) {
  16391. if (m2 > 12 || m2 < 1) {
  16392. return -1;
  16393. }
  16394. var ms = m2 - 1;
  16395. if (ms == 1) {
  16396. return y2 % 4 == 0 && y2 % 100 != 0 || y2 % 400 == 0 ? 29 : 28;
  16397. } else {
  16398. return this.solarMonth[ms];
  16399. }
  16400. },
  16401. /**
  16402. * 农历年份转换为干支纪年
  16403. * @param lYear 农历年的年份数
  16404. * @return Cn string
  16405. */
  16406. toGanZhiYear: function(lYear) {
  16407. var ganKey = (lYear - 3) % 10;
  16408. var zhiKey = (lYear - 3) % 12;
  16409. if (ganKey == 0)
  16410. ganKey = 10;
  16411. if (zhiKey == 0)
  16412. zhiKey = 12;
  16413. return this.Gan[ganKey - 1] + this.Zhi[zhiKey - 1];
  16414. },
  16415. /**
  16416. * 公历月、日判断所属星座
  16417. * @param cMonth [description]
  16418. * @param cDay [description]
  16419. * @return Cn string
  16420. */
  16421. toAstro: function(cMonth, cDay) {
  16422. var s2 = "魔羯水瓶双鱼白羊金牛双子巨蟹狮子处女天秤天蝎射手魔羯";
  16423. var arr = [20, 19, 21, 21, 21, 22, 23, 23, 23, 23, 22, 22];
  16424. return s2.substr(cMonth * 2 - (cDay < arr[cMonth - 1] ? 2 : 0), 2) + "座";
  16425. },
  16426. /**
  16427. * 传入offset偏移量返回干支
  16428. * @param offset 相对甲子的偏移量
  16429. * @return Cn string
  16430. */
  16431. toGanZhi: function(offset) {
  16432. return this.Gan[offset % 10] + this.Zhi[offset % 12];
  16433. },
  16434. /**
  16435. * 传入公历(!)y年获得该年第n个节气的公历日期
  16436. * @param y公历年(1900-2100);n二十四节气中的第几个节气(1~24);从n=1(小寒)算起
  16437. * @return day Number
  16438. * @eg:var _24 = calendar.getTerm(1987,3) ;//_24=4;意即1987年2月4日立春
  16439. */
  16440. getTerm: function(y2, n2) {
  16441. if (y2 < 1900 || y2 > 2100) {
  16442. return -1;
  16443. }
  16444. if (n2 < 1 || n2 > 24) {
  16445. return -1;
  16446. }
  16447. var _table = this.sTermInfo[y2 - 1900];
  16448. var _info = [
  16449. parseInt("0x" + _table.substr(0, 5)).toString(),
  16450. parseInt("0x" + _table.substr(5, 5)).toString(),
  16451. parseInt("0x" + _table.substr(10, 5)).toString(),
  16452. parseInt("0x" + _table.substr(15, 5)).toString(),
  16453. parseInt("0x" + _table.substr(20, 5)).toString(),
  16454. parseInt("0x" + _table.substr(25, 5)).toString()
  16455. ];
  16456. var _calday = [
  16457. _info[0].substr(0, 1),
  16458. _info[0].substr(1, 2),
  16459. _info[0].substr(3, 1),
  16460. _info[0].substr(4, 2),
  16461. _info[1].substr(0, 1),
  16462. _info[1].substr(1, 2),
  16463. _info[1].substr(3, 1),
  16464. _info[1].substr(4, 2),
  16465. _info[2].substr(0, 1),
  16466. _info[2].substr(1, 2),
  16467. _info[2].substr(3, 1),
  16468. _info[2].substr(4, 2),
  16469. _info[3].substr(0, 1),
  16470. _info[3].substr(1, 2),
  16471. _info[3].substr(3, 1),
  16472. _info[3].substr(4, 2),
  16473. _info[4].substr(0, 1),
  16474. _info[4].substr(1, 2),
  16475. _info[4].substr(3, 1),
  16476. _info[4].substr(4, 2),
  16477. _info[5].substr(0, 1),
  16478. _info[5].substr(1, 2),
  16479. _info[5].substr(3, 1),
  16480. _info[5].substr(4, 2)
  16481. ];
  16482. return parseInt(_calday[n2 - 1]);
  16483. },
  16484. /**
  16485. * 传入农历数字月份返回汉语通俗表示法
  16486. * @param lunar month
  16487. * @return Cn string
  16488. * @eg:var cnMonth = calendar.toChinaMonth(12) ;//cnMonth='腊月'
  16489. */
  16490. toChinaMonth: function(m2) {
  16491. if (m2 > 12 || m2 < 1) {
  16492. return -1;
  16493. }
  16494. var s2 = this.nStr3[m2 - 1];
  16495. s2 += "月";
  16496. return s2;
  16497. },
  16498. /**
  16499. * 传入农历日期数字返回汉字表示法
  16500. * @param lunar day
  16501. * @return Cn string
  16502. * @eg:var cnDay = calendar.toChinaDay(21) ;//cnMonth='廿一'
  16503. */
  16504. toChinaDay: function(d2) {
  16505. var s2;
  16506. switch (d2) {
  16507. case 10:
  16508. s2 = "初十";
  16509. break;
  16510. case 20:
  16511. s2 = "二十";
  16512. break;
  16513. case 30:
  16514. s2 = "三十";
  16515. break;
  16516. default:
  16517. s2 = this.nStr2[Math.floor(d2 / 10)];
  16518. s2 += this.nStr1[d2 % 10];
  16519. }
  16520. return s2;
  16521. },
  16522. /**
  16523. * 年份转生肖[!仅能大致转换] => 精确划分生肖分界线是“立春”
  16524. * @param y year
  16525. * @return Cn string
  16526. * @eg:var animal = calendar.getAnimal(1987) ;//animal='兔'
  16527. */
  16528. getAnimal: function(y2) {
  16529. return this.Animals[(y2 - 4) % 12];
  16530. },
  16531. /**
  16532. * 传入阳历年月日获得详细的公历、农历object信息 <=>JSON
  16533. * @param y solar year
  16534. * @param m solar month
  16535. * @param d solar day
  16536. * @return JSON object
  16537. * @eg:__f__('log','at uni_modules/uview-plus/libs/util/calendar.js:381',calendar.solar2lunar(1987,11,01));
  16538. */
  16539. solar2lunar: function(y2, m2, d2) {
  16540. if (y2 < 1900 || y2 > 2100) {
  16541. return -1;
  16542. }
  16543. if (y2 == 1900 && m2 == 1 && d2 < 31) {
  16544. return -1;
  16545. }
  16546. if (!y2) {
  16547. var objDate = /* @__PURE__ */ new Date();
  16548. } else {
  16549. var objDate = new Date(y2, parseInt(m2) - 1, d2);
  16550. }
  16551. var i2;
  16552. var leap = 0;
  16553. var temp = 0;
  16554. var y2 = objDate.getFullYear();
  16555. var m2 = objDate.getMonth() + 1;
  16556. var d2 = objDate.getDate();
  16557. var offset = (Date.UTC(objDate.getFullYear(), objDate.getMonth(), objDate.getDate()) - Date.UTC(1900, 0, 31)) / 864e5;
  16558. for (i2 = 1900; i2 < 2101 && offset > 0; i2++) {
  16559. temp = this.lYearDays(i2);
  16560. offset -= temp;
  16561. }
  16562. if (offset < 0) {
  16563. offset += temp;
  16564. i2--;
  16565. }
  16566. var isTodayObj = /* @__PURE__ */ new Date();
  16567. var isToday = false;
  16568. if (isTodayObj.getFullYear() == y2 && isTodayObj.getMonth() + 1 == m2 && isTodayObj.getDate() == d2) {
  16569. isToday = true;
  16570. }
  16571. var nWeek = objDate.getDay();
  16572. var cWeek = this.nStr1[nWeek];
  16573. if (nWeek == 0) {
  16574. nWeek = 7;
  16575. }
  16576. var year = i2;
  16577. var leap = this.leapMonth(i2);
  16578. var isLeap = false;
  16579. for (i2 = 1; i2 < 13 && offset > 0; i2++) {
  16580. if (leap > 0 && i2 == leap + 1 && isLeap == false) {
  16581. --i2;
  16582. isLeap = true;
  16583. temp = this.leapDays(year);
  16584. } else {
  16585. temp = this.monthDays(year, i2);
  16586. }
  16587. if (isLeap == true && i2 == leap + 1) {
  16588. isLeap = false;
  16589. }
  16590. offset -= temp;
  16591. }
  16592. if (offset == 0 && leap > 0 && i2 == leap + 1) {
  16593. if (isLeap) {
  16594. isLeap = false;
  16595. } else {
  16596. isLeap = true;
  16597. --i2;
  16598. }
  16599. }
  16600. if (offset < 0) {
  16601. offset += temp;
  16602. --i2;
  16603. }
  16604. var month = i2;
  16605. var day = offset + 1;
  16606. var sm = m2 - 1;
  16607. var gzY = this.toGanZhiYear(year);
  16608. var firstNode = this.getTerm(y2, m2 * 2 - 1);
  16609. var secondNode = this.getTerm(y2, m2 * 2);
  16610. var gzM = this.toGanZhi((y2 - 1900) * 12 + m2 + 11);
  16611. if (d2 >= firstNode) {
  16612. gzM = this.toGanZhi((y2 - 1900) * 12 + m2 + 12);
  16613. }
  16614. var isTerm = false;
  16615. var Term = null;
  16616. if (firstNode == d2) {
  16617. isTerm = true;
  16618. Term = this.solarTerm[m2 * 2 - 2];
  16619. }
  16620. if (secondNode == d2) {
  16621. isTerm = true;
  16622. Term = this.solarTerm[m2 * 2 - 1];
  16623. }
  16624. var dayCyclical = Date.UTC(y2, sm, 1, 0, 0, 0, 0) / 864e5 + 25567 + 10;
  16625. var gzD = this.toGanZhi(dayCyclical + d2 - 1);
  16626. var astro = this.toAstro(m2, d2);
  16627. return { "lYear": year, "lMonth": month, "lDay": day, "Animal": this.getAnimal(year), "IMonthCn": (isLeap ? "闰" : "") + this.toChinaMonth(month), "IDayCn": this.toChinaDay(day), "cYear": y2, "cMonth": m2, "cDay": d2, "gzYear": gzY, "gzMonth": gzM, "gzDay": gzD, "isToday": isToday, "isLeap": isLeap, "nWeek": nWeek, "ncWeek": "星期" + cWeek, "isTerm": isTerm, "Term": Term, "astro": astro };
  16628. },
  16629. /**
  16630. * 传入农历年月日以及传入的月份是否闰月获得详细的公历、农历object信息 <=>JSON
  16631. * @param y lunar year
  16632. * @param m lunar month
  16633. * @param d lunar day
  16634. * @param isLeapMonth lunar month is leap or not.[如果是农历闰月第四个参数赋值true即可]
  16635. * @return JSON object
  16636. * @eg:__f__('log','at uni_modules/uview-plus/libs/util/calendar.js:500',calendar.lunar2solar(1987,9,10));
  16637. */
  16638. lunar2solar: function(y2, m2, d2, isLeapMonth) {
  16639. var isLeapMonth = !!isLeapMonth;
  16640. var leapMonth = this.leapMonth(y2);
  16641. this.leapDays(y2);
  16642. if (isLeapMonth && leapMonth != m2) {
  16643. return -1;
  16644. }
  16645. if (y2 == 2100 && m2 == 12 && d2 > 1 || y2 == 1900 && m2 == 1 && d2 < 31) {
  16646. return -1;
  16647. }
  16648. var day = this.monthDays(y2, m2);
  16649. var _day = day;
  16650. if (isLeapMonth) {
  16651. _day = this.leapDays(y2, m2);
  16652. }
  16653. if (y2 < 1900 || y2 > 2100 || d2 > _day) {
  16654. return -1;
  16655. }
  16656. var offset = 0;
  16657. for (var i2 = 1900; i2 < y2; i2++) {
  16658. offset += this.lYearDays(i2);
  16659. }
  16660. var leap = 0;
  16661. var isAdd = false;
  16662. for (var i2 = 1; i2 < m2; i2++) {
  16663. leap = this.leapMonth(y2);
  16664. if (!isAdd) {
  16665. if (leap <= i2 && leap > 0) {
  16666. offset += this.leapDays(y2);
  16667. isAdd = true;
  16668. }
  16669. }
  16670. offset += this.monthDays(y2, i2);
  16671. }
  16672. if (isLeapMonth) {
  16673. offset += day;
  16674. }
  16675. var stmap = Date.UTC(1900, 1, 30, 0, 0, 0);
  16676. var calObj = new Date((offset + d2 - 31) * 864e5 + stmap);
  16677. var cY = calObj.getUTCFullYear();
  16678. var cM = calObj.getUTCMonth() + 1;
  16679. var cD = calObj.getUTCDate();
  16680. return this.solar2lunar(cY, cM, cD);
  16681. }
  16682. };
  16683. const _sfc_main$1U = {
  16684. name: "u-calendar",
  16685. mixins: [mpMixin, mixin, props$1g],
  16686. components: {
  16687. uHeader,
  16688. uMonth
  16689. },
  16690. data() {
  16691. return {
  16692. // 需要显示的月份的数组
  16693. months: [],
  16694. // 在月份滚动区域中,当前视图中月份的index索引
  16695. monthIndex: 0,
  16696. // 月份滚动区域的高度
  16697. listHeight: 0,
  16698. // month组件中选择的日期数组
  16699. selected: [],
  16700. scrollIntoView: "",
  16701. scrollIntoViewScroll: "",
  16702. scrollTop: 0,
  16703. // 过滤处理方法
  16704. innerFormatter: (value2) => value2
  16705. };
  16706. },
  16707. watch: {
  16708. scrollIntoView: {
  16709. immediate: true,
  16710. handler(n2) {
  16711. }
  16712. },
  16713. selectedChange: {
  16714. immediate: true,
  16715. handler(n2) {
  16716. this.setMonth();
  16717. }
  16718. },
  16719. // 打开弹窗时,设置月份数据
  16720. show: {
  16721. immediate: true,
  16722. handler(n2) {
  16723. if (n2) {
  16724. this.setMonth();
  16725. } else {
  16726. this.scrollIntoView = "";
  16727. }
  16728. }
  16729. }
  16730. },
  16731. computed: {
  16732. // 由于maxDate和minDate可以为字符串(2021-10-10),或者数值(时间戳),但是dayjs如果接受字符串形式的时间戳会有问题,这里进行处理
  16733. innerMaxDate() {
  16734. return test.number(this.maxDate) ? Number(this.maxDate) : this.maxDate;
  16735. },
  16736. innerMinDate() {
  16737. return test.number(this.minDate) ? Number(this.minDate) : this.minDate;
  16738. },
  16739. // 多个条件的变化,会引起选中日期的变化,这里统一管理监听
  16740. selectedChange() {
  16741. return [this.innerMinDate, this.innerMaxDate, this.defaultDate];
  16742. },
  16743. subtitle() {
  16744. if (this.months.length) {
  16745. if (uni.getLocale() == "zh-Hans" || uni.getLocale() == "zh-Hant") {
  16746. return this.months[this.monthIndex].year + "年" + (this.months[this.monthIndex].month < 10 ? "0" + this.months[this.monthIndex].month : this.months[this.monthIndex].month) + "月";
  16747. } else {
  16748. return (this.months[this.monthIndex].month < 10 ? "0" + this.months[this.monthIndex].month : this.months[this.monthIndex].month) + "/" + this.months[this.monthIndex].year;
  16749. }
  16750. } else {
  16751. return "";
  16752. }
  16753. },
  16754. buttonDisabled() {
  16755. if (this.mode === "range") {
  16756. if (this.selected.length <= 1) {
  16757. return true;
  16758. } else {
  16759. return false;
  16760. }
  16761. } else {
  16762. return false;
  16763. }
  16764. }
  16765. },
  16766. mounted() {
  16767. this.start = Date.now();
  16768. this.init();
  16769. },
  16770. emits: ["confirm", "close"],
  16771. methods: {
  16772. addUnit,
  16773. // 在微信小程序中,不支持将函数当做props参数,故只能通过ref形式调用
  16774. setFormatter(e2) {
  16775. this.innerFormatter = e2;
  16776. },
  16777. // month组件内部选择日期后,通过事件通知给父组件
  16778. monthSelected(e2, scene = "init") {
  16779. this.selected = e2;
  16780. if (!this.showConfirm) {
  16781. if (this.mode === "multiple" || this.mode === "single" || this.mode === "range" && this.selected.length >= 2) {
  16782. if (scene === "init") {
  16783. return;
  16784. }
  16785. if (scene === "tap") {
  16786. this.$emit("confirm", this.selected);
  16787. }
  16788. }
  16789. }
  16790. },
  16791. init() {
  16792. if (this.innerMaxDate && this.innerMinDate && new Date(this.innerMaxDate).getTime() < new Date(this.innerMinDate).getTime()) {
  16793. return error("maxDate不能小于minDate时间");
  16794. }
  16795. let bottomPadding = 0;
  16796. if (this.pageInline) {
  16797. bottomPadding = 0;
  16798. } else {
  16799. bottomPadding = 30;
  16800. }
  16801. this.listHeight = this.rowHeight * 5 + bottomPadding;
  16802. this.setMonth();
  16803. },
  16804. close() {
  16805. this.$emit("close");
  16806. },
  16807. // 点击确定按钮
  16808. confirm() {
  16809. if (!this.buttonDisabled) {
  16810. this.$emit("confirm", this.selected);
  16811. }
  16812. },
  16813. // 获得两个日期之间的月份数
  16814. getMonths(minDate, maxDate) {
  16815. const minYear = e$1(minDate).year();
  16816. const minMonth = e$1(minDate).month() + 1;
  16817. const maxYear = e$1(maxDate).year();
  16818. const maxMonth = e$1(maxDate).month() + 1;
  16819. return (maxYear - minYear) * 12 + (maxMonth - minMonth) + 1;
  16820. },
  16821. // 设置月份数据
  16822. setMonth() {
  16823. const minDate = this.innerMinDate || e$1().valueOf();
  16824. const maxDate = this.innerMaxDate || e$1(minDate).add(this.monthNum - 1, "month").valueOf();
  16825. const months = range$1(
  16826. 1,
  16827. this.monthNum,
  16828. this.getMonths(minDate, maxDate)
  16829. );
  16830. this.months = [];
  16831. for (let i2 = 0; i2 < months; i2++) {
  16832. this.months.push({
  16833. date: new Array(
  16834. e$1(minDate).add(i2, "month").daysInMonth()
  16835. ).fill(1).map((item, index2) => {
  16836. let day = index2 + 1;
  16837. const week = e$1(minDate).add(i2, "month").date(day).day();
  16838. const date3 = e$1(minDate).add(i2, "month").date(day).format("YYYY-MM-DD");
  16839. let bottomInfo = "";
  16840. if (this.showLunar) {
  16841. const lunar = Calendar.solar2lunar(
  16842. e$1(date3).year(),
  16843. e$1(date3).month() + 1,
  16844. e$1(date3).date()
  16845. );
  16846. bottomInfo = lunar.IDayCn;
  16847. }
  16848. let config2 = {
  16849. day,
  16850. week,
  16851. // 小于最小允许的日期,或者大于最大的日期,则设置为disabled状态
  16852. disabled: e$1(date3).isBefore(
  16853. e$1(minDate).format("YYYY-MM-DD")
  16854. ) || e$1(date3).isAfter(
  16855. e$1(maxDate).format("YYYY-MM-DD")
  16856. ),
  16857. // 返回一个日期对象,供外部的formatter获取当前日期的年月日等信息,进行加工处理
  16858. date: new Date(date3),
  16859. bottomInfo,
  16860. dot: false,
  16861. month: e$1(minDate).add(i2, "month").month() + 1
  16862. };
  16863. const formatter = this.formatter || this.innerFormatter;
  16864. return formatter(config2);
  16865. }),
  16866. // 当前所属的月份
  16867. month: e$1(minDate).add(i2, "month").month() + 1,
  16868. // 当前年份
  16869. year: e$1(minDate).add(i2, "month").year()
  16870. });
  16871. }
  16872. },
  16873. // 滚动到默认设置的月份
  16874. scrollIntoDefaultMonth(selected) {
  16875. const _index = this.months.findIndex(({
  16876. year,
  16877. month
  16878. }) => {
  16879. month = padZero$1(month);
  16880. return `${year}-${month}` === selected;
  16881. });
  16882. if (_index !== -1) {
  16883. this.$nextTick(() => {
  16884. this.scrollIntoView = `month-${_index}`;
  16885. this.scrollIntoViewScroll = this.scrollIntoView;
  16886. });
  16887. }
  16888. },
  16889. // scroll-view滚动监听
  16890. onScroll(event) {
  16891. const scrollTop = Math.max(0, event.detail.scrollTop);
  16892. for (let i2 = 0; i2 < this.months.length; i2++) {
  16893. if (scrollTop >= (this.months[i2].top || this.listHeight)) {
  16894. this.monthIndex = i2;
  16895. this.scrollIntoViewScroll = `month-${i2}`;
  16896. }
  16897. }
  16898. },
  16899. // 更新月份的top值
  16900. updateMonthTop(topArr = []) {
  16901. topArr.map((item, index2) => {
  16902. this.months[index2].top = item;
  16903. });
  16904. if (!this.defaultDate) {
  16905. const selected2 = e$1().format("YYYY-MM");
  16906. this.scrollIntoDefaultMonth(selected2);
  16907. return;
  16908. }
  16909. let selected = e$1().format("YYYY-MM");
  16910. if (!test.array(this.defaultDate)) {
  16911. selected = e$1(this.defaultDate).format("YYYY-MM");
  16912. } else {
  16913. selected = e$1(this.defaultDate[0]).format("YYYY-MM");
  16914. }
  16915. this.scrollIntoDefaultMonth(selected);
  16916. }
  16917. }
  16918. };
  16919. function _sfc_render$1T(_ctx, _cache, $props, $setup, $data, $options) {
  16920. const _component_uHeader = vue.resolveComponent("uHeader");
  16921. const _component_uMonth = vue.resolveComponent("uMonth");
  16922. const _component_u_button = resolveEasycom(vue.resolveDynamicComponent("u-button"), __easycom_0$8);
  16923. const _component_u_popup = resolveEasycom(vue.resolveDynamicComponent("u-popup"), __easycom_2);
  16924. return vue.openBlock(), vue.createBlock(_component_u_popup, {
  16925. show: _ctx.show,
  16926. mode: "bottom",
  16927. closeable: !_ctx.pageInline,
  16928. onClose: $options.close,
  16929. round: _ctx.round,
  16930. pageInline: _ctx.pageInline,
  16931. closeOnClickOverlay: _ctx.closeOnClickOverlay
  16932. }, {
  16933. default: vue.withCtx(() => [
  16934. vue.createElementVNode("view", { class: "u-calendar" }, [
  16935. vue.createVNode(_component_uHeader, {
  16936. title: _ctx.title,
  16937. subtitle: $options.subtitle,
  16938. showSubtitle: _ctx.showSubtitle,
  16939. showTitle: _ctx.showTitle,
  16940. weekText: _ctx.weekText
  16941. }, null, 8, ["title", "subtitle", "showSubtitle", "showTitle", "weekText"]),
  16942. vue.createElementVNode("scroll-view", {
  16943. style: vue.normalizeStyle({
  16944. height: $options.addUnit($data.listHeight, "px")
  16945. }),
  16946. "scroll-y": "",
  16947. onScroll: _cache[0] || (_cache[0] = (...args) => $options.onScroll && $options.onScroll(...args)),
  16948. "scroll-top": $data.scrollTop,
  16949. scrollIntoView: $data.scrollIntoView
  16950. }, [
  16951. vue.createVNode(_component_uMonth, {
  16952. color: _ctx.color,
  16953. rowHeight: _ctx.rowHeight,
  16954. showMark: _ctx.showMark,
  16955. months: $data.months,
  16956. mode: _ctx.mode,
  16957. maxCount: _ctx.maxCount,
  16958. startText: _ctx.startText,
  16959. endText: _ctx.endText,
  16960. defaultDate: _ctx.defaultDate,
  16961. minDate: $options.innerMinDate,
  16962. maxDate: $options.innerMaxDate,
  16963. maxMonth: _ctx.monthNum,
  16964. readonly: _ctx.readonly,
  16965. maxRange: _ctx.maxRange,
  16966. rangePrompt: _ctx.rangePrompt,
  16967. showRangePrompt: _ctx.showRangePrompt,
  16968. allowSameDay: _ctx.allowSameDay,
  16969. forbidDays: _ctx.forbidDays,
  16970. forbidDaysToast: _ctx.forbidDaysToast,
  16971. monthFormat: _ctx.monthFormat,
  16972. ref: "month",
  16973. onMonthSelected: $options.monthSelected,
  16974. onUpdateMonthTop: $options.updateMonthTop
  16975. }, null, 8, ["color", "rowHeight", "showMark", "months", "mode", "maxCount", "startText", "endText", "defaultDate", "minDate", "maxDate", "maxMonth", "readonly", "maxRange", "rangePrompt", "showRangePrompt", "allowSameDay", "forbidDays", "forbidDaysToast", "monthFormat", "onMonthSelected", "onUpdateMonthTop"])
  16976. ], 44, ["scroll-top", "scrollIntoView"]),
  16977. _ctx.showConfirm ? vue.renderSlot(_ctx.$slots, "footer", { key: 0 }, () => [
  16978. vue.createElementVNode("view", { class: "u-calendar__confirm" }, [
  16979. vue.createVNode(_component_u_button, {
  16980. shape: "circle",
  16981. text: $options.buttonDisabled ? _ctx.confirmDisabledText : _ctx.confirmText,
  16982. color: _ctx.color,
  16983. onClick: $options.confirm,
  16984. disabled: $options.buttonDisabled
  16985. }, null, 8, ["text", "color", "onClick", "disabled"])
  16986. ])
  16987. ], true) : vue.createCommentVNode("v-if", true)
  16988. ])
  16989. ]),
  16990. _: 3
  16991. /* FORWARDED */
  16992. }, 8, ["show", "closeable", "onClose", "round", "pageInline", "closeOnClickOverlay"]);
  16993. }
  16994. const uCalendar = /* @__PURE__ */ _export_sfc(_sfc_main$1U, [["render", _sfc_render$1T], ["__scopeId", "data-v-c9867878"], ["__file", "C:/Users/EDY/Desktop/项目/shuibei/uni_modules/uview-plus/components/u-calendar/u-calendar.vue"]]);
  16995. const __vite_glob_0_12 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
  16996. __proto__: null,
  16997. default: uCalendar
  16998. }, Symbol.toStringTag, { value: "Module" }));
  16999. const props$1f = defineMixin({
  17000. props: {
  17001. // 是否打乱键盘按键的顺序
  17002. random: {
  17003. type: Boolean,
  17004. default: false
  17005. },
  17006. // 输入一个中文后,是否自动切换到英文
  17007. autoChange: {
  17008. type: Boolean,
  17009. default: false
  17010. }
  17011. }
  17012. });
  17013. const _sfc_main$1T = {
  17014. name: "u-car-keyboard",
  17015. mixins: [mpMixin, mixin, props$1f],
  17016. data() {
  17017. return {
  17018. // 车牌输入时,abc=true为输入车牌号码,bac=false为输入省份中文简称
  17019. abc: false
  17020. };
  17021. },
  17022. computed: {
  17023. areaList() {
  17024. let data = [
  17025. "京",
  17026. "沪",
  17027. "粤",
  17028. "津",
  17029. "冀",
  17030. "豫",
  17031. "云",
  17032. "辽",
  17033. "黑",
  17034. "湘",
  17035. "皖",
  17036. "鲁",
  17037. "苏",
  17038. "浙",
  17039. "赣",
  17040. "鄂",
  17041. "桂",
  17042. "甘",
  17043. "晋",
  17044. "陕",
  17045. "蒙",
  17046. "吉",
  17047. "闽",
  17048. "贵",
  17049. "渝",
  17050. "川",
  17051. "青",
  17052. "琼",
  17053. "宁",
  17054. "挂",
  17055. "藏",
  17056. "港",
  17057. "澳",
  17058. "新",
  17059. "使",
  17060. "学"
  17061. ];
  17062. let tmp = [];
  17063. if (this.random)
  17064. data = randomArray(data);
  17065. tmp[0] = data.slice(0, 10);
  17066. tmp[1] = data.slice(10, 20);
  17067. tmp[2] = data.slice(20, 30);
  17068. tmp[3] = data.slice(30, 36);
  17069. return tmp;
  17070. },
  17071. engKeyBoardList() {
  17072. let data = [
  17073. 1,
  17074. 2,
  17075. 3,
  17076. 4,
  17077. 5,
  17078. 6,
  17079. 7,
  17080. 8,
  17081. 9,
  17082. 0,
  17083. "Q",
  17084. "W",
  17085. "E",
  17086. "R",
  17087. "T",
  17088. "Y",
  17089. "U",
  17090. "I",
  17091. "O",
  17092. "P",
  17093. "A",
  17094. "S",
  17095. "D",
  17096. "F",
  17097. "G",
  17098. "H",
  17099. "J",
  17100. "K",
  17101. "L",
  17102. "Z",
  17103. "X",
  17104. "C",
  17105. "V",
  17106. "B",
  17107. "N",
  17108. "M"
  17109. ];
  17110. let tmp = [];
  17111. if (this.random)
  17112. data = randomArray(data);
  17113. tmp[0] = data.slice(0, 10);
  17114. tmp[1] = data.slice(10, 20);
  17115. tmp[2] = data.slice(20, 30);
  17116. tmp[3] = data.slice(30, 36);
  17117. return tmp;
  17118. }
  17119. },
  17120. emits: ["change", "backspace"],
  17121. methods: {
  17122. // 点击键盘按钮
  17123. carInputClick(i2, j2) {
  17124. let value2 = "";
  17125. if (this.abc)
  17126. value2 = this.engKeyBoardList[i2][j2];
  17127. else
  17128. value2 = this.areaList[i2][j2];
  17129. if (!this.abc && this.autoChange)
  17130. sleep(200).then(() => this.abc = true);
  17131. this.$emit("change", value2);
  17132. },
  17133. // 修改汽车牌键盘的输入模式,中文|英文
  17134. changeCarInputMode() {
  17135. this.abc = !this.abc;
  17136. },
  17137. // 点击退格键
  17138. backspaceClick() {
  17139. this.$emit("backspace");
  17140. clearInterval(this.timer);
  17141. this.timer = null;
  17142. this.timer = setInterval(() => {
  17143. this.$emit("backspace");
  17144. }, 250);
  17145. },
  17146. clearTimer() {
  17147. clearInterval(this.timer);
  17148. this.timer = null;
  17149. }
  17150. }
  17151. };
  17152. function _sfc_render$1S(_ctx, _cache, $props, $setup, $data, $options) {
  17153. const _component_up_icon = vue.resolveComponent("up-icon");
  17154. return vue.openBlock(), vue.createElementBlock(
  17155. "view",
  17156. {
  17157. class: "u-keyboard",
  17158. onTouchmove: _cache[3] || (_cache[3] = vue.withModifiers((...args) => _ctx.noop && _ctx.noop(...args), ["stop", "prevent"]))
  17159. },
  17160. [
  17161. (vue.openBlock(true), vue.createElementBlock(
  17162. vue.Fragment,
  17163. null,
  17164. vue.renderList($data.abc ? $options.engKeyBoardList : $options.areaList, (group, i2) => {
  17165. return vue.openBlock(), vue.createElementBlock("view", {
  17166. key: i2,
  17167. class: vue.normalizeClass(["u-keyboard__button", [i2 + 1 === 4 && "u-keyboard__button--center"]]),
  17168. index: i2
  17169. }, [
  17170. i2 === 3 ? (vue.openBlock(), vue.createElementBlock("view", {
  17171. key: 0,
  17172. class: "u-keyboard__button__inner-wrapper"
  17173. }, [
  17174. vue.createElementVNode("view", {
  17175. class: "u-keyboard__button__inner-wrapper__left",
  17176. "hover-class": "u-hover-class",
  17177. "hover-stay-time": 200,
  17178. onClick: _cache[0] || (_cache[0] = (...args) => $options.changeCarInputMode && $options.changeCarInputMode(...args))
  17179. }, [
  17180. vue.createElementVNode(
  17181. "text",
  17182. {
  17183. class: vue.normalizeClass(["u-keyboard__button__inner-wrapper__left__lang", [!$data.abc && "u-keyboard__button__inner-wrapper__left__lang--active"]])
  17184. },
  17185. "中",
  17186. 2
  17187. /* CLASS */
  17188. ),
  17189. vue.createElementVNode("text", { class: "u-keyboard__button__inner-wrapper__left__line" }, "/"),
  17190. vue.createElementVNode(
  17191. "text",
  17192. {
  17193. class: vue.normalizeClass(["u-keyboard__button__inner-wrapper__left__lang", [$data.abc && "u-keyboard__button__inner-wrapper__left__lang--active"]])
  17194. },
  17195. "英",
  17196. 2
  17197. /* CLASS */
  17198. )
  17199. ])
  17200. ])) : vue.createCommentVNode("v-if", true),
  17201. (vue.openBlock(true), vue.createElementBlock(
  17202. vue.Fragment,
  17203. null,
  17204. vue.renderList(group, (item, j2) => {
  17205. return vue.openBlock(), vue.createElementBlock("view", {
  17206. class: "u-keyboard__button__inner-wrapper",
  17207. key: j2
  17208. }, [
  17209. vue.createElementVNode("view", {
  17210. class: "u-keyboard__button__inner-wrapper__inner",
  17211. "hover-stay-time": 200,
  17212. onClick: ($event) => $options.carInputClick(i2, j2),
  17213. "hover-class": "u-hover-class"
  17214. }, [
  17215. vue.createElementVNode(
  17216. "text",
  17217. { class: "u-keyboard__button__inner-wrapper__inner__text" },
  17218. vue.toDisplayString(item),
  17219. 1
  17220. /* TEXT */
  17221. )
  17222. ], 8, ["onClick"])
  17223. ]);
  17224. }),
  17225. 128
  17226. /* KEYED_FRAGMENT */
  17227. )),
  17228. i2 === 3 ? (vue.openBlock(), vue.createElementBlock(
  17229. "view",
  17230. {
  17231. key: 1,
  17232. onTouchstart: _cache[1] || (_cache[1] = (...args) => $options.backspaceClick && $options.backspaceClick(...args)),
  17233. onTouchend: _cache[2] || (_cache[2] = (...args) => $options.clearTimer && $options.clearTimer(...args)),
  17234. class: "u-keyboard__button__inner-wrapper"
  17235. },
  17236. [
  17237. vue.createElementVNode("view", {
  17238. class: "u-keyboard__button__inner-wrapper__right",
  17239. "hover-class": "u-hover-class",
  17240. "hover-stay-time": 200
  17241. }, [
  17242. vue.createVNode(_component_up_icon, {
  17243. size: "28",
  17244. name: "backspace",
  17245. color: "#303133"
  17246. })
  17247. ])
  17248. ],
  17249. 32
  17250. /* NEED_HYDRATION */
  17251. )) : vue.createCommentVNode("v-if", true)
  17252. ], 10, ["index"]);
  17253. }),
  17254. 128
  17255. /* KEYED_FRAGMENT */
  17256. ))
  17257. ],
  17258. 32
  17259. /* NEED_HYDRATION */
  17260. );
  17261. }
  17262. const __easycom_1$2 = /* @__PURE__ */ _export_sfc(_sfc_main$1T, [["render", _sfc_render$1S], ["__scopeId", "data-v-e3990159"], ["__file", "C:/Users/EDY/Desktop/项目/shuibei/uni_modules/uview-plus/components/u-car-keyboard/u-car-keyboard.vue"]]);
  17263. const __vite_glob_0_13 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
  17264. __proto__: null,
  17265. default: __easycom_1$2
  17266. }, Symbol.toStringTag, { value: "Module" }));
  17267. const propsCard = defineMixin({
  17268. props: {
  17269. // 与屏幕两侧是否留空隙
  17270. full: {
  17271. type: Boolean,
  17272. default: () => props$1x.card.full
  17273. },
  17274. // 标题
  17275. title: {
  17276. type: String,
  17277. default: () => props$1x.card.title
  17278. },
  17279. // 标题颜色
  17280. titleColor: {
  17281. type: String,
  17282. default: () => props$1x.card.titleColor
  17283. },
  17284. // 标题字体大小
  17285. titleSize: {
  17286. type: [Number, String],
  17287. default: () => props$1x.card.titleSize
  17288. },
  17289. // 副标题
  17290. subTitle: {
  17291. type: String,
  17292. default: () => props$1x.card.subTitle
  17293. },
  17294. // 副标题颜色
  17295. subTitleColor: {
  17296. type: String,
  17297. default: () => props$1x.card.subTitleColor
  17298. },
  17299. // 副标题字体大小
  17300. subTitleSize: {
  17301. type: [Number, String],
  17302. default: () => props$1x.card.subTitleSize
  17303. },
  17304. // 是否显示外部边框,只对full=false时有效(卡片与边框有空隙时)
  17305. border: {
  17306. type: Boolean,
  17307. default: () => props$1x.card.border
  17308. },
  17309. // 用于标识点击了第几个
  17310. index: {
  17311. type: [Number, String, Object],
  17312. default: () => props$1x.card.index
  17313. },
  17314. // 用于隔开上下左右的边距,带单位的写法,如:"30px 30px","20px 20px 30px 30px"
  17315. margin: {
  17316. type: String,
  17317. default: () => props$1x.card.margin
  17318. },
  17319. // card卡片的圆角
  17320. borderRadius: {
  17321. type: [Number, String],
  17322. default: () => props$1x.card.borderRadius
  17323. },
  17324. // 头部自定义样式,对象形式
  17325. headStyle: {
  17326. type: Object,
  17327. default: () => props$1x.card.headStyle
  17328. },
  17329. // 主体自定义样式,对象形式
  17330. bodyStyle: {
  17331. type: Object,
  17332. default: () => props$1x.card.bodyStyle
  17333. },
  17334. // 底部自定义样式,对象形式
  17335. footStyle: {
  17336. type: Object,
  17337. default: () => props$1x.card.footStyle
  17338. },
  17339. // 头部是否下边框
  17340. headBorderBottom: {
  17341. type: Boolean,
  17342. default: () => props$1x.card.headBorderBottom
  17343. },
  17344. // 底部是否有上边框
  17345. footBorderTop: {
  17346. type: Boolean,
  17347. default: () => props$1x.card.footBorderTop
  17348. },
  17349. // 标题左边的缩略图
  17350. thumb: {
  17351. type: String,
  17352. default: () => props$1x.card.thumb
  17353. },
  17354. // 缩略图宽高
  17355. thumbWidth: {
  17356. type: [String, Number],
  17357. default: () => props$1x.card.thumbWidth
  17358. },
  17359. // 缩略图是否为圆形
  17360. thumbCircle: {
  17361. type: Boolean,
  17362. default: () => props$1x.card.thumbCircle
  17363. },
  17364. // 给head,body,foot的内边距
  17365. padding: {
  17366. type: [String, Number],
  17367. default: () => props$1x.card.padding
  17368. },
  17369. paddingHead: {
  17370. type: [String, Number],
  17371. default: () => props$1x.card.paddingHead
  17372. },
  17373. paddingBody: {
  17374. type: [String, Number],
  17375. default: () => props$1x.card.paddingBody
  17376. },
  17377. paddingFoot: {
  17378. type: [String, Number],
  17379. default: () => props$1x.card.paddingFoot
  17380. },
  17381. // 是否显示头部
  17382. showHead: {
  17383. type: Boolean,
  17384. default: () => props$1x.card.showHead
  17385. },
  17386. // 是否显示尾部
  17387. showFoot: {
  17388. type: Boolean,
  17389. default: () => props$1x.card.showFoot
  17390. },
  17391. // 卡片外围阴影,字符串形式
  17392. boxShadow: {
  17393. type: String,
  17394. default: () => props$1x.card.boxShadow
  17395. }
  17396. }
  17397. });
  17398. const _sfc_main$1S = {
  17399. name: "up-card",
  17400. data() {
  17401. return {};
  17402. },
  17403. mixins: [mpMixin, mixin, propsCard],
  17404. emits: ["click", "head-click", "body-click", "foot-click"],
  17405. methods: {
  17406. addStyle,
  17407. addUnit,
  17408. getPx,
  17409. click() {
  17410. this.$emit("click", this.index);
  17411. },
  17412. headClick() {
  17413. this.$emit("head-click", this.index);
  17414. },
  17415. bodyClick() {
  17416. this.$emit("body-click", this.index);
  17417. },
  17418. footClick() {
  17419. this.$emit("foot-click", this.index);
  17420. }
  17421. }
  17422. };
  17423. function _sfc_render$1R(_ctx, _cache, $props, $setup, $data, $options) {
  17424. return vue.openBlock(), vue.createElementBlock(
  17425. "view",
  17426. {
  17427. class: vue.normalizeClass(["u-card", { "u-border": _ctx.border, "u-card-full": _ctx.full, "u-card--border": $options.getPx(_ctx.borderRadius) > 0 }]),
  17428. onClick: _cache[3] || (_cache[3] = vue.withModifiers((...args) => $options.click && $options.click(...args), ["stop"])),
  17429. style: vue.normalizeStyle({
  17430. borderRadius: $options.addUnit(_ctx.borderRadius),
  17431. margin: _ctx.margin,
  17432. boxShadow: _ctx.boxShadow
  17433. })
  17434. },
  17435. [
  17436. _ctx.showHead ? (vue.openBlock(), vue.createElementBlock(
  17437. "view",
  17438. {
  17439. key: 0,
  17440. class: vue.normalizeClass(["u-card__head", {
  17441. "u-border-bottom": _ctx.headBorderBottom
  17442. }]),
  17443. style: vue.normalizeStyle([{ padding: $options.addUnit(_ctx.paddingHead || _ctx.padding) }, _ctx.headStyle]),
  17444. onClick: _cache[0] || (_cache[0] = (...args) => $options.headClick && $options.headClick(...args))
  17445. },
  17446. [
  17447. !_ctx.$slots.head ? (vue.openBlock(), vue.createElementBlock("view", {
  17448. key: 0,
  17449. class: "u-flex u-flex-between"
  17450. }, [
  17451. _ctx.title ? (vue.openBlock(), vue.createElementBlock("view", {
  17452. key: 0,
  17453. class: "u-card__head--left u-flex u-line-1"
  17454. }, [
  17455. _ctx.thumb ? (vue.openBlock(), vue.createElementBlock("image", {
  17456. key: 0,
  17457. src: _ctx.thumb,
  17458. class: "u-card__head--left__thumb",
  17459. mode: "aspectFill",
  17460. style: vue.normalizeStyle({
  17461. height: $options.addUnit(_ctx.thumbWidth),
  17462. width: $options.addUnit(_ctx.thumbWidth),
  17463. borderRadius: _ctx.thumbCircle ? "50px" : "4px"
  17464. })
  17465. }, null, 12, ["src"])) : vue.createCommentVNode("v-if", true),
  17466. vue.createElementVNode(
  17467. "text",
  17468. {
  17469. class: "u-card__head--left__title u-line-1",
  17470. style: vue.normalizeStyle({
  17471. fontSize: $options.addUnit(_ctx.titleSize),
  17472. color: _ctx.titleColor
  17473. })
  17474. },
  17475. vue.toDisplayString(_ctx.title),
  17476. 5
  17477. /* TEXT, STYLE */
  17478. )
  17479. ])) : vue.createCommentVNode("v-if", true),
  17480. _ctx.subTitle ? (vue.openBlock(), vue.createElementBlock("view", {
  17481. key: 1,
  17482. class: "u-card__head--right u-line-1"
  17483. }, [
  17484. vue.createElementVNode(
  17485. "text",
  17486. {
  17487. class: "u-card__head__title__text",
  17488. style: vue.normalizeStyle({
  17489. fontSize: $options.addUnit(_ctx.subTitleSize),
  17490. color: _ctx.subTitleColor
  17491. })
  17492. },
  17493. vue.toDisplayString(_ctx.subTitle),
  17494. 5
  17495. /* TEXT, STYLE */
  17496. )
  17497. ])) : vue.createCommentVNode("v-if", true)
  17498. ])) : vue.renderSlot(_ctx.$slots, "head", { key: 1 }, void 0, true)
  17499. ],
  17500. 6
  17501. /* CLASS, STYLE */
  17502. )) : vue.createCommentVNode("v-if", true),
  17503. vue.createElementVNode(
  17504. "view",
  17505. {
  17506. onClick: _cache[1] || (_cache[1] = (...args) => $options.bodyClick && $options.bodyClick(...args)),
  17507. class: "u-card__body",
  17508. style: vue.normalizeStyle([{ padding: $options.addUnit(_ctx.paddingBody || _ctx.padding) }, _ctx.bodyStyle])
  17509. },
  17510. [
  17511. vue.renderSlot(_ctx.$slots, "body", {}, void 0, true)
  17512. ],
  17513. 4
  17514. /* STYLE */
  17515. ),
  17516. _ctx.showFoot ? (vue.openBlock(), vue.createElementBlock(
  17517. "view",
  17518. {
  17519. key: 1,
  17520. class: vue.normalizeClass(["u-card__foot", {
  17521. "u-border-top": _ctx.footBorderTop
  17522. }]),
  17523. onClick: _cache[2] || (_cache[2] = (...args) => $options.footClick && $options.footClick(...args)),
  17524. style: vue.normalizeStyle([{ padding: _ctx.$slots.foot ? $options.addUnit(_ctx.paddingFoot || _ctx.padding) : 0 }, _ctx.footStyle])
  17525. },
  17526. [
  17527. vue.renderSlot(_ctx.$slots, "foot", {}, void 0, true)
  17528. ],
  17529. 6
  17530. /* CLASS, STYLE */
  17531. )) : vue.createCommentVNode("v-if", true)
  17532. ],
  17533. 6
  17534. /* CLASS, STYLE */
  17535. );
  17536. }
  17537. const uCard = /* @__PURE__ */ _export_sfc(_sfc_main$1S, [["render", _sfc_render$1R], ["__scopeId", "data-v-040f828b"], ["__file", "C:/Users/EDY/Desktop/项目/shuibei/uni_modules/uview-plus/components/u-card/u-card.vue"]]);
  17538. const __vite_glob_0_14 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
  17539. __proto__: null,
  17540. default: uCard
  17541. }, Symbol.toStringTag, { value: "Module" }));
  17542. const _sfc_main$1R = {
  17543. name: "up-cate-tab",
  17544. props: {
  17545. height: {
  17546. type: String,
  17547. default: "100%"
  17548. },
  17549. tabList: {
  17550. type: Array,
  17551. default: () => {
  17552. return [];
  17553. }
  17554. },
  17555. tabKeyName: {
  17556. type: String,
  17557. default: "name"
  17558. },
  17559. itemKeyName: {
  17560. type: String,
  17561. default: "name"
  17562. },
  17563. current: {
  17564. type: Number,
  17565. default: 0
  17566. }
  17567. },
  17568. watch: {
  17569. tabList: {
  17570. deep: true,
  17571. handler(newVal, oldVal) {
  17572. sleep(30);
  17573. this.getMenuItemTop();
  17574. this.leftMenuStatus(this.innerCurrent);
  17575. }
  17576. },
  17577. current(nval) {
  17578. this.innerCurrent = nval;
  17579. this.leftMenuStatus(this.innerCurrent);
  17580. },
  17581. height() {
  17582. this.getMenuItemTop();
  17583. this.leftMenuStatus(this.innerCurrent);
  17584. }
  17585. },
  17586. emits: ["update:current"],
  17587. data() {
  17588. return {
  17589. scrollTop: 0,
  17590. //tab标题的滚动条位置
  17591. scrollIntoView: "",
  17592. // 滚动至哪个元素
  17593. oldScrollTop: 0,
  17594. innerCurrent: 0,
  17595. // 预设当前项的值
  17596. menuHeight: 0,
  17597. // 左边菜单的高度
  17598. menuItemHeight: 0,
  17599. // 左边菜单item的高度
  17600. itemId: "",
  17601. // 栏目右边scroll-view用于滚动的id
  17602. menuItemPos: [],
  17603. rects: [],
  17604. arr: [],
  17605. scrollRightTop: 0,
  17606. // 右边栏目scroll-view的滚动条高度
  17607. timer: null
  17608. // 定时器
  17609. };
  17610. },
  17611. mounted() {
  17612. this.innerCurrent = this.current;
  17613. this.leftMenuStatus(this.innerCurrent);
  17614. this.getMenuItemTop();
  17615. },
  17616. methods: {
  17617. addUnit,
  17618. // 点击左边的栏目切换
  17619. async swichMenu(index2) {
  17620. if (this.arr.length == 0) {
  17621. await this.getMenuItemTop();
  17622. }
  17623. this.scrollIntoView = "item" + index2;
  17624. if (index2 == this.innerCurrent)
  17625. return;
  17626. this.$nextTick(function() {
  17627. this.innerCurrent = index2;
  17628. this.$emit("update:current", index2);
  17629. });
  17630. },
  17631. // 获取一个目标元素的高度
  17632. getElRect(elClass, dataVal) {
  17633. return new Promise((resolve, reject) => {
  17634. const query = uni.createSelectorQuery().in(this);
  17635. query.select("." + elClass).fields({
  17636. size: true
  17637. }, (res) => {
  17638. if (!res) {
  17639. setTimeout(() => {
  17640. this.getElRect(elClass);
  17641. }, 10);
  17642. return;
  17643. }
  17644. this[dataVal] = res.height;
  17645. resolve();
  17646. }).exec();
  17647. });
  17648. },
  17649. // 观测元素相交状态
  17650. async observer() {
  17651. await this.$nextTick();
  17652. if (this._observerList) {
  17653. this._observerList.forEach((observer) => {
  17654. observer.disconnect();
  17655. });
  17656. }
  17657. this._observerList = [];
  17658. this.tabList.map((val, index2) => {
  17659. let observer = uni.createIntersectionObserver(this);
  17660. this._observerList.push(observer);
  17661. observer.relativeTo(".u-cate-tab__right-box", {
  17662. top: 10
  17663. }).observe("#item" + index2, (res) => {
  17664. if (res.intersectionRatio > 0) {
  17665. formatAppLog("log", "at uni_modules/uview-plus/components/u-cate-tab/u-cate-tab.vue:170", "res", res);
  17666. let id = res.id ? res.id.substring(4) : index2;
  17667. this.leftMenuStatus(parseInt(id));
  17668. }
  17669. });
  17670. });
  17671. },
  17672. // 设置左边菜单的滚动状态
  17673. async leftMenuStatus(index2) {
  17674. this.innerCurrent = index2;
  17675. this.$emit("update:current", index2);
  17676. if (this.menuHeight == 0 || this.menuItemHeight == 0) {
  17677. await this.getElRect("u-cate-tab__menu-scroll-view", "menuHeight");
  17678. await this.getElRect("u-cate-tab__item", "menuItemHeight");
  17679. }
  17680. this.scrollTop = index2 * this.menuItemHeight + this.menuItemHeight / 2 - this.menuHeight / 2;
  17681. },
  17682. // 获取右边菜单每个item到顶部的距离
  17683. async getMenuItemTop() {
  17684. return new Promise((resolve) => {
  17685. let selectorQuery = uni.createSelectorQuery().in(this);
  17686. selectorQuery.selectAll(".u-cate-tab__page-item").boundingClientRect((rects) => {
  17687. if (!rects.length) {
  17688. setTimeout(() => {
  17689. this.getMenuItemTop();
  17690. }, 100);
  17691. return;
  17692. }
  17693. this.rects = rects;
  17694. this.arr = [];
  17695. rects.forEach((rect) => {
  17696. this.arr.push(rect.top - rects[0].top);
  17697. });
  17698. resolve();
  17699. }).exec();
  17700. });
  17701. },
  17702. // 右边菜单滚动
  17703. async rightScroll(e2) {
  17704. this.oldScrollTop = e2.detail.scrollTop;
  17705. if (this.arr.length == 0) {
  17706. await this.getMenuItemTop();
  17707. }
  17708. if (this.timer)
  17709. return;
  17710. if (!this.menuHeight) {
  17711. await this.getElRect("u-cate-tab__menu-scroll-view", "menuHeight");
  17712. }
  17713. setTimeout(() => {
  17714. this.timer = null;
  17715. let scrollHeight = e2.detail.scrollTop + 1;
  17716. for (let i2 = 0; i2 < this.arr.length; i2++) {
  17717. let height1 = this.arr[i2];
  17718. let height2 = this.arr[i2 + 1];
  17719. if (!height2 || scrollHeight >= height1 && scrollHeight <= height2) {
  17720. this.leftMenuStatus(i2);
  17721. return;
  17722. }
  17723. }
  17724. }, 100);
  17725. }
  17726. }
  17727. };
  17728. function _sfc_render$1Q(_ctx, _cache, $props, $setup, $data, $options) {
  17729. return vue.openBlock(), vue.createElementBlock(
  17730. "view",
  17731. {
  17732. class: "u-cate-tab",
  17733. style: vue.normalizeStyle({ height: $options.addUnit($props.height) })
  17734. },
  17735. [
  17736. vue.createElementVNode("view", { class: "u-cate-tab__wrap" }, [
  17737. vue.createElementVNode("scroll-view", {
  17738. class: "u-cate-tab__view u-cate-tab__menu-scroll-view",
  17739. "scroll-y": "",
  17740. "scroll-with-animation": "",
  17741. "scroll-top": $data.scrollTop,
  17742. "scroll-into-view": $data.itemId
  17743. }, [
  17744. (vue.openBlock(true), vue.createElementBlock(
  17745. vue.Fragment,
  17746. null,
  17747. vue.renderList($props.tabList, (item, index2) => {
  17748. return vue.openBlock(), vue.createElementBlock("view", {
  17749. key: index2,
  17750. class: vue.normalizeClass(["u-cate-tab__item", [$data.innerCurrent == index2 ? "u-cate-tab__item-active" : ""]]),
  17751. onClick: vue.withModifiers(($event) => $options.swichMenu(index2), ["stop"])
  17752. }, [
  17753. vue.renderSlot(_ctx.$slots, "tabItem", { item }, void 0, true),
  17754. !_ctx.$slots["tabItem"] ? (vue.openBlock(), vue.createElementBlock(
  17755. "text",
  17756. {
  17757. key: 0,
  17758. class: "u-line-1"
  17759. },
  17760. vue.toDisplayString(item[$props.tabKeyName]),
  17761. 1
  17762. /* TEXT */
  17763. )) : vue.createCommentVNode("v-if", true)
  17764. ], 10, ["onClick"]);
  17765. }),
  17766. 128
  17767. /* KEYED_FRAGMENT */
  17768. ))
  17769. ], 8, ["scroll-top", "scroll-into-view"]),
  17770. vue.createElementVNode("scroll-view", {
  17771. "scroll-top": $data.scrollRightTop,
  17772. "scroll-with-animation": "",
  17773. "scroll-into-view": $data.scrollIntoView,
  17774. "scroll-y": "",
  17775. class: "u-cate-tab__right-box",
  17776. onScroll: _cache[0] || (_cache[0] = (...args) => $options.rightScroll && $options.rightScroll(...args))
  17777. }, [
  17778. vue.createElementVNode("view", { class: "u-cate-tab__right-top" }, [
  17779. vue.renderSlot(_ctx.$slots, "rightTop", { tabList: $props.tabList }, void 0, true)
  17780. ]),
  17781. vue.createElementVNode("view", { class: "u-cate-tab__page-view" }, [
  17782. (vue.openBlock(true), vue.createElementBlock(
  17783. vue.Fragment,
  17784. null,
  17785. vue.renderList($props.tabList, (item, index2) => {
  17786. return vue.openBlock(), vue.createElementBlock("view", {
  17787. class: "u-cate-tab__page-item",
  17788. id: "item" + index2,
  17789. key: index2
  17790. }, [
  17791. vue.renderSlot(_ctx.$slots, "itemList", { item }, void 0, true),
  17792. !_ctx.$slots["itemList"] ? (vue.openBlock(), vue.createElementBlock(
  17793. vue.Fragment,
  17794. { key: 0 },
  17795. [
  17796. vue.createElementVNode("view", { class: "item-title" }, [
  17797. vue.createElementVNode(
  17798. "text",
  17799. null,
  17800. vue.toDisplayString(item[$props.tabKeyName]),
  17801. 1
  17802. /* TEXT */
  17803. )
  17804. ]),
  17805. vue.createElementVNode("view", { class: "item-container" }, [
  17806. (vue.openBlock(true), vue.createElementBlock(
  17807. vue.Fragment,
  17808. null,
  17809. vue.renderList(item.children, (item1, index1) => {
  17810. return vue.renderSlot(_ctx.$slots, "pageItem", {
  17811. key: index1,
  17812. pageItem: item1
  17813. }, () => [
  17814. vue.createElementVNode("view", { class: "thumb-box" }, [
  17815. vue.createElementVNode("image", {
  17816. class: "item-menu-image",
  17817. src: item1.icon,
  17818. mode: ""
  17819. }, null, 8, ["src"]),
  17820. vue.createElementVNode(
  17821. "view",
  17822. { class: "item-menu-name" },
  17823. vue.toDisplayString(item1[$props.itemKeyName]),
  17824. 1
  17825. /* TEXT */
  17826. )
  17827. ])
  17828. ], true);
  17829. }),
  17830. 128
  17831. /* KEYED_FRAGMENT */
  17832. ))
  17833. ])
  17834. ],
  17835. 64
  17836. /* STABLE_FRAGMENT */
  17837. )) : vue.createCommentVNode("v-if", true)
  17838. ], 8, ["id"]);
  17839. }),
  17840. 128
  17841. /* KEYED_FRAGMENT */
  17842. ))
  17843. ])
  17844. ], 40, ["scroll-top", "scroll-into-view"])
  17845. ])
  17846. ],
  17847. 4
  17848. /* STYLE */
  17849. );
  17850. }
  17851. const uCateTab = /* @__PURE__ */ _export_sfc(_sfc_main$1R, [["render", _sfc_render$1Q], ["__scopeId", "data-v-963a5e40"], ["__file", "C:/Users/EDY/Desktop/项目/shuibei/uni_modules/uview-plus/components/u-cate-tab/u-cate-tab.vue"]]);
  17852. const __vite_glob_0_15 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
  17853. __proto__: null,
  17854. default: uCateTab
  17855. }, Symbol.toStringTag, { value: "Module" }));
  17856. const props$1e = defineMixin({
  17857. props: {
  17858. // 分组标题
  17859. title: {
  17860. type: String,
  17861. default: () => props$1x.cellGroup.title
  17862. },
  17863. // 是否显示外边框
  17864. border: {
  17865. type: Boolean,
  17866. default: () => props$1x.cellGroup.border
  17867. }
  17868. }
  17869. });
  17870. const _sfc_main$1Q = {
  17871. name: "u-cell-group",
  17872. mixins: [mpMixin, mixin, props$1e],
  17873. methods: {
  17874. addStyle
  17875. }
  17876. };
  17877. function _sfc_render$1P(_ctx, _cache, $props, $setup, $data, $options) {
  17878. const _component_u_line = resolveEasycom(vue.resolveDynamicComponent("u-line"), __easycom_1$4);
  17879. return vue.openBlock(), vue.createElementBlock(
  17880. "view",
  17881. {
  17882. style: vue.normalizeStyle([$options.addStyle(_ctx.customStyle)]),
  17883. class: vue.normalizeClass([[_ctx.customClass], "u-cell-group"])
  17884. },
  17885. [
  17886. _ctx.title ? (vue.openBlock(), vue.createElementBlock("view", {
  17887. key: 0,
  17888. class: "u-cell-group__title"
  17889. }, [
  17890. vue.renderSlot(_ctx.$slots, "title", {}, () => [
  17891. vue.createElementVNode(
  17892. "text",
  17893. { class: "u-cell-group__title__text" },
  17894. vue.toDisplayString(_ctx.title),
  17895. 1
  17896. /* TEXT */
  17897. )
  17898. ], true)
  17899. ])) : vue.createCommentVNode("v-if", true),
  17900. vue.createElementVNode("view", { class: "u-cell-group__wrapper" }, [
  17901. _ctx.border ? (vue.openBlock(), vue.createBlock(_component_u_line, { key: 0 })) : vue.createCommentVNode("v-if", true),
  17902. vue.renderSlot(_ctx.$slots, "default", {}, void 0, true)
  17903. ])
  17904. ],
  17905. 6
  17906. /* CLASS, STYLE */
  17907. );
  17908. }
  17909. const uCellGroup = /* @__PURE__ */ _export_sfc(_sfc_main$1Q, [["render", _sfc_render$1P], ["__scopeId", "data-v-014d39dc"], ["__file", "C:/Users/EDY/Desktop/项目/shuibei/uni_modules/uview-plus/components/u-cell-group/u-cell-group.vue"]]);
  17910. const __vite_glob_0_16 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
  17911. __proto__: null,
  17912. default: uCellGroup
  17913. }, Symbol.toStringTag, { value: "Module" }));
  17914. const props$1d = defineMixin({
  17915. props: {
  17916. // 标题
  17917. title: {
  17918. type: [String, Number],
  17919. default: () => props$1x.cell.title
  17920. },
  17921. // 标题下方的描述信息
  17922. label: {
  17923. type: [String, Number],
  17924. default: () => props$1x.cell.label
  17925. },
  17926. // 右侧的内容
  17927. value: {
  17928. type: [String, Number],
  17929. default: () => props$1x.cell.value
  17930. },
  17931. // 左侧图标名称,或者图片链接(本地文件建议使用绝对地址)
  17932. icon: {
  17933. type: String,
  17934. default: () => props$1x.cell.icon
  17935. },
  17936. // 是否禁用cell
  17937. disabled: {
  17938. type: Boolean,
  17939. default: () => props$1x.cell.disabled
  17940. },
  17941. // 是否显示下边框
  17942. border: {
  17943. type: Boolean,
  17944. default: () => props$1x.cell.border
  17945. },
  17946. // 内容是否垂直居中(主要是针对右侧的value部分)
  17947. center: {
  17948. type: Boolean,
  17949. default: () => props$1x.cell.center
  17950. },
  17951. // 点击后跳转的URL地址
  17952. url: {
  17953. type: String,
  17954. default: () => props$1x.cell.url
  17955. },
  17956. // 链接跳转的方式,内部使用的是uView封装的route方法,可能会进行拦截操作
  17957. linkType: {
  17958. type: String,
  17959. default: () => props$1x.cell.linkType
  17960. },
  17961. // 是否开启点击反馈(表现为点击时加上灰色背景)
  17962. clickable: {
  17963. type: Boolean,
  17964. default: () => props$1x.cell.clickable
  17965. },
  17966. // 是否展示右侧箭头并开启点击反馈
  17967. isLink: {
  17968. type: Boolean,
  17969. default: () => props$1x.cell.isLink
  17970. },
  17971. // 是否显示表单状态下的必填星号(此组件可能会内嵌入input组件)
  17972. required: {
  17973. type: Boolean,
  17974. default: () => props$1x.cell.required
  17975. },
  17976. // 右侧的图标箭头
  17977. rightIcon: {
  17978. type: String,
  17979. default: () => props$1x.cell.rightIcon
  17980. },
  17981. // 右侧箭头的方向,可选值为:left,up,down
  17982. arrowDirection: {
  17983. type: String,
  17984. default: () => props$1x.cell.arrowDirection
  17985. },
  17986. // 左侧图标样式
  17987. iconStyle: {
  17988. type: [Object, String],
  17989. default: () => {
  17990. return props$1x.cell.iconStyle;
  17991. }
  17992. },
  17993. // 右侧箭头图标的样式
  17994. rightIconStyle: {
  17995. type: [Object, String],
  17996. default: () => {
  17997. return props$1x.cell.rightIconStyle;
  17998. }
  17999. },
  18000. // 标题的样式
  18001. titleStyle: {
  18002. type: [Object, String],
  18003. default: () => {
  18004. return props$1x.cell.titleStyle;
  18005. }
  18006. },
  18007. // 单位元的大小,可选值为large
  18008. size: {
  18009. type: String,
  18010. default: () => props$1x.cell.size
  18011. },
  18012. // 点击cell是否阻止事件传播
  18013. stop: {
  18014. type: Boolean,
  18015. default: () => props$1x.cell.stop
  18016. },
  18017. // 标识符,cell被点击时返回
  18018. name: {
  18019. type: [Number, String],
  18020. default: () => props$1x.cell.name
  18021. }
  18022. }
  18023. });
  18024. const _sfc_main$1P = {
  18025. name: "u-cell",
  18026. data() {
  18027. return {};
  18028. },
  18029. mixins: [mpMixin, mixin, props$1d],
  18030. computed: {
  18031. titleTextStyle() {
  18032. return addStyle(this.titleStyle);
  18033. }
  18034. },
  18035. emits: ["click"],
  18036. methods: {
  18037. addStyle,
  18038. testEmpty: test.empty,
  18039. // 点击cell
  18040. clickHandler(e2) {
  18041. if (this.disabled)
  18042. return;
  18043. this.$emit("click", {
  18044. name: this.name
  18045. });
  18046. this.openPage();
  18047. this.stop && this.preventEvent(e2);
  18048. }
  18049. }
  18050. };
  18051. function _sfc_render$1O(_ctx, _cache, $props, $setup, $data, $options) {
  18052. const _component_up_icon = vue.resolveComponent("up-icon");
  18053. const _component_u_line = resolveEasycom(vue.resolveDynamicComponent("u-line"), __easycom_1$4);
  18054. return vue.openBlock(), vue.createElementBlock("view", {
  18055. class: vue.normalizeClass(["u-cell", [_ctx.customClass]]),
  18056. style: vue.normalizeStyle([$options.addStyle(_ctx.customStyle)]),
  18057. "hover-class": !_ctx.disabled && (_ctx.clickable || _ctx.isLink) ? "u-cell--clickable" : "",
  18058. "hover-stay-time": 250,
  18059. onClick: _cache[0] || (_cache[0] = (...args) => $options.clickHandler && $options.clickHandler(...args))
  18060. }, [
  18061. vue.createElementVNode(
  18062. "view",
  18063. {
  18064. class: vue.normalizeClass(["u-cell__body", [_ctx.center && "u-cell--center", _ctx.size === "large" && "u-cell__body--large"]])
  18065. },
  18066. [
  18067. vue.createElementVNode("view", { class: "u-cell__body__content" }, [
  18068. _ctx.$slots.icon || _ctx.icon ? (vue.openBlock(), vue.createElementBlock("view", {
  18069. key: 0,
  18070. class: "u-cell__left-icon-wrap"
  18071. }, [
  18072. _ctx.$slots.icon ? vue.renderSlot(_ctx.$slots, "icon", { key: 0 }, void 0, true) : (vue.openBlock(), vue.createBlock(_component_up_icon, {
  18073. key: 1,
  18074. name: _ctx.icon,
  18075. "custom-style": _ctx.iconStyle,
  18076. size: _ctx.size === "large" ? 22 : 18
  18077. }, null, 8, ["name", "custom-style", "size"]))
  18078. ])) : vue.createCommentVNode("v-if", true),
  18079. vue.createElementVNode("view", { class: "u-cell__title" }, [
  18080. vue.createCommentVNode(" 将slot与默认内容用if/else分开主要是因为微信小程序不支持slot嵌套传递,这样才能解决collapse组件的slot不失效问题,label暂时未用到。 "),
  18081. _ctx.$slots.title || !_ctx.title ? vue.renderSlot(_ctx.$slots, "title", { key: 0 }, void 0, true) : (vue.openBlock(), vue.createElementBlock(
  18082. "text",
  18083. {
  18084. key: 1,
  18085. class: vue.normalizeClass(["u-cell__title-text", [_ctx.required && "u-cell--required", _ctx.disabled && "u-cell--disabled", _ctx.size === "large" && "u-cell__title-text--large"]]),
  18086. style: vue.normalizeStyle([$options.titleTextStyle])
  18087. },
  18088. vue.toDisplayString(_ctx.title),
  18089. 7
  18090. /* TEXT, CLASS, STYLE */
  18091. )),
  18092. vue.renderSlot(_ctx.$slots, "label", {}, () => [
  18093. _ctx.label ? (vue.openBlock(), vue.createElementBlock(
  18094. "text",
  18095. {
  18096. key: 0,
  18097. class: vue.normalizeClass(["u-cell__label", [_ctx.disabled && "u-cell--disabled", _ctx.size === "large" && "u-cell__label--large"]])
  18098. },
  18099. vue.toDisplayString(_ctx.label),
  18100. 3
  18101. /* TEXT, CLASS */
  18102. )) : vue.createCommentVNode("v-if", true)
  18103. ], true)
  18104. ])
  18105. ]),
  18106. vue.renderSlot(_ctx.$slots, "value", {}, () => [
  18107. !$options.testEmpty(_ctx.value) ? (vue.openBlock(), vue.createElementBlock(
  18108. "text",
  18109. {
  18110. key: 0,
  18111. class: vue.normalizeClass(["u-cell__value", [_ctx.disabled && "u-cell--disabled", _ctx.size === "large" && "u-cell__value--large"]])
  18112. },
  18113. vue.toDisplayString(_ctx.value),
  18114. 3
  18115. /* TEXT, CLASS */
  18116. )) : vue.createCommentVNode("v-if", true)
  18117. ], true),
  18118. _ctx.$slots["right-icon"] || _ctx.isLink ? (vue.openBlock(), vue.createElementBlock(
  18119. "view",
  18120. {
  18121. key: 0,
  18122. class: vue.normalizeClass(["u-cell__right-icon-wrap", [`u-cell__right-icon-wrap--${_ctx.arrowDirection}`]])
  18123. },
  18124. [
  18125. _ctx.rightIcon && !_ctx.$slots["right-icon"] ? (vue.openBlock(), vue.createBlock(_component_up_icon, {
  18126. key: 0,
  18127. name: _ctx.rightIcon,
  18128. "custom-style": _ctx.rightIconStyle,
  18129. color: _ctx.disabled ? "#c8c9cc" : "info",
  18130. size: _ctx.size === "large" ? 18 : 16
  18131. }, null, 8, ["name", "custom-style", "color", "size"])) : vue.renderSlot(_ctx.$slots, "right-icon", { key: 1 }, void 0, true)
  18132. ],
  18133. 2
  18134. /* CLASS */
  18135. )) : vue.createCommentVNode("v-if", true),
  18136. _ctx.$slots["righticon"] ? (vue.openBlock(), vue.createElementBlock(
  18137. "view",
  18138. {
  18139. key: 1,
  18140. class: vue.normalizeClass(["u-cell__right-icon-wrap", [`u-cell__right-icon-wrap--${_ctx.arrowDirection}`]])
  18141. },
  18142. [
  18143. vue.renderSlot(_ctx.$slots, "righticon", {}, void 0, true)
  18144. ],
  18145. 2
  18146. /* CLASS */
  18147. )) : vue.createCommentVNode("v-if", true)
  18148. ],
  18149. 2
  18150. /* CLASS */
  18151. ),
  18152. _ctx.border ? (vue.openBlock(), vue.createBlock(_component_u_line, { key: 0 })) : vue.createCommentVNode("v-if", true)
  18153. ], 14, ["hover-class"]);
  18154. }
  18155. const __easycom_0$7 = /* @__PURE__ */ _export_sfc(_sfc_main$1P, [["render", _sfc_render$1O], ["__scopeId", "data-v-3fd6feca"], ["__file", "C:/Users/EDY/Desktop/项目/shuibei/uni_modules/uview-plus/components/u-cell/u-cell.vue"]]);
  18156. const __vite_glob_0_17 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
  18157. __proto__: null,
  18158. default: __easycom_0$7
  18159. }, Symbol.toStringTag, { value: "Module" }));
  18160. const props$1c = defineMixin({
  18161. props: {
  18162. // 标识符
  18163. name: {
  18164. type: String,
  18165. default: () => props$1x.checkboxGroup.name
  18166. },
  18167. // 绑定的值
  18168. modelValue: {
  18169. type: Array,
  18170. default: () => props$1x.checkboxGroup.value
  18171. },
  18172. // 形状,circle-圆形,square-方形
  18173. shape: {
  18174. type: String,
  18175. default: () => props$1x.checkboxGroup.shape
  18176. },
  18177. // 是否禁用全部checkbox
  18178. disabled: {
  18179. type: Boolean,
  18180. default: () => props$1x.checkboxGroup.disabled
  18181. },
  18182. // 选中状态下的颜色,如设置此值,将会覆盖parent的activeColor值
  18183. activeColor: {
  18184. type: String,
  18185. default: () => props$1x.checkboxGroup.activeColor
  18186. },
  18187. // 未选中的颜色
  18188. inactiveColor: {
  18189. type: String,
  18190. default: () => props$1x.checkboxGroup.inactiveColor
  18191. },
  18192. // 整个组件的尺寸,默认px
  18193. size: {
  18194. type: [String, Number],
  18195. default: () => props$1x.checkboxGroup.size
  18196. },
  18197. // 布局方式,row-横向,column-纵向
  18198. placement: {
  18199. type: String,
  18200. default: () => props$1x.checkboxGroup.placement
  18201. },
  18202. // label的字体大小,px单位
  18203. labelSize: {
  18204. type: [String, Number],
  18205. default: () => props$1x.checkboxGroup.labelSize
  18206. },
  18207. // label的字体颜色
  18208. labelColor: {
  18209. type: [String],
  18210. default: () => props$1x.checkboxGroup.labelColor
  18211. },
  18212. // 是否禁止点击文本操作
  18213. labelDisabled: {
  18214. type: Boolean,
  18215. default: () => props$1x.checkboxGroup.labelDisabled
  18216. },
  18217. // 图标颜色
  18218. iconColor: {
  18219. type: String,
  18220. default: () => props$1x.checkboxGroup.iconColor
  18221. },
  18222. // 图标的大小,单位px
  18223. iconSize: {
  18224. type: [String, Number],
  18225. default: () => props$1x.checkboxGroup.iconSize
  18226. },
  18227. // 勾选图标的对齐方式,left-左边,right-右边
  18228. iconPlacement: {
  18229. type: String,
  18230. default: () => props$1x.checkboxGroup.iconPlacement
  18231. },
  18232. // 竖向配列时,是否显示下划线
  18233. borderBottom: {
  18234. type: Boolean,
  18235. default: () => props$1x.checkboxGroup.borderBottom
  18236. }
  18237. }
  18238. });
  18239. const _sfc_main$1O = {
  18240. name: "u-checkbox-group",
  18241. mixins: [mpMixin, mixin, props$1c],
  18242. computed: {
  18243. // 这里computed的变量,都是子组件u-checkbox需要用到的,由于头条小程序的兼容性差异,子组件无法实时监听父组件参数的变化
  18244. // 所以需要手动通知子组件,这里返回一个parentData变量,供watch监听,在其中去通知每一个子组件重新从父组件(u-checkbox-group)
  18245. // 拉取父组件新的变化后的参数
  18246. parentData() {
  18247. return [
  18248. this.modelValue,
  18249. this.disabled,
  18250. this.inactiveColor,
  18251. this.activeColor,
  18252. this.size,
  18253. this.labelDisabled,
  18254. this.shape,
  18255. this.iconSize,
  18256. this.borderBottom,
  18257. this.placement
  18258. ];
  18259. },
  18260. bemClass() {
  18261. return this.bem("checkbox-group", ["placement"]);
  18262. }
  18263. },
  18264. watch: {
  18265. // 当父组件需要子组件需要共享的参数发生了变化,手动通知子组件
  18266. parentData: {
  18267. handler() {
  18268. if (this.children.length) {
  18269. this.children.map((child) => {
  18270. typeof child.init === "function" && child.init();
  18271. });
  18272. }
  18273. },
  18274. deep: true
  18275. }
  18276. },
  18277. data() {
  18278. return {};
  18279. },
  18280. created() {
  18281. this.children = [];
  18282. },
  18283. emits: ["update:modelValue", "change"],
  18284. methods: {
  18285. // 将其他的checkbox设置为未选中的状态
  18286. unCheckedOther(childInstance) {
  18287. const values = [];
  18288. this.children.map((child) => {
  18289. if (child.isChecked) {
  18290. values.push(child.name);
  18291. }
  18292. });
  18293. this.$emit("update:modelValue", values);
  18294. this.$emit("change", values);
  18295. }
  18296. }
  18297. };
  18298. function _sfc_render$1N(_ctx, _cache, $props, $setup, $data, $options) {
  18299. return vue.openBlock(), vue.createElementBlock(
  18300. "view",
  18301. {
  18302. class: vue.normalizeClass(["u-checkbox-group", $options.bemClass])
  18303. },
  18304. [
  18305. vue.renderSlot(_ctx.$slots, "default", {}, void 0, true)
  18306. ],
  18307. 2
  18308. /* CLASS */
  18309. );
  18310. }
  18311. const uCheckboxGroup = /* @__PURE__ */ _export_sfc(_sfc_main$1O, [["render", _sfc_render$1N], ["__scopeId", "data-v-ff0492f0"], ["__file", "C:/Users/EDY/Desktop/项目/shuibei/uni_modules/uview-plus/components/u-checkbox-group/u-checkbox-group.vue"]]);
  18312. const __vite_glob_0_18 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
  18313. __proto__: null,
  18314. default: uCheckboxGroup
  18315. }, Symbol.toStringTag, { value: "Module" }));
  18316. const props$1b = defineMixin({
  18317. props: {
  18318. // checkbox的名称
  18319. name: {
  18320. type: [String, Number, Boolean],
  18321. default: () => props$1x.checkbox.name
  18322. },
  18323. // 形状,square为方形,circle为圆型
  18324. shape: {
  18325. type: String,
  18326. default: () => props$1x.checkbox.shape
  18327. },
  18328. // 整体的大小
  18329. size: {
  18330. type: [String, Number],
  18331. default: () => props$1x.checkbox.size
  18332. },
  18333. // 是否默认选中
  18334. checked: {
  18335. type: Boolean,
  18336. default: () => props$1x.checkbox.checked
  18337. },
  18338. // 是否禁用
  18339. disabled: {
  18340. type: [String, Boolean],
  18341. default: () => props$1x.checkbox.disabled
  18342. },
  18343. // 选中状态下的颜色,如设置此值,将会覆盖parent的activeColor值
  18344. activeColor: {
  18345. type: String,
  18346. default: () => props$1x.checkbox.activeColor
  18347. },
  18348. // 未选中的颜色
  18349. inactiveColor: {
  18350. type: String,
  18351. default: () => props$1x.checkbox.inactiveColor
  18352. },
  18353. // 图标的大小,单位px
  18354. iconSize: {
  18355. type: [String, Number],
  18356. default: () => props$1x.checkbox.iconSize
  18357. },
  18358. // 图标颜色
  18359. iconColor: {
  18360. type: String,
  18361. default: () => props$1x.checkbox.iconColor
  18362. },
  18363. // label提示文字,因为nvue下,直接slot进来的文字,由于特殊的结构,无法修改样式
  18364. label: {
  18365. type: [String, Number],
  18366. default: () => props$1x.checkbox.label
  18367. },
  18368. // label的字体大小,px单位
  18369. labelSize: {
  18370. type: [String, Number],
  18371. default: () => props$1x.checkbox.labelSize
  18372. },
  18373. // label的颜色
  18374. labelColor: {
  18375. type: String,
  18376. default: () => props$1x.checkbox.labelColor
  18377. },
  18378. // 是否禁止点击提示语选中复选框
  18379. labelDisabled: {
  18380. type: [String, Boolean],
  18381. default: () => props$1x.checkbox.labelDisabled
  18382. },
  18383. // 是否独立使用
  18384. usedAlone: {
  18385. type: [Boolean],
  18386. default: () => false
  18387. }
  18388. }
  18389. });
  18390. const _sfc_main$1N = {
  18391. name: "u-checkbox",
  18392. mixins: [mpMixin, mixin, props$1b],
  18393. data() {
  18394. return {
  18395. isChecked: false,
  18396. // 父组件的默认值,因为头条小程序不支持在computed中使用this.parent.shape的形式
  18397. // 故只能使用如此方法
  18398. parentData: {
  18399. iconSize: 12,
  18400. labelDisabled: null,
  18401. disabled: null,
  18402. shape: "square",
  18403. activeColor: null,
  18404. inactiveColor: null,
  18405. size: 18,
  18406. modelValue: null,
  18407. iconColor: null,
  18408. placement: "row",
  18409. borderBottom: false,
  18410. iconPlacement: "left"
  18411. }
  18412. };
  18413. },
  18414. computed: {
  18415. // 是否禁用,如果父组件u-radios-group禁用的话,将会忽略子组件的配置
  18416. elDisabled() {
  18417. return this.disabled !== "" ? this.disabled : this.parentData.disabled !== null ? this.parentData.disabled : false;
  18418. },
  18419. // 是否禁用label点击
  18420. elLabelDisabled() {
  18421. return this.labelDisabled !== "" ? this.labelDisabled : this.parentData.labelDisabled !== null ? this.parentData.labelDisabled : false;
  18422. },
  18423. // 组件尺寸,对应size的值,默认值为21px
  18424. elSize() {
  18425. return this.size ? this.size : this.parentData.size ? this.parentData.size : 21;
  18426. },
  18427. // 组件的勾选图标的尺寸,默认12px
  18428. elIconSize() {
  18429. return this.iconSize ? this.iconSize : this.parentData.iconSize ? this.parentData.iconSize : 12;
  18430. },
  18431. // 组件选中激活时的颜色
  18432. elActiveColor() {
  18433. return this.activeColor ? this.activeColor : this.parentData.activeColor ? this.parentData.activeColor : "#2979ff";
  18434. },
  18435. // 组件选未中激活时的颜色
  18436. elInactiveColor() {
  18437. return this.inactiveColor ? this.inactiveColor : this.parentData.inactiveColor ? this.parentData.inactiveColor : "#c8c9cc";
  18438. },
  18439. // label的颜色
  18440. elLabelColor() {
  18441. return this.labelColor ? this.labelColor : this.parentData.labelColor ? this.parentData.labelColor : "#606266";
  18442. },
  18443. // 组件的形状
  18444. elShape() {
  18445. return this.shape ? this.shape : this.parentData.shape ? this.parentData.shape : "circle";
  18446. },
  18447. // label大小
  18448. elLabelSize() {
  18449. return addUnit(this.labelSize ? this.labelSize : this.parentData.labelSize ? this.parentData.labelSize : "15");
  18450. },
  18451. elIconColor() {
  18452. const iconColor = this.iconColor ? this.iconColor : this.parentData.iconColor ? this.parentData.iconColor : "#ffffff";
  18453. if (this.elDisabled) {
  18454. return this.isChecked ? this.elInactiveColor : "transparent";
  18455. } else {
  18456. return this.isChecked ? iconColor : "transparent";
  18457. }
  18458. },
  18459. iconClasses() {
  18460. let classes = [];
  18461. classes.push("u-checkbox__icon-wrap--" + this.elShape);
  18462. if (this.elDisabled) {
  18463. classes.push("u-checkbox__icon-wrap--disabled");
  18464. }
  18465. if (this.isChecked && this.elDisabled) {
  18466. classes.push("u-checkbox__icon-wrap--disabled--checked");
  18467. }
  18468. return classes;
  18469. },
  18470. iconWrapStyle() {
  18471. const style = {};
  18472. style.backgroundColor = this.isChecked && !this.elDisabled ? this.elActiveColor : "#ffffff";
  18473. style.borderColor = this.isChecked && !this.elDisabled ? this.elActiveColor : this.elInactiveColor;
  18474. style.width = addUnit(this.elSize);
  18475. style.height = addUnit(this.elSize);
  18476. if (!this.usedAlone) {
  18477. if (this.parentData.iconPlacement === "right") {
  18478. style.marginRight = 0;
  18479. }
  18480. }
  18481. return style;
  18482. },
  18483. checkboxStyle() {
  18484. const style = {};
  18485. if (!this.usedAlone) {
  18486. if (this.parentData.borderBottom && this.parentData.placement === "row") {
  18487. error("检测到您将borderBottom设置为true,需要同时将up-checkbox-group的placement设置为column才有效");
  18488. }
  18489. if (this.parentData.borderBottom && this.parentData.placement === "column") {
  18490. style.paddingBottom = "8px";
  18491. }
  18492. }
  18493. return deepMerge$1(style, addStyle(this.customStyle));
  18494. }
  18495. },
  18496. mounted() {
  18497. this.init();
  18498. },
  18499. emits: ["change", "update:checked"],
  18500. methods: {
  18501. init() {
  18502. if (!this.usedAlone) {
  18503. this.updateParentData();
  18504. if (!this.parent) {
  18505. error("up-checkbox必须搭配up-checkbox-group组件使用");
  18506. }
  18507. const value2 = this.parentData.modelValue;
  18508. if (this.checked) {
  18509. this.isChecked = true;
  18510. } else if (!this.usedAlone && test.array(value2)) {
  18511. this.isChecked = value2.some((item) => {
  18512. return item === this.name;
  18513. });
  18514. }
  18515. } else {
  18516. if (this.checked) {
  18517. this.isChecked = true;
  18518. }
  18519. }
  18520. },
  18521. updateParentData() {
  18522. this.getParentData("u-checkbox-group");
  18523. },
  18524. // 横向两端排列时,点击组件即可触发选中事件
  18525. wrapperClickHandler(e2) {
  18526. if (!this.usedAlone) {
  18527. this.parentData.iconPlacement === "right" && this.iconClickHandler(e2);
  18528. } else {
  18529. this.iconClickHandler(e2);
  18530. }
  18531. },
  18532. // 点击图标
  18533. iconClickHandler(e2) {
  18534. this.preventEvent(e2);
  18535. if (!this.elDisabled) {
  18536. this.setRadioCheckedStatus();
  18537. }
  18538. },
  18539. // 点击label
  18540. labelClickHandler(e2) {
  18541. this.preventEvent(e2);
  18542. if (!this.elLabelDisabled && !this.elDisabled) {
  18543. this.setRadioCheckedStatus();
  18544. }
  18545. },
  18546. emitEvent() {
  18547. this.$emit("change", this.isChecked, {
  18548. name: this.name
  18549. });
  18550. if (this.usedAlone) {
  18551. this.$emit("update:checked", this.isChecked);
  18552. }
  18553. this.$nextTick(() => {
  18554. formValidate(this, "change");
  18555. });
  18556. },
  18557. // 改变组件选中状态
  18558. // 这里的改变的依据是,更改本组件的checked值为true,同时通过父组件遍历所有u-checkbox实例
  18559. // 将本组件外的其他u-checkbox的checked都设置为false(都被取消选中状态),因而只剩下一个为选中状态
  18560. setRadioCheckedStatus() {
  18561. this.isChecked = !this.isChecked;
  18562. this.emitEvent();
  18563. if (!this.usedAlone) {
  18564. typeof this.parent.unCheckedOther === "function" && this.parent.unCheckedOther(this);
  18565. }
  18566. }
  18567. },
  18568. watch: {
  18569. checked(newValue, oldValue) {
  18570. if (newValue !== this.isChecked) {
  18571. this.isChecked = newValue;
  18572. }
  18573. }
  18574. }
  18575. };
  18576. function _sfc_render$1M(_ctx, _cache, $props, $setup, $data, $options) {
  18577. const _component_up_icon = vue.resolveComponent("up-icon");
  18578. return vue.openBlock(), vue.createElementBlock(
  18579. "view",
  18580. {
  18581. class: vue.normalizeClass(["u-checkbox cursor-pointer", [`u-checkbox-label--${$data.parentData.iconPlacement}`, $data.parentData.borderBottom && $data.parentData.placement === "column" && "u-border-bottom"]]),
  18582. style: vue.normalizeStyle([$options.checkboxStyle]),
  18583. onClick: _cache[2] || (_cache[2] = vue.withModifiers((...args) => $options.wrapperClickHandler && $options.wrapperClickHandler(...args), ["stop"]))
  18584. },
  18585. [
  18586. vue.createElementVNode(
  18587. "view",
  18588. {
  18589. class: vue.normalizeClass(["u-checkbox__icon-wrap cursor-pointer", $options.iconClasses]),
  18590. onClick: _cache[0] || (_cache[0] = vue.withModifiers((...args) => $options.iconClickHandler && $options.iconClickHandler(...args), ["stop"])),
  18591. style: vue.normalizeStyle([$options.iconWrapStyle])
  18592. },
  18593. [
  18594. vue.renderSlot(_ctx.$slots, "icon", {
  18595. elIconSize: $options.elIconSize,
  18596. elIconColor: $options.elIconColor
  18597. }, () => [
  18598. vue.createVNode(_component_up_icon, {
  18599. class: "u-checkbox__icon-wrap__icon",
  18600. name: "checkbox-mark",
  18601. size: $options.elIconSize,
  18602. color: $options.elIconColor
  18603. }, null, 8, ["size", "color"])
  18604. ], true)
  18605. ],
  18606. 6
  18607. /* CLASS, STYLE */
  18608. ),
  18609. vue.createElementVNode("view", {
  18610. class: "u-checkbox__label-wrap cursor-pointer",
  18611. onClick: _cache[1] || (_cache[1] = vue.withModifiers((...args) => $options.labelClickHandler && $options.labelClickHandler(...args), ["stop"]))
  18612. }, [
  18613. vue.renderSlot(_ctx.$slots, "label", {
  18614. label: _ctx.label,
  18615. elDisabled: $options.elDisabled
  18616. }, () => [
  18617. vue.createElementVNode(
  18618. "text",
  18619. {
  18620. style: vue.normalizeStyle({
  18621. color: $options.elDisabled ? $options.elInactiveColor : $options.elLabelColor,
  18622. fontSize: $options.elLabelSize,
  18623. lineHeight: $options.elLabelSize
  18624. })
  18625. },
  18626. vue.toDisplayString(_ctx.label),
  18627. 5
  18628. /* TEXT, STYLE */
  18629. )
  18630. ], true)
  18631. ])
  18632. ],
  18633. 6
  18634. /* CLASS, STYLE */
  18635. );
  18636. }
  18637. const uCheckbox = /* @__PURE__ */ _export_sfc(_sfc_main$1N, [["render", _sfc_render$1M], ["__scopeId", "data-v-41713600"], ["__file", "C:/Users/EDY/Desktop/项目/shuibei/uni_modules/uview-plus/components/u-checkbox/u-checkbox.vue"]]);
  18638. const __vite_glob_0_19 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
  18639. __proto__: null,
  18640. default: uCheckbox
  18641. }, Symbol.toStringTag, { value: "Module" }));
  18642. const props$1a = defineMixin({
  18643. props: {
  18644. percentage: {
  18645. type: [String, Number],
  18646. default: () => props$1x.circleProgress.percentage
  18647. }
  18648. }
  18649. });
  18650. const _sfc_main$1M = {
  18651. name: "u-circle-progress",
  18652. mixins: [mpMixin, mixin, props$1a],
  18653. data() {
  18654. return {
  18655. leftBorderColor: "rgb(200, 200, 200)",
  18656. rightBorderColor: "rgb(200, 200, 200)"
  18657. };
  18658. },
  18659. computed: {
  18660. leftSyle() {
  18661. const style = {};
  18662. style.borderTopColor = this.leftBorderColor;
  18663. style.borderRightColor = this.leftBorderColor;
  18664. return style;
  18665. },
  18666. rightSyle() {
  18667. const style = {};
  18668. style.borderLeftColor = this.rightBorderColor;
  18669. style.borderBottomColor = this.rightBorderColor;
  18670. return style;
  18671. }
  18672. },
  18673. mounted() {
  18674. sleep().then(() => {
  18675. this.rightBorderColor = "rgb(66, 185, 131)";
  18676. });
  18677. },
  18678. methods: {
  18679. init() {
  18680. animation.transition(this.$refs["right-circle"].ref, {
  18681. styles: {
  18682. transform: "rotate(45deg)",
  18683. transformOrigin: "center center"
  18684. }
  18685. }, () => {
  18686. this.rightBorderColor = "rgb(66, 185, 131)";
  18687. });
  18688. }
  18689. }
  18690. };
  18691. function _sfc_render$1L(_ctx, _cache, $props, $setup, $data, $options) {
  18692. return vue.openBlock(), vue.createElementBlock("view", { class: "u-circle-progress" }, [
  18693. vue.createElementVNode("view", { class: "u-circle-progress__left" }, [
  18694. vue.createElementVNode(
  18695. "view",
  18696. {
  18697. class: "u-circle-progress__left__circle",
  18698. style: vue.normalizeStyle([$options.leftSyle]),
  18699. ref: "left-circle"
  18700. },
  18701. null,
  18702. 4
  18703. /* STYLE */
  18704. )
  18705. ]),
  18706. vue.createElementVNode("view", { class: "u-circle-progress__right" }, [
  18707. vue.createElementVNode(
  18708. "view",
  18709. {
  18710. class: "u-circle-progress__right__circle",
  18711. ref: "right-circle",
  18712. style: vue.normalizeStyle([$options.rightSyle])
  18713. },
  18714. null,
  18715. 4
  18716. /* STYLE */
  18717. )
  18718. ]),
  18719. vue.createElementVNode("view", { class: "u-circle-progress__circle" })
  18720. ]);
  18721. }
  18722. const uCircleProgress = /* @__PURE__ */ _export_sfc(_sfc_main$1M, [["render", _sfc_render$1L], ["__scopeId", "data-v-8379d4ea"], ["__file", "C:/Users/EDY/Desktop/项目/shuibei/uni_modules/uview-plus/components/u-circle-progress/u-circle-progress.vue"]]);
  18723. const __vite_glob_0_20 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
  18724. __proto__: null,
  18725. default: uCircleProgress
  18726. }, Symbol.toStringTag, { value: "Module" }));
  18727. const _sfc_main$1L = {
  18728. name: "u-city-locate",
  18729. props: {
  18730. indexList: {
  18731. type: Array,
  18732. default: ["🔥"]
  18733. },
  18734. cityList: {
  18735. type: Array,
  18736. default: () => {
  18737. return [
  18738. [
  18739. {
  18740. name: "北京",
  18741. value: "beijing"
  18742. },
  18743. {
  18744. name: "上海",
  18745. value: "shanghai"
  18746. },
  18747. {
  18748. name: "广州",
  18749. value: "guangzhou"
  18750. },
  18751. {
  18752. name: "深圳",
  18753. value: "shenzhen"
  18754. },
  18755. {
  18756. name: "杭州",
  18757. value: "hangzhou"
  18758. }
  18759. ]
  18760. ];
  18761. }
  18762. },
  18763. locationType: {
  18764. type: String,
  18765. default: "wgs84"
  18766. },
  18767. currentCity: {
  18768. type: String,
  18769. default: ""
  18770. },
  18771. nameKey: {
  18772. type: String,
  18773. default: "name"
  18774. }
  18775. },
  18776. computed: {},
  18777. watch: {
  18778. currentCity(val) {
  18779. this.locationCity = val;
  18780. }
  18781. },
  18782. data() {
  18783. return {
  18784. locationCity: t$1("up.cityLocate.locating") + "...."
  18785. };
  18786. },
  18787. emits: ["location-success", "select-city"],
  18788. methods: {
  18789. t: t$1,
  18790. // 获取城市
  18791. selectedCity(city) {
  18792. this.locationCity = city[this.nameKey];
  18793. this.$emit("select-city", {
  18794. locationCity: this.locationCity
  18795. });
  18796. },
  18797. // 定位操作
  18798. location() {
  18799. let That = this;
  18800. uni.getLocation({
  18801. type: this.locationType,
  18802. geocode: true,
  18803. success(res) {
  18804. formatAppLog("log", "at uni_modules/uview-plus/components/u-city-locate/u-city-locate.vue:120", res);
  18805. That.locationCity = res.address && res.address.city;
  18806. That.$emit("location-success", {
  18807. ...res,
  18808. locationCity: That.locationCity
  18809. });
  18810. },
  18811. fail() {
  18812. That.locationCity = t$1("up.cityLocate.fail");
  18813. }
  18814. });
  18815. }
  18816. },
  18817. // 页面挂载后进行异步操作
  18818. created() {
  18819. },
  18820. mounted() {
  18821. this.location();
  18822. }
  18823. };
  18824. function _sfc_render$1K(_ctx, _cache, $props, $setup, $data, $options) {
  18825. const _component_up_index_anchor = vue.resolveComponent("up-index-anchor");
  18826. const _component_up_line = vue.resolveComponent("up-line");
  18827. const _component_up_index_item = vue.resolveComponent("up-index-item");
  18828. const _component_up_index_list = vue.resolveComponent("up-index-list");
  18829. return vue.openBlock(), vue.createElementBlock("view", { class: "u-city-locate" }, [
  18830. vue.createVNode(_component_up_index_list, { indexList: $props.indexList }, {
  18831. header: vue.withCtx(() => [
  18832. vue.createElementVNode("view", { class: "u-current-city-wrap" }, [
  18833. vue.createElementVNode(
  18834. "view",
  18835. { class: "u-current-city-title" },
  18836. vue.toDisplayString($options.t("up.cityLocate.locateCity")),
  18837. 1
  18838. /* TEXT */
  18839. ),
  18840. vue.createElementVNode("view", {
  18841. class: "u-current-city-item",
  18842. onClick: _cache[0] || (_cache[0] = (...args) => $options.location && $options.location(...args))
  18843. }, [
  18844. vue.createElementVNode(
  18845. "view",
  18846. { class: "u-location-city" },
  18847. vue.toDisplayString($data.locationCity),
  18848. 1
  18849. /* TEXT */
  18850. )
  18851. ])
  18852. ])
  18853. ]),
  18854. footer: vue.withCtx(() => [
  18855. vue.createElementVNode("view", { class: "u-safe-area-inset--bottom" }, [
  18856. vue.createElementVNode("text", { class: "list__footer" })
  18857. ])
  18858. ]),
  18859. default: vue.withCtx(() => [
  18860. (vue.openBlock(true), vue.createElementBlock(
  18861. vue.Fragment,
  18862. null,
  18863. vue.renderList($props.cityList, (item, index2) => {
  18864. return vue.openBlock(), vue.createBlock(
  18865. _component_up_index_item,
  18866. { key: index2 },
  18867. {
  18868. default: vue.withCtx(() => [
  18869. vue.createVNode(_component_up_index_anchor, {
  18870. text: $props.indexList[index2]
  18871. }, null, 8, ["text"]),
  18872. index2 == 0 ? (vue.openBlock(), vue.createElementBlock("view", {
  18873. key: 0,
  18874. class: "hot-city-list"
  18875. }, [
  18876. (vue.openBlock(true), vue.createElementBlock(
  18877. vue.Fragment,
  18878. null,
  18879. vue.renderList(item, (item1, index1) => {
  18880. return vue.openBlock(), vue.createElementBlock("view", {
  18881. class: "",
  18882. onClick: ($event) => $options.selectedCity(item1)
  18883. }, [
  18884. vue.createElementVNode(
  18885. "view",
  18886. { class: "hot-city-item" },
  18887. vue.toDisplayString(item1[$props.nameKey]),
  18888. 1
  18889. /* TEXT */
  18890. )
  18891. ], 8, ["onClick"]);
  18892. }),
  18893. 256
  18894. /* UNKEYED_FRAGMENT */
  18895. ))
  18896. ])) : (vue.openBlock(true), vue.createElementBlock(
  18897. vue.Fragment,
  18898. { key: 1 },
  18899. vue.renderList(item, (item1, index1) => {
  18900. return vue.openBlock(), vue.createElementBlock("view", {
  18901. class: "item-list",
  18902. key: index1
  18903. }, [
  18904. vue.createElementVNode("view", {
  18905. class: "list__item",
  18906. onClick: ($event) => $options.selectedCity(item1)
  18907. }, [
  18908. vue.createElementVNode(
  18909. "text",
  18910. { class: "list__item__city-name" },
  18911. vue.toDisplayString(item1[$props.nameKey]),
  18912. 1
  18913. /* TEXT */
  18914. )
  18915. ], 8, ["onClick"]),
  18916. vue.createVNode(_component_up_line)
  18917. ]);
  18918. }),
  18919. 128
  18920. /* KEYED_FRAGMENT */
  18921. ))
  18922. ]),
  18923. _: 2
  18924. /* DYNAMIC */
  18925. },
  18926. 1024
  18927. /* DYNAMIC_SLOTS */
  18928. );
  18929. }),
  18930. 128
  18931. /* KEYED_FRAGMENT */
  18932. ))
  18933. ]),
  18934. _: 1
  18935. /* STABLE */
  18936. }, 8, ["indexList"])
  18937. ]);
  18938. }
  18939. const uCityLocate = /* @__PURE__ */ _export_sfc(_sfc_main$1L, [["render", _sfc_render$1K], ["__scopeId", "data-v-8eca2484"], ["__file", "C:/Users/EDY/Desktop/项目/shuibei/uni_modules/uview-plus/components/u-city-locate/u-city-locate.vue"]]);
  18940. const __vite_glob_0_21 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
  18941. __proto__: null,
  18942. default: uCityLocate
  18943. }, Symbol.toStringTag, { value: "Module" }));
  18944. const props$19 = defineMixin({
  18945. props: {
  18946. // 键盘弹起时,是否自动上推页面
  18947. adjustPosition: {
  18948. type: Boolean,
  18949. default: () => props$1x.codeInput.adjustPosition
  18950. },
  18951. // 最大输入长度
  18952. maxlength: {
  18953. type: [String, Number],
  18954. default: () => props$1x.codeInput.maxlength
  18955. },
  18956. // 是否用圆点填充
  18957. dot: {
  18958. type: Boolean,
  18959. default: () => props$1x.codeInput.dot
  18960. },
  18961. // 显示模式,box-盒子模式,line-底部横线模式
  18962. mode: {
  18963. type: String,
  18964. default: () => props$1x.codeInput.mode
  18965. },
  18966. // 是否细边框
  18967. hairline: {
  18968. type: Boolean,
  18969. default: () => props$1x.codeInput.hairline
  18970. },
  18971. // 字符间的距离
  18972. space: {
  18973. type: [String, Number],
  18974. default: () => props$1x.codeInput.space
  18975. },
  18976. // 预置值
  18977. modelValue: {
  18978. type: [String, Number],
  18979. default: () => props$1x.codeInput.value
  18980. },
  18981. // 是否自动获取焦点
  18982. focus: {
  18983. type: Boolean,
  18984. default: () => props$1x.codeInput.focus
  18985. },
  18986. // 字体是否加粗
  18987. bold: {
  18988. type: Boolean,
  18989. default: () => props$1x.codeInput.bold
  18990. },
  18991. // 字体颜色
  18992. color: {
  18993. type: String,
  18994. default: () => props$1x.codeInput.color
  18995. },
  18996. // 字体大小
  18997. fontSize: {
  18998. type: [String, Number],
  18999. default: () => props$1x.codeInput.fontSize
  19000. },
  19001. // 输入框的大小,宽等于高
  19002. size: {
  19003. type: [String, Number],
  19004. default: () => props$1x.codeInput.size
  19005. },
  19006. // 是否隐藏原生键盘,如果想用自定义键盘的话,需设置此参数为true
  19007. disabledKeyboard: {
  19008. type: Boolean,
  19009. default: () => props$1x.codeInput.disabledKeyboard
  19010. },
  19011. // 边框和线条颜色
  19012. borderColor: {
  19013. type: String,
  19014. default: () => props$1x.codeInput.borderColor
  19015. },
  19016. // 是否禁止输入"."符号
  19017. disabledDot: {
  19018. type: Boolean,
  19019. default: () => props$1x.codeInput.disabledDot
  19020. }
  19021. }
  19022. });
  19023. const _sfc_main$1K = {
  19024. name: "u-code-input",
  19025. mixins: [mpMixin, mixin, props$19],
  19026. data() {
  19027. return {
  19028. inputValue: "",
  19029. isFocus: this.focus,
  19030. timer: null,
  19031. opacity: 1
  19032. };
  19033. },
  19034. watch: {
  19035. modelValue: {
  19036. immediate: true,
  19037. handler(val) {
  19038. this.inputValue = String(val).substring(0, this.maxlength);
  19039. }
  19040. },
  19041. isFocus: {
  19042. handler(val) {
  19043. }
  19044. }
  19045. },
  19046. created() {
  19047. },
  19048. beforeUnmount() {
  19049. },
  19050. computed: {
  19051. // 根据长度,循环输入框的个数,因为头条小程序数值不能用于v-for
  19052. codeLength() {
  19053. return new Array(Number(this.maxlength));
  19054. },
  19055. // 循环item的样式
  19056. itemStyle() {
  19057. return (index2) => {
  19058. const style = {
  19059. width: addUnit(this.size),
  19060. height: addUnit(this.size)
  19061. };
  19062. if (this.mode === "box") {
  19063. style.border = `${this.hairline ? 0.5 : 1}px solid ${this.borderColor}`;
  19064. if (getPx(this.space) === 0) {
  19065. if (index2 === 0) {
  19066. style.borderTopLeftRadius = "3px";
  19067. style.borderBottomLeftRadius = "3px";
  19068. }
  19069. if (index2 === this.codeLength.length - 1) {
  19070. style.borderTopRightRadius = "3px";
  19071. style.borderBottomRightRadius = "3px";
  19072. }
  19073. if (index2 !== this.codeLength.length - 1) {
  19074. style.borderRight = "none";
  19075. }
  19076. }
  19077. }
  19078. if (index2 !== this.codeLength.length - 1) {
  19079. style.marginRight = addUnit(this.space);
  19080. } else {
  19081. style.marginRight = 0;
  19082. }
  19083. return style;
  19084. };
  19085. },
  19086. // 将输入的值,转为数组,给item历遍时,根据当前的索引显示数组的元素
  19087. codeArray() {
  19088. return String(this.inputValue).split("");
  19089. },
  19090. // 下划线模式下,横线的样式
  19091. lineStyle() {
  19092. const style = {};
  19093. style.height = this.hairline ? "2px" : "4px";
  19094. style.width = addUnit(this.size);
  19095. style.backgroundColor = this.borderColor;
  19096. return style;
  19097. }
  19098. },
  19099. emits: ["change", "finish", "update:modelValue"],
  19100. methods: {
  19101. addUnit,
  19102. // 监听输入框的值发生变化
  19103. inputHandler(e2) {
  19104. const value2 = e2.detail.value;
  19105. this.inputValue = value2;
  19106. if (this.disabledDot) {
  19107. this.$nextTick(() => {
  19108. this.inputValue = value2.replace(".", "");
  19109. });
  19110. }
  19111. this.$emit("change", value2);
  19112. this.$emit("update:modelValue", value2);
  19113. if (String(value2).length >= Number(this.maxlength)) {
  19114. this.$emit("finish", value2);
  19115. }
  19116. }
  19117. }
  19118. };
  19119. function _sfc_render$1J(_ctx, _cache, $props, $setup, $data, $options) {
  19120. return vue.openBlock(), vue.createElementBlock("view", { class: "u-code-input" }, [
  19121. (vue.openBlock(true), vue.createElementBlock(
  19122. vue.Fragment,
  19123. null,
  19124. vue.renderList($options.codeLength, (item, index2) => {
  19125. return vue.openBlock(), vue.createElementBlock(
  19126. "view",
  19127. {
  19128. class: "u-code-input__item",
  19129. style: vue.normalizeStyle([$options.itemStyle(index2)]),
  19130. key: index2
  19131. },
  19132. [
  19133. _ctx.dot && $options.codeArray.length > index2 ? (vue.openBlock(), vue.createElementBlock("view", {
  19134. key: 0,
  19135. class: "u-code-input__item__dot"
  19136. })) : (vue.openBlock(), vue.createElementBlock(
  19137. "text",
  19138. {
  19139. key: 1,
  19140. style: vue.normalizeStyle({
  19141. fontSize: $options.addUnit(_ctx.fontSize),
  19142. fontWeight: _ctx.bold ? "bold" : "normal",
  19143. color: _ctx.color
  19144. })
  19145. },
  19146. vue.toDisplayString($options.codeArray[index2]),
  19147. 5
  19148. /* TEXT, STYLE */
  19149. )),
  19150. _ctx.mode === "line" ? (vue.openBlock(), vue.createElementBlock(
  19151. "view",
  19152. {
  19153. key: 2,
  19154. class: "u-code-input__item__line",
  19155. style: vue.normalizeStyle([$options.lineStyle])
  19156. },
  19157. null,
  19158. 4
  19159. /* STYLE */
  19160. )) : vue.createCommentVNode("v-if", true),
  19161. $data.isFocus && $options.codeArray.length === index2 ? (vue.openBlock(), vue.createElementBlock(
  19162. "view",
  19163. {
  19164. key: 3,
  19165. style: vue.normalizeStyle({ backgroundColor: _ctx.color }),
  19166. class: "u-code-input__item__cursor"
  19167. },
  19168. null,
  19169. 4
  19170. /* STYLE */
  19171. )) : vue.createCommentVNode("v-if", true)
  19172. ],
  19173. 4
  19174. /* STYLE */
  19175. );
  19176. }),
  19177. 128
  19178. /* KEYED_FRAGMENT */
  19179. )),
  19180. vue.createElementVNode("input", {
  19181. disabled: _ctx.disabledKeyboard,
  19182. type: "number",
  19183. focus: _ctx.focus,
  19184. value: $data.inputValue,
  19185. maxlength: _ctx.maxlength,
  19186. adjustPosition: _ctx.adjustPosition,
  19187. class: "u-code-input__input",
  19188. onInput: _cache[0] || (_cache[0] = (...args) => $options.inputHandler && $options.inputHandler(...args)),
  19189. style: vue.normalizeStyle({
  19190. height: $options.addUnit(_ctx.size)
  19191. }),
  19192. onFocus: _cache[1] || (_cache[1] = ($event) => $data.isFocus = true),
  19193. onBlur: _cache[2] || (_cache[2] = ($event) => $data.isFocus = false)
  19194. }, null, 44, ["disabled", "focus", "value", "maxlength", "adjustPosition"])
  19195. ]);
  19196. }
  19197. const uCodeInput = /* @__PURE__ */ _export_sfc(_sfc_main$1K, [["render", _sfc_render$1J], ["__scopeId", "data-v-10e44dac"], ["__file", "C:/Users/EDY/Desktop/项目/shuibei/uni_modules/uview-plus/components/u-code-input/u-code-input.vue"]]);
  19198. const __vite_glob_0_22 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
  19199. __proto__: null,
  19200. default: uCodeInput
  19201. }, Symbol.toStringTag, { value: "Module" }));
  19202. const props$18 = defineMixin({
  19203. props: {
  19204. // 倒计时总秒数
  19205. seconds: {
  19206. type: [String, Number],
  19207. default: () => props$1x.code.seconds
  19208. },
  19209. // 尚未开始时提示
  19210. startText: {
  19211. type: String,
  19212. default: () => props$1x.code.startText
  19213. },
  19214. // 正在倒计时中的提示
  19215. changeText: {
  19216. type: String,
  19217. default: () => props$1x.code.changeText
  19218. },
  19219. // 倒计时结束时的提示
  19220. endText: {
  19221. type: String,
  19222. default: () => props$1x.code.endText
  19223. },
  19224. // 是否在H5刷新或各端返回再进入时继续倒计时
  19225. keepRunning: {
  19226. type: Boolean,
  19227. default: () => props$1x.code.keepRunning
  19228. },
  19229. // 为了区分多个页面,或者一个页面多个倒计时组件本地存储的继续倒计时变了
  19230. uniqueKey: {
  19231. type: String,
  19232. default: () => props$1x.code.uniqueKey
  19233. }
  19234. }
  19235. });
  19236. const _sfc_main$1J = {
  19237. name: "u-code",
  19238. mixins: [mpMixin, mixin, props$18],
  19239. data() {
  19240. return {
  19241. secNum: this.seconds,
  19242. timer: null,
  19243. canGetCode: true
  19244. // 是否可以执行验证码操作
  19245. };
  19246. },
  19247. mounted() {
  19248. this.checkKeepRunning();
  19249. },
  19250. watch: {
  19251. seconds: {
  19252. immediate: true,
  19253. handler(n2) {
  19254. this.secNum = n2;
  19255. }
  19256. }
  19257. },
  19258. emits: ["start", "end", "change"],
  19259. methods: {
  19260. checkKeepRunning() {
  19261. let lastTimestamp = Number(uni.getStorageSync(this.uniqueKey + "_$uCountDownTimestamp"));
  19262. if (!lastTimestamp)
  19263. return this.changeEvent(this.startText);
  19264. let nowTimestamp = Math.floor(+/* @__PURE__ */ new Date() / 1e3);
  19265. if (this.keepRunning && lastTimestamp && lastTimestamp > nowTimestamp) {
  19266. this.secNum = lastTimestamp - nowTimestamp;
  19267. uni.removeStorageSync(this.uniqueKey + "_$uCountDownTimestamp");
  19268. this.start();
  19269. } else {
  19270. this.changeEvent(this.startText);
  19271. }
  19272. },
  19273. // 开始倒计时
  19274. start() {
  19275. if (this.timer) {
  19276. clearInterval(this.timer);
  19277. this.timer = null;
  19278. }
  19279. this.$emit("start");
  19280. this.canGetCode = false;
  19281. this.changeEvent(this.changeText.replace(/x|X/, this.secNum));
  19282. this.timer = setInterval(() => {
  19283. if (--this.secNum) {
  19284. this.changeEvent(this.changeText.replace(/x|X/, this.secNum));
  19285. } else {
  19286. clearInterval(this.timer);
  19287. this.timer = null;
  19288. this.changeEvent(this.endText);
  19289. this.secNum = this.seconds;
  19290. this.$emit("end");
  19291. this.canGetCode = true;
  19292. }
  19293. }, 1e3);
  19294. this.setTimeToStorage();
  19295. },
  19296. // 重置,可以让用户再次获取验证码
  19297. reset() {
  19298. this.canGetCode = true;
  19299. clearInterval(this.timer);
  19300. this.secNum = this.seconds;
  19301. this.changeEvent(this.endText);
  19302. },
  19303. changeEvent(text) {
  19304. this.$emit("change", text);
  19305. },
  19306. // 保存时间戳,为了防止倒计时尚未结束,H5刷新或者各端的右上角返回上一页再进来
  19307. setTimeToStorage() {
  19308. if (!this.keepRunning || !this.timer)
  19309. return;
  19310. if (this.secNum > 0 && this.secNum <= this.seconds) {
  19311. let nowTimestamp = Math.floor(+/* @__PURE__ */ new Date() / 1e3);
  19312. uni.setStorage({
  19313. key: this.uniqueKey + "_$uCountDownTimestamp",
  19314. data: nowTimestamp + Number(this.secNum)
  19315. });
  19316. }
  19317. }
  19318. },
  19319. // 组件销毁的时候,清除定时器,否则定时器会继续存在,系统不会自动清除
  19320. beforeUnmount() {
  19321. this.setTimeToStorage();
  19322. clearTimeout(this.timer);
  19323. this.timer = null;
  19324. }
  19325. };
  19326. function _sfc_render$1I(_ctx, _cache, $props, $setup, $data, $options) {
  19327. return vue.openBlock(), vue.createElementBlock("view", { class: "u-code" }, [
  19328. vue.createCommentVNode(" 此组件功能由js完成,无需写html逻辑 ")
  19329. ]);
  19330. }
  19331. const uCode = /* @__PURE__ */ _export_sfc(_sfc_main$1J, [["render", _sfc_render$1I], ["__file", "C:/Users/EDY/Desktop/项目/shuibei/uni_modules/uview-plus/components/u-code/u-code.vue"]]);
  19332. const __vite_glob_0_23 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
  19333. __proto__: null,
  19334. default: uCode
  19335. }, Symbol.toStringTag, { value: "Module" }));
  19336. const props$17 = defineMixin({
  19337. props: {
  19338. // 占父容器宽度的多少等分,总分为12份
  19339. span: {
  19340. type: [String, Number],
  19341. default: () => props$1x.col.span
  19342. },
  19343. // 指定栅格左侧的间隔数(总12栏)
  19344. offset: {
  19345. type: [String, Number],
  19346. default: () => props$1x.col.offset
  19347. },
  19348. // 水平排列方式,可选值为`start`(或`flex-start`)、`end`(或`flex-end`)、`center`、`around`(或`space-around`)、`between`(或`space-between`)
  19349. justify: {
  19350. type: String,
  19351. default: () => props$1x.col.justify
  19352. },
  19353. // 垂直对齐方式,可选值为top、center、bottom、stretch
  19354. align: {
  19355. type: String,
  19356. default: () => props$1x.col.align
  19357. },
  19358. // 文字对齐方式
  19359. textAlign: {
  19360. type: String,
  19361. default: () => props$1x.col.textAlign
  19362. }
  19363. }
  19364. });
  19365. const _sfc_main$1I = {
  19366. name: "u-col",
  19367. mixins: [mpMixin, mixin, props$17],
  19368. data() {
  19369. return {
  19370. width: 0,
  19371. parentData: {
  19372. gutter: 0
  19373. },
  19374. gridNum: 12
  19375. };
  19376. },
  19377. // 微信小程序中 options 选项
  19378. options: {
  19379. virtualHost: true
  19380. // 将自定义节点设置成虚拟的,更加接近Vue组件的表现。我们不希望自定义组件的这个节点本身可以设置样式、响应 flex 布局等
  19381. },
  19382. computed: {
  19383. uJustify() {
  19384. if (this.justify == "end" || this.justify == "start")
  19385. return "flex-" + this.justify;
  19386. else if (this.justify == "around" || this.justify == "between")
  19387. return "space-" + this.justify;
  19388. else
  19389. return this.justify;
  19390. },
  19391. uAlignItem() {
  19392. if (this.align == "top")
  19393. return "flex-start";
  19394. if (this.align == "bottom")
  19395. return "flex-end";
  19396. else
  19397. return this.align;
  19398. },
  19399. colStyle() {
  19400. const style = {
  19401. // 这里写成"padding: 0 10px"的形式是因为nvue的需要
  19402. paddingLeft: addUnit(getPx(this.parentData.gutter) / 2),
  19403. paddingRight: addUnit(getPx(this.parentData.gutter) / 2),
  19404. alignItems: this.uAlignItem,
  19405. justifyContent: this.uJustify,
  19406. textAlign: this.textAlign,
  19407. // 在非nvue上,使用百分比形式
  19408. flex: `0 0 ${100 / this.gridNum * this.span}%`,
  19409. marginLeft: 100 / 12 * this.offset + "%"
  19410. };
  19411. return deepMerge$1(style, addStyle(this.customStyle));
  19412. }
  19413. },
  19414. mounted() {
  19415. this.init();
  19416. },
  19417. emits: ["click"],
  19418. methods: {
  19419. async init() {
  19420. this.updateParentData();
  19421. this.width = await this.parent.getComponentWidth();
  19422. },
  19423. updateParentData() {
  19424. this.getParentData("u-row");
  19425. },
  19426. clickHandler(e2) {
  19427. this.$emit("click");
  19428. }
  19429. }
  19430. };
  19431. function _sfc_render$1H(_ctx, _cache, $props, $setup, $data, $options) {
  19432. return vue.openBlock(), vue.createElementBlock(
  19433. "view",
  19434. {
  19435. class: vue.normalizeClass(["u-col", [
  19436. "u-col-" + _ctx.span
  19437. ]]),
  19438. ref: "u-col",
  19439. style: vue.normalizeStyle([$options.colStyle]),
  19440. onClick: _cache[0] || (_cache[0] = (...args) => $options.clickHandler && $options.clickHandler(...args))
  19441. },
  19442. [
  19443. vue.renderSlot(_ctx.$slots, "default", {}, void 0, true)
  19444. ],
  19445. 6
  19446. /* CLASS, STYLE */
  19447. );
  19448. }
  19449. const uCol = /* @__PURE__ */ _export_sfc(_sfc_main$1I, [["render", _sfc_render$1H], ["__scopeId", "data-v-2ae1a870"], ["__file", "C:/Users/EDY/Desktop/项目/shuibei/uni_modules/uview-plus/components/u-col/u-col.vue"]]);
  19450. const __vite_glob_0_24 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
  19451. __proto__: null,
  19452. default: uCol
  19453. }, Symbol.toStringTag, { value: "Module" }));
  19454. const props$16 = defineMixin({
  19455. props: {
  19456. // 标题
  19457. title: {
  19458. type: String,
  19459. default: () => props$1x.collapseItem.title
  19460. },
  19461. // 标题的样式
  19462. titleStyle: {
  19463. type: [Object, String],
  19464. default: () => {
  19465. return props$1x.collapseItem.titleStyle;
  19466. }
  19467. },
  19468. // 标题右侧内容
  19469. value: {
  19470. type: String,
  19471. default: () => props$1x.collapseItem.value
  19472. },
  19473. // 标题下方的描述信息
  19474. label: {
  19475. type: String,
  19476. default: () => props$1x.collapseItem.label
  19477. },
  19478. // 是否禁用折叠面板
  19479. disabled: {
  19480. type: Boolean,
  19481. default: () => props$1x.collapseItem.disabled
  19482. },
  19483. // 是否展示右侧箭头并开启点击反馈
  19484. isLink: {
  19485. type: Boolean,
  19486. default: () => props$1x.collapseItem.isLink
  19487. },
  19488. // 是否开启点击反馈
  19489. clickable: {
  19490. type: Boolean,
  19491. default: () => props$1x.collapseItem.clickable
  19492. },
  19493. // 是否显示内边框
  19494. border: {
  19495. type: Boolean,
  19496. default: () => props$1x.collapseItem.border
  19497. },
  19498. // 标题的对齐方式
  19499. align: {
  19500. type: String,
  19501. default: () => props$1x.collapseItem.align
  19502. },
  19503. // 唯一标识符
  19504. name: {
  19505. type: [String, Number],
  19506. default: () => props$1x.collapseItem.name
  19507. },
  19508. // 标题左侧图片,可为绝对路径的图片或内置图标
  19509. icon: {
  19510. type: String,
  19511. default: () => props$1x.collapseItem.icon
  19512. },
  19513. // 面板展开收起的过渡时间,单位ms
  19514. duration: {
  19515. type: Number,
  19516. default: () => props$1x.collapseItem.duration
  19517. },
  19518. // 显示右侧图标
  19519. showRight: {
  19520. type: Boolean,
  19521. default: () => props$1x.collapseItem.showRight
  19522. },
  19523. // 左侧图标样式
  19524. iconStyle: {
  19525. type: [Object, String],
  19526. default: () => {
  19527. return props$1x.collapseItem.iconStyle;
  19528. }
  19529. },
  19530. // 右侧箭头图标的样式
  19531. rightIconStyle: {
  19532. type: [Object, String],
  19533. default: () => {
  19534. return props$1x.collapseItem.rightIconStyle;
  19535. }
  19536. },
  19537. cellCustomStyle: {
  19538. type: [Object, String],
  19539. default: () => {
  19540. return props$1x.collapseItem.cellCustomStyle;
  19541. }
  19542. },
  19543. cellCustomClass: {
  19544. type: String,
  19545. default: () => props$1x.collapseItem.cellCustomClass
  19546. }
  19547. }
  19548. });
  19549. const _sfc_main$1H = {
  19550. name: "u-collapse-item",
  19551. mixins: [mpMixin, mixin, props$16],
  19552. data() {
  19553. return {
  19554. elId: guid(),
  19555. // uni.createAnimation的导出数据
  19556. animationData: {},
  19557. // 是否展开状态
  19558. expanded: false,
  19559. // 根据expanded确定是否显示border,为了控制展开时,cell的下划线更好的显示效果,进行一定时间的延时
  19560. showBorder: false,
  19561. // 是否动画中,如果是则不允许继续触发点击
  19562. animating: false,
  19563. // 父组件u-collapse的参数
  19564. parentData: {
  19565. accordion: false,
  19566. border: false
  19567. }
  19568. };
  19569. },
  19570. watch: {
  19571. expanded(n2) {
  19572. clearTimeout(this.timer);
  19573. this.timer = null;
  19574. this.timer = setTimeout(() => {
  19575. this.showBorder = n2;
  19576. }, n2 ? 10 : 290);
  19577. }
  19578. },
  19579. mounted() {
  19580. this.init();
  19581. },
  19582. methods: {
  19583. // 异步获取内容,或者动态修改了内容时,需要重新初始化
  19584. async init() {
  19585. this.updateParentData();
  19586. if (!this.parent) {
  19587. return error("u-collapse-item必须要搭配u-collapse组件使用");
  19588. }
  19589. const {
  19590. value: value2,
  19591. accordion,
  19592. children = []
  19593. } = this.parent;
  19594. if (accordion) {
  19595. if (test.array(value2)) {
  19596. return error("手风琴模式下,u-collapse组件的value参数不能为数组");
  19597. }
  19598. this.expanded = this.name == value2;
  19599. } else {
  19600. if (!test.array(value2) && value2 !== null) {
  19601. return error("非手风琴模式下,u-collapse组件的value参数必须为数组");
  19602. }
  19603. this.expanded = (value2 || []).some((item) => item == this.name);
  19604. }
  19605. await vue.nextTick();
  19606. this.setContentAnimate();
  19607. },
  19608. updateParentData() {
  19609. this.getParentData("u-collapse");
  19610. },
  19611. async setContentAnimate() {
  19612. const rect = await this.queryRect();
  19613. const height = this.expanded ? rect.height : 0;
  19614. this.animating = true;
  19615. const animation2 = uni.createAnimation({
  19616. timingFunction: "ease-in-out"
  19617. });
  19618. animation2.height(height).step({
  19619. duration: this.duration
  19620. }).step();
  19621. this.animationData = animation2.export();
  19622. sleep(this.duration).then(() => {
  19623. this.animating = false;
  19624. });
  19625. },
  19626. // 点击collapsehead头部
  19627. clickHandler() {
  19628. if (this.disabled && this.animating)
  19629. return;
  19630. this.parent && this.parent.onChange(this);
  19631. },
  19632. // 查询内容高度
  19633. queryRect() {
  19634. return new Promise((resolve) => {
  19635. this.$uGetRect(`#${this.elId}`).then((size) => {
  19636. resolve(size);
  19637. });
  19638. });
  19639. }
  19640. }
  19641. };
  19642. function _sfc_render$1G(_ctx, _cache, $props, $setup, $data, $options) {
  19643. const _component_up_icon = vue.resolveComponent("up-icon");
  19644. const _component_u_cell = resolveEasycom(vue.resolveDynamicComponent("u-cell"), __easycom_0$7);
  19645. const _component_u_line = resolveEasycom(vue.resolveDynamicComponent("u-line"), __easycom_1$4);
  19646. return vue.openBlock(), vue.createElementBlock("view", { class: "u-collapse-item" }, [
  19647. vue.createVNode(_component_u_cell, {
  19648. title: _ctx.$slots.title ? "" : _ctx.title,
  19649. value: _ctx.value,
  19650. label: _ctx.label,
  19651. icon: _ctx.icon,
  19652. isLink: _ctx.isLink,
  19653. clickable: _ctx.clickable,
  19654. border: $data.parentData.border && $data.showBorder,
  19655. onClick: $options.clickHandler,
  19656. arrowDirection: $data.expanded ? "up" : "down",
  19657. disabled: _ctx.disabled,
  19658. customClass: _ctx.cellCustomClass,
  19659. customStyle: _ctx.cellCustomStyle
  19660. }, {
  19661. title: vue.withCtx(() => [
  19662. vue.renderSlot(_ctx.$slots, "title", {}, () => [
  19663. !_ctx.$slots.title && _ctx.title ? (vue.openBlock(), vue.createElementBlock(
  19664. "text",
  19665. { key: 0 },
  19666. vue.toDisplayString(_ctx.title),
  19667. 1
  19668. /* TEXT */
  19669. )) : vue.createCommentVNode("v-if", true)
  19670. ], true)
  19671. ]),
  19672. icon: vue.withCtx(() => [
  19673. vue.renderSlot(_ctx.$slots, "icon", {}, () => [
  19674. !_ctx.$slots.icon && _ctx.icon ? (vue.openBlock(), vue.createBlock(_component_up_icon, {
  19675. key: 0,
  19676. size: 22,
  19677. name: _ctx.icon
  19678. }, null, 8, ["name"])) : vue.createCommentVNode("v-if", true)
  19679. ], true)
  19680. ]),
  19681. value: vue.withCtx(() => [
  19682. vue.renderSlot(_ctx.$slots, "value", {}, () => [
  19683. !_ctx.$slots.value && _ctx.value ? (vue.openBlock(), vue.createElementBlock(
  19684. "text",
  19685. { key: 0 },
  19686. vue.toDisplayString(_ctx.value),
  19687. 1
  19688. /* TEXT */
  19689. )) : vue.createCommentVNode("v-if", true)
  19690. ], true)
  19691. ]),
  19692. "right-icon": vue.withCtx(() => [
  19693. _ctx.showRight ? (vue.openBlock(), vue.createElementBlock(
  19694. vue.Fragment,
  19695. { key: 0 },
  19696. [
  19697. !_ctx.$slots["right-icon"] ? (vue.openBlock(), vue.createBlock(_component_up_icon, {
  19698. key: 0,
  19699. size: 16,
  19700. name: "arrow-right"
  19701. })) : vue.createCommentVNode("v-if", true),
  19702. vue.renderSlot(_ctx.$slots, "right-icon", {}, void 0, true)
  19703. ],
  19704. 64
  19705. /* STABLE_FRAGMENT */
  19706. )) : vue.createCommentVNode("v-if", true)
  19707. ]),
  19708. _: 3
  19709. /* FORWARDED */
  19710. }, 8, ["title", "value", "label", "icon", "isLink", "clickable", "border", "onClick", "arrowDirection", "disabled", "customClass", "customStyle"]),
  19711. vue.createElementVNode("view", {
  19712. class: "u-collapse-item__content",
  19713. animation: $data.animationData,
  19714. ref: "animation"
  19715. }, [
  19716. vue.createElementVNode("view", {
  19717. class: "u-collapse-item__content__text content-class",
  19718. id: $data.elId,
  19719. ref: $data.elId
  19720. }, [
  19721. vue.renderSlot(_ctx.$slots, "default", {}, void 0, true)
  19722. ], 8, ["id"])
  19723. ], 8, ["animation"]),
  19724. $data.parentData.border ? (vue.openBlock(), vue.createBlock(_component_u_line, { key: 0 })) : vue.createCommentVNode("v-if", true)
  19725. ]);
  19726. }
  19727. const uCollapseItem = /* @__PURE__ */ _export_sfc(_sfc_main$1H, [["render", _sfc_render$1G], ["__scopeId", "data-v-82f3baf9"], ["__file", "C:/Users/EDY/Desktop/项目/shuibei/uni_modules/uview-plus/components/u-collapse-item/u-collapse-item.vue"]]);
  19728. const __vite_glob_0_25 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
  19729. __proto__: null,
  19730. default: uCollapseItem
  19731. }, Symbol.toStringTag, { value: "Module" }));
  19732. const props$15 = defineMixin({
  19733. props: {
  19734. // 当前展开面板的name,非手风琴模式:[<string | number>],手风琴模式:string | number
  19735. value: {
  19736. type: [String, Number, Array, null],
  19737. default: () => props$1x.collapse.value
  19738. },
  19739. // 是否手风琴模式
  19740. accordion: {
  19741. type: Boolean,
  19742. default: () => props$1x.collapse.accordion
  19743. },
  19744. // 是否显示外边框
  19745. border: {
  19746. type: Boolean,
  19747. default: () => props$1x.collapse.border
  19748. }
  19749. }
  19750. });
  19751. const _sfc_main$1G = {
  19752. name: "u-collapse",
  19753. mixins: [mpMixin, mixin, props$15],
  19754. watch: {
  19755. needInit() {
  19756. this.init();
  19757. },
  19758. // 当父组件需要子组件需要共享的参数发生了变化,手动通知子组件
  19759. parentData() {
  19760. if (this.children.length) {
  19761. this.children.map((child) => {
  19762. typeof child.updateParentData === "function" && child.updateParentData();
  19763. });
  19764. }
  19765. }
  19766. },
  19767. created() {
  19768. this.children = [];
  19769. },
  19770. computed: {
  19771. needInit() {
  19772. return [this.accordion, this.value];
  19773. }
  19774. },
  19775. emits: ["open", "close", "change"],
  19776. methods: {
  19777. // 重新初始化一次内部的所有子元素
  19778. init() {
  19779. this.children.map((child) => {
  19780. child.init();
  19781. });
  19782. },
  19783. /**
  19784. * collapse-item被点击时触发,由collapse统一处理各子组件的状态
  19785. * @param {Object} target 被操作的面板的实例
  19786. */
  19787. onChange(target) {
  19788. let changeArr = [];
  19789. this.children.map((child, index2) => {
  19790. if (this.accordion) {
  19791. child.expanded = child === target ? !target.expanded : false;
  19792. child.setContentAnimate();
  19793. } else {
  19794. if (child === target) {
  19795. child.expanded = !child.expanded;
  19796. child.setContentAnimate();
  19797. }
  19798. }
  19799. changeArr.push({
  19800. // 如果没有定义name属性,则默认返回组件的index索引
  19801. name: child.name || index2,
  19802. status: child.expanded ? "open" : "close"
  19803. });
  19804. });
  19805. this.$emit("change", changeArr);
  19806. this.$emit(target.expanded ? "open" : "close", target.name);
  19807. }
  19808. }
  19809. };
  19810. function _sfc_render$1F(_ctx, _cache, $props, $setup, $data, $options) {
  19811. const _component_u_line = resolveEasycom(vue.resolveDynamicComponent("u-line"), __easycom_1$4);
  19812. return vue.openBlock(), vue.createElementBlock("view", { class: "u-collapse" }, [
  19813. _ctx.border ? (vue.openBlock(), vue.createBlock(_component_u_line, { key: 0 })) : vue.createCommentVNode("v-if", true),
  19814. vue.renderSlot(_ctx.$slots, "default")
  19815. ]);
  19816. }
  19817. const uCollapse = /* @__PURE__ */ _export_sfc(_sfc_main$1G, [["render", _sfc_render$1F], ["__file", "C:/Users/EDY/Desktop/项目/shuibei/uni_modules/uview-plus/components/u-collapse/u-collapse.vue"]]);
  19818. const __vite_glob_0_26 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
  19819. __proto__: null,
  19820. default: uCollapse
  19821. }, Symbol.toStringTag, { value: "Module" }));
  19822. const _sfc_main$1F = {
  19823. name: "up-color-picker",
  19824. props: {
  19825. // 初始颜色值
  19826. modelValue: {
  19827. type: String,
  19828. default: "#ff0000"
  19829. },
  19830. // 常用颜色列表
  19831. commonColors: {
  19832. type: Array,
  19833. default: () => []
  19834. }
  19835. },
  19836. data() {
  19837. return {
  19838. show: false,
  19839. // 颜色类型索引:0-纯色,1-渐变色
  19840. colorTypeIndex: 0,
  19841. // 纯色相关数据
  19842. hue: 0,
  19843. saturation: 100,
  19844. lightness: 50,
  19845. alpha: 1,
  19846. saturationPosition: { x: 150, y: 0 },
  19847. huePosition: 0,
  19848. alphaPosition: 0,
  19849. // 将在initColor中设置为最右侧
  19850. // 渐变色相关数据
  19851. gradientColors: [
  19852. { color: "#ff0000", percent: 0 },
  19853. { color: "#0000ff", percent: 1 }
  19854. ],
  19855. gradientDirections: [
  19856. { label: "从左到右", value: "to right" },
  19857. { label: "从上到下", value: "to bottom" },
  19858. { label: "从左上到右下", value: "to bottom right" },
  19859. { label: "从右上到左下", value: "to bottom left" }
  19860. ],
  19861. currentDirection: { label: "从左到右", value: "to right" },
  19862. showDirectionPicker: false,
  19863. // 当前选中颜色
  19864. currentColor: "#ff0000",
  19865. // 渐变色控制相关
  19866. draggingPointerIndex: -1,
  19867. directionPointer: { x: 20, y: 20 },
  19868. // 默认向右(在圆的右侧)
  19869. // 渐变节点颜色修改相关
  19870. editingGradientIndex: -1,
  19871. // 保存纯色和渐变色的各自状态
  19872. solidColorState: {
  19873. hue: 0,
  19874. saturation: 100,
  19875. lightness: 50,
  19876. alpha: 1,
  19877. saturationPosition: { x: 150, y: 0 },
  19878. huePosition: 0,
  19879. alphaPosition: 0,
  19880. // 将在initColor中设置为最右侧
  19881. currentColor: "#ff0000"
  19882. },
  19883. gradientColorState: {
  19884. gradientColors: [
  19885. { color: "#ff0000", percent: 0 },
  19886. { color: "#0000ff", percent: 1 }
  19887. ],
  19888. currentDirection: { label: "从左到右", value: "to right" },
  19889. directionPointer: { x: 100, y: 0 }
  19890. },
  19891. // 区分预览类型:solid-纯色预览,gradient-整体渐变预览,gradient-point-渐变点预览
  19892. previewType: "solid"
  19893. };
  19894. },
  19895. computed: {
  19896. // 渐变色样式
  19897. gradientStyle() {
  19898. const colors = this.gradientColors.map((item) => `${item.color} ${Math.round(item.percent * 100)}%`).join(", ");
  19899. return `linear-gradient(${this.currentDirection.value}, ${colors})`;
  19900. },
  19901. // 显示的颜色预览值
  19902. displayColor() {
  19903. if (this.previewType === "gradient-point" && this.editingGradientIndex >= 0) {
  19904. return this.gradientColors[this.editingGradientIndex].color;
  19905. }
  19906. formatAppLog("log", "at uni_modules/uview-plus/components/u-color-picker/u-color-picker.vue:251", this.editingGradientIndex);
  19907. return this.currentColor;
  19908. }
  19909. },
  19910. watch: {
  19911. show(newVal) {
  19912. if (newVal) {
  19913. this.initColor();
  19914. }
  19915. },
  19916. colorTypeIndex(newVal) {
  19917. if (newVal == 0) {
  19918. this.editingGradientIndex = -1;
  19919. }
  19920. }
  19921. },
  19922. mounted() {
  19923. this.initColor();
  19924. },
  19925. emits: ["update:modelValue", "confirm", "close"],
  19926. methods: {
  19927. // 初始化颜色
  19928. initColor() {
  19929. if (this.modelValue) {
  19930. this.currentColor = this.modelValue;
  19931. if (this.modelValue.includes("linear-gradient")) {
  19932. this.colorTypeIndex = 1;
  19933. this.parseGradientColor(this.modelValue);
  19934. this.previewType = "gradient";
  19935. } else {
  19936. this.colorTypeIndex = 0;
  19937. this.parseSolidColor(this.modelValue);
  19938. this.previewType = "solid";
  19939. }
  19940. }
  19941. this.initDirectionPointer();
  19942. this.initAlphaPosition();
  19943. },
  19944. // 初始化alpha位置为最右侧
  19945. async initAlphaPosition() {
  19946. const query = uni.createSelectorQuery().in(this);
  19947. query.select(".up-color-picker__alpha").boundingClientRect();
  19948. await this.$nextTick();
  19949. query.exec((res) => {
  19950. const rect = res[0];
  19951. if (rect) {
  19952. this.alphaPosition = rect.width || 150;
  19953. } else {
  19954. this.alphaPosition = 150;
  19955. }
  19956. this.solidColorState.alphaPosition = this.alphaPosition;
  19957. this.updateSolidColor();
  19958. });
  19959. },
  19960. // 初始化方向指针位置
  19961. initDirectionPointer() {
  19962. const angle = this.getDirectionAngle(this.currentDirection.value);
  19963. this.setDirectionPointerByAngle(angle);
  19964. },
  19965. // 根据方向值获取角度
  19966. getDirectionAngle(direction) {
  19967. switch (direction) {
  19968. case "to right":
  19969. return 0;
  19970. case "to bottom":
  19971. return 90;
  19972. case "to left":
  19973. return 180;
  19974. case "to top":
  19975. return 270;
  19976. case "to bottom right":
  19977. return 45;
  19978. case "to bottom left":
  19979. return 135;
  19980. case "to top left":
  19981. return 225;
  19982. case "to top right":
  19983. return 315;
  19984. default:
  19985. return 0;
  19986. }
  19987. },
  19988. // 根据角度设置方向指针位置
  19989. setDirectionPointerByAngle(angle) {
  19990. const radian = angle * Math.PI / 180;
  19991. const radius = 20;
  19992. this.directionPointer = {
  19993. x: radius * Math.cos(radian) + 20,
  19994. // 20是圆心位置
  19995. y: radius * Math.sin(radian) + 20
  19996. };
  19997. },
  19998. // 打开颜色选择器以修改渐变节点颜色
  19999. openColorPickerForGradient(index2) {
  20000. this.editingGradientIndex = index2;
  20001. const color2 = this.gradientColors[index2].color;
  20002. this.currentColor = color2;
  20003. this.previewType = "gradient-point";
  20004. if (!color2.includes("linear-gradient")) {
  20005. this.colorTypeIndex = 0;
  20006. this.parseSolidColor(color2);
  20007. this.gradientColorState = {
  20008. gradientColors: [...this.gradientColors],
  20009. currentDirection: { ...this.currentDirection },
  20010. directionPointer: { ...this.directionPointer }
  20011. };
  20012. }
  20013. },
  20014. // 解析纯色
  20015. parseSolidColor(color2) {
  20016. this.currentColor = color2;
  20017. if (this.editingGradientIndex >= 0) {
  20018. this.gradientColors[this.editingGradientIndex].color = color2;
  20019. this.colorTypeIndex = 1;
  20020. Object.assign(this, this.solidColorState);
  20021. this.previewType = "gradient-point";
  20022. } else {
  20023. this.previewType = "solid";
  20024. }
  20025. },
  20026. // 解析渐变色
  20027. parseGradientColor(gradient) {
  20028. this.currentColor = gradient;
  20029. },
  20030. // 切换颜色类型
  20031. changeColorType(index2) {
  20032. if (this.colorTypeIndex === 0) {
  20033. this.solidColorState = {
  20034. hue: this.hue,
  20035. saturation: this.saturation,
  20036. lightness: this.lightness,
  20037. alpha: this.alpha,
  20038. saturationPosition: { ...this.saturationPosition },
  20039. huePosition: this.huePosition,
  20040. alphaPosition: this.alphaPosition,
  20041. currentColor: this.currentColor
  20042. };
  20043. } else {
  20044. this.gradientColorState = {
  20045. gradientColors: [...this.gradientColors],
  20046. currentDirection: { ...this.currentDirection },
  20047. directionPointer: { ...this.directionPointer }
  20048. };
  20049. }
  20050. this.colorTypeIndex = index2;
  20051. if (index2 === 0) {
  20052. Object.assign(this, this.solidColorState);
  20053. this.previewType = "solid";
  20054. } else {
  20055. Object.assign(this, this.gradientColorState);
  20056. this.gradientColors = [...this.gradientColorState.gradientColors];
  20057. this.previewType = "gradient";
  20058. }
  20059. },
  20060. // 饱和度和明度触摸开始
  20061. onSaturationTouchStart(e2) {
  20062. this.updateSaturationPosition(e2);
  20063. },
  20064. // 饱和度和明度触摸移动
  20065. onSaturationTouchMove(e2) {
  20066. this.updateSaturationPosition(e2);
  20067. },
  20068. // 饱和度和明度触摸结束
  20069. onSaturationTouchEnd(e2) {
  20070. this.updateSaturationPosition(e2);
  20071. },
  20072. // 更新饱和度和明度位置
  20073. updateSaturationPosition(e2) {
  20074. const touch = e2.touches[0] || e2.changedTouches[0];
  20075. e2.currentTarget;
  20076. const query = uni.createSelectorQuery().in(this);
  20077. query.select(".up-color-picker__saturation").boundingClientRect();
  20078. query.exec((res) => {
  20079. const rect = res[0];
  20080. if (rect) {
  20081. let x2 = touch.clientX - rect.left;
  20082. let y2 = touch.clientY - rect.top;
  20083. x2 = Math.max(0, Math.min(x2, rect.width));
  20084. y2 = Math.max(0, Math.min(y2, rect.height));
  20085. this.saturationPosition = { x: x2, y: y2 };
  20086. this.updateSolidColor();
  20087. }
  20088. });
  20089. },
  20090. // 色相触摸开始
  20091. onHueTouchStart(e2) {
  20092. this.updateHuePosition(e2);
  20093. },
  20094. // 色相触摸移动
  20095. onHueTouchMove(e2) {
  20096. this.updateHuePosition(e2);
  20097. },
  20098. // 色相触摸结束
  20099. onHueTouchEnd(e2) {
  20100. this.updateHuePosition(e2);
  20101. },
  20102. // 更新色相位置
  20103. updateHuePosition(e2) {
  20104. const touch = e2.touches[0] || e2.changedTouches[0];
  20105. e2.currentTarget;
  20106. const query = uni.createSelectorQuery().in(this);
  20107. query.select(".up-color-picker__hue").boundingClientRect();
  20108. query.exec((res) => {
  20109. const rect = res[0];
  20110. if (rect) {
  20111. let x2 = touch.clientX - rect.left;
  20112. x2 = Math.max(0, Math.min(x2, rect.width));
  20113. this.huePosition = x2;
  20114. this.hue = Math.round(x2 / rect.width * 360);
  20115. this.updateSolidColor();
  20116. }
  20117. });
  20118. },
  20119. // 透明度触摸开始
  20120. onAlphaTouchStart(e2) {
  20121. this.updateAlphaPosition(e2);
  20122. },
  20123. // 透明度触摸移动
  20124. onAlphaTouchMove(e2) {
  20125. this.updateAlphaPosition(e2);
  20126. },
  20127. // 透明度触摸结束
  20128. onAlphaTouchEnd(e2) {
  20129. this.updateAlphaPosition(e2);
  20130. },
  20131. // 更新透明度位置
  20132. updateAlphaPosition(e2) {
  20133. const touch = e2.touches[0] || e2.changedTouches[0];
  20134. e2.currentTarget;
  20135. const query = uni.createSelectorQuery().in(this);
  20136. query.select(".up-color-picker__alpha").boundingClientRect();
  20137. query.exec((res) => {
  20138. const rect = res[0];
  20139. if (rect) {
  20140. let x2 = touch.clientX - rect.left;
  20141. x2 = Math.max(0, Math.min(x2, rect.width));
  20142. this.alphaPosition = x2;
  20143. this.alpha = x2 / rect.width;
  20144. this.updateSolidColor();
  20145. }
  20146. });
  20147. },
  20148. // 更新纯色
  20149. updateSolidColor() {
  20150. const query = uni.createSelectorQuery().in(this);
  20151. query.select(".up-color-picker__saturation").boundingClientRect();
  20152. query.exec((res) => {
  20153. const rect = res[0];
  20154. const size = rect ? Math.min(rect.width, rect.height) : 150;
  20155. const s2 = this.saturationPosition.x / size * 100;
  20156. const l2 = 100 - this.saturationPosition.y / size * 100;
  20157. this.saturation = s2;
  20158. this.lightness = l2;
  20159. if (this.colorTypeIndex == 0) {
  20160. this.currentColor = this.hslToRgb(this.hue, this.saturation, this.lightness, this.alpha);
  20161. } else if (this.colorTypeIndex == 1) {
  20162. this.gradientColors[this.editingGradientIndex].color = this.hslToRgb(this.hue, this.saturation, this.lightness, this.alpha);
  20163. }
  20164. });
  20165. },
  20166. // 添加渐变色
  20167. addGradientColor() {
  20168. if (this.gradientColors.length < 5) {
  20169. this.gradientColors.push({
  20170. color: "#ffffff",
  20171. percent: 1
  20172. });
  20173. }
  20174. },
  20175. // 删除渐变色
  20176. removeGradientColor(index2) {
  20177. if (this.gradientColors.length > 2) {
  20178. this.gradientColors.splice(index2, 1);
  20179. }
  20180. },
  20181. // 获取渐变控制点位置
  20182. getGradientPointerPosition(index2) {
  20183. const trackWidth = 280;
  20184. return this.gradientColors[index2].percent * trackWidth;
  20185. },
  20186. // 更新渐变色
  20187. updateGradientColor(e2) {
  20188. const touch = e2.touches[0] || e2.changedTouches[0];
  20189. const query = uni.createSelectorQuery().in(this);
  20190. query.select(".up-color-picker__gradient-track").boundingClientRect();
  20191. query.exec((res) => {
  20192. const rect = res[0];
  20193. if (rect) {
  20194. let x2 = touch.clientX - rect.left;
  20195. x2 = Math.max(0, Math.min(x2, rect.width));
  20196. const percent = x2 / rect.width;
  20197. if (this.draggingPointerIndex >= 0) {
  20198. this.gradientColors[this.draggingPointerIndex].percent = percent;
  20199. this.gradientColors.sort((a2, b2) => a2.percent - b2.percent);
  20200. }
  20201. }
  20202. });
  20203. },
  20204. // 控制点触摸开始
  20205. onPointerTouchStart(e2, index2) {
  20206. this.draggingPointerIndex = index2;
  20207. this.currentColor = this.gradientColors[index2].color;
  20208. this.previewType = "gradient-point";
  20209. this.editingGradientIndex = index2;
  20210. e2.stopPropagation();
  20211. },
  20212. // 控制点触摸移动
  20213. onPointerTouchMove(e2) {
  20214. if (this.draggingPointerIndex === -1)
  20215. return;
  20216. const touch = e2.touches[0] || e2.changedTouches[0];
  20217. const query = uni.createSelectorQuery().in(this);
  20218. query.select(".up-color-picker__gradient-track").boundingClientRect();
  20219. query.exec((res) => {
  20220. const rect = res[0];
  20221. if (rect) {
  20222. let x2 = touch.clientX - rect.left;
  20223. x2 = Math.max(0, Math.min(x2, rect.width));
  20224. let percent = x2 / rect.width;
  20225. if (x2 === 0)
  20226. percent = 0;
  20227. if (x2 === rect.width)
  20228. percent = 1;
  20229. this.gradientColors[this.draggingPointerIndex].percent = percent;
  20230. this.gradientColors.sort((a2, b2) => a2.percent - b2.percent);
  20231. this.draggingPointerIndex = this.gradientColors.findIndex((item, index2) => {
  20232. return Math.abs(item.percent - percent) < 1e-4;
  20233. });
  20234. }
  20235. });
  20236. },
  20237. // 控制点触摸结束
  20238. onPointerTouchEnd() {
  20239. this.draggingPointerIndex = -1;
  20240. },
  20241. // 方向选择器触摸开始
  20242. onDirectionTouchStart(e2) {
  20243. this.updateDirection(e2);
  20244. },
  20245. // 方向选择器触摸移动
  20246. onDirectionTouchMove(e2) {
  20247. this.updateDirection(e2);
  20248. },
  20249. // 方向选择器触摸结束
  20250. onDirectionTouchEnd(e2) {
  20251. this.updateDirection(e2);
  20252. },
  20253. // 更新方向
  20254. updateDirection(e2) {
  20255. const touch = e2.touches[0] || e2.changedTouches[0];
  20256. const query = uni.createSelectorQuery().in(this);
  20257. query.select(".up-color-picker__gradient__direction-circle").boundingClientRect();
  20258. query.exec((res) => {
  20259. const rect = res[0];
  20260. if (rect) {
  20261. const centerX = rect.left + rect.width / 2;
  20262. const centerY = rect.top + rect.height / 2;
  20263. const x2 = touch.clientX - centerX;
  20264. const y2 = touch.clientY - centerY;
  20265. const distance = Math.sqrt(x2 * x2 + y2 * y2);
  20266. const maxDistance = rect.width / 2;
  20267. if (distance <= maxDistance) {
  20268. this.directionPointer = {
  20269. x: x2 + rect.width / 2,
  20270. y: y2 + rect.height / 2
  20271. };
  20272. } else {
  20273. const ratio = maxDistance / distance;
  20274. this.directionPointer = {
  20275. x: x2 * ratio + rect.width / 2,
  20276. y: y2 * ratio + rect.height / 2
  20277. };
  20278. }
  20279. const angle = Math.atan2(y2, x2) * 180 / Math.PI;
  20280. formatAppLog("log", "at uni_modules/uview-plus/components/u-color-picker/u-color-picker.vue:704", angle);
  20281. this.updateGradientDirection(angle);
  20282. }
  20283. });
  20284. },
  20285. // 根据角度更新渐变方向
  20286. updateGradientDirection(angle) {
  20287. if (angle < 0)
  20288. angle += 360;
  20289. if (angle >= 315 || angle < 45) {
  20290. this.currentDirection = { label: "从左到右", value: "to right" };
  20291. } else if (angle >= 45 && angle < 135) {
  20292. this.currentDirection = { label: "从上到下", value: "to bottom" };
  20293. } else if (angle >= 135 && angle < 225) {
  20294. this.currentDirection = { label: "从右到左", value: "to left" };
  20295. } else {
  20296. this.currentDirection = { label: "从下到上", value: "to top" };
  20297. }
  20298. },
  20299. // 确认方向选择
  20300. confirmDirection(e2) {
  20301. this.currentDirection = this.gradientDirections[e2.index];
  20302. this.showDirectionPicker = false;
  20303. },
  20304. // 选择常用颜色
  20305. selectCommonColor(color2) {
  20306. this.currentColor = color2;
  20307. if (this.colorTypeIndex === 0) {
  20308. this.parseSolidColor(color2);
  20309. } else {
  20310. this.gradientColors[this.editingGradientIndex].color = color2;
  20311. }
  20312. },
  20313. // 确认选择
  20314. confirm() {
  20315. let color2 = this.currentColor;
  20316. if (this.colorTypeIndex === 1) {
  20317. color2 = this.gradientStyle;
  20318. }
  20319. this.$emit("update:modelValue", color2);
  20320. this.show = false;
  20321. this.$emit("confirm", color2);
  20322. this.editingGradientIndex = -1;
  20323. this.previewType = this.colorTypeIndex === 0 ? "solid" : "gradient";
  20324. this.close();
  20325. },
  20326. // 关闭选择器
  20327. close() {
  20328. this.show = false;
  20329. this.$emit("close");
  20330. },
  20331. // HSL转RGB辅助函数
  20332. hslToRgb(h2, s2, l2, a2 = 1) {
  20333. h2 = h2 / 360;
  20334. s2 = s2 / 100;
  20335. l2 = l2 / 100;
  20336. let r2, g2, b2;
  20337. if (s2 === 0) {
  20338. r2 = g2 = b2 = l2;
  20339. } else {
  20340. const hue2rgb = (p3, q3, t2) => {
  20341. if (t2 < 0)
  20342. t2 += 1;
  20343. if (t2 > 1)
  20344. t2 -= 1;
  20345. if (t2 < 1 / 6)
  20346. return p3 + (q3 - p3) * 6 * t2;
  20347. if (t2 < 1 / 2)
  20348. return q3;
  20349. if (t2 < 2 / 3)
  20350. return p3 + (q3 - p3) * (2 / 3 - t2) * 6;
  20351. return p3;
  20352. };
  20353. const q2 = l2 < 0.5 ? l2 * (1 + s2) : l2 + s2 - l2 * s2;
  20354. const p2 = 2 * l2 - q2;
  20355. r2 = hue2rgb(p2, q2, h2 + 1 / 3);
  20356. g2 = hue2rgb(p2, q2, h2);
  20357. b2 = hue2rgb(p2, q2, h2 - 1 / 3);
  20358. }
  20359. const round2 = (value2) => Math.round(value2 * 255);
  20360. return `rgba(${round2(r2)}, ${round2(g2)}, ${round2(b2)}, ${a2.toFixed(2)})`;
  20361. }
  20362. }
  20363. };
  20364. function _sfc_render$1E(_ctx, _cache, $props, $setup, $data, $options) {
  20365. const _component_up_subsection = vue.resolveComponent("up-subsection");
  20366. const _component_up_button = vue.resolveComponent("up-button");
  20367. const _component_up_popup = vue.resolveComponent("up-popup");
  20368. return vue.openBlock(), vue.createElementBlock("view", { class: "up-color-picker" }, [
  20369. vue.createElementVNode(
  20370. "view",
  20371. {
  20372. clas: "up-color-picker__trigger",
  20373. onClick: _cache[0] || (_cache[0] = ($event) => $data.show = true),
  20374. style: vue.normalizeStyle({ backgroundColor: _ctx.value })
  20375. },
  20376. [
  20377. vue.renderSlot(_ctx.$slots, "default", {}, void 0, true)
  20378. ],
  20379. 4
  20380. /* STYLE */
  20381. ),
  20382. vue.createVNode(_component_up_popup, {
  20383. show: $data.show,
  20384. mode: "bottom",
  20385. round: "10",
  20386. onClose: $options.close,
  20387. closeOnClickOverlay: true
  20388. }, {
  20389. default: vue.withCtx(() => [
  20390. vue.createElementVNode("view", { class: "up-color-picker__content" }, [
  20391. vue.createElementVNode("view", { class: "up-color-picker__header" }, [
  20392. vue.createElementVNode("text", { class: "up-color-picker__title" }, "选择颜色")
  20393. ]),
  20394. vue.createCommentVNode(" 纯色/渐变色切换 "),
  20395. vue.createElementVNode("view", { class: "up-color-picker__switch" }, [
  20396. vue.createVNode(_component_up_subsection, {
  20397. list: [{ name: "纯色" }, { name: "渐变" }],
  20398. current: $data.colorTypeIndex,
  20399. onChange: $options.changeColorType,
  20400. fontSize: "14"
  20401. }, null, 8, ["current", "onChange"])
  20402. ]),
  20403. vue.createCommentVNode(" 渐变色选择器 "),
  20404. $data.colorTypeIndex == 1 ? (vue.openBlock(), vue.createElementBlock("view", {
  20405. key: 0,
  20406. class: "up-color-picker__gradient"
  20407. }, [
  20408. vue.createCommentVNode(" 渐变色控制条 "),
  20409. vue.createElementVNode(
  20410. "view",
  20411. {
  20412. class: "up-color-picker__gradient-track",
  20413. style: vue.normalizeStyle({ background: $options.gradientStyle })
  20414. },
  20415. [
  20416. (vue.openBlock(true), vue.createElementBlock(
  20417. vue.Fragment,
  20418. null,
  20419. vue.renderList($data.gradientColors, (item, index2) => {
  20420. return vue.openBlock(), vue.createElementBlock("view", {
  20421. class: "up-color-picker__gradient-pointer",
  20422. key: index2,
  20423. style: vue.normalizeStyle({ left: $options.getGradientPointerPosition(index2) + "px" }),
  20424. onClick: ($event) => $options.openColorPickerForGradient(index2),
  20425. onTouchstart: ($event) => $options.onPointerTouchStart($event, index2),
  20426. onTouchmove: _cache[1] || (_cache[1] = vue.withModifiers((...args) => $options.onPointerTouchMove && $options.onPointerTouchMove(...args), ["stop"])),
  20427. onTouchend: _cache[2] || (_cache[2] = vue.withModifiers((...args) => $options.onPointerTouchEnd && $options.onPointerTouchEnd(...args), ["stop"]))
  20428. }, [
  20429. vue.createElementVNode(
  20430. "view",
  20431. {
  20432. class: "up-color-picker__gradient-pointer-inner",
  20433. style: vue.normalizeStyle({ backgroundColor: item.color })
  20434. },
  20435. null,
  20436. 4
  20437. /* STYLE */
  20438. )
  20439. ], 44, ["onClick", "onTouchstart"]);
  20440. }),
  20441. 128
  20442. /* KEYED_FRAGMENT */
  20443. ))
  20444. ],
  20445. 4
  20446. /* STYLE */
  20447. ),
  20448. vue.createElementVNode("view", { class: "up-color-picker__gradient-controls" }, [
  20449. vue.createVNode(_component_up_button, {
  20450. type: "primary",
  20451. size: "mini",
  20452. plain: "",
  20453. onClick: $options.addGradientColor,
  20454. class: "up-color-picker__add-btn"
  20455. }, {
  20456. default: vue.withCtx(() => [
  20457. vue.createTextVNode(" 添加颜色 ")
  20458. ]),
  20459. _: 1
  20460. /* STABLE */
  20461. }, 8, ["onClick"])
  20462. ]),
  20463. vue.createCommentVNode(" 圆形方向选择器 "),
  20464. vue.createElementVNode("view", { class: "up-color-picker__gradient-direction" }, [
  20465. vue.createElementVNode("text", null, "方向:"),
  20466. vue.createElementVNode(
  20467. "view",
  20468. {
  20469. class: "up-color-picker__gradient__direction-circle",
  20470. onTouchstart: _cache[3] || (_cache[3] = (...args) => $options.onDirectionTouchStart && $options.onDirectionTouchStart(...args)),
  20471. onTouchmove: _cache[4] || (_cache[4] = (...args) => $options.onDirectionTouchMove && $options.onDirectionTouchMove(...args)),
  20472. onTouchend: _cache[5] || (_cache[5] = (...args) => $options.onDirectionTouchEnd && $options.onDirectionTouchEnd(...args))
  20473. },
  20474. [
  20475. vue.createElementVNode(
  20476. "view",
  20477. {
  20478. class: "up-color-picker__direction-pointer",
  20479. style: vue.normalizeStyle({
  20480. left: $data.directionPointer.x + "px",
  20481. top: $data.directionPointer.y + "px"
  20482. })
  20483. },
  20484. null,
  20485. 4
  20486. /* STYLE */
  20487. )
  20488. ],
  20489. 32
  20490. /* NEED_HYDRATION */
  20491. )
  20492. ])
  20493. ])) : vue.createCommentVNode("v-if", true),
  20494. vue.createCommentVNode(" 纯色选择器 "),
  20495. vue.createElementVNode("view", { class: "up-color-picker__solid" }, [
  20496. vue.createCommentVNode(" 饱和度和明度选择区域 "),
  20497. vue.createElementVNode(
  20498. "view",
  20499. {
  20500. class: "up-color-picker__saturation",
  20501. style: vue.normalizeStyle({ backgroundColor: `hsl(${$data.hue}, 100%, 50%)` }),
  20502. onTouchstart: _cache[6] || (_cache[6] = (...args) => $options.onSaturationTouchStart && $options.onSaturationTouchStart(...args)),
  20503. onTouchmove: _cache[7] || (_cache[7] = (...args) => $options.onSaturationTouchMove && $options.onSaturationTouchMove(...args)),
  20504. onTouchend: _cache[8] || (_cache[8] = (...args) => $options.onSaturationTouchEnd && $options.onSaturationTouchEnd(...args))
  20505. },
  20506. [
  20507. vue.createElementVNode(
  20508. "view",
  20509. {
  20510. class: "up-color-picker__saturation-pointer",
  20511. style: vue.normalizeStyle({
  20512. left: $data.saturationPosition.x + "px",
  20513. top: $data.saturationPosition.y + "px"
  20514. })
  20515. },
  20516. null,
  20517. 4
  20518. /* STYLE */
  20519. )
  20520. ],
  20521. 36
  20522. /* STYLE, NEED_HYDRATION */
  20523. ),
  20524. vue.createCommentVNode(" 色相选择 "),
  20525. vue.createElementVNode(
  20526. "view",
  20527. {
  20528. class: "up-color-picker__hue",
  20529. onTouchstart: _cache[9] || (_cache[9] = (...args) => $options.onHueTouchStart && $options.onHueTouchStart(...args)),
  20530. onTouchmove: _cache[10] || (_cache[10] = (...args) => $options.onHueTouchMove && $options.onHueTouchMove(...args)),
  20531. onTouchend: _cache[11] || (_cache[11] = (...args) => $options.onHueTouchEnd && $options.onHueTouchEnd(...args))
  20532. },
  20533. [
  20534. vue.createElementVNode(
  20535. "view",
  20536. {
  20537. class: "up-color-picker__hue-pointer",
  20538. style: vue.normalizeStyle({ left: $data.huePosition + "px" })
  20539. },
  20540. null,
  20541. 4
  20542. /* STYLE */
  20543. )
  20544. ],
  20545. 32
  20546. /* NEED_HYDRATION */
  20547. ),
  20548. vue.createCommentVNode(" 透明度选择 "),
  20549. $data.colorTypeIndex == 0 ? (vue.openBlock(), vue.createElementBlock(
  20550. "view",
  20551. {
  20552. key: 0,
  20553. class: "up-color-picker__alpha",
  20554. onTouchstart: _cache[12] || (_cache[12] = (...args) => $options.onAlphaTouchStart && $options.onAlphaTouchStart(...args)),
  20555. onTouchmove: _cache[13] || (_cache[13] = (...args) => $options.onAlphaTouchMove && $options.onAlphaTouchMove(...args)),
  20556. onTouchend: _cache[14] || (_cache[14] = (...args) => $options.onAlphaTouchEnd && $options.onAlphaTouchEnd(...args))
  20557. },
  20558. [
  20559. vue.createElementVNode("view", { class: "up-color-picker__alpha-bg" }),
  20560. vue.createElementVNode(
  20561. "view",
  20562. {
  20563. class: "up-color-picker__alpha-pointer",
  20564. style: vue.normalizeStyle({ left: $data.alphaPosition + "px" })
  20565. },
  20566. null,
  20567. 4
  20568. /* STYLE */
  20569. )
  20570. ],
  20571. 32
  20572. /* NEED_HYDRATION */
  20573. )) : vue.createCommentVNode("v-if", true)
  20574. ]),
  20575. vue.createCommentVNode(" 常用颜色 "),
  20576. $props.commonColors && $props.commonColors.length ? (vue.openBlock(), vue.createElementBlock("view", {
  20577. key: 1,
  20578. class: "up-color-picker__common"
  20579. }, [
  20580. vue.createElementVNode("text", { class: "up-color-picker__common-title" }, "常用颜色"),
  20581. vue.createElementVNode("view", { class: "up-color-picker__common-list" }, [
  20582. (vue.openBlock(true), vue.createElementBlock(
  20583. vue.Fragment,
  20584. null,
  20585. vue.renderList($props.commonColors, (color2, index2) => {
  20586. return vue.openBlock(), vue.createElementBlock("view", {
  20587. key: index2,
  20588. class: "up-color-picker__common-item",
  20589. style: vue.normalizeStyle({ backgroundColor: color2 }),
  20590. onClick: ($event) => $options.selectCommonColor(color2)
  20591. }, null, 12, ["onClick"]);
  20592. }),
  20593. 128
  20594. /* KEYED_FRAGMENT */
  20595. ))
  20596. ])
  20597. ])) : vue.createCommentVNode("v-if", true),
  20598. vue.createCommentVNode(" 颜色预览和操作按钮 "),
  20599. vue.createElementVNode("view", { class: "up-color-picker__footer" }, [
  20600. vue.createElementVNode("view", { class: "up-color-picker__preview" }, [
  20601. vue.createElementVNode(
  20602. "view",
  20603. {
  20604. class: "up-color-picker__preview-color",
  20605. style: vue.normalizeStyle({ backgroundColor: $options.displayColor })
  20606. },
  20607. null,
  20608. 4
  20609. /* STYLE */
  20610. ),
  20611. vue.createElementVNode(
  20612. "text",
  20613. { class: "up-color-picker__preview-text" },
  20614. vue.toDisplayString($options.displayColor),
  20615. 1
  20616. /* TEXT */
  20617. )
  20618. ]),
  20619. vue.createElementVNode("view", { class: "up-color-picker__actions" }, [
  20620. vue.createVNode(_component_up_button, {
  20621. type: "primary",
  20622. size: "small",
  20623. onClick: $options.confirm,
  20624. class: "up-color-picker__btn"
  20625. }, {
  20626. default: vue.withCtx(() => [
  20627. vue.createTextVNode(" 确定 ")
  20628. ]),
  20629. _: 1
  20630. /* STABLE */
  20631. }, 8, ["onClick"]),
  20632. vue.createVNode(_component_up_button, {
  20633. type: "info",
  20634. size: "small",
  20635. onClick: $options.close,
  20636. class: "up-color-picker__btn"
  20637. }, {
  20638. default: vue.withCtx(() => [
  20639. vue.createTextVNode(" 取消 ")
  20640. ]),
  20641. _: 1
  20642. /* STABLE */
  20643. }, 8, ["onClick"])
  20644. ])
  20645. ])
  20646. ])
  20647. ]),
  20648. _: 1
  20649. /* STABLE */
  20650. }, 8, ["show", "onClose"])
  20651. ]);
  20652. }
  20653. const uColorPicker = /* @__PURE__ */ _export_sfc(_sfc_main$1F, [["render", _sfc_render$1E], ["__scopeId", "data-v-b51e9743"], ["__file", "C:/Users/EDY/Desktop/项目/shuibei/uni_modules/uview-plus/components/u-color-picker/u-color-picker.vue"]]);
  20654. const __vite_glob_0_27 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
  20655. __proto__: null,
  20656. default: uColorPicker
  20657. }, Symbol.toStringTag, { value: "Module" }));
  20658. const props$14 = defineMixin({
  20659. props: {
  20660. // 显示的内容,字符串
  20661. text: {
  20662. type: [Array],
  20663. default: () => props$1x.columnNotice.text
  20664. },
  20665. // 是否显示左侧的音量图标
  20666. icon: {
  20667. type: String,
  20668. default: () => props$1x.columnNotice.icon
  20669. },
  20670. // 通告模式,link-显示右箭头,closable-显示右侧关闭图标
  20671. mode: {
  20672. type: String,
  20673. default: () => props$1x.columnNotice.mode
  20674. },
  20675. // 文字颜色,各图标也会使用文字颜色
  20676. color: {
  20677. type: String,
  20678. default: () => props$1x.columnNotice.color
  20679. },
  20680. // 背景颜色
  20681. bgColor: {
  20682. type: String,
  20683. default: () => props$1x.columnNotice.bgColor
  20684. },
  20685. // 字体大小,单位px
  20686. fontSize: {
  20687. type: [String, Number],
  20688. default: () => props$1x.columnNotice.fontSize
  20689. },
  20690. // 水平滚动时的滚动速度,即每秒滚动多少px(px),这有利于控制文字无论多少时,都能有一个恒定的速度
  20691. speed: {
  20692. type: [String, Number],
  20693. default: () => props$1x.columnNotice.speed
  20694. },
  20695. // direction = row时,是否使用步进形式滚动
  20696. step: {
  20697. type: Boolean,
  20698. default: () => props$1x.columnNotice.step
  20699. },
  20700. // 滚动一个周期的时间长,单位ms
  20701. duration: {
  20702. type: [String, Number],
  20703. default: () => props$1x.columnNotice.duration
  20704. },
  20705. // 是否禁止用手滑动切换
  20706. // 目前HX2.6.11,只支持App 2.5.5+、H5 2.5.5+、支付宝小程序、字节跳动小程序
  20707. disableTouch: {
  20708. type: Boolean,
  20709. default: () => props$1x.columnNotice.disableTouch
  20710. },
  20711. justifyContent: {
  20712. type: String,
  20713. default: () => props$1x.columnNotice.justifyContent
  20714. }
  20715. }
  20716. });
  20717. const _sfc_main$1E = {
  20718. mixins: [mpMixin, mixin, props$14],
  20719. watch: {
  20720. text: {
  20721. immediate: true,
  20722. handler(newValue, oldValue) {
  20723. if (!test.array(newValue)) {
  20724. error("noticebar组件direction为column时,要求text参数为数组形式");
  20725. }
  20726. }
  20727. }
  20728. },
  20729. computed: {
  20730. // 文字内容的样式
  20731. textStyle() {
  20732. let style = {};
  20733. style.color = this.color;
  20734. style.fontSize = addUnit(this.fontSize);
  20735. return style;
  20736. },
  20737. // 垂直或者水平滚动
  20738. vertical() {
  20739. if (this.mode == "horizontal")
  20740. return false;
  20741. else
  20742. return true;
  20743. }
  20744. },
  20745. data() {
  20746. return {
  20747. index: 0
  20748. };
  20749. },
  20750. emits: ["click", "close"],
  20751. methods: {
  20752. noticeChange(e2) {
  20753. this.index = e2.detail.current;
  20754. },
  20755. // 点击通告栏
  20756. clickHandler() {
  20757. this.$emit("click", this.index);
  20758. },
  20759. // 点击关闭按钮
  20760. close() {
  20761. this.$emit("close");
  20762. }
  20763. }
  20764. };
  20765. function _sfc_render$1D(_ctx, _cache, $props, $setup, $data, $options) {
  20766. const _component_up_icon = vue.resolveComponent("up-icon");
  20767. return vue.openBlock(), vue.createElementBlock("view", {
  20768. class: "u-notice",
  20769. onClick: _cache[1] || (_cache[1] = (...args) => $options.clickHandler && $options.clickHandler(...args))
  20770. }, [
  20771. vue.renderSlot(_ctx.$slots, "icon", {}, () => [
  20772. _ctx.icon ? (vue.openBlock(), vue.createElementBlock("view", {
  20773. key: 0,
  20774. class: "u-notice__left-icon"
  20775. }, [
  20776. vue.createVNode(_component_up_icon, {
  20777. name: _ctx.icon,
  20778. color: _ctx.color,
  20779. size: "19"
  20780. }, null, 8, ["name", "color"])
  20781. ])) : vue.createCommentVNode("v-if", true)
  20782. ], true),
  20783. vue.createElementVNode("swiper", {
  20784. "disable-touch": _ctx.disableTouch,
  20785. vertical: _ctx.step ? false : true,
  20786. circular: "",
  20787. interval: _ctx.duration,
  20788. autoplay: true,
  20789. class: "u-notice__swiper",
  20790. onChange: _cache[0] || (_cache[0] = (...args) => $options.noticeChange && $options.noticeChange(...args))
  20791. }, [
  20792. (vue.openBlock(true), vue.createElementBlock(
  20793. vue.Fragment,
  20794. null,
  20795. vue.renderList(_ctx.text, (item, index2) => {
  20796. return vue.openBlock(), vue.createElementBlock(
  20797. "swiper-item",
  20798. {
  20799. key: index2,
  20800. class: "u-notice__swiper__item",
  20801. style: vue.normalizeStyle({ "justifyContent": _ctx.justifyContent })
  20802. },
  20803. [
  20804. vue.createElementVNode(
  20805. "text",
  20806. {
  20807. class: "u-notice__swiper__item__text u-line-1",
  20808. style: vue.normalizeStyle([$options.textStyle])
  20809. },
  20810. vue.toDisplayString(item),
  20811. 5
  20812. /* TEXT, STYLE */
  20813. )
  20814. ],
  20815. 4
  20816. /* STYLE */
  20817. );
  20818. }),
  20819. 128
  20820. /* KEYED_FRAGMENT */
  20821. ))
  20822. ], 40, ["disable-touch", "vertical", "interval"]),
  20823. ["link", "closable"].includes(_ctx.mode) ? (vue.openBlock(), vue.createElementBlock("view", {
  20824. key: 0,
  20825. class: "u-notice__right-icon"
  20826. }, [
  20827. _ctx.mode === "link" ? (vue.openBlock(), vue.createBlock(_component_up_icon, {
  20828. key: 0,
  20829. name: "arrow-right",
  20830. size: 17,
  20831. color: _ctx.color
  20832. }, null, 8, ["color"])) : vue.createCommentVNode("v-if", true),
  20833. _ctx.mode === "closable" ? (vue.openBlock(), vue.createBlock(_component_up_icon, {
  20834. key: 1,
  20835. name: "close",
  20836. size: 16,
  20837. color: _ctx.color,
  20838. onClick: $options.close
  20839. }, null, 8, ["color", "onClick"])) : vue.createCommentVNode("v-if", true)
  20840. ])) : vue.createCommentVNode("v-if", true)
  20841. ]);
  20842. }
  20843. const __easycom_0$6 = /* @__PURE__ */ _export_sfc(_sfc_main$1E, [["render", _sfc_render$1D], ["__scopeId", "data-v-bacc3427"], ["__file", "C:/Users/EDY/Desktop/项目/shuibei/uni_modules/uview-plus/components/u-column-notice/u-column-notice.vue"]]);
  20844. const __vite_glob_0_28 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
  20845. __proto__: null,
  20846. default: __easycom_0$6
  20847. }, Symbol.toStringTag, { value: "Module" }));
  20848. const _sfc_main$1D = {
  20849. name: "up-copy",
  20850. props: {
  20851. content: {
  20852. type: String,
  20853. default: ""
  20854. },
  20855. alertStyle: {
  20856. type: String,
  20857. default: "toast"
  20858. },
  20859. notice: {
  20860. type: String,
  20861. default: t$1("up.common.copy") + t$1("up.common.success")
  20862. }
  20863. },
  20864. emits: ["success"],
  20865. methods: {
  20866. t: t$1,
  20867. handleClick() {
  20868. let content = this.content;
  20869. if (!content) {
  20870. uni.showToast({
  20871. title: t$1("up.common.none"),
  20872. icon: "none",
  20873. duration: 2e3
  20874. });
  20875. return false;
  20876. }
  20877. content = typeof content === "string" ? content : content.toString();
  20878. let that2 = this;
  20879. uni.setClipboardData({
  20880. data: content,
  20881. success: function() {
  20882. if (that2.alertStyle == "modal") {
  20883. uni.showModal({
  20884. title: "up.common.tip",
  20885. content: that2.notice
  20886. });
  20887. } else {
  20888. uni.showToast({
  20889. title: that2.notice,
  20890. icon: "none"
  20891. });
  20892. }
  20893. that2.$emit("success");
  20894. },
  20895. fail: function() {
  20896. uni.showToast({
  20897. title: t$1("up.common.copy") + t$1("up.common.fail"),
  20898. icon: "none",
  20899. duration: 3e3
  20900. });
  20901. }
  20902. });
  20903. }
  20904. }
  20905. };
  20906. function _sfc_render$1C(_ctx, _cache, $props, $setup, $data, $options) {
  20907. return vue.openBlock(), vue.createElementBlock("view", {
  20908. onClick: _cache[0] || (_cache[0] = (...args) => $options.handleClick && $options.handleClick(...args))
  20909. }, [
  20910. vue.renderSlot(_ctx.$slots, "default", {}, () => [
  20911. vue.createTextVNode(
  20912. vue.toDisplayString($options.t("up.common.copy")),
  20913. 1
  20914. /* TEXT */
  20915. )
  20916. ])
  20917. ]);
  20918. }
  20919. const uCopy = /* @__PURE__ */ _export_sfc(_sfc_main$1D, [["render", _sfc_render$1C], ["__file", "C:/Users/EDY/Desktop/项目/shuibei/uni_modules/uview-plus/components/u-copy/u-copy.vue"]]);
  20920. const __vite_glob_0_29 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
  20921. __proto__: null,
  20922. default: uCopy
  20923. }, Symbol.toStringTag, { value: "Module" }));
  20924. const props$13 = defineMixin({
  20925. props: {
  20926. // 倒计时时长,单位ms
  20927. time: {
  20928. type: [String, Number],
  20929. default: () => props$1x.countDown.time
  20930. },
  20931. // 时间格式,DD-日,HH-时,mm-分,ss-秒,SSS-毫秒
  20932. format: {
  20933. type: String,
  20934. default: () => props$1x.countDown.format
  20935. },
  20936. // 是否自动开始倒计时
  20937. autoStart: {
  20938. type: Boolean,
  20939. default: () => props$1x.countDown.autoStart
  20940. },
  20941. // 是否展示毫秒倒计时
  20942. millisecond: {
  20943. type: Boolean,
  20944. default: () => props$1x.countDown.millisecond
  20945. }
  20946. }
  20947. });
  20948. function padZero(num, targetLength = 2) {
  20949. let str = `${num}`;
  20950. while (str.length < targetLength) {
  20951. str = `0${str}`;
  20952. }
  20953. return str;
  20954. }
  20955. const SECOND = 1e3;
  20956. const MINUTE = 60 * SECOND;
  20957. const HOUR = 60 * MINUTE;
  20958. const DAY = 24 * HOUR;
  20959. function parseTimeData(time) {
  20960. const days = Math.floor(time / DAY);
  20961. const hours = Math.floor(time % DAY / HOUR);
  20962. const minutes = Math.floor(time % HOUR / MINUTE);
  20963. const seconds = Math.floor(time % MINUTE / SECOND);
  20964. const milliseconds = Math.floor(time % SECOND);
  20965. return {
  20966. days,
  20967. hours,
  20968. minutes,
  20969. seconds,
  20970. milliseconds
  20971. };
  20972. }
  20973. function parseFormat(format2, timeData) {
  20974. let {
  20975. days,
  20976. hours,
  20977. minutes,
  20978. seconds,
  20979. milliseconds
  20980. } = timeData;
  20981. if (format2.indexOf("DD") === -1) {
  20982. hours += days * 24;
  20983. } else {
  20984. format2 = format2.replace("DD", padZero(days));
  20985. }
  20986. if (format2.indexOf("HH") === -1) {
  20987. minutes += hours * 60;
  20988. } else {
  20989. format2 = format2.replace("HH", padZero(hours));
  20990. }
  20991. if (format2.indexOf("mm") === -1) {
  20992. seconds += minutes * 60;
  20993. } else {
  20994. format2 = format2.replace("mm", padZero(minutes));
  20995. }
  20996. if (format2.indexOf("ss") === -1) {
  20997. milliseconds += seconds * 1e3;
  20998. } else {
  20999. format2 = format2.replace("ss", padZero(seconds));
  21000. }
  21001. return format2.replace("SSS", padZero(milliseconds, 3));
  21002. }
  21003. function isSameSecond(time1, time2) {
  21004. return Math.floor(time1 / 1e3) === Math.floor(time2 / 1e3);
  21005. }
  21006. const _sfc_main$1C = {
  21007. name: "u-count-down",
  21008. mixins: [mpMixin, mixin, props$13],
  21009. data() {
  21010. return {
  21011. timer: null,
  21012. // 各单位(天,时,分等)剩余时间
  21013. timeData: parseTimeData(0),
  21014. // 格式化后的时间,如"03:23:21"
  21015. formattedTime: "0",
  21016. // 倒计时是否正在进行中
  21017. runing: false,
  21018. endTime: 0,
  21019. // 结束的毫秒时间戳
  21020. remainTime: 0
  21021. // 剩余的毫秒时间
  21022. };
  21023. },
  21024. watch: {
  21025. time(n2) {
  21026. this.reset();
  21027. }
  21028. },
  21029. mounted() {
  21030. this.init();
  21031. },
  21032. emits: ["change", "finish"],
  21033. methods: {
  21034. init() {
  21035. this.reset();
  21036. },
  21037. // 开始倒计时
  21038. start() {
  21039. if (this.runing)
  21040. return;
  21041. this.runing = true;
  21042. this.endTime = Date.now() + this.remainTime;
  21043. this.toTick();
  21044. },
  21045. // 根据是否展示毫秒,执行不同操作函数
  21046. toTick() {
  21047. if (this.millisecond) {
  21048. this.microTick();
  21049. } else {
  21050. this.macroTick();
  21051. }
  21052. },
  21053. macroTick() {
  21054. this.clearTimeout();
  21055. this.timer = setTimeout(() => {
  21056. const remain = this.getRemainTime();
  21057. if (!isSameSecond(remain, this.remainTime) || remain === 0) {
  21058. this.setRemainTime(remain);
  21059. }
  21060. if (this.remainTime !== 0) {
  21061. this.macroTick();
  21062. }
  21063. }, 30);
  21064. },
  21065. microTick() {
  21066. this.clearTimeout();
  21067. this.timer = setTimeout(() => {
  21068. this.setRemainTime(this.getRemainTime());
  21069. if (this.remainTime !== 0) {
  21070. this.microTick();
  21071. }
  21072. }, 50);
  21073. },
  21074. // 获取剩余的时间
  21075. getRemainTime() {
  21076. return Math.max(this.endTime - Date.now(), 0);
  21077. },
  21078. // 设置剩余的时间
  21079. setRemainTime(remain) {
  21080. this.remainTime = remain;
  21081. const timeData = parseTimeData(remain);
  21082. this.timeData = timeData;
  21083. this.$emit("change", timeData);
  21084. this.formattedTime = parseFormat(this.format, timeData);
  21085. if (remain <= 0) {
  21086. this.pause();
  21087. this.$emit("finish");
  21088. }
  21089. },
  21090. // 重置倒计时
  21091. reset() {
  21092. this.pause();
  21093. this.remainTime = this.time;
  21094. this.setRemainTime(this.remainTime);
  21095. if (this.autoStart) {
  21096. this.start();
  21097. }
  21098. },
  21099. // 暂停倒计时
  21100. pause() {
  21101. this.runing = false;
  21102. this.clearTimeout();
  21103. },
  21104. // 清空定时器
  21105. clearTimeout() {
  21106. clearTimeout(this.timer);
  21107. this.timer = null;
  21108. }
  21109. },
  21110. beforeUnmount() {
  21111. this.clearTimeout();
  21112. }
  21113. };
  21114. function _sfc_render$1B(_ctx, _cache, $props, $setup, $data, $options) {
  21115. return vue.openBlock(), vue.createElementBlock("view", { class: "u-count-down" }, [
  21116. vue.renderSlot(_ctx.$slots, "default", {
  21117. days: $data.timeData.days,
  21118. hours: $data.timeData.hours,
  21119. minutes: $data.timeData.minutes,
  21120. seconds: $data.timeData.seconds
  21121. }, () => [
  21122. vue.createElementVNode(
  21123. "text",
  21124. { class: "u-count-down__text" },
  21125. vue.toDisplayString($data.formattedTime),
  21126. 1
  21127. /* TEXT */
  21128. )
  21129. ], true)
  21130. ]);
  21131. }
  21132. const uCountDown = /* @__PURE__ */ _export_sfc(_sfc_main$1C, [["render", _sfc_render$1B], ["__scopeId", "data-v-2f829c0f"], ["__file", "C:/Users/EDY/Desktop/项目/shuibei/uni_modules/uview-plus/components/u-count-down/u-count-down.vue"]]);
  21133. const __vite_glob_0_30 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
  21134. __proto__: null,
  21135. default: uCountDown
  21136. }, Symbol.toStringTag, { value: "Module" }));
  21137. const props$12 = defineMixin({
  21138. props: {
  21139. // 开始的数值,默认从0增长到某一个数
  21140. startVal: {
  21141. type: [String, Number],
  21142. default: () => props$1x.countTo.startVal
  21143. },
  21144. // 要滚动的目标数值,必须
  21145. endVal: {
  21146. type: [String, Number],
  21147. default: () => props$1x.countTo.endVal
  21148. },
  21149. // 滚动到目标数值的动画持续时间,单位为毫秒(ms)
  21150. duration: {
  21151. type: [String, Number],
  21152. default: () => props$1x.countTo.duration
  21153. },
  21154. // 设置数值后是否自动开始滚动
  21155. autoplay: {
  21156. type: Boolean,
  21157. default: () => props$1x.countTo.autoplay
  21158. },
  21159. // 要显示的小数位数
  21160. decimals: {
  21161. type: [String, Number],
  21162. default: () => props$1x.countTo.decimals
  21163. },
  21164. // 是否在即将到达目标数值的时候,使用缓慢滚动的效果
  21165. useEasing: {
  21166. type: Boolean,
  21167. default: () => props$1x.countTo.useEasing
  21168. },
  21169. // 十进制分割
  21170. decimal: {
  21171. type: [String, Number],
  21172. default: () => props$1x.countTo.decimal
  21173. },
  21174. // 字体颜色
  21175. color: {
  21176. type: String,
  21177. default: () => props$1x.countTo.color
  21178. },
  21179. // 字体大小
  21180. fontSize: {
  21181. type: [String, Number],
  21182. default: () => props$1x.countTo.fontSize
  21183. },
  21184. // 是否加粗字体
  21185. bold: {
  21186. type: Boolean,
  21187. default: () => props$1x.countTo.bold
  21188. },
  21189. // 千位分隔符,类似金额的分割(¥23,321.05中的",")
  21190. separator: {
  21191. type: String,
  21192. default: () => props$1x.countTo.separator
  21193. }
  21194. }
  21195. });
  21196. const _sfc_main$1B = {
  21197. name: "u-count-to",
  21198. data() {
  21199. return {
  21200. localStartVal: this.startVal,
  21201. displayValue: this.formatNumber(this.startVal),
  21202. printVal: null,
  21203. paused: false,
  21204. // 是否暂停
  21205. localDuration: Number(this.duration),
  21206. startTime: null,
  21207. // 开始的时间
  21208. timestamp: null,
  21209. // 时间戳
  21210. remaining: null,
  21211. // 停留的时间
  21212. rAF: null,
  21213. lastTime: 0
  21214. // 上一次的时间
  21215. };
  21216. },
  21217. mixins: [mpMixin, mixin, props$12],
  21218. computed: {
  21219. countDown() {
  21220. return this.startVal > this.endVal;
  21221. }
  21222. },
  21223. watch: {
  21224. startVal() {
  21225. this.autoplay && this.start();
  21226. },
  21227. endVal() {
  21228. this.autoplay && this.start();
  21229. }
  21230. },
  21231. mounted() {
  21232. this.autoplay && this.start();
  21233. },
  21234. emits: ["end"],
  21235. methods: {
  21236. addUnit,
  21237. easingFn(t2, b2, c2, d2) {
  21238. return c2 * (-Math.pow(2, -10 * t2 / d2) + 1) * 1024 / 1023 + b2;
  21239. },
  21240. requestAnimationFrame(callback) {
  21241. const currTime = (/* @__PURE__ */ new Date()).getTime();
  21242. const timeToCall = Math.max(0, 16 - (currTime - this.lastTime));
  21243. const id = setTimeout(() => {
  21244. callback(currTime + timeToCall);
  21245. }, timeToCall);
  21246. this.lastTime = currTime + timeToCall;
  21247. return id;
  21248. },
  21249. cancelAnimationFrame(id) {
  21250. clearTimeout(id);
  21251. },
  21252. // 开始滚动数字
  21253. start() {
  21254. this.localStartVal = this.startVal;
  21255. this.startTime = null;
  21256. this.localDuration = this.duration;
  21257. this.paused = false;
  21258. this.rAF = this.requestAnimationFrame(this.count);
  21259. },
  21260. // 暂定状态,重新再开始滚动;或者滚动状态下,暂停
  21261. reStart() {
  21262. if (this.paused) {
  21263. this.resume();
  21264. this.paused = false;
  21265. } else {
  21266. this.stop();
  21267. this.paused = true;
  21268. }
  21269. },
  21270. // 暂停
  21271. stop() {
  21272. this.cancelAnimationFrame(this.rAF);
  21273. },
  21274. // 重新开始(暂停的情况下)
  21275. resume() {
  21276. if (!this.remaining)
  21277. return;
  21278. this.startTime = 0;
  21279. this.localDuration = this.remaining;
  21280. this.localStartVal = this.printVal;
  21281. this.requestAnimationFrame(this.count);
  21282. },
  21283. // 重置
  21284. reset() {
  21285. this.startTime = null;
  21286. this.cancelAnimationFrame(this.rAF);
  21287. this.displayValue = this.formatNumber(this.startVal);
  21288. },
  21289. count(timestamp) {
  21290. if (!this.startTime)
  21291. this.startTime = timestamp;
  21292. this.timestamp = timestamp;
  21293. const progress = timestamp - this.startTime;
  21294. this.remaining = this.localDuration - progress;
  21295. if (this.useEasing) {
  21296. if (this.countDown) {
  21297. this.printVal = this.localStartVal - this.easingFn(progress, 0, this.localStartVal - this.endVal, this.localDuration);
  21298. } else {
  21299. this.printVal = this.easingFn(progress, this.localStartVal, this.endVal - this.localStartVal, this.localDuration);
  21300. }
  21301. } else {
  21302. if (this.countDown) {
  21303. this.printVal = this.localStartVal - (this.localStartVal - this.endVal) * (progress / this.localDuration);
  21304. } else {
  21305. this.printVal = this.localStartVal + (this.endVal - this.localStartVal) * (progress / this.localDuration);
  21306. }
  21307. }
  21308. if (this.countDown) {
  21309. this.printVal = this.printVal < this.endVal ? this.endVal : this.printVal;
  21310. } else {
  21311. this.printVal = this.printVal > this.endVal ? this.endVal : this.printVal;
  21312. }
  21313. this.displayValue = this.formatNumber(this.printVal) || 0;
  21314. if (progress < this.localDuration) {
  21315. this.rAF = this.requestAnimationFrame(this.count);
  21316. } else {
  21317. this.$emit("end");
  21318. }
  21319. },
  21320. // 判断是否数字
  21321. isNumber(val) {
  21322. return !isNaN(parseFloat(val));
  21323. },
  21324. formatNumber(num) {
  21325. num = Number(num);
  21326. num = num.toFixed(Number(this.decimals));
  21327. num += "";
  21328. const x2 = num.split(".");
  21329. let x1 = x2[0];
  21330. const x22 = x2.length > 1 ? this.decimal + x2[1] : "";
  21331. const rgx = /(\d+)(\d{3})/;
  21332. if (this.separator && !this.isNumber(this.separator)) {
  21333. while (rgx.test(x1)) {
  21334. x1 = x1.replace(rgx, "$1" + this.separator + "$2");
  21335. }
  21336. }
  21337. return x1 + x22;
  21338. },
  21339. destroyed() {
  21340. this.cancelAnimationFrame(this.rAF);
  21341. }
  21342. }
  21343. };
  21344. function _sfc_render$1A(_ctx, _cache, $props, $setup, $data, $options) {
  21345. return vue.openBlock(), vue.createElementBlock(
  21346. "text",
  21347. {
  21348. class: "u-count-num",
  21349. style: vue.normalizeStyle({
  21350. fontSize: $options.addUnit(_ctx.fontSize),
  21351. fontWeight: _ctx.bold ? "bold" : "normal",
  21352. color: _ctx.color
  21353. })
  21354. },
  21355. vue.toDisplayString($data.displayValue),
  21356. 5
  21357. /* TEXT, STYLE */
  21358. );
  21359. }
  21360. const uCountTo = /* @__PURE__ */ _export_sfc(_sfc_main$1B, [["render", _sfc_render$1A], ["__scopeId", "data-v-eb411063"], ["__file", "C:/Users/EDY/Desktop/项目/shuibei/uni_modules/uview-plus/components/u-count-to/u-count-to.vue"]]);
  21361. const __vite_glob_0_31 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
  21362. __proto__: null,
  21363. default: uCountTo
  21364. }, Symbol.toStringTag, { value: "Module" }));
  21365. const _sfc_main$1A = {
  21366. name: "up-coupon",
  21367. props: {
  21368. // 金额
  21369. amount: {
  21370. type: [String, Number],
  21371. default: ""
  21372. },
  21373. // 金额单位
  21374. unit: {
  21375. type: String,
  21376. default: "¥"
  21377. },
  21378. // 单位位置
  21379. unitPosition: {
  21380. type: String,
  21381. default: "left"
  21382. },
  21383. // 使用限制
  21384. limit: {
  21385. type: String,
  21386. default: ""
  21387. },
  21388. // 标题
  21389. title: {
  21390. type: String,
  21391. default: "优惠券"
  21392. },
  21393. // 描述
  21394. desc: {
  21395. type: String,
  21396. default: ""
  21397. },
  21398. // 有效期
  21399. time: {
  21400. type: String,
  21401. default: ""
  21402. },
  21403. // 操作按钮文字
  21404. actionText: {
  21405. type: String,
  21406. default: "使用"
  21407. },
  21408. // 形状:coupon-优惠券, envelope-红包, card-卡片
  21409. shape: {
  21410. type: String,
  21411. default: "coupon"
  21412. },
  21413. // 尺寸:small, medium, large
  21414. size: {
  21415. type: String,
  21416. default: "medium"
  21417. },
  21418. // 是否圆形按钮
  21419. circle: {
  21420. type: Boolean,
  21421. default: false
  21422. },
  21423. // 是否禁用
  21424. disabled: {
  21425. type: Boolean,
  21426. default: false
  21427. },
  21428. // 背景颜色
  21429. bgColor: {
  21430. type: String,
  21431. default: ""
  21432. },
  21433. // 文字颜色
  21434. color: {
  21435. type: String,
  21436. default: ""
  21437. },
  21438. // 内置背景类型
  21439. type: {
  21440. type: String,
  21441. default: ""
  21442. }
  21443. },
  21444. computed: {
  21445. couponStyle() {
  21446. const style = {};
  21447. if (this.bgColor)
  21448. style.background = this.bgColor;
  21449. if (this.color)
  21450. style.color = this.color;
  21451. return style;
  21452. },
  21453. dotCount() {
  21454. const map = {
  21455. small: 8,
  21456. medium: 10,
  21457. large: 12
  21458. };
  21459. return map[this.size] || 10;
  21460. }
  21461. },
  21462. methods: {
  21463. handleClick() {
  21464. if (this.disabled)
  21465. return;
  21466. this.$emit("click");
  21467. }
  21468. }
  21469. };
  21470. function _sfc_render$1z(_ctx, _cache, $props, $setup, $data, $options) {
  21471. const _component_up_tag = vue.resolveComponent("up-tag");
  21472. return vue.openBlock(), vue.createElementBlock(
  21473. "view",
  21474. {
  21475. class: vue.normalizeClass(["up-coupon", [`up-coupon--${$props.shape}`, `up-coupon--${$props.type}`, `up-coupon--${$props.size}`, { "up-coupon--disabled": $props.disabled }]]),
  21476. style: vue.normalizeStyle([$options.couponStyle]),
  21477. onClick: _cache[0] || (_cache[0] = (...args) => $options.handleClick && $options.handleClick(...args))
  21478. },
  21479. [
  21480. vue.createElementVNode("view", { class: "up-coupon__content" }, [
  21481. vue.createCommentVNode(" 左侧金额区域 "),
  21482. vue.createElementVNode("view", { class: "up-coupon__amount" }, [
  21483. $props.unitPosition === "left" ? vue.renderSlot(_ctx.$slots, "unit", {
  21484. key: 0,
  21485. unit: $props.unit,
  21486. unitPosition: $props.unitPosition
  21487. }, () => [
  21488. $props.unitPosition === "left" ? (vue.openBlock(), vue.createElementBlock(
  21489. "text",
  21490. {
  21491. key: 0,
  21492. class: "up-coupon__amount-unit"
  21493. },
  21494. vue.toDisplayString($props.unit),
  21495. 1
  21496. /* TEXT */
  21497. )) : vue.createCommentVNode("v-if", true)
  21498. ], true) : vue.createCommentVNode("v-if", true),
  21499. vue.renderSlot(_ctx.$slots, "amount", { amount: $props.amount }, () => [
  21500. vue.createElementVNode(
  21501. "text",
  21502. { class: "up-coupon__amount-value" },
  21503. vue.toDisplayString($props.amount),
  21504. 1
  21505. /* TEXT */
  21506. )
  21507. ], true),
  21508. $props.unitPosition === "right" ? vue.renderSlot(_ctx.$slots, "unit", {
  21509. key: 1,
  21510. unit: $props.unit,
  21511. unitPosition: $props.unitPosition
  21512. }, () => [
  21513. $props.unitPosition === "right" ? (vue.openBlock(), vue.createElementBlock(
  21514. "text",
  21515. {
  21516. key: 0,
  21517. class: "up-coupon__amount-unit"
  21518. },
  21519. vue.toDisplayString($props.unit),
  21520. 1
  21521. /* TEXT */
  21522. )) : vue.createCommentVNode("v-if", true)
  21523. ], true) : vue.createCommentVNode("v-if", true),
  21524. vue.renderSlot(_ctx.$slots, "limit", { limit: $props.limit }, () => [
  21525. $props.limit ? (vue.openBlock(), vue.createElementBlock(
  21526. "text",
  21527. {
  21528. key: 0,
  21529. class: "up-coupon__amount-limit"
  21530. },
  21531. vue.toDisplayString($props.limit),
  21532. 1
  21533. /* TEXT */
  21534. )) : vue.createCommentVNode("v-if", true)
  21535. ], true)
  21536. ]),
  21537. vue.createCommentVNode(" 中间描述区域 "),
  21538. vue.createElementVNode("view", { class: "up-coupon__info" }, [
  21539. vue.renderSlot(_ctx.$slots, "title", { title: $props.title }, () => [
  21540. vue.createElementVNode(
  21541. "text",
  21542. { class: "up-coupon__info-title" },
  21543. vue.toDisplayString($props.title),
  21544. 1
  21545. /* TEXT */
  21546. )
  21547. ], true),
  21548. vue.renderSlot(_ctx.$slots, "desc", { desc: $props.desc }, () => [
  21549. $props.desc ? (vue.openBlock(), vue.createElementBlock(
  21550. "text",
  21551. {
  21552. key: 0,
  21553. class: "up-coupon__info-desc"
  21554. },
  21555. vue.toDisplayString($props.desc),
  21556. 1
  21557. /* TEXT */
  21558. )) : vue.createCommentVNode("v-if", true)
  21559. ], true),
  21560. vue.renderSlot(_ctx.$slots, "time", { time: $props.time }, () => [
  21561. $props.time ? (vue.openBlock(), vue.createElementBlock(
  21562. "text",
  21563. {
  21564. key: 0,
  21565. class: "up-coupon__info-time"
  21566. },
  21567. vue.toDisplayString($props.time),
  21568. 1
  21569. /* TEXT */
  21570. )) : vue.createCommentVNode("v-if", true)
  21571. ], true)
  21572. ]),
  21573. vue.createCommentVNode(" 右侧操作区域 "),
  21574. vue.createElementVNode("view", { class: "up-coupon__action u-padding-right-20" }, [
  21575. vue.renderSlot(_ctx.$slots, "action", {
  21576. actionText: $props.actionText,
  21577. circle: $props.circle
  21578. }, () => [
  21579. vue.createVNode(_component_up_tag, {
  21580. type: "error",
  21581. bgColor: $props.type ? "transparent" : "#eb433d",
  21582. borderColor: $props.type ? "#eee" : "#eb433d",
  21583. borderRadius: "6px",
  21584. size: "medium",
  21585. class: "up-coupon__action-text",
  21586. shape: $props.circle ? "circle" : "circle"
  21587. }, {
  21588. default: vue.withCtx(() => [
  21589. vue.createTextVNode(
  21590. vue.toDisplayString($props.actionText),
  21591. 1
  21592. /* TEXT */
  21593. )
  21594. ]),
  21595. _: 1
  21596. /* STABLE */
  21597. }, 8, ["bgColor", "borderColor", "shape"])
  21598. ], true)
  21599. ])
  21600. ]),
  21601. vue.createCommentVNode(" 红包绳子效果 "),
  21602. $props.shape === "envelope" ? (vue.openBlock(), vue.createElementBlock("view", {
  21603. key: 0,
  21604. class: "up-coupon__rope"
  21605. })) : vue.createCommentVNode("v-if", true),
  21606. vue.createCommentVNode(" 默认插槽,可用于添加额外内容 "),
  21607. vue.renderSlot(_ctx.$slots, "default", {}, void 0, true)
  21608. ],
  21609. 6
  21610. /* CLASS, STYLE */
  21611. );
  21612. }
  21613. const uCoupon = /* @__PURE__ */ _export_sfc(_sfc_main$1A, [["render", _sfc_render$1z], ["__scopeId", "data-v-8013dcad"], ["__file", "C:/Users/EDY/Desktop/项目/shuibei/uni_modules/uview-plus/components/u-coupon/u-coupon.vue"]]);
  21614. const __vite_glob_0_32 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
  21615. __proto__: null,
  21616. default: uCoupon
  21617. }, Symbol.toStringTag, { value: "Module" }));
  21618. const tabHeight = 50;
  21619. const _sfc_main$1z = {
  21620. name: "u-cropper",
  21621. data() {
  21622. return {
  21623. // 添加实例ID用于区分不同实例
  21624. instanceId: Date.now() + "-" + Math.random().toString(36).substr(2, 9),
  21625. cvsStyleHeight: "0px",
  21626. styleDisplay: "none",
  21627. styleTop: "-10000px",
  21628. prvTop: "-10000px",
  21629. imgStyle: {},
  21630. selStyle: {},
  21631. showOper: true,
  21632. imgSrc: {
  21633. imgSrc: ""
  21634. },
  21635. btnWidth: "19%",
  21636. btnDsp: "flex",
  21637. // 裁剪区域宽度,用于设置选择区域的宽度
  21638. arWidth: "",
  21639. // 裁剪区域高度,用于设置选择区域的高度
  21640. arHeight: "",
  21641. // 导出图片宽度,用于设置最终导出图片的宽度
  21642. expWidth: "",
  21643. // 导出图片高度,用于设置最终导出图片的高度
  21644. expHeight: "",
  21645. // 是否允许调整裁剪框大小
  21646. letChangeSize: false
  21647. };
  21648. },
  21649. watch: {
  21650. avatarSrc() {
  21651. this.imgSrc.imgSrc = this.avatarSrc;
  21652. }
  21653. },
  21654. emits: ["avtinit", "confirm"],
  21655. props: {
  21656. minScale: "",
  21657. maxScale: "",
  21658. canScale: true,
  21659. canRotate: true,
  21660. lockWidth: "",
  21661. lockHeight: "",
  21662. stretch: "",
  21663. lock: "",
  21664. noTab: true,
  21665. inner: false,
  21666. quality: "",
  21667. index: "",
  21668. canChangeSize: false,
  21669. areaWidth: "300rpx",
  21670. // 裁剪区域高度,用于设置选择区域的高度
  21671. areaHeight: "300rpx",
  21672. // 导出图片宽度,用于设置最终导出图片的宽度
  21673. exportWidth: "260rpx",
  21674. // 导出图片高度,用于设置最终导出图片的高度
  21675. exportHeight: "260rpx"
  21676. },
  21677. created() {
  21678. this.ctxCanvas = uni.createCanvasContext("avatar-canvas-" + this.instanceId, this);
  21679. this.ctxCanvasOper = uni.createCanvasContext("oper-canvas-" + this.instanceId, this);
  21680. this.ctxCanvasPrv = uni.createCanvasContext("prv-canvas-" + this.instanceId, this);
  21681. this.qlty = parseInt(this.quality) || 0.9;
  21682. this.imgSrc.imgSrc = this.imageSrc;
  21683. this.letRotate = this.canRotate === false || this.inner === true ? 0 : 1;
  21684. this.letScale = this.canScale === false ? 0 : 1;
  21685. this.letChangeSize = this.canChangeSize;
  21686. this.isin = this.inner === true ? 1 : 0;
  21687. this.indx = this.index || void 0;
  21688. this.mnScale = this.minScale || 0.3;
  21689. this.mxScale = this.maxScale || 4;
  21690. this.noBar = this.noTab === true ? 1 : 0;
  21691. this.stc = this.stretch;
  21692. this.lck = this.lock;
  21693. if (this.isin) {
  21694. this.btnWidth = "24%";
  21695. this.btnDsp = "none";
  21696. } else {
  21697. this.btnWidth = "19%";
  21698. this.btnDsp = "flex";
  21699. }
  21700. if (this.noBar) {
  21701. this.moreHeight = 0;
  21702. this.windowResize();
  21703. } else {
  21704. uni.showTabBar({
  21705. complete: (res) => {
  21706. this.moreHeight = res.errMsg === "showTabBar:ok" ? 50 : 0;
  21707. this.windowResize();
  21708. }
  21709. });
  21710. }
  21711. },
  21712. methods: {
  21713. t: t$1,
  21714. windowResize() {
  21715. let sysInfo = uni.getSystemInfoSync();
  21716. this.platform = sysInfo.platform;
  21717. this.pixelRatio = sysInfo.pixelRatio;
  21718. this.windowWidth = sysInfo.windowWidth;
  21719. if (this.platform === "android") {
  21720. this.windowHeight = sysInfo.screenHeight + sysInfo.statusBarHeight;
  21721. this.cvsStyleHeight = this.windowHeight - tabHeight + "px";
  21722. } else {
  21723. this.windowHeight = sysInfo.windowHeight + this.moreHeight;
  21724. this.cvsStyleHeight = this.windowHeight - tabHeight + 6 + "px";
  21725. }
  21726. this.pxRatio = this.windowWidth / 750;
  21727. let style = this.avatarStyle;
  21728. if (style && style !== true && (style = style.trim())) {
  21729. style = style.split(";");
  21730. let obj = {};
  21731. for (let v2 of style) {
  21732. if (!v2)
  21733. continue;
  21734. v2 = v2.trim().split(":");
  21735. if (v2[1].indexOf("rpx") >= 0) {
  21736. let arr = v2[1].trim().split(" ");
  21737. for (let k2 in arr) {
  21738. if (!arr[k2])
  21739. continue;
  21740. if (arr[k2].indexOf("rpx") >= 0) {
  21741. arr[k2] = parseFloat(arr[k2]) * this.pxRatio + "px";
  21742. }
  21743. }
  21744. v2[1] = arr.join(" ");
  21745. }
  21746. obj[v2[0].trim()] = v2[1].trim();
  21747. }
  21748. this.imgStyle = obj;
  21749. }
  21750. this.expWidth && (this.expWidth = this.expWidth.indexOf("rpx") >= 0 ? parseInt(this.expWidth) * this.pxRatio : parseInt(this.expWidth));
  21751. this.expHeight && (this.expHeight = this.expHeight.indexOf("rpx") >= 0 ? parseInt(this.expHeight) * this.pxRatio : parseInt(this.expHeight));
  21752. if (this.styleDisplay === "flex") {
  21753. this.drawInit(true);
  21754. }
  21755. this.hideImg();
  21756. },
  21757. select() {
  21758. if (this.fSelecting)
  21759. return;
  21760. this.fSelecting = true;
  21761. setTimeout(() => {
  21762. this.fSelecting = false;
  21763. }, 500);
  21764. uni.chooseImage({
  21765. count: 1,
  21766. sizeType: ["original", "compressed"],
  21767. sourceType: ["album", "camera"],
  21768. success: (r2) => {
  21769. uni.showLoading({ mask: true });
  21770. let path = this.imgPath = r2.tempFilePaths[0];
  21771. uni.getImageInfo({
  21772. src: path,
  21773. success: (r3) => {
  21774. this.imgWidth = r3.width;
  21775. this.imgHeight = r3.height;
  21776. this.path = path;
  21777. if (!this.hasSel) {
  21778. let style = this.selStyle || {};
  21779. if (this.arWidth && this.arHeight) {
  21780. let areaWidth = this.arWidth.indexOf("rpx") >= 0 ? parseInt(this.arWidth) * this.pxRatio : parseInt(this.arWidth), areaHeight = this.arHeight.indexOf("rpx") >= 0 ? parseInt(this.arHeight) * this.pxRatio : parseInt(this.arHeight);
  21781. style.width = areaWidth + "px";
  21782. style.height = areaHeight + "px";
  21783. style.top = (this.windowHeight - areaHeight - tabHeight) / 2 + "px";
  21784. style.left = (this.windowWidth - areaWidth) / 2 + "px";
  21785. } else {
  21786. uni.showModal({
  21787. title: t$1("up.cropper.emptyWidhtOrHeight"),
  21788. showCancel: false
  21789. });
  21790. return;
  21791. }
  21792. this.selStyle = style;
  21793. }
  21794. if (this.noBar) {
  21795. this.drawInit(true);
  21796. } else {
  21797. uni.hideTabBar({
  21798. complete: () => {
  21799. this.drawInit(true);
  21800. }
  21801. });
  21802. }
  21803. },
  21804. fail: () => {
  21805. uni.showToast({
  21806. title: "error3",
  21807. duration: 2e3
  21808. });
  21809. },
  21810. complete() {
  21811. uni.hideLoading();
  21812. }
  21813. });
  21814. }
  21815. });
  21816. },
  21817. confirm() {
  21818. if (this.fUploading)
  21819. return;
  21820. this.fUploading = true;
  21821. setTimeout(() => {
  21822. this.fUploading = false;
  21823. }, 1e3);
  21824. let style = this.selStyle, x2 = parseInt(style.left), y2 = parseInt(style.top), width = parseInt(style.width), height = parseInt(style.height), expWidth = this.expWidth || width, expHeight = this.expHeight || height;
  21825. uni.showLoading({ mask: true });
  21826. this.styleDisplay = "none";
  21827. this.styleTop = "-10000px";
  21828. this.hasSel = false;
  21829. this.hideImg();
  21830. uni.canvasToTempFilePath({
  21831. x: x2,
  21832. y: y2,
  21833. width,
  21834. height,
  21835. destWidth: expWidth,
  21836. destHeight: expHeight,
  21837. canvasId: "avatar-canvas-" + this.instanceId,
  21838. fileType: "png",
  21839. quality: this.qlty,
  21840. success: (r2) => {
  21841. r2 = r2.tempFilePath;
  21842. this.$emit("confirm", { avatar: this.imgSrc, path: r2, index: this.indx, data: this.rtn });
  21843. },
  21844. fail: (res) => {
  21845. uni.showToast({
  21846. title: "error1",
  21847. duration: 2e3
  21848. });
  21849. },
  21850. complete: () => {
  21851. uni.hideLoading();
  21852. this.noBar || uni.showTabBar();
  21853. }
  21854. }, this);
  21855. },
  21856. // 用户点击"预览"模式下的"确认"按钮时被调用,用于将预览的裁剪结果上传
  21857. prvUpload() {
  21858. if (this.fPrvUploading)
  21859. return;
  21860. this.fPrvUploading = true;
  21861. setTimeout(() => {
  21862. this.fPrvUploading = false;
  21863. }, 1e3);
  21864. let style = this.selStyle;
  21865. parseInt(style.width);
  21866. parseInt(style.height);
  21867. let prvX = this.prvX, prvY = this.prvY, prvWidth = this.prvWidth, prvHeight = this.prvHeight, expWidth = this.expWidth || prvWidth, expHeight = this.expHeight || prvHeight;
  21868. uni.showLoading({ mask: true });
  21869. this.styleDisplay = "none";
  21870. this.styleTop = "-10000px";
  21871. this.hasSel = false;
  21872. this.hideImg();
  21873. uni.canvasToTempFilePath({
  21874. x: prvX,
  21875. y: prvY,
  21876. width: prvWidth,
  21877. height: prvHeight,
  21878. destWidth: expWidth,
  21879. destHeight: expHeight,
  21880. canvasId: "prv-canvas-" + this.instanceId,
  21881. fileType: "png",
  21882. quality: this.qlty,
  21883. success: (r2) => {
  21884. r2 = r2.tempFilePath;
  21885. this.$emit("confirm", { avatar: this.imgSrc, path: r2, index: this.indx, data: this.rtn });
  21886. },
  21887. fail: () => {
  21888. uni.showToast({
  21889. title: "error_prv",
  21890. duration: 2e3
  21891. });
  21892. },
  21893. complete: () => {
  21894. uni.hideLoading();
  21895. this.noBar || uni.showTabBar();
  21896. }
  21897. }, this);
  21898. },
  21899. drawInit(ini = false) {
  21900. let allWidth = this.windowWidth, allHeight = this.windowHeight, imgWidth = this.imgWidth, imgHeight = this.imgHeight, imgRadio = imgWidth / imgHeight, useWidth = allWidth - 40, useHeight = allHeight - tabHeight - 80;
  21901. this.pixelRatio;
  21902. let selWidth = parseInt(this.selStyle.width), selHeight = parseInt(this.selStyle.height);
  21903. this.fixWidth = 0;
  21904. this.fixHeight = 0;
  21905. this.lckWidth = 0;
  21906. this.lckHeight = 0;
  21907. switch (this.stc) {
  21908. case "x":
  21909. this.fixWidth = 1;
  21910. break;
  21911. case "y":
  21912. this.fixHeight = 1;
  21913. break;
  21914. case "long":
  21915. if (imgRadio > 1)
  21916. this.fixWidth = 1;
  21917. else
  21918. this.fixHeight = 1;
  21919. break;
  21920. case "short":
  21921. if (imgRadio > 1)
  21922. this.fixHeight = 1;
  21923. else
  21924. this.fixWidth = 1;
  21925. break;
  21926. case "longSel":
  21927. if (selWidth > selHeight)
  21928. this.fixWidth = 1;
  21929. else
  21930. this.fixHeight = 1;
  21931. break;
  21932. case "shortSel":
  21933. if (selWidth > selHeight)
  21934. this.fixHeight = 1;
  21935. else
  21936. this.fixWidth = 1;
  21937. break;
  21938. }
  21939. switch (this.lck) {
  21940. case "x":
  21941. this.lckWidth = 1;
  21942. break;
  21943. case "y":
  21944. this.lckHeight = 1;
  21945. break;
  21946. case "long":
  21947. if (imgRadio > 1)
  21948. this.lckWidth = 1;
  21949. else
  21950. this.lckHeight = 1;
  21951. break;
  21952. case "short":
  21953. if (imgRadio > 1)
  21954. this.lckHeight = 1;
  21955. else
  21956. this.lckWidth = 1;
  21957. break;
  21958. case "longSel":
  21959. if (selWidth > selHeight)
  21960. this.lckWidth = 1;
  21961. else
  21962. this.lckHeight = 1;
  21963. break;
  21964. case "shortSel":
  21965. if (selWidth > selHeight)
  21966. this.lckHeight = 1;
  21967. else
  21968. this.lckWidth = 1;
  21969. break;
  21970. }
  21971. if (this.fixWidth) {
  21972. useWidth = selWidth;
  21973. useHeight = useWidth / imgRadio;
  21974. } else if (this.fixHeight) {
  21975. useHeight = selHeight;
  21976. useWidth = useHeight * imgRadio;
  21977. } else if (imgRadio < 1) {
  21978. if (imgHeight < useHeight) {
  21979. useWidth = imgWidth;
  21980. useHeight = imgHeight;
  21981. } else {
  21982. useHeight = useHeight;
  21983. useWidth = useHeight * imgRadio;
  21984. }
  21985. } else {
  21986. if (imgWidth < useWidth) {
  21987. useWidth = imgWidth;
  21988. useHeight = imgHeight;
  21989. } else {
  21990. useWidth = useWidth;
  21991. useHeight = useWidth / imgRadio;
  21992. }
  21993. }
  21994. if (this.isin) {
  21995. this.scaleWidth = 0;
  21996. this.scaleHeight = 0;
  21997. if (useWidth < selWidth) {
  21998. useWidth = selWidth;
  21999. useHeight = useWidth / imgRadio;
  22000. this.lckHeight = 0;
  22001. }
  22002. if (useHeight < selHeight) {
  22003. useHeight = selHeight;
  22004. useWidth = useHeight * imgRadio;
  22005. this.lckWidth = 0;
  22006. }
  22007. }
  22008. this.scaleSize = 1;
  22009. this.rotateDeg = 0;
  22010. this.posWidth = (allWidth - useWidth) / 2;
  22011. this.posHeight = (allHeight - useHeight - tabHeight) / 2;
  22012. this.useWidth = useWidth;
  22013. this.useHeight = useHeight;
  22014. let style = this.selStyle, left = parseInt(style.left), top = parseInt(style.top), width = parseInt(style.width), height = parseInt(style.height);
  22015. this.canvas;
  22016. this.canvasOper;
  22017. let ctxCanvas = this.ctxCanvas, ctxCanvasOper = this.ctxCanvasOper;
  22018. ctxCanvasOper.setLineWidth(3);
  22019. ctxCanvasOper.setStrokeStyle("grey");
  22020. ctxCanvasOper.setGlobalAlpha(0.4);
  22021. ctxCanvasOper.setFillStyle("black");
  22022. ctxCanvasOper.strokeRect(left, top, width, height);
  22023. ctxCanvasOper.fillRect(0, 0, this.windowWidth, top);
  22024. ctxCanvasOper.fillRect(0, top, left, height);
  22025. ctxCanvasOper.fillRect(0, top + height, this.windowWidth, this.windowHeight - height - top - tabHeight);
  22026. ctxCanvasOper.fillRect(left + width, top, this.windowWidth - width - left, height);
  22027. ctxCanvasOper.setStrokeStyle("red");
  22028. ctxCanvasOper.moveTo(left + 20, top);
  22029. ctxCanvasOper.lineTo(left, top);
  22030. ctxCanvasOper.lineTo(left, top + 20);
  22031. ctxCanvasOper.moveTo(left + width - 20, top);
  22032. ctxCanvasOper.lineTo(left + width, top);
  22033. ctxCanvasOper.lineTo(left + width, top + 20);
  22034. ctxCanvasOper.moveTo(left + 20, top + height);
  22035. ctxCanvasOper.lineTo(left, top + height);
  22036. ctxCanvasOper.lineTo(left, top + height - 20);
  22037. ctxCanvasOper.moveTo(left + width - 20, top + height);
  22038. ctxCanvasOper.lineTo(left + width, top + height);
  22039. ctxCanvasOper.lineTo(left + width, top + height - 20);
  22040. const controlPointSize = 10;
  22041. ctxCanvasOper.setFillStyle("white");
  22042. ctxCanvasOper.setStrokeStyle("grey");
  22043. ctxCanvasOper.setLineWidth(1);
  22044. ctxCanvasOper.fillRect(left - controlPointSize / 2, top - controlPointSize / 2, controlPointSize, controlPointSize);
  22045. ctxCanvasOper.strokeRect(left - controlPointSize / 2, top - controlPointSize / 2, controlPointSize, controlPointSize);
  22046. ctxCanvasOper.fillRect(left + width - controlPointSize / 2, top - controlPointSize / 2, controlPointSize, controlPointSize);
  22047. ctxCanvasOper.strokeRect(left + width - controlPointSize / 2, top - controlPointSize / 2, controlPointSize, controlPointSize);
  22048. ctxCanvasOper.fillRect(left - controlPointSize / 2, top + height - controlPointSize / 2, controlPointSize, controlPointSize);
  22049. ctxCanvasOper.strokeRect(left - controlPointSize / 2, top + height - controlPointSize / 2, controlPointSize, controlPointSize);
  22050. ctxCanvasOper.fillRect(left + width - controlPointSize / 2, top + height - controlPointSize / 2, controlPointSize, controlPointSize);
  22051. ctxCanvasOper.strokeRect(left + width - controlPointSize / 2, top + height - controlPointSize / 2, controlPointSize, controlPointSize);
  22052. ctxCanvasOper.stroke();
  22053. ctxCanvasOper.draw(false, () => {
  22054. if (ini) {
  22055. this.styleDisplay = "flex";
  22056. this.styleTop = "0";
  22057. ctxCanvas.setFillStyle("black");
  22058. this.drawImage();
  22059. }
  22060. });
  22061. this.$emit("avtinit");
  22062. },
  22063. drawImage() {
  22064. let tm_now = Date.now();
  22065. if (tm_now - this.drawTm < 20)
  22066. return;
  22067. this.drawTm = tm_now;
  22068. let ctxCanvas = this.ctxCanvas;
  22069. ctxCanvas.fillRect(0, 0, this.windowWidth, this.windowHeight - tabHeight);
  22070. ctxCanvas.translate(this.posWidth + this.useWidth / 2, this.posHeight + this.useHeight / 2);
  22071. ctxCanvas.scale(this.scaleSize, this.scaleSize);
  22072. ctxCanvas.rotate(this.rotateDeg * Math.PI / 180);
  22073. ctxCanvas.drawImage(this.imgPath, -this.useWidth / 2, -this.useHeight / 2, this.useWidth, this.useHeight);
  22074. ctxCanvas.draw(false);
  22075. },
  22076. hideImg() {
  22077. this.prvImg = "";
  22078. this.prvTop = "-10000px";
  22079. this.showOper = true;
  22080. this.prvImgData = null;
  22081. this.target = null;
  22082. },
  22083. close() {
  22084. this.styleDisplay = "none";
  22085. this.styleTop = "-10000px";
  22086. this.hasSel = false;
  22087. this.hideImg();
  22088. this.noBar || uni.showTabBar();
  22089. },
  22090. preview() {
  22091. if (this.fPreviewing)
  22092. return;
  22093. this.fPreviewing = true;
  22094. setTimeout(() => {
  22095. this.fPreviewing = false;
  22096. }, 1e3);
  22097. let style = this.selStyle, x2 = parseInt(style.left), y2 = parseInt(style.top), width = parseInt(style.width), height = parseInt(style.height);
  22098. uni.showLoading({ mask: true });
  22099. uni.canvasToTempFilePath({
  22100. x: x2,
  22101. y: y2,
  22102. width,
  22103. height,
  22104. canvasId: "avatar-canvas-" + this.instanceId,
  22105. fileType: "png",
  22106. quality: this.qlty,
  22107. success: (r2) => {
  22108. this.prvImgTmp = r2 = r2.tempFilePath;
  22109. let ctxCanvasPrv = this.ctxCanvasPrv, prvX = this.windowWidth, prvY = parseInt(this.cvsStyleHeight), prvWidth = parseInt(this.selStyle.width), prvHeight = parseInt(this.selStyle.height), useWidth = prvX - 40, useHeight = prvY - 80, radio = useWidth / prvWidth, rHeight = prvHeight * radio;
  22110. if (rHeight < useHeight) {
  22111. prvWidth = useWidth;
  22112. prvHeight = rHeight;
  22113. } else {
  22114. radio = useHeight / prvHeight;
  22115. prvWidth *= radio;
  22116. prvHeight = useHeight;
  22117. }
  22118. ctxCanvasPrv.setFillStyle("black");
  22119. ctxCanvasPrv.fillRect(0, 0, prvX, prvY);
  22120. ctxCanvasPrv.fillRect(x2, y2, width, height);
  22121. this.prvX = prvX = (prvX - prvWidth) / 2;
  22122. this.prvY = prvY = (prvY - prvHeight) / 2;
  22123. this.prvWidth = prvWidth;
  22124. this.prvHeight = prvHeight;
  22125. ctxCanvasPrv.drawImage(r2, prvX, prvY, prvWidth, prvHeight);
  22126. ctxCanvasPrv.draw(false, () => {
  22127. if (this.platform != "android") {
  22128. this.showOper = false;
  22129. }
  22130. this.prvTop = "0";
  22131. });
  22132. },
  22133. fail: () => {
  22134. uni.showToast({
  22135. title: "error2",
  22136. duration: 2e3
  22137. });
  22138. },
  22139. complete: () => {
  22140. uni.hideLoading();
  22141. }
  22142. }, this);
  22143. },
  22144. chooseImage(index2 = void 0, params2 = void 0, data = void 0) {
  22145. if (params2) {
  22146. formatAppLog("log", "at uni_modules/uview-plus/components/u-cropper/u-cropper.vue:698", params2);
  22147. let areaWidth = params2.areaWidth || this.areaWidth, areaHeight = params2.areaHeight || this.areaHeight, expWidth = params2.exportWidth || this.exportWidth, expHeight = params2.exportHeight || this.exportHeight, quality = params2.quality, canRotate = params2.canRotate, canScale = params2.canScale, canChangeSize = params2.canChangeSize, minScale = params2.minScale, maxScale = params2.maxScale, stretch = params2.stretch, inner = params2.inner, lock = params2.lock;
  22148. formatAppLog("log", "at uni_modules/uview-plus/components/u-cropper/u-cropper.vue:712", "areaWidth", this.areaWidth);
  22149. expWidth && (this.expWidth = expWidth.indexOf("rpx") >= 0 ? parseInt(expWidth) * this.pxRatio : parseInt(expWidth));
  22150. expHeight && (this.expHeight = expHeight.indexOf("rpx") >= 0 ? parseInt(expHeight) * this.pxRatio : parseInt(expHeight));
  22151. this.letRotate = canRotate === false ? 0 : 1;
  22152. this.letScale = canScale === false ? 0 : 1;
  22153. this.letChangeSize = canChangeSize || false;
  22154. this.qlty = parseInt(quality) || 0.9;
  22155. this.mnScale = minScale || 0.3;
  22156. this.mxScale = maxScale || 4;
  22157. this.stc = stretch;
  22158. this.isin = inner === true ? 1 : 0;
  22159. this.lck = lock;
  22160. if (this.isin) {
  22161. this.btnWidth = "24%";
  22162. this.btnDsp = "none";
  22163. } else {
  22164. this.btnWidth = "19%";
  22165. this.btnDsp = "flex";
  22166. }
  22167. if (areaWidth && areaHeight) {
  22168. areaWidth = areaWidth.indexOf("rpx") >= 0 ? parseInt(areaWidth) * this.pxRatio : parseInt(areaWidth);
  22169. areaHeight = areaHeight.indexOf("rpx") >= 0 ? parseInt(areaHeight) * this.pxRatio : parseInt(areaHeight);
  22170. this.selStyle.width = areaWidth + "px";
  22171. this.selStyle.height = areaHeight + "px";
  22172. this.selStyle.top = (this.windowHeight - areaHeight - tabHeight) / 2 + "px";
  22173. this.selStyle.left = (this.windowWidth - areaWidth) / 2 + "px";
  22174. this.hasSel = true;
  22175. }
  22176. }
  22177. this.rtn = data;
  22178. this.indx = index2;
  22179. this.select();
  22180. },
  22181. rotate() {
  22182. if (this.platform === "android") {
  22183. if (this.fRotateing)
  22184. return;
  22185. this.fRotateing = true;
  22186. setTimeout(() => {
  22187. this.fRotateing = false;
  22188. }, 500);
  22189. }
  22190. this.rotateDeg += 90 - this.rotateDeg % 90;
  22191. this.drawImage();
  22192. },
  22193. start(e2) {
  22194. let touches = e2.touches, touch0 = touches[0], touch1 = touches[1];
  22195. this.touch0 = touch0;
  22196. this.touch1 = touch1;
  22197. if (touch1) {
  22198. let x2 = touch1.x - touch0.x, y2 = touch1.y - touch0.y;
  22199. this.fgDistance = Math.sqrt(x2 * x2 + y2 * y2);
  22200. } else {
  22201. if (this.letChangeSize) {
  22202. const controlPointSize = 20;
  22203. const x2 = touch0.x;
  22204. const y2 = touch0.y;
  22205. const style = this.selStyle;
  22206. const left = parseInt(style.left);
  22207. const top = parseInt(style.top);
  22208. const width = parseInt(style.width);
  22209. const height = parseInt(style.height);
  22210. if (Math.abs(x2 - left) < controlPointSize && Math.abs(y2 - top) < controlPointSize) {
  22211. this.resizeHandle = "top-left";
  22212. } else if (Math.abs(x2 - (left + width)) < controlPointSize && Math.abs(y2 - top) < controlPointSize) {
  22213. this.resizeHandle = "top-right";
  22214. } else if (Math.abs(x2 - left) < controlPointSize && Math.abs(y2 - (top + height)) < controlPointSize) {
  22215. this.resizeHandle = "bottom-left";
  22216. } else if (Math.abs(x2 - (left + width)) < controlPointSize && Math.abs(y2 - (top + height)) < controlPointSize) {
  22217. this.resizeHandle = "bottom-right";
  22218. } else {
  22219. this.resizeHandle = null;
  22220. }
  22221. } else {
  22222. this.resizeHandle = null;
  22223. }
  22224. }
  22225. },
  22226. move(e2) {
  22227. let touches = e2.touches, touch0 = touches[0], touch1 = touches[1];
  22228. if (touch1) {
  22229. let x2 = touch1.x - touch0.x, y2 = touch1.y - touch0.y, fgDistance = Math.sqrt(x2 * x2 + y2 * y2), scaleSize = 5e-3 * (fgDistance - this.fgDistance), beScaleSize = this.scaleSize + scaleSize;
  22230. do {
  22231. if (!this.letScale)
  22232. break;
  22233. if (beScaleSize < this.mnScale)
  22234. break;
  22235. if (beScaleSize > this.mxScale)
  22236. break;
  22237. if (this.isin) {
  22238. let imgWidth = this.useWidth * beScaleSize, imgHeight = this.useHeight * beScaleSize, rx0 = this.posWidth + this.useWidth / 2, ry0 = this.posHeight + this.useHeight / 2, l2 = rx0 - imgWidth / 2, t2 = ry0 - imgHeight / 2, r2 = l2 + imgWidth, b2 = t2 + imgHeight, left = parseInt(this.selStyle.left), top = parseInt(this.selStyle.top), width = parseInt(this.selStyle.width), height = parseInt(this.selStyle.height);
  22239. if (left < l2 || left + width > r2 || top < t2 || top + height > b2)
  22240. break;
  22241. this.scaleWidth = (this.useWidth - imgWidth) / 2;
  22242. this.scaleHeight = (this.useHeight - imgHeight) / 2;
  22243. }
  22244. this.scaleSize = beScaleSize;
  22245. } while (0);
  22246. this.fgDistance = fgDistance;
  22247. if (touch1.x !== touch0.x && this.letRotate) {
  22248. x2 = (this.touch1.y - this.touch0.y) / (this.touch1.x - this.touch0.x);
  22249. y2 = (touch1.y - touch0.y) / (touch1.x - touch0.x);
  22250. this.rotateDeg += Math.atan((y2 - x2) / (1 + x2 * y2)) * 180 / Math.PI;
  22251. this.touch0 = touch0;
  22252. this.touch1 = touch1;
  22253. }
  22254. this.drawImage();
  22255. } else if (this.touch0) {
  22256. if (this.resizeHandle && this.letChangeSize) {
  22257. const style = { ...this.selStyle };
  22258. const left = parseInt(style.left);
  22259. const top = parseInt(style.top);
  22260. const width = parseInt(style.width);
  22261. const height = parseInt(style.height);
  22262. const minWidth = 50;
  22263. const minHeight = 50;
  22264. switch (this.resizeHandle) {
  22265. case "top-left":
  22266. style.left = touch0.x + "px";
  22267. style.top = touch0.y + "px";
  22268. style.width = left + width - touch0.x + "px";
  22269. style.height = top + height - touch0.y + "px";
  22270. break;
  22271. case "top-right":
  22272. style.top = touch0.y + "px";
  22273. style.width = touch0.x - left + "px";
  22274. style.height = top + height - touch0.y + "px";
  22275. break;
  22276. case "bottom-left":
  22277. style.left = touch0.x + "px";
  22278. style.width = left + width - touch0.x + "px";
  22279. style.height = touch0.y - top + "px";
  22280. break;
  22281. case "bottom-right":
  22282. style.width = touch0.x - left + "px";
  22283. style.height = touch0.y - top + "px";
  22284. break;
  22285. }
  22286. if (parseInt(style.width) >= minWidth && parseInt(style.height) >= minHeight) {
  22287. if (parseInt(style.left) >= 0 && parseInt(style.top) >= 0 && parseInt(style.left) + parseInt(style.width) <= this.windowWidth && parseInt(style.top) + parseInt(style.height) <= this.windowHeight - tabHeight) {
  22288. this.selStyle = style;
  22289. this.drawInit();
  22290. }
  22291. }
  22292. } else {
  22293. let x2 = touch0.x - this.touch0.x, y2 = touch0.y - this.touch0.y, beX = this.posWidth + x2, beY = this.posHeight + y2;
  22294. if (this.isin) {
  22295. let imgWidth = this.useWidth * this.scaleSize, imgHeight = this.useHeight * this.scaleSize, rx0 = beX + this.useWidth / 2, ry0 = beY + this.useHeight / 2, l2 = rx0 - imgWidth / 2, t2 = ry0 - imgHeight / 2, r2 = l2 + imgWidth, b2 = t2 + imgHeight, left = parseInt(this.selStyle.left), top = parseInt(this.selStyle.top), width = parseInt(this.selStyle.width), height = parseInt(this.selStyle.height);
  22296. if (!this.lckWidth && Math.abs(x2) < 100) {
  22297. if (left >= l2 && left + width <= r2) {
  22298. this.posWidth = beX;
  22299. } else if (left < l2) {
  22300. this.posWidth = left - this.scaleWidth;
  22301. } else if (left + width > r2) {
  22302. this.posWidth = left - (imgWidth - width) - this.scaleWidth;
  22303. }
  22304. }
  22305. if (!this.lckHeight && Math.abs(y2) < 100) {
  22306. if (top >= t2 && top + height <= b2) {
  22307. this.posHeight = beY;
  22308. } else if (top < t2) {
  22309. this.posHeight = top - this.scaleHeight;
  22310. } else if (top + height > b2) {
  22311. this.posHeight = top - (imgHeight - height) - this.scaleHeight;
  22312. }
  22313. }
  22314. } else {
  22315. if (Math.abs(x2) < 100 && !this.lckWidth)
  22316. this.posWidth = beX;
  22317. if (Math.abs(y2) < 100 && !this.lckHeight)
  22318. this.posHeight = beY;
  22319. }
  22320. this.touch0 = touch0;
  22321. this.drawImage();
  22322. }
  22323. }
  22324. },
  22325. end(e2) {
  22326. let touches = e2.touches, touch0 = touches && touches[0];
  22327. touches && touches[1];
  22328. if (touch0) {
  22329. this.touch0 = touch0;
  22330. } else {
  22331. this.touch0 = null;
  22332. this.touch1 = null;
  22333. this.resizeHandle = null;
  22334. }
  22335. },
  22336. getImgData() {
  22337. return new Promise((resolve, reject) => {
  22338. let prvX = this.prvX, prvY = this.prvY, prvWidth = this.prvWidth, prvHeight = this.prvHeight;
  22339. prvX *= this.pixelRatio;
  22340. prvY *= this.pixelRatio;
  22341. prvWidth *= this.pixelRatio;
  22342. prvHeight *= this.pixelRatio;
  22343. uni.canvasGetImageData({
  22344. canvasId: "prv-canvas-" + this.instanceId,
  22345. x: prvX,
  22346. y: prvY,
  22347. width: prvWidth,
  22348. height: prvHeight,
  22349. success(res) {
  22350. resolve(res.data);
  22351. },
  22352. fail(err) {
  22353. reject(err);
  22354. }
  22355. }, this);
  22356. });
  22357. },
  22358. async colorChange(e2) {
  22359. let tm_now = Date.now();
  22360. if (tm_now - this.prvTm < 100)
  22361. return;
  22362. this.prvTm = tm_now;
  22363. uni.showLoading({ mask: true });
  22364. if (!this.prvImgData) {
  22365. if (!(this.prvImgData = await this.getImgData().catch((res) => {
  22366. uni.showToast({
  22367. title: "error_read",
  22368. duration: 2e3
  22369. });
  22370. })))
  22371. return;
  22372. this.target = new Uint8ClampedArray(this.prvImgData.length);
  22373. }
  22374. let data = this.prvImgData, target = this.target, i2 = e2.detail.value, r2, g2, b2, a2, h2, s2, l2, d2, p2, q2, min, max, hK, tR, tG, tB;
  22375. if (i2 === 0) {
  22376. target = data;
  22377. } else {
  22378. i2 = (i2 + 100) / 200;
  22379. if (i2 < 5e-3)
  22380. i2 = 0;
  22381. if (i2 > 0.995)
  22382. i2 = 1;
  22383. for (let n2 = data.length - 1; n2 >= 0; n2 -= 4) {
  22384. r2 = data[n2 - 3] / 255;
  22385. g2 = data[n2 - 2] / 255;
  22386. b2 = data[n2 - 1] / 255;
  22387. max = Math.max(r2, g2, b2);
  22388. min = Math.min(r2, g2, b2);
  22389. d2 = max - min;
  22390. if (max === min) {
  22391. h2 = 0;
  22392. } else if (max === r2 && g2 >= b2) {
  22393. h2 = 60 * ((g2 - b2) / d2);
  22394. } else if (max === r2 && g2 < b2) {
  22395. h2 = 60 * ((g2 - b2) / d2) + 360;
  22396. } else if (max === g2) {
  22397. h2 = 60 * ((b2 - r2) / d2) + 120;
  22398. } else if (max === b2) {
  22399. h2 = 60 * ((r2 - g2) / d2) + 240;
  22400. }
  22401. l2 = (max + min) / 2;
  22402. if (l2 === 0 || max === min) {
  22403. s2 = 0;
  22404. } else if (0 < l2 && l2 <= 0.5) {
  22405. s2 = d2 / (2 * l2);
  22406. } else if (l2 > 0.5) {
  22407. s2 = d2 / (2 - 2 * l2);
  22408. }
  22409. data[n2] && (a2 = data[n2]);
  22410. if (i2 < 0.5) {
  22411. s2 = s2 * i2 / 0.5;
  22412. } else if (i2 > 0.5) {
  22413. s2 = 2 * s2 + 2 * i2 - s2 * i2 / 0.5 - 1;
  22414. }
  22415. if (s2 === 0) {
  22416. r2 = g2 = b2 = Math.round(l2 * 255);
  22417. } else {
  22418. if (l2 < 0.5) {
  22419. q2 = l2 * (1 + s2);
  22420. } else if (l2 >= 0.5) {
  22421. q2 = l2 + s2 - l2 * s2;
  22422. }
  22423. p2 = 2 * l2 - q2;
  22424. hK = h2 / 360;
  22425. tR = hK + 1 / 3;
  22426. tG = hK;
  22427. tB = hK - 1 / 3;
  22428. let correctRGB = (t2) => {
  22429. if (t2 < 0) {
  22430. return t2 + 1;
  22431. }
  22432. if (t2 > 1) {
  22433. return t2 - 1;
  22434. }
  22435. return t2;
  22436. };
  22437. let createRGB = (t2) => {
  22438. if (t2 < 1 / 6) {
  22439. return p2 + (q2 - p2) * 6 * t2;
  22440. } else if (t2 >= 1 / 6 && t2 < 1 / 2) {
  22441. return q2;
  22442. } else if (t2 >= 1 / 2 && t2 < 2 / 3) {
  22443. return p2 + (q2 - p2) * 6 * (2 / 3 - t2);
  22444. }
  22445. return p2;
  22446. };
  22447. r2 = tR = Math.round(createRGB(correctRGB(tR)) * 255);
  22448. g2 = tG = Math.round(createRGB(correctRGB(tG)) * 255);
  22449. b2 = tB = Math.round(createRGB(correctRGB(tB)) * 255);
  22450. }
  22451. a2 && (target[n2] = a2);
  22452. target[n2 - 3] = r2;
  22453. target[n2 - 2] = g2;
  22454. target[n2 - 1] = b2;
  22455. }
  22456. }
  22457. let prvX = this.prvX, prvY = this.prvY, prvWidth = this.prvWidth, prvHeight = this.prvHeight;
  22458. this.ctxCanvasPrv.setFillStyle("black");
  22459. this.ctxCanvasPrv.fillRect(prvX, prvY, prvWidth, prvHeight);
  22460. this.ctxCanvasPrv.draw(true);
  22461. prvX *= this.pixelRatio;
  22462. prvY *= this.pixelRatio;
  22463. prvWidth *= this.pixelRatio;
  22464. prvHeight *= this.pixelRatio;
  22465. uni.canvasPutImageData({
  22466. canvasId: "prv-canvas-" + this.instanceId,
  22467. x: prvX,
  22468. y: prvY,
  22469. width: prvWidth,
  22470. height: prvHeight,
  22471. data: target,
  22472. fail() {
  22473. uni.showToast({
  22474. title: "error_put",
  22475. duration: 2e3
  22476. });
  22477. },
  22478. complete() {
  22479. uni.hideLoading();
  22480. }
  22481. }, this);
  22482. },
  22483. btop(base64) {
  22484. return new Promise(function(resolve, reject) {
  22485. var arr = base64.split(","), mime = arr[0].match(/:(.*?);/)[1], bstr = atob(arr[1]), n2 = bstr.length, u8arr = new Uint8Array(n2);
  22486. while (n2--) {
  22487. u8arr[n2] = bstr.charCodeAt(n2);
  22488. }
  22489. return resolve((window.URL || window.webkitURL).createObjectURL(new Blob([u8arr], { type: mime })));
  22490. });
  22491. }
  22492. }
  22493. };
  22494. function _sfc_render$1y(_ctx, _cache, $props, $setup, $data, $options) {
  22495. return vue.openBlock(), vue.createElementBlock("view", { class: "u-cropper" }, [
  22496. vue.createCommentVNode(' <image :src="imgSrc.imgSrc" @click="select" :style="[ imgStyle ]" class="my-avatar"></image> '),
  22497. vue.createElementVNode("canvas", {
  22498. "canvas-id": "avatar-canvas-" + $data.instanceId,
  22499. id: "avatar-canvas-" + $data.instanceId,
  22500. class: "my-canvas",
  22501. style: vue.normalizeStyle({ top: $data.styleTop, height: $data.cvsStyleHeight }),
  22502. "disable-scroll": "false"
  22503. }, null, 12, ["canvas-id", "id"]),
  22504. vue.createElementVNode("canvas", {
  22505. "canvas-id": "oper-canvas-" + $data.instanceId,
  22506. id: "oper-canvas-" + $data.instanceId,
  22507. class: "oper-canvas",
  22508. style: vue.normalizeStyle({ top: $data.styleTop, height: $data.cvsStyleHeight }),
  22509. "disable-scroll": "false",
  22510. onTouchstart: _cache[0] || (_cache[0] = (...args) => $options.start && $options.start(...args)),
  22511. onTouchmove: _cache[1] || (_cache[1] = (...args) => $options.move && $options.move(...args)),
  22512. onTouchend: _cache[2] || (_cache[2] = (...args) => $options.end && $options.end(...args))
  22513. }, null, 44, ["canvas-id", "id"]),
  22514. vue.createElementVNode("canvas", {
  22515. "canvas-id": "prv-canvas-" + $data.instanceId,
  22516. id: "prv-canvas-" + $data.instanceId,
  22517. class: "prv-canvas",
  22518. "disable-scroll": "false",
  22519. onTouchstart: _cache[3] || (_cache[3] = (...args) => $options.hideImg && $options.hideImg(...args)),
  22520. style: vue.normalizeStyle({ height: $data.cvsStyleHeight, top: $data.prvTop })
  22521. }, null, 44, ["canvas-id", "id"]),
  22522. vue.createElementVNode(
  22523. "view",
  22524. {
  22525. class: "oper-wrapper",
  22526. style: vue.normalizeStyle({ display: $data.styleDisplay })
  22527. },
  22528. [
  22529. vue.createElementVNode("view", { class: "oper" }, [
  22530. $data.showOper ? (vue.openBlock(), vue.createElementBlock("view", {
  22531. key: 0,
  22532. class: "btn-wrapper"
  22533. }, [
  22534. vue.createElementVNode(
  22535. "view",
  22536. {
  22537. onClick: _cache[4] || (_cache[4] = (...args) => $options.select && $options.select(...args)),
  22538. "hover-class": "hover",
  22539. style: vue.normalizeStyle({ width: $data.btnWidth })
  22540. },
  22541. [
  22542. vue.createElementVNode(
  22543. "text",
  22544. null,
  22545. vue.toDisplayString($options.t("up.common.re-select")),
  22546. 1
  22547. /* TEXT */
  22548. )
  22549. ],
  22550. 4
  22551. /* STYLE */
  22552. ),
  22553. vue.createElementVNode(
  22554. "view",
  22555. {
  22556. onClick: _cache[5] || (_cache[5] = (...args) => $options.close && $options.close(...args)),
  22557. "hover-class": "hover",
  22558. style: vue.normalizeStyle({ width: $data.btnWidth })
  22559. },
  22560. [
  22561. vue.createElementVNode(
  22562. "text",
  22563. null,
  22564. vue.toDisplayString($options.t("up.common.close")),
  22565. 1
  22566. /* TEXT */
  22567. )
  22568. ],
  22569. 4
  22570. /* STYLE */
  22571. ),
  22572. vue.createElementVNode(
  22573. "view",
  22574. {
  22575. onClick: _cache[6] || (_cache[6] = (...args) => $options.rotate && $options.rotate(...args)),
  22576. "hover-class": "hover",
  22577. style: vue.normalizeStyle({ width: $data.btnWidth, display: $data.btnDsp })
  22578. },
  22579. [
  22580. vue.createElementVNode(
  22581. "text",
  22582. null,
  22583. vue.toDisplayString($options.t("up.common.rotate")),
  22584. 1
  22585. /* TEXT */
  22586. )
  22587. ],
  22588. 4
  22589. /* STYLE */
  22590. ),
  22591. vue.createElementVNode(
  22592. "view",
  22593. {
  22594. onClick: _cache[7] || (_cache[7] = (...args) => $options.preview && $options.preview(...args)),
  22595. "hover-class": "hover",
  22596. style: vue.normalizeStyle({ width: $data.btnWidth })
  22597. },
  22598. [
  22599. vue.createElementVNode(
  22600. "text",
  22601. null,
  22602. vue.toDisplayString($options.t("up.common.preview")),
  22603. 1
  22604. /* TEXT */
  22605. )
  22606. ],
  22607. 4
  22608. /* STYLE */
  22609. ),
  22610. vue.createElementVNode(
  22611. "view",
  22612. {
  22613. onClick: _cache[8] || (_cache[8] = (...args) => $options.confirm && $options.confirm(...args)),
  22614. "hover-class": "hover",
  22615. style: vue.normalizeStyle({ width: $data.btnWidth })
  22616. },
  22617. [
  22618. vue.createElementVNode(
  22619. "text",
  22620. null,
  22621. vue.toDisplayString($options.t("up.common.confirm")),
  22622. 1
  22623. /* TEXT */
  22624. )
  22625. ],
  22626. 4
  22627. /* STYLE */
  22628. )
  22629. ])) : (vue.openBlock(), vue.createElementBlock("view", {
  22630. key: 1,
  22631. class: "clr-wrapper"
  22632. }, [
  22633. vue.createElementVNode(
  22634. "slider",
  22635. {
  22636. class: "my-slider",
  22637. onChange: _cache[9] || (_cache[9] = (...args) => $options.colorChange && $options.colorChange(...args)),
  22638. "block-size": "25",
  22639. value: "0",
  22640. min: "-100",
  22641. max: "100",
  22642. activeColor: "red",
  22643. backgroundColor: "green",
  22644. "block-color": "grey",
  22645. "show-value": ""
  22646. },
  22647. null,
  22648. 32
  22649. /* NEED_HYDRATION */
  22650. ),
  22651. vue.createElementVNode(
  22652. "view",
  22653. {
  22654. onClick: _cache[10] || (_cache[10] = (...args) => $options.prvUpload && $options.prvUpload(...args)),
  22655. "hover-class": "hover",
  22656. style: vue.normalizeStyle({ width: $data.btnWidth })
  22657. },
  22658. [
  22659. vue.createElementVNode(
  22660. "text",
  22661. null,
  22662. vue.toDisplayString($options.t("up.common.confirm")),
  22663. 1
  22664. /* TEXT */
  22665. )
  22666. ],
  22667. 4
  22668. /* STYLE */
  22669. )
  22670. ]))
  22671. ])
  22672. ],
  22673. 4
  22674. /* STYLE */
  22675. ),
  22676. $data.styleDisplay == "none" ? (vue.openBlock(), vue.createElementBlock("view", {
  22677. key: 0,
  22678. onClick: _cache[11] || (_cache[11] = ($event) => $options.chooseImage(0, {}))
  22679. }, [
  22680. vue.renderSlot(_ctx.$slots, "default", {}, void 0, true)
  22681. ])) : vue.createCommentVNode("v-if", true)
  22682. ]);
  22683. }
  22684. const uCropper = /* @__PURE__ */ _export_sfc(_sfc_main$1z, [["render", _sfc_render$1y], ["__scopeId", "data-v-4888bba5"], ["__file", "C:/Users/EDY/Desktop/项目/shuibei/uni_modules/uview-plus/components/u-cropper/u-cropper.vue"]]);
  22685. const __vite_glob_0_33 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
  22686. __proto__: null,
  22687. default: uCropper
  22688. }, Symbol.toStringTag, { value: "Module" }));
  22689. const props$11 = defineMixin({
  22690. props: {
  22691. // 是否展示工具条
  22692. show: {
  22693. type: Boolean,
  22694. default: () => props$1x.toolbar.show
  22695. },
  22696. // 取消按钮的文字
  22697. cancelText: {
  22698. type: String,
  22699. default: () => props$1x.toolbar.cancelText
  22700. },
  22701. // 确认按钮的文字
  22702. confirmText: {
  22703. type: String,
  22704. default: () => props$1x.toolbar.confirmText
  22705. },
  22706. // 取消按钮的颜色
  22707. cancelColor: {
  22708. type: String,
  22709. default: () => props$1x.toolbar.cancelColor
  22710. },
  22711. // 确认按钮的颜色
  22712. confirmColor: {
  22713. type: String,
  22714. default: () => props$1x.toolbar.confirmColor
  22715. },
  22716. // 标题文字
  22717. title: {
  22718. type: String,
  22719. default: () => props$1x.toolbar.title
  22720. },
  22721. // 开启右侧插槽
  22722. rightSlot: {
  22723. type: Boolean,
  22724. default: false
  22725. }
  22726. }
  22727. });
  22728. const _sfc_main$1y = {
  22729. name: "u-toolbar",
  22730. mixins: [mpMixin, mixin, props$11],
  22731. emits: ["confirm", "cancel"],
  22732. created() {
  22733. },
  22734. methods: {
  22735. // 点击取消按钮
  22736. cancel() {
  22737. this.$emit("cancel");
  22738. },
  22739. // 点击确定按钮
  22740. confirm() {
  22741. this.$emit("confirm");
  22742. }
  22743. }
  22744. };
  22745. function _sfc_render$1x(_ctx, _cache, $props, $setup, $data, $options) {
  22746. return _ctx.show ? (vue.openBlock(), vue.createElementBlock(
  22747. "view",
  22748. {
  22749. key: 0,
  22750. class: "u-toolbar",
  22751. onTouchmove: _cache[2] || (_cache[2] = vue.withModifiers((...args) => _ctx.noop && _ctx.noop(...args), ["stop", "prevent"]))
  22752. },
  22753. [
  22754. vue.createElementVNode("view", { class: "u-toolbar__left" }, [
  22755. vue.createElementVNode("view", {
  22756. class: "u-toolbar__cancel__wrapper",
  22757. "hover-class": "u-hover-class"
  22758. }, [
  22759. vue.createElementVNode(
  22760. "text",
  22761. {
  22762. class: "u-toolbar__wrapper__cancel",
  22763. onClick: _cache[0] || (_cache[0] = (...args) => $options.cancel && $options.cancel(...args)),
  22764. style: vue.normalizeStyle({
  22765. color: _ctx.cancelColor
  22766. })
  22767. },
  22768. vue.toDisplayString(_ctx.cancelText),
  22769. 5
  22770. /* TEXT, STYLE */
  22771. )
  22772. ])
  22773. ]),
  22774. _ctx.title ? (vue.openBlock(), vue.createElementBlock(
  22775. "text",
  22776. {
  22777. key: 0,
  22778. class: "u-toolbar__title u-line-1"
  22779. },
  22780. vue.toDisplayString(_ctx.title),
  22781. 1
  22782. /* TEXT */
  22783. )) : vue.createCommentVNode("v-if", true),
  22784. vue.createElementVNode("view", { class: "u-toolbar__right" }, [
  22785. !_ctx.rightSlot ? (vue.openBlock(), vue.createElementBlock("view", {
  22786. key: 0,
  22787. class: "u-toolbar__confirm__wrapper",
  22788. "hover-class": "u-hover-class"
  22789. }, [
  22790. vue.createElementVNode(
  22791. "text",
  22792. {
  22793. class: "u-toolbar__wrapper__confirm",
  22794. onClick: _cache[1] || (_cache[1] = (...args) => $options.confirm && $options.confirm(...args)),
  22795. style: vue.normalizeStyle({
  22796. color: _ctx.confirmColor
  22797. })
  22798. },
  22799. vue.toDisplayString(_ctx.confirmText),
  22800. 5
  22801. /* TEXT, STYLE */
  22802. )
  22803. ])) : vue.renderSlot(_ctx.$slots, "right", { key: 1 }, void 0, true)
  22804. ])
  22805. ],
  22806. 32
  22807. /* NEED_HYDRATION */
  22808. )) : vue.createCommentVNode("v-if", true);
  22809. }
  22810. const __easycom_0$5 = /* @__PURE__ */ _export_sfc(_sfc_main$1y, [["render", _sfc_render$1x], ["__scopeId", "data-v-eadae74e"], ["__file", "C:/Users/EDY/Desktop/项目/shuibei/uni_modules/uview-plus/components/u-toolbar/u-toolbar.vue"]]);
  22811. const __vite_glob_0_121 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
  22812. __proto__: null,
  22813. default: __easycom_0$5
  22814. }, Symbol.toStringTag, { value: "Module" }));
  22815. const props$10 = defineMixin({
  22816. props: {
  22817. modelValue: {
  22818. type: Array,
  22819. default: () => []
  22820. },
  22821. hasInput: {
  22822. type: Boolean,
  22823. default: false
  22824. },
  22825. inputProps: {
  22826. type: Object,
  22827. default: () => {
  22828. return {};
  22829. }
  22830. },
  22831. disabled: {
  22832. type: Boolean,
  22833. default: () => props$1x.picker.disabled
  22834. },
  22835. disabledColor: {
  22836. type: String,
  22837. default: () => props$1x.picker.disabledColor
  22838. },
  22839. placeholder: {
  22840. type: String,
  22841. default: () => props$1x.picker.placeholder
  22842. },
  22843. // 是否展示picker弹窗
  22844. show: {
  22845. type: Boolean,
  22846. default: () => props$1x.picker.show
  22847. },
  22848. // 弹出的方向,可选值为 top bottom right left center
  22849. popupMode: {
  22850. type: String,
  22851. default: () => props$1x.picker.popupMode
  22852. },
  22853. // 是否展示顶部的操作栏
  22854. showToolbar: {
  22855. type: Boolean,
  22856. default: () => props$1x.picker.showToolbar
  22857. },
  22858. // 顶部标题
  22859. title: {
  22860. type: String,
  22861. default: () => props$1x.picker.title
  22862. },
  22863. // 对象数组,设置每一列的数据
  22864. columns: {
  22865. type: Array,
  22866. default: () => props$1x.picker.columns
  22867. },
  22868. // 是否显示加载中状态
  22869. loading: {
  22870. type: Boolean,
  22871. default: () => props$1x.picker.loading
  22872. },
  22873. // 各列中,单个选项的高度
  22874. itemHeight: {
  22875. type: [String, Number],
  22876. default: () => props$1x.picker.itemHeight
  22877. },
  22878. // 取消按钮的文字
  22879. cancelText: {
  22880. type: String,
  22881. default: () => props$1x.picker.cancelText
  22882. },
  22883. // 确认按钮的文字
  22884. confirmText: {
  22885. type: String,
  22886. default: () => props$1x.picker.confirmText
  22887. },
  22888. // 取消按钮的颜色
  22889. cancelColor: {
  22890. type: String,
  22891. default: () => props$1x.picker.cancelColor
  22892. },
  22893. // 确认按钮的颜色
  22894. confirmColor: {
  22895. type: String,
  22896. default: () => props$1x.picker.confirmColor
  22897. },
  22898. // 每列中可见选项的数量
  22899. visibleItemCount: {
  22900. type: [String, Number],
  22901. default: () => props$1x.picker.visibleItemCount
  22902. },
  22903. // 选项对象中,需要展示的属性键名
  22904. keyName: {
  22905. type: String,
  22906. default: () => props$1x.picker.keyName
  22907. },
  22908. // 选项对象中,需要获取的属性值键名
  22909. valueName: {
  22910. type: String,
  22911. default: () => props$1x.picker.valueName
  22912. },
  22913. // 是否允许点击遮罩关闭选择器
  22914. closeOnClickOverlay: {
  22915. type: Boolean,
  22916. default: () => props$1x.picker.closeOnClickOverlay
  22917. },
  22918. // 各列的默认索引
  22919. defaultIndex: {
  22920. type: Array,
  22921. default: () => props$1x.picker.defaultIndex
  22922. },
  22923. // 是否在手指松开时立即触发 change 事件。若不开启则会在滚动动画结束后触发 change 事件,只在微信2.21.1及以上有效
  22924. immediateChange: {
  22925. type: Boolean,
  22926. default: () => props$1x.picker.immediateChange
  22927. },
  22928. // 工具栏右侧插槽是否开启
  22929. toolbarRightSlot: {
  22930. type: Boolean,
  22931. default: false
  22932. },
  22933. // 层级
  22934. zIndex: {
  22935. type: [String, Number],
  22936. default: () => props$1x.picker.zIndex
  22937. },
  22938. // 弹窗背景色,设置为transparent可去除白色背景
  22939. bgColor: {
  22940. type: String,
  22941. default: () => props$1x.picker.bgColor
  22942. },
  22943. // 是否显示圆角
  22944. round: {
  22945. type: [Boolean, String, Number],
  22946. default: () => props$1x.picker.round
  22947. },
  22948. // 动画时长,单位ms
  22949. duration: {
  22950. type: [String, Number],
  22951. default: () => props$1x.picker.duration
  22952. },
  22953. // 遮罩的透明度,0-1之间
  22954. overlayOpacity: {
  22955. type: [Number, String],
  22956. default: () => props$1x.picker.overlayOpacity
  22957. },
  22958. // 是否页面内展示
  22959. pageInline: {
  22960. type: Boolean,
  22961. default: () => props$1x.picker.pageInline
  22962. }
  22963. }
  22964. });
  22965. const _sfc_main$1x = {
  22966. name: "u-picker",
  22967. mixins: [mpMixin, mixin, props$10],
  22968. data() {
  22969. return {
  22970. // 上一次选择的列索引
  22971. lastIndex: [],
  22972. // 索引值 ,对应picker-view的value
  22973. innerIndex: [],
  22974. // 各列的值
  22975. innerColumns: [],
  22976. // 上一次的变化列索引
  22977. columnIndex: 0,
  22978. showByClickInput: false,
  22979. currentActiveValue: []
  22980. //当前用户选中,但是还没确认的值,用户没做change操作时候,点击确认可以默认选中第一个
  22981. };
  22982. },
  22983. watch: {
  22984. // 监听columns参数的变化
  22985. columns: {
  22986. immediate: true,
  22987. deep: true,
  22988. handler(n2) {
  22989. this.setColumns(n2);
  22990. }
  22991. },
  22992. // 监听默认索引的变化,重新设置对应的值
  22993. defaultIndex: {
  22994. immediate: true,
  22995. deep: true,
  22996. handler(n2, o2) {
  22997. if (!o2 || n2.join("/") != o2.join("/")) {
  22998. this.setIndexs(n2, true);
  22999. }
  23000. }
  23001. },
  23002. modelValue: {
  23003. immediate: true,
  23004. deep: true,
  23005. handler(n2, o2) {
  23006. if (!o2 || n2.join("/") != o2.join("/")) {
  23007. let arr = [];
  23008. if (n2 != null) {
  23009. n2.forEach((element, index2) => {
  23010. let currentCols = this.getColumnValues(index2);
  23011. if (currentCols && Object.prototype.toString.call(currentCols) === "[object Object]") {
  23012. currentCols.forEach((item, index22) => {
  23013. if (item[this.keyName] == element) {
  23014. arr.push(index22);
  23015. }
  23016. });
  23017. } else {
  23018. currentCols.forEach((item, index22) => {
  23019. if (item == element) {
  23020. arr.push(index22);
  23021. }
  23022. });
  23023. }
  23024. });
  23025. if (arr.length == 0 && this.defaultIndex)
  23026. ;
  23027. else {
  23028. this.setIndexs(arr, true);
  23029. }
  23030. }
  23031. }
  23032. }
  23033. }
  23034. },
  23035. emits: ["close", "cancel", "confirm", "change", "update:modelValue", "update:show"],
  23036. computed: {
  23037. // input的props
  23038. inputPropsInner() {
  23039. return {
  23040. border: this.inputBorder,
  23041. placeholder: this.placeholder,
  23042. disabled: this.disabled,
  23043. disabledColor: this.disabledColor,
  23044. ...this.inputProps
  23045. };
  23046. },
  23047. //已选&&已确认的值显示在input上面的文案
  23048. inputLabel() {
  23049. let firstItem = this.innerColumns[0] && this.innerColumns[0][0];
  23050. if (firstItem && Object.prototype.toString.call(firstItem) === "[object Object]") {
  23051. let res = this.innerColumns[0].filter((item) => this.modelValue.includes(item["id"]));
  23052. res = res.map((item) => item[this.keyName]);
  23053. return res.join("/");
  23054. } else {
  23055. return this.modelValue.join("/");
  23056. }
  23057. },
  23058. //已选,待确认的值
  23059. inputValue() {
  23060. let items = this.innerColumns.map((item, index2) => item[this.innerIndex[index2]]);
  23061. let res = [];
  23062. if (items[0] && Object.prototype.toString.call(items[0]) === "[object Object]") {
  23063. items.forEach((element) => {
  23064. res.push(element && element[this.valueName]);
  23065. });
  23066. } else {
  23067. items.forEach((element, index2) => {
  23068. res.push(element);
  23069. });
  23070. }
  23071. return res;
  23072. }
  23073. },
  23074. methods: {
  23075. addUnit,
  23076. testArray: test.array,
  23077. onShowByClickInput() {
  23078. if (!this.disabled) {
  23079. this.showByClickInput = !this.showByClickInput;
  23080. }
  23081. },
  23082. // 获取item需要显示的文字,判别为对象还是文本
  23083. getItemText(item) {
  23084. if (test.object(item)) {
  23085. return item[this.keyName];
  23086. } else {
  23087. return item;
  23088. }
  23089. },
  23090. // 关闭选择器
  23091. closeHandler() {
  23092. if (this.closeOnClickOverlay) {
  23093. if (this.hasInput) {
  23094. this.showByClickInput = false;
  23095. }
  23096. this.setDefault();
  23097. this.$emit("update:show", false);
  23098. this.$emit("close");
  23099. }
  23100. },
  23101. // 点击工具栏的取消按钮
  23102. cancel() {
  23103. if (this.hasInput) {
  23104. this.showByClickInput = false;
  23105. }
  23106. this.setDefault();
  23107. this.$emit("update:show", false);
  23108. this.$emit("cancel");
  23109. },
  23110. setDefault() {
  23111. let arr = [0];
  23112. if (this.lastIndex.length == 0) {
  23113. if (Array.isArray(this.defaultIndex) && this.defaultIndex.length == this.innerColumns.length) {
  23114. arr = [...this.defaultIndex];
  23115. } else {
  23116. arr = Array(this.innerColumns.length).fill(0);
  23117. }
  23118. } else {
  23119. arr = deepClone(this.lastIndex);
  23120. }
  23121. this.setLastIndex(arr);
  23122. this.setIndexs(arr);
  23123. },
  23124. // 点击工具栏的确定按钮
  23125. confirm() {
  23126. if (!this.currentActiveValue.length) {
  23127. this.setDefault();
  23128. }
  23129. this.$emit("update:modelValue", this.inputValue);
  23130. if (this.hasInput) {
  23131. this.showByClickInput = false;
  23132. }
  23133. this.setLastIndex(this.innerIndex);
  23134. this.$emit("update:show", false);
  23135. this.$emit("confirm", {
  23136. indexs: this.innerIndex,
  23137. value: this.innerColumns.map((item, index2) => item[this.innerIndex[index2]]),
  23138. values: this.innerColumns
  23139. });
  23140. },
  23141. // 选择器某一列的数据发生变化时触发
  23142. changeHandler(e2) {
  23143. const {
  23144. value: value2
  23145. } = e2.detail;
  23146. let index2 = 0, columnIndex = 0;
  23147. this.currentActiveValue = value2;
  23148. for (let i2 = 0; i2 < value2.length; i2++) {
  23149. let item = value2[i2];
  23150. if (item !== (this.lastIndex[i2] || 0)) {
  23151. columnIndex = i2;
  23152. index2 = item;
  23153. break;
  23154. }
  23155. }
  23156. this.columnIndex = columnIndex;
  23157. const values = this.innerColumns;
  23158. this.setIndexs(value2);
  23159. this.$emit("change", {
  23160. // 微信小程序不能传递this,会因为循环引用而报错
  23161. // picker: this,
  23162. value: this.innerColumns.map((item, index3) => item[value2[index3]]),
  23163. index: index2,
  23164. indexs: value2,
  23165. // values为当前变化列的数组内容
  23166. values,
  23167. columnIndex
  23168. });
  23169. },
  23170. // 设置index索引,此方法可被外部调用设置
  23171. setIndexs(index2, setLastIndex) {
  23172. this.innerIndex = deepClone(index2);
  23173. if (setLastIndex) {
  23174. this.setLastIndex(index2);
  23175. }
  23176. },
  23177. // 记录上一次的各列索引位置
  23178. setLastIndex(index2) {
  23179. this.lastIndex = deepClone(index2);
  23180. },
  23181. // 设置对应列选项的所有值
  23182. setColumnValues(columnIndex, values) {
  23183. this.innerColumns.splice(columnIndex, 1, values);
  23184. this.setLastIndex(this.innerIndex.slice(0, columnIndex));
  23185. let tmpIndex = deepClone(this.innerIndex);
  23186. for (let i2 = 0; i2 < this.innerColumns.length; i2++) {
  23187. if (i2 > this.columnIndex) {
  23188. tmpIndex[i2] = 0;
  23189. }
  23190. }
  23191. this.setIndexs(tmpIndex);
  23192. },
  23193. // 获取对应列的所有选项
  23194. getColumnValues(columnIndex) {
  23195. (async () => {
  23196. await sleep();
  23197. })();
  23198. return this.innerColumns[columnIndex];
  23199. },
  23200. // 设置整体各列的columns的值
  23201. setColumns(columns) {
  23202. this.innerColumns = deepClone(columns);
  23203. if (this.innerIndex.length === 0) {
  23204. this.innerIndex = new Array(columns.length).fill(0);
  23205. }
  23206. },
  23207. // 获取各列选中值对应的索引
  23208. getIndexs() {
  23209. return this.innerIndex;
  23210. },
  23211. // 获取各列选中的值
  23212. getValues() {
  23213. (async () => {
  23214. await sleep();
  23215. })();
  23216. return this.innerColumns.map((item, index2) => item[this.innerIndex[index2]]);
  23217. }
  23218. }
  23219. };
  23220. function _sfc_render$1w(_ctx, _cache, $props, $setup, $data, $options) {
  23221. const _component_up_input = vue.resolveComponent("up-input");
  23222. const _component_u_toolbar = resolveEasycom(vue.resolveDynamicComponent("u-toolbar"), __easycom_0$5);
  23223. const _component_u_loading_icon = resolveEasycom(vue.resolveDynamicComponent("u-loading-icon"), __easycom_0$e);
  23224. const _component_u_popup = resolveEasycom(vue.resolveDynamicComponent("u-popup"), __easycom_2);
  23225. return vue.openBlock(), vue.createElementBlock("view", { class: "u-picker-wraper" }, [
  23226. _ctx.hasInput ? (vue.openBlock(), vue.createElementBlock("view", {
  23227. key: 0,
  23228. class: "u-picker-input cursor-pointer",
  23229. onClick: _cache[1] || (_cache[1] = (...args) => $options.onShowByClickInput && $options.onShowByClickInput(...args))
  23230. }, [
  23231. vue.renderSlot(_ctx.$slots, "default", { value: $options.inputLabel }, void 0, true),
  23232. vue.renderSlot(_ctx.$slots, "trigger", { value: $options.inputLabel }, void 0, true),
  23233. !_ctx.$slots["default"] && !_ctx.$slots["$default"] && !_ctx.$slots["trigger"] ? (vue.openBlock(), vue.createBlock(_component_up_input, vue.mergeProps({
  23234. key: 0,
  23235. readonly: true,
  23236. modelValue: $options.inputLabel,
  23237. "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => $options.inputLabel = $event)
  23238. }, $options.inputPropsInner), null, 16, ["modelValue"])) : vue.createCommentVNode("v-if", true),
  23239. vue.createElementVNode("view", { class: "input-cover" })
  23240. ])) : vue.createCommentVNode("v-if", true),
  23241. vue.createVNode(_component_u_popup, {
  23242. show: _ctx.show || _ctx.hasInput && $data.showByClickInput,
  23243. mode: _ctx.popupMode,
  23244. zIndex: _ctx.zIndex,
  23245. bgColor: _ctx.bgColor,
  23246. round: _ctx.round,
  23247. duration: _ctx.duration,
  23248. pageInline: _ctx.pageInline,
  23249. overlayOpacity: _ctx.overlayOpacity,
  23250. onClose: $options.closeHandler
  23251. }, {
  23252. default: vue.withCtx(() => [
  23253. vue.createElementVNode("view", { class: "u-picker" }, [
  23254. _ctx.showToolbar ? (vue.openBlock(), vue.createBlock(_component_u_toolbar, {
  23255. key: 0,
  23256. cancelColor: _ctx.cancelColor,
  23257. confirmColor: _ctx.confirmColor,
  23258. cancelText: _ctx.cancelText,
  23259. confirmText: _ctx.confirmText,
  23260. title: _ctx.title,
  23261. rightSlot: _ctx.toolbarRightSlot ? true : false,
  23262. onCancel: $options.cancel,
  23263. onConfirm: $options.confirm
  23264. }, {
  23265. right: vue.withCtx(() => [
  23266. vue.renderSlot(_ctx.$slots, "toolbar-right", {}, void 0, true)
  23267. ]),
  23268. _: 3
  23269. /* FORWARDED */
  23270. }, 8, ["cancelColor", "confirmColor", "cancelText", "confirmText", "title", "rightSlot", "onCancel", "onConfirm"])) : vue.createCommentVNode("v-if", true),
  23271. vue.renderSlot(_ctx.$slots, "toolbar-bottom", {}, void 0, true),
  23272. vue.createElementVNode("picker-view", {
  23273. class: "u-picker__view",
  23274. indicatorStyle: `height: ${$options.addUnit(_ctx.itemHeight, "px")}`,
  23275. value: $data.innerIndex,
  23276. immediateChange: _ctx.immediateChange,
  23277. style: vue.normalizeStyle({
  23278. height: `${$options.addUnit(_ctx.visibleItemCount * _ctx.itemHeight, "px")}`
  23279. }),
  23280. onChange: _cache[2] || (_cache[2] = (...args) => $options.changeHandler && $options.changeHandler(...args))
  23281. }, [
  23282. (vue.openBlock(true), vue.createElementBlock(
  23283. vue.Fragment,
  23284. null,
  23285. vue.renderList($data.innerColumns, (item, index2) => {
  23286. return vue.openBlock(), vue.createElementBlock("picker-view-column", {
  23287. key: index2,
  23288. class: "u-picker__view__column"
  23289. }, [
  23290. $options.testArray(item) ? (vue.openBlock(true), vue.createElementBlock(
  23291. vue.Fragment,
  23292. { key: 0 },
  23293. vue.renderList(item, (item1, index1) => {
  23294. return vue.openBlock(), vue.createElementBlock(
  23295. "view",
  23296. {
  23297. class: vue.normalizeClass(["u-picker__view__column__item u-line-1", [index1 === $data.innerIndex[index2] && "u-picker__view__column__item--selected"]]),
  23298. key: index1,
  23299. style: vue.normalizeStyle({
  23300. height: $options.addUnit(_ctx.itemHeight, "px"),
  23301. lineHeight: $options.addUnit(_ctx.itemHeight, "px"),
  23302. fontWeight: index1 === $data.innerIndex[index2] ? "bold" : "normal",
  23303. display: "block"
  23304. })
  23305. },
  23306. vue.toDisplayString($options.getItemText(item1)),
  23307. 7
  23308. /* TEXT, CLASS, STYLE */
  23309. );
  23310. }),
  23311. 128
  23312. /* KEYED_FRAGMENT */
  23313. )) : vue.createCommentVNode("v-if", true)
  23314. ]);
  23315. }),
  23316. 128
  23317. /* KEYED_FRAGMENT */
  23318. ))
  23319. ], 44, ["indicatorStyle", "value", "immediateChange"]),
  23320. _ctx.loading ? (vue.openBlock(), vue.createElementBlock("view", {
  23321. key: 1,
  23322. class: "u-picker--loading"
  23323. }, [
  23324. vue.createVNode(_component_u_loading_icon, { mode: "circle" })
  23325. ])) : vue.createCommentVNode("v-if", true)
  23326. ])
  23327. ]),
  23328. _: 3
  23329. /* FORWARDED */
  23330. }, 8, ["show", "mode", "zIndex", "bgColor", "round", "duration", "pageInline", "overlayOpacity", "onClose"])
  23331. ]);
  23332. }
  23333. const __easycom_0$4 = /* @__PURE__ */ _export_sfc(_sfc_main$1x, [["render", _sfc_render$1w], ["__scopeId", "data-v-91b05052"], ["__file", "C:/Users/EDY/Desktop/项目/shuibei/uni_modules/uview-plus/components/u-picker/u-picker.vue"]]);
  23334. const __vite_glob_0_78 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
  23335. __proto__: null,
  23336. default: __easycom_0$4
  23337. }, Symbol.toStringTag, { value: "Module" }));
  23338. const props$$ = defineMixin({
  23339. props: {
  23340. // 是否显示input
  23341. hasInput: {
  23342. type: Boolean,
  23343. default: false
  23344. },
  23345. inputProps: {
  23346. type: Object,
  23347. default: () => {
  23348. return {};
  23349. }
  23350. },
  23351. inputBorder: {
  23352. type: String,
  23353. default: () => props$1x.input.inputBorder
  23354. },
  23355. disabled: {
  23356. type: Boolean,
  23357. default: () => props$1x.input.disabled
  23358. },
  23359. disabledColor: {
  23360. type: String,
  23361. default: () => props$1x.input.disabledColor
  23362. },
  23363. placeholder: {
  23364. type: String,
  23365. default: () => props$1x.input.placeholder
  23366. },
  23367. format: {
  23368. type: String,
  23369. default: () => ""
  23370. },
  23371. // 是否打开组件
  23372. show: {
  23373. type: Boolean,
  23374. default: () => props$1x.datetimePicker.show
  23375. },
  23376. // 弹出的方向,可选值为 top bottom right left center
  23377. popupMode: {
  23378. type: String,
  23379. default: () => props$1x.picker.popupMode
  23380. },
  23381. // 是否展示顶部的操作栏
  23382. showToolbar: {
  23383. type: Boolean,
  23384. default: () => props$1x.datetimePicker.showToolbar
  23385. },
  23386. // 工具栏右侧内容
  23387. toolbarRightSlot: {
  23388. type: Boolean,
  23389. default: false
  23390. },
  23391. // 绑定值
  23392. modelValue: {
  23393. type: [String, Number],
  23394. default: () => props$1x.datetimePicker.value
  23395. },
  23396. // 顶部标题
  23397. title: {
  23398. type: String,
  23399. default: () => props$1x.datetimePicker.title
  23400. },
  23401. // 展示格式,mode=date为日期选择,mode=time为时间选择,mode=year-month为年月选择,mode=datetime为日期时间选择
  23402. mode: {
  23403. type: String,
  23404. default: () => props$1x.datetimePicker.mode
  23405. },
  23406. // 可选的最大时间
  23407. maxDate: {
  23408. type: Number,
  23409. // 最大默认值为后10年
  23410. default: () => props$1x.datetimePicker.maxDate
  23411. },
  23412. // 可选的最小时间
  23413. minDate: {
  23414. type: Number,
  23415. // 最小默认值为前10年
  23416. default: () => props$1x.datetimePicker.minDate
  23417. },
  23418. // 可选的最小小时,仅mode=time有效
  23419. minHour: {
  23420. type: Number,
  23421. default: () => props$1x.datetimePicker.minHour
  23422. },
  23423. // 可选的最大小时,仅mode=time有效
  23424. maxHour: {
  23425. type: Number,
  23426. default: () => props$1x.datetimePicker.maxHour
  23427. },
  23428. // 可选的最小分钟,仅mode=time有效
  23429. minMinute: {
  23430. type: Number,
  23431. default: () => props$1x.datetimePicker.minMinute
  23432. },
  23433. // 可选的最大分钟,仅mode=time有效
  23434. maxMinute: {
  23435. type: Number,
  23436. default: () => props$1x.datetimePicker.maxMinute
  23437. },
  23438. // 选项过滤函数
  23439. filter: {
  23440. type: [Function, null],
  23441. default: () => props$1x.datetimePicker.filter
  23442. },
  23443. // 选项格式化函数
  23444. formatter: {
  23445. type: [Function, null],
  23446. default: () => props$1x.datetimePicker.formatter
  23447. },
  23448. // 是否显示加载中状态
  23449. loading: {
  23450. type: Boolean,
  23451. default: () => props$1x.datetimePicker.loading
  23452. },
  23453. // 各列中,单个选项的高度
  23454. itemHeight: {
  23455. type: [String, Number],
  23456. default: () => props$1x.datetimePicker.itemHeight
  23457. },
  23458. // 取消按钮的文字
  23459. cancelText: {
  23460. type: String,
  23461. default: () => props$1x.datetimePicker.cancelText
  23462. },
  23463. // 确认按钮的文字
  23464. confirmText: {
  23465. type: String,
  23466. default: () => props$1x.datetimePicker.confirmText
  23467. },
  23468. // 取消按钮的颜色
  23469. cancelColor: {
  23470. type: String,
  23471. default: () => props$1x.datetimePicker.cancelColor
  23472. },
  23473. // 确认按钮的颜色
  23474. confirmColor: {
  23475. type: String,
  23476. default: () => props$1x.datetimePicker.confirmColor
  23477. },
  23478. // 每列中可见选项的数量
  23479. visibleItemCount: {
  23480. type: [String, Number],
  23481. default: () => props$1x.datetimePicker.visibleItemCount
  23482. },
  23483. // 是否允许点击遮罩关闭选择器
  23484. closeOnClickOverlay: {
  23485. type: Boolean,
  23486. default: () => props$1x.datetimePicker.closeOnClickOverlay
  23487. },
  23488. // 各列的默认索引
  23489. defaultIndex: {
  23490. type: Array,
  23491. default: () => props$1x.datetimePicker.defaultIndex
  23492. },
  23493. // 是否页面内展示
  23494. pageInline: {
  23495. type: Boolean,
  23496. default: () => props$1x.datetimePicker.pageInline
  23497. }
  23498. }
  23499. });
  23500. function times(n2, iteratee) {
  23501. let index2 = -1;
  23502. const result = Array(n2 < 0 ? 0 : n2);
  23503. while (++index2 < n2) {
  23504. result[index2] = iteratee(index2);
  23505. }
  23506. return result;
  23507. }
  23508. const _sfc_main$1w = {
  23509. name: "up-datetime-picker",
  23510. mixins: [mpMixin, mixin, props$$],
  23511. data() {
  23512. return {
  23513. // 原来的日期选择器不方便,这里增加一个hasInput选项支持类似element的自带输入框的功能。
  23514. inputValue: "",
  23515. // 表单显示值
  23516. showByClickInput: false,
  23517. // 是否在hasInput模式下显示日期选择弹唱
  23518. columns: [],
  23519. innerDefaultIndex: [],
  23520. innerFormatter: (type2, value2) => value2
  23521. };
  23522. },
  23523. watch: {
  23524. show(newValue, oldValue) {
  23525. if (newValue) {
  23526. this.innerValue = this.correctValue(this.modelValue);
  23527. this.updateColumnValue(this.innerValue);
  23528. }
  23529. },
  23530. modelValue(newValue) {
  23531. this.init();
  23532. },
  23533. propsChange() {
  23534. this.init();
  23535. }
  23536. },
  23537. computed: {
  23538. // 如果以下这些变量发生了变化,意味着需要重新初始化各列的值
  23539. propsChange() {
  23540. return [this.mode, this.maxDate, this.minDate, this.minHour, this.maxHour, this.minMinute, this.maxMinute, this.filter, this.modelValue];
  23541. },
  23542. // input的props
  23543. inputPropsInner() {
  23544. return {
  23545. border: this.inputBorder,
  23546. placeholder: this.placeholder,
  23547. disabled: this.disabled,
  23548. disabledColor: this.disabledColor,
  23549. ...this.inputProps
  23550. };
  23551. }
  23552. },
  23553. mounted() {
  23554. this.init();
  23555. },
  23556. emits: ["close", "cancel", "confirm", "change", "update:modelValue"],
  23557. methods: {
  23558. getInputValue(newValue) {
  23559. if (newValue == "" || !newValue || newValue == void 0) {
  23560. this.inputValue = "";
  23561. return;
  23562. }
  23563. if (this.mode == "time") {
  23564. this.inputValue = newValue;
  23565. } else {
  23566. if (this.format) {
  23567. this.inputValue = e$1(newValue).format(this.format);
  23568. } else {
  23569. let format2 = "";
  23570. switch (this.mode) {
  23571. case "date":
  23572. format2 = "YYYY-MM-DD";
  23573. break;
  23574. case "year-month":
  23575. format2 = "YYYY-MM";
  23576. break;
  23577. case "datehour":
  23578. format2 = "YYYY-MM-DD HH";
  23579. break;
  23580. case "datetime":
  23581. format2 = "YYYY-MM-DD HH:mm";
  23582. break;
  23583. case "time":
  23584. format2 = "HH:mm";
  23585. break;
  23586. }
  23587. this.inputValue = e$1(newValue).format(format2);
  23588. }
  23589. }
  23590. },
  23591. init() {
  23592. this.innerValue = this.correctValue(this.modelValue);
  23593. this.updateColumnValue(this.innerValue);
  23594. this.getInputValue(this.innerValue);
  23595. },
  23596. // 在微信小程序中,不支持将函数当做props参数,故只能通过ref形式调用
  23597. setFormatter(e2) {
  23598. this.innerFormatter = e2;
  23599. },
  23600. // 关闭选择器
  23601. close() {
  23602. if (this.closeOnClickOverlay) {
  23603. this.$emit("close");
  23604. }
  23605. },
  23606. // 点击工具栏的取消按钮
  23607. cancel() {
  23608. if (this.hasInput) {
  23609. this.showByClickInput = false;
  23610. }
  23611. this.$emit("cancel");
  23612. },
  23613. // 点击工具栏的确定按钮
  23614. confirm() {
  23615. this.$emit("update:modelValue", this.innerValue);
  23616. if (this.hasInput) {
  23617. this.getInputValue(this.innerValue);
  23618. this.showByClickInput = false;
  23619. }
  23620. this.$emit("confirm", {
  23621. value: this.innerValue,
  23622. mode: this.mode
  23623. });
  23624. },
  23625. //用正则截取输出值,当出现多组数字时,抛出错误
  23626. intercept(e2, type2) {
  23627. let judge = e2.match(/\d+/g);
  23628. if (judge.length > 1) {
  23629. error("请勿在过滤或格式化函数时添加数字");
  23630. return 0;
  23631. } else if (type2 && judge[0].length == 4) {
  23632. return judge[0];
  23633. } else if (judge[0].length > 2) {
  23634. error("请勿在过滤或格式化函数时添加数字");
  23635. return 0;
  23636. } else {
  23637. return judge[0];
  23638. }
  23639. },
  23640. // 列发生变化时触发
  23641. change(e2) {
  23642. const { indexs, values } = e2;
  23643. let selectValue = "";
  23644. if (this.mode === "time") {
  23645. selectValue = `${this.intercept(values[0][indexs[0]])}:${this.intercept(values[1][indexs[1]])}`;
  23646. } else {
  23647. const year = parseInt(this.intercept(values[0][indexs[0]], "year"));
  23648. const month = parseInt(this.intercept(values[1][indexs[1]]));
  23649. let date3 = parseInt(values[2] ? this.intercept(values[2][indexs[2]]) : 1);
  23650. let hour = 0, minute = 0;
  23651. const maxDate = e$1(`${year}-${month}`).daysInMonth();
  23652. if (this.mode === "year-month") {
  23653. date3 = 1;
  23654. }
  23655. date3 = Math.min(maxDate, date3);
  23656. if (this.mode === "datetime") {
  23657. hour = parseInt(this.intercept(values[3][indexs[3]]));
  23658. minute = parseInt(this.intercept(values[4][indexs[4]]));
  23659. }
  23660. selectValue = Number(new Date(year, month - 1, date3, hour, minute));
  23661. }
  23662. selectValue = this.correctValue(selectValue);
  23663. this.innerValue = selectValue;
  23664. this.updateColumnValue(selectValue);
  23665. this.$emit("change", {
  23666. value: selectValue,
  23667. // 微信小程序不能传递this实例,会因为循环引用而报错
  23668. // picker: this.$refs.picker,
  23669. mode: this.mode
  23670. });
  23671. },
  23672. // 更新各列的值,进行补0、格式化等操作
  23673. updateColumnValue(value2) {
  23674. this.innerValue = value2;
  23675. this.updateColumns();
  23676. setTimeout(() => {
  23677. this.updateIndexs(value2);
  23678. }, 0);
  23679. },
  23680. // 更新索引
  23681. updateIndexs(value2) {
  23682. let values = [];
  23683. const formatter = this.formatter || this.innerFormatter;
  23684. if (this.mode === "time") {
  23685. const timeArr = value2.split(":");
  23686. values = [formatter("hour", timeArr[0]), formatter("minute", timeArr[1])];
  23687. } else {
  23688. values = [
  23689. formatter("year", `${e$1(value2).year()}`),
  23690. // 月份补0
  23691. formatter("month", padZero$1(e$1(value2).month() + 1))
  23692. ];
  23693. if (this.mode === "date") {
  23694. values.push(formatter("day", padZero$1(e$1(value2).date())));
  23695. }
  23696. if (this.mode === "datetime") {
  23697. values.push(formatter("day", padZero$1(e$1(value2).date())), formatter("hour", padZero$1(e$1(value2).hour())), formatter("minute", padZero$1(e$1(value2).minute())));
  23698. }
  23699. }
  23700. const indexs = this.columns.map((column, index2) => {
  23701. return Math.max(0, column.findIndex((item) => item === values[index2]));
  23702. });
  23703. this.innerDefaultIndex = indexs;
  23704. },
  23705. // 更新各列的值
  23706. updateColumns() {
  23707. const formatter = this.formatter || this.innerFormatter;
  23708. const results = this.getOriginColumns().map((column) => column.values.map((value2) => formatter(column.type, value2)));
  23709. this.columns = results;
  23710. },
  23711. getOriginColumns() {
  23712. const results = this.getRanges().map(({ type: type2, range: range2 }) => {
  23713. let values = times(range2[1] - range2[0] + 1, (index2) => {
  23714. let value2 = range2[0] + index2;
  23715. value2 = type2 === "year" ? `${value2}` : padZero$1(value2);
  23716. return value2;
  23717. });
  23718. if (this.filter) {
  23719. values = this.filter(type2, values);
  23720. if (!values || values && values.length == 0) {
  23721. formatAppLog("log", "at uni_modules/uview-plus/components/u-datetime-picker/u-datetime-picker.vue:366", "日期filter结果不能为空");
  23722. }
  23723. }
  23724. return { type: type2, values };
  23725. });
  23726. return results;
  23727. },
  23728. // 通过最大值和最小值生成数组
  23729. generateArray(start, end) {
  23730. return Array.from(new Array(end + 1).keys()).slice(start);
  23731. },
  23732. // 得出合法的时间
  23733. correctValue(value2) {
  23734. const isDateMode = this.mode !== "time";
  23735. if (isDateMode && !e$1.unix(value2).isValid()) {
  23736. value2 = this.minDate;
  23737. } else if (!isDateMode && !value2) {
  23738. value2 = `${padZero$1(this.minHour)}:${padZero$1(this.minMinute)}`;
  23739. }
  23740. if (!isDateMode) {
  23741. if (String(value2).indexOf(":") === -1)
  23742. return error("时间错误,请传递如12:24的格式");
  23743. let [hour, minute] = value2.split(":");
  23744. hour = padZero$1(range$1(this.minHour, this.maxHour, Number(hour)));
  23745. minute = padZero$1(range$1(this.minMinute, this.maxMinute, Number(minute)));
  23746. return `${hour}:${minute}`;
  23747. } else {
  23748. value2 = e$1(value2).isBefore(e$1(this.minDate)) ? this.minDate : value2;
  23749. value2 = e$1(value2).isAfter(e$1(this.maxDate)) ? this.maxDate : value2;
  23750. return value2;
  23751. }
  23752. },
  23753. // 获取每列的最大和最小值
  23754. getRanges() {
  23755. if (this.mode === "time") {
  23756. return [
  23757. {
  23758. type: "hour",
  23759. range: [this.minHour, this.maxHour]
  23760. },
  23761. {
  23762. type: "minute",
  23763. range: [this.minMinute, this.maxMinute]
  23764. }
  23765. ];
  23766. }
  23767. const { maxYear, maxDate, maxMonth, maxHour, maxMinute } = this.getBoundary("max", this.innerValue);
  23768. const { minYear, minDate, minMonth, minHour, minMinute } = this.getBoundary("min", this.innerValue);
  23769. const result = [
  23770. {
  23771. type: "year",
  23772. range: [minYear, maxYear]
  23773. },
  23774. {
  23775. type: "month",
  23776. range: [minMonth, maxMonth]
  23777. },
  23778. {
  23779. type: "day",
  23780. range: [minDate, maxDate]
  23781. },
  23782. {
  23783. type: "hour",
  23784. range: [minHour, maxHour]
  23785. },
  23786. {
  23787. type: "minute",
  23788. range: [minMinute, maxMinute]
  23789. }
  23790. ];
  23791. if (this.mode === "date")
  23792. result.splice(3, 2);
  23793. if (this.mode === "year-month")
  23794. result.splice(2, 3);
  23795. return result;
  23796. },
  23797. // 根据minDate、maxDate、minHour、maxHour等边界值,判断各列的开始和结束边界值
  23798. getBoundary(type2, innerValue) {
  23799. let value2 = new Date(innerValue);
  23800. if (isNaN(value2.getTime())) {
  23801. value2 = /* @__PURE__ */ new Date();
  23802. }
  23803. const boundary = new Date(this[`${type2}Date`]);
  23804. const year = e$1(boundary).year();
  23805. let month = 1;
  23806. let date3 = 1;
  23807. let hour = 0;
  23808. let minute = 0;
  23809. if (type2 === "max") {
  23810. month = 12;
  23811. date3 = e$1(value2).daysInMonth();
  23812. hour = 23;
  23813. minute = 59;
  23814. }
  23815. if (e$1(value2).year() === year) {
  23816. month = e$1(boundary).month() + 1;
  23817. if (e$1(value2).month() + 1 === month) {
  23818. date3 = e$1(boundary).date();
  23819. if (e$1(value2).date() === date3) {
  23820. hour = e$1(boundary).hour();
  23821. if (e$1(value2).hour() === hour) {
  23822. minute = e$1(boundary).minute();
  23823. }
  23824. }
  23825. }
  23826. }
  23827. return {
  23828. [`${type2}Year`]: year,
  23829. [`${type2}Month`]: month,
  23830. [`${type2}Date`]: date3,
  23831. [`${type2}Hour`]: hour,
  23832. [`${type2}Minute`]: minute
  23833. };
  23834. },
  23835. onShowByClickInput() {
  23836. if (!this.disabled) {
  23837. this.showByClickInput = !this.showByClickInput;
  23838. }
  23839. }
  23840. }
  23841. };
  23842. function _sfc_render$1v(_ctx, _cache, $props, $setup, $data, $options) {
  23843. const _component_up_input = vue.resolveComponent("up-input");
  23844. const _component_u_picker = resolveEasycom(vue.resolveDynamicComponent("u-picker"), __easycom_0$4);
  23845. return vue.openBlock(), vue.createElementBlock("view", { class: "u-datetime-picker" }, [
  23846. _ctx.hasInput ? (vue.openBlock(), vue.createElementBlock("view", {
  23847. key: 0,
  23848. class: "u-datetime-picker__has-input",
  23849. onClick: _cache[1] || (_cache[1] = (...args) => $options.onShowByClickInput && $options.onShowByClickInput(...args))
  23850. }, [
  23851. vue.renderSlot(_ctx.$slots, "trigger", { value: $data.inputValue }, () => [
  23852. vue.createVNode(_component_up_input, vue.mergeProps({
  23853. readonly: !!$data.showByClickInput,
  23854. modelValue: $data.inputValue,
  23855. "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => $data.inputValue = $event)
  23856. }, $options.inputPropsInner), null, 16, ["readonly", "modelValue"]),
  23857. vue.createElementVNode("view", { class: "input-cover" })
  23858. ], true)
  23859. ])) : vue.createCommentVNode("v-if", true),
  23860. vue.createVNode(_component_u_picker, {
  23861. ref: "picker",
  23862. show: _ctx.pageInline || _ctx.show || _ctx.hasInput && $data.showByClickInput,
  23863. popupMode: _ctx.popupMode,
  23864. closeOnClickOverlay: _ctx.closeOnClickOverlay,
  23865. columns: $data.columns,
  23866. title: _ctx.title,
  23867. itemHeight: _ctx.itemHeight,
  23868. showToolbar: _ctx.showToolbar,
  23869. visibleItemCount: _ctx.visibleItemCount,
  23870. defaultIndex: $data.innerDefaultIndex,
  23871. cancelText: _ctx.cancelText,
  23872. confirmText: _ctx.confirmText,
  23873. cancelColor: _ctx.cancelColor,
  23874. confirmColor: _ctx.confirmColor,
  23875. toolbarRightSlot: _ctx.toolbarRightSlot,
  23876. pageInline: _ctx.pageInline,
  23877. onClose: $options.close,
  23878. onCancel: $options.cancel,
  23879. onConfirm: $options.confirm,
  23880. onChange: $options.change
  23881. }, {
  23882. "toolbar-right": vue.withCtx(() => [
  23883. vue.renderSlot(_ctx.$slots, "toolbar-right", {}, void 0, true)
  23884. ]),
  23885. "toolbar-bottom": vue.withCtx(() => [
  23886. vue.renderSlot(_ctx.$slots, "toolbar-bottom", {}, void 0, true)
  23887. ]),
  23888. _: 3
  23889. /* FORWARDED */
  23890. }, 8, ["show", "popupMode", "closeOnClickOverlay", "columns", "title", "itemHeight", "showToolbar", "visibleItemCount", "defaultIndex", "cancelText", "confirmText", "cancelColor", "confirmColor", "toolbarRightSlot", "pageInline", "onClose", "onCancel", "onConfirm", "onChange"])
  23891. ]);
  23892. }
  23893. const uDatetimePicker = /* @__PURE__ */ _export_sfc(_sfc_main$1w, [["render", _sfc_render$1v], ["__scopeId", "data-v-e7a0f1eb"], ["__file", "C:/Users/EDY/Desktop/项目/shuibei/uni_modules/uview-plus/components/u-datetime-picker/u-datetime-picker.vue"]]);
  23894. const __vite_glob_0_34 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
  23895. __proto__: null,
  23896. default: uDatetimePicker
  23897. }, Symbol.toStringTag, { value: "Module" }));
  23898. const props$_ = defineMixin({
  23899. props: {
  23900. // 是否虚线
  23901. dashed: {
  23902. type: Boolean,
  23903. default: () => props$1x.divider.dashed
  23904. },
  23905. // 是否细线
  23906. hairline: {
  23907. type: Boolean,
  23908. default: () => props$1x.divider.hairline
  23909. },
  23910. // 是否以点替代文字,优先于text字段起作用
  23911. dot: {
  23912. type: Boolean,
  23913. default: () => props$1x.divider.dot
  23914. },
  23915. // 内容文本的位置,left-左边,center-中间,right-右边
  23916. textPosition: {
  23917. type: String,
  23918. default: () => props$1x.divider.textPosition
  23919. },
  23920. // 文本内容
  23921. text: {
  23922. type: [String, Number],
  23923. default: () => props$1x.divider.text
  23924. },
  23925. // 文本大小
  23926. textSize: {
  23927. type: [String, Number],
  23928. default: () => props$1x.divider.textSize
  23929. },
  23930. // 文本颜色
  23931. textColor: {
  23932. type: String,
  23933. default: () => props$1x.divider.textColor
  23934. },
  23935. // 线条颜色
  23936. lineColor: {
  23937. type: String,
  23938. default: () => props$1x.divider.lineColor
  23939. }
  23940. }
  23941. });
  23942. const _sfc_main$1v = {
  23943. name: "u-divider",
  23944. mixins: [mpMixin, mixin, props$_],
  23945. computed: {
  23946. textStyle() {
  23947. const style = {};
  23948. style.fontSize = addUnit(this.textSize);
  23949. style.color = this.textColor;
  23950. return style;
  23951. },
  23952. // 左边线条的的样式
  23953. leftLineStyle() {
  23954. const style = {};
  23955. if (this.textPosition === "left") {
  23956. style.width = "80rpx";
  23957. } else {
  23958. style.flex = 1;
  23959. }
  23960. return style;
  23961. },
  23962. // 右边线条的的样式
  23963. rightLineStyle() {
  23964. const style = {};
  23965. if (this.textPosition === "right") {
  23966. style.width = "80rpx";
  23967. } else {
  23968. style.flex = 1;
  23969. }
  23970. return style;
  23971. }
  23972. },
  23973. emits: ["click"],
  23974. methods: {
  23975. addStyle,
  23976. // divider组件被点击时触发
  23977. click() {
  23978. this.$emit("click");
  23979. }
  23980. }
  23981. };
  23982. function _sfc_render$1u(_ctx, _cache, $props, $setup, $data, $options) {
  23983. const _component_u_line = resolveEasycom(vue.resolveDynamicComponent("u-line"), __easycom_1$4);
  23984. return vue.openBlock(), vue.createElementBlock(
  23985. "view",
  23986. {
  23987. class: "u-divider",
  23988. style: vue.normalizeStyle([$options.addStyle(_ctx.customStyle)]),
  23989. onClick: _cache[0] || (_cache[0] = (...args) => $options.click && $options.click(...args))
  23990. },
  23991. [
  23992. vue.createVNode(_component_u_line, {
  23993. color: _ctx.lineColor,
  23994. customStyle: $options.leftLineStyle,
  23995. hairline: _ctx.hairline,
  23996. dashed: _ctx.dashed
  23997. }, null, 8, ["color", "customStyle", "hairline", "dashed"]),
  23998. _ctx.dot ? (vue.openBlock(), vue.createElementBlock("text", {
  23999. key: 0,
  24000. class: "u-divider__dot"
  24001. }, "●")) : vue.createCommentVNode("v-if", true),
  24002. vue.renderSlot(_ctx.$slots, "default", {}, () => [
  24003. !_ctx.dot && _ctx.text ? (vue.openBlock(), vue.createElementBlock(
  24004. "text",
  24005. {
  24006. key: 0,
  24007. class: "u-divider__text",
  24008. style: vue.normalizeStyle([$options.textStyle])
  24009. },
  24010. vue.toDisplayString(_ctx.text),
  24011. 5
  24012. /* TEXT, STYLE */
  24013. )) : vue.createCommentVNode("v-if", true)
  24014. ], true),
  24015. vue.createVNode(_component_u_line, {
  24016. color: _ctx.lineColor,
  24017. customStyle: $options.rightLineStyle,
  24018. hairline: _ctx.hairline,
  24019. dashed: _ctx.dashed
  24020. }, null, 8, ["color", "customStyle", "hairline", "dashed"])
  24021. ],
  24022. 4
  24023. /* STYLE */
  24024. );
  24025. }
  24026. const uDivider = /* @__PURE__ */ _export_sfc(_sfc_main$1v, [["render", _sfc_render$1u], ["__scopeId", "data-v-ea022cee"], ["__file", "C:/Users/EDY/Desktop/项目/shuibei/uni_modules/uview-plus/components/u-divider/u-divider.vue"]]);
  24027. const __vite_glob_0_35 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
  24028. __proto__: null,
  24029. default: uDivider
  24030. }, Symbol.toStringTag, { value: "Module" }));
  24031. const _sfc_main$1u = {
  24032. name: "u-dragsort",
  24033. mixins: [mixin],
  24034. props: {
  24035. initialList: {
  24036. type: Array,
  24037. required: true,
  24038. default: () => []
  24039. },
  24040. draggable: {
  24041. type: Boolean,
  24042. default: true
  24043. },
  24044. direction: {
  24045. type: String,
  24046. default: "vertical",
  24047. validator: (value2) => ["vertical", "horizontal", "all"].includes(value2)
  24048. },
  24049. // 新增列数属性,用于all模式
  24050. columns: {
  24051. type: Number,
  24052. default: 3
  24053. }
  24054. },
  24055. data() {
  24056. return {
  24057. list: [],
  24058. dragIndex: -1,
  24059. itemHeight: 40,
  24060. itemWidth: 80,
  24061. areaWidth: 0,
  24062. // 可拖动区域宽度
  24063. areaHeight: 0,
  24064. // 可拖动区域高度
  24065. originalPositions: [],
  24066. // 保存原始位置
  24067. currentPosition: {
  24068. x: 0,
  24069. y: 0
  24070. }
  24071. };
  24072. },
  24073. computed: {
  24074. movableAreaStyle() {
  24075. if (this.direction === "vertical") {
  24076. return {
  24077. height: `${this.list.length * this.itemHeight}px`,
  24078. width: "100%"
  24079. };
  24080. } else if (this.direction === "horizontal") {
  24081. return {
  24082. height: "100%",
  24083. width: `${this.list.length * this.itemWidth}px`
  24084. };
  24085. } else {
  24086. const rows = Math.ceil(this.list.length / this.columns);
  24087. return {
  24088. height: `${rows * this.itemHeight}px`,
  24089. width: "100%"
  24090. };
  24091. }
  24092. }
  24093. },
  24094. emits: ["drag-end"],
  24095. async mounted() {
  24096. await this.$nextTick();
  24097. this.initList();
  24098. this.calculateItemSize();
  24099. this.calculateAreaSize();
  24100. },
  24101. methods: {
  24102. initList() {
  24103. this.list = this.initialList.map((item, index2) => {
  24104. let x2 = 0, y2 = 0;
  24105. if (this.direction === "horizontal") {
  24106. x2 = index2 * this.itemWidth;
  24107. y2 = 0;
  24108. } else if (this.direction === "vertical") {
  24109. x2 = 0;
  24110. y2 = index2 * this.itemHeight;
  24111. } else {
  24112. const col = index2 % this.columns;
  24113. const row = Math.floor(index2 / this.columns);
  24114. x2 = col * this.itemWidth;
  24115. y2 = row * this.itemHeight;
  24116. }
  24117. return {
  24118. ...item,
  24119. x: x2,
  24120. y: y2
  24121. };
  24122. });
  24123. this.saveOriginalPositions();
  24124. },
  24125. saveOriginalPositions() {
  24126. this.originalPositions = this.list.map((item) => ({
  24127. x: item.x,
  24128. y: item.y
  24129. }));
  24130. },
  24131. async calculateItemSize() {
  24132. await sleep(30);
  24133. return new Promise((resolve) => {
  24134. uni.createSelectorQuery().in(this).select(".u-dragsort-item-content").boundingClientRect((res) => {
  24135. if (res) {
  24136. this.itemHeight = res.height || 40;
  24137. this.itemWidth = res.width || 80;
  24138. this.updatePositions();
  24139. this.saveOriginalPositions();
  24140. }
  24141. resolve(res);
  24142. }).exec();
  24143. });
  24144. },
  24145. async calculateAreaSize() {
  24146. await sleep(30);
  24147. return new Promise((resolve) => {
  24148. uni.createSelectorQuery().in(this).select(".u-dragsort-area").boundingClientRect((res) => {
  24149. if (res) {
  24150. this.areaWidth = res.width || 300;
  24151. this.areaHeight = res.height || 300;
  24152. }
  24153. resolve(res);
  24154. }).exec();
  24155. });
  24156. },
  24157. updatePositions() {
  24158. this.list.forEach((item, index2) => {
  24159. if (this.direction === "vertical") {
  24160. item.y = index2 * this.itemHeight;
  24161. item.x = 0;
  24162. } else if (this.direction === "horizontal") {
  24163. item.x = index2 * this.itemWidth;
  24164. item.y = 0;
  24165. } else {
  24166. const col = index2 % this.columns;
  24167. const row = Math.floor(index2 / this.columns);
  24168. item.x = col * this.itemWidth;
  24169. item.y = row * this.itemHeight;
  24170. }
  24171. });
  24172. },
  24173. onTouchStart(index2) {
  24174. this.dragIndex = index2;
  24175. this.saveOriginalPositions();
  24176. },
  24177. onChange(index2, event) {
  24178. if (!event.detail.source || event.detail.source !== "touch")
  24179. return;
  24180. this.currentPosition.x = event.detail.x;
  24181. this.currentPosition.y = event.detail.y;
  24182. if (this.direction === "all") {
  24183. this.handleAllModeChange(index2);
  24184. } else {
  24185. let itemSize = 0;
  24186. let targetIndex = -1;
  24187. if (this.direction === "vertical") {
  24188. itemSize = this.itemHeight;
  24189. targetIndex = Math.max(0, Math.min(
  24190. Math.round(this.currentPosition.y / itemSize),
  24191. this.list.length - 1
  24192. ));
  24193. } else if (this.direction === "horizontal") {
  24194. itemSize = this.itemWidth;
  24195. targetIndex = Math.max(0, Math.min(
  24196. Math.round(this.currentPosition.x / itemSize),
  24197. this.list.length - 1
  24198. ));
  24199. }
  24200. if (targetIndex !== index2) {
  24201. this.reorderItems(index2, targetIndex);
  24202. }
  24203. }
  24204. },
  24205. handleAllModeChange(index2) {
  24206. const col = Math.max(0, Math.min(Math.round(this.currentPosition.x / this.itemWidth), this.columns - 1));
  24207. const row = Math.max(0, Math.round(this.currentPosition.y / this.itemHeight));
  24208. let targetIndex = row * this.columns + col;
  24209. targetIndex = Math.max(0, Math.min(targetIndex, this.list.length - 1));
  24210. if (targetIndex !== index2) {
  24211. this.reorderItems(index2, targetIndex);
  24212. }
  24213. },
  24214. reorderItems(fromIndex, toIndex) {
  24215. const movedItem = this.list.splice(fromIndex, 1)[0];
  24216. this.list.splice(toIndex, 0, movedItem);
  24217. if (uni.vibrateShort) {
  24218. uni.vibrateShort();
  24219. }
  24220. this.dragIndex = toIndex;
  24221. this.updatePositions();
  24222. this.saveOriginalPositions();
  24223. },
  24224. onTouchEnd() {
  24225. if (this.direction === "horizontal") {
  24226. this.list[this.dragIndex].x = this.currentPosition.x + 1e-3;
  24227. } else if (this.direction === "vertical" || this.direction === "all") {
  24228. this.list[this.dragIndex].y = this.currentPosition.y + 1e-3;
  24229. this.list[this.dragIndex].x = this.currentPosition.x + 1e-3;
  24230. }
  24231. sleep(50).then(() => {
  24232. this.list.forEach((item, index2) => {
  24233. item.x = this.originalPositions[index2].x;
  24234. item.y = this.originalPositions[index2].y;
  24235. });
  24236. this.dragIndex = -1;
  24237. this.$emit("drag-end", [...this.list]);
  24238. });
  24239. }
  24240. },
  24241. watch: {
  24242. initialList: {
  24243. handler() {
  24244. this.$nextTick(() => {
  24245. this.initList();
  24246. });
  24247. },
  24248. deep: true
  24249. },
  24250. direction: {
  24251. handler() {
  24252. this.$nextTick(() => {
  24253. this.initList();
  24254. this.calculateItemSize();
  24255. this.calculateAreaSize();
  24256. });
  24257. }
  24258. },
  24259. columns: {
  24260. handler() {
  24261. if (this.direction === "all") {
  24262. this.$nextTick(() => {
  24263. this.initList();
  24264. this.updatePositions();
  24265. this.saveOriginalPositions();
  24266. });
  24267. }
  24268. }
  24269. }
  24270. }
  24271. };
  24272. function _sfc_render$1t(_ctx, _cache, $props, $setup, $data, $options) {
  24273. return vue.openBlock(), vue.createElementBlock(
  24274. "view",
  24275. {
  24276. class: vue.normalizeClass(["u-dragsort", [$props.direction == "horizontal" ? "u-dragsort--horizontal" : "", $props.direction == "all" ? "u-dragsort--all" : ""]])
  24277. },
  24278. [
  24279. vue.createElementVNode(
  24280. "movable-area",
  24281. {
  24282. class: "u-dragsort-area",
  24283. style: vue.normalizeStyle($options.movableAreaStyle)
  24284. },
  24285. [
  24286. (vue.openBlock(true), vue.createElementBlock(
  24287. vue.Fragment,
  24288. null,
  24289. vue.renderList($data.list, (item, index2) => {
  24290. return vue.openBlock(), vue.createElementBlock("movable-view", {
  24291. key: item.id,
  24292. id: `u-dragsort-item-${index2}`,
  24293. class: vue.normalizeClass(["u-dragsort-item", { "dragging": $data.dragIndex === index2 }]),
  24294. direction: $props.direction === "all" ? "all" : $props.direction,
  24295. x: item.x,
  24296. y: item.y,
  24297. inertia: false,
  24298. disabled: !$props.draggable || item.draggable === false,
  24299. onChange: ($event) => $options.onChange(index2, $event),
  24300. onTouchstart: ($event) => $options.onTouchStart(index2),
  24301. onTouchend: _cache[0] || (_cache[0] = (...args) => $options.onTouchEnd && $options.onTouchEnd(...args)),
  24302. onTouchcancel: _cache[1] || (_cache[1] = (...args) => $options.onTouchEnd && $options.onTouchEnd(...args))
  24303. }, [
  24304. vue.createElementVNode("view", { class: "u-dragsort-item-content" }, [
  24305. vue.renderSlot(_ctx.$slots, "default", {
  24306. item,
  24307. index: index2
  24308. }, () => [
  24309. vue.createTextVNode(
  24310. vue.toDisplayString(item.label),
  24311. 1
  24312. /* TEXT */
  24313. )
  24314. ], true)
  24315. ])
  24316. ], 42, ["id", "direction", "x", "y", "disabled", "onChange", "onTouchstart"]);
  24317. }),
  24318. 128
  24319. /* KEYED_FRAGMENT */
  24320. ))
  24321. ],
  24322. 4
  24323. /* STYLE */
  24324. )
  24325. ],
  24326. 2
  24327. /* CLASS */
  24328. );
  24329. }
  24330. const uDragsort = /* @__PURE__ */ _export_sfc(_sfc_main$1u, [["render", _sfc_render$1t], ["__scopeId", "data-v-09ad657e"], ["__file", "C:/Users/EDY/Desktop/项目/shuibei/uni_modules/uview-plus/components/u-dragsort/u-dragsort.vue"]]);
  24331. const __vite_glob_0_36 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
  24332. __proto__: null,
  24333. default: uDragsort
  24334. }, Symbol.toStringTag, { value: "Module" }));
  24335. const props$Z = defineMixin({
  24336. props: {
  24337. // 当前选中项的value值
  24338. modelValue: {
  24339. type: [Number, String, Array],
  24340. default: ""
  24341. },
  24342. // 菜单项标题
  24343. title: {
  24344. type: [String, Number],
  24345. default: ""
  24346. },
  24347. // 选项数据,如果传入了默认slot,此参数无效
  24348. options: {
  24349. type: Array,
  24350. default() {
  24351. return [];
  24352. }
  24353. },
  24354. // 是否禁用此菜单项
  24355. disabled: {
  24356. type: Boolean,
  24357. default: false
  24358. },
  24359. // 下拉弹窗的高度
  24360. height: {
  24361. type: [Number, String],
  24362. default: "auto"
  24363. },
  24364. // 点击遮罩是否可以收起弹窗
  24365. closeOnClickOverlay: {
  24366. type: Boolean,
  24367. default: true
  24368. }
  24369. }
  24370. });
  24371. const _sfc_main$1t = {
  24372. name: "u-dropdown-item",
  24373. mixins: [mpMixin, mixin, props$Z],
  24374. options: {
  24375. styleIsolation: "shared"
  24376. },
  24377. data() {
  24378. return {
  24379. active: false,
  24380. // 当前项是否处于展开状态
  24381. activeColor: "#2979ff",
  24382. // 激活时左边文字和右边对勾图标的颜色
  24383. inactiveColor: "#606266"
  24384. // 未激活时左边文字和右边对勾图标的颜色
  24385. };
  24386. },
  24387. computed: {
  24388. // 监听props是否发生了变化,有些值需要传递给父组件u-dropdown,无法双向绑定
  24389. propsChange() {
  24390. return `${this.title}-${this.disabled}`;
  24391. }
  24392. },
  24393. watch: {
  24394. propsChange(n2) {
  24395. if (this.parent)
  24396. this.parent.init();
  24397. }
  24398. },
  24399. created() {
  24400. this.parent = false;
  24401. },
  24402. emits: ["update:modelValue", "change"],
  24403. methods: {
  24404. addUnit,
  24405. init() {
  24406. let parent = $parent.call(this, "u-dropdown");
  24407. if (parent) {
  24408. this.parent = parent;
  24409. this.activeColor = parent.activeColor;
  24410. this.inactiveColor = parent.inactiveColor;
  24411. let exist = parent.children.find((val) => {
  24412. return this === val;
  24413. });
  24414. if (!exist)
  24415. parent.children.push(this);
  24416. if (parent.children.length == 1)
  24417. this.active = true;
  24418. parent.menuList.push({
  24419. title: this.title,
  24420. disabled: this.disabled
  24421. });
  24422. }
  24423. },
  24424. // cell被点击
  24425. cellClick(value2) {
  24426. this.$emit("update:modelValue", value2);
  24427. this.parent.close();
  24428. this.$emit("change", value2);
  24429. }
  24430. },
  24431. mounted() {
  24432. this.init();
  24433. }
  24434. };
  24435. function _sfc_render$1s(_ctx, _cache, $props, $setup, $data, $options) {
  24436. const _component_up_icon = vue.resolveComponent("up-icon");
  24437. const _component_up_cell = vue.resolveComponent("up-cell");
  24438. const _component_up_cell_group = vue.resolveComponent("up-cell-group");
  24439. return $data.active ? (vue.openBlock(), vue.createElementBlock(
  24440. "view",
  24441. {
  24442. key: 0,
  24443. class: "u-dropdown-item",
  24444. onTouchmove: vue.withModifiers(() => {
  24445. }, ["stop", "prevent"]),
  24446. onClick: vue.withModifiers(() => {
  24447. }, ["stop", "prevent"])
  24448. },
  24449. [
  24450. !_ctx.$slots.default && !_ctx.$slots.$default ? (vue.openBlock(), vue.createElementBlock(
  24451. "scroll-view",
  24452. {
  24453. key: 0,
  24454. class: "u-dropdown-item__scroll",
  24455. "scroll-y": "true",
  24456. style: vue.normalizeStyle({
  24457. height: $options.addUnit(_ctx.height)
  24458. })
  24459. },
  24460. [
  24461. vue.createElementVNode("view", { class: "u-dropdown-item__options" }, [
  24462. vue.createVNode(_component_up_cell_group, null, {
  24463. default: vue.withCtx(() => [
  24464. (vue.openBlock(true), vue.createElementBlock(
  24465. vue.Fragment,
  24466. null,
  24467. vue.renderList(_ctx.options, (item, index2) => {
  24468. return vue.openBlock(), vue.createBlock(_component_up_cell, {
  24469. onClick: ($event) => $options.cellClick(item.value),
  24470. arrow: false,
  24471. title: item.label,
  24472. key: index2,
  24473. "title-style": {
  24474. color: _ctx.modelValue == item.value ? $data.activeColor : $data.inactiveColor
  24475. }
  24476. }, {
  24477. default: vue.withCtx(() => [
  24478. _ctx.modelValue == item.value ? (vue.openBlock(), vue.createBlock(_component_up_icon, {
  24479. key: 0,
  24480. name: "checkbox-mark",
  24481. color: $data.activeColor,
  24482. size: "32"
  24483. }, null, 8, ["color"])) : vue.createCommentVNode("v-if", true)
  24484. ]),
  24485. _: 2
  24486. /* DYNAMIC */
  24487. }, 1032, ["onClick", "title", "title-style"]);
  24488. }),
  24489. 128
  24490. /* KEYED_FRAGMENT */
  24491. ))
  24492. ]),
  24493. _: 1
  24494. /* STABLE */
  24495. })
  24496. ])
  24497. ],
  24498. 4
  24499. /* STYLE */
  24500. )) : vue.renderSlot(_ctx.$slots, "default", { key: 1 }, void 0, true)
  24501. ],
  24502. 32
  24503. /* NEED_HYDRATION */
  24504. )) : vue.createCommentVNode("v-if", true);
  24505. }
  24506. const uDropdownItem = /* @__PURE__ */ _export_sfc(_sfc_main$1t, [["render", _sfc_render$1s], ["__scopeId", "data-v-2ab01489"], ["__file", "C:/Users/EDY/Desktop/项目/shuibei/uni_modules/uview-plus/components/u-dropdown-item/u-dropdown-item.vue"]]);
  24507. const __vite_glob_0_37 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
  24508. __proto__: null,
  24509. default: uDropdownItem
  24510. }, Symbol.toStringTag, { value: "Module" }));
  24511. const props$Y = defineMixin({
  24512. props: {
  24513. // 菜单标题和选项的激活态颜色
  24514. activeColor: {
  24515. type: String,
  24516. default: "#2979ff"
  24517. },
  24518. // 菜单标题和选项的未激活态颜色
  24519. inactiveColor: {
  24520. type: String,
  24521. default: "#606266"
  24522. },
  24523. // 点击遮罩是否关闭菜单
  24524. closeOnClickMask: {
  24525. type: Boolean,
  24526. default: true
  24527. },
  24528. // 点击当前激活项标题是否关闭菜单
  24529. closeOnClickSelf: {
  24530. type: Boolean,
  24531. default: true
  24532. },
  24533. // 过渡时间
  24534. duration: {
  24535. type: [Number, String],
  24536. default: 300
  24537. },
  24538. // 标题菜单的高度
  24539. height: {
  24540. type: [Number, String],
  24541. default: 40
  24542. },
  24543. // 是否显示下边框
  24544. borderBottom: {
  24545. type: Boolean,
  24546. default: false
  24547. },
  24548. // 标题的字体大小
  24549. titleSize: {
  24550. type: [Number, String],
  24551. default: 14
  24552. },
  24553. // 下拉出来的内容部分的圆角值
  24554. borderRadius: {
  24555. type: [Number, String],
  24556. default: 0
  24557. },
  24558. // 菜单右侧的icon图标
  24559. menuIcon: {
  24560. type: String,
  24561. default: "arrow-down"
  24562. },
  24563. // 菜单右侧图标的大小
  24564. menuIconSize: {
  24565. type: [Number, String],
  24566. default: 14
  24567. }
  24568. }
  24569. });
  24570. const _sfc_main$1s = {
  24571. name: "u-dropdown",
  24572. mixins: [mpMixin, mixin, props$Y],
  24573. data() {
  24574. return {
  24575. showDropdown: true,
  24576. // 是否打开下来菜单,
  24577. menuList: [],
  24578. // 显示的菜单
  24579. active: false,
  24580. // 下拉菜单的状态
  24581. // 当前是第几个菜单处于激活状态,小程序中此处不能写成false或者"",否则后续将current赋值为0,
  24582. // 无能的TX没有使用===而是使用==判断,导致程序认为前后二者没有变化,从而不会触发视图更新
  24583. current: 99999,
  24584. // 外层内容的样式,初始时处于底层,且透明
  24585. contentStyle: {
  24586. zIndex: -1,
  24587. opacity: 0
  24588. },
  24589. // 让某些菜单保持高亮的状态
  24590. highlightIndexList: [],
  24591. contentHeight: 0
  24592. };
  24593. },
  24594. computed: {
  24595. // 下拉出来部分的样式
  24596. popupStyle() {
  24597. let style = {};
  24598. style.transform = `translateY(${this.active ? 0 : "-100%"})`;
  24599. style["transition-duration"] = this.duration / 1e3 + "s";
  24600. style.borderRadius = `0 0 ${addUnit(this.borderRadius)} ${addUnit(this.borderRadius)}`;
  24601. return style;
  24602. }
  24603. },
  24604. created() {
  24605. this.children = [];
  24606. },
  24607. mounted() {
  24608. this.getContentHeight();
  24609. },
  24610. emits: ["open", "close"],
  24611. methods: {
  24612. addUnit,
  24613. init() {
  24614. this.menuList = [];
  24615. this.children.map((child) => {
  24616. child.init();
  24617. });
  24618. },
  24619. // 点击菜单
  24620. menuClick(index2) {
  24621. if (this.menuList[index2].disabled)
  24622. return;
  24623. if (index2 === this.current && this.closeOnClickSelf) {
  24624. this.close();
  24625. setTimeout(() => {
  24626. this.children[index2].active = false;
  24627. }, this.duration);
  24628. return;
  24629. }
  24630. this.open(index2);
  24631. },
  24632. // 打开下拉菜单
  24633. open(index2) {
  24634. if (this.contentHeight < 1)
  24635. this.getContentHeight();
  24636. this.contentStyle = {
  24637. zIndex: 11,
  24638. height: this.contentHeight + "px"
  24639. };
  24640. this.active = true;
  24641. this.current = index2;
  24642. this.children.map((val, idx) => {
  24643. val.active = index2 == idx ? true : false;
  24644. });
  24645. this.$emit("open", this.current);
  24646. },
  24647. // 设置下拉菜单处于收起状态
  24648. close() {
  24649. this.$emit("close", this.current);
  24650. this.active = false;
  24651. this.current = 99999;
  24652. this.contentStyle.zIndex = -1;
  24653. this.contentStyle.opacity = 0;
  24654. setTimeout(() => {
  24655. this.contentStyle.height = 0;
  24656. }, this.duration);
  24657. },
  24658. // 点击遮罩
  24659. maskClick() {
  24660. if (!this.closeOnClickMask)
  24661. return;
  24662. this.close();
  24663. },
  24664. // 外部手动设置某些菜单高亮
  24665. highlight(indexParams = void 0) {
  24666. if (Array.isArray(indexParams)) {
  24667. this.highlightIndexList = [...indexParams];
  24668. return;
  24669. }
  24670. this.highlightIndexList = indexParams !== void 0 ? [indexParams] : [];
  24671. },
  24672. // 获取下拉菜单内容的高度
  24673. getContentHeight() {
  24674. let windowHeight = getWindowInfo().windowHeight;
  24675. this.$uGetRect(".u-dropdown__menu").then((res) => {
  24676. this.contentHeight = windowHeight - res.bottom;
  24677. });
  24678. }
  24679. }
  24680. };
  24681. function _sfc_render$1r(_ctx, _cache, $props, $setup, $data, $options) {
  24682. const _component_up_icon = vue.resolveComponent("up-icon");
  24683. return vue.openBlock(), vue.createElementBlock("view", { class: "u-dropdown" }, [
  24684. vue.createElementVNode(
  24685. "view",
  24686. {
  24687. class: vue.normalizeClass(["u-dropdown__menu", {
  24688. "u-border-bottom": _ctx.borderBottom
  24689. }]),
  24690. style: vue.normalizeStyle({
  24691. height: $options.addUnit(_ctx.height)
  24692. })
  24693. },
  24694. [
  24695. (vue.openBlock(true), vue.createElementBlock(
  24696. vue.Fragment,
  24697. null,
  24698. vue.renderList($data.menuList, (item, index2) => {
  24699. return vue.openBlock(), vue.createElementBlock("view", {
  24700. class: "u-dropdown__menu__item",
  24701. key: index2,
  24702. onClick: vue.withModifiers(($event) => $options.menuClick(index2), ["stop"])
  24703. }, [
  24704. vue.createElementVNode("view", { class: "u-flex u-flex-row" }, [
  24705. vue.createElementVNode(
  24706. "text",
  24707. {
  24708. class: "u-dropdown__menu__item__text",
  24709. style: vue.normalizeStyle({
  24710. color: item.disabled ? "#c0c4cc" : index2 === $data.current || $data.highlightIndexList.includes(index2) ? _ctx.activeColor : _ctx.inactiveColor,
  24711. fontSize: $options.addUnit(_ctx.titleSize)
  24712. })
  24713. },
  24714. vue.toDisplayString(item.title),
  24715. 5
  24716. /* TEXT, STYLE */
  24717. ),
  24718. vue.createElementVNode(
  24719. "view",
  24720. {
  24721. class: vue.normalizeClass(["u-dropdown__menu__item__arrow", {
  24722. "u-dropdown__menu__item__arrow--rotate": index2 === $data.current
  24723. }])
  24724. },
  24725. [
  24726. vue.createVNode(_component_up_icon, {
  24727. "custom-style": { display: "flex" },
  24728. name: _ctx.menuIcon,
  24729. size: $options.addUnit(_ctx.menuIconSize),
  24730. color: index2 === $data.current || $data.highlightIndexList.includes(index2) ? _ctx.activeColor : "#c0c4cc"
  24731. }, null, 8, ["name", "size", "color"])
  24732. ],
  24733. 2
  24734. /* CLASS */
  24735. )
  24736. ])
  24737. ], 8, ["onClick"]);
  24738. }),
  24739. 128
  24740. /* KEYED_FRAGMENT */
  24741. ))
  24742. ],
  24743. 6
  24744. /* CLASS, STYLE */
  24745. ),
  24746. vue.createElementVNode(
  24747. "view",
  24748. {
  24749. class: "u-dropdown__content",
  24750. style: vue.normalizeStyle([$data.contentStyle, {
  24751. transition: `opacity ${_ctx.duration / 1e3}s, z-index ${_ctx.duration / 1e3}s linear`,
  24752. top: $options.addUnit(_ctx.height)
  24753. }]),
  24754. onClick: _cache[1] || (_cache[1] = (...args) => $options.maskClick && $options.maskClick(...args)),
  24755. onTouchmove: _cache[2] || (_cache[2] = vue.withModifiers(() => {
  24756. }, ["stop", "prevent"]))
  24757. },
  24758. [
  24759. vue.createElementVNode(
  24760. "view",
  24761. {
  24762. onClick: _cache[0] || (_cache[0] = vue.withModifiers(() => {
  24763. }, ["stop", "prevent"])),
  24764. class: "u-dropdown__content__popup",
  24765. style: vue.normalizeStyle([$options.popupStyle, {}])
  24766. },
  24767. [
  24768. vue.renderSlot(_ctx.$slots, "default", {}, void 0, true)
  24769. ],
  24770. 4
  24771. /* STYLE */
  24772. ),
  24773. vue.createElementVNode("view", { class: "u-dropdown__content__mask" })
  24774. ],
  24775. 36
  24776. /* STYLE, NEED_HYDRATION */
  24777. )
  24778. ]);
  24779. }
  24780. const uDropdown = /* @__PURE__ */ _export_sfc(_sfc_main$1s, [["render", _sfc_render$1r], ["__scopeId", "data-v-029e9a16"], ["__file", "C:/Users/EDY/Desktop/项目/shuibei/uni_modules/uview-plus/components/u-dropdown/u-dropdown.vue"]]);
  24781. const __vite_glob_0_38 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
  24782. __proto__: null,
  24783. default: uDropdown
  24784. }, Symbol.toStringTag, { value: "Module" }));
  24785. const props$X = defineMixin({
  24786. props: {
  24787. // 内置图标名称,或图片路径,建议绝对路径
  24788. icon: {
  24789. type: String,
  24790. default: () => props$1x.empty.icon
  24791. },
  24792. // 提示文字
  24793. text: {
  24794. type: String,
  24795. default: () => props$1x.empty.text
  24796. },
  24797. // 文字颜色
  24798. textColor: {
  24799. type: String,
  24800. default: () => props$1x.empty.textColor
  24801. },
  24802. // 文字大小
  24803. textSize: {
  24804. type: [String, Number],
  24805. default: () => props$1x.empty.textSize
  24806. },
  24807. // 图标的颜色
  24808. iconColor: {
  24809. type: String,
  24810. default: () => props$1x.empty.iconColor
  24811. },
  24812. // 图标的大小
  24813. iconSize: {
  24814. type: [String, Number],
  24815. default: () => props$1x.empty.iconSize
  24816. },
  24817. // 选择预置的图标类型
  24818. mode: {
  24819. type: String,
  24820. default: () => props$1x.empty.mode
  24821. },
  24822. // 图标宽度,单位px
  24823. width: {
  24824. type: [String, Number],
  24825. default: () => props$1x.empty.width
  24826. },
  24827. // 图标高度,单位px
  24828. height: {
  24829. type: [String, Number],
  24830. default: () => props$1x.empty.height
  24831. },
  24832. // 是否显示组件
  24833. show: {
  24834. type: Boolean,
  24835. default: () => props$1x.empty.show
  24836. },
  24837. // 组件距离上一个元素之间的距离,默认px单位
  24838. marginTop: {
  24839. type: [String, Number],
  24840. default: () => props$1x.empty.marginTop
  24841. }
  24842. }
  24843. });
  24844. const _sfc_main$1r = {
  24845. name: "u-empty",
  24846. mixins: [mpMixin, mixin, props$X],
  24847. data() {
  24848. return {
  24849. icons: {
  24850. car: t$1("up.empty.car"),
  24851. page: t$1("up.empty.page"),
  24852. search: t$1("up.empty.search"),
  24853. address: t$1("up.empty.address"),
  24854. wifi: t$1("up.empty.wifi"),
  24855. order: t$1("up.empty.order"),
  24856. coupon: t$1("up.empty.coupon"),
  24857. favor: t$1("up.empty.favor"),
  24858. permission: t$1("up.empty.permission"),
  24859. history: t$1("up.empty.history"),
  24860. news: t$1("up.empty.news"),
  24861. message: t$1("up.empty.message"),
  24862. list: t$1("up.empty.list"),
  24863. data: t$1("up.empty.data"),
  24864. comment: t$1("up.empty.comment")
  24865. }
  24866. };
  24867. },
  24868. computed: {
  24869. // 组件样式
  24870. emptyStyle() {
  24871. const style = {};
  24872. style.marginTop = addUnit(this.marginTop);
  24873. return deepMerge$1(addStyle(this.customStyle), style);
  24874. },
  24875. // 文本样式
  24876. textStyle() {
  24877. const style = {};
  24878. style.color = this.textColor;
  24879. style.fontSize = addUnit(this.textSize);
  24880. return style;
  24881. },
  24882. // 判断icon是否图片路径
  24883. isSrc() {
  24884. return this.icon.indexOf("/") >= 0;
  24885. }
  24886. },
  24887. methods: {
  24888. addUnit
  24889. }
  24890. };
  24891. function _sfc_render$1q(_ctx, _cache, $props, $setup, $data, $options) {
  24892. const _component_up_icon = vue.resolveComponent("up-icon");
  24893. return _ctx.show ? (vue.openBlock(), vue.createElementBlock(
  24894. "view",
  24895. {
  24896. key: 0,
  24897. class: "u-empty",
  24898. style: vue.normalizeStyle([$options.emptyStyle])
  24899. },
  24900. [
  24901. !$options.isSrc ? (vue.openBlock(), vue.createBlock(_component_up_icon, {
  24902. key: 0,
  24903. name: _ctx.mode === "message" ? "chat" : `empty-${_ctx.mode}`,
  24904. size: _ctx.iconSize,
  24905. color: _ctx.iconColor,
  24906. "margin-top": "14"
  24907. }, null, 8, ["name", "size", "color"])) : (vue.openBlock(), vue.createElementBlock("image", {
  24908. key: 1,
  24909. style: vue.normalizeStyle({
  24910. width: $options.addUnit(_ctx.width),
  24911. height: $options.addUnit(_ctx.height)
  24912. }),
  24913. src: _ctx.icon,
  24914. mode: "widthFix"
  24915. }, null, 12, ["src"])),
  24916. vue.createElementVNode(
  24917. "text",
  24918. {
  24919. class: "u-empty__text",
  24920. style: vue.normalizeStyle([$options.textStyle])
  24921. },
  24922. vue.toDisplayString(_ctx.text ? _ctx.text : $data.icons[_ctx.mode]),
  24923. 5
  24924. /* TEXT, STYLE */
  24925. ),
  24926. _ctx.$slots.default || _ctx.$slots.$default ? (vue.openBlock(), vue.createElementBlock("view", {
  24927. key: 2,
  24928. class: "u-empty__wrap"
  24929. }, [
  24930. vue.renderSlot(_ctx.$slots, "default", {}, void 0, true)
  24931. ])) : vue.createCommentVNode("v-if", true)
  24932. ],
  24933. 4
  24934. /* STYLE */
  24935. )) : vue.createCommentVNode("v-if", true);
  24936. }
  24937. const uEmpty = /* @__PURE__ */ _export_sfc(_sfc_main$1r, [["render", _sfc_render$1q], ["__scopeId", "data-v-8dd5928e"], ["__file", "C:/Users/EDY/Desktop/项目/shuibei/uni_modules/uview-plus/components/u-empty/u-empty.vue"]]);
  24938. const __vite_glob_0_39 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
  24939. __proto__: null,
  24940. default: uEmpty
  24941. }, Symbol.toStringTag, { value: "Module" }));
  24942. const _sfc_main$1q = {
  24943. name: "u-float-button",
  24944. mixins: [mpMixin, mixin],
  24945. emits: ["click", "item-click"],
  24946. computed: {},
  24947. props: {
  24948. // 背景颜色
  24949. backgroundColor: {
  24950. type: String,
  24951. default: "#2979ff"
  24952. },
  24953. // 文字颜色
  24954. color: {
  24955. type: String,
  24956. default: "#fff"
  24957. },
  24958. // 宽度
  24959. width: {
  24960. type: String,
  24961. default: "50px"
  24962. },
  24963. // 高度
  24964. height: {
  24965. type: String,
  24966. default: "50px"
  24967. },
  24968. // 边框颜色,默认为空字符串表示无边框
  24969. borderColor: {
  24970. type: String,
  24971. default: ""
  24972. },
  24973. // 右侧偏移量
  24974. right: {
  24975. type: [String, Number],
  24976. default: "30px"
  24977. },
  24978. // 顶部偏移量,未提供默认值,可能需要根据具体情况设置
  24979. top: {
  24980. type: [String, Number],
  24981. default: ""
  24982. },
  24983. // 底部偏移量
  24984. bottom: {
  24985. type: String,
  24986. default: ""
  24987. },
  24988. // 是否为菜单项
  24989. isMenu: {
  24990. type: Boolean,
  24991. default: false
  24992. },
  24993. list: {
  24994. type: Array,
  24995. default: () => {
  24996. return [];
  24997. }
  24998. }
  24999. },
  25000. data() {
  25001. return {
  25002. showList: false
  25003. };
  25004. },
  25005. methods: {
  25006. addStyle,
  25007. clickHandler(e2) {
  25008. if (this.isMenu) {
  25009. this.showList = !this.showList;
  25010. this.$emit("click", e2);
  25011. } else {
  25012. this.$emit("click", e2);
  25013. }
  25014. },
  25015. itemClick(item, index2) {
  25016. this.$emit("item-click", {
  25017. ...item,
  25018. index: index2
  25019. });
  25020. }
  25021. }
  25022. };
  25023. function _sfc_render$1p(_ctx, _cache, $props, $setup, $data, $options) {
  25024. const _component_up_icon = vue.resolveComponent("up-icon");
  25025. return vue.openBlock(), vue.createElementBlock(
  25026. "view",
  25027. {
  25028. class: "u-float-button",
  25029. style: vue.normalizeStyle({
  25030. position: "fixed",
  25031. top: $props.top,
  25032. bottom: $props.bottom,
  25033. right: $props.right
  25034. })
  25035. },
  25036. [
  25037. vue.createElementVNode(
  25038. "view",
  25039. {
  25040. class: "u-float-button__main",
  25041. onClick: _cache[0] || (_cache[0] = (...args) => $options.clickHandler && $options.clickHandler(...args)),
  25042. style: vue.normalizeStyle({
  25043. backgroundColor: $props.backgroundColor,
  25044. color: $props.color,
  25045. display: "flex",
  25046. flexDirection: "row",
  25047. justifyContent: "center",
  25048. alignItems: "center",
  25049. width: $props.width,
  25050. height: $props.height,
  25051. borderRadius: "50%",
  25052. borderColor: $props.borderColor
  25053. })
  25054. },
  25055. [
  25056. vue.renderSlot(_ctx.$slots, "default", { showList: $data.showList }, () => [
  25057. vue.createVNode(_component_up_icon, {
  25058. class: vue.normalizeClass(["cursor-pointer", { "show-list": $data.showList }]),
  25059. name: "plus",
  25060. color: $props.color
  25061. }, null, 8, ["class", "color"])
  25062. ], true),
  25063. $data.showList ? (vue.openBlock(), vue.createElementBlock(
  25064. "view",
  25065. {
  25066. key: 0,
  25067. class: "u-float-button__list",
  25068. style: vue.normalizeStyle({
  25069. bottom: $props.height
  25070. })
  25071. },
  25072. [
  25073. vue.renderSlot(_ctx.$slots, "list", {}, () => [
  25074. (vue.openBlock(true), vue.createElementBlock(
  25075. vue.Fragment,
  25076. null,
  25077. vue.renderList($props.list, (item, index2) => {
  25078. return vue.openBlock(), vue.createElementBlock("view", {
  25079. key: index2,
  25080. class: "u-float-button__item",
  25081. style: vue.normalizeStyle({
  25082. backgroundColor: (item == null ? void 0 : item.backgroundColor) ? item == null ? void 0 : item.backgroundColor : $props.backgroundColor,
  25083. color: (item == null ? void 0 : item.color) ? item == null ? void 0 : item.color : $props.color,
  25084. display: "flex",
  25085. flexDirection: "row",
  25086. justifyContent: "center",
  25087. alignItems: "center",
  25088. width: $props.width,
  25089. height: $props.height,
  25090. borderRadius: "50%",
  25091. borderColor: (item == null ? void 0 : item.borderColor) ? item == null ? void 0 : item.borderColor : $props.borderColor
  25092. }),
  25093. onClick: ($event) => $options.itemClick(item, index2)
  25094. }, [
  25095. vue.createVNode(_component_up_icon, {
  25096. name: item.name,
  25097. color: (item == null ? void 0 : item.color) ? item == null ? void 0 : item.color : $props.color
  25098. }, null, 8, ["name", "color"])
  25099. ], 12, ["onClick"]);
  25100. }),
  25101. 128
  25102. /* KEYED_FRAGMENT */
  25103. ))
  25104. ], true)
  25105. ],
  25106. 4
  25107. /* STYLE */
  25108. )) : vue.createCommentVNode("v-if", true)
  25109. ],
  25110. 4
  25111. /* STYLE */
  25112. )
  25113. ],
  25114. 4
  25115. /* STYLE */
  25116. );
  25117. }
  25118. const uFloatButton = /* @__PURE__ */ _export_sfc(_sfc_main$1q, [["render", _sfc_render$1p], ["__scopeId", "data-v-8a662942"], ["__file", "C:/Users/EDY/Desktop/项目/shuibei/uni_modules/uview-plus/components/u-float-button/u-float-button.vue"]]);
  25119. const __vite_glob_0_40 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
  25120. __proto__: null,
  25121. default: uFloatButton
  25122. }, Symbol.toStringTag, { value: "Module" }));
  25123. const props$W = defineMixin({
  25124. props: {
  25125. // input的label提示语
  25126. label: {
  25127. type: String,
  25128. default: () => props$1x.formItem.label
  25129. },
  25130. // 绑定的值
  25131. prop: {
  25132. type: String,
  25133. default: () => props$1x.formItem.prop
  25134. },
  25135. // 绑定的规则
  25136. rules: {
  25137. type: Array,
  25138. default: () => props$1x.formItem.rules
  25139. },
  25140. // 是否显示表单域的下划线边框
  25141. borderBottom: {
  25142. type: [String, Boolean],
  25143. default: () => props$1x.formItem.borderBottom
  25144. },
  25145. // label的位置,left-左边,top-上边
  25146. labelPosition: {
  25147. type: String,
  25148. default: () => props$1x.formItem.labelPosition
  25149. },
  25150. // label的宽度,单位px
  25151. labelWidth: {
  25152. type: [String, Number],
  25153. default: () => props$1x.formItem.labelWidth
  25154. },
  25155. // 右侧图标
  25156. rightIcon: {
  25157. type: String,
  25158. default: () => props$1x.formItem.rightIcon
  25159. },
  25160. // 左侧图标
  25161. leftIcon: {
  25162. type: String,
  25163. default: () => props$1x.formItem.leftIcon
  25164. },
  25165. // 是否显示左边的必填星号,只作显示用,具体校验必填的逻辑,请在rules中配置
  25166. required: {
  25167. type: Boolean,
  25168. default: () => props$1x.formItem.required
  25169. },
  25170. leftIconStyle: {
  25171. type: [String, Object],
  25172. default: () => props$1x.formItem.leftIconStyle
  25173. }
  25174. }
  25175. });
  25176. const _sfc_main$1p = {
  25177. name: "u-form-item",
  25178. mixins: [mpMixin, mixin, props$W],
  25179. data() {
  25180. return {
  25181. // 错误提示语
  25182. message: "",
  25183. parentData: {
  25184. // 提示文本的位置
  25185. labelPosition: "left",
  25186. // 提示文本对齐方式
  25187. labelAlign: "left",
  25188. // 提示文本的样式
  25189. labelStyle: {},
  25190. // 提示文本的宽度
  25191. labelWidth: 45,
  25192. // 错误提示方式
  25193. errorType: "message"
  25194. },
  25195. color: color$3,
  25196. itemRules: []
  25197. };
  25198. },
  25199. // 组件创建完成时,将当前实例保存到u-form中
  25200. computed: {
  25201. propsLine() {
  25202. return props$1x.line;
  25203. }
  25204. },
  25205. mounted() {
  25206. this.init();
  25207. },
  25208. emits: ["click"],
  25209. watch: {
  25210. // 监听规则的变化
  25211. rules: {
  25212. immediate: true,
  25213. handler(n2) {
  25214. this.setRules(n2);
  25215. }
  25216. }
  25217. },
  25218. methods: {
  25219. addStyle,
  25220. addUnit,
  25221. init() {
  25222. this.updateParentData();
  25223. if (!this.parent) {
  25224. error("u-form-item需要结合u-form组件使用");
  25225. }
  25226. },
  25227. // 手动设置校验的规则,如果规则中有函数的话,微信小程序中会过滤掉,所以只能手动调用设置规则
  25228. setRules(rules2) {
  25229. if (rules2.length === 0) {
  25230. this.itemRules = [];
  25231. return;
  25232. }
  25233. this.itemRules = rules2;
  25234. },
  25235. // 获取父组件的参数
  25236. updateParentData() {
  25237. this.getParentData("u-form");
  25238. },
  25239. // 移除u-form-item的校验结果
  25240. clearValidate() {
  25241. this.message = null;
  25242. },
  25243. // 清空当前的组件的校验结果,并重置为初始值
  25244. resetField() {
  25245. const value2 = getProperty(this.parent.originalModel, this.prop);
  25246. setProperty(this.parent.model, this.prop, value2);
  25247. this.message = null;
  25248. },
  25249. // 点击组件
  25250. clickHandler() {
  25251. this.$emit("click");
  25252. }
  25253. }
  25254. };
  25255. function _sfc_render$1o(_ctx, _cache, $props, $setup, $data, $options) {
  25256. const _component_up_icon = vue.resolveComponent("up-icon");
  25257. const _component_u_line = resolveEasycom(vue.resolveDynamicComponent("u-line"), __easycom_1$4);
  25258. return vue.openBlock(), vue.createElementBlock(
  25259. "view",
  25260. {
  25261. class: vue.normalizeClass(["u-form-item", { "u-form-item--error": !!$data.message && $data.parentData.errorType === "message" }])
  25262. },
  25263. [
  25264. vue.createElementVNode(
  25265. "view",
  25266. {
  25267. class: "u-form-item__body",
  25268. onClick: _cache[0] || (_cache[0] = (...args) => $options.clickHandler && $options.clickHandler(...args)),
  25269. style: vue.normalizeStyle([$options.addStyle(_ctx.customStyle), {
  25270. flexDirection: (_ctx.labelPosition || $data.parentData.labelPosition) === "left" ? "row" : "column"
  25271. }])
  25272. },
  25273. [
  25274. vue.createCommentVNode(' 微信小程序中,将一个参数设置空字符串,结果会变成字符串"true" '),
  25275. vue.renderSlot(_ctx.$slots, "label", {}, () => [
  25276. vue.createCommentVNode(" {{required}} "),
  25277. _ctx.required || _ctx.leftIcon || _ctx.label ? (vue.openBlock(), vue.createElementBlock(
  25278. "view",
  25279. {
  25280. key: 0,
  25281. class: "u-form-item__body__left",
  25282. style: vue.normalizeStyle({
  25283. width: $options.addUnit(_ctx.labelWidth || $data.parentData.labelWidth),
  25284. marginBottom: (_ctx.labelPosition || $data.parentData.labelPosition) === "left" ? 0 : "5px"
  25285. })
  25286. },
  25287. [
  25288. vue.createCommentVNode(" 为了块对齐 "),
  25289. vue.createElementVNode("view", { class: "u-form-item__body__left__content" }, [
  25290. vue.createCommentVNode(" nvue不支持伪元素before "),
  25291. _ctx.required ? (vue.openBlock(), vue.createElementBlock("text", {
  25292. key: 0,
  25293. class: "u-form-item__body__left__content__required"
  25294. }, "*")) : vue.createCommentVNode("v-if", true),
  25295. _ctx.leftIcon ? (vue.openBlock(), vue.createElementBlock("view", {
  25296. key: 1,
  25297. class: "u-form-item__body__left__content__icon"
  25298. }, [
  25299. vue.createVNode(_component_up_icon, {
  25300. name: _ctx.leftIcon,
  25301. "custom-style": _ctx.leftIconStyle
  25302. }, null, 8, ["name", "custom-style"])
  25303. ])) : vue.createCommentVNode("v-if", true),
  25304. vue.createElementVNode(
  25305. "text",
  25306. {
  25307. class: "u-form-item__body__left__content__label",
  25308. style: vue.normalizeStyle([$data.parentData.labelStyle, {
  25309. justifyContent: $data.parentData.labelAlign === "left" ? "flex-start" : $data.parentData.labelAlign === "center" ? "center" : "flex-end"
  25310. }])
  25311. },
  25312. vue.toDisplayString(_ctx.label),
  25313. 5
  25314. /* TEXT, STYLE */
  25315. )
  25316. ])
  25317. ],
  25318. 4
  25319. /* STYLE */
  25320. )) : vue.createCommentVNode("v-if", true)
  25321. ], true),
  25322. vue.createElementVNode("view", { class: "u-form-item__body__right" }, [
  25323. vue.createElementVNode("view", { class: "u-form-item__body__right__content" }, [
  25324. vue.createElementVNode("view", { class: "u-form-item__body__right__content__slot" }, [
  25325. vue.renderSlot(_ctx.$slots, "default", {}, void 0, true)
  25326. ]),
  25327. _ctx.$slots.right ? (vue.openBlock(), vue.createElementBlock("view", {
  25328. key: 0,
  25329. class: "item__body__right__content__icon"
  25330. }, [
  25331. vue.renderSlot(_ctx.$slots, "right", {}, void 0, true)
  25332. ])) : vue.createCommentVNode("v-if", true)
  25333. ])
  25334. ])
  25335. ],
  25336. 4
  25337. /* STYLE */
  25338. ),
  25339. vue.renderSlot(_ctx.$slots, "error", {}, () => [
  25340. !!$data.message && $data.parentData.errorType === "message" ? (vue.openBlock(), vue.createElementBlock(
  25341. "text",
  25342. {
  25343. key: 0,
  25344. class: "u-form-item__body__right__message",
  25345. style: vue.normalizeStyle({
  25346. marginLeft: $options.addUnit((_ctx.labelPosition || $data.parentData.labelPosition) === "top" ? 0 : _ctx.labelWidth || $data.parentData.labelWidth)
  25347. })
  25348. },
  25349. vue.toDisplayString($data.message),
  25350. 5
  25351. /* TEXT, STYLE */
  25352. )) : vue.createCommentVNode("v-if", true)
  25353. ], true),
  25354. _ctx.borderBottom ? (vue.openBlock(), vue.createBlock(_component_u_line, {
  25355. key: 0,
  25356. color: $data.message && $data.parentData.errorType === "border-bottom" ? $data.color.error : $options.propsLine.color,
  25357. customStyle: `margin-top: ${$data.message && $data.parentData.errorType === "message" ? "5px" : 0}`
  25358. }, null, 8, ["color", "customStyle"])) : vue.createCommentVNode("v-if", true)
  25359. ],
  25360. 2
  25361. /* CLASS */
  25362. );
  25363. }
  25364. const uFormItem = /* @__PURE__ */ _export_sfc(_sfc_main$1p, [["render", _sfc_render$1o], ["__scopeId", "data-v-42bac3de"], ["__file", "C:/Users/EDY/Desktop/项目/shuibei/uni_modules/uview-plus/components/u-form-item/u-form-item.vue"]]);
  25365. const __vite_glob_0_41 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
  25366. __proto__: null,
  25367. default: uFormItem
  25368. }, Symbol.toStringTag, { value: "Module" }));
  25369. const props$V = defineMixin({
  25370. props: {
  25371. // 当前form的需要验证字段的集合
  25372. model: {
  25373. type: Object,
  25374. default: () => props$1x.form.model
  25375. },
  25376. // 验证规则
  25377. rules: {
  25378. type: [Object, Function, Array],
  25379. default: () => props$1x.form.rules
  25380. },
  25381. // 有错误时的提示方式,message-提示信息,toast-进行toast提示
  25382. // border-bottom-下边框呈现红色,none-无提示
  25383. errorType: {
  25384. type: String,
  25385. default: () => props$1x.form.errorType
  25386. },
  25387. // 是否显示表单域的下划线边框
  25388. borderBottom: {
  25389. type: Boolean,
  25390. default: () => props$1x.form.borderBottom
  25391. },
  25392. // label的位置,left-左边,top-上边
  25393. labelPosition: {
  25394. type: String,
  25395. default: () => props$1x.form.labelPosition
  25396. },
  25397. // label的宽度,单位px
  25398. labelWidth: {
  25399. type: [String, Number],
  25400. default: () => props$1x.form.labelWidth
  25401. },
  25402. // lable字体的对齐方式
  25403. labelAlign: {
  25404. type: String,
  25405. default: () => props$1x.form.labelAlign
  25406. },
  25407. // lable的样式,对象形式
  25408. labelStyle: {
  25409. type: Object,
  25410. default: () => props$1x.form.labelStyle
  25411. }
  25412. }
  25413. });
  25414. var define_process_env_default = {};
  25415. const formatRegExp = /%[sdj%]/g;
  25416. let warning = function warning2() {
  25417. };
  25418. if (typeof process !== "undefined" && define_process_env_default && true && typeof window !== "undefined" && typeof document !== "undefined") {
  25419. warning = function warning3(type2, errors) {
  25420. if (typeof console !== "undefined" && console.warn) {
  25421. if (errors.every((e2) => typeof e2 === "string")) {
  25422. formatAppLog("warn", "at uni_modules/uview-plus/libs/util/async-validator.js:28", type2, errors);
  25423. }
  25424. }
  25425. };
  25426. }
  25427. function convertFieldsError(errors) {
  25428. if (!errors || !errors.length)
  25429. return null;
  25430. const fields = {};
  25431. errors.forEach((error2) => {
  25432. const { field } = error2;
  25433. fields[field] = fields[field] || [];
  25434. fields[field].push(error2);
  25435. });
  25436. return fields;
  25437. }
  25438. function format() {
  25439. for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
  25440. args[_key] = arguments[_key];
  25441. }
  25442. let i2 = 1;
  25443. const f2 = args[0];
  25444. const len = args.length;
  25445. if (typeof f2 === "function") {
  25446. return f2.apply(null, args.slice(1));
  25447. }
  25448. if (typeof f2 === "string") {
  25449. let str = String(f2).replace(formatRegExp, (x2) => {
  25450. if (x2 === "%%") {
  25451. return "%";
  25452. }
  25453. if (i2 >= len) {
  25454. return x2;
  25455. }
  25456. switch (x2) {
  25457. case "%s":
  25458. return String(args[i2++]);
  25459. case "%d":
  25460. return Number(args[i2++]);
  25461. case "%j":
  25462. try {
  25463. return JSON.stringify(args[i2++]);
  25464. } catch (_2) {
  25465. return "[Circular]";
  25466. }
  25467. break;
  25468. default:
  25469. return x2;
  25470. }
  25471. });
  25472. for (let arg = args[i2]; i2 < len; arg = args[++i2]) {
  25473. str += ` ${arg}`;
  25474. }
  25475. return str;
  25476. }
  25477. return f2;
  25478. }
  25479. function isNativeStringType(type2) {
  25480. return type2 === "string" || type2 === "url" || type2 === "hex" || type2 === "email" || type2 === "pattern";
  25481. }
  25482. function isEmptyValue(value2, type2) {
  25483. if (value2 === void 0 || value2 === null) {
  25484. return true;
  25485. }
  25486. if (type2 === "array" && Array.isArray(value2) && !value2.length) {
  25487. return true;
  25488. }
  25489. if (isNativeStringType(type2) && typeof value2 === "string" && !value2) {
  25490. return true;
  25491. }
  25492. return false;
  25493. }
  25494. function asyncParallelArray(arr, func2, callback) {
  25495. const results = [];
  25496. let total = 0;
  25497. const arrLength = arr.length;
  25498. function count(errors) {
  25499. results.push.apply(results, errors);
  25500. total++;
  25501. if (total === arrLength) {
  25502. callback(results);
  25503. }
  25504. }
  25505. arr.forEach((a2) => {
  25506. func2(a2, count);
  25507. });
  25508. }
  25509. function asyncSerialArray(arr, func2, callback) {
  25510. let index2 = 0;
  25511. const arrLength = arr.length;
  25512. function next(errors) {
  25513. if (errors && errors.length) {
  25514. callback(errors);
  25515. return;
  25516. }
  25517. const original = index2;
  25518. index2 += 1;
  25519. if (original < arrLength) {
  25520. func2(arr[original], next);
  25521. } else {
  25522. callback([]);
  25523. }
  25524. }
  25525. next([]);
  25526. }
  25527. function flattenObjArr(objArr) {
  25528. const ret = [];
  25529. Object.keys(objArr).forEach((k2) => {
  25530. ret.push.apply(ret, objArr[k2]);
  25531. });
  25532. return ret;
  25533. }
  25534. function asyncMap(objArr, option, func2, callback) {
  25535. if (option.first) {
  25536. const _pending = new Promise((resolve, reject) => {
  25537. const next = function next2(errors) {
  25538. callback(errors);
  25539. return errors.length ? reject({
  25540. errors,
  25541. fields: convertFieldsError(errors)
  25542. }) : resolve();
  25543. };
  25544. const flattenArr = flattenObjArr(objArr);
  25545. asyncSerialArray(flattenArr, func2, next);
  25546. });
  25547. _pending.catch((e2) => e2);
  25548. return _pending;
  25549. }
  25550. let firstFields = option.firstFields || [];
  25551. if (firstFields === true) {
  25552. firstFields = Object.keys(objArr);
  25553. }
  25554. const objArrKeys = Object.keys(objArr);
  25555. const objArrLength = objArrKeys.length;
  25556. let total = 0;
  25557. const results = [];
  25558. const pending = new Promise((resolve, reject) => {
  25559. const next = function next2(errors) {
  25560. results.push.apply(results, errors);
  25561. total++;
  25562. if (total === objArrLength) {
  25563. callback(results);
  25564. return results.length ? reject({
  25565. errors: results,
  25566. fields: convertFieldsError(results)
  25567. }) : resolve();
  25568. }
  25569. };
  25570. if (!objArrKeys.length) {
  25571. callback(results);
  25572. resolve();
  25573. }
  25574. objArrKeys.forEach((key) => {
  25575. const arr = objArr[key];
  25576. if (firstFields.indexOf(key) !== -1) {
  25577. asyncSerialArray(arr, func2, next);
  25578. } else {
  25579. asyncParallelArray(arr, func2, next);
  25580. }
  25581. });
  25582. });
  25583. pending.catch((e2) => e2);
  25584. return pending;
  25585. }
  25586. function complementError(rule) {
  25587. return function(oe2) {
  25588. if (oe2 && oe2.message) {
  25589. oe2.field = oe2.field || rule.fullField;
  25590. return oe2;
  25591. }
  25592. return {
  25593. message: typeof oe2 === "function" ? oe2() : oe2,
  25594. field: oe2.field || rule.fullField
  25595. };
  25596. };
  25597. }
  25598. function deepMerge(target, source) {
  25599. if (source) {
  25600. for (const s2 in source) {
  25601. if (source.hasOwnProperty(s2)) {
  25602. const value2 = source[s2];
  25603. if (typeof value2 === "object" && typeof target[s2] === "object") {
  25604. target[s2] = { ...target[s2], ...value2 };
  25605. } else {
  25606. target[s2] = value2;
  25607. }
  25608. }
  25609. }
  25610. }
  25611. return target;
  25612. }
  25613. function required(rule, value2, source, errors, options2, type2) {
  25614. if (rule.required && (!source.hasOwnProperty(rule.field) || isEmptyValue(value2, type2 || rule.type))) {
  25615. errors.push(format(options2.messages.required, rule.fullField));
  25616. }
  25617. }
  25618. function whitespace(rule, value2, source, errors, options2) {
  25619. if (/^\s+$/.test(value2) || value2 === "") {
  25620. errors.push(format(options2.messages.whitespace, rule.fullField));
  25621. }
  25622. }
  25623. const pattern = {
  25624. // http://emailregex.com/
  25625. email: /^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/,
  25626. url: new RegExp(
  25627. "^(?!mailto:)(?:(?:http|https|ftp)://|//)(?:\\S+(?::\\S*)?@)?(?:(?:(?:[1-9]\\d?|1\\d\\d|2[01]\\d|22[0-3])(?:\\.(?:1?\\d{1,2}|2[0-4]\\d|25[0-5])){2}(?:\\.(?:[0-9]\\d?|1\\d\\d|2[0-4]\\d|25[0-4]))|(?:(?:[a-z\\u00a1-\\uffff0-9]+-*)*[a-z\\u00a1-\\uffff0-9]+)(?:\\.(?:[a-z\\u00a1-\\uffff0-9]+-*)*[a-z\\u00a1-\\uffff0-9]+)*(?:\\.(?:[a-z\\u00a1-\\uffff]{2,})))|localhost)(?::\\d{2,5})?(?:(/|\\?|#)[^\\s]*)?$",
  25628. "i"
  25629. ),
  25630. hex: /^#?([a-f0-9]{6}|[a-f0-9]{3})$/i
  25631. };
  25632. var types = {
  25633. integer: function integer(value2) {
  25634. return /^(-)?\d+$/.test(value2);
  25635. },
  25636. float: function float(value2) {
  25637. return /^(-)?\d+(\.\d+)?$/.test(value2);
  25638. },
  25639. array: function array3(value2) {
  25640. return Array.isArray(value2);
  25641. },
  25642. regexp: function regexp(value2) {
  25643. if (value2 instanceof RegExp) {
  25644. return true;
  25645. }
  25646. try {
  25647. return !!new RegExp(value2);
  25648. } catch (e2) {
  25649. return false;
  25650. }
  25651. },
  25652. date: function date3(value2) {
  25653. return typeof value2.getTime === "function" && typeof value2.getMonth === "function" && typeof value2.getYear === "function";
  25654. },
  25655. number: function number3(value2) {
  25656. if (isNaN(value2)) {
  25657. return false;
  25658. }
  25659. return typeof +value2 === "number";
  25660. },
  25661. object: function object3(value2) {
  25662. return typeof value2 === "object" && !types.array(value2);
  25663. },
  25664. method: function method(value2) {
  25665. return typeof value2 === "function";
  25666. },
  25667. email: function email2(value2) {
  25668. return typeof value2 === "string" && !!value2.match(pattern.email) && value2.length < 255;
  25669. },
  25670. url: function url2(value2) {
  25671. return typeof value2 === "string" && !!value2.match(pattern.url);
  25672. },
  25673. hex: function hex(value2) {
  25674. return typeof value2 === "string" && !!value2.match(pattern.hex);
  25675. }
  25676. };
  25677. function type(rule, value2, source, errors, options2) {
  25678. if (rule.required && value2 === void 0) {
  25679. required(rule, value2, source, errors, options2);
  25680. return;
  25681. }
  25682. const custom = ["integer", "float", "array", "regexp", "object", "method", "email", "number", "date", "url", "hex"];
  25683. const ruleType = rule.type;
  25684. if (custom.indexOf(ruleType) > -1) {
  25685. if (!types[ruleType](value2)) {
  25686. errors.push(format(options2.messages.types[ruleType], rule.fullField, rule.type));
  25687. }
  25688. } else if (ruleType && typeof value2 !== rule.type) {
  25689. errors.push(format(options2.messages.types[ruleType], rule.fullField, rule.type));
  25690. }
  25691. }
  25692. function range(rule, value2, source, errors, options2) {
  25693. const len = typeof rule.len === "number";
  25694. const min = typeof rule.min === "number";
  25695. const max = typeof rule.max === "number";
  25696. const spRegexp = /[\uD800-\uDBFF][\uDC00-\uDFFF]/g;
  25697. let val = value2;
  25698. let key = null;
  25699. const num = typeof value2 === "number";
  25700. const str = typeof value2 === "string";
  25701. const arr = Array.isArray(value2);
  25702. if (num) {
  25703. key = "number";
  25704. } else if (str) {
  25705. key = "string";
  25706. } else if (arr) {
  25707. key = "array";
  25708. }
  25709. if (!key) {
  25710. return false;
  25711. }
  25712. if (arr) {
  25713. val = value2.length;
  25714. }
  25715. if (str) {
  25716. val = value2.replace(spRegexp, "_").length;
  25717. }
  25718. if (len) {
  25719. if (val !== rule.len) {
  25720. errors.push(format(options2.messages[key].len, rule.fullField, rule.len));
  25721. }
  25722. } else if (min && !max && val < rule.min) {
  25723. errors.push(format(options2.messages[key].min, rule.fullField, rule.min));
  25724. } else if (max && !min && val > rule.max) {
  25725. errors.push(format(options2.messages[key].max, rule.fullField, rule.max));
  25726. } else if (min && max && (val < rule.min || val > rule.max)) {
  25727. errors.push(format(options2.messages[key].range, rule.fullField, rule.min, rule.max));
  25728. }
  25729. }
  25730. const ENUM = "enum";
  25731. function enumerable(rule, value2, source, errors, options2) {
  25732. rule[ENUM] = Array.isArray(rule[ENUM]) ? rule[ENUM] : [];
  25733. if (rule[ENUM].indexOf(value2) === -1) {
  25734. errors.push(format(options2.messages[ENUM], rule.fullField, rule[ENUM].join(", ")));
  25735. }
  25736. }
  25737. function pattern$1(rule, value2, source, errors, options2) {
  25738. if (rule.pattern) {
  25739. if (rule.pattern instanceof RegExp) {
  25740. rule.pattern.lastIndex = 0;
  25741. if (!rule.pattern.test(value2)) {
  25742. errors.push(format(options2.messages.pattern.mismatch, rule.fullField, value2, rule.pattern));
  25743. }
  25744. } else if (typeof rule.pattern === "string") {
  25745. const _pattern = new RegExp(rule.pattern);
  25746. if (!_pattern.test(value2)) {
  25747. errors.push(format(options2.messages.pattern.mismatch, rule.fullField, value2, rule.pattern));
  25748. }
  25749. }
  25750. }
  25751. }
  25752. const rules = {
  25753. required,
  25754. whitespace,
  25755. type,
  25756. range,
  25757. enum: enumerable,
  25758. pattern: pattern$1
  25759. };
  25760. function string(rule, value2, callback, source, options2) {
  25761. const errors = [];
  25762. const validate2 = rule.required || !rule.required && source.hasOwnProperty(rule.field);
  25763. if (validate2) {
  25764. if (isEmptyValue(value2, "string") && !rule.required) {
  25765. return callback();
  25766. }
  25767. rules.required(rule, value2, source, errors, options2, "string");
  25768. if (!isEmptyValue(value2, "string")) {
  25769. rules.type(rule, value2, source, errors, options2);
  25770. rules.range(rule, value2, source, errors, options2);
  25771. rules.pattern(rule, value2, source, errors, options2);
  25772. if (rule.whitespace === true) {
  25773. rules.whitespace(rule, value2, source, errors, options2);
  25774. }
  25775. }
  25776. }
  25777. callback(errors);
  25778. }
  25779. function method2(rule, value2, callback, source, options2) {
  25780. const errors = [];
  25781. const validate2 = rule.required || !rule.required && source.hasOwnProperty(rule.field);
  25782. if (validate2) {
  25783. if (isEmptyValue(value2) && !rule.required) {
  25784. return callback();
  25785. }
  25786. rules.required(rule, value2, source, errors, options2);
  25787. if (value2 !== void 0) {
  25788. rules.type(rule, value2, source, errors, options2);
  25789. }
  25790. }
  25791. callback(errors);
  25792. }
  25793. function number2(rule, value2, callback, source, options2) {
  25794. const errors = [];
  25795. const validate2 = rule.required || !rule.required && source.hasOwnProperty(rule.field);
  25796. if (validate2) {
  25797. if (value2 === "") {
  25798. value2 = void 0;
  25799. }
  25800. if (isEmptyValue(value2) && !rule.required) {
  25801. return callback();
  25802. }
  25803. rules.required(rule, value2, source, errors, options2);
  25804. if (value2 !== void 0) {
  25805. rules.type(rule, value2, source, errors, options2);
  25806. rules.range(rule, value2, source, errors, options2);
  25807. }
  25808. }
  25809. callback(errors);
  25810. }
  25811. function _boolean(rule, value2, callback, source, options2) {
  25812. const errors = [];
  25813. const validate2 = rule.required || !rule.required && source.hasOwnProperty(rule.field);
  25814. if (validate2) {
  25815. if (isEmptyValue(value2) && !rule.required) {
  25816. return callback();
  25817. }
  25818. rules.required(rule, value2, source, errors, options2);
  25819. if (value2 !== void 0) {
  25820. rules.type(rule, value2, source, errors, options2);
  25821. }
  25822. }
  25823. callback(errors);
  25824. }
  25825. function regexp2(rule, value2, callback, source, options2) {
  25826. const errors = [];
  25827. const validate2 = rule.required || !rule.required && source.hasOwnProperty(rule.field);
  25828. if (validate2) {
  25829. if (isEmptyValue(value2) && !rule.required) {
  25830. return callback();
  25831. }
  25832. rules.required(rule, value2, source, errors, options2);
  25833. if (!isEmptyValue(value2)) {
  25834. rules.type(rule, value2, source, errors, options2);
  25835. }
  25836. }
  25837. callback(errors);
  25838. }
  25839. function integer2(rule, value2, callback, source, options2) {
  25840. const errors = [];
  25841. const validate2 = rule.required || !rule.required && source.hasOwnProperty(rule.field);
  25842. if (validate2) {
  25843. if (isEmptyValue(value2) && !rule.required) {
  25844. return callback();
  25845. }
  25846. rules.required(rule, value2, source, errors, options2);
  25847. if (value2 !== void 0) {
  25848. rules.type(rule, value2, source, errors, options2);
  25849. rules.range(rule, value2, source, errors, options2);
  25850. }
  25851. }
  25852. callback(errors);
  25853. }
  25854. function floatFn(rule, value2, callback, source, options2) {
  25855. const errors = [];
  25856. const validate2 = rule.required || !rule.required && source.hasOwnProperty(rule.field);
  25857. if (validate2) {
  25858. if (isEmptyValue(value2) && !rule.required) {
  25859. return callback();
  25860. }
  25861. rules.required(rule, value2, source, errors, options2);
  25862. if (value2 !== void 0) {
  25863. rules.type(rule, value2, source, errors, options2);
  25864. rules.range(rule, value2, source, errors, options2);
  25865. }
  25866. }
  25867. callback(errors);
  25868. }
  25869. function array2(rule, value2, callback, source, options2) {
  25870. const errors = [];
  25871. const validate2 = rule.required || !rule.required && source.hasOwnProperty(rule.field);
  25872. if (validate2) {
  25873. if (isEmptyValue(value2, "array") && !rule.required) {
  25874. return callback();
  25875. }
  25876. rules.required(rule, value2, source, errors, options2, "array");
  25877. if (!isEmptyValue(value2, "array")) {
  25878. rules.type(rule, value2, source, errors, options2);
  25879. rules.range(rule, value2, source, errors, options2);
  25880. }
  25881. }
  25882. callback(errors);
  25883. }
  25884. function object2(rule, value2, callback, source, options2) {
  25885. const errors = [];
  25886. const validate2 = rule.required || !rule.required && source.hasOwnProperty(rule.field);
  25887. if (validate2) {
  25888. if (isEmptyValue(value2) && !rule.required) {
  25889. return callback();
  25890. }
  25891. rules.required(rule, value2, source, errors, options2);
  25892. if (value2 !== void 0) {
  25893. rules.type(rule, value2, source, errors, options2);
  25894. }
  25895. }
  25896. callback(errors);
  25897. }
  25898. const ENUM$1 = "enum";
  25899. function enumerable$1(rule, value2, callback, source, options2) {
  25900. const errors = [];
  25901. const validate2 = rule.required || !rule.required && source.hasOwnProperty(rule.field);
  25902. if (validate2) {
  25903. if (isEmptyValue(value2) && !rule.required) {
  25904. return callback();
  25905. }
  25906. rules.required(rule, value2, source, errors, options2);
  25907. if (value2 !== void 0) {
  25908. rules[ENUM$1](rule, value2, source, errors, options2);
  25909. }
  25910. }
  25911. callback(errors);
  25912. }
  25913. function pattern$2(rule, value2, callback, source, options2) {
  25914. const errors = [];
  25915. const validate2 = rule.required || !rule.required && source.hasOwnProperty(rule.field);
  25916. if (validate2) {
  25917. if (isEmptyValue(value2, "string") && !rule.required) {
  25918. return callback();
  25919. }
  25920. rules.required(rule, value2, source, errors, options2);
  25921. if (!isEmptyValue(value2, "string")) {
  25922. rules.pattern(rule, value2, source, errors, options2);
  25923. }
  25924. }
  25925. callback(errors);
  25926. }
  25927. function date2(rule, value2, callback, source, options2) {
  25928. const errors = [];
  25929. const validate2 = rule.required || !rule.required && source.hasOwnProperty(rule.field);
  25930. if (validate2) {
  25931. if (isEmptyValue(value2) && !rule.required) {
  25932. return callback();
  25933. }
  25934. rules.required(rule, value2, source, errors, options2);
  25935. if (!isEmptyValue(value2)) {
  25936. let dateObject;
  25937. if (typeof value2 === "number") {
  25938. dateObject = new Date(value2);
  25939. } else {
  25940. dateObject = value2;
  25941. }
  25942. rules.type(rule, dateObject, source, errors, options2);
  25943. if (dateObject) {
  25944. rules.range(rule, dateObject.getTime(), source, errors, options2);
  25945. }
  25946. }
  25947. }
  25948. callback(errors);
  25949. }
  25950. function required$1(rule, value2, callback, source, options2) {
  25951. const errors = [];
  25952. const type2 = Array.isArray(value2) ? "array" : typeof value2;
  25953. rules.required(rule, value2, source, errors, options2, type2);
  25954. callback(errors);
  25955. }
  25956. function type$1(rule, value2, callback, source, options2) {
  25957. const ruleType = rule.type;
  25958. const errors = [];
  25959. const validate2 = rule.required || !rule.required && source.hasOwnProperty(rule.field);
  25960. if (validate2) {
  25961. if (isEmptyValue(value2, ruleType) && !rule.required) {
  25962. return callback();
  25963. }
  25964. rules.required(rule, value2, source, errors, options2, ruleType);
  25965. if (!isEmptyValue(value2, ruleType)) {
  25966. rules.type(rule, value2, source, errors, options2);
  25967. }
  25968. }
  25969. callback(errors);
  25970. }
  25971. function any(rule, value2, callback, source, options2) {
  25972. const errors = [];
  25973. const validate2 = rule.required || !rule.required && source.hasOwnProperty(rule.field);
  25974. if (validate2) {
  25975. if (isEmptyValue(value2) && !rule.required) {
  25976. return callback();
  25977. }
  25978. rules.required(rule, value2, source, errors, options2);
  25979. }
  25980. callback(errors);
  25981. }
  25982. const validators = {
  25983. string,
  25984. method: method2,
  25985. number: number2,
  25986. boolean: _boolean,
  25987. regexp: regexp2,
  25988. integer: integer2,
  25989. float: floatFn,
  25990. array: array2,
  25991. object: object2,
  25992. enum: enumerable$1,
  25993. pattern: pattern$2,
  25994. date: date2,
  25995. url: type$1,
  25996. hex: type$1,
  25997. email: type$1,
  25998. required: required$1,
  25999. any
  26000. };
  26001. function newMessages() {
  26002. return {
  26003. default: "Validation error on field %s",
  26004. required: "%s is required",
  26005. enum: "%s must be one of %s",
  26006. whitespace: "%s cannot be empty",
  26007. date: {
  26008. format: "%s date %s is invalid for format %s",
  26009. parse: "%s date could not be parsed, %s is invalid ",
  26010. invalid: "%s date %s is invalid"
  26011. },
  26012. types: {
  26013. string: "%s is not a %s",
  26014. method: "%s is not a %s (function)",
  26015. array: "%s is not an %s",
  26016. object: "%s is not an %s",
  26017. number: "%s is not a %s",
  26018. date: "%s is not a %s",
  26019. boolean: "%s is not a %s",
  26020. integer: "%s is not an %s",
  26021. float: "%s is not a %s",
  26022. regexp: "%s is not a valid %s",
  26023. email: "%s is not a valid %s",
  26024. url: "%s is not a valid %s",
  26025. hex: "%s is not a valid %s"
  26026. },
  26027. string: {
  26028. len: "%s must be exactly %s characters",
  26029. min: "%s must be at least %s characters",
  26030. max: "%s cannot be longer than %s characters",
  26031. range: "%s must be between %s and %s characters"
  26032. },
  26033. number: {
  26034. len: "%s must equal %s",
  26035. min: "%s cannot be less than %s",
  26036. max: "%s cannot be greater than %s",
  26037. range: "%s must be between %s and %s"
  26038. },
  26039. array: {
  26040. len: "%s must be exactly %s in length",
  26041. min: "%s cannot be less than %s in length",
  26042. max: "%s cannot be greater than %s in length",
  26043. range: "%s must be between %s and %s in length"
  26044. },
  26045. pattern: {
  26046. mismatch: "%s value %s does not match pattern %s"
  26047. },
  26048. clone: function clone2() {
  26049. const cloned = JSON.parse(JSON.stringify(this));
  26050. cloned.clone = this.clone;
  26051. return cloned;
  26052. }
  26053. };
  26054. }
  26055. const messages = newMessages();
  26056. function Schema(descriptor) {
  26057. this.rules = null;
  26058. this._messages = messages;
  26059. this.define(descriptor);
  26060. }
  26061. Schema.prototype = {
  26062. messages: function messages2(_messages) {
  26063. if (_messages) {
  26064. this._messages = deepMerge(newMessages(), _messages);
  26065. }
  26066. return this._messages;
  26067. },
  26068. define: function define(rules2) {
  26069. if (!rules2) {
  26070. throw new Error("Cannot configure a schema with no rules");
  26071. }
  26072. if (typeof rules2 !== "object" || Array.isArray(rules2)) {
  26073. throw new Error("Rules must be an object");
  26074. }
  26075. this.rules = {};
  26076. let z2;
  26077. let item;
  26078. for (z2 in rules2) {
  26079. if (rules2.hasOwnProperty(z2)) {
  26080. item = rules2[z2];
  26081. this.rules[z2] = Array.isArray(item) ? item : [item];
  26082. }
  26083. }
  26084. },
  26085. validate: function validate(source_, o2, oc) {
  26086. const _this = this;
  26087. if (o2 === void 0) {
  26088. o2 = {};
  26089. }
  26090. if (oc === void 0) {
  26091. oc = function oc2() {
  26092. };
  26093. }
  26094. let source = source_;
  26095. let options2 = o2;
  26096. let callback = oc;
  26097. if (typeof options2 === "function") {
  26098. callback = options2;
  26099. options2 = {};
  26100. }
  26101. if (!this.rules || Object.keys(this.rules).length === 0) {
  26102. if (callback) {
  26103. callback();
  26104. }
  26105. return Promise.resolve();
  26106. }
  26107. function complete(results) {
  26108. let i2;
  26109. let errors = [];
  26110. let fields = {};
  26111. function add2(e2) {
  26112. if (Array.isArray(e2)) {
  26113. let _errors;
  26114. errors = (_errors = errors).concat.apply(_errors, e2);
  26115. } else {
  26116. errors.push(e2);
  26117. }
  26118. }
  26119. for (i2 = 0; i2 < results.length; i2++) {
  26120. add2(results[i2]);
  26121. }
  26122. if (!errors.length) {
  26123. errors = null;
  26124. fields = null;
  26125. } else {
  26126. fields = convertFieldsError(errors);
  26127. }
  26128. callback(errors, fields);
  26129. }
  26130. if (options2.messages) {
  26131. let messages$12 = this.messages();
  26132. if (messages$12 === messages) {
  26133. messages$12 = newMessages();
  26134. }
  26135. deepMerge(messages$12, options2.messages);
  26136. options2.messages = messages$12;
  26137. } else {
  26138. options2.messages = this.messages();
  26139. }
  26140. let arr;
  26141. let value2;
  26142. const series = {};
  26143. const keys = options2.keys || Object.keys(this.rules);
  26144. keys.forEach((z2) => {
  26145. arr = _this.rules[z2];
  26146. value2 = source[z2];
  26147. arr.forEach((r2) => {
  26148. let rule = r2;
  26149. if (typeof rule.transform === "function") {
  26150. if (source === source_) {
  26151. source = { ...source };
  26152. }
  26153. value2 = source[z2] = rule.transform(value2);
  26154. }
  26155. if (typeof rule === "function") {
  26156. rule = {
  26157. validator: rule
  26158. };
  26159. } else {
  26160. rule = { ...rule };
  26161. }
  26162. rule.validator = _this.getValidationMethod(rule);
  26163. rule.field = z2;
  26164. rule.fullField = rule.fullField || z2;
  26165. rule.type = _this.getType(rule);
  26166. if (!rule.validator) {
  26167. return;
  26168. }
  26169. series[z2] = series[z2] || [];
  26170. series[z2].push({
  26171. rule,
  26172. value: value2,
  26173. source,
  26174. field: z2
  26175. });
  26176. });
  26177. });
  26178. const errorFields = {};
  26179. return asyncMap(series, options2, (data, doIt) => {
  26180. const { rule } = data;
  26181. let deep = (rule.type === "object" || rule.type === "array") && (typeof rule.fields === "object" || typeof rule.defaultField === "object");
  26182. deep = deep && (rule.required || !rule.required && data.value);
  26183. rule.field = data.field;
  26184. function addFullfield(key, schema) {
  26185. return { ...schema, fullField: `${rule.fullField}.${key}` };
  26186. }
  26187. function cb(e2) {
  26188. if (e2 === void 0) {
  26189. e2 = [];
  26190. }
  26191. let errors = e2;
  26192. if (!Array.isArray(errors)) {
  26193. errors = [errors];
  26194. }
  26195. if (!options2.suppressWarning && errors.length) {
  26196. Schema.warning("async-validator:", errors);
  26197. }
  26198. if (errors.length && rule.message) {
  26199. errors = [].concat(rule.message);
  26200. }
  26201. errors = errors.map(complementError(rule));
  26202. if (options2.first && errors.length) {
  26203. errorFields[rule.field] = 1;
  26204. return doIt(errors);
  26205. }
  26206. if (!deep) {
  26207. doIt(errors);
  26208. } else {
  26209. if (rule.required && !data.value) {
  26210. if (rule.message) {
  26211. errors = [].concat(rule.message).map(complementError(rule));
  26212. } else if (options2.error) {
  26213. errors = [options2.error(rule, format(options2.messages.required, rule.field))];
  26214. } else {
  26215. errors = [];
  26216. }
  26217. return doIt(errors);
  26218. }
  26219. let fieldsSchema = {};
  26220. if (rule.defaultField) {
  26221. for (const k2 in data.value) {
  26222. if (data.value.hasOwnProperty(k2)) {
  26223. fieldsSchema[k2] = rule.defaultField;
  26224. }
  26225. }
  26226. }
  26227. fieldsSchema = { ...fieldsSchema, ...data.rule.fields };
  26228. for (const f2 in fieldsSchema) {
  26229. if (fieldsSchema.hasOwnProperty(f2)) {
  26230. const fieldSchema = Array.isArray(fieldsSchema[f2]) ? fieldsSchema[f2] : [fieldsSchema[f2]];
  26231. fieldsSchema[f2] = fieldSchema.map(addFullfield.bind(null, f2));
  26232. }
  26233. }
  26234. const schema = new Schema(fieldsSchema);
  26235. schema.messages(options2.messages);
  26236. if (data.rule.options) {
  26237. data.rule.options.messages = options2.messages;
  26238. data.rule.options.error = options2.error;
  26239. }
  26240. schema.validate(data.value, data.rule.options || options2, (errs) => {
  26241. const finalErrors = [];
  26242. if (errors && errors.length) {
  26243. finalErrors.push.apply(finalErrors, errors);
  26244. }
  26245. if (errs && errs.length) {
  26246. finalErrors.push.apply(finalErrors, errs);
  26247. }
  26248. doIt(finalErrors.length ? finalErrors : null);
  26249. });
  26250. }
  26251. }
  26252. let res;
  26253. if (rule.asyncValidator) {
  26254. res = rule.asyncValidator(rule, data.value, cb, data.source, options2);
  26255. } else if (rule.validator) {
  26256. res = rule.validator(rule, data.value, cb, data.source, options2);
  26257. if (res === true) {
  26258. cb();
  26259. } else if (res === false) {
  26260. cb(rule.message || `${rule.field} fails`);
  26261. } else if (res instanceof Array) {
  26262. cb(res);
  26263. } else if (res instanceof Error) {
  26264. cb(res.message);
  26265. }
  26266. }
  26267. if (res && res.then) {
  26268. res.then(() => cb(), (e2) => cb(e2));
  26269. }
  26270. }, (results) => {
  26271. complete(results);
  26272. });
  26273. },
  26274. getType: function getType(rule) {
  26275. if (rule.type === void 0 && rule.pattern instanceof RegExp) {
  26276. rule.type = "pattern";
  26277. }
  26278. if (typeof rule.validator !== "function" && rule.type && !validators.hasOwnProperty(rule.type)) {
  26279. throw new Error(format("Unknown rule type %s", rule.type));
  26280. }
  26281. return rule.type || "string";
  26282. },
  26283. getValidationMethod: function getValidationMethod(rule) {
  26284. if (typeof rule.validator === "function") {
  26285. return rule.validator;
  26286. }
  26287. const keys = Object.keys(rule);
  26288. const messageIndex = keys.indexOf("message");
  26289. if (messageIndex !== -1) {
  26290. keys.splice(messageIndex, 1);
  26291. }
  26292. if (keys.length === 1 && keys[0] === "required") {
  26293. return validators.required;
  26294. }
  26295. return validators[this.getType(rule)] || false;
  26296. }
  26297. };
  26298. Schema.register = function register(type2, validator) {
  26299. if (typeof validator !== "function") {
  26300. throw new Error("Cannot register a validator by type, validator is not a function");
  26301. }
  26302. validators[type2] = validator;
  26303. };
  26304. Schema.warning = warning;
  26305. Schema.messages = messages;
  26306. Schema.warning = function() {
  26307. };
  26308. const _sfc_main$1o = {
  26309. name: "u-form",
  26310. mixins: [mpMixin, mixin, props$V],
  26311. provide() {
  26312. return {
  26313. uForm: this
  26314. };
  26315. },
  26316. data() {
  26317. return {
  26318. formRules: {},
  26319. // 规则校验器
  26320. validator: {},
  26321. // 原始的model快照,用于resetFields方法重置表单时使用
  26322. originalModel: null
  26323. };
  26324. },
  26325. watch: {
  26326. // 监听规则的变化
  26327. rules: {
  26328. immediate: true,
  26329. handler(n2) {
  26330. this.setRules(n2);
  26331. }
  26332. },
  26333. // 监听属性的变化,通知子组件u-form-item重新获取信息
  26334. propsChange(n2) {
  26335. var _a2;
  26336. if ((_a2 = this.children) == null ? void 0 : _a2.length) {
  26337. this.children.map((child) => {
  26338. typeof child.updateParentData == "function" && child.updateParentData();
  26339. });
  26340. }
  26341. },
  26342. // 监听model的初始值作为重置表单的快照
  26343. model: {
  26344. immediate: true,
  26345. handler(n2) {
  26346. if (!this.originalModel) {
  26347. this.originalModel = deepClone(n2);
  26348. }
  26349. }
  26350. }
  26351. },
  26352. computed: {
  26353. propsChange() {
  26354. return [
  26355. this.errorType,
  26356. this.borderBottom,
  26357. this.labelPosition,
  26358. this.labelWidth,
  26359. this.labelAlign,
  26360. this.labelStyle
  26361. ];
  26362. }
  26363. },
  26364. created() {
  26365. this.children = [];
  26366. },
  26367. methods: {
  26368. // 手动设置校验的规则,如果规则中有函数的话,微信小程序中会过滤掉,所以只能手动调用设置规则
  26369. setRules(rules2) {
  26370. if (Object.keys(rules2).length === 0)
  26371. return;
  26372. if (Object.keys(this.model).length === 0) {
  26373. error("设置rules,model必须设置!如果已经设置,请刷新页面。");
  26374. return;
  26375. }
  26376. this.formRules = rules2;
  26377. this.validator = new Schema(rules2);
  26378. },
  26379. // 清空所有u-form-item组件的内容,本质上是调用了u-form-item组件中的resetField()方法
  26380. resetFields() {
  26381. this.resetModel();
  26382. },
  26383. // 重置model为初始值的快照
  26384. resetModel(obj) {
  26385. this.children.map((child) => {
  26386. const prop = child == null ? void 0 : child.prop;
  26387. const value2 = getProperty(this.originalModel, prop);
  26388. setProperty(this.model, prop, value2);
  26389. });
  26390. },
  26391. // 清空校验结果
  26392. clearValidate(props2) {
  26393. props2 = [].concat(props2);
  26394. this.children.map((child) => {
  26395. if (props2[0] === void 0 || props2.includes(child.prop)) {
  26396. child.message = null;
  26397. }
  26398. });
  26399. },
  26400. // 对部分表单字段进行校验
  26401. async validateField(value2, callback, event = null, options2) {
  26402. this.$nextTick(() => {
  26403. const errorsRes = [];
  26404. value2 = [].concat(value2);
  26405. let promises = this.children.map((child) => {
  26406. return new Promise((resolve, reject) => {
  26407. const childErrors = [];
  26408. if (value2.includes(child.prop)) {
  26409. const propertyVal = getProperty(
  26410. this.model,
  26411. child.prop
  26412. );
  26413. const propertyChain = child.prop.split(".");
  26414. const propertyName = propertyChain[propertyChain.length - 1];
  26415. let rule = [];
  26416. if (child.itemRules && child.itemRules.length > 0) {
  26417. rule = child.itemRules;
  26418. } else {
  26419. rule = this.formRules[child.prop];
  26420. }
  26421. if (!rule) {
  26422. resolve();
  26423. return;
  26424. }
  26425. const rules2 = [].concat(rule);
  26426. if (!rules2.length) {
  26427. resolve();
  26428. }
  26429. for (let i2 = 0; i2 < rules2.length; i2++) {
  26430. const ruleItem = rules2[i2];
  26431. const trigger = [].concat(ruleItem == null ? void 0 : ruleItem.trigger);
  26432. if (event && !trigger.includes(event)) {
  26433. resolve();
  26434. continue;
  26435. }
  26436. const validator = new Schema({
  26437. [propertyName]: ruleItem
  26438. });
  26439. validator.validate(
  26440. {
  26441. [propertyName]: propertyVal
  26442. },
  26443. (errors, fields) => {
  26444. var _a2;
  26445. if (test.array(errors)) {
  26446. errors.forEach((element) => {
  26447. element.prop = child.prop;
  26448. });
  26449. errorsRes.push(...errors);
  26450. childErrors.push(...errors);
  26451. }
  26452. if (!options2 || (options2 == null ? void 0 : options2.showErrorMsg) == true) {
  26453. child.message = ((_a2 = childErrors[0]) == null ? void 0 : _a2.message) ? childErrors[0].message : null;
  26454. }
  26455. if (i2 == rules2.length - 1) {
  26456. resolve(errorsRes);
  26457. }
  26458. }
  26459. );
  26460. }
  26461. } else {
  26462. resolve({});
  26463. }
  26464. });
  26465. });
  26466. Promise.all(promises).then((results) => {
  26467. typeof callback === "function" && callback(errorsRes);
  26468. }).catch((error2) => {
  26469. formatAppLog("error", "at uni_modules/uview-plus/components/u-form/u-form.vue:218", "An error occurred:", error2);
  26470. });
  26471. });
  26472. },
  26473. /**
  26474. * 校验全部数据
  26475. * @param {Object} options
  26476. * @param {Boolean} options.showErrorMsg -是否显示校验信息,
  26477. */
  26478. validate(options2) {
  26479. if (Object.keys(this.formRules).length === 0) {
  26480. error("未设置rules,请看文档说明!如果已经设置,请刷新页面。");
  26481. return;
  26482. }
  26483. return new Promise((resolve, reject) => {
  26484. this.$nextTick(() => {
  26485. const formItemProps = this.children.map(
  26486. (item) => item.prop
  26487. );
  26488. this.validateField(formItemProps, (errors) => {
  26489. if (errors.length) {
  26490. this.errorType === "toast" && toast(errors[0].message);
  26491. reject(errors);
  26492. } else {
  26493. resolve(true);
  26494. }
  26495. }, null, options2);
  26496. });
  26497. });
  26498. }
  26499. }
  26500. };
  26501. function _sfc_render$1n(_ctx, _cache, $props, $setup, $data, $options) {
  26502. return vue.openBlock(), vue.createElementBlock("view", { class: "u-form" }, [
  26503. vue.renderSlot(_ctx.$slots, "default")
  26504. ]);
  26505. }
  26506. const uForm = /* @__PURE__ */ _export_sfc(_sfc_main$1o, [["render", _sfc_render$1n], ["__file", "C:/Users/EDY/Desktop/项目/shuibei/uni_modules/uview-plus/components/u-form/u-form.vue"]]);
  26507. const __vite_glob_0_42 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
  26508. __proto__: null,
  26509. default: uForm
  26510. }, Symbol.toStringTag, { value: "Module" }));
  26511. const props$U = defineMixin({
  26512. props: {
  26513. // 宫格的name
  26514. name: {
  26515. type: [String, Number, null],
  26516. default: () => props$1x.gridItem.name
  26517. },
  26518. // 背景颜色
  26519. bgColor: {
  26520. type: String,
  26521. default: () => props$1x.gridItem.bgColor
  26522. }
  26523. }
  26524. });
  26525. const _sfc_main$1n = {
  26526. name: "u-grid-item",
  26527. mixins: [mpMixin, mixin, props$U],
  26528. data() {
  26529. return {
  26530. parentData: {
  26531. col: 0,
  26532. // 父组件划分的宫格数
  26533. border: true
  26534. // 是否显示边框,根据父组件决定
  26535. },
  26536. classes: []
  26537. // 类名集合,用于判断是否显示右边和下边框
  26538. };
  26539. },
  26540. mounted() {
  26541. this.init();
  26542. },
  26543. emits: ["click"],
  26544. // 微信小程序中 options 选项
  26545. computed: {
  26546. itemStyle() {
  26547. const style = {
  26548. background: this.bgColor
  26549. };
  26550. style["width"] = "100%";
  26551. return deepMerge$1(style, addStyle(this.customStyle));
  26552. }
  26553. },
  26554. methods: {
  26555. init() {
  26556. uni.$on("$uGridItem", () => {
  26557. this.gridItemClasses();
  26558. });
  26559. this.updateParentData();
  26560. uni.$emit("$uGridItem");
  26561. this.gridItemClasses();
  26562. },
  26563. // 获取父组件的参数
  26564. updateParentData() {
  26565. this.getParentData("u-grid");
  26566. },
  26567. clickHandler() {
  26568. var _a2;
  26569. let name2 = this.name;
  26570. const children = (_a2 = this.parent) == null ? void 0 : _a2.children;
  26571. if (children && this.name === null) {
  26572. name2 = children.findIndex((child) => child === this);
  26573. }
  26574. this.parent && this.parent.childClick(name2);
  26575. this.$emit("click", name2);
  26576. },
  26577. async getItemWidth() {
  26578. let width = 0;
  26579. if (this.parent) {
  26580. const parentWidth = await this.getParentWidth();
  26581. width = parentWidth / Number(this.parentData.col) + "px";
  26582. }
  26583. this.width = width;
  26584. },
  26585. // 获取父元素的尺寸
  26586. getParentWidth() {
  26587. },
  26588. gridItemClasses() {
  26589. if (this.parentData.border) {
  26590. let classes = [];
  26591. this.parent.children.map((child, index2) => {
  26592. if (this === child) {
  26593. const len = this.parent.children.length;
  26594. if ((index2 + 1) % this.parentData.col !== 0 && index2 + 1 !== len) {
  26595. classes.push("u-border-right");
  26596. }
  26597. const lessNum = len % this.parentData.col === 0 ? this.parentData.col : len % this.parentData.col;
  26598. if (index2 < len - lessNum) {
  26599. classes.push("u-border-bottom");
  26600. }
  26601. }
  26602. });
  26603. this.classes = classes;
  26604. }
  26605. }
  26606. },
  26607. beforeUnmount() {
  26608. uni.$off("$uGridItem");
  26609. }
  26610. };
  26611. function _sfc_render$1m(_ctx, _cache, $props, $setup, $data, $options) {
  26612. return $data.parentData.col > 0 ? (vue.openBlock(), vue.createElementBlock(
  26613. "view",
  26614. {
  26615. key: 0,
  26616. class: vue.normalizeClass(["u-grid-item", $data.classes]),
  26617. "hover-class": "u-grid-item--hover-class",
  26618. "hover-stay-time": 200,
  26619. onClick: _cache[0] || (_cache[0] = (...args) => $options.clickHandler && $options.clickHandler(...args)),
  26620. style: vue.normalizeStyle([$options.itemStyle])
  26621. },
  26622. [
  26623. vue.renderSlot(_ctx.$slots, "default", {}, void 0, true)
  26624. ],
  26625. 6
  26626. /* CLASS, STYLE */
  26627. )) : vue.createCommentVNode("v-if", true);
  26628. }
  26629. const uGridItem = /* @__PURE__ */ _export_sfc(_sfc_main$1n, [["render", _sfc_render$1m], ["__scopeId", "data-v-0a78094b"], ["__file", "C:/Users/EDY/Desktop/项目/shuibei/uni_modules/uview-plus/components/u-grid-item/u-grid-item.vue"]]);
  26630. const __vite_glob_0_44 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
  26631. __proto__: null,
  26632. default: uGridItem
  26633. }, Symbol.toStringTag, { value: "Module" }));
  26634. const props$T = defineMixin({
  26635. props: {
  26636. // 分成几列
  26637. col: {
  26638. type: [String, Number],
  26639. default: () => props$1x.grid.col
  26640. },
  26641. // 是否显示边框
  26642. border: {
  26643. type: Boolean,
  26644. default: () => props$1x.grid.border
  26645. },
  26646. // 宫格对齐方式,表现为数量少的时候,靠左,居中,还是靠右
  26647. align: {
  26648. type: String,
  26649. default: () => props$1x.grid.align
  26650. },
  26651. // 间隔
  26652. gap: {
  26653. type: String,
  26654. default: "0px"
  26655. }
  26656. }
  26657. });
  26658. const _sfc_main$1m = {
  26659. name: "u-grid",
  26660. mixins: [mpMixin, mixin, props$T],
  26661. data() {
  26662. return {
  26663. index: 0,
  26664. width: 0
  26665. };
  26666. },
  26667. watch: {
  26668. // 当父组件需要子组件需要共享的参数发生了变化,手动通知子组件
  26669. parentData() {
  26670. if (this.children.length) {
  26671. this.children.map((child) => {
  26672. typeof child.updateParentData == "function" && child.updateParentData();
  26673. });
  26674. }
  26675. }
  26676. },
  26677. created() {
  26678. this.children = [];
  26679. },
  26680. computed: {
  26681. // 计算父组件的值是否发生变化
  26682. parentData() {
  26683. return [this.hoverClass, this.col, this.size, this.border];
  26684. },
  26685. // 宫格对齐方式
  26686. gridStyle() {
  26687. let style = {};
  26688. switch (this.align) {
  26689. case "left":
  26690. style.justifyContent = "flex-start";
  26691. break;
  26692. case "center":
  26693. style.justifyContent = "center";
  26694. break;
  26695. case "right":
  26696. style.justifyContent = "flex-end";
  26697. break;
  26698. default:
  26699. style.justifyContent = "flex-start";
  26700. }
  26701. return deepMerge$1(style, addStyle(this.customStyle));
  26702. }
  26703. },
  26704. emits: ["click"],
  26705. // 防止事件执行两次
  26706. // 20240409发现抖音小程序如果开启virtualHost会出现严重问题,几乎所有事件包括created等生命周期事件全部失效。
  26707. methods: {
  26708. // 此方法由u-grid-item触发,用于在u-grid发出事件
  26709. childClick(name2) {
  26710. this.$emit("click", name2);
  26711. }
  26712. }
  26713. };
  26714. const __injectCSSVars__ = () => {
  26715. vue.useCssVars((_ctx) => ({
  26716. "10b668c8-gap": _ctx.gap,
  26717. "10b668c8-col": _ctx.col
  26718. }));
  26719. };
  26720. const __setup__ = _sfc_main$1m.setup;
  26721. _sfc_main$1m.setup = __setup__ ? (props2, ctx) => {
  26722. __injectCSSVars__();
  26723. return __setup__(props2, ctx);
  26724. } : __injectCSSVars__;
  26725. function _sfc_render$1l(_ctx, _cache, $props, $setup, $data, $options) {
  26726. return vue.openBlock(), vue.createElementBlock(
  26727. "view",
  26728. {
  26729. class: "u-grid",
  26730. ref: "u-grid",
  26731. style: vue.normalizeStyle([$options.gridStyle])
  26732. },
  26733. [
  26734. vue.renderSlot(_ctx.$slots, "default", {}, void 0, true)
  26735. ],
  26736. 4
  26737. /* STYLE */
  26738. );
  26739. }
  26740. const uGrid = /* @__PURE__ */ _export_sfc(_sfc_main$1m, [["render", _sfc_render$1l], ["__scopeId", "data-v-10b668c8"], ["__file", "C:/Users/EDY/Desktop/项目/shuibei/uni_modules/uview-plus/components/u-grid/u-grid.vue"]]);
  26741. const __vite_glob_0_45 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
  26742. __proto__: null,
  26743. default: uGrid
  26744. }, Symbol.toStringTag, { value: "Module" }));
  26745. const icons = {
  26746. "uicon-level": "",
  26747. "uicon-column-line": "",
  26748. "uicon-checkbox-mark": "",
  26749. "uicon-folder": "",
  26750. "uicon-movie": "",
  26751. "uicon-star-fill": "",
  26752. "uicon-star": "",
  26753. "uicon-phone-fill": "",
  26754. "uicon-phone": "",
  26755. "uicon-apple-fill": "",
  26756. "uicon-chrome-circle-fill": "",
  26757. "uicon-backspace": "",
  26758. "uicon-attach": "",
  26759. "uicon-cut": "",
  26760. "uicon-empty-car": "",
  26761. "uicon-empty-coupon": "",
  26762. "uicon-empty-address": "",
  26763. "uicon-empty-favor": "",
  26764. "uicon-empty-permission": "",
  26765. "uicon-empty-news": "",
  26766. "uicon-empty-search": "",
  26767. "uicon-github-circle-fill": "",
  26768. "uicon-rmb": "",
  26769. "uicon-person-delete-fill": "",
  26770. "uicon-reload": "",
  26771. "uicon-order": "",
  26772. "uicon-server-man": "",
  26773. "uicon-search": "",
  26774. "uicon-fingerprint": "",
  26775. "uicon-more-dot-fill": "",
  26776. "uicon-scan": "",
  26777. "uicon-share-square": "",
  26778. "uicon-map": "",
  26779. "uicon-map-fill": "",
  26780. "uicon-tags": "",
  26781. "uicon-tags-fill": "",
  26782. "uicon-bookmark-fill": "",
  26783. "uicon-bookmark": "",
  26784. "uicon-eye": "",
  26785. "uicon-eye-fill": "",
  26786. "uicon-mic": "",
  26787. "uicon-mic-off": "",
  26788. "uicon-calendar": "",
  26789. "uicon-calendar-fill": "",
  26790. "uicon-trash": "",
  26791. "uicon-trash-fill": "",
  26792. "uicon-play-left": "",
  26793. "uicon-play-right": "",
  26794. "uicon-minus": "",
  26795. "uicon-plus": "",
  26796. "uicon-info": "",
  26797. "uicon-info-circle": "",
  26798. "uicon-info-circle-fill": "",
  26799. "uicon-question": "",
  26800. "uicon-error": "",
  26801. "uicon-close": "",
  26802. "uicon-checkmark": "",
  26803. "uicon-android-circle-fill": "",
  26804. "uicon-android-fill": "",
  26805. "uicon-ie": "",
  26806. "uicon-IE-circle-fill": "",
  26807. "uicon-google": "",
  26808. "uicon-google-circle-fill": "",
  26809. "uicon-setting-fill": "",
  26810. "uicon-setting": "",
  26811. "uicon-minus-square-fill": "",
  26812. "uicon-plus-square-fill": "",
  26813. "uicon-heart": "",
  26814. "uicon-heart-fill": "",
  26815. "uicon-camera": "",
  26816. "uicon-camera-fill": "",
  26817. "uicon-more-circle": "",
  26818. "uicon-more-circle-fill": "",
  26819. "uicon-chat": "",
  26820. "uicon-chat-fill": "",
  26821. "uicon-bag-fill": "",
  26822. "uicon-bag": "",
  26823. "uicon-error-circle-fill": "",
  26824. "uicon-error-circle": "",
  26825. "uicon-close-circle": "",
  26826. "uicon-close-circle-fill": "",
  26827. "uicon-checkmark-circle": "",
  26828. "uicon-checkmark-circle-fill": "",
  26829. "uicon-question-circle-fill": "",
  26830. "uicon-question-circle": "",
  26831. "uicon-share": "",
  26832. "uicon-share-fill": "",
  26833. "uicon-shopping-cart": "",
  26834. "uicon-shopping-cart-fill": "",
  26835. "uicon-bell": "",
  26836. "uicon-bell-fill": "",
  26837. "uicon-list": "",
  26838. "uicon-list-dot": "",
  26839. "uicon-zhihu": "",
  26840. "uicon-zhihu-circle-fill": "",
  26841. "uicon-zhifubao": "",
  26842. "uicon-zhifubao-circle-fill": "",
  26843. "uicon-weixin-circle-fill": "",
  26844. "uicon-weixin-fill": "",
  26845. "uicon-twitter-circle-fill": "",
  26846. "uicon-twitter": "",
  26847. "uicon-taobao-circle-fill": "",
  26848. "uicon-taobao": "",
  26849. "uicon-weibo-circle-fill": "",
  26850. "uicon-weibo": "",
  26851. "uicon-qq-fill": "",
  26852. "uicon-qq-circle-fill": "",
  26853. "uicon-moments-circel-fill": "",
  26854. "uicon-moments": "",
  26855. "uicon-qzone": "",
  26856. "uicon-qzone-circle-fill": "",
  26857. "uicon-baidu-circle-fill": "",
  26858. "uicon-baidu": "",
  26859. "uicon-facebook-circle-fill": "",
  26860. "uicon-facebook": "",
  26861. "uicon-car": "",
  26862. "uicon-car-fill": "",
  26863. "uicon-warning-fill": "",
  26864. "uicon-warning": "",
  26865. "uicon-clock-fill": "",
  26866. "uicon-clock": "",
  26867. "uicon-edit-pen": "",
  26868. "uicon-edit-pen-fill": "",
  26869. "uicon-email": "",
  26870. "uicon-email-fill": "",
  26871. "uicon-minus-circle": "",
  26872. "uicon-minus-circle-fill": "",
  26873. "uicon-plus-circle": "",
  26874. "uicon-plus-circle-fill": "",
  26875. "uicon-file-text": "",
  26876. "uicon-file-text-fill": "",
  26877. "uicon-pushpin": "",
  26878. "uicon-pushpin-fill": "",
  26879. "uicon-grid": "",
  26880. "uicon-grid-fill": "",
  26881. "uicon-play-circle": "",
  26882. "uicon-play-circle-fill": "",
  26883. "uicon-pause-circle-fill": "",
  26884. "uicon-pause": "",
  26885. "uicon-pause-circle": "",
  26886. "uicon-eye-off": "",
  26887. "uicon-eye-off-outline": "",
  26888. "uicon-gift-fill": "",
  26889. "uicon-gift": "",
  26890. "uicon-rmb-circle-fill": "",
  26891. "uicon-rmb-circle": "",
  26892. "uicon-kefu-ermai": "",
  26893. "uicon-server-fill": "",
  26894. "uicon-coupon-fill": "",
  26895. "uicon-coupon": "",
  26896. "uicon-integral": "",
  26897. "uicon-integral-fill": "",
  26898. "uicon-home-fill": "",
  26899. "uicon-home": "",
  26900. "uicon-hourglass-half-fill": "",
  26901. "uicon-hourglass": "",
  26902. "uicon-account": "",
  26903. "uicon-plus-people-fill": "",
  26904. "uicon-minus-people-fill": "",
  26905. "uicon-account-fill": "",
  26906. "uicon-thumb-down-fill": "",
  26907. "uicon-thumb-down": "",
  26908. "uicon-thumb-up": "",
  26909. "uicon-thumb-up-fill": "",
  26910. "uicon-lock-fill": "",
  26911. "uicon-lock-open": "",
  26912. "uicon-lock-opened-fill": "",
  26913. "uicon-lock": "",
  26914. "uicon-red-packet-fill": "",
  26915. "uicon-photo-fill": "",
  26916. "uicon-photo": "",
  26917. "uicon-volume-off-fill": "",
  26918. "uicon-volume-off": "",
  26919. "uicon-volume-fill": "",
  26920. "uicon-volume": "",
  26921. "uicon-red-packet": "",
  26922. "uicon-download": "",
  26923. "uicon-arrow-up-fill": "",
  26924. "uicon-arrow-down-fill": "",
  26925. "uicon-play-left-fill": "",
  26926. "uicon-play-right-fill": "",
  26927. "uicon-rewind-left-fill": "",
  26928. "uicon-rewind-right-fill": "",
  26929. "uicon-arrow-downward": "",
  26930. "uicon-arrow-leftward": "",
  26931. "uicon-arrow-rightward": "",
  26932. "uicon-arrow-upward": "",
  26933. "uicon-arrow-down": "",
  26934. "uicon-arrow-right": "",
  26935. "uicon-arrow-left": "",
  26936. "uicon-arrow-up": "",
  26937. "uicon-skip-back-left": "",
  26938. "uicon-skip-forward-right": "",
  26939. "uicon-rewind-right": "",
  26940. "uicon-rewind-left": "",
  26941. "uicon-arrow-right-double": "",
  26942. "uicon-arrow-left-double": "",
  26943. "uicon-wifi-off": "",
  26944. "uicon-wifi": "",
  26945. "uicon-empty-data": "",
  26946. "uicon-empty-history": "",
  26947. "uicon-empty-list": "",
  26948. "uicon-empty-page": "",
  26949. "uicon-empty-order": "",
  26950. "uicon-man": "",
  26951. "uicon-woman": "",
  26952. "uicon-man-add": "",
  26953. "uicon-man-add-fill": "",
  26954. "uicon-man-delete": "",
  26955. "uicon-man-delete-fill": "",
  26956. "uicon-zh": "",
  26957. "uicon-en": ""
  26958. };
  26959. const props$S = defineMixin({
  26960. props: {
  26961. // 图标类名
  26962. name: {
  26963. type: String,
  26964. default: () => props$1x.icon.name
  26965. },
  26966. // 图标颜色,可接受主题色
  26967. color: {
  26968. type: String,
  26969. default: () => props$1x.icon.color
  26970. },
  26971. // 字体大小,单位px
  26972. size: {
  26973. type: [String, Number],
  26974. default: () => props$1x.icon.size
  26975. },
  26976. // 是否显示粗体
  26977. bold: {
  26978. type: Boolean,
  26979. default: () => props$1x.icon.bold
  26980. },
  26981. // 点击图标的时候传递事件出去的index(用于区分点击了哪一个)
  26982. index: {
  26983. type: [String, Number],
  26984. default: () => props$1x.icon.index
  26985. },
  26986. // 触摸图标时的类名
  26987. hoverClass: {
  26988. type: String,
  26989. default: () => props$1x.icon.hoverClass
  26990. },
  26991. // 自定义扩展前缀,方便用户扩展自己的图标库
  26992. customPrefix: {
  26993. type: String,
  26994. default: () => props$1x.icon.customPrefix
  26995. },
  26996. // 图标右边或者下面的文字
  26997. label: {
  26998. type: [String, Number],
  26999. default: () => props$1x.icon.label
  27000. },
  27001. // label的位置,只能右边或者下边
  27002. labelPos: {
  27003. type: String,
  27004. default: () => props$1x.icon.labelPos
  27005. },
  27006. // label的大小
  27007. labelSize: {
  27008. type: [String, Number],
  27009. default: () => props$1x.icon.labelSize
  27010. },
  27011. // label的颜色
  27012. labelColor: {
  27013. type: String,
  27014. default: () => props$1x.icon.labelColor
  27015. },
  27016. // label与图标的距离
  27017. space: {
  27018. type: [String, Number],
  27019. default: () => props$1x.icon.space
  27020. },
  27021. // 图片的mode
  27022. imgMode: {
  27023. type: String,
  27024. default: () => props$1x.icon.imgMode
  27025. },
  27026. // 用于显示图片小图标时,图片的宽度
  27027. width: {
  27028. type: [String, Number],
  27029. default: () => props$1x.icon.width
  27030. },
  27031. // 用于显示图片小图标时,图片的高度
  27032. height: {
  27033. type: [String, Number],
  27034. default: () => props$1x.icon.height
  27035. },
  27036. // 用于解决某些情况下,让图标垂直居中的用途
  27037. top: {
  27038. type: [String, Number],
  27039. default: () => props$1x.icon.top
  27040. },
  27041. // 是否阻止事件传播
  27042. stop: {
  27043. type: Boolean,
  27044. default: () => props$1x.icon.stop
  27045. }
  27046. }
  27047. });
  27048. let params = {
  27049. loaded: false
  27050. };
  27051. const loadFont = () => {
  27052. if (config$1.loadFontOnce) {
  27053. params.loaded = true;
  27054. }
  27055. uni.loadFontFace({
  27056. global: true,
  27057. // 是否全局生效。微信小程序 '2.10.0'起支持全局生效,需在 app.vue 中调用。
  27058. family: "uicon-iconfont",
  27059. source: 'url("' + config$1.iconUrl + '")',
  27060. success() {
  27061. },
  27062. fail() {
  27063. }
  27064. });
  27065. if (config$1.customIcon.family) {
  27066. uni.loadFontFace({
  27067. global: true,
  27068. // 是否全局生效。微信小程序 '2.10.0'起支持全局生效,需在 app.vue 中调用。
  27069. family: config$1.customIcon.family,
  27070. source: 'url("' + config$1.customIcon.url + '")',
  27071. success() {
  27072. },
  27073. fail() {
  27074. }
  27075. });
  27076. }
  27077. return true;
  27078. };
  27079. const fontUtil = {
  27080. params,
  27081. loadFont
  27082. };
  27083. const _sfc_main$1l = {
  27084. name: "u-icon",
  27085. beforeCreate() {
  27086. if (!fontUtil.params.loaded) {
  27087. fontUtil.loadFont();
  27088. }
  27089. },
  27090. data() {
  27091. return {};
  27092. },
  27093. emits: ["click"],
  27094. mixins: [mpMixin, mixin, props$S],
  27095. computed: {
  27096. uClasses() {
  27097. let classes = [];
  27098. classes.push(this.customPrefix + "-" + this.name);
  27099. if (this.customPrefix == "uicon") {
  27100. classes.push("u-iconfont");
  27101. } else {
  27102. classes.push(this.customPrefix);
  27103. }
  27104. if (this.color && config$1.type.includes(this.color))
  27105. classes.push("u-icon__icon--" + this.color);
  27106. return classes;
  27107. },
  27108. iconStyle() {
  27109. let style = {};
  27110. style = {
  27111. fontSize: addUnit(this.size),
  27112. lineHeight: addUnit(this.size),
  27113. fontWeight: this.bold ? "bold" : "normal",
  27114. // 某些特殊情况需要设置一个到顶部的距离,才能更好的垂直居中
  27115. top: addUnit(this.top)
  27116. };
  27117. if (this.customPrefix !== "uicon") {
  27118. style.fontFamily = this.customPrefix;
  27119. }
  27120. if (this.color && !config$1.type.includes(this.color))
  27121. style.color = this.color;
  27122. return style;
  27123. },
  27124. // 判断传入的name属性,是否图片路径,只要带有"/"均认为是图片形式
  27125. isImg() {
  27126. return this.name.indexOf("/") !== -1;
  27127. },
  27128. imgStyle() {
  27129. let style = {};
  27130. style.width = this.width ? addUnit(this.width) : addUnit(this.size);
  27131. style.height = this.height ? addUnit(this.height) : addUnit(this.size);
  27132. return style;
  27133. },
  27134. // 通过图标名,查找对应的图标
  27135. icon() {
  27136. if (this.customPrefix !== "uicon") {
  27137. return config$1.customIcons[this.name] || this.name;
  27138. }
  27139. return icons["uicon-" + this.name] || this.name;
  27140. }
  27141. },
  27142. methods: {
  27143. addStyle,
  27144. addUnit,
  27145. clickHandler(e2) {
  27146. this.$emit("click", this.index, e2);
  27147. this.stop && this.preventEvent(e2);
  27148. }
  27149. }
  27150. };
  27151. function _sfc_render$1k(_ctx, _cache, $props, $setup, $data, $options) {
  27152. return vue.openBlock(), vue.createElementBlock(
  27153. "view",
  27154. {
  27155. class: vue.normalizeClass(["u-icon", ["u-icon--" + _ctx.labelPos]]),
  27156. onClick: _cache[0] || (_cache[0] = (...args) => $options.clickHandler && $options.clickHandler(...args))
  27157. },
  27158. [
  27159. $options.isImg ? (vue.openBlock(), vue.createElementBlock("image", {
  27160. key: 0,
  27161. class: "u-icon__img",
  27162. src: _ctx.name,
  27163. mode: _ctx.imgMode,
  27164. style: vue.normalizeStyle([$options.imgStyle, $options.addStyle(_ctx.customStyle)])
  27165. }, null, 12, ["src", "mode"])) : (vue.openBlock(), vue.createElementBlock("text", {
  27166. key: 1,
  27167. class: vue.normalizeClass(["u-icon__icon", $options.uClasses]),
  27168. style: vue.normalizeStyle([$options.iconStyle, $options.addStyle(_ctx.customStyle)]),
  27169. "hover-class": _ctx.hoverClass
  27170. }, vue.toDisplayString($options.icon), 15, ["hover-class"])),
  27171. vue.createCommentVNode(' 这里进行空字符串判断,如果仅仅是v-if="label",可能会出现传递0的时候,结果也无法显示 '),
  27172. _ctx.label !== "" ? (vue.openBlock(), vue.createElementBlock(
  27173. "text",
  27174. {
  27175. key: 2,
  27176. class: "u-icon__label",
  27177. style: vue.normalizeStyle({
  27178. color: _ctx.labelColor,
  27179. fontSize: $options.addUnit(_ctx.labelSize),
  27180. marginLeft: _ctx.labelPos == "right" ? $options.addUnit(_ctx.space) : 0,
  27181. marginTop: _ctx.labelPos == "bottom" ? $options.addUnit(_ctx.space) : 0,
  27182. marginRight: _ctx.labelPos == "left" ? $options.addUnit(_ctx.space) : 0,
  27183. marginBottom: _ctx.labelPos == "top" ? $options.addUnit(_ctx.space) : 0
  27184. })
  27185. },
  27186. vue.toDisplayString(_ctx.label),
  27187. 5
  27188. /* TEXT, STYLE */
  27189. )) : vue.createCommentVNode("v-if", true)
  27190. ],
  27191. 2
  27192. /* CLASS */
  27193. );
  27194. }
  27195. const uIcon = /* @__PURE__ */ _export_sfc(_sfc_main$1l, [["render", _sfc_render$1k], ["__scopeId", "data-v-ac70166d"], ["__file", "C:/Users/EDY/Desktop/项目/shuibei/uni_modules/uview-plus/components/u-icon/u-icon.vue"]]);
  27196. const __vite_glob_0_46 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
  27197. __proto__: null,
  27198. default: uIcon
  27199. }, Symbol.toStringTag, { value: "Module" }));
  27200. const props$R = defineMixin({
  27201. props: {
  27202. // 图片地址
  27203. src: {
  27204. type: String,
  27205. default: () => props$1x.image.src
  27206. },
  27207. // 裁剪模式
  27208. mode: {
  27209. type: String,
  27210. default: () => props$1x.image.mode
  27211. },
  27212. // 宽度,单位任意
  27213. width: {
  27214. type: [String, Number],
  27215. default: () => props$1x.image.width
  27216. },
  27217. // 高度,单位任意
  27218. height: {
  27219. type: [String, Number],
  27220. default: () => props$1x.image.height
  27221. },
  27222. // 图片形状,circle-圆形,square-方形
  27223. shape: {
  27224. type: String,
  27225. default: () => props$1x.image.shape
  27226. },
  27227. // 圆角,单位任意
  27228. radius: {
  27229. type: [String, Number],
  27230. default: () => props$1x.image.radius
  27231. },
  27232. // 是否懒加载,微信小程序、App、百度小程序、字节跳动小程序
  27233. lazyLoad: {
  27234. type: Boolean,
  27235. default: () => props$1x.image.lazyLoad
  27236. },
  27237. // 开启长按图片显示识别微信小程序码菜单
  27238. showMenuByLongpress: {
  27239. type: Boolean,
  27240. default: () => props$1x.image.showMenuByLongpress
  27241. },
  27242. // 加载中的图标,或者小图片
  27243. loadingIcon: {
  27244. type: String,
  27245. default: () => props$1x.image.loadingIcon
  27246. },
  27247. // 加载失败的图标,或者小图片
  27248. errorIcon: {
  27249. type: String,
  27250. default: () => props$1x.image.errorIcon
  27251. },
  27252. // 是否显示加载中的图标或者自定义的slot
  27253. showLoading: {
  27254. type: Boolean,
  27255. default: () => props$1x.image.showLoading
  27256. },
  27257. // 是否显示加载错误的图标或者自定义的slot
  27258. showError: {
  27259. type: Boolean,
  27260. default: () => props$1x.image.showError
  27261. },
  27262. // 是否需要淡入效果
  27263. fade: {
  27264. type: Boolean,
  27265. default: () => props$1x.image.fade
  27266. },
  27267. // 只支持网络资源,只对微信小程序有效
  27268. webp: {
  27269. type: Boolean,
  27270. default: () => props$1x.image.webp
  27271. },
  27272. // 过渡时间,单位ms
  27273. duration: {
  27274. type: [String, Number],
  27275. default: () => props$1x.image.duration
  27276. },
  27277. // 背景颜色,用于深色页面加载图片时,为了和背景色融合
  27278. bgColor: {
  27279. type: String,
  27280. default: () => props$1x.image.bgColor
  27281. }
  27282. }
  27283. });
  27284. const _sfc_main$1k = {
  27285. name: "u-image",
  27286. mixins: [mpMixin, mixin, props$R],
  27287. data() {
  27288. return {
  27289. // 图片是否加载错误,如果是,则显示错误占位图
  27290. isError: false,
  27291. // 初始化组件时,默认为加载中状态
  27292. loading: true,
  27293. // 不透明度,为了实现淡入淡出的效果
  27294. opacity: 1,
  27295. // 过渡时间,因为props的值无法修改,故需要一个中间值
  27296. durationTime: this.duration,
  27297. // 图片加载完成时,去掉背景颜色,因为如果是png图片,就会显示灰色的背景
  27298. backgroundStyle: {},
  27299. // 用于fade模式的控制组件显示与否
  27300. show: false
  27301. };
  27302. },
  27303. watch: {
  27304. src: {
  27305. immediate: true,
  27306. handler(n2) {
  27307. if (!n2) {
  27308. this.isError = true;
  27309. } else {
  27310. this.isError = false;
  27311. this.loading = true;
  27312. }
  27313. }
  27314. }
  27315. },
  27316. computed: {
  27317. transStyle() {
  27318. let style = {};
  27319. if (this.loading || this.isError || this.width == "100%" || this.mode != "heightFix") {
  27320. style.width = addUnit(this.width);
  27321. } else {
  27322. style.width = "fit-content";
  27323. }
  27324. if (this.loading || this.isError || this.height == "100%" || this.mode != "widthFix") {
  27325. style.height = addUnit(this.height);
  27326. } else {
  27327. style.height = "fit-content";
  27328. }
  27329. return style;
  27330. },
  27331. wrapStyle() {
  27332. let style = {};
  27333. if (this.loading || this.isError || this.width == "100%" || this.mode != "heightFix") {
  27334. style.width = addUnit(this.width);
  27335. } else {
  27336. style.width = "fit-content";
  27337. }
  27338. if (this.loading || this.isError || this.height == "100%" || this.mode != "widthFix") {
  27339. style.height = addUnit(this.height);
  27340. } else {
  27341. style.height = "fit-content";
  27342. }
  27343. style.borderRadius = this.shape == "circle" ? "10000px" : addUnit(this.radius);
  27344. style.overflow = this.radius > 0 ? "hidden" : "visible";
  27345. return deepMerge$1(style, addStyle(this.customStyle));
  27346. }
  27347. },
  27348. mounted() {
  27349. this.show = true;
  27350. },
  27351. emits: ["click", "error", "load"],
  27352. methods: {
  27353. addUnit,
  27354. // 点击图片
  27355. onClick(e2) {
  27356. this.$emit("click", e2);
  27357. },
  27358. // 图片加载失败
  27359. onErrorHandler(err) {
  27360. this.loading = false;
  27361. this.isError = true;
  27362. this.$emit("error", err);
  27363. },
  27364. // 图片加载完成,标记loading结束
  27365. onLoadHandler(event) {
  27366. this.loading = false;
  27367. this.isError = false;
  27368. this.$emit("load", event);
  27369. this.removeBgColor();
  27370. },
  27371. // 移除图片的背景色
  27372. removeBgColor() {
  27373. }
  27374. }
  27375. };
  27376. function _sfc_render$1j(_ctx, _cache, $props, $setup, $data, $options) {
  27377. const _component_up_icon = vue.resolveComponent("up-icon");
  27378. const _component_u_transition = resolveEasycom(vue.resolveDynamicComponent("u-transition"), __easycom_2$1);
  27379. return vue.openBlock(), vue.createBlock(_component_u_transition, {
  27380. mode: "fade",
  27381. show: $data.show,
  27382. style: vue.normalizeStyle($options.transStyle),
  27383. duration: _ctx.fade ? 1e3 : 0
  27384. }, {
  27385. default: vue.withCtx(() => [
  27386. vue.createElementVNode(
  27387. "view",
  27388. {
  27389. class: "u-image box-border",
  27390. onClick: _cache[2] || (_cache[2] = (...args) => $options.onClick && $options.onClick(...args)),
  27391. style: vue.normalizeStyle([$options.wrapStyle, $data.backgroundStyle])
  27392. },
  27393. [
  27394. !$data.isError ? (vue.openBlock(), vue.createElementBlock("image", {
  27395. key: 0,
  27396. src: _ctx.src,
  27397. mode: _ctx.mode,
  27398. onError: _cache[0] || (_cache[0] = (...args) => $options.onErrorHandler && $options.onErrorHandler(...args)),
  27399. onLoad: _cache[1] || (_cache[1] = (...args) => $options.onLoadHandler && $options.onLoadHandler(...args)),
  27400. "show-menu-by-longpress": _ctx.showMenuByLongpress,
  27401. "lazy-load": _ctx.lazyLoad,
  27402. class: "u-image__image",
  27403. style: vue.normalizeStyle({
  27404. width: $options.addUnit(_ctx.width),
  27405. height: $options.addUnit(_ctx.height),
  27406. borderRadius: _ctx.shape == "circle" ? "10000px" : $options.addUnit(_ctx.radius)
  27407. })
  27408. }, null, 44, ["src", "mode", "show-menu-by-longpress", "lazy-load"])) : vue.createCommentVNode("v-if", true),
  27409. _ctx.showLoading && $data.loading ? (vue.openBlock(), vue.createElementBlock(
  27410. "view",
  27411. {
  27412. key: 1,
  27413. class: "u-image__loading",
  27414. style: vue.normalizeStyle({
  27415. borderRadius: _ctx.shape == "circle" ? "50%" : $options.addUnit(_ctx.radius),
  27416. backgroundColor: this.bgColor,
  27417. width: $options.addUnit(_ctx.width),
  27418. height: $options.addUnit(_ctx.height)
  27419. })
  27420. },
  27421. [
  27422. vue.renderSlot(_ctx.$slots, "loading", {}, () => [
  27423. vue.createVNode(_component_up_icon, { name: _ctx.loadingIcon }, null, 8, ["name"])
  27424. ], true)
  27425. ],
  27426. 4
  27427. /* STYLE */
  27428. )) : vue.createCommentVNode("v-if", true),
  27429. _ctx.showError && $data.isError && !$data.loading ? (vue.openBlock(), vue.createElementBlock(
  27430. "view",
  27431. {
  27432. key: 2,
  27433. class: "u-image__error",
  27434. style: vue.normalizeStyle({
  27435. borderRadius: _ctx.shape == "circle" ? "50%" : $options.addUnit(_ctx.radius),
  27436. backgroundColor: this.bgColor,
  27437. width: $options.addUnit(_ctx.width),
  27438. height: $options.addUnit(_ctx.height)
  27439. })
  27440. },
  27441. [
  27442. vue.renderSlot(_ctx.$slots, "error", {}, () => [
  27443. vue.createVNode(_component_up_icon, { name: _ctx.errorIcon }, null, 8, ["name"])
  27444. ], true)
  27445. ],
  27446. 4
  27447. /* STYLE */
  27448. )) : vue.createCommentVNode("v-if", true)
  27449. ],
  27450. 4
  27451. /* STYLE */
  27452. )
  27453. ]),
  27454. _: 3
  27455. /* FORWARDED */
  27456. }, 8, ["show", "style", "duration"]);
  27457. }
  27458. const uImage = /* @__PURE__ */ _export_sfc(_sfc_main$1k, [["render", _sfc_render$1j], ["__scopeId", "data-v-abebd402"], ["__file", "C:/Users/EDY/Desktop/项目/shuibei/uni_modules/uview-plus/components/u-image/u-image.vue"]]);
  27459. const __vite_glob_0_47 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
  27460. __proto__: null,
  27461. default: uImage
  27462. }, Symbol.toStringTag, { value: "Module" }));
  27463. const props$Q = defineMixin({
  27464. props: {
  27465. // 列表锚点文本内容
  27466. text: {
  27467. type: [String, Number],
  27468. default: () => props$1x.indexAnchor.text
  27469. },
  27470. // 列表锚点文字颜色
  27471. color: {
  27472. type: String,
  27473. default: () => props$1x.indexAnchor.color
  27474. },
  27475. // 列表锚点文字大小,单位默认px
  27476. size: {
  27477. type: [String, Number],
  27478. default: () => props$1x.indexAnchor.size
  27479. },
  27480. // 列表锚点背景颜色
  27481. bgColor: {
  27482. type: String,
  27483. default: () => props$1x.indexAnchor.bgColor
  27484. },
  27485. // 列表锚点高度,单位默认px
  27486. height: {
  27487. type: [String, Number],
  27488. default: () => props$1x.indexAnchor.height
  27489. }
  27490. }
  27491. });
  27492. const _sfc_main$1j = {
  27493. name: "u-index-anchor",
  27494. mixins: [mpMixin, mixin, props$Q],
  27495. data() {
  27496. return {};
  27497. },
  27498. mounted() {
  27499. this.init();
  27500. },
  27501. methods: {
  27502. addUnit,
  27503. init() {
  27504. const indexList2 = $parent.call(this, "u-index-list");
  27505. if (!indexList2) {
  27506. return error("u-index-anchor必须要搭配u-index-list组件使用");
  27507. }
  27508. indexList2.anchors.push(this);
  27509. const indexListItem = $parent.call(this, "u-index-item");
  27510. if (!indexListItem) {
  27511. return error("u-index-anchor必须要搭配u-index-item组件使用");
  27512. }
  27513. if (typeof this.text == "string") {
  27514. indexListItem.id = this.text.charCodeAt(0);
  27515. } else {
  27516. indexListItem.id = this.text.name.charCodeAt(0);
  27517. }
  27518. }
  27519. },
  27520. computed: {
  27521. parentSticky() {
  27522. const indexList2 = $parent.call(this, "u-index-list");
  27523. return indexList2 ? indexList2.sticky : true;
  27524. }
  27525. }
  27526. };
  27527. function _sfc_render$1i(_ctx, _cache, $props, $setup, $data, $options) {
  27528. return vue.openBlock(), vue.createElementBlock(
  27529. "view",
  27530. {
  27531. class: vue.normalizeClass(["u-index-anchor u-border-bottom", { "u-index-anchor--sticky": $options.parentSticky }]),
  27532. ref: `u-index-anchor-${_ctx.text}`,
  27533. style: vue.normalizeStyle({
  27534. height: $options.addUnit(_ctx.height),
  27535. backgroundColor: _ctx.bgColor
  27536. })
  27537. },
  27538. [
  27539. vue.createElementVNode(
  27540. "text",
  27541. {
  27542. class: "u-index-anchor__text",
  27543. style: vue.normalizeStyle({
  27544. fontSize: $options.addUnit(_ctx.size),
  27545. color: _ctx.color
  27546. })
  27547. },
  27548. vue.toDisplayString(_ctx.text.name || _ctx.text),
  27549. 5
  27550. /* TEXT, STYLE */
  27551. )
  27552. ],
  27553. 6
  27554. /* CLASS, STYLE */
  27555. );
  27556. }
  27557. const uIndexAnchor = /* @__PURE__ */ _export_sfc(_sfc_main$1j, [["render", _sfc_render$1i], ["__scopeId", "data-v-20d39374"], ["__file", "C:/Users/EDY/Desktop/项目/shuibei/uni_modules/uview-plus/components/u-index-anchor/u-index-anchor.vue"]]);
  27558. const __vite_glob_0_48 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
  27559. __proto__: null,
  27560. default: uIndexAnchor
  27561. }, Symbol.toStringTag, { value: "Module" }));
  27562. const props$P = defineMixin({
  27563. props: {}
  27564. });
  27565. const _sfc_main$1i = {
  27566. name: "u-index-item",
  27567. mixins: [mpMixin, mixin, props$P],
  27568. data() {
  27569. return {
  27570. // 本组件到滚动条顶部的距离
  27571. top: 0,
  27572. height: 0,
  27573. id: ""
  27574. };
  27575. },
  27576. created() {
  27577. this.anchor = {};
  27578. },
  27579. mounted() {
  27580. this.init();
  27581. },
  27582. methods: {
  27583. init() {
  27584. this.getParentData("u-index-list");
  27585. if (!this.parent) {
  27586. return error("u-index-item必须要搭配u-index-list组件使用");
  27587. }
  27588. sleep().then(() => {
  27589. this.getIndexItemRect().then((size) => {
  27590. this.top = Math.ceil(size.top);
  27591. this.height = Math.ceil(size.height);
  27592. });
  27593. });
  27594. },
  27595. getIndexItemRect() {
  27596. return new Promise((resolve) => {
  27597. this.$uGetRect(".u-index-item").then((size) => {
  27598. resolve(size);
  27599. });
  27600. });
  27601. }
  27602. }
  27603. };
  27604. function _sfc_render$1h(_ctx, _cache, $props, $setup, $data, $options) {
  27605. return vue.openBlock(), vue.createElementBlock("view", {
  27606. class: vue.normalizeClass(["u-index-item", [`u-index-item-${$data.id}`]]),
  27607. id: `u-index-item-${$data.id}`
  27608. }, [
  27609. vue.renderSlot(_ctx.$slots, "default")
  27610. ], 10, ["id"]);
  27611. }
  27612. const uIndexItem = /* @__PURE__ */ _export_sfc(_sfc_main$1i, [["render", _sfc_render$1h], ["__file", "C:/Users/EDY/Desktop/项目/shuibei/uni_modules/uview-plus/components/u-index-item/u-index-item.vue"]]);
  27613. const __vite_glob_0_49 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
  27614. __proto__: null,
  27615. default: uIndexItem
  27616. }, Symbol.toStringTag, { value: "Module" }));
  27617. const props$O = defineMixin({
  27618. props: {
  27619. // 右边锚点非激活的颜色
  27620. inactiveColor: {
  27621. type: String,
  27622. default: () => props$1x.indexList.inactiveColor
  27623. },
  27624. // 右边锚点激活的颜色
  27625. activeColor: {
  27626. type: String,
  27627. default: () => props$1x.indexList.activeColor
  27628. },
  27629. // 索引字符列表,数组形式
  27630. indexList: {
  27631. type: Array,
  27632. default: () => props$1x.indexList.indexList
  27633. },
  27634. // 是否开启锚点自动吸顶
  27635. sticky: {
  27636. type: Boolean,
  27637. default: () => props$1x.indexList.sticky
  27638. },
  27639. // 自定义导航栏的高度
  27640. customNavHeight: {
  27641. type: [String, Number],
  27642. default: () => props$1x.indexList.customNavHeight
  27643. },
  27644. // 是否开启底部安全距离适配
  27645. safeBottomFix: {
  27646. type: Boolean,
  27647. default: () => props$1x.indexList.safeBottomFix
  27648. }
  27649. }
  27650. });
  27651. const indexList = () => {
  27652. const indexList2 = [];
  27653. const charCodeOfA = "A".charCodeAt(0);
  27654. for (let i2 = 0; i2 < 26; i2++) {
  27655. indexList2.push(String.fromCharCode(charCodeOfA + i2));
  27656. }
  27657. return indexList2;
  27658. };
  27659. const _sfc_main$1h = {
  27660. name: "u-index-list",
  27661. mixins: [mpMixin, mixin, props$O],
  27662. data() {
  27663. return {
  27664. // 当前正在被选中的字母索引
  27665. activeIndex: -1,
  27666. touchmoveIndex: 1,
  27667. // 索引字母的信息
  27668. letterInfo: {
  27669. height: 0,
  27670. itemHeight: 0,
  27671. top: 0
  27672. },
  27673. // 设置字母指示器的高度,后面为了让指示器跟随字母,并将尖角部分指向字母的中部,需要依赖此值
  27674. indicatorHeight: 50,
  27675. // 字母放大指示器的top值,为了让其指向当前激活的字母
  27676. // indicatorTop: 0
  27677. // 当前是否正在被触摸状态
  27678. touching: false,
  27679. // 滚动条顶部top值
  27680. scrollTop: 0,
  27681. // scroll-view的高度
  27682. scrollViewHeight: 0,
  27683. // 系统信息
  27684. sys: {},
  27685. scrolling: false,
  27686. scrollIntoView: "",
  27687. pageY: 0,
  27688. topOffset: 0
  27689. };
  27690. },
  27691. computed: {
  27692. // 如果有传入外部的indexList锚点数组则使用,否则使用内部生成A-Z字母
  27693. uIndexList() {
  27694. return this.indexList.length ? this.indexList : indexList();
  27695. },
  27696. // 字母放大指示器的top值,为了让其指向当前激活的字母
  27697. indicatorTop() {
  27698. const {
  27699. top,
  27700. height,
  27701. itemHeight
  27702. } = this.letterInfo;
  27703. return Math.floor(top - height / 2 + itemHeight * this.activeIndex + itemHeight - 70 / 2);
  27704. }
  27705. },
  27706. watch: {
  27707. // 监听字母索引的变化,重新设置尺寸
  27708. uIndexList: {
  27709. immediate: false,
  27710. handler() {
  27711. sleep(30).then(() => {
  27712. this.setIndexListLetterInfo();
  27713. });
  27714. }
  27715. }
  27716. },
  27717. created() {
  27718. this.children = [];
  27719. this.anchors = [];
  27720. this.sys = getWindowInfo();
  27721. },
  27722. mounted() {
  27723. this.init();
  27724. sleep(50).then(() => {
  27725. this.setIndexListLetterInfo();
  27726. });
  27727. },
  27728. methods: {
  27729. addUnit,
  27730. init() {
  27731. let customNavHeight = getPx(this.customNavHeight);
  27732. this.getIndexListRect().then(async (sizeScroll) => {
  27733. this.scrollViewHeight = sizeScroll.height ? sizeScroll.height : this.sys.windowHeight - customNavHeight;
  27734. this.topOffset = this.sys.windowHeight - this.scrollViewHeight;
  27735. });
  27736. },
  27737. // 索引列表被触摸
  27738. touchStart(e2) {
  27739. const touchStartData = e2.changedTouches[0];
  27740. if (!touchStartData)
  27741. return;
  27742. this.touching = true;
  27743. const {
  27744. pageY,
  27745. screenY
  27746. } = touchStartData;
  27747. const currentIndex = this.getIndexListLetter(pageY);
  27748. this.setValueForTouch(currentIndex);
  27749. },
  27750. // 索引字母列表被触摸滑动中
  27751. touchMove(e2) {
  27752. let touchMove = e2.changedTouches[0];
  27753. if (!touchMove)
  27754. return;
  27755. if (!this.touching) {
  27756. this.touching = true;
  27757. }
  27758. const {
  27759. pageY,
  27760. screenY
  27761. } = touchMove;
  27762. const currentIndex = this.getIndexListLetter(pageY);
  27763. this.setValueForTouch(currentIndex);
  27764. },
  27765. // 触摸结束
  27766. touchEnd(e2) {
  27767. sleep(300).then(() => {
  27768. this.touching = false;
  27769. });
  27770. },
  27771. // 获取索引列表的尺寸以及单个字符的尺寸信息
  27772. getIndexListLetterRect() {
  27773. return new Promise((resolve) => {
  27774. this.$uGetRect(".u-index-list__letter").then((size) => {
  27775. resolve(size);
  27776. });
  27777. });
  27778. },
  27779. getIndexListScrollViewRect() {
  27780. return new Promise((resolve) => {
  27781. this.$uGetRect(".u-index-list__scroll-view").then((size) => {
  27782. resolve(size);
  27783. });
  27784. });
  27785. },
  27786. getIndexListRect() {
  27787. return new Promise((resolve) => {
  27788. this.$uGetRect(".u-index-list").then((size) => {
  27789. resolve(size);
  27790. });
  27791. });
  27792. },
  27793. // 设置indexList索引的尺寸信息
  27794. setIndexListLetterInfo() {
  27795. this.getIndexListLetterRect().then((size) => {
  27796. const {
  27797. height
  27798. } = size;
  27799. const sysData = getWindowInfo();
  27800. sysData.windowHeight;
  27801. if (this.customNavHeight == 0) {
  27802. -(sysData.statusBarHeight + 44);
  27803. } else {
  27804. getPx(this.customNavHeight);
  27805. }
  27806. this.getIndexListScrollViewRect().then((sizeScroll) => {
  27807. this.letterInfo = {
  27808. height,
  27809. // 为了让字母列表对屏幕绝对居中,让其对导航栏进行修正,也即往上偏移导航栏的一半高度
  27810. top: sizeScroll.height / 2,
  27811. // top: (this.scrollViewHeight - height) / 2 + customNavHeight / 2,
  27812. itemHeight: Math.floor(height / this.uIndexList.length)
  27813. };
  27814. });
  27815. });
  27816. },
  27817. // 获取当前被触摸的索引字母
  27818. getIndexListLetter(pageY) {
  27819. this.pageY = pageY;
  27820. let {
  27821. top,
  27822. height,
  27823. itemHeight
  27824. } = this.letterInfo;
  27825. let index2 = this.currentIndex;
  27826. top = top - height / 2;
  27827. pageY = pageY - this.topOffset;
  27828. if (pageY < top) {
  27829. index2 = 0;
  27830. } else if (pageY >= top + height) {
  27831. index2 = this.uIndexList.length - 1;
  27832. } else {
  27833. index2 = Math.floor((pageY - top) / itemHeight);
  27834. }
  27835. return index2;
  27836. },
  27837. // 设置各项由触摸而导致变化的值
  27838. async setValueForTouch(currentIndex) {
  27839. if (currentIndex === this.activeIndex)
  27840. return;
  27841. this.activeIndex = currentIndex;
  27842. this.$emit("select", this.uIndexList[currentIndex]);
  27843. if (typeof this.uIndexList[currentIndex] == "string") {
  27844. this.scrollIntoView = `u-index-item-${this.uIndexList[currentIndex].charCodeAt(0)}`;
  27845. } else {
  27846. this.scrollIntoView = `u-index-item-${this.uIndexList[currentIndex].name.charCodeAt(0)}`;
  27847. }
  27848. },
  27849. getHeaderRect() {
  27850. return new Promise((resolve) => {
  27851. if (!this.$slots.header) {
  27852. resolve({
  27853. width: 0,
  27854. height: 0
  27855. });
  27856. }
  27857. this.$uGetRect(".u-index-list__header").then((size) => {
  27858. resolve(size);
  27859. });
  27860. });
  27861. },
  27862. // scroll-view的滚动事件
  27863. async scrollHandler(e2) {
  27864. if (this.touching || this.scrolling)
  27865. return;
  27866. this.scrolling = true;
  27867. sleep(10).then(() => {
  27868. this.scrolling = false;
  27869. });
  27870. let scrollTop = 0;
  27871. const len = this.children.length;
  27872. let children = this.children;
  27873. const header = await this.getHeaderRect();
  27874. let top = header.height;
  27875. this.anchors;
  27876. children = this.children.map((item, index2) => {
  27877. const child = {
  27878. height: item.height,
  27879. top
  27880. };
  27881. top = top + item.height;
  27882. return child;
  27883. });
  27884. scrollTop = e2.detail.scrollTop;
  27885. scrollTop = scrollTop + getPx(this.customNavHeight);
  27886. for (let i2 = 0; i2 < len; i2++) {
  27887. const item = children[i2], nextItem = children[i2 + 1];
  27888. if (scrollTop <= children[0].top || scrollTop >= children[len - 1].top + children[len - 1].height) {
  27889. this.activeIndex = -1;
  27890. break;
  27891. } else if (!nextItem) {
  27892. this.activeIndex = len - 1;
  27893. break;
  27894. } else if (scrollTop > item.top && scrollTop < nextItem.top) {
  27895. this.activeIndex = i2;
  27896. break;
  27897. }
  27898. }
  27899. }
  27900. }
  27901. };
  27902. function _sfc_render$1g(_ctx, _cache, $props, $setup, $data, $options) {
  27903. const _component_u_transition = resolveEasycom(vue.resolveDynamicComponent("u-transition"), __easycom_2$1);
  27904. return vue.openBlock(), vue.createElementBlock(
  27905. "view",
  27906. {
  27907. ref: "u-index-list",
  27908. class: "u-index-list"
  27909. },
  27910. [
  27911. vue.createElementVNode("scroll-view", {
  27912. scrollTop: $data.scrollTop,
  27913. scrollIntoView: $data.scrollIntoView,
  27914. "offset-accuracy": 1,
  27915. style: vue.normalizeStyle({
  27916. maxHeight: $options.addUnit($data.scrollViewHeight)
  27917. }),
  27918. "scroll-y": "",
  27919. onScroll: _cache[0] || (_cache[0] = (...args) => $options.scrollHandler && $options.scrollHandler(...args)),
  27920. ref: "u-index-list__scroll-view",
  27921. class: "u-index-list__scroll-view"
  27922. }, [
  27923. _ctx.$slots.header ? (vue.openBlock(), vue.createElementBlock("view", {
  27924. key: 0,
  27925. class: "u-index-list__header"
  27926. }, [
  27927. vue.renderSlot(_ctx.$slots, "header", {}, void 0, true)
  27928. ])) : vue.createCommentVNode("v-if", true),
  27929. vue.renderSlot(_ctx.$slots, "default", {}, void 0, true),
  27930. _ctx.$slots.footer ? (vue.openBlock(), vue.createElementBlock("view", {
  27931. key: 1,
  27932. class: "u-index-list__footer"
  27933. }, [
  27934. vue.renderSlot(_ctx.$slots, "footer", {}, void 0, true)
  27935. ])) : vue.createCommentVNode("v-if", true)
  27936. ], 44, ["scrollTop", "scrollIntoView"]),
  27937. vue.createElementVNode(
  27938. "view",
  27939. {
  27940. class: "u-index-list__letter",
  27941. ref: "u-index-list__letter",
  27942. style: vue.normalizeStyle({ top: $options.addUnit($data.letterInfo.top), transform: "translateY(-50%)" }),
  27943. onTouchstart: _cache[1] || (_cache[1] = vue.withModifiers((...args) => $options.touchStart && $options.touchStart(...args), ["prevent"])),
  27944. onTouchmove: _cache[2] || (_cache[2] = vue.withModifiers((...args) => $options.touchMove && $options.touchMove(...args), ["prevent"])),
  27945. onTouchend: _cache[3] || (_cache[3] = vue.withModifiers((...args) => $options.touchEnd && $options.touchEnd(...args), ["prevent"])),
  27946. onTouchcancel: _cache[4] || (_cache[4] = vue.withModifiers((...args) => $options.touchEnd && $options.touchEnd(...args), ["prevent"]))
  27947. },
  27948. [
  27949. (vue.openBlock(true), vue.createElementBlock(
  27950. vue.Fragment,
  27951. null,
  27952. vue.renderList($options.uIndexList, (item, index2) => {
  27953. return vue.openBlock(), vue.createElementBlock(
  27954. "view",
  27955. {
  27956. class: "u-index-list__letter__item",
  27957. key: index2,
  27958. style: vue.normalizeStyle({
  27959. backgroundColor: $data.activeIndex === index2 ? _ctx.activeColor : "transparent"
  27960. })
  27961. },
  27962. [
  27963. vue.createElementVNode(
  27964. "text",
  27965. {
  27966. class: "u-index-list__letter__item__index",
  27967. style: vue.normalizeStyle({ color: $data.activeIndex === index2 ? "#fff" : _ctx.inactiveColor })
  27968. },
  27969. vue.toDisplayString(item.key || item),
  27970. 5
  27971. /* TEXT, STYLE */
  27972. )
  27973. ],
  27974. 4
  27975. /* STYLE */
  27976. );
  27977. }),
  27978. 128
  27979. /* KEYED_FRAGMENT */
  27980. ))
  27981. ],
  27982. 36
  27983. /* STYLE, NEED_HYDRATION */
  27984. ),
  27985. vue.createVNode(_component_u_transition, {
  27986. mode: "fade",
  27987. show: $data.touching,
  27988. customStyle: {
  27989. position: "absolute",
  27990. right: "50px",
  27991. top: $options.addUnit($options.indicatorTop, "px"),
  27992. zIndex: 3
  27993. }
  27994. }, {
  27995. default: vue.withCtx(() => {
  27996. var _a2;
  27997. return [
  27998. vue.createElementVNode(
  27999. "view",
  28000. {
  28001. class: vue.normalizeClass(["u-index-list__indicator", ["u-index-list__indicator--show"]]),
  28002. style: vue.normalizeStyle({
  28003. height: $options.addUnit($data.indicatorHeight),
  28004. width: $options.addUnit($data.indicatorHeight)
  28005. })
  28006. },
  28007. [
  28008. vue.createElementVNode(
  28009. "text",
  28010. { class: "u-index-list__indicator__text" },
  28011. vue.toDisplayString(((_a2 = $options.uIndexList[$data.activeIndex]) == null ? void 0 : _a2.key) || $options.uIndexList[$data.activeIndex]),
  28012. 1
  28013. /* TEXT */
  28014. )
  28015. ],
  28016. 4
  28017. /* STYLE */
  28018. )
  28019. ];
  28020. }),
  28021. _: 1
  28022. /* STABLE */
  28023. }, 8, ["show", "customStyle"])
  28024. ],
  28025. 512
  28026. /* NEED_PATCH */
  28027. );
  28028. }
  28029. const uIndexList = /* @__PURE__ */ _export_sfc(_sfc_main$1h, [["render", _sfc_render$1g], ["__scopeId", "data-v-dfefaad1"], ["__file", "C:/Users/EDY/Desktop/项目/shuibei/uni_modules/uview-plus/components/u-index-list/u-index-list.vue"]]);
  28030. const __vite_glob_0_50 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
  28031. __proto__: null,
  28032. default: uIndexList
  28033. }, Symbol.toStringTag, { value: "Module" }));
  28034. const props$N = defineMixin({
  28035. props: {
  28036. // 绑定的值
  28037. modelValue: {
  28038. type: [String, Number],
  28039. default: () => props$1x.input.value
  28040. },
  28041. // number-数字输入键盘,app-vue下可以输入浮点数,app-nvue和小程序平台下只能输入整数
  28042. // idcard-身份证输入键盘,微信、支付宝、百度、QQ小程序
  28043. // digit-带小数点的数字键盘,App的nvue页面、微信、支付宝、百度、头条、QQ小程序
  28044. // text-文本输入键盘
  28045. type: {
  28046. type: String,
  28047. default: () => props$1x.input.type
  28048. },
  28049. // 如果 textarea 是在一个 position:fixed 的区域,需要显示指定属性 fixed 为 true,
  28050. // 兼容性:微信小程序、百度小程序、字节跳动小程序、QQ小程序
  28051. fixed: {
  28052. type: Boolean,
  28053. default: () => props$1x.input.fixed
  28054. },
  28055. // 是否禁用输入框
  28056. disabled: {
  28057. type: Boolean,
  28058. default: () => props$1x.input.disabled
  28059. },
  28060. // 禁用状态时的背景色
  28061. disabledColor: {
  28062. type: String,
  28063. default: () => props$1x.input.disabledColor
  28064. },
  28065. // 是否显示清除控件
  28066. clearable: {
  28067. type: Boolean,
  28068. default: false
  28069. },
  28070. // 是否仅在聚焦时显示清除控件
  28071. onlyClearableOnFocused: {
  28072. type: Boolean,
  28073. default: true
  28074. },
  28075. // 是否密码类型
  28076. password: {
  28077. type: Boolean,
  28078. default: () => props$1x.input.password
  28079. },
  28080. // 最大输入长度,设置为 -1 的时候不限制最大长度
  28081. maxlength: {
  28082. type: [String, Number],
  28083. default: () => props$1x.input.maxlength
  28084. },
  28085. // 输入框为空时的占位符
  28086. placeholder: {
  28087. type: String,
  28088. default: () => props$1x.input.placeholder
  28089. },
  28090. // 指定placeholder的样式类,注意页面或组件的style中写了scoped时,需要在类名前写/deep/
  28091. placeholderClass: {
  28092. type: String,
  28093. default: () => props$1x.input.placeholderClass
  28094. },
  28095. // 指定placeholder的样式
  28096. placeholderStyle: {
  28097. type: [String, Object],
  28098. default: () => props$1x.input.placeholderStyle
  28099. },
  28100. // 是否显示输入字数统计,只在 type ="text"或type ="textarea"时有效
  28101. showWordLimit: {
  28102. type: Boolean,
  28103. default: () => props$1x.input.showWordLimit
  28104. },
  28105. // 设置右下角按钮的文字,有效值:send|search|next|go|done,兼容性详见uni-app文档
  28106. // https://uniapp.dcloud.io/component/input
  28107. // https://uniapp.dcloud.io/component/textarea
  28108. confirmType: {
  28109. type: String,
  28110. default: () => props$1x.input.confirmType
  28111. },
  28112. // 点击键盘右下角按钮时是否保持键盘不收起,H5无效
  28113. confirmHold: {
  28114. type: Boolean,
  28115. default: () => props$1x.input.confirmHold
  28116. },
  28117. // focus时,点击页面的时候不收起键盘,微信小程序有效
  28118. holdKeyboard: {
  28119. type: Boolean,
  28120. default: () => props$1x.input.holdKeyboard
  28121. },
  28122. // 自动获取焦点
  28123. // 在 H5 平台能否聚焦以及软键盘是否跟随弹出,取决于当前浏览器本身的实现。nvue 页面不支持,需使用组件的 focus()、blur() 方法控制焦点
  28124. focus: {
  28125. type: Boolean,
  28126. default: () => props$1x.input.focus
  28127. },
  28128. // 键盘收起时,是否自动失去焦点,目前仅App3.0.0+有效
  28129. autoBlur: {
  28130. type: Boolean,
  28131. default: () => props$1x.input.autoBlur
  28132. },
  28133. // 是否去掉 iOS 下的默认内边距,仅微信小程序,且type=textarea时有效
  28134. disableDefaultPadding: {
  28135. type: Boolean,
  28136. default: () => props$1x.input.disableDefaultPadding
  28137. },
  28138. // 指定focus时光标的位置
  28139. cursor: {
  28140. type: [String, Number],
  28141. default: () => props$1x.input.cursor
  28142. },
  28143. // 输入框聚焦时底部与键盘的距离
  28144. cursorSpacing: {
  28145. type: [String, Number],
  28146. default: () => props$1x.input.cursorSpacing
  28147. },
  28148. // 光标起始位置,自动聚集时有效,需与selection-end搭配使用
  28149. selectionStart: {
  28150. type: [String, Number],
  28151. default: () => props$1x.input.selectionStart
  28152. },
  28153. // 光标结束位置,自动聚集时有效,需与selection-start搭配使用
  28154. selectionEnd: {
  28155. type: [String, Number],
  28156. default: () => props$1x.input.selectionEnd
  28157. },
  28158. // 键盘弹起时,是否自动上推页面
  28159. adjustPosition: {
  28160. type: Boolean,
  28161. default: () => props$1x.input.adjustPosition
  28162. },
  28163. // 输入框内容对齐方式,可选值为:left|center|right
  28164. inputAlign: {
  28165. type: String,
  28166. default: () => props$1x.input.inputAlign
  28167. },
  28168. // 输入框字体的大小
  28169. fontSize: {
  28170. type: [String, Number],
  28171. default: () => props$1x.input.fontSize
  28172. },
  28173. // 输入框字体颜色
  28174. color: {
  28175. type: String,
  28176. default: () => props$1x.input.color
  28177. },
  28178. // 输入框前置图标
  28179. prefixIcon: {
  28180. type: String,
  28181. default: () => props$1x.input.prefixIcon
  28182. },
  28183. // 前置图标样式,对象或字符串
  28184. prefixIconStyle: {
  28185. type: [String, Object],
  28186. default: () => props$1x.input.prefixIconStyle
  28187. },
  28188. // 输入框后置图标
  28189. suffixIcon: {
  28190. type: String,
  28191. default: () => props$1x.input.suffixIcon
  28192. },
  28193. // 后置图标样式,对象或字符串
  28194. suffixIconStyle: {
  28195. type: [String, Object],
  28196. default: () => props$1x.input.suffixIconStyle
  28197. },
  28198. // 边框类型,surround-四周边框,bottom-底部边框,none-无边框
  28199. border: {
  28200. type: String,
  28201. default: () => props$1x.input.border
  28202. },
  28203. // 是否只读,与disabled不同之处在于disabled会置灰组件,而readonly则不会
  28204. readonly: {
  28205. type: Boolean,
  28206. default: () => props$1x.input.readonly
  28207. },
  28208. // 输入框形状,circle-圆形,square-方形
  28209. shape: {
  28210. type: String,
  28211. default: () => props$1x.input.shape
  28212. },
  28213. // 用于处理或者过滤输入框内容的方法
  28214. formatter: {
  28215. type: [Function, null],
  28216. default: () => props$1x.input.formatter
  28217. },
  28218. // 是否忽略组件内对文本合成系统事件的处理
  28219. ignoreCompositionEvent: {
  28220. type: Boolean,
  28221. default: true
  28222. },
  28223. // 光标颜色
  28224. cursorColor: {
  28225. type: String,
  28226. default: () => props$1x.input.cursorColor
  28227. },
  28228. // 密码类型可见性切换
  28229. passwordVisibilityToggle: {
  28230. type: Boolean,
  28231. default: () => props$1x.input.passwordVisibilityToggle
  28232. }
  28233. }
  28234. });
  28235. let timeout = null;
  28236. function debounce(func2, wait2 = 500, immediate = false) {
  28237. if (timeout !== null)
  28238. clearTimeout(timeout);
  28239. if (immediate) {
  28240. const callNow = !timeout;
  28241. timeout = setTimeout(() => {
  28242. timeout = null;
  28243. }, wait2);
  28244. if (callNow)
  28245. typeof func2 === "function" && func2();
  28246. } else {
  28247. timeout = setTimeout(() => {
  28248. typeof func2 === "function" && func2();
  28249. }, wait2);
  28250. }
  28251. }
  28252. const _sfc_main$1g = {
  28253. name: "u-input",
  28254. mixins: [mpMixin, mixin, props$N],
  28255. data() {
  28256. return {
  28257. // 清除操作
  28258. clearInput: false,
  28259. // 输入框的值
  28260. innerValue: "",
  28261. // 是否处于获得焦点状态
  28262. focused: false,
  28263. // value是否第一次变化,在watch中,由于加入immediate属性,会在第一次触发,此时不应该认为value发生了变化
  28264. firstChange: true,
  28265. // value绑定值的变化是由内部还是外部引起的
  28266. changeFromInner: false,
  28267. // 过滤处理方法
  28268. innerFormatter: (value2) => value2,
  28269. showPassword: false
  28270. };
  28271. },
  28272. created() {
  28273. if (this.formatter) {
  28274. this.innerFormatter = this.formatter;
  28275. }
  28276. },
  28277. watch: {
  28278. modelValue: {
  28279. immediate: true,
  28280. handler(newVal, oldVal) {
  28281. if (this.changeFromInner || this.innerValue === newVal) {
  28282. this.changeFromInner = false;
  28283. return;
  28284. }
  28285. this.innerValue = newVal;
  28286. if (this.firstChange === false && this.changeFromInner === false) {
  28287. this.valueChange(this.innerValue, true);
  28288. } else {
  28289. if (!this.firstChange)
  28290. formValidate(this, "change");
  28291. }
  28292. this.firstChange = false;
  28293. this.changeFromInner = false;
  28294. }
  28295. }
  28296. },
  28297. computed: {
  28298. // 是否密码
  28299. isPassword() {
  28300. let ret = false;
  28301. if (this.password) {
  28302. ret = true;
  28303. } else if (this.type == "password") {
  28304. ret = true;
  28305. } else {
  28306. ret = false;
  28307. }
  28308. if (this.showPassword) {
  28309. ret = false;
  28310. }
  28311. return ret;
  28312. },
  28313. // 是否显示清除控件
  28314. isShowClear() {
  28315. const { clearable, readonly, focused, innerValue, onlyClearableOnFocused } = this;
  28316. if (!clearable || readonly) {
  28317. return false;
  28318. }
  28319. if (onlyClearableOnFocused) {
  28320. return !!focused && innerValue !== "";
  28321. } else {
  28322. return innerValue !== "";
  28323. }
  28324. },
  28325. // 组件的类名
  28326. inputClass() {
  28327. let classes = [], { border, disabled, shape } = this;
  28328. border === "surround" && (classes = classes.concat(["u-border", "u-input--radius"]));
  28329. classes.push(`u-input--${shape}`);
  28330. border === "bottom" && (classes = classes.concat([
  28331. "u-border-bottom",
  28332. "u-input--no-radius"
  28333. ]));
  28334. return classes.join(" ");
  28335. },
  28336. // 组件的样式
  28337. wrapperStyle() {
  28338. const style = {};
  28339. if (this.disabled) {
  28340. style.backgroundColor = this.disabledColor;
  28341. }
  28342. if (this.border === "none") {
  28343. style.padding = "0";
  28344. } else {
  28345. style.paddingTop = "6px";
  28346. style.paddingBottom = "6px";
  28347. style.paddingLeft = "9px";
  28348. style.paddingRight = "9px";
  28349. }
  28350. return deepMerge$1(style, addStyle(this.customStyle));
  28351. },
  28352. // 输入框的样式
  28353. inputStyle() {
  28354. const style = {
  28355. color: this.color,
  28356. fontSize: addUnit(this.fontSize),
  28357. textAlign: this.inputAlign
  28358. };
  28359. return style;
  28360. }
  28361. },
  28362. emits: ["update:modelValue", "focus", "blur", "change", "confirm", "clear", "keyboardheightchange", "nicknamereview"],
  28363. methods: {
  28364. // 在微信小程序中,不支持将函数当做props参数,故只能通过ref形式调用
  28365. setFormatter(e2) {
  28366. this.innerFormatter = e2;
  28367. },
  28368. // 当键盘输入时,触发input事件
  28369. onInput(e2) {
  28370. let { value: value2 = "" } = e2.detail || {};
  28371. this.innerValue = value2;
  28372. this.$nextTick(() => {
  28373. let formatValue = this.innerFormatter(value2);
  28374. this.innerValue = formatValue;
  28375. this.valueChange(formatValue);
  28376. });
  28377. },
  28378. // 输入框失去焦点时触发
  28379. onBlur(event) {
  28380. this.$emit("blur", event.detail.value);
  28381. sleep(150).then(() => {
  28382. this.focused = false;
  28383. });
  28384. formValidate(this, "blur");
  28385. },
  28386. // 输入框聚焦时触发
  28387. onFocus(event) {
  28388. this.focused = true;
  28389. this.$emit("focus");
  28390. },
  28391. doFocus() {
  28392. this.$refs["input-native"].focus();
  28393. },
  28394. doBlur() {
  28395. this.$refs["input-native"].blur();
  28396. },
  28397. // 点击完成按钮时触发
  28398. onConfirm(event) {
  28399. this.$emit("confirm", this.innerValue);
  28400. },
  28401. // 键盘高度发生变化的时候触发此事件
  28402. // 兼容性:微信小程序2.7.0+、App 3.1.0+
  28403. onkeyboardheightchange(event) {
  28404. this.$emit("keyboardheightchange", event);
  28405. },
  28406. onnicknamereview(event) {
  28407. this.$emit("nicknamereview", event);
  28408. },
  28409. // 内容发生变化,进行处理
  28410. valueChange(value2, isOut = false) {
  28411. if (this.clearInput) {
  28412. this.innerValue = "";
  28413. this.clearInput = false;
  28414. }
  28415. this.$nextTick(() => {
  28416. if (!isOut || this.clearInput) {
  28417. this.changeFromInner = true;
  28418. this.$emit("change", value2);
  28419. this.$emit("update:modelValue", value2);
  28420. }
  28421. formValidate(this, "change");
  28422. });
  28423. },
  28424. // 点击清除控件
  28425. onClear() {
  28426. this.clearInput = true;
  28427. this.innerValue = "";
  28428. this.$nextTick(() => {
  28429. this.valueChange("");
  28430. this.$emit("clear");
  28431. });
  28432. },
  28433. /**
  28434. * 在安卓nvue上,事件无法冒泡
  28435. * 在某些时间,我们希望监听u-from-item的点击事件,此时会导致点击u-form-item内的u-input后
  28436. * 无法触发u-form-item的点击事件,这里通过手动调用u-form-item的方法进行触发
  28437. */
  28438. clickHandler() {
  28439. if (this.disabled || this.readonly) {
  28440. uni.hideKeyboard();
  28441. }
  28442. }
  28443. }
  28444. };
  28445. function _sfc_render$1f(_ctx, _cache, $props, $setup, $data, $options) {
  28446. const _component_up_icon = vue.resolveComponent("up-icon");
  28447. return vue.openBlock(), vue.createElementBlock(
  28448. "view",
  28449. {
  28450. class: vue.normalizeClass(["u-input", $options.inputClass]),
  28451. style: vue.normalizeStyle([$options.wrapperStyle])
  28452. },
  28453. [
  28454. vue.createElementVNode("view", { class: "u-input__content" }, [
  28455. _ctx.prefixIcon || _ctx.$slots.prefix ? (vue.openBlock(), vue.createElementBlock("view", {
  28456. key: 0,
  28457. class: "u-input__content__prefix-icon"
  28458. }, [
  28459. vue.renderSlot(_ctx.$slots, "prefix", {}, () => [
  28460. vue.createVNode(_component_up_icon, {
  28461. name: _ctx.prefixIcon,
  28462. size: "18",
  28463. customStyle: _ctx.prefixIconStyle
  28464. }, null, 8, ["name", "customStyle"])
  28465. ], true)
  28466. ])) : vue.createCommentVNode("v-if", true),
  28467. vue.createElementVNode("view", {
  28468. class: "u-input__content__field-wrapper",
  28469. onClick: _cache[6] || (_cache[6] = (...args) => $options.clickHandler && $options.clickHandler(...args))
  28470. }, [
  28471. vue.createCommentVNode(" 根据uni-app的input组件文档,H5和APP中只要声明了password参数(无论true还是false),type均失效,此时\n 为了防止type=number时,又存在password属性,type无效,此时需要设置password为undefined\n "),
  28472. vue.createElementVNode("input", {
  28473. ref: "input-native",
  28474. class: "u-input__content__field-wrapper__field",
  28475. style: vue.normalizeStyle([$options.inputStyle]),
  28476. type: $data.showPassword && "password" == _ctx.type ? "text" : _ctx.type,
  28477. focus: _ctx.focus,
  28478. cursor: _ctx.cursor,
  28479. value: $data.innerValue,
  28480. "auto-blur": _ctx.autoBlur,
  28481. disabled: _ctx.disabled || _ctx.readonly,
  28482. maxlength: _ctx.maxlength,
  28483. placeholder: _ctx.placeholder,
  28484. "placeholder-style": _ctx.placeholderStyle,
  28485. "placeholder-class": _ctx.placeholderClass,
  28486. "confirm-type": _ctx.confirmType,
  28487. "confirm-hold": _ctx.confirmHold,
  28488. "hold-keyboard": _ctx.holdKeyboard,
  28489. "cursor-color": _ctx.cursorColor,
  28490. "cursor-spacing": _ctx.cursorSpacing,
  28491. "adjust-position": _ctx.adjustPosition,
  28492. "selection-end": _ctx.selectionEnd,
  28493. "selection-start": _ctx.selectionStart,
  28494. password: $options.isPassword,
  28495. ignoreCompositionEvent: _ctx.ignoreCompositionEvent,
  28496. onInput: _cache[0] || (_cache[0] = (...args) => $options.onInput && $options.onInput(...args)),
  28497. onBlur: _cache[1] || (_cache[1] = (...args) => $options.onBlur && $options.onBlur(...args)),
  28498. onFocus: _cache[2] || (_cache[2] = (...args) => $options.onFocus && $options.onFocus(...args)),
  28499. onConfirm: _cache[3] || (_cache[3] = (...args) => $options.onConfirm && $options.onConfirm(...args)),
  28500. onKeyboardheightchange: _cache[4] || (_cache[4] = (...args) => $options.onkeyboardheightchange && $options.onkeyboardheightchange(...args)),
  28501. onNicknamereview: _cache[5] || (_cache[5] = (...args) => $options.onnicknamereview && $options.onnicknamereview(...args))
  28502. }, null, 44, ["type", "focus", "cursor", "value", "auto-blur", "disabled", "maxlength", "placeholder", "placeholder-style", "placeholder-class", "confirm-type", "confirm-hold", "hold-keyboard", "cursor-color", "cursor-spacing", "adjust-position", "selection-end", "selection-start", "password", "ignoreCompositionEvent"])
  28503. ]),
  28504. $options.isShowClear ? (vue.openBlock(), vue.createElementBlock("view", {
  28505. key: 1,
  28506. class: "u-input__content__clear",
  28507. onClick: _cache[7] || (_cache[7] = (...args) => $options.onClear && $options.onClear(...args))
  28508. }, [
  28509. vue.createVNode(_component_up_icon, {
  28510. name: "close",
  28511. size: "11",
  28512. color: "#ffffff",
  28513. customStyle: "line-height: 12px"
  28514. })
  28515. ])) : vue.createCommentVNode("v-if", true),
  28516. (_ctx.type == "password" || _ctx.password) && _ctx.passwordVisibilityToggle ? (vue.openBlock(), vue.createElementBlock("view", {
  28517. key: 2,
  28518. class: "u-input__content__subfix-password-shower"
  28519. }, [
  28520. vue.createVNode(_component_up_icon, {
  28521. onClick: _cache[8] || (_cache[8] = ($event) => $data.showPassword = !$data.showPassword),
  28522. name: $data.showPassword ? "eye-off" : "eye-fill",
  28523. size: "18"
  28524. }, null, 8, ["name"])
  28525. ])) : vue.createCommentVNode("v-if", true),
  28526. _ctx.suffixIcon || _ctx.$slots.suffix ? (vue.openBlock(), vue.createElementBlock("view", {
  28527. key: 3,
  28528. class: "u-input__content__subfix-icon"
  28529. }, [
  28530. vue.renderSlot(_ctx.$slots, "suffix", {}, () => [
  28531. vue.createVNode(_component_up_icon, {
  28532. name: _ctx.suffixIcon,
  28533. size: "18",
  28534. customStyle: _ctx.suffixIconStyle
  28535. }, null, 8, ["name", "customStyle"])
  28536. ], true)
  28537. ])) : vue.createCommentVNode("v-if", true)
  28538. ])
  28539. ],
  28540. 6
  28541. /* CLASS, STYLE */
  28542. );
  28543. }
  28544. const uInput = /* @__PURE__ */ _export_sfc(_sfc_main$1g, [["render", _sfc_render$1f], ["__scopeId", "data-v-df79975b"], ["__file", "C:/Users/EDY/Desktop/项目/shuibei/uni_modules/uview-plus/components/u-input/u-input.vue"]]);
  28545. const __vite_glob_0_51 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
  28546. __proto__: null,
  28547. default: uInput
  28548. }, Symbol.toStringTag, { value: "Module" }));
  28549. const props$M = defineMixin({
  28550. props: {
  28551. // 键盘的类型,number-数字键盘,card-身份证键盘
  28552. mode: {
  28553. type: String,
  28554. default: () => props$1x.numberKeyboard.value
  28555. },
  28556. // 是否显示键盘的"."符号
  28557. dotDisabled: {
  28558. type: Boolean,
  28559. default: () => props$1x.numberKeyboard.dotDisabled
  28560. },
  28561. // 是否打乱键盘按键的顺序
  28562. random: {
  28563. type: Boolean,
  28564. default: () => props$1x.numberKeyboard.random
  28565. }
  28566. }
  28567. });
  28568. const _sfc_main$1f = {
  28569. name: "u-number-keyboard",
  28570. mixins: [mpMixin, mixin, props$M],
  28571. data() {
  28572. return {
  28573. backspace: "backspace",
  28574. // 退格键内容
  28575. dot: ".",
  28576. // 点
  28577. timer: null,
  28578. // 长按多次删除的事件监听
  28579. cardX: "X"
  28580. // 身份证的X符号
  28581. };
  28582. },
  28583. computed: {
  28584. // 键盘需要显示的内容
  28585. numList() {
  28586. if (this.dotDisabled && this.mode == "number") {
  28587. if (!this.random) {
  28588. return [1, 2, 3, 4, 5, 6, 7, 8, 9, 0];
  28589. } else {
  28590. return randomArray([1, 2, 3, 4, 5, 6, 7, 8, 9, 0]);
  28591. }
  28592. } else if (!this.dotDisabled && this.mode == "number") {
  28593. if (!this.random) {
  28594. return [1, 2, 3, 4, 5, 6, 7, 8, 9, this.dot, 0];
  28595. } else {
  28596. return randomArray([1, 2, 3, 4, 5, 6, 7, 8, 9, this.dot, 0]);
  28597. }
  28598. } else if (this.mode == "card") {
  28599. if (!this.random) {
  28600. return [1, 2, 3, 4, 5, 6, 7, 8, 9, this.cardX, 0];
  28601. } else {
  28602. return randomArray([1, 2, 3, 4, 5, 6, 7, 8, 9, this.cardX, 0]);
  28603. }
  28604. }
  28605. },
  28606. // 按键的样式,在非乱序&&数字键盘&&不显示点按钮时,index为9时,按键占位两个空间
  28607. itemStyle() {
  28608. return (index2) => {
  28609. let style = {};
  28610. if (this.mode == "number" && this.dotDisabled && index2 == 9)
  28611. style.width = "464rpx";
  28612. return style;
  28613. };
  28614. },
  28615. // 是否让按键显示灰色,只在非乱序&&数字键盘&&且允许点按键的时候
  28616. btnBgGray() {
  28617. return (index2) => {
  28618. if (!this.random && index2 == 9 && (this.mode != "number" || this.mode == "number" && !this.dotDisabled))
  28619. return true;
  28620. else
  28621. return false;
  28622. };
  28623. }
  28624. },
  28625. created() {
  28626. },
  28627. emits: ["backspace", "change"],
  28628. methods: {
  28629. // 点击退格键
  28630. backspaceClick() {
  28631. this.$emit("backspace");
  28632. clearInterval(this.timer);
  28633. this.timer = null;
  28634. this.timer = setInterval(() => {
  28635. this.$emit("backspace");
  28636. }, 250);
  28637. },
  28638. clearTimer() {
  28639. clearInterval(this.timer);
  28640. this.timer = null;
  28641. },
  28642. // 获取键盘显示的内容
  28643. keyboardClick(val) {
  28644. if (!this.dotDisabled && val != this.dot && val != this.cardX)
  28645. val = Number(val);
  28646. this.$emit("change", val);
  28647. }
  28648. }
  28649. };
  28650. function _sfc_render$1e(_ctx, _cache, $props, $setup, $data, $options) {
  28651. const _component_up_icon = vue.resolveComponent("up-icon");
  28652. return vue.openBlock(), vue.createElementBlock(
  28653. "view",
  28654. {
  28655. class: "u-keyboard",
  28656. onTouchmove: _cache[2] || (_cache[2] = vue.withModifiers((...args) => _ctx.noop && _ctx.noop(...args), ["stop", "prevent"]))
  28657. },
  28658. [
  28659. (vue.openBlock(true), vue.createElementBlock(
  28660. vue.Fragment,
  28661. null,
  28662. vue.renderList($options.numList, (item, index2) => {
  28663. return vue.openBlock(), vue.createElementBlock("view", {
  28664. class: "u-keyboard__button-wrapper",
  28665. key: index2
  28666. }, [
  28667. vue.createElementVNode("view", {
  28668. class: "u-keyboard__button-wrapper__button",
  28669. style: vue.normalizeStyle([$options.itemStyle(index2)]),
  28670. onClick: ($event) => $options.keyboardClick(item),
  28671. "hover-class": "u-hover-class",
  28672. "hover-stay-time": 200
  28673. }, [
  28674. vue.createElementVNode(
  28675. "text",
  28676. { class: "u-keyboard__button-wrapper__button__text" },
  28677. vue.toDisplayString(item),
  28678. 1
  28679. /* TEXT */
  28680. )
  28681. ], 12, ["onClick"])
  28682. ]);
  28683. }),
  28684. 128
  28685. /* KEYED_FRAGMENT */
  28686. )),
  28687. vue.createElementVNode("view", { class: "u-keyboard__button-wrapper" }, [
  28688. vue.createElementVNode(
  28689. "view",
  28690. {
  28691. class: "u-keyboard__button-wrapper__button u-keyboard__button-wrapper__button--gray",
  28692. "hover-class": "u-hover-class",
  28693. "hover-stay-time": 200,
  28694. onTouchstart: _cache[0] || (_cache[0] = vue.withModifiers((...args) => $options.backspaceClick && $options.backspaceClick(...args), ["stop"])),
  28695. onTouchend: _cache[1] || (_cache[1] = (...args) => $options.clearTimer && $options.clearTimer(...args))
  28696. },
  28697. [
  28698. vue.createVNode(_component_up_icon, {
  28699. name: "backspace",
  28700. color: "#303133",
  28701. size: "28"
  28702. })
  28703. ],
  28704. 32
  28705. /* NEED_HYDRATION */
  28706. )
  28707. ])
  28708. ],
  28709. 32
  28710. /* NEED_HYDRATION */
  28711. );
  28712. }
  28713. const __easycom_0$3 = /* @__PURE__ */ _export_sfc(_sfc_main$1f, [["render", _sfc_render$1e], ["__scopeId", "data-v-d73731be"], ["__file", "C:/Users/EDY/Desktop/项目/shuibei/uni_modules/uview-plus/components/u-number-keyboard/u-number-keyboard.vue"]]);
  28714. const __vite_glob_0_71 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
  28715. __proto__: null,
  28716. default: __easycom_0$3
  28717. }, Symbol.toStringTag, { value: "Module" }));
  28718. const props$L = defineMixin({
  28719. props: {
  28720. // 键盘的类型,number-数字键盘,card-身份证键盘,car-车牌号键盘
  28721. mode: {
  28722. type: String,
  28723. default: () => props$1x.keyboard.mode
  28724. },
  28725. // 是否显示键盘的"."符号
  28726. dotDisabled: {
  28727. type: Boolean,
  28728. default: () => props$1x.keyboard.dotDisabled
  28729. },
  28730. // 是否显示顶部工具条
  28731. tooltip: {
  28732. type: Boolean,
  28733. default: () => props$1x.keyboard.tooltip
  28734. },
  28735. // 是否显示工具条中间的提示
  28736. showTips: {
  28737. type: Boolean,
  28738. default: () => props$1x.keyboard.showTips
  28739. },
  28740. // 工具条中间的提示文字
  28741. tips: {
  28742. type: String,
  28743. default: () => props$1x.keyboard.tips
  28744. },
  28745. // 是否显示工具条左边的"取消"按钮
  28746. showCancel: {
  28747. type: Boolean,
  28748. default: () => props$1x.keyboard.showCancel
  28749. },
  28750. // 是否显示工具条右边的"完成"按钮
  28751. showConfirm: {
  28752. type: Boolean,
  28753. default: () => props$1x.keyboard.showConfirm
  28754. },
  28755. // 是否打乱键盘按键的顺序
  28756. random: {
  28757. type: Boolean,
  28758. default: () => props$1x.keyboard.random
  28759. },
  28760. // 是否开启底部安全区适配,开启的话,会在iPhoneX机型底部添加一定的内边距
  28761. safeAreaInsetBottom: {
  28762. type: Boolean,
  28763. default: () => props$1x.keyboard.safeAreaInsetBottom
  28764. },
  28765. // 是否允许通过点击遮罩关闭键盘
  28766. closeOnClickOverlay: {
  28767. type: Boolean,
  28768. default: () => props$1x.keyboard.closeOnClickOverlay
  28769. },
  28770. // 控制键盘的弹出与收起
  28771. show: {
  28772. type: Boolean,
  28773. default: () => props$1x.keyboard.show
  28774. },
  28775. // 是否显示遮罩,某些时候数字键盘时,用户希望看到自己的数值,所以可能不想要遮罩
  28776. overlay: {
  28777. type: Boolean,
  28778. default: () => props$1x.keyboard.overlay
  28779. },
  28780. // z-index值
  28781. zIndex: {
  28782. type: [String, Number],
  28783. default: () => props$1x.keyboard.zIndex
  28784. },
  28785. // 取消按钮的文字
  28786. cancelText: {
  28787. type: String,
  28788. default: () => props$1x.keyboard.cancelText
  28789. },
  28790. // 确认按钮的文字
  28791. confirmText: {
  28792. type: String,
  28793. default: () => props$1x.keyboard.confirmText
  28794. },
  28795. // 输入一个中文后,是否自动切换到英文
  28796. autoChange: {
  28797. type: Boolean,
  28798. default: () => props$1x.keyboard.autoChange
  28799. }
  28800. }
  28801. });
  28802. const _sfc_main$1e = {
  28803. name: "u-keyboard",
  28804. data() {
  28805. return {};
  28806. },
  28807. mixins: [mpMixin, mixin, props$L],
  28808. emits: ["change", "close", "confirm", "cancel", "backspace"],
  28809. methods: {
  28810. change(e2) {
  28811. this.$emit("change", e2);
  28812. },
  28813. // 键盘关闭
  28814. popupClose() {
  28815. this.$emit("close");
  28816. },
  28817. // 输入完成
  28818. onConfirm() {
  28819. this.$emit("confirm");
  28820. },
  28821. // 取消输入
  28822. onCancel() {
  28823. this.$emit("cancel");
  28824. },
  28825. // 退格键
  28826. backspace() {
  28827. this.$emit("backspace");
  28828. }
  28829. }
  28830. };
  28831. function _sfc_render$1d(_ctx, _cache, $props, $setup, $data, $options) {
  28832. const _component_u_number_keyboard = resolveEasycom(vue.resolveDynamicComponent("u-number-keyboard"), __easycom_0$3);
  28833. const _component_u_car_keyboard = resolveEasycom(vue.resolveDynamicComponent("u-car-keyboard"), __easycom_1$2);
  28834. const _component_u_popup = resolveEasycom(vue.resolveDynamicComponent("u-popup"), __easycom_2);
  28835. return vue.openBlock(), vue.createBlock(_component_u_popup, {
  28836. overlay: _ctx.overlay,
  28837. closeOnClickOverlay: _ctx.closeOnClickOverlay,
  28838. mode: "bottom",
  28839. popup: false,
  28840. show: _ctx.show,
  28841. safeAreaInsetBottom: _ctx.safeAreaInsetBottom,
  28842. onClose: $options.popupClose,
  28843. zIndex: _ctx.zIndex,
  28844. customStyle: {
  28845. backgroundColor: "rgb(214, 218, 220)"
  28846. }
  28847. }, {
  28848. default: vue.withCtx(() => [
  28849. vue.createElementVNode("view", { class: "u-keyboard" }, [
  28850. vue.renderSlot(_ctx.$slots, "default", {}, void 0, true),
  28851. _ctx.tooltip ? (vue.openBlock(), vue.createElementBlock("view", {
  28852. key: 0,
  28853. class: "u-keyboard__tooltip"
  28854. }, [
  28855. vue.createElementVNode("view", {
  28856. "hover-class": "u-hover-class",
  28857. "hover-stay-time": 100
  28858. }, [
  28859. _ctx.showCancel ? (vue.openBlock(), vue.createElementBlock(
  28860. "text",
  28861. {
  28862. key: 0,
  28863. class: "u-keyboard__tooltip__item u-keyboard__tooltip__cancel",
  28864. onClick: _cache[0] || (_cache[0] = (...args) => $options.onCancel && $options.onCancel(...args))
  28865. },
  28866. vue.toDisplayString(_ctx.showCancel && _ctx.cancelText),
  28867. 1
  28868. /* TEXT */
  28869. )) : vue.createCommentVNode("v-if", true)
  28870. ]),
  28871. vue.createElementVNode("view", null, [
  28872. _ctx.showTips ? (vue.openBlock(), vue.createElementBlock(
  28873. "text",
  28874. {
  28875. key: 0,
  28876. class: "u-keyboard__tooltip__item u-keyboard__tooltip__tips"
  28877. },
  28878. vue.toDisplayString(_ctx.tips ? _ctx.tips : _ctx.mode == "number" ? "数字键盘" : _ctx.mode == "card" ? "身份证键盘" : "车牌号键盘"),
  28879. 1
  28880. /* TEXT */
  28881. )) : vue.createCommentVNode("v-if", true)
  28882. ]),
  28883. vue.createElementVNode("view", {
  28884. "hover-class": "u-hover-class",
  28885. "hover-stay-time": 100
  28886. }, [
  28887. _ctx.showConfirm ? (vue.openBlock(), vue.createElementBlock(
  28888. "text",
  28889. {
  28890. key: 0,
  28891. onClick: _cache[1] || (_cache[1] = (...args) => $options.onConfirm && $options.onConfirm(...args)),
  28892. class: "u-keyboard__tooltip__item u-keyboard__tooltip__submit",
  28893. "hover-class": "u-hover-class"
  28894. },
  28895. vue.toDisplayString(_ctx.showConfirm && _ctx.confirmText),
  28896. 1
  28897. /* TEXT */
  28898. )) : vue.createCommentVNode("v-if", true)
  28899. ])
  28900. ])) : vue.createCommentVNode("v-if", true),
  28901. _ctx.mode == "number" || _ctx.mode == "card" ? (vue.openBlock(), vue.createBlock(_component_u_number_keyboard, {
  28902. key: 1,
  28903. random: _ctx.random,
  28904. onBackspace: $options.backspace,
  28905. onChange: $options.change,
  28906. mode: _ctx.mode,
  28907. dotDisabled: _ctx.dotDisabled
  28908. }, null, 8, ["random", "onBackspace", "onChange", "mode", "dotDisabled"])) : (vue.openBlock(), vue.createBlock(_component_u_car_keyboard, {
  28909. key: 2,
  28910. random: _ctx.random,
  28911. autoChange: _ctx.autoChange,
  28912. onBackspace: $options.backspace,
  28913. onChange: $options.change
  28914. }, null, 8, ["random", "autoChange", "onBackspace", "onChange"]))
  28915. ])
  28916. ]),
  28917. _: 3
  28918. /* FORWARDED */
  28919. }, 8, ["overlay", "closeOnClickOverlay", "show", "safeAreaInsetBottom", "onClose", "zIndex", "customStyle"]);
  28920. }
  28921. const uKeyboard = /* @__PURE__ */ _export_sfc(_sfc_main$1e, [["render", _sfc_render$1d], ["__scopeId", "data-v-5c3a4793"], ["__file", "C:/Users/EDY/Desktop/项目/shuibei/uni_modules/uview-plus/components/u-keyboard/u-keyboard.vue"]]);
  28922. const __vite_glob_0_52 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
  28923. __proto__: null,
  28924. default: uKeyboard
  28925. }, Symbol.toStringTag, { value: "Module" }));
  28926. const _sfc_main$1d = {
  28927. name: "u-lazy-load",
  28928. props: {
  28929. index: {
  28930. type: [Number, String]
  28931. },
  28932. // 要显示的图片
  28933. image: {
  28934. type: String,
  28935. default: ""
  28936. },
  28937. // 图片裁剪模式
  28938. imgMode: {
  28939. type: String,
  28940. default: "widthFix"
  28941. },
  28942. // 占位图片路径
  28943. loadingImg: {
  28944. type: String,
  28945. default: "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAZAAAAGQCAMAAAC3Ycb+AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyJpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMy1jMDExIDY2LjE0NTY2MSwgMjAxMi8wMi8wNi0xNDo1NjoyNyAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENTNiAoV2luZG93cykiIHhtcE1NOkluc3RhbmNlSUQ9InhtcC5paWQ6OUM0QjNBQjkyQUQ2MTFFQTlCNUQ4RTIzNDE5RUIxNjciIHhtcE1NOkRvY3VtZW50SUQ9InhtcC5kaWQ6OUM0QjNBQkEyQUQ2MTFFQTlCNUQ4RTIzNDE5RUIxNjciPiA8eG1wTU06RGVyaXZlZEZyb20gc3RSZWY6aW5zdGFuY2VJRD0ieG1wLmlpZDo5QzRCM0FCNzJBRDYxMUVBOUI1RDhFMjM0MTlFQjE2NyIgc3RSZWY6ZG9jdW1lbnRJRD0ieG1wLmRpZDo5QzRCM0FCODJBRDYxMUVBOUI1RDhFMjM0MTlFQjE2NyIvPiA8L3JkZjpEZXNjcmlwdGlvbj4gPC9yZGY6UkRGPiA8L3g6eG1wbWV0YT4gPD94cGFja2V0IGVuZD0iciI/PtRHfPcAAAAzUExURZWVldfX18PDw62trZubm9zc3Li4uKGhoebm5tLS0uHh4c3Nzaenp729vcjIyLKysuvr6141L40AAAcXSURBVHja7NzZlqpGAEBR5lG0//9rIw7IJKJi4or7PGTdtN10wr5SVAEGf/qqArsAiIAAERAgAgJEQIAIiIAAERAgAgJEQIAIiIAAERAgAgJEQIAIiIAAERAgAgJEQIAIiIAAERAgAgJEQIAIiIAAERAgAgJEQIAIiIAAERAgAgJEQIAIiIAAERAgAgJEQIAIiIAAERAgAgJEQIAIiIAAERAgAgJEQIAICBABERAgAgJEQIAICBABERAgAgJEQIAICBABERAgAgJEQIAICBABERAgAgJEQIAICBABERAgAgJEQIAICBABERAgAgJEQIAICBABERAgAgJEQIAICBABERAgAgJEQIAICBABERAg+nmQFMi5Jis+sIniED23jSzIgLTtg2D//iYme/8QBM/9lQ+CAEhbNLM3N9hEHAThX7GPCiBfAxK1b51kD+R7QMLjXg7iCsgWIPUh7pfVozG791oeBPngm48G583uW5GkBvI+SBaM2xXDn1oqum423bX/mgF5FySc2cv93Voug9TdZotsggnkBZB2NzbhrSY5HnoG07jei8dvzsJB/c3W60SALILE46+WCztsbhPR7R2VJq0ukEcT49nyy8QhaKcRa3fYHZD4+ufqOJAcgDz8/59vtw1I3QP5K6JsOG0vm3hce4I8LQp/BaRZGJC3AAn7IKOKXbC+7EdA5vdmmVwOLksgRThqOqiH4XEGsht+peoPUE8U/jJIO5OLH4GEwUslV5G0PTBG5Uiw/Y2jyigO3l9HAHKv9PYb82LloH74dZBoBUgar+l48NsNvtD0fkez9iwrAvIYZDRCl+Xs149Hm/KZmQ+QjUCiO1ei4ru7EsgnQYrkznlQb7thCuRfAzlOAPN72427P4VA/i2Q/DKT/Ls/VR8fvIBsDZIuz7TPF6TCbnk4GJkB2RokejTjuE7/unlgCuSTIO0Cy+Plp6vDfnQlBchy8QtjSHVd3EgmK1bHLm+H6+nXYbz2DuQRSPnqoL7vvq0u70on4zvxgCyWD3b9UyDVdW24PaWaiGTnFZJwPIQAebDpIKheBIm7n124ZthMJipAlkqHO+IZkP1tbfzOJark/A7MgKyvvl60fRqkvXfhuow+t9+q00+0/yyBrK8ZngOtBzldhw2X9tvpNGty0gvkmbPeJ0Cy/r09s/stbmfo0yMWkEdjevgKyOn2t2pxv7UXoibTdCDLje9/Ww1ymqzn87dbp92242ZmMRjI8hASvwKSLq4udqN6ksw8nxXN3tszD9L8Gkg+2mFrQYql5az4tvFj5xOx4VwnSdeBtGdyPwUytxK77pBVlNHdO7OK3rh/eTPUvdutT3fO52tuHMqD4N7llv8pyOQQ//w19YVDfX27+Sfuby9/6nau4pdA8vEdOZuChEH/quHt0Jg+IRJ/5+PrHwKZXfjbDiS73Zo7mu5UkzX7uTsXe0e/7nC3ePf1O69+BUg2XDfZCqSqOu7rGVf8cHBe8zhC2b61dtUHXv0OkGo6ZL4JkpbRYXdUaFevivx2M/1GIOctNh949TtAoumQ+TpIHMX54CJu+8BDd8FkE5BqcZh/59XvAClmTvKfB0nDqIlHo3T70SftyW1eX9dXtgQJqs1f/Q6QaOa/7wmQKtxH8eiGoCRuovODIO3VxOMmruZbHrLyD7z6DSDtGyT7ew1kf9hNn07c986JTovzzem0Id9wUG+Vk/IDr34DSNR7huZJkMFT6vEhqrPx/j5cnlZML8N6/PAzh9Y99Flm5Yde/c9BquDOkvkKkMP58dA4qi9vivE8JOvGz/j8FokfPpr288+pH2ZPOZrLmeGD+7KOh6dqYWJ48ki7yUg0tz0go/fv/LLddfV3sgOLJyaGPY/zrSlh1a36Arkzoue9CyG35ze6E6/dzO2Ga0EGHqdRJIkfn9/8OEjTW8Vq91ZWh39FeehWA7Nu9ft8CpUEk1WWOyDF0OPyEU2Pnzf/bZC0P6IPzmAvu7KauQBVrgKpJ0tG2arHzX8e5Pb3PezNs/PrX+3JMyCLn9XXf37tPFHvt09WfCDDjx+yyn1/p1V11j7GnB/q3leLuVva79S/tzed+db08YpF4uOZtmz/9oXWMq6BCAgQAQEiIEAERECACAgQAQEiIEAERECACAgQAQEiIEAERECACAgQAQEiIEAERECACAgQAQEiIEAERECACAgQAQEiIEAERECACAgQAQEiIEAERECACAgQAQEiIEAERECACAgQAQEiIEAERECACAgQAQEiIEAEBIiACAgQAQEiIEAEBIiACAgQAQEiIEAEBIiACAgQAQEiIEAEBIiACAgQAQEiIEAEBIiACAgQAQEiIEAEBIiACAgQAQEiIEAEBIiACAgQAQEiIEAEBIiACAgQAQEiIEAEBIiACAgQAQEiIEAEBIiAALELvqt/BBgACqVeUBXxcCkAAAAASUVORK5CYII="
  28946. },
  28947. // 加载失败的错误占位图
  28948. errorImg: {
  28949. type: String,
  28950. default: "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAZAAAAGQCAMAAAC3Ycb+AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyJpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMy1jMDExIDY2LjE0NTY2MSwgMjAxMi8wMi8wNi0xNDo1NjoyNyAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENTNiAoV2luZG93cykiIHhtcE1NOkluc3RhbmNlSUQ9InhtcC5paWQ6ODdDMjhENDYyQUQ2MTFFQTlDQ0VBODgxQjFFOEEyMEMiIHhtcE1NOkRvY3VtZW50SUQ9InhtcC5kaWQ6ODdDMjhENDcyQUQ2MTFFQTlDQ0VBODgxQjFFOEEyMEMiPiA8eG1wTU06RGVyaXZlZEZyb20gc3RSZWY6aW5zdGFuY2VJRD0ieG1wLmlpZDo4N0MyOEQ0NDJBRDYxMUVBOUNDRUE4ODFCMUU4QTIwQyIgc3RSZWY6ZG9jdW1lbnRJRD0ieG1wLmRpZDo4N0MyOEQ0NTJBRDYxMUVBOUNDRUE4ODFCMUU4QTIwQyIvPiA8L3JkZjpEZXNjcmlwdGlvbj4gPC9yZGY6UkRGPiA8L3g6eG1wbWV0YT4gPD94cGFja2V0IGVuZD0iciI/PhLwhikAAAAzUExURZWVldfX162trcPDw5ubm7i4uNzc3Obm5s3NzaGhoeHh4cjIyKenp9LS0r29vbKysuvr67sDMEkAAAlpSURBVHja7NzpYqMgAIVRUVHc8/5PO66R1WAbOzX97q+ZtDEpR0AWTR7kVyWhCAAhgABCAAGEAAIIAQQQAggBBBACCCAEEEAIIIAQQAgggBBAACGAAEIAAYQAQgABhAACCAEEEAIIIAQQAgggBBBACCCAEEAAIYAQQAAhgABCAAGEAAIIAYQAAggBBBACCCAEEEAIIAQQQAgggBBAACGAAEIAIYAAQgABhAACCAEEEAIIAQQQAgggBBBACCCAEEAAIYAQQAAhgABCAAGEAAIIAYQAAggBBBACCCAEEEAIIAQQQAgggBBAACGAAEIAIYAAQgABhAACCAEEEAIIAQQQAgggBBBACCCAEEAIIIAQQAAhgABCAAGEAEIAAYQAAggBBBACCCAEEAIIIAQQQAgggBBAACGAEEAAIYAAsqeX5QWHKIcs/Ptl03lfL4zDFPWfBGmSpPn+IZzSH5KkCL5B+n+oklwz6Iz//R2QzFOabzhEmiRirAmZt/bl0w/dpMbLqeeo4wEdpC7zR5WAPKziHKtO7ql+ReKvIa9BxgNaL5ZtEkpeAGIVp5jKJa09xVo9vgSSzQcszdYvmOqjQNSQ6pHK6rO1n1Xj32788miwHLaZz1Tl9i/yayDlYJ/60/+lp8GSY7OY1B8E4p55bWmfquFk22GLuUUxi78cX+m+BjL2GLkhMrV+/muS6Sfic0CEp5T1Yu2OQdTzsKV0MJV73KVjroyTffxfuv5Tf3fd6iLT9wz8YdVHgUzF2Is9/Xhi5sYJqP1w/GUpjOiHVbaI0w2L+pg3GZzvtokcgHxWDXHaiy78l3sPke01qphamT5c+dqyeAGSumdL/mkggauTam0e3L/mPEiqtzKDbl0Z1Wn8xOa4ySo8X/7TQIJnY/seEKWf12UmC72CKP9xYjr19RPT7NNA+oMO+R0gwmlotAry+C6I0f59ch8yXVQOr0BKYcXt1IUYRyCt+Ur9HGsrQKI79WY9sY9ARPKlzFOFdb41ioD8b5Bp+mqeeRKAxINkESBFGpOpKhgv9OuYpH8A8l4Qa3qp60Kl2/k+rG2sWafuuyCBafb2j4JkgZUob3nWcmicpkxEgmTLLGejTxnWSWCi8lPmsk6DlIHFJv24ojiYyYoGacwL8zXTLEAVaDI/Ybb3NIgKDSv2oXpmHkvNs+PTpMASEdlk7fOZeRk37fwJ6yGnQarQsGIfqqcvx43rTOXY6jf7uKXdRzdLDRPbjIrx1cIj3Kr4KyBFezzgUGuR5893qkOQ19fR2uVBaU+r16LphJNOiatK7PeBZK/Kb+tUn71rcQjSvARpghfH/yG/D2RetTuI3N5QrMWdP46brP7FmKZ//CGQ9At9SL01DLkzY/Vs8Z97fQZ7gelw7jHqCz+/Wile5J4g3Vc79eb5a6oLSue+Ve83gaSv2jp5PxCzjzwFUm9zw9MllSMil1kS4d2E9SaQ1xNo9wMxx0+nQNLnew/WDHvveMAHYm08mofl3TFI/8pD3Q6kMAv6DIi2jTCwRJUvNdDYrrJum9oHhusCbWALonwxBRk1vXMnEGWuT5wAmfYuVGUYpJ7fUZujCN92hvzwWlrFgxSfANKb10DxIMbShnfrynyZZV30imA7P43ArXXHbvBVkTCIuGy25AdBrHmNeBCpL214QdLp9LZarG3IMWrmW0ehtuO7F2PS09UcgqS3B7FKPhpknrStD0HGF/vQRne37LwLG8EbHT4WxN7/Fg0yD9Yr/3br4nnstA+0Il6QxzdBmg8A6a2/IRbkcK9h/uzV8zywF/oSkOyageCPglRWgcWClHnEzs9q/t/SENVXgFijlsq3VtXdCsRp4qObrLLLgjuzSq3fX89ZZW6AfxNIzF6X9FYgThN/fk093KkvHX/hbWd+DqS/FUhlf+G3gohEXzVs3g9iDluWoaW8fL73QhB34u+tIHIf19nLuF4Q98a09Eynnl56q+ePgEhnX+dbQOp6H5XnJ0ACd8dFgkwf12nTOTcEqd2pom+CFF02TIPw6dKmrLS5qOtBpo8b5quUtrwrSGbuqPkeSJqllTFHO02NPxdMrm+y5LKdWyWXjw4vA5nGEtnjuyCFyHqNYvEolzmASm3zK1Eg5zr13lhqV1tlksnVw8Pkwgri7O07AVKLJkutRYw87bPlRpBpNXE8xGb+fhBlvEGrGPLqViu5sILIx9dAmqF1705sxF4M8+R8P5dOdQwi12fMnATpjJ2JSt/POIvU9wPJEs/jduJAjLvU0yFT0i64Yb1bsVi79dA4pEy3TzoHMq2O7Re4vXm5O9+l290NpE4CU+YRIMNye2iaqbVS2AUnn2fsekthYKReVNutVedA5juttyIXrT38mOds+ps9DWhwL7GWc61/DVKPzVN9UHDarf1icU98IOU8tm6L031Iq63t1tKzj3fe/FCpO4F0/i0Z2+yvA1KeGBjqj1qYx8/zoxpKZ1Yl367I1k+sfcft/QPy9csXy/32qX1qLZsrryG5BGQaRj0vc/b7N54XXq293TCLB5HO42Fy517obW19b+qjl3CHp0fdLJcWvmdy1etESi/uAdJrs1hTaUklHuW8qSDdC3UfXVR5cnD3rAFSSqtFb7z7eapErx7rC739jCXfbK3aWiipjXo8UbmxXPa7QQq9R289j2Gr88N7Ag5AlHPRKc37pNZv0CZtX1tVMG6rm8qW1/KlCgQvcMss933ybwXZz3dReW5yce4ByZtHFIhwT9kmjxg8BzbKDUe1PB9edBJqSN7/KM1LmqyuMZ5BpeTUw1aD/uDI0relPfSHa/Wn8Pxq1BNfxy/h3IdwOJqIKumb9CHvTqMefyY82RoQAgggBBBACCCAEEAAIYAQQAAhgABCAAGEAAIIAYQAAggBBBACCCAEEEAIIAQQQAgggBBAACGAAEIAIYAAQgABhAACCAEEEAIIAQQQAgggBBBACCCAEEAIIIAQQAAhgABCAAGEAEIAAYQAAggBBBACCCAEEAIIIAQQQAgggBBAACGAEEAAIYAAQgABhAACCAEEEAIIAQQQAgggBBBACCCAEEAIIIAQQAAhgABCAAGEAEIAAYQAAggBBBACCCAEEAIIIAQQQAgggBBAACGAEEAAIYAAQgABhAACCAGEAAIIAQQQAgggBBBACCAEEEAIIIAQQAAhgABCACGAAEIAAYQAAggBBBACCAEEEAIIIAQQQAggfyL/BBgA8PgLdH0TBtkAAAAASUVORK5CYII="
  28951. },
  28952. // 图片进入可见区域前多少像素时,单位rpx,开始加载图片
  28953. // 负数为图片超出屏幕底部多少距离后触发懒加载,正数为图片顶部距离屏幕底部多少距离时触发(图片还没出现在屏幕上)
  28954. threshold: {
  28955. type: [Number, String],
  28956. default: 100
  28957. },
  28958. // 淡入淡出动画的过渡时间
  28959. duration: {
  28960. type: [Number, String],
  28961. default: 500
  28962. },
  28963. // 渡效果的速度曲线,各个之间差别不大,因为这是淡入淡出,且时间很短,不是那些变形或者移动的情况,会明显
  28964. // linear|ease|ease-in|ease-out|ease-in-out|cubic-bezier(n,n,n,n);
  28965. effect: {
  28966. type: String,
  28967. default: "ease-in-out"
  28968. },
  28969. // 是否使用过渡效果
  28970. isEffect: {
  28971. type: Boolean,
  28972. default: true
  28973. },
  28974. // 圆角值
  28975. borderRadius: {
  28976. type: [Number, String],
  28977. default: 0
  28978. },
  28979. // 图片高度,单位rpx
  28980. height: {
  28981. type: [Number, String],
  28982. default: "200"
  28983. }
  28984. },
  28985. data() {
  28986. return {
  28987. isShow: false,
  28988. opacity: 1,
  28989. time: this.duration,
  28990. loadStatus: "",
  28991. // 默认是懒加载中的状态
  28992. isError: false,
  28993. // 图片加载失败
  28994. elIndex: guid()
  28995. };
  28996. },
  28997. computed: {
  28998. // 将threshold从rpx转为px
  28999. getThreshold() {
  29000. let thresholdPx = uni.upx2px(Math.abs(this.threshold));
  29001. return this.threshold < 0 ? -thresholdPx : thresholdPx;
  29002. },
  29003. // 计算图片的高度,可能为auto,带%,或者直接数值
  29004. imgHeight() {
  29005. return addUnit(this.height);
  29006. }
  29007. },
  29008. created() {
  29009. this.observer = {};
  29010. },
  29011. watch: {
  29012. isShow(nVal) {
  29013. if (!this.isEffect)
  29014. return;
  29015. this.time = 0;
  29016. this.opacity = 0;
  29017. setTimeout(() => {
  29018. this.time = this.duration;
  29019. this.opacity = 1;
  29020. }, 30);
  29021. },
  29022. // 图片路径发生变化时,需要重新标记一些变量,否则会一直卡在某一个状态,比如isError
  29023. image(n2) {
  29024. if (!n2) {
  29025. this.isError = true;
  29026. } else {
  29027. this.init();
  29028. this.isError = false;
  29029. }
  29030. }
  29031. },
  29032. emits: ["click", "load", "error"],
  29033. methods: {
  29034. // 用于重新初始化
  29035. init() {
  29036. this.isError = false;
  29037. this.loadStatus = "";
  29038. },
  29039. // 点击图片触发的事件,loadlazy-还是懒加载中状态,loading-图片正在加载,loaded-图片加加载完成
  29040. clickImg() {
  29041. if (this.isShow == false)
  29042. ;
  29043. else if (this.isError == true)
  29044. ;
  29045. else
  29046. ;
  29047. this.$emit("click", this.index);
  29048. },
  29049. // 图片加载完成事件,可能是加载占位图时触发,也可能是加载真正的图片完成时触发,通过isShow区分
  29050. imgLoaded() {
  29051. if (this.loadStatus == "") {
  29052. this.loadStatus = "lazyed";
  29053. } else if (this.loadStatus == "lazyed") {
  29054. this.loadStatus = "loaded";
  29055. this.$emit("load", this.index);
  29056. }
  29057. },
  29058. // 错误的图片加载完成
  29059. errorImgLoaded() {
  29060. this.$emit("error", this.index);
  29061. },
  29062. // 图片加载失败
  29063. loadError() {
  29064. this.isError = true;
  29065. },
  29066. disconnectObserver(observerName) {
  29067. const observer = this[observerName];
  29068. observer && observer.disconnect();
  29069. }
  29070. },
  29071. beforeUnmount() {
  29072. },
  29073. mounted() {
  29074. this.$nextTick(() => {
  29075. uni.$once("uOnReachBottom", () => {
  29076. if (!this.isShow)
  29077. this.isShow = true;
  29078. });
  29079. });
  29080. setTimeout(() => {
  29081. const contentObserver = uni.createIntersectionObserver(this);
  29082. contentObserver.relativeToViewport({
  29083. bottom: this.getThreshold
  29084. }).observe(".u-lazy-item-" + this.elIndex, (res) => {
  29085. if (res.intersectionRatio > 0) {
  29086. this.isShow = true;
  29087. if (!this.image) {
  29088. this.loadError();
  29089. }
  29090. this.disconnectObserver("contentObserver");
  29091. }
  29092. });
  29093. this.contentObserver = contentObserver;
  29094. }, 30);
  29095. }
  29096. };
  29097. function _sfc_render$1c(_ctx, _cache, $props, $setup, $data, $options) {
  29098. return vue.openBlock(), vue.createElementBlock(
  29099. "view",
  29100. {
  29101. class: vue.normalizeClass(["u-wrap", "u-lazy-item-" + $data.elIndex]),
  29102. style: vue.normalizeStyle({
  29103. opacity: Number($data.opacity),
  29104. borderRadius: $props.borderRadius + "rpx",
  29105. // 因为time值需要改变,所以不直接用duration值(不能改变父组件prop传过来的值)
  29106. transition: `opacity ${$data.time / 1e3}s ease-in-out`
  29107. })
  29108. },
  29109. [
  29110. vue.createElementVNode(
  29111. "view",
  29112. {
  29113. class: vue.normalizeClass("u-lazy-item-" + $data.elIndex)
  29114. },
  29115. [
  29116. !$data.isError ? (vue.openBlock(), vue.createElementBlock("image", {
  29117. key: 0,
  29118. style: vue.normalizeStyle({ borderRadius: $props.borderRadius + "rpx", height: $options.imgHeight }),
  29119. class: "u-lazy-item",
  29120. src: $data.isShow ? $props.image : $props.loadingImg,
  29121. mode: $props.imgMode,
  29122. onLoad: _cache[0] || (_cache[0] = (...args) => $options.imgLoaded && $options.imgLoaded(...args)),
  29123. onError: _cache[1] || (_cache[1] = (...args) => $options.loadError && $options.loadError(...args)),
  29124. onClick: _cache[2] || (_cache[2] = (...args) => $options.clickImg && $options.clickImg(...args))
  29125. }, null, 44, ["src", "mode"])) : (vue.openBlock(), vue.createElementBlock("image", {
  29126. key: 1,
  29127. style: vue.normalizeStyle({ borderRadius: $props.borderRadius + "rpx", height: $options.imgHeight }),
  29128. class: "u-lazy-item error",
  29129. src: $props.errorImg,
  29130. mode: $props.imgMode,
  29131. onLoad: _cache[3] || (_cache[3] = (...args) => $options.errorImgLoaded && $options.errorImgLoaded(...args)),
  29132. onClick: _cache[4] || (_cache[4] = (...args) => $options.clickImg && $options.clickImg(...args))
  29133. }, null, 44, ["src", "mode"]))
  29134. ],
  29135. 2
  29136. /* CLASS */
  29137. )
  29138. ],
  29139. 6
  29140. /* CLASS, STYLE */
  29141. );
  29142. }
  29143. const uLazyLoad = /* @__PURE__ */ _export_sfc(_sfc_main$1d, [["render", _sfc_render$1c], ["__scopeId", "data-v-8b9e8d2e"], ["__file", "C:/Users/EDY/Desktop/项目/shuibei/uni_modules/uview-plus/components/u-lazy-load/u-lazy-load.vue"]]);
  29144. const __vite_glob_0_53 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
  29145. __proto__: null,
  29146. default: uLazyLoad
  29147. }, Symbol.toStringTag, { value: "Module" }));
  29148. const props$K = defineMixin({
  29149. props: {
  29150. // 激活部分的颜色
  29151. activeColor: {
  29152. type: String,
  29153. default: () => props$1x.lineProgress.activeColor
  29154. },
  29155. inactiveColor: {
  29156. type: String,
  29157. default: () => props$1x.lineProgress.color
  29158. },
  29159. // 进度百分比,数值
  29160. percentage: {
  29161. type: [String, Number],
  29162. default: () => props$1x.lineProgress.inactiveColor
  29163. },
  29164. // 是否在进度条内部显示百分比的值
  29165. showText: {
  29166. type: Boolean,
  29167. default: () => props$1x.lineProgress.showText
  29168. },
  29169. // 进度条的高度,单位px
  29170. height: {
  29171. type: [String, Number],
  29172. default: () => props$1x.lineProgress.height
  29173. },
  29174. // 是否从右往左加载
  29175. fromRight: {
  29176. type: Boolean,
  29177. default: () => props$1x.lineProgress.fromRight
  29178. }
  29179. }
  29180. });
  29181. const _sfc_main$1c = {
  29182. name: "u-line-progress",
  29183. mixins: [mpMixin, mixin, props$K],
  29184. data() {
  29185. return {
  29186. lineWidth: 0
  29187. };
  29188. },
  29189. watch: {
  29190. percentage(n2) {
  29191. this.resizeProgressWidth();
  29192. }
  29193. },
  29194. computed: {
  29195. progressStyle() {
  29196. let style = {};
  29197. style.width = this.lineWidth;
  29198. style.backgroundColor = this.activeColor;
  29199. style.height = addUnit(this.height);
  29200. if (this.fromRight) {
  29201. style.right = 0;
  29202. } else {
  29203. style.left = 0;
  29204. }
  29205. return style;
  29206. },
  29207. innserPercentage() {
  29208. return range$1(0, 100, this.percentage);
  29209. }
  29210. },
  29211. mounted() {
  29212. this.init();
  29213. },
  29214. methods: {
  29215. addStyle,
  29216. addUnit,
  29217. init() {
  29218. sleep(20).then(() => {
  29219. this.resizeProgressWidth();
  29220. });
  29221. },
  29222. getProgressWidth() {
  29223. return this.$uGetRect(".u-line-progress__background");
  29224. },
  29225. resizeProgressWidth() {
  29226. this.getProgressWidth().then((size) => {
  29227. const {
  29228. width
  29229. } = size;
  29230. this.lineWidth = width * this.innserPercentage / 100 + "px";
  29231. });
  29232. }
  29233. }
  29234. };
  29235. function _sfc_render$1b(_ctx, _cache, $props, $setup, $data, $options) {
  29236. return vue.openBlock(), vue.createElementBlock(
  29237. "view",
  29238. {
  29239. class: "u-line-progress",
  29240. style: vue.normalizeStyle([$options.addStyle(_ctx.customStyle)])
  29241. },
  29242. [
  29243. vue.createElementVNode(
  29244. "view",
  29245. {
  29246. class: "u-line-progress__background",
  29247. ref: "u-line-progress__background",
  29248. style: vue.normalizeStyle([{
  29249. backgroundColor: _ctx.inactiveColor,
  29250. height: $options.addUnit(_ctx.height)
  29251. }])
  29252. },
  29253. null,
  29254. 4
  29255. /* STYLE */
  29256. ),
  29257. vue.createElementVNode(
  29258. "view",
  29259. {
  29260. class: "u-line-progress__line",
  29261. style: vue.normalizeStyle([$options.progressStyle])
  29262. },
  29263. [
  29264. vue.renderSlot(_ctx.$slots, "default", {}, () => [
  29265. _ctx.showText && _ctx.percentage >= 10 ? (vue.openBlock(), vue.createElementBlock(
  29266. "text",
  29267. {
  29268. key: 0,
  29269. class: "u-line-progress__text"
  29270. },
  29271. vue.toDisplayString($options.innserPercentage + "%"),
  29272. 1
  29273. /* TEXT */
  29274. )) : vue.createCommentVNode("v-if", true)
  29275. ], true)
  29276. ],
  29277. 4
  29278. /* STYLE */
  29279. )
  29280. ],
  29281. 4
  29282. /* STYLE */
  29283. );
  29284. }
  29285. const uLineProgress = /* @__PURE__ */ _export_sfc(_sfc_main$1c, [["render", _sfc_render$1b], ["__scopeId", "data-v-eeee7090"], ["__file", "C:/Users/EDY/Desktop/项目/shuibei/uni_modules/uview-plus/components/u-line-progress/u-line-progress.vue"]]);
  29286. const __vite_glob_0_54 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
  29287. __proto__: null,
  29288. default: uLineProgress
  29289. }, Symbol.toStringTag, { value: "Module" }));
  29290. const props$J = defineMixin({
  29291. props: {
  29292. // 文字颜色
  29293. color: {
  29294. type: String,
  29295. default: () => props$1x.link.color
  29296. },
  29297. // 字体大小,单位px
  29298. fontSize: {
  29299. type: [String, Number],
  29300. default: () => props$1x.link.fontSize
  29301. },
  29302. // 是否显示下划线
  29303. underLine: {
  29304. type: Boolean,
  29305. default: () => props$1x.link.underLine
  29306. },
  29307. // 要跳转的链接
  29308. href: {
  29309. type: String,
  29310. default: () => props$1x.link.href
  29311. },
  29312. // 小程序中复制到粘贴板的提示语
  29313. mpTips: {
  29314. type: String,
  29315. default: () => props$1x.link.mpTips
  29316. },
  29317. // 下划线颜色
  29318. lineColor: {
  29319. type: String,
  29320. default: () => props$1x.link.lineColor
  29321. },
  29322. // 超链接的问题,不使用slot形式传入,是因为nvue下无法修改颜色
  29323. text: {
  29324. type: String,
  29325. default: () => props$1x.link.text
  29326. }
  29327. }
  29328. });
  29329. const _sfc_main$1b = {
  29330. name: "u-link",
  29331. mixins: [mpMixin, mixin, props$J],
  29332. computed: {
  29333. linkStyle() {
  29334. const style = {
  29335. color: this.color,
  29336. fontSize: addUnit(this.fontSize),
  29337. // line-height设置为比字体大小多2px
  29338. lineHeight: addUnit(getPx(this.fontSize) + 2),
  29339. textDecoration: this.underLine ? "underline" : "none"
  29340. };
  29341. return style;
  29342. }
  29343. },
  29344. emits: ["click"],
  29345. methods: {
  29346. addStyle,
  29347. openLink() {
  29348. plus.runtime.openURL(this.href);
  29349. this.$emit("click");
  29350. }
  29351. }
  29352. };
  29353. function _sfc_render$1a(_ctx, _cache, $props, $setup, $data, $options) {
  29354. return vue.openBlock(), vue.createElementBlock(
  29355. "text",
  29356. {
  29357. class: "u-link",
  29358. onClick: _cache[0] || (_cache[0] = vue.withModifiers((...args) => $options.openLink && $options.openLink(...args), ["stop"])),
  29359. style: vue.normalizeStyle([$options.linkStyle, $options.addStyle(_ctx.customStyle)])
  29360. },
  29361. vue.toDisplayString(_ctx.text),
  29362. 5
  29363. /* TEXT, STYLE */
  29364. );
  29365. }
  29366. const __easycom_0$2 = /* @__PURE__ */ _export_sfc(_sfc_main$1b, [["render", _sfc_render$1a], ["__scopeId", "data-v-12f6646d"], ["__file", "C:/Users/EDY/Desktop/项目/shuibei/uni_modules/uview-plus/components/u-link/u-link.vue"]]);
  29367. const __vite_glob_0_56 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
  29368. __proto__: null,
  29369. default: __easycom_0$2
  29370. }, Symbol.toStringTag, { value: "Module" }));
  29371. const props$I = defineMixin({
  29372. props: {
  29373. // 用于滚动到指定item
  29374. anchor: {
  29375. type: [String, Number],
  29376. default: () => props$1x.listItem.anchor
  29377. }
  29378. }
  29379. });
  29380. const _sfc_main$1a = {
  29381. name: "u-list-item",
  29382. mixins: [mpMixin, mixin, props$I],
  29383. data() {
  29384. return {
  29385. // 节点信息
  29386. rect: {},
  29387. index: 0,
  29388. show: true,
  29389. sys: getWindowInfo()
  29390. };
  29391. },
  29392. computed: {},
  29393. inject: ["uList"],
  29394. watch: {
  29395. "uList.innerScrollTop"(n2) {
  29396. const preLoadScreen = this.uList.preLoadScreen;
  29397. const windowHeight = this.sys.windowHeight;
  29398. if (n2 <= windowHeight * preLoadScreen) {
  29399. this.parent.updateOffsetFromChild(0);
  29400. } else if (this.rect.top <= n2 - windowHeight * preLoadScreen) {
  29401. this.parent.updateOffsetFromChild(this.rect.top);
  29402. }
  29403. }
  29404. },
  29405. created() {
  29406. this.parent = {};
  29407. },
  29408. mounted() {
  29409. this.init();
  29410. },
  29411. methods: {
  29412. init() {
  29413. this.updateParentData();
  29414. this.index = this.parent.children.indexOf(this);
  29415. this.resize();
  29416. },
  29417. updateParentData() {
  29418. this.getParentData("u-list");
  29419. },
  29420. resize() {
  29421. this.queryRect(`u-list-item-${this.anchor}`).then((size) => {
  29422. const lastChild = this.parent.children[this.index - 1];
  29423. this.rect = size;
  29424. const preLoadScreen = this.uList.preLoadScreen;
  29425. const windowHeight = this.sys.windowHeight;
  29426. if (lastChild) {
  29427. this.rect.top = lastChild.rect.top + lastChild.rect.height;
  29428. }
  29429. if (size.top >= this.uList.innerScrollTop + (1 + preLoadScreen) * windowHeight)
  29430. this.show = false;
  29431. });
  29432. },
  29433. // 查询元素尺寸
  29434. queryRect(el) {
  29435. return new Promise((resolve) => {
  29436. this.$uGetRect(`.${el}`).then((size) => {
  29437. resolve(size);
  29438. });
  29439. });
  29440. }
  29441. }
  29442. };
  29443. function _sfc_render$19(_ctx, _cache, $props, $setup, $data, $options) {
  29444. return vue.openBlock(), vue.createElementBlock("view", {
  29445. class: vue.normalizeClass(["u-list-item", [`u-list-item-${_ctx.anchor}`]]),
  29446. ref: `u-list-item-${_ctx.anchor}`,
  29447. anchor: `u-list-item-${_ctx.anchor}`
  29448. }, [
  29449. vue.renderSlot(_ctx.$slots, "default", {}, void 0, true)
  29450. ], 10, ["anchor"]);
  29451. }
  29452. const uListItem = /* @__PURE__ */ _export_sfc(_sfc_main$1a, [["render", _sfc_render$19], ["__scopeId", "data-v-0c3fc59c"], ["__file", "C:/Users/EDY/Desktop/项目/shuibei/uni_modules/uview-plus/components/u-list-item/u-list-item.vue"]]);
  29453. const __vite_glob_0_57 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
  29454. __proto__: null,
  29455. default: uListItem
  29456. }, Symbol.toStringTag, { value: "Module" }));
  29457. const props$H = defineMixin({
  29458. props: {
  29459. // 控制是否出现滚动条,仅nvue有效
  29460. showScrollbar: {
  29461. type: Boolean,
  29462. default: () => props$1x.list.showScrollbar
  29463. },
  29464. // 距底部多少时触发scrolltolower事件
  29465. lowerThreshold: {
  29466. type: [String, Number],
  29467. default: () => props$1x.list.lowerThreshold
  29468. },
  29469. // 距顶部多少时触发scrolltoupper事件,非nvue有效
  29470. upperThreshold: {
  29471. type: [String, Number],
  29472. default: () => props$1x.list.upperThreshold
  29473. },
  29474. // 设置竖向滚动条位置
  29475. scrollTop: {
  29476. type: [String, Number],
  29477. default: () => props$1x.list.scrollTop
  29478. },
  29479. // 控制 onscroll 事件触发的频率,仅nvue有效
  29480. offsetAccuracy: {
  29481. type: [String, Number],
  29482. default: () => props$1x.list.offsetAccuracy
  29483. },
  29484. // 启用 flexbox 布局。开启后,当前节点声明了display: flex就会成为flex container,并作用于其孩子节点,仅微信小程序有效
  29485. enableFlex: {
  29486. type: Boolean,
  29487. default: () => props$1x.list.enableFlex
  29488. },
  29489. // 是否按分页模式显示List,默认值false
  29490. pagingEnabled: {
  29491. type: Boolean,
  29492. default: () => props$1x.list.pagingEnabled
  29493. },
  29494. // 是否允许List滚动
  29495. scrollable: {
  29496. type: Boolean,
  29497. default: () => props$1x.list.scrollable
  29498. },
  29499. // 值应为某子元素id(id不能以数字开头)
  29500. scrollIntoView: {
  29501. type: String,
  29502. default: () => props$1x.list.scrollIntoView
  29503. },
  29504. // 在设置滚动条位置时使用动画过渡
  29505. scrollWithAnimation: {
  29506. type: Boolean,
  29507. default: () => props$1x.list.scrollWithAnimation
  29508. },
  29509. // iOS点击顶部状态栏、安卓双击标题栏时,滚动条返回顶部,只对微信小程序有效
  29510. enableBackToTop: {
  29511. type: Boolean,
  29512. default: () => props$1x.list.enableBackToTop
  29513. },
  29514. // 列表的高度
  29515. height: {
  29516. type: [String, Number],
  29517. default: () => props$1x.list.height
  29518. },
  29519. // 列表宽度
  29520. width: {
  29521. type: [String, Number],
  29522. default: () => props$1x.list.width
  29523. },
  29524. // 列表前后预渲染的屏数,1代表一个屏幕的高度,1.5代表1个半屏幕高度
  29525. preLoadScreen: {
  29526. type: [String, Number],
  29527. default: () => props$1x.list.preLoadScreen
  29528. },
  29529. // 开启自定义下拉刷新
  29530. refresherEnabled: {
  29531. type: Boolean,
  29532. default: () => false
  29533. },
  29534. // 设置自定义下拉刷新阈值
  29535. refresherThreshold: {
  29536. type: Number,
  29537. default: () => 45
  29538. },
  29539. // 设置自定义下拉刷新默认样式,支持设置 black,white,none,none 表示不使用默认样式
  29540. refresherDefaultStyle: {
  29541. type: String,
  29542. default: () => "black"
  29543. },
  29544. // 设置自定义下拉刷新区域背景颜色
  29545. refresherBackground: {
  29546. type: String,
  29547. default: () => "#FFF"
  29548. },
  29549. // 设置当前下拉刷新状态,true 表示下拉刷新已经被触发,false 表示下拉刷新未被触发
  29550. refresherTriggered: {
  29551. type: Boolean,
  29552. default: () => false
  29553. }
  29554. }
  29555. });
  29556. const _sfc_main$19 = {
  29557. name: "u-list",
  29558. mixins: [mpMixin, mixin, props$H],
  29559. watch: {
  29560. scrollIntoView(n2) {
  29561. this.scrollIntoViewById(n2);
  29562. }
  29563. },
  29564. data() {
  29565. return {
  29566. // 记录内部滚动的距离
  29567. innerScrollTop: 0,
  29568. // vue下,scroll-view在上拉加载时的偏移值
  29569. offset: 0,
  29570. sys: getWindowInfo()
  29571. };
  29572. },
  29573. computed: {
  29574. listStyle() {
  29575. const style = {};
  29576. if (this.width != 0)
  29577. style.width = addUnit(this.width);
  29578. if (this.height != 0)
  29579. style.height = addUnit(this.height);
  29580. if (!style.height)
  29581. style.height = addUnit(this.sys.windowHeight, "px");
  29582. return deepMerge$1(style, addStyle(this.customStyle));
  29583. }
  29584. },
  29585. provide() {
  29586. return {
  29587. uList: this
  29588. };
  29589. },
  29590. created() {
  29591. this.refs = [];
  29592. this.children = [];
  29593. this.anchors = [];
  29594. },
  29595. mounted() {
  29596. },
  29597. emits: [
  29598. "scroll",
  29599. "scrolltolower",
  29600. "scrolltoupper",
  29601. "refresherpulling",
  29602. "refresherrefresh",
  29603. "refresherrestore",
  29604. "refresherabort"
  29605. ],
  29606. methods: {
  29607. updateOffsetFromChild(top) {
  29608. this.offset = top;
  29609. },
  29610. onScroll(e2) {
  29611. let scrollTop = 0;
  29612. scrollTop = e2.detail.scrollTop;
  29613. this.innerScrollTop = scrollTop;
  29614. this.$emit("scroll", scrollTop);
  29615. },
  29616. scrollIntoViewById(id) {
  29617. },
  29618. // 滚动到底部触发事件
  29619. scrolltolower(e2) {
  29620. sleep(30).then(() => {
  29621. this.$emit("scrolltolower");
  29622. });
  29623. },
  29624. // 滚动到底部时触发,非nvue有效
  29625. scrolltoupper(e2) {
  29626. sleep(30).then(() => {
  29627. this.$emit("scrolltoupper");
  29628. this.offset = 0;
  29629. });
  29630. },
  29631. refresherpulling(e2) {
  29632. this.$emit("refresherpulling", e2);
  29633. },
  29634. refresherrefresh(e2) {
  29635. this.$emit("refresherrefresh", e2);
  29636. },
  29637. refresherrestore(e2) {
  29638. this.$emit("refresherrestore", e2);
  29639. },
  29640. refresherabort(e2) {
  29641. this.$emit("refresherabort", e2);
  29642. }
  29643. }
  29644. };
  29645. function _sfc_render$18(_ctx, _cache, $props, $setup, $data, $options) {
  29646. return vue.openBlock(), vue.createElementBlock("scroll-view", {
  29647. class: "u-list",
  29648. "scroll-into-view": _ctx.scrollIntoView,
  29649. style: vue.normalizeStyle([$options.listStyle]),
  29650. "scroll-y": _ctx.scrollable,
  29651. "scroll-top": Number(_ctx.scrollTop),
  29652. "lower-threshold": Number(_ctx.lowerThreshold),
  29653. "upper-threshold": Number(_ctx.upperThreshold),
  29654. "show-scrollbar": _ctx.showScrollbar,
  29655. "enable-back-to-top": _ctx.enableBackToTop,
  29656. "scroll-with-animation": _ctx.scrollWithAnimation,
  29657. onScroll: _cache[0] || (_cache[0] = (...args) => $options.onScroll && $options.onScroll(...args)),
  29658. onScrolltolower: _cache[1] || (_cache[1] = (...args) => $options.scrolltolower && $options.scrolltolower(...args)),
  29659. onScrolltoupper: _cache[2] || (_cache[2] = (...args) => $options.scrolltoupper && $options.scrolltoupper(...args)),
  29660. "refresher-enabled": _ctx.refresherEnabled,
  29661. "refresher-threshold": _ctx.refresherThreshold,
  29662. "refresher-default-style": _ctx.refresherDefaultStyle,
  29663. "refresher-background": _ctx.refresherBackground,
  29664. "refresher-triggered": _ctx.refresherTriggered,
  29665. onRefresherpulling: _cache[3] || (_cache[3] = (...args) => $options.refresherpulling && $options.refresherpulling(...args)),
  29666. onRefresherrefresh: _cache[4] || (_cache[4] = (...args) => $options.refresherrefresh && $options.refresherrefresh(...args)),
  29667. onRefresherrestore: _cache[5] || (_cache[5] = (...args) => $options.refresherrestore && $options.refresherrestore(...args)),
  29668. onRefresherabort: _cache[6] || (_cache[6] = (...args) => $options.refresherabort && $options.refresherabort(...args)),
  29669. "scroll-anchoring": true
  29670. }, [
  29671. vue.createElementVNode("view", null, [
  29672. vue.renderSlot(_ctx.$slots, "default", {}, void 0, true)
  29673. ])
  29674. ], 44, ["scroll-into-view", "scroll-y", "scroll-top", "lower-threshold", "upper-threshold", "show-scrollbar", "enable-back-to-top", "scroll-with-animation", "refresher-enabled", "refresher-threshold", "refresher-default-style", "refresher-background", "refresher-triggered"]);
  29675. }
  29676. const uList = /* @__PURE__ */ _export_sfc(_sfc_main$19, [["render", _sfc_render$18], ["__scopeId", "data-v-a7e78647"], ["__file", "C:/Users/EDY/Desktop/项目/shuibei/uni_modules/uview-plus/components/u-list/u-list.vue"]]);
  29677. const __vite_glob_0_58 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
  29678. __proto__: null,
  29679. default: uList
  29680. }, Symbol.toStringTag, { value: "Module" }));
  29681. const props$G = defineMixin({
  29682. props: {
  29683. // 提示内容
  29684. loadingText: {
  29685. type: [String, Number],
  29686. default: () => props$1x.loadingPage.loadingText
  29687. },
  29688. // 文字上方用于替换loading动画的图片
  29689. image: {
  29690. type: String,
  29691. default: () => props$1x.loadingPage.image
  29692. },
  29693. // 加载动画的模式,circle-圆形,spinner-花朵形,semicircle-半圆形
  29694. loadingMode: {
  29695. type: String,
  29696. default: () => props$1x.loadingPage.loadingMode
  29697. },
  29698. // 是否加载中
  29699. loading: {
  29700. type: Boolean,
  29701. default: () => props$1x.loadingPage.loading
  29702. },
  29703. // 背景色
  29704. bgColor: {
  29705. type: String,
  29706. default: () => props$1x.loadingPage.bgColor
  29707. },
  29708. // 文字颜色
  29709. color: {
  29710. type: String,
  29711. default: () => props$1x.loadingPage.color
  29712. },
  29713. // 文字大小
  29714. fontSize: {
  29715. type: [String, Number],
  29716. default: () => props$1x.loadingPage.fontSize
  29717. },
  29718. // 图标大小
  29719. iconSize: {
  29720. type: [String, Number],
  29721. default: () => props$1x.loadingPage.fontSize
  29722. },
  29723. // 加载中图标的颜色,只能rgb或者十六进制颜色值
  29724. loadingColor: {
  29725. type: String,
  29726. default: () => props$1x.loadingPage.loadingColor
  29727. },
  29728. // 层级
  29729. zIndex: {
  29730. type: [Number],
  29731. default: () => props$1x.loadingPage.zIndex
  29732. }
  29733. }
  29734. });
  29735. const _sfc_main$18 = {
  29736. name: "u-loading-page",
  29737. mixins: [mpMixin, mixin, props$G],
  29738. data() {
  29739. return {};
  29740. },
  29741. methods: {
  29742. addUnit
  29743. }
  29744. };
  29745. function _sfc_render$17(_ctx, _cache, $props, $setup, $data, $options) {
  29746. const _component_u_loading_icon = resolveEasycom(vue.resolveDynamicComponent("u-loading-icon"), __easycom_0$e);
  29747. const _component_u_transition = resolveEasycom(vue.resolveDynamicComponent("u-transition"), __easycom_2$1);
  29748. return vue.openBlock(), vue.createBlock(_component_u_transition, {
  29749. show: _ctx.loading,
  29750. "custom-style": {
  29751. position: "fixed",
  29752. top: 0,
  29753. left: 0,
  29754. right: 0,
  29755. bottom: 0,
  29756. backgroundColor: _ctx.bgColor,
  29757. display: "flex",
  29758. zIndex: _ctx.zIndex,
  29759. ..._ctx.customStyle
  29760. }
  29761. }, {
  29762. default: vue.withCtx(() => [
  29763. vue.createElementVNode("view", { class: "u-loading-page" }, [
  29764. vue.createElementVNode("view", { class: "u-loading-page__warpper" }, [
  29765. vue.createElementVNode("view", { class: "u-loading-page__warpper__loading-icon" }, [
  29766. _ctx.image ? (vue.openBlock(), vue.createElementBlock("image", {
  29767. key: 0,
  29768. src: _ctx.image,
  29769. class: "u-loading-page__warpper__loading-icon__img",
  29770. mode: "widthFit",
  29771. style: vue.normalizeStyle({
  29772. width: $options.addUnit(_ctx.iconSize),
  29773. height: $options.addUnit(_ctx.iconSize)
  29774. })
  29775. }, null, 12, ["src"])) : (vue.openBlock(), vue.createBlock(_component_u_loading_icon, {
  29776. key: 1,
  29777. mode: _ctx.loadingMode,
  29778. size: $options.addUnit(_ctx.iconSize),
  29779. color: _ctx.loadingColor
  29780. }, null, 8, ["mode", "size", "color"]))
  29781. ]),
  29782. vue.renderSlot(_ctx.$slots, "default", {}, () => [
  29783. vue.createElementVNode(
  29784. "text",
  29785. {
  29786. class: "u-loading-page__warpper__text",
  29787. style: vue.normalizeStyle({
  29788. fontSize: $options.addUnit(_ctx.fontSize),
  29789. color: _ctx.color
  29790. })
  29791. },
  29792. vue.toDisplayString(_ctx.loadingText),
  29793. 5
  29794. /* TEXT, STYLE */
  29795. )
  29796. ], true)
  29797. ])
  29798. ])
  29799. ]),
  29800. _: 3
  29801. /* FORWARDED */
  29802. }, 8, ["show", "custom-style"]);
  29803. }
  29804. const uLoadingPage = /* @__PURE__ */ _export_sfc(_sfc_main$18, [["render", _sfc_render$17], ["__scopeId", "data-v-9c9e88a3"], ["__file", "C:/Users/EDY/Desktop/项目/shuibei/uni_modules/uview-plus/components/u-loading-page/u-loading-page.vue"]]);
  29805. const __vite_glob_0_60 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
  29806. __proto__: null,
  29807. default: uLoadingPage
  29808. }, Symbol.toStringTag, { value: "Module" }));
  29809. const props$F = defineMixin({
  29810. props: {
  29811. // 组件状态,loadmore-加载前的状态,loading-加载中的状态,nomore-没有更多的状态
  29812. status: {
  29813. type: String,
  29814. default: () => props$1x.loadmore.status
  29815. },
  29816. // 组件背景色
  29817. bgColor: {
  29818. type: String,
  29819. default: () => props$1x.loadmore.bgColor
  29820. },
  29821. // 是否显示加载中的图标
  29822. icon: {
  29823. type: Boolean,
  29824. default: () => props$1x.loadmore.icon
  29825. },
  29826. // 字体大小
  29827. fontSize: {
  29828. type: [String, Number],
  29829. default: () => props$1x.loadmore.fontSize
  29830. },
  29831. // 图标大小
  29832. iconSize: {
  29833. type: [String, Number],
  29834. default: () => props$1x.loadmore.iconSize
  29835. },
  29836. // 字体颜色
  29837. color: {
  29838. type: String,
  29839. default: () => props$1x.loadmore.color
  29840. },
  29841. // 加载中状态的图标,spinner-花朵状图标,circle-圆圈状,semicircle-半圆
  29842. loadingIcon: {
  29843. type: String,
  29844. default: () => props$1x.loadmore.loadingIcon
  29845. },
  29846. // 加载前的提示语
  29847. loadmoreText: {
  29848. type: String,
  29849. default: () => props$1x.loadmore.loadmoreText
  29850. },
  29851. // 加载中提示语
  29852. loadingText: {
  29853. type: String,
  29854. default: () => props$1x.loadmore.loadingText
  29855. },
  29856. // 没有更多的提示语
  29857. nomoreText: {
  29858. type: String,
  29859. default: () => props$1x.loadmore.nomoreText
  29860. },
  29861. // 在“没有更多”状态下,是否显示粗点
  29862. isDot: {
  29863. type: Boolean,
  29864. default: () => props$1x.loadmore.isDot
  29865. },
  29866. // 加载中图标的颜色
  29867. iconColor: {
  29868. type: String,
  29869. default: () => props$1x.loadmore.iconColor
  29870. },
  29871. // 上边距
  29872. marginTop: {
  29873. type: [String, Number],
  29874. default: () => props$1x.loadmore.marginTop
  29875. },
  29876. // 下边距
  29877. marginBottom: {
  29878. type: [String, Number],
  29879. default: () => props$1x.loadmore.marginBottom
  29880. },
  29881. // 高度,单位px
  29882. height: {
  29883. type: [String, Number],
  29884. default: () => props$1x.loadmore.height
  29885. },
  29886. // 是否显示左边分割线
  29887. line: {
  29888. type: Boolean,
  29889. default: () => props$1x.loadmore.line
  29890. },
  29891. // 线条颜色
  29892. lineColor: {
  29893. type: String,
  29894. default: () => props$1x.loadmore.lineColor
  29895. },
  29896. // 是否虚线,true-虚线,false-实线
  29897. dashed: {
  29898. type: Boolean,
  29899. default: () => props$1x.loadmore.dashed
  29900. }
  29901. }
  29902. });
  29903. const _sfc_main$17 = {
  29904. name: "u-loadmore",
  29905. mixins: [mpMixin, mixin, props$F],
  29906. data() {
  29907. return {
  29908. // 粗点
  29909. dotText: "●"
  29910. };
  29911. },
  29912. computed: {
  29913. // 加载的文字显示的样式
  29914. loadTextStyle() {
  29915. return {
  29916. color: this.color,
  29917. fontSize: addUnit(this.fontSize),
  29918. lineHeight: addUnit(this.fontSize),
  29919. backgroundColor: this.bgColor
  29920. };
  29921. },
  29922. // 显示的提示文字
  29923. showText() {
  29924. let text = "";
  29925. if (this.status == "loadmore")
  29926. text = this.loadmoreText;
  29927. else if (this.status == "loading")
  29928. text = this.loadingText;
  29929. else if (this.status == "nomore" && this.isDot)
  29930. text = this.dotText;
  29931. else
  29932. text = this.nomoreText;
  29933. return text;
  29934. }
  29935. },
  29936. emits: ["loadmore"],
  29937. methods: {
  29938. addStyle,
  29939. addUnit,
  29940. loadMore() {
  29941. if (this.status == "loadmore")
  29942. this.$emit("loadmore");
  29943. }
  29944. }
  29945. };
  29946. function _sfc_render$16(_ctx, _cache, $props, $setup, $data, $options) {
  29947. const _component_u_line = resolveEasycom(vue.resolveDynamicComponent("u-line"), __easycom_1$4);
  29948. const _component_u_loading_icon = resolveEasycom(vue.resolveDynamicComponent("u-loading-icon"), __easycom_0$e);
  29949. return vue.openBlock(), vue.createElementBlock(
  29950. "view",
  29951. {
  29952. class: "u-loadmore",
  29953. style: vue.normalizeStyle([
  29954. $options.addStyle(_ctx.customStyle),
  29955. {
  29956. backgroundColor: _ctx.bgColor,
  29957. marginBottom: $options.addUnit(_ctx.marginBottom),
  29958. marginTop: $options.addUnit(_ctx.marginTop),
  29959. height: $options.addUnit(_ctx.height)
  29960. }
  29961. ])
  29962. },
  29963. [
  29964. _ctx.line ? (vue.openBlock(), vue.createBlock(_component_u_line, {
  29965. key: 0,
  29966. length: "140rpx",
  29967. color: _ctx.lineColor,
  29968. hairline: false,
  29969. dashed: _ctx.dashed
  29970. }, null, 8, ["color", "dashed"])) : vue.createCommentVNode("v-if", true),
  29971. vue.createCommentVNode(" 加载中和没有更多的状态才显示两边的横线 "),
  29972. vue.createElementVNode(
  29973. "view",
  29974. {
  29975. class: vue.normalizeClass([_ctx.status == "loadmore" || _ctx.status == "nomore" ? "u-more" : "", "u-loadmore__content"])
  29976. },
  29977. [
  29978. _ctx.status === "loading" && _ctx.icon ? (vue.openBlock(), vue.createElementBlock("view", {
  29979. key: 0,
  29980. class: "u-loadmore__content__icon-wrap"
  29981. }, [
  29982. vue.createVNode(_component_u_loading_icon, {
  29983. color: _ctx.iconColor,
  29984. size: _ctx.iconSize,
  29985. mode: _ctx.loadingIcon
  29986. }, null, 8, ["color", "size", "mode"])
  29987. ])) : vue.createCommentVNode("v-if", true),
  29988. vue.createCommentVNode(" 如果没有更多的状态下,显示内容为dot(粗点),加载特定样式 "),
  29989. vue.createElementVNode(
  29990. "text",
  29991. {
  29992. class: vue.normalizeClass(["u-line-1", [_ctx.status == "nomore" && _ctx.isDot == true ? "u-loadmore__content__dot-text" : "u-loadmore__content__text"]]),
  29993. style: vue.normalizeStyle([$options.loadTextStyle]),
  29994. onClick: _cache[0] || (_cache[0] = (...args) => $options.loadMore && $options.loadMore(...args))
  29995. },
  29996. vue.toDisplayString($options.showText),
  29997. 7
  29998. /* TEXT, CLASS, STYLE */
  29999. )
  30000. ],
  30001. 2
  30002. /* CLASS */
  30003. ),
  30004. _ctx.line ? (vue.openBlock(), vue.createBlock(_component_u_line, {
  30005. key: 1,
  30006. length: "140rpx",
  30007. color: _ctx.lineColor,
  30008. hairline: false,
  30009. dashed: _ctx.dashed
  30010. }, null, 8, ["color", "dashed"])) : vue.createCommentVNode("v-if", true)
  30011. ],
  30012. 4
  30013. /* STYLE */
  30014. );
  30015. }
  30016. const __easycom_0$1 = /* @__PURE__ */ _export_sfc(_sfc_main$17, [["render", _sfc_render$16], ["__scopeId", "data-v-4ccc1478"], ["__file", "C:/Users/EDY/Desktop/项目/shuibei/uni_modules/uview-plus/components/u-loadmore/u-loadmore.vue"]]);
  30017. const __vite_glob_0_61 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
  30018. __proto__: null,
  30019. default: __easycom_0$1
  30020. }, Symbol.toStringTag, { value: "Module" }));
  30021. function e() {
  30022. return { async: false, breaks: false, extensions: null, gfm: true, hooks: null, pedantic: false, renderer: null, silent: false, tokenizer: null, walkTokens: null };
  30023. }
  30024. var t = { async: false, breaks: false, extensions: null, gfm: true, hooks: null, pedantic: false, renderer: null, silent: false, tokenizer: null, walkTokens: null };
  30025. function n(e2) {
  30026. t = e2;
  30027. }
  30028. var r = { exec: () => null };
  30029. function s(e2, t2 = "") {
  30030. let n2 = "string" == typeof e2 ? e2 : e2.source, r2 = { replace: (e3, t3) => {
  30031. let s2 = "string" == typeof t3 ? t3 : t3.source;
  30032. return s2 = s2.replace(l.caret, "$1"), n2 = n2.replace(e3, s2), r2;
  30033. }, getRegex: () => new RegExp(n2, t2) };
  30034. return r2;
  30035. }
  30036. var l = { codeRemoveIndent: /^(?: {1,4}| {0,3}\t)/gm, outputLinkReplace: /\\([\[\]])/g, indentCodeCompensation: /^(\s+)(?:```)/, beginningSpace: /^\s+/, endingHash: /#$/, startingSpaceChar: /^ /, endingSpaceChar: / $/, nonSpaceChar: /[^ ]/, newLineCharGlobal: /\n/g, tabCharGlobal: /\t/g, multipleSpaceGlobal: /\s+/g, blankLine: /^[ \t]*$/, doubleBlankLine: /\n[ \t]*\n[ \t]*$/, blockquoteStart: /^ {0,3}>/, blockquoteSetextReplace: /\n {0,3}((?:=+|-+) *)(?=\n|$)/g, blockquoteSetextReplace2: /^ {0,3}>[ \t]?/gm, listReplaceTabs: /^\t+/, listReplaceNesting: /^ {1,4}(?=( {4})*[^ ])/g, listIsTask: /^\[[ xX]\] /, listReplaceTask: /^\[[ xX]\] +/, anyLine: /\n.*\n/, hrefBrackets: /^<(.*)>$/, tableDelimiter: /[:|]/, tableAlignChars: /^\||\| *$/g, tableRowBlankLine: /\n[ \t]*$/, tableAlignRight: /^ *-+: *$/, tableAlignCenter: /^ *:-+: *$/, tableAlignLeft: /^ *:-+ *$/, startATag: /^<a /i, endATag: /^<\/a>/i, startPreScriptTag: /^<(pre|code|kbd|script)(\s|>)/i, endPreScriptTag: /^<\/(pre|code|kbd|script)(\s|>)/i, startAngleBracket: /^</, endAngleBracket: />$/, pedanticHrefTitle: /^([^'"]*[^\s])\s+(['"])(.*)\2/, unicodeAlphaNumeric: /[a-zA-Z0-9\u00C0-\u02AF\u0300-\u036F\u0400-\u04FF\u0500-\u052F\u1E00-\u1EFF]/u, escapeTest: /[&<>"']/, escapeReplace: /[&<>"']/g, escapeTestNoEncode: /[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/, escapeReplaceNoEncode: /[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/g, unescapeTest: /&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/gi, caret: /(^|[^\[])\^/g, percentDecode: /%25/g, findPipe: /\|/g, splitPipe: / \|/, slashPipe: /\\\|/g, carriageReturn: /\r\n|\r/g, spaceLine: /^ +$/gm, notSpaceStart: /^\S*/, endingNewline: /\n$/, listItemRegex: (e2) => new RegExp(`^( {0,3}${e2})((?:[ ][^\\n]*)?(?:\\n|$))`), nextBulletRegex: (e2) => new RegExp(`^ {0,${Math.min(3, e2 - 1)}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`), hrRegex: (e2) => new RegExp(`^ {0,${Math.min(3, e2 - 1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`), fencesBeginRegex: (e2) => new RegExp(`^ {0,${Math.min(3, e2 - 1)}}(?:\`\`\`|~~~)`), headingBeginRegex: (e2) => new RegExp(`^ {0,${Math.min(3, e2 - 1)}}#`), htmlBeginRegex: (e2) => new RegExp(`^ {0,${Math.min(3, e2 - 1)}}<(?:[a-z].*>|!--)`, "i") }, i = /^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/, a = /(?:[*+-]|\d{1,9}[.)])/, o = /^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/, c = s(o).replace(/bull/g, a).replace(/blockCode/g, /(?: {4}| {0,3}\t)/).replace(/fences/g, / {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g, / {0,3}>/).replace(/heading/g, / {0,3}#{1,6}/).replace(/html/g, / {0,3}<[^\n>]+>\n/).replace(/\|table/g, "").getRegex(), h = s(o).replace(/bull/g, a).replace(/blockCode/g, /(?: {4}| {0,3}\t)/).replace(/fences/g, / {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g, / {0,3}>/).replace(/heading/g, / {0,3}#{1,6}/).replace(/html/g, / {0,3}<[^\n>]+>\n/).replace(/table/g, / {0,3}\|?(?:[:\- ]*\|)+[\:\- ]*\n/).getRegex(), p = /^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/, u = /(?!\s*\])(?:\\.|[^\[\]\\])+/, g = s(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label", u).replace("title", /(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(), k = s(/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g, a).getRegex(), d = "address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|search|section|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul", f = /<!--(?:-?>|[\s\S]*?(?:-->|$))/, x = s("^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:</\\1>[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>\\n*|$)|<![A-Z][\\s\\S]*?(?:>\\n*|$)|<!\\[CDATA\\[[\\s\\S]*?(?:\\]\\]>\\n*|$)|</?(tag)(?: +|\\n|/?>)[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|</(?!script|pre|style|textarea)[a-z][\\w-]*\\s*>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$))", "i").replace("comment", f).replace("tag", d).replace("attribute", / +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(), b = s(p).replace("hr", i).replace("heading", " {0,3}#{1,6}(?:\\s|$)").replace("|lheading", "").replace("|table", "").replace("blockquote", " {0,3}>").replace("fences", " {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list", " {0,3}(?:[*+-]|1[.)]) ").replace("html", "</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag", d).getRegex(), w = { blockquote: s(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph", b).getRegex(), code: /^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/, def: g, fences: /^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/, heading: /^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/, hr: i, html: x, lheading: c, list: k, newline: /^(?:[ \t]*(?:\n|$))+/, paragraph: b, table: r, text: /^[^\n]+/ }, m = s("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr", i).replace("heading", " {0,3}#{1,6}(?:\\s|$)").replace("blockquote", " {0,3}>").replace("code", "(?: {4}| {0,3} )[^\\n]").replace("fences", " {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list", " {0,3}(?:[*+-]|1[.)]) ").replace("html", "</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag", d).getRegex(), y = { ...w, lheading: h, table: m, paragraph: s(p).replace("hr", i).replace("heading", " {0,3}#{1,6}(?:\\s|$)").replace("|lheading", "").replace("table", m).replace("blockquote", " {0,3}>").replace("fences", " {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list", " {0,3}(?:[*+-]|1[.)]) ").replace("html", "</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag", d).getRegex() }, $ = { ...w, html: s(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment", f).replace(/tag/g, "(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(), def: /^ *\[([^\]]+)\]: *<?([^\s>]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/, heading: /^(#{1,6})(.*)(?:\n+|$)/, fences: r, lheading: /^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/, paragraph: s(p).replace("hr", i).replace("heading", " *#{1,6} *[^\n]").replace("lheading", c).replace("|table", "").replace("blockquote", " {0,3}>").replace("|fences", "").replace("|list", "").replace("|html", "").replace("|tag", "").getRegex() }, R = /^( {2,}|\\)\n(?!\s*$)/, S = /[!"#$%&'()*+,-./:;<=>?@[\]^_`{|}~·!¥……()——《》「」『』【】、;:‘’“”,。、]/u, T = /[\s!"#$%&'()*+,-./:;<=>?@[\]^_`{|}~·!¥……()——《》「」『』【】、;:‘’“”,。、]/, z = /[^a-zA-Z0-9\u4e00-\u9fa5\s!"#$%&'()*+,-./:;<=>?@[\]^_`{|}~·!¥……()——《》「」『』【】、;:‘’“”,。、]/, A = s(/^((?![*_])punctSpace)/, "u").replace(/punctSpace/g, T).getRegex(), _ = /[!"#$%&'()*+,-./:;<=>?@[\]^_`{|}·!¥……()——《》「」『』【】、;:‘’“”,。、]/, P = /^(?:\*+(?:((?!\*)punct)|[^\s*]))|^_+(?:((?!_)punct)|([^\s_]))/, I = s(P, "u").replace(/punct/g, S).getRegex(), L = s(P, "u").replace(/punct/g, _).getRegex(), B = "^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)", C = s(B, "gu").replace(/notPunctSpace/g, z).replace(/punctSpace/g, T).replace(/punct/g, S).getRegex(), q = s(B, "gu").replace(/notPunctSpace/g, /[a-zA-Z0-9\u4e00-\u9fa5~]/).replace(/punctSpace/g, /[\s!"#$%&'()*+,-./:;<=>?@[\]^_`{|}·!¥……()——《》「」『』【】、;:‘’“”,。、]/).replace(/punct/g, _).getRegex(), E = s("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)", "gu").replace(/notPunctSpace/g, z).replace(/punctSpace/g, T).replace(/punct/g, S).getRegex(), v = s(/\\(punct)/, "gu").replace(/punct/g, S).getRegex(), Z = s(/^<(scheme:[^\s\x00-\x1f<>]*|email)>/).replace("scheme", /[a-zA-Z][a-zA-Z0-9+.-]{1,31}/).replace("email", /[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/).getRegex(), D = s(f).replace("(?:-->|$)", "-->").getRegex(), M = s("^comment|^</[a-zA-Z][\\w:-]*\\s*>|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^<![a-zA-Z]+\\s[\\s\\S]*?>|^<!\\[CDATA\\[[\\s\\S]*?\\]\\]>").replace("comment", D).replace("attribute", /\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(), O = /(?:\[(?:\\.|[^\[\]\\])*\]|\\.|`[^`]*`|[^\[\]\\`])*?/, Q = s(/^!?\[(label)\]\(\s*(href)(?:(?:[ \t]*(?:\n[ \t]*)?)(title))?\s*\)/).replace("label", O).replace("href", /<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]*/).replace("title", /"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(), N = s(/^!?\[(label)\]\[(ref)\]/).replace("label", O).replace("ref", u).getRegex(), j = s(/^!?\[(ref)\](?:\[\])?/).replace("ref", u).getRegex(), G = { _backpedal: r, anyPunctuation: v, autolink: Z, blockSkip: /\[[^[\]]*?\]\((?:\\.|[^\\\(\)]|\((?:\\.|[^\\\(\)])*\))*\)|`[^`]*?`|<(?! )[^<>]*?>/g, br: R, code: /^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/, del: r, emStrongLDelim: I, emStrongRDelimAst: C, emStrongRDelimUnd: E, escape: /^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/, link: Q, nolink: j, punctuation: A, reflink: N, reflinkSearch: s("reflink|nolink(?!\\()", "g").replace("reflink", N).replace("nolink", j).getRegex(), tag: M, text: /^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/, url: r }, H = { ...G, link: s(/^!?\[(label)\]\((.*?)\)/).replace("label", O).getRegex(), reflink: s(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label", O).getRegex() }, W = { ...G, emStrongRDelimAst: q, emStrongLDelim: L, url: s(/^((?:ftp|https?):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/, "i").replace("email", /[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/).getRegex(), _backpedal: /(?:[^?!.,:;*_'"~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_'"~)]+(?!$))+/, del: /^(~~?)(?=[^\s~])((?:\\.|[^\\])*?(?:\\.|[^\s~\\]))\1(?=[^~]|$)/, text: /^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|https?:\/\/|ftp:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/ }, X = { ...W, br: s(R).replace("{2,}", "*").getRegex(), text: s(W.text).replace("\\b_", "\\b_| {2,}\\n").replace(/\{2,\}/g, "*").getRegex() }, F = { normal: w, gfm: y, pedantic: $ }, U = { normal: G, gfm: W, breaks: X, pedantic: H }, J = { "&": "&amp;", "<": "&lt;", ">": "&gt;", '"': "&quot;", "'": "&#39;" }, K = (e2) => J[e2];
  30037. function V(e2, t2) {
  30038. if (t2) {
  30039. if (l.escapeTest.test(e2))
  30040. return e2.replace(l.escapeReplace, K);
  30041. } else if (l.escapeTestNoEncode.test(e2))
  30042. return e2.replace(l.escapeReplaceNoEncode, K);
  30043. return e2;
  30044. }
  30045. function Y(e2) {
  30046. try {
  30047. e2 = encodeURI(e2).replace(l.percentDecode, "%");
  30048. } catch {
  30049. return null;
  30050. }
  30051. return e2;
  30052. }
  30053. function ee(e2, t2) {
  30054. var _a2;
  30055. let n2 = e2.replace(l.findPipe, (e3, t3, n3) => {
  30056. let r3 = false, s2 = t3;
  30057. for (; --s2 >= 0 && "\\" === n3[s2]; )
  30058. r3 = !r3;
  30059. return r3 ? "|" : " |";
  30060. }).split(l.splitPipe), r2 = 0;
  30061. if (n2[0].trim() || n2.shift(), n2.length > 0 && !((_a2 = n2.at(-1)) == null ? void 0 : _a2.trim()) && n2.pop(), t2)
  30062. if (n2.length > t2)
  30063. n2.splice(t2);
  30064. else
  30065. for (; n2.length < t2; )
  30066. n2.push("");
  30067. for (; r2 < n2.length; r2++)
  30068. n2[r2] = n2[r2].trim().replace(l.slashPipe, "|");
  30069. return n2;
  30070. }
  30071. function te(e2, t2, n2) {
  30072. let r2 = e2.length;
  30073. if (0 === r2)
  30074. return "";
  30075. let s2 = 0;
  30076. for (; s2 < r2; ) {
  30077. let l2 = e2.charAt(r2 - s2 - 1);
  30078. if (l2 !== t2 || n2) {
  30079. if (l2 === t2 || !n2)
  30080. break;
  30081. s2++;
  30082. } else
  30083. s2++;
  30084. }
  30085. return e2.slice(0, r2 - s2);
  30086. }
  30087. function ne(e2, t2, n2, r2, s2) {
  30088. let l2 = t2.href, i2 = t2.title || null, a2 = e2[1].replace(s2.other.outputLinkReplace, "$1");
  30089. r2.state.inLink = true;
  30090. let o2 = { type: "!" === e2[0].charAt(0) ? "image" : "link", raw: n2, href: l2, title: i2, text: a2, tokens: r2.inlineTokens(a2) };
  30091. return r2.state.inLink = false, o2;
  30092. }
  30093. var re = class {
  30094. constructor(e2) {
  30095. __publicField(this, "options");
  30096. __publicField(this, "rules");
  30097. __publicField(this, "lexer");
  30098. this.options = e2 || t;
  30099. }
  30100. space(e2) {
  30101. let t2 = this.rules.block.newline.exec(e2);
  30102. if (t2 && t2[0].length > 0)
  30103. return { type: "space", raw: t2[0] };
  30104. }
  30105. code(e2) {
  30106. let t2 = this.rules.block.code.exec(e2);
  30107. if (t2) {
  30108. let e3 = t2[0].replace(this.rules.other.codeRemoveIndent, "");
  30109. return { type: "code", raw: t2[0], codeBlockStyle: "indented", text: this.options.pedantic ? e3 : te(e3, "\n") };
  30110. }
  30111. }
  30112. fences(e2) {
  30113. let t2 = this.rules.block.fences.exec(e2);
  30114. if (t2) {
  30115. let e3 = t2[0], n2 = function(e4, t3, n3) {
  30116. let r2 = e4.match(n3.other.indentCodeCompensation);
  30117. if (null === r2)
  30118. return t3;
  30119. let s2 = r2[1];
  30120. return t3.split("\n").map((e5) => {
  30121. let t4 = e5.match(n3.other.beginningSpace);
  30122. if (null === t4)
  30123. return e5;
  30124. let [r3] = t4;
  30125. return r3.length >= s2.length ? e5.slice(s2.length) : e5;
  30126. }).join("\n");
  30127. }(e3, t2[3] || "", this.rules);
  30128. return { type: "code", raw: e3, lang: t2[2] ? t2[2].trim().replace(this.rules.inline.anyPunctuation, "$1") : t2[2], text: n2 };
  30129. }
  30130. }
  30131. heading(e2) {
  30132. let t2 = this.rules.block.heading.exec(e2);
  30133. if (t2) {
  30134. let e3 = t2[2].trim();
  30135. if (this.rules.other.endingHash.test(e3)) {
  30136. let t3 = te(e3, "#");
  30137. (this.options.pedantic || !t3 || this.rules.other.endingSpaceChar.test(t3)) && (e3 = t3.trim());
  30138. }
  30139. return { type: "heading", raw: t2[0], depth: t2[1].length, text: e3, tokens: this.lexer.inline(e3) };
  30140. }
  30141. }
  30142. hr(e2) {
  30143. let t2 = this.rules.block.hr.exec(e2);
  30144. if (t2)
  30145. return { type: "hr", raw: te(t2[0], "\n") };
  30146. }
  30147. blockquote(e2) {
  30148. let t2 = this.rules.block.blockquote.exec(e2);
  30149. if (t2) {
  30150. let e3 = te(t2[0], "\n").split("\n"), n2 = "", r2 = "", s2 = [];
  30151. for (; e3.length > 0; ) {
  30152. let t3, l2 = false, i2 = [];
  30153. for (t3 = 0; t3 < e3.length; t3++)
  30154. if (this.rules.other.blockquoteStart.test(e3[t3]))
  30155. i2.push(e3[t3]), l2 = true;
  30156. else {
  30157. if (l2)
  30158. break;
  30159. i2.push(e3[t3]);
  30160. }
  30161. e3 = e3.slice(t3);
  30162. let a2 = i2.join("\n"), o2 = a2.replace(this.rules.other.blockquoteSetextReplace, "\n $1").replace(this.rules.other.blockquoteSetextReplace2, "");
  30163. n2 = n2 ? `${n2}
  30164. ${a2}` : a2, r2 = r2 ? `${r2}
  30165. ${o2}` : o2;
  30166. let c2 = this.lexer.state.top;
  30167. if (this.lexer.state.top = true, this.lexer.blockTokens(o2, s2, true), this.lexer.state.top = c2, 0 === e3.length)
  30168. break;
  30169. let h2 = s2.at(-1);
  30170. if ("code" === (h2 == null ? void 0 : h2.type))
  30171. break;
  30172. if ("blockquote" === (h2 == null ? void 0 : h2.type)) {
  30173. let t4 = h2, l3 = t4.raw + "\n" + e3.join("\n"), i3 = this.blockquote(l3);
  30174. s2[s2.length - 1] = i3, n2 = n2.substring(0, n2.length - t4.raw.length) + i3.raw, r2 = r2.substring(0, r2.length - t4.text.length) + i3.text;
  30175. break;
  30176. }
  30177. if ("list" !== (h2 == null ? void 0 : h2.type))
  30178. ;
  30179. else {
  30180. let t4 = h2, l3 = t4.raw + "\n" + e3.join("\n"), i3 = this.list(l3);
  30181. s2[s2.length - 1] = i3, n2 = n2.substring(0, n2.length - h2.raw.length) + i3.raw, r2 = r2.substring(0, r2.length - t4.raw.length) + i3.raw, e3 = l3.substring(s2.at(-1).raw.length).split("\n");
  30182. }
  30183. }
  30184. return { type: "blockquote", raw: n2, tokens: s2, text: r2 };
  30185. }
  30186. }
  30187. list(e2) {
  30188. let t2 = this.rules.block.list.exec(e2);
  30189. if (t2) {
  30190. let n2 = t2[1].trim(), r2 = n2.length > 1, s2 = { type: "list", raw: "", ordered: r2, start: r2 ? +n2.slice(0, -1) : "", loose: false, items: [] };
  30191. n2 = r2 ? `\\d{1,9}\\${n2.slice(-1)}` : `\\${n2}`, this.options.pedantic && (n2 = r2 ? n2 : "[*+-]");
  30192. let l2 = this.rules.other.listItemRegex(n2), i2 = false;
  30193. for (; e2; ) {
  30194. let n3 = false, r3 = "", a3 = "";
  30195. if (!(t2 = l2.exec(e2)) || this.rules.block.hr.test(e2))
  30196. break;
  30197. r3 = t2[0], e2 = e2.substring(r3.length);
  30198. let o2 = t2[2].split("\n", 1)[0].replace(this.rules.other.listReplaceTabs, (e3) => " ".repeat(3 * e3.length)), c2 = e2.split("\n", 1)[0], h2 = !o2.trim(), p2 = 0;
  30199. if (this.options.pedantic ? (p2 = 2, a3 = o2.trimStart()) : h2 ? p2 = t2[1].length + 1 : (p2 = t2[2].search(this.rules.other.nonSpaceChar), p2 = p2 > 4 ? 1 : p2, a3 = o2.slice(p2), p2 += t2[1].length), h2 && this.rules.other.blankLine.test(c2) && (r3 += c2 + "\n", e2 = e2.substring(c2.length + 1), n3 = true), !n3) {
  30200. let t3 = this.rules.other.nextBulletRegex(p2), n4 = this.rules.other.hrRegex(p2), s3 = this.rules.other.fencesBeginRegex(p2), l3 = this.rules.other.headingBeginRegex(p2), i3 = this.rules.other.htmlBeginRegex(p2);
  30201. for (; e2; ) {
  30202. let u3, g3 = e2.split("\n", 1)[0];
  30203. if (c2 = g3, this.options.pedantic ? (c2 = c2.replace(this.rules.other.listReplaceNesting, " "), u3 = c2) : u3 = c2.replace(this.rules.other.tabCharGlobal, " "), s3.test(c2) || l3.test(c2) || i3.test(c2) || t3.test(c2) || n4.test(c2))
  30204. break;
  30205. if (u3.search(this.rules.other.nonSpaceChar) >= p2 || !c2.trim())
  30206. a3 += "\n" + u3.slice(p2);
  30207. else {
  30208. if (h2 || o2.replace(this.rules.other.tabCharGlobal, " ").search(this.rules.other.nonSpaceChar) >= 4 || s3.test(o2) || l3.test(o2) || n4.test(o2))
  30209. break;
  30210. a3 += "\n" + c2;
  30211. }
  30212. !h2 && !c2.trim() && (h2 = true), r3 += g3 + "\n", e2 = e2.substring(g3.length + 1), o2 = u3.slice(p2);
  30213. }
  30214. }
  30215. s2.loose || (i2 ? s2.loose = true : this.rules.other.doubleBlankLine.test(r3) && (i2 = true));
  30216. let u2, g2 = null;
  30217. this.options.gfm && (g2 = this.rules.other.listIsTask.exec(a3), g2 && (u2 = "[ ] " !== g2[0], a3 = a3.replace(this.rules.other.listReplaceTask, ""))), s2.items.push({ type: "list_item", raw: r3, task: !!g2, checked: u2, loose: false, text: a3, tokens: [] }), s2.raw += r3;
  30218. }
  30219. let a2 = s2.items.at(-1);
  30220. if (!a2)
  30221. return;
  30222. a2.raw = a2.raw.trimEnd(), a2.text = a2.text.trimEnd(), s2.raw = s2.raw.trimEnd();
  30223. for (let e3 = 0; e3 < s2.items.length; e3++)
  30224. if (this.lexer.state.top = false, s2.items[e3].tokens = this.lexer.blockTokens(s2.items[e3].text, []), !s2.loose) {
  30225. let t3 = s2.items[e3].tokens.filter((e4) => "space" === e4.type), n3 = t3.length > 0 && t3.some((e4) => this.rules.other.anyLine.test(e4.raw));
  30226. s2.loose = n3;
  30227. }
  30228. if (s2.loose)
  30229. for (let e3 = 0; e3 < s2.items.length; e3++)
  30230. s2.items[e3].loose = true;
  30231. return s2;
  30232. }
  30233. }
  30234. html(e2) {
  30235. let t2 = this.rules.block.html.exec(e2);
  30236. if (t2)
  30237. return { type: "html", block: true, raw: t2[0], pre: "pre" === t2[1] || "script" === t2[1] || "style" === t2[1], text: t2[0] };
  30238. }
  30239. def(e2) {
  30240. let t2 = this.rules.block.def.exec(e2);
  30241. if (t2) {
  30242. let e3 = t2[1].toLowerCase().replace(this.rules.other.multipleSpaceGlobal, " "), n2 = t2[2] ? t2[2].replace(this.rules.other.hrefBrackets, "$1").replace(this.rules.inline.anyPunctuation, "$1") : "", r2 = t2[3] ? t2[3].substring(1, t2[3].length - 1).replace(this.rules.inline.anyPunctuation, "$1") : t2[3];
  30243. return { type: "def", tag: e3, raw: t2[0], href: n2, title: r2 };
  30244. }
  30245. }
  30246. table(e2) {
  30247. var _a2;
  30248. let t2 = this.rules.block.table.exec(e2);
  30249. if (!t2 || !this.rules.other.tableDelimiter.test(t2[2]))
  30250. return;
  30251. let n2 = ee(t2[1]), r2 = t2[2].replace(this.rules.other.tableAlignChars, "").split("|"), s2 = ((_a2 = t2[3]) == null ? void 0 : _a2.trim()) ? t2[3].replace(this.rules.other.tableRowBlankLine, "").split("\n") : [], l2 = { type: "table", raw: t2[0], header: [], align: [], rows: [] };
  30252. if (n2.length === r2.length) {
  30253. for (let e3 of r2)
  30254. this.rules.other.tableAlignRight.test(e3) ? l2.align.push("right") : this.rules.other.tableAlignCenter.test(e3) ? l2.align.push("center") : this.rules.other.tableAlignLeft.test(e3) ? l2.align.push("left") : l2.align.push(null);
  30255. for (let e3 = 0; e3 < n2.length; e3++)
  30256. l2.header.push({ text: n2[e3], tokens: this.lexer.inline(n2[e3]), header: true, align: l2.align[e3] });
  30257. for (let e3 of s2)
  30258. l2.rows.push(ee(e3, l2.header.length).map((e4, t3) => ({ text: e4, tokens: this.lexer.inline(e4), header: false, align: l2.align[t3] })));
  30259. return l2;
  30260. }
  30261. }
  30262. lheading(e2) {
  30263. let t2 = this.rules.block.lheading.exec(e2);
  30264. if (t2)
  30265. return { type: "heading", raw: t2[0], depth: "=" === t2[2].charAt(0) ? 1 : 2, text: t2[1], tokens: this.lexer.inline(t2[1]) };
  30266. }
  30267. paragraph(e2) {
  30268. let t2 = this.rules.block.paragraph.exec(e2);
  30269. if (t2) {
  30270. let e3 = "\n" === t2[1].charAt(t2[1].length - 1) ? t2[1].slice(0, -1) : t2[1];
  30271. return { type: "paragraph", raw: t2[0], text: e3, tokens: this.lexer.inline(e3) };
  30272. }
  30273. }
  30274. text(e2) {
  30275. let t2 = this.rules.block.text.exec(e2);
  30276. if (t2)
  30277. return { type: "text", raw: t2[0], text: t2[0], tokens: this.lexer.inline(t2[0]) };
  30278. }
  30279. escape(e2) {
  30280. let t2 = this.rules.inline.escape.exec(e2);
  30281. if (t2)
  30282. return { type: "escape", raw: t2[0], text: t2[1] };
  30283. }
  30284. tag(e2) {
  30285. let t2 = this.rules.inline.tag.exec(e2);
  30286. if (t2)
  30287. return !this.lexer.state.inLink && this.rules.other.startATag.test(t2[0]) ? this.lexer.state.inLink = true : this.lexer.state.inLink && this.rules.other.endATag.test(t2[0]) && (this.lexer.state.inLink = false), !this.lexer.state.inRawBlock && this.rules.other.startPreScriptTag.test(t2[0]) ? this.lexer.state.inRawBlock = true : this.lexer.state.inRawBlock && this.rules.other.endPreScriptTag.test(t2[0]) && (this.lexer.state.inRawBlock = false), { type: "html", raw: t2[0], inLink: this.lexer.state.inLink, inRawBlock: this.lexer.state.inRawBlock, block: false, text: t2[0] };
  30288. }
  30289. link(e2) {
  30290. let t2 = this.rules.inline.link.exec(e2);
  30291. if (t2) {
  30292. let e3 = t2[2].trim();
  30293. if (!this.options.pedantic && this.rules.other.startAngleBracket.test(e3)) {
  30294. if (!this.rules.other.endAngleBracket.test(e3))
  30295. return;
  30296. let t3 = te(e3.slice(0, -1), "\\");
  30297. if ((e3.length - t3.length) % 2 == 0)
  30298. return;
  30299. } else {
  30300. let e4 = function(e5, t3) {
  30301. if (-1 === e5.indexOf(t3[1]))
  30302. return -1;
  30303. let n3 = 0;
  30304. for (let r3 = 0; r3 < e5.length; r3++)
  30305. if ("\\" === e5[r3])
  30306. r3++;
  30307. else if (e5[r3] === t3[0])
  30308. n3++;
  30309. else if (e5[r3] === t3[1] && (n3--, n3 < 0))
  30310. return r3;
  30311. return n3 > 0 ? -2 : -1;
  30312. }(t2[2], "()");
  30313. if (-2 === e4)
  30314. return;
  30315. if (e4 > -1) {
  30316. let n3 = (0 === t2[0].indexOf("!") ? 5 : 4) + t2[1].length + e4;
  30317. t2[2] = t2[2].substring(0, e4), t2[0] = t2[0].substring(0, n3).trim(), t2[3] = "";
  30318. }
  30319. }
  30320. let n2 = t2[2], r2 = "";
  30321. if (this.options.pedantic) {
  30322. let e4 = this.rules.other.pedanticHrefTitle.exec(n2);
  30323. e4 && (n2 = e4[1], r2 = e4[3]);
  30324. } else
  30325. r2 = t2[3] ? t2[3].slice(1, -1) : "";
  30326. return n2 = n2.trim(), this.rules.other.startAngleBracket.test(n2) && (n2 = this.options.pedantic && !this.rules.other.endAngleBracket.test(e3) ? n2.slice(1) : n2.slice(1, -1)), ne(t2, { href: n2 && n2.replace(this.rules.inline.anyPunctuation, "$1"), title: r2 && r2.replace(this.rules.inline.anyPunctuation, "$1") }, t2[0], this.lexer, this.rules);
  30327. }
  30328. }
  30329. reflink(e2, t2) {
  30330. let n2;
  30331. if ((n2 = this.rules.inline.reflink.exec(e2)) || (n2 = this.rules.inline.nolink.exec(e2))) {
  30332. let e3 = t2[(n2[2] || n2[1]).replace(this.rules.other.multipleSpaceGlobal, " ").toLowerCase()];
  30333. if (!e3) {
  30334. let e4 = n2[0].charAt(0);
  30335. return { type: "text", raw: e4, text: e4 };
  30336. }
  30337. return ne(n2, e3, n2[0], this.lexer, this.rules);
  30338. }
  30339. }
  30340. emStrong(e2, t2, n2 = "") {
  30341. let r2 = this.rules.inline.emStrongLDelim.exec(e2);
  30342. if (!(!r2 || r2[3] && n2.match(this.rules.other.unicodeAlphaNumeric)) && (!r2[1] && !r2[2] || !n2 || this.rules.inline.punctuation.exec(n2))) {
  30343. let n3, s2, l2 = [...r2[0]].length - 1, i2 = l2, a2 = 0, o2 = "*" === r2[0][0] ? this.rules.inline.emStrongRDelimAst : this.rules.inline.emStrongRDelimUnd;
  30344. for (o2.lastIndex = 0, t2 = t2.slice(-1 * e2.length + l2); null != (r2 = o2.exec(t2)); ) {
  30345. if (n3 = r2[1] || r2[2] || r2[3] || r2[4] || r2[5] || r2[6], !n3)
  30346. continue;
  30347. if (s2 = [...n3].length, r2[3] || r2[4]) {
  30348. i2 += s2;
  30349. continue;
  30350. }
  30351. if ((r2[5] || r2[6]) && l2 % 3 && !((l2 + s2) % 3)) {
  30352. a2 += s2;
  30353. continue;
  30354. }
  30355. if (i2 -= s2, i2 > 0)
  30356. continue;
  30357. s2 = Math.min(s2, s2 + i2 + a2);
  30358. let t3 = [...r2[0]][0].length, o3 = e2.slice(0, l2 + r2.index + t3 + s2);
  30359. if (Math.min(l2, s2) % 2) {
  30360. let e3 = o3.slice(1, -1);
  30361. return { type: "em", raw: o3, text: e3, tokens: this.lexer.inlineTokens(e3) };
  30362. }
  30363. let c2 = o3.slice(2, -2);
  30364. return { type: "strong", raw: o3, text: c2, tokens: this.lexer.inlineTokens(c2) };
  30365. }
  30366. }
  30367. }
  30368. codespan(e2) {
  30369. let t2 = this.rules.inline.code.exec(e2);
  30370. if (t2) {
  30371. let e3 = t2[2].replace(this.rules.other.newLineCharGlobal, " "), n2 = this.rules.other.nonSpaceChar.test(e3), r2 = this.rules.other.startingSpaceChar.test(e3) && this.rules.other.endingSpaceChar.test(e3);
  30372. return n2 && r2 && (e3 = e3.substring(1, e3.length - 1)), { type: "codespan", raw: t2[0], text: e3 };
  30373. }
  30374. }
  30375. br(e2) {
  30376. let t2 = this.rules.inline.br.exec(e2);
  30377. if (t2)
  30378. return { type: "br", raw: t2[0] };
  30379. }
  30380. del(e2) {
  30381. let t2 = this.rules.inline.del.exec(e2);
  30382. if (t2)
  30383. return { type: "del", raw: t2[0], text: t2[2], tokens: this.lexer.inlineTokens(t2[2]) };
  30384. }
  30385. autolink(e2) {
  30386. let t2 = this.rules.inline.autolink.exec(e2);
  30387. if (t2) {
  30388. let e3, n2;
  30389. return "@" === t2[2] ? (e3 = t2[1], n2 = "mailto:" + e3) : (e3 = t2[1], n2 = e3), { type: "link", raw: t2[0], text: e3, href: n2, tokens: [{ type: "text", raw: e3, text: e3 }] };
  30390. }
  30391. }
  30392. url(e2) {
  30393. var _a2;
  30394. let t2;
  30395. if (t2 = this.rules.inline.url.exec(e2)) {
  30396. let e3, n2;
  30397. if ("@" === t2[2])
  30398. e3 = t2[0], n2 = "mailto:" + e3;
  30399. else {
  30400. let r2;
  30401. do {
  30402. r2 = t2[0], t2[0] = ((_a2 = this.rules.inline._backpedal.exec(t2[0])) == null ? void 0 : _a2[0]) ?? "";
  30403. } while (r2 !== t2[0]);
  30404. e3 = t2[0], n2 = "www." === t2[1] ? "http://" + t2[0] : t2[0];
  30405. }
  30406. return { type: "link", raw: t2[0], text: e3, href: n2, tokens: [{ type: "text", raw: e3, text: e3 }] };
  30407. }
  30408. }
  30409. inlineText(e2) {
  30410. let t2 = this.rules.inline.text.exec(e2);
  30411. if (t2) {
  30412. let e3 = this.lexer.state.inRawBlock;
  30413. return { type: "text", raw: t2[0], text: t2[0], escaped: e3 };
  30414. }
  30415. }
  30416. }, se = class e2 {
  30417. constructor(e3) {
  30418. __publicField(this, "tokens");
  30419. __publicField(this, "options");
  30420. __publicField(this, "state");
  30421. __publicField(this, "tokenizer");
  30422. __publicField(this, "inlineQueue");
  30423. this.tokens = [], this.tokens.links = /* @__PURE__ */ Object.create(null), this.options = e3 || t, this.options.tokenizer = this.options.tokenizer || new re(), this.tokenizer = this.options.tokenizer, this.tokenizer.options = this.options, this.tokenizer.lexer = this, this.inlineQueue = [], this.state = { inLink: false, inRawBlock: false, top: true };
  30424. let n2 = { other: l, block: F.normal, inline: U.normal };
  30425. this.options.pedantic ? (n2.block = F.pedantic, n2.inline = U.pedantic) : this.options.gfm && (n2.block = F.gfm, this.options.breaks ? n2.inline = U.breaks : n2.inline = U.gfm), this.tokenizer.rules = n2;
  30426. }
  30427. static get rules() {
  30428. return { block: F, inline: U };
  30429. }
  30430. static lex(t2, n2) {
  30431. return new e2(n2).lex(t2);
  30432. }
  30433. static lexInline(t2, n2) {
  30434. return new e2(n2).inlineTokens(t2);
  30435. }
  30436. lex(e3) {
  30437. e3 = e3.replace(l.carriageReturn, "\n"), this.blockTokens(e3, this.tokens);
  30438. for (let e4 = 0; e4 < this.inlineQueue.length; e4++) {
  30439. let t2 = this.inlineQueue[e4];
  30440. this.inlineTokens(t2.src, t2.tokens);
  30441. }
  30442. return this.inlineQueue = [], this.tokens;
  30443. }
  30444. blockTokens(e3, t2 = [], n2 = false) {
  30445. var _a2, _b, _c;
  30446. for (this.options.pedantic && (e3 = e3.replace(l.tabCharGlobal, " ").replace(l.spaceLine, "")); e3; ) {
  30447. let r2;
  30448. if ((_b = (_a2 = this.options.extensions) == null ? void 0 : _a2.block) == null ? void 0 : _b.some((n3) => !!(r2 = n3.call({ lexer: this }, e3, t2)) && (e3 = e3.substring(r2.raw.length), t2.push(r2), true)))
  30449. continue;
  30450. if (r2 = this.tokenizer.space(e3)) {
  30451. e3 = e3.substring(r2.raw.length);
  30452. let n3 = t2.at(-1);
  30453. 1 === r2.raw.length && void 0 !== n3 ? n3.raw += "\n" : t2.push(r2);
  30454. continue;
  30455. }
  30456. if (r2 = this.tokenizer.code(e3)) {
  30457. e3 = e3.substring(r2.raw.length);
  30458. let n3 = t2.at(-1);
  30459. "paragraph" === (n3 == null ? void 0 : n3.type) || "text" === (n3 == null ? void 0 : n3.type) ? (n3.raw += (n3.raw.endsWith("\n") ? "" : "\n") + r2.raw, n3.text += "\n" + r2.text, this.inlineQueue.at(-1).src = n3.text) : t2.push(r2);
  30460. continue;
  30461. }
  30462. if (r2 = this.tokenizer.fences(e3)) {
  30463. e3 = e3.substring(r2.raw.length), t2.push(r2);
  30464. continue;
  30465. }
  30466. if (r2 = this.tokenizer.heading(e3)) {
  30467. e3 = e3.substring(r2.raw.length), t2.push(r2);
  30468. continue;
  30469. }
  30470. if (r2 = this.tokenizer.hr(e3)) {
  30471. e3 = e3.substring(r2.raw.length), t2.push(r2);
  30472. continue;
  30473. }
  30474. if (r2 = this.tokenizer.blockquote(e3)) {
  30475. e3 = e3.substring(r2.raw.length), t2.push(r2);
  30476. continue;
  30477. }
  30478. if (r2 = this.tokenizer.list(e3)) {
  30479. e3 = e3.substring(r2.raw.length), t2.push(r2);
  30480. continue;
  30481. }
  30482. if (r2 = this.tokenizer.html(e3)) {
  30483. e3 = e3.substring(r2.raw.length), t2.push(r2);
  30484. continue;
  30485. }
  30486. if (r2 = this.tokenizer.def(e3)) {
  30487. e3 = e3.substring(r2.raw.length);
  30488. let n3 = t2.at(-1);
  30489. "paragraph" === (n3 == null ? void 0 : n3.type) || "text" === (n3 == null ? void 0 : n3.type) ? (n3.raw += (n3.raw.endsWith("\n") ? "" : "\n") + r2.raw, n3.text += "\n" + r2.raw, this.inlineQueue.at(-1).src = n3.text) : this.tokens.links[r2.tag] || (this.tokens.links[r2.tag] = { href: r2.href, title: r2.title });
  30490. continue;
  30491. }
  30492. if (r2 = this.tokenizer.table(e3)) {
  30493. e3 = e3.substring(r2.raw.length), t2.push(r2);
  30494. continue;
  30495. }
  30496. if (r2 = this.tokenizer.lheading(e3)) {
  30497. e3 = e3.substring(r2.raw.length), t2.push(r2);
  30498. continue;
  30499. }
  30500. let s2 = e3;
  30501. if ((_c = this.options.extensions) == null ? void 0 : _c.startBlock) {
  30502. let t3, n3 = 1 / 0, r3 = e3.slice(1);
  30503. this.options.extensions.startBlock.forEach((e4) => {
  30504. t3 = e4.call({ lexer: this }, r3), "number" == typeof t3 && t3 >= 0 && (n3 = Math.min(n3, t3));
  30505. }), n3 < 1 / 0 && n3 >= 0 && (s2 = e3.substring(0, n3 + 1));
  30506. }
  30507. if (this.state.top && (r2 = this.tokenizer.paragraph(s2))) {
  30508. let l2 = t2.at(-1);
  30509. n2 && "paragraph" === (l2 == null ? void 0 : l2.type) ? (l2.raw += (l2.raw.endsWith("\n") ? "" : "\n") + r2.raw, l2.text += "\n" + r2.text, this.inlineQueue.pop(), this.inlineQueue.at(-1).src = l2.text) : t2.push(r2), n2 = s2.length !== e3.length, e3 = e3.substring(r2.raw.length);
  30510. } else if (r2 = this.tokenizer.text(e3)) {
  30511. e3 = e3.substring(r2.raw.length);
  30512. let n3 = t2.at(-1);
  30513. "text" === (n3 == null ? void 0 : n3.type) ? (n3.raw += (n3.raw.endsWith("\n") ? "" : "\n") + r2.raw, n3.text += "\n" + r2.text, this.inlineQueue.pop(), this.inlineQueue.at(-1).src = n3.text) : t2.push(r2);
  30514. } else if (e3) {
  30515. let t3 = "Infinite loop on byte: " + e3.charCodeAt(0);
  30516. if (this.options.silent) {
  30517. formatAppLog("error", "at uni_modules/uview-plus/components/u-markdown/marked.esm.js:7", t3);
  30518. break;
  30519. }
  30520. throw new Error(t3);
  30521. }
  30522. }
  30523. return this.state.top = true, t2;
  30524. }
  30525. inline(e3, t2 = []) {
  30526. return this.inlineQueue.push({ src: e3, tokens: t2 }), t2;
  30527. }
  30528. inlineTokens(e3, t2 = []) {
  30529. var _a2, _b, _c;
  30530. let n2 = e3, r2 = null;
  30531. if (this.tokens.links) {
  30532. let e4 = Object.keys(this.tokens.links);
  30533. if (e4.length > 0)
  30534. for (; null != (r2 = this.tokenizer.rules.inline.reflinkSearch.exec(n2)); )
  30535. e4.includes(r2[0].slice(r2[0].lastIndexOf("[") + 1, -1)) && (n2 = n2.slice(0, r2.index) + "[" + "a".repeat(r2[0].length - 2) + "]" + n2.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex));
  30536. }
  30537. for (; null != (r2 = this.tokenizer.rules.inline.anyPunctuation.exec(n2)); )
  30538. n2 = n2.slice(0, r2.index) + "++" + n2.slice(this.tokenizer.rules.inline.anyPunctuation.lastIndex);
  30539. for (; null != (r2 = this.tokenizer.rules.inline.blockSkip.exec(n2)); )
  30540. n2 = n2.slice(0, r2.index) + "[" + "a".repeat(r2[0].length - 2) + "]" + n2.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);
  30541. let s2 = false, l2 = "";
  30542. for (; e3; ) {
  30543. let r3;
  30544. if (s2 || (l2 = ""), s2 = false, (_b = (_a2 = this.options.extensions) == null ? void 0 : _a2.inline) == null ? void 0 : _b.some((n3) => !!(r3 = n3.call({ lexer: this }, e3, t2)) && (e3 = e3.substring(r3.raw.length), t2.push(r3), true)))
  30545. continue;
  30546. if (r3 = this.tokenizer.escape(e3)) {
  30547. e3 = e3.substring(r3.raw.length), t2.push(r3);
  30548. continue;
  30549. }
  30550. if (r3 = this.tokenizer.tag(e3)) {
  30551. e3 = e3.substring(r3.raw.length), t2.push(r3);
  30552. continue;
  30553. }
  30554. if (r3 = this.tokenizer.link(e3)) {
  30555. e3 = e3.substring(r3.raw.length), t2.push(r3);
  30556. continue;
  30557. }
  30558. if (r3 = this.tokenizer.reflink(e3, this.tokens.links)) {
  30559. e3 = e3.substring(r3.raw.length);
  30560. let n3 = t2.at(-1);
  30561. "text" === r3.type && "text" === (n3 == null ? void 0 : n3.type) ? (n3.raw += r3.raw, n3.text += r3.text) : t2.push(r3);
  30562. continue;
  30563. }
  30564. if (r3 = this.tokenizer.emStrong(e3, n2, l2)) {
  30565. e3 = e3.substring(r3.raw.length), t2.push(r3);
  30566. continue;
  30567. }
  30568. if (r3 = this.tokenizer.codespan(e3)) {
  30569. e3 = e3.substring(r3.raw.length), t2.push(r3);
  30570. continue;
  30571. }
  30572. if (r3 = this.tokenizer.br(e3)) {
  30573. e3 = e3.substring(r3.raw.length), t2.push(r3);
  30574. continue;
  30575. }
  30576. if (r3 = this.tokenizer.del(e3)) {
  30577. e3 = e3.substring(r3.raw.length), t2.push(r3);
  30578. continue;
  30579. }
  30580. if (r3 = this.tokenizer.autolink(e3)) {
  30581. e3 = e3.substring(r3.raw.length), t2.push(r3);
  30582. continue;
  30583. }
  30584. if (!this.state.inLink && (r3 = this.tokenizer.url(e3))) {
  30585. e3 = e3.substring(r3.raw.length), t2.push(r3);
  30586. continue;
  30587. }
  30588. let i2 = e3;
  30589. if ((_c = this.options.extensions) == null ? void 0 : _c.startInline) {
  30590. let t3, n3 = 1 / 0, r4 = e3.slice(1);
  30591. this.options.extensions.startInline.forEach((e4) => {
  30592. t3 = e4.call({ lexer: this }, r4), "number" == typeof t3 && t3 >= 0 && (n3 = Math.min(n3, t3));
  30593. }), n3 < 1 / 0 && n3 >= 0 && (i2 = e3.substring(0, n3 + 1));
  30594. }
  30595. if (r3 = this.tokenizer.inlineText(i2)) {
  30596. e3 = e3.substring(r3.raw.length), "_" !== r3.raw.slice(-1) && (l2 = r3.raw.slice(-1)), s2 = true;
  30597. let n3 = t2.at(-1);
  30598. "text" === (n3 == null ? void 0 : n3.type) ? (n3.raw += r3.raw, n3.text += r3.text) : t2.push(r3);
  30599. } else if (e3) {
  30600. let t3 = "Infinite loop on byte: " + e3.charCodeAt(0);
  30601. if (this.options.silent) {
  30602. formatAppLog("error", "at uni_modules/uview-plus/components/u-markdown/marked.esm.js:7", t3);
  30603. break;
  30604. }
  30605. throw new Error(t3);
  30606. }
  30607. }
  30608. return t2;
  30609. }
  30610. }, le = class {
  30611. constructor(e2) {
  30612. __publicField(this, "options");
  30613. __publicField(this, "parser");
  30614. this.options = e2 || t;
  30615. }
  30616. space(e2) {
  30617. return "";
  30618. }
  30619. code({ text: e2, lang: t2, escaped: n2 }) {
  30620. var _a2;
  30621. let r2 = (_a2 = (t2 || "").match(l.notSpaceStart)) == null ? void 0 : _a2[0], s2 = e2.replace(l.endingNewline, "") + "\n";
  30622. return r2 ? '<pre><code class="language-' + V(r2) + '">' + (n2 ? s2 : V(s2, true)) + "</code></pre>\n" : "<pre><code>" + (n2 ? s2 : V(s2, true)) + "</code></pre>\n";
  30623. }
  30624. blockquote({ tokens: e2 }) {
  30625. return `<blockquote>
  30626. ${this.parser.parse(e2)}</blockquote>
  30627. `;
  30628. }
  30629. html({ text: e2 }) {
  30630. return e2;
  30631. }
  30632. heading({ tokens: e2, depth: t2 }) {
  30633. return `<h${t2}>${this.parser.parseInline(e2)}</h${t2}>
  30634. `;
  30635. }
  30636. hr(e2) {
  30637. return "<hr>\n";
  30638. }
  30639. list(e2) {
  30640. let t2 = e2.ordered, n2 = e2.start, r2 = "";
  30641. for (let t3 = 0; t3 < e2.items.length; t3++) {
  30642. let n3 = e2.items[t3];
  30643. r2 += this.listitem(n3);
  30644. }
  30645. let s2 = t2 ? "ol" : "ul";
  30646. return "<" + s2 + (t2 && 1 !== n2 ? ' start="' + n2 + '"' : "") + ">\n" + r2 + "</" + s2 + ">\n";
  30647. }
  30648. listitem(e2) {
  30649. var _a2;
  30650. let t2 = "";
  30651. if (e2.task) {
  30652. let n2 = this.checkbox({ checked: !!e2.checked });
  30653. e2.loose ? "paragraph" === ((_a2 = e2.tokens[0]) == null ? void 0 : _a2.type) ? (e2.tokens[0].text = n2 + " " + e2.tokens[0].text, e2.tokens[0].tokens && e2.tokens[0].tokens.length > 0 && "text" === e2.tokens[0].tokens[0].type && (e2.tokens[0].tokens[0].text = n2 + " " + V(e2.tokens[0].tokens[0].text), e2.tokens[0].tokens[0].escaped = true)) : e2.tokens.unshift({ type: "text", raw: n2 + " ", text: n2 + " ", escaped: true }) : t2 += n2 + " ";
  30654. }
  30655. return t2 += this.parser.parse(e2.tokens, !!e2.loose), `<li>${t2}</li>
  30656. `;
  30657. }
  30658. checkbox({ checked: e2 }) {
  30659. return "<input " + (e2 ? 'checked="" ' : "") + 'disabled="" type="checkbox">';
  30660. }
  30661. paragraph({ tokens: e2 }) {
  30662. return `<p>${this.parser.parseInline(e2)}</p>
  30663. `;
  30664. }
  30665. table(e2) {
  30666. let t2 = "", n2 = "";
  30667. for (let t3 = 0; t3 < e2.header.length; t3++)
  30668. n2 += this.tablecell(e2.header[t3]);
  30669. t2 += this.tablerow({ text: n2 });
  30670. let r2 = "";
  30671. for (let t3 = 0; t3 < e2.rows.length; t3++) {
  30672. let s2 = e2.rows[t3];
  30673. n2 = "";
  30674. for (let e3 = 0; e3 < s2.length; e3++)
  30675. n2 += this.tablecell(s2[e3]);
  30676. r2 += this.tablerow({ text: n2 });
  30677. }
  30678. return r2 && (r2 = `<tbody>${r2}</tbody>`), "<table>\n<thead>\n" + t2 + "</thead>\n" + r2 + "</table>\n";
  30679. }
  30680. tablerow({ text: e2 }) {
  30681. return `<tr>
  30682. ${e2}</tr>
  30683. `;
  30684. }
  30685. tablecell(e2) {
  30686. let t2 = this.parser.parseInline(e2.tokens), n2 = e2.header ? "th" : "td";
  30687. return (e2.align ? `<${n2} align="${e2.align}">` : `<${n2}>`) + t2 + `</${n2}>
  30688. `;
  30689. }
  30690. strong({ tokens: e2 }) {
  30691. return `<strong>${this.parser.parseInline(e2)}</strong>`;
  30692. }
  30693. em({ tokens: e2 }) {
  30694. return `<em>${this.parser.parseInline(e2)}</em>`;
  30695. }
  30696. codespan({ text: e2 }) {
  30697. return `<code>${V(e2, true)}</code>`;
  30698. }
  30699. br(e2) {
  30700. return "<br>";
  30701. }
  30702. del({ tokens: e2 }) {
  30703. return `<del>${this.parser.parseInline(e2)}</del>`;
  30704. }
  30705. link({ href: e2, title: t2, tokens: n2 }) {
  30706. let r2 = this.parser.parseInline(n2), s2 = Y(e2);
  30707. if (null === s2)
  30708. return r2;
  30709. let l2 = '<a href="' + (e2 = s2) + '"';
  30710. return t2 && (l2 += ' title="' + V(t2) + '"'), l2 += ">" + r2 + "</a>", l2;
  30711. }
  30712. image({ href: e2, title: t2, text: n2, tokens: r2 }) {
  30713. r2 && (n2 = this.parser.parseInline(r2, this.parser.textRenderer));
  30714. let s2 = Y(e2);
  30715. if (null === s2)
  30716. return V(n2);
  30717. let l2 = `<img src="${e2 = s2}" alt="${n2}"`;
  30718. return t2 && (l2 += ` title="${V(t2)}"`), l2 += ">", l2;
  30719. }
  30720. text(e2) {
  30721. return "tokens" in e2 && e2.tokens ? this.parser.parseInline(e2.tokens) : "escaped" in e2 && e2.escaped ? e2.text : V(e2.text);
  30722. }
  30723. }, ie = class {
  30724. strong({ text: e2 }) {
  30725. return e2;
  30726. }
  30727. em({ text: e2 }) {
  30728. return e2;
  30729. }
  30730. codespan({ text: e2 }) {
  30731. return e2;
  30732. }
  30733. del({ text: e2 }) {
  30734. return e2;
  30735. }
  30736. html({ text: e2 }) {
  30737. return e2;
  30738. }
  30739. text({ text: e2 }) {
  30740. return e2;
  30741. }
  30742. link({ text: e2 }) {
  30743. return "" + e2;
  30744. }
  30745. image({ text: e2 }) {
  30746. return "" + e2;
  30747. }
  30748. br() {
  30749. return "";
  30750. }
  30751. }, ae = class e2 {
  30752. constructor(e3) {
  30753. __publicField(this, "options");
  30754. __publicField(this, "renderer");
  30755. __publicField(this, "textRenderer");
  30756. this.options = e3 || t, this.options.renderer = this.options.renderer || new le(), this.renderer = this.options.renderer, this.renderer.options = this.options, this.renderer.parser = this, this.textRenderer = new ie();
  30757. }
  30758. static parse(t2, n2) {
  30759. return new e2(n2).parse(t2);
  30760. }
  30761. static parseInline(t2, n2) {
  30762. return new e2(n2).parseInline(t2);
  30763. }
  30764. parse(e3, t2 = true) {
  30765. var _a2, _b;
  30766. let n2 = "";
  30767. for (let r2 = 0; r2 < e3.length; r2++) {
  30768. let s2 = e3[r2];
  30769. if ((_b = (_a2 = this.options.extensions) == null ? void 0 : _a2.renderers) == null ? void 0 : _b[s2.type]) {
  30770. let e4 = s2, t3 = this.options.extensions.renderers[e4.type].call({ parser: this }, e4);
  30771. if (false !== t3 || !["space", "hr", "heading", "code", "table", "blockquote", "list", "html", "paragraph", "text"].includes(e4.type)) {
  30772. n2 += t3 || "";
  30773. continue;
  30774. }
  30775. }
  30776. let l2 = s2;
  30777. switch (l2.type) {
  30778. case "space":
  30779. n2 += this.renderer.space(l2);
  30780. continue;
  30781. case "hr":
  30782. n2 += this.renderer.hr(l2);
  30783. continue;
  30784. case "heading":
  30785. n2 += this.renderer.heading(l2);
  30786. continue;
  30787. case "code":
  30788. n2 += this.renderer.code(l2);
  30789. continue;
  30790. case "table":
  30791. n2 += this.renderer.table(l2);
  30792. continue;
  30793. case "blockquote":
  30794. n2 += this.renderer.blockquote(l2);
  30795. continue;
  30796. case "list":
  30797. n2 += this.renderer.list(l2);
  30798. continue;
  30799. case "html":
  30800. n2 += this.renderer.html(l2);
  30801. continue;
  30802. case "paragraph":
  30803. n2 += this.renderer.paragraph(l2);
  30804. continue;
  30805. case "text": {
  30806. let s3 = l2, i2 = this.renderer.text(s3);
  30807. for (; r2 + 1 < e3.length && "text" === e3[r2 + 1].type; )
  30808. s3 = e3[++r2], i2 += "\n" + this.renderer.text(s3);
  30809. n2 += t2 ? this.renderer.paragraph({ type: "paragraph", raw: i2, text: i2, tokens: [{ type: "text", raw: i2, text: i2, escaped: true }] }) : i2;
  30810. continue;
  30811. }
  30812. default: {
  30813. let e4 = 'Token with "' + l2.type + '" type was not found.';
  30814. if (this.options.silent)
  30815. return formatAppLog("error", "at uni_modules/uview-plus/components/u-markdown/marked.esm.js:7", e4), "";
  30816. throw new Error(e4);
  30817. }
  30818. }
  30819. }
  30820. return n2;
  30821. }
  30822. parseInline(e3, t2 = this.renderer) {
  30823. var _a2, _b;
  30824. let n2 = "";
  30825. for (let r2 = 0; r2 < e3.length; r2++) {
  30826. let s2 = e3[r2];
  30827. if ((_b = (_a2 = this.options.extensions) == null ? void 0 : _a2.renderers) == null ? void 0 : _b[s2.type]) {
  30828. let e4 = this.options.extensions.renderers[s2.type].call({ parser: this }, s2);
  30829. if (false !== e4 || !["escape", "html", "link", "image", "strong", "em", "codespan", "br", "del", "text"].includes(s2.type)) {
  30830. n2 += e4 || "";
  30831. continue;
  30832. }
  30833. }
  30834. let l2 = s2;
  30835. switch (l2.type) {
  30836. case "escape":
  30837. case "text":
  30838. n2 += t2.text(l2);
  30839. break;
  30840. case "html":
  30841. n2 += t2.html(l2);
  30842. break;
  30843. case "link":
  30844. n2 += t2.link(l2);
  30845. break;
  30846. case "image":
  30847. n2 += t2.image(l2);
  30848. break;
  30849. case "strong":
  30850. n2 += t2.strong(l2);
  30851. break;
  30852. case "em":
  30853. n2 += t2.em(l2);
  30854. break;
  30855. case "codespan":
  30856. n2 += t2.codespan(l2);
  30857. break;
  30858. case "br":
  30859. n2 += t2.br(l2);
  30860. break;
  30861. case "del":
  30862. n2 += t2.del(l2);
  30863. break;
  30864. default: {
  30865. let e4 = 'Token with "' + l2.type + '" type was not found.';
  30866. if (this.options.silent)
  30867. return formatAppLog("error", "at uni_modules/uview-plus/components/u-markdown/marked.esm.js:7", e4), "";
  30868. throw new Error(e4);
  30869. }
  30870. }
  30871. }
  30872. return n2;
  30873. }
  30874. }, oe = (_a = class {
  30875. constructor(e2) {
  30876. __publicField(this, "options");
  30877. __publicField(this, "block");
  30878. this.options = e2 || t;
  30879. }
  30880. preprocess(e2) {
  30881. return e2;
  30882. }
  30883. postprocess(e2) {
  30884. return e2;
  30885. }
  30886. processAllTokens(e2) {
  30887. return e2;
  30888. }
  30889. provideLexer() {
  30890. return this.block ? se.lex : se.lexInline;
  30891. }
  30892. provideParser() {
  30893. return this.block ? ae.parse : ae.parseInline;
  30894. }
  30895. }, __publicField(_a, "passThroughHooks", /* @__PURE__ */ new Set(["preprocess", "postprocess", "processAllTokens"])), _a), ce = class {
  30896. constructor(...e2) {
  30897. __publicField(this, "defaults", { async: false, breaks: false, extensions: null, gfm: true, hooks: null, pedantic: false, renderer: null, silent: false, tokenizer: null, walkTokens: null });
  30898. __publicField(this, "options", this.setOptions);
  30899. __publicField(this, "parse", this.parseMarkdown(true));
  30900. __publicField(this, "parseInline", this.parseMarkdown(false));
  30901. __publicField(this, "Parser", ae);
  30902. __publicField(this, "Renderer", le);
  30903. __publicField(this, "TextRenderer", ie);
  30904. __publicField(this, "Lexer", se);
  30905. __publicField(this, "Tokenizer", re);
  30906. __publicField(this, "Hooks", oe);
  30907. this.use(...e2);
  30908. }
  30909. walkTokens(e2, t2) {
  30910. var _a2, _b;
  30911. let n2 = [];
  30912. for (let r2 of e2)
  30913. switch (n2 = n2.concat(t2.call(this, r2)), r2.type) {
  30914. case "table": {
  30915. let e3 = r2;
  30916. for (let r3 of e3.header)
  30917. n2 = n2.concat(this.walkTokens(r3.tokens, t2));
  30918. for (let r3 of e3.rows)
  30919. for (let e4 of r3)
  30920. n2 = n2.concat(this.walkTokens(e4.tokens, t2));
  30921. break;
  30922. }
  30923. case "list": {
  30924. let e3 = r2;
  30925. n2 = n2.concat(this.walkTokens(e3.items, t2));
  30926. break;
  30927. }
  30928. default: {
  30929. let e3 = r2;
  30930. ((_b = (_a2 = this.defaults.extensions) == null ? void 0 : _a2.childTokens) == null ? void 0 : _b[e3.type]) ? this.defaults.extensions.childTokens[e3.type].forEach((r3) => {
  30931. let s2 = e3[r3].flat(1 / 0);
  30932. n2 = n2.concat(this.walkTokens(s2, t2));
  30933. }) : e3.tokens && (n2 = n2.concat(this.walkTokens(e3.tokens, t2)));
  30934. }
  30935. }
  30936. return n2;
  30937. }
  30938. use(...e2) {
  30939. let t2 = this.defaults.extensions || { renderers: {}, childTokens: {} };
  30940. return e2.forEach((e3) => {
  30941. let n2 = { ...e3 };
  30942. if (n2.async = this.defaults.async || n2.async || false, e3.extensions && (e3.extensions.forEach((e4) => {
  30943. if (!e4.name)
  30944. throw new Error("extension name required");
  30945. if ("renderer" in e4) {
  30946. let n3 = t2.renderers[e4.name];
  30947. t2.renderers[e4.name] = n3 ? function(...t3) {
  30948. let r2 = e4.renderer.apply(this, t3);
  30949. return false === r2 && (r2 = n3.apply(this, t3)), r2;
  30950. } : e4.renderer;
  30951. }
  30952. if ("tokenizer" in e4) {
  30953. if (!e4.level || "block" !== e4.level && "inline" !== e4.level)
  30954. throw new Error("extension level must be 'block' or 'inline'");
  30955. let n3 = t2[e4.level];
  30956. n3 ? n3.unshift(e4.tokenizer) : t2[e4.level] = [e4.tokenizer], e4.start && ("block" === e4.level ? t2.startBlock ? t2.startBlock.push(e4.start) : t2.startBlock = [e4.start] : "inline" === e4.level && (t2.startInline ? t2.startInline.push(e4.start) : t2.startInline = [e4.start]));
  30957. }
  30958. "childTokens" in e4 && e4.childTokens && (t2.childTokens[e4.name] = e4.childTokens);
  30959. }), n2.extensions = t2), e3.renderer) {
  30960. let t3 = this.defaults.renderer || new le(this.defaults);
  30961. for (let n3 in e3.renderer) {
  30962. if (!(n3 in t3))
  30963. throw new Error(`renderer '${n3}' does not exist`);
  30964. if (["options", "parser"].includes(n3))
  30965. continue;
  30966. let r2 = n3, s2 = e3.renderer[r2], l2 = t3[r2];
  30967. t3[r2] = (...e4) => {
  30968. let n4 = s2.apply(t3, e4);
  30969. return false === n4 && (n4 = l2.apply(t3, e4)), n4 || "";
  30970. };
  30971. }
  30972. n2.renderer = t3;
  30973. }
  30974. if (e3.tokenizer) {
  30975. let t3 = this.defaults.tokenizer || new re(this.defaults);
  30976. for (let n3 in e3.tokenizer) {
  30977. if (!(n3 in t3))
  30978. throw new Error(`tokenizer '${n3}' does not exist`);
  30979. if (["options", "rules", "lexer"].includes(n3))
  30980. continue;
  30981. let r2 = n3, s2 = e3.tokenizer[r2], l2 = t3[r2];
  30982. t3[r2] = (...e4) => {
  30983. let n4 = s2.apply(t3, e4);
  30984. return false === n4 && (n4 = l2.apply(t3, e4)), n4;
  30985. };
  30986. }
  30987. n2.tokenizer = t3;
  30988. }
  30989. if (e3.hooks) {
  30990. let t3 = this.defaults.hooks || new oe();
  30991. for (let n3 in e3.hooks) {
  30992. if (!(n3 in t3))
  30993. throw new Error(`hook '${n3}' does not exist`);
  30994. if (["options", "block"].includes(n3))
  30995. continue;
  30996. let r2 = n3, s2 = e3.hooks[r2], l2 = t3[r2];
  30997. oe.passThroughHooks.has(n3) ? t3[r2] = (e4) => {
  30998. if (this.defaults.async)
  30999. return Promise.resolve(s2.call(t3, e4)).then((e5) => l2.call(t3, e5));
  31000. let n4 = s2.call(t3, e4);
  31001. return l2.call(t3, n4);
  31002. } : t3[r2] = (...e4) => {
  31003. let n4 = s2.apply(t3, e4);
  31004. return false === n4 && (n4 = l2.apply(t3, e4)), n4;
  31005. };
  31006. }
  31007. n2.hooks = t3;
  31008. }
  31009. if (e3.walkTokens) {
  31010. let t3 = this.defaults.walkTokens, r2 = e3.walkTokens;
  31011. n2.walkTokens = function(e4) {
  31012. let n3 = [];
  31013. return n3.push(r2.call(this, e4)), t3 && (n3 = n3.concat(t3.call(this, e4))), n3;
  31014. };
  31015. }
  31016. this.defaults = { ...this.defaults, ...n2 };
  31017. }), this;
  31018. }
  31019. setOptions(e2) {
  31020. return this.defaults = { ...this.defaults, ...e2 }, this;
  31021. }
  31022. lexer(e2, t2) {
  31023. return se.lex(e2, t2 ?? this.defaults);
  31024. }
  31025. parser(e2, t2) {
  31026. return ae.parse(e2, t2 ?? this.defaults);
  31027. }
  31028. parseMarkdown(e2) {
  31029. return (t2, n2) => {
  31030. let r2 = { ...n2 }, s2 = { ...this.defaults, ...r2 }, l2 = this.onError(!!s2.silent, !!s2.async);
  31031. if (true === this.defaults.async && false === r2.async)
  31032. return l2(new Error("marked(): The async option was set to true by an extension. Remove async: false from the parse options object to return a Promise."));
  31033. if (typeof t2 > "u" || null === t2)
  31034. return l2(new Error("marked(): input parameter is undefined or null"));
  31035. if ("string" != typeof t2)
  31036. return l2(new Error("marked(): input parameter is of type " + Object.prototype.toString.call(t2) + ", string expected"));
  31037. s2.hooks && (s2.hooks.options = s2, s2.hooks.block = e2);
  31038. let i2 = s2.hooks ? s2.hooks.provideLexer() : e2 ? se.lex : se.lexInline, a2 = s2.hooks ? s2.hooks.provideParser() : e2 ? ae.parse : ae.parseInline;
  31039. if (s2.async)
  31040. return Promise.resolve(s2.hooks ? s2.hooks.preprocess(t2) : t2).then((e3) => i2(e3, s2)).then((e3) => s2.hooks ? s2.hooks.processAllTokens(e3) : e3).then((e3) => s2.walkTokens ? Promise.all(this.walkTokens(e3, s2.walkTokens)).then(() => e3) : e3).then((e3) => a2(e3, s2)).then((e3) => s2.hooks ? s2.hooks.postprocess(e3) : e3).catch(l2);
  31041. try {
  31042. s2.hooks && (t2 = s2.hooks.preprocess(t2));
  31043. let e3 = i2(t2, s2);
  31044. s2.hooks && (e3 = s2.hooks.processAllTokens(e3)), s2.walkTokens && this.walkTokens(e3, s2.walkTokens);
  31045. let n3 = a2(e3, s2);
  31046. return s2.hooks && (n3 = s2.hooks.postprocess(n3)), n3;
  31047. } catch (e3) {
  31048. return l2(e3);
  31049. }
  31050. };
  31051. }
  31052. onError(e2, t2) {
  31053. return (n2) => {
  31054. if (n2.message += "\nPlease report this to https://github.com/markedjs/marked.", e2) {
  31055. let e3 = "<p>An error occurred:</p><pre>" + V(n2.message + "", true) + "</pre>";
  31056. return t2 ? Promise.resolve(e3) : e3;
  31057. }
  31058. if (t2)
  31059. return Promise.reject(n2);
  31060. throw n2;
  31061. };
  31062. }
  31063. }, he = new ce();
  31064. function pe(e2, t2) {
  31065. return he.parse(e2, t2);
  31066. }
  31067. pe.options = pe.setOptions = function(e2) {
  31068. return he.setOptions(e2), pe.defaults = he.defaults, n(pe.defaults), pe;
  31069. }, pe.getDefaults = e, pe.defaults = t, pe.use = function(...e2) {
  31070. return he.use(...e2), pe.defaults = he.defaults, n(pe.defaults), pe;
  31071. }, pe.walkTokens = function(e2, t2) {
  31072. return he.walkTokens(e2, t2);
  31073. }, pe.parseInline = he.parseInline, pe.Parser = ae, pe.parser = ae.parse, pe.Renderer = le, pe.TextRenderer = ie, pe.Lexer = se, pe.lexer = se.lex, pe.Tokenizer = re, pe.Hooks = oe, pe.parse = pe;
  31074. pe.options;
  31075. pe.setOptions;
  31076. pe.use;
  31077. pe.walkTokens;
  31078. pe.parseInline;
  31079. ae.parse;
  31080. se.lex;
  31081. const _sfc_main$16 = {
  31082. name: "up-markdown",
  31083. props: {
  31084. // markdown内容
  31085. content: {
  31086. type: String,
  31087. default: ""
  31088. },
  31089. // 是否启用图片预览
  31090. previewImg: {
  31091. type: Boolean,
  31092. default: true
  31093. },
  31094. // 是否显示代码块行号
  31095. showLineNumber: {
  31096. type: Boolean,
  31097. default: false
  31098. },
  31099. // 主题样式 'light' | 'dark'
  31100. theme: {
  31101. type: String,
  31102. default: "light"
  31103. }
  31104. },
  31105. data() {
  31106. return {
  31107. parsedContent: ""
  31108. };
  31109. },
  31110. watch: {
  31111. content: {
  31112. handler(newVal) {
  31113. this.parseMarkdown(newVal);
  31114. },
  31115. immediate: true
  31116. }
  31117. },
  31118. methods: {
  31119. // 解析markdown内容
  31120. parseMarkdown(content) {
  31121. if (!content) {
  31122. this.parsedContent = "";
  31123. return;
  31124. }
  31125. let parsed = pe(content);
  31126. parsed = this.handleCodeBlock(parsed);
  31127. parsed = this.applyTheme(parsed);
  31128. this.parsedContent = parsed;
  31129. },
  31130. // 处理代码块
  31131. handleCodeBlock(html) {
  31132. return html.replace(/<pre><code([^>]*)>([^<]+)<\/code><\/pre>/g, (match, lang, code2) => {
  31133. const language = lang.match(/class="language-([^"]+)"/);
  31134. const langClass = language ? `language-${language[1]}` : "";
  31135. let result = `<pre class="up-markdown-code ${langClass}">`;
  31136. if (this.showLineNumber) {
  31137. const lines = code2.split("\n").filter((line) => line.trim() !== "");
  31138. result += '<span class="up-markdown-line-numbers">';
  31139. lines.push("");
  31140. lines.forEach((_2, index2) => {
  31141. result += `<span class="up-markdown-line-number">${index2 + 1}</span>`;
  31142. });
  31143. result += "</span>";
  31144. }
  31145. result += `<code class='code-lang ${langClass}'>${code2}</code></pre>`;
  31146. return result;
  31147. });
  31148. },
  31149. // 应用主题样式
  31150. applyTheme(html) {
  31151. return html;
  31152. }
  31153. }
  31154. };
  31155. function _sfc_render$15(_ctx, _cache, $props, $setup, $data, $options) {
  31156. const _component_up_parse = vue.resolveComponent("up-parse");
  31157. return vue.openBlock(), vue.createElementBlock(
  31158. "view",
  31159. {
  31160. class: vue.normalizeClass(["up-markdown", $props.theme])
  31161. },
  31162. [
  31163. vue.createVNode(_component_up_parse, {
  31164. content: $data.parsedContent,
  31165. previewImg: $props.previewImg
  31166. }, null, 8, ["content", "previewImg"])
  31167. ],
  31168. 2
  31169. /* CLASS */
  31170. );
  31171. }
  31172. const uMarkdown = /* @__PURE__ */ _export_sfc(_sfc_main$16, [["render", _sfc_render$15], ["__scopeId", "data-v-9f53166f"], ["__file", "C:/Users/EDY/Desktop/项目/shuibei/uni_modules/uview-plus/components/u-markdown/u-markdown.vue"]]);
  31173. const __vite_glob_0_62 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
  31174. __proto__: null,
  31175. default: uMarkdown
  31176. }, Symbol.toStringTag, { value: "Module" }));
  31177. const _sfc_main$15 = {
  31178. name: "u-message-input",
  31179. props: {
  31180. // 最大输入长度
  31181. maxlength: {
  31182. type: [Number, String],
  31183. default: 4
  31184. },
  31185. // 是否用圆点填充
  31186. dotFill: {
  31187. type: Boolean,
  31188. default: false
  31189. },
  31190. // 显示模式,box-盒子模式,bottomLine-横线在底部模式,middleLine-横线在中部模式
  31191. mode: {
  31192. type: String,
  31193. default: "box"
  31194. },
  31195. // 预置值
  31196. modelValue: {
  31197. type: [String, Number],
  31198. default: ""
  31199. },
  31200. // 当前激活输入item,是否带有呼吸效果
  31201. breathe: {
  31202. type: Boolean,
  31203. default: true
  31204. },
  31205. // 是否自动获取焦点
  31206. focus: {
  31207. type: Boolean,
  31208. default: false
  31209. },
  31210. // 字体是否加粗
  31211. bold: {
  31212. type: Boolean,
  31213. default: false
  31214. },
  31215. // 字体大小
  31216. fontSize: {
  31217. type: [String, Number],
  31218. default: 60
  31219. },
  31220. // 激活样式
  31221. activeColor: {
  31222. type: String,
  31223. default: "#2979ff"
  31224. },
  31225. // 未激活的样式
  31226. inactiveColor: {
  31227. type: String,
  31228. default: "#606266"
  31229. },
  31230. // 输入框的大小,单位rpx,宽等于高
  31231. width: {
  31232. type: [Number, String],
  31233. default: "80"
  31234. },
  31235. // 是否隐藏原生键盘,如果想用自定义键盘的话,需设置此参数为true
  31236. disabledKeyboard: {
  31237. type: Boolean,
  31238. default: false
  31239. }
  31240. },
  31241. watch: {
  31242. // maxlength: {
  31243. // // 此值设置为true,会在组件加载后无需maxlength变化就会执行一次本监听函数,无需再created生命周期中处理
  31244. // immediate: true,
  31245. // handler(val) {
  31246. // this.maxlength = Number(val);
  31247. // }
  31248. // },
  31249. modelValue: {
  31250. immediate: true,
  31251. handler(val) {
  31252. val = String(val);
  31253. this.valueModel = val.substring(0, this.maxlength);
  31254. }
  31255. }
  31256. },
  31257. data() {
  31258. return {
  31259. valueModel: ""
  31260. };
  31261. },
  31262. emits: ["change", "finish"],
  31263. computed: {
  31264. // 是否显示呼吸灯效果
  31265. animationClass() {
  31266. return (index2) => {
  31267. if (this.breathe && this.charArr.length == index2)
  31268. return "u-breathe";
  31269. else
  31270. return "";
  31271. };
  31272. },
  31273. // 用于显示字符
  31274. charArr() {
  31275. return this.valueModel.split("");
  31276. },
  31277. charArrLength() {
  31278. return this.charArr.length;
  31279. },
  31280. // 根据长度,循环输入框的个数,因为头条小程序数值不能用于v-for
  31281. loopCharArr() {
  31282. return new Array(this.maxlength);
  31283. }
  31284. },
  31285. methods: {
  31286. getVal(e2) {
  31287. let {
  31288. value: value2
  31289. } = e2.detail;
  31290. this.valueModel = value2;
  31291. if (String(value2).length > this.maxlength)
  31292. return;
  31293. this.$emit("change", value2);
  31294. if (String(value2).length == this.maxlength) {
  31295. this.$emit("finish", value2);
  31296. }
  31297. }
  31298. }
  31299. };
  31300. function _sfc_render$14(_ctx, _cache, $props, $setup, $data, $options) {
  31301. return vue.openBlock(), vue.createElementBlock("view", { class: "u-char-box" }, [
  31302. vue.createElementVNode("view", { class: "u-char-flex" }, [
  31303. vue.createElementVNode("input", {
  31304. disabled: $props.disabledKeyboard,
  31305. value: $data.valueModel,
  31306. type: "number",
  31307. focus: $props.focus,
  31308. maxlength: $props.maxlength,
  31309. class: "u-input",
  31310. onInput: _cache[0] || (_cache[0] = (...args) => $options.getVal && $options.getVal(...args))
  31311. }, null, 40, ["disabled", "value", "focus", "maxlength"]),
  31312. (vue.openBlock(true), vue.createElementBlock(
  31313. vue.Fragment,
  31314. null,
  31315. vue.renderList($options.loopCharArr, (item, index2) => {
  31316. return vue.openBlock(), vue.createElementBlock("view", { key: index2 }, [
  31317. vue.createElementVNode(
  31318. "view",
  31319. {
  31320. class: vue.normalizeClass([
  31321. $props.breathe && $options.charArrLength == index2 ? "u-breathe" : "",
  31322. "u-char-item",
  31323. $options.charArrLength === index2 && $props.mode == "box" ? "u-box-active" : "",
  31324. $props.mode === "box" ? "u-box" : ""
  31325. ]),
  31326. style: vue.normalizeStyle({
  31327. fontWeight: $props.bold ? "bold" : "normal",
  31328. fontSize: $props.fontSize + "rpx",
  31329. width: $props.width + "rpx",
  31330. height: $props.width + "rpx",
  31331. color: $props.inactiveColor,
  31332. borderColor: $options.charArrLength === index2 && $props.mode == "box" ? $props.activeColor : $props.inactiveColor
  31333. })
  31334. },
  31335. [
  31336. $props.mode !== "middleLine" ? (vue.openBlock(), vue.createElementBlock(
  31337. "view",
  31338. {
  31339. key: 0,
  31340. class: "u-placeholder-line",
  31341. style: vue.normalizeStyle({
  31342. display: $options.charArrLength === index2 ? "block" : "none",
  31343. height: $props.width * 0.5 + "rpx"
  31344. })
  31345. },
  31346. null,
  31347. 4
  31348. /* STYLE */
  31349. )) : vue.createCommentVNode("v-if", true),
  31350. $props.mode === "middleLine" && $options.charArrLength <= index2 ? (vue.openBlock(), vue.createElementBlock(
  31351. "view",
  31352. {
  31353. key: 1,
  31354. class: vue.normalizeClass([[$props.breathe && $options.charArrLength == index2 ? "u-breathe" : "", $options.charArrLength === index2 ? "u-middle-line-active" : ""], "u-middle-line"]),
  31355. style: vue.normalizeStyle({ height: $props.bold ? "4px" : "2px", background: $options.charArrLength === index2 ? $props.activeColor : $props.inactiveColor })
  31356. },
  31357. null,
  31358. 6
  31359. /* CLASS, STYLE */
  31360. )) : vue.createCommentVNode("v-if", true),
  31361. $props.mode === "bottomLine" ? (vue.openBlock(), vue.createElementBlock(
  31362. "view",
  31363. {
  31364. key: 2,
  31365. class: vue.normalizeClass([[$props.breathe && $options.charArrLength == index2 ? "u-breathe" : "", $options.charArrLength === index2 ? "u-bottom-line-active" : ""], "u-bottom-line"]),
  31366. style: vue.normalizeStyle({ height: $props.bold ? "4px" : "2px", background: $options.charArrLength === index2 ? $props.activeColor : $props.inactiveColor })
  31367. },
  31368. null,
  31369. 6
  31370. /* CLASS, STYLE */
  31371. )) : vue.createCommentVNode("v-if", true),
  31372. !$props.dotFill ? (vue.openBlock(), vue.createElementBlock(
  31373. vue.Fragment,
  31374. { key: 3 },
  31375. [
  31376. vue.createTextVNode(
  31377. vue.toDisplayString($options.charArr[index2] ? $options.charArr[index2] : ""),
  31378. 1
  31379. /* TEXT */
  31380. )
  31381. ],
  31382. 64
  31383. /* STABLE_FRAGMENT */
  31384. )) : (vue.openBlock(), vue.createElementBlock(
  31385. "text",
  31386. {
  31387. key: 4,
  31388. class: "u-dot"
  31389. },
  31390. vue.toDisplayString($options.charArr[index2] ? "●" : ""),
  31391. 1
  31392. /* TEXT */
  31393. ))
  31394. ],
  31395. 6
  31396. /* CLASS, STYLE */
  31397. )
  31398. ]);
  31399. }),
  31400. 128
  31401. /* KEYED_FRAGMENT */
  31402. ))
  31403. ])
  31404. ]);
  31405. }
  31406. const uMessageInput = /* @__PURE__ */ _export_sfc(_sfc_main$15, [["render", _sfc_render$14], ["__scopeId", "data-v-bf0cf2ff"], ["__file", "C:/Users/EDY/Desktop/项目/shuibei/uni_modules/uview-plus/components/u-message-input/u-message-input.vue"]]);
  31407. const __vite_glob_0_63 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
  31408. __proto__: null,
  31409. default: uMessageInput
  31410. }, Symbol.toStringTag, { value: "Module" }));
  31411. const props$E = defineMixin({
  31412. props: {
  31413. // 是否展示modal
  31414. show: {
  31415. type: Boolean,
  31416. default: () => props$1x.modal.show
  31417. },
  31418. // 标题
  31419. title: {
  31420. type: [String],
  31421. default: () => props$1x.modal.title
  31422. },
  31423. // 弹窗内容
  31424. content: {
  31425. type: String,
  31426. default: () => props$1x.modal.content
  31427. },
  31428. // 确认文案
  31429. confirmText: {
  31430. type: String,
  31431. default: () => props$1x.modal.confirmText
  31432. },
  31433. // 取消文案
  31434. cancelText: {
  31435. type: String,
  31436. default: () => props$1x.modal.cancelText
  31437. },
  31438. // 是否显示确认按钮
  31439. showConfirmButton: {
  31440. type: Boolean,
  31441. default: () => props$1x.modal.showConfirmButton
  31442. },
  31443. // 是否显示取消按钮
  31444. showCancelButton: {
  31445. type: Boolean,
  31446. default: () => props$1x.modal.showCancelButton
  31447. },
  31448. // 确认按钮颜色
  31449. confirmColor: {
  31450. type: String,
  31451. default: () => props$1x.modal.confirmColor
  31452. },
  31453. // 取消文字颜色
  31454. cancelColor: {
  31455. type: String,
  31456. default: () => props$1x.modal.cancelColor
  31457. },
  31458. // 对调确认和取消的位置
  31459. buttonReverse: {
  31460. type: Boolean,
  31461. default: () => props$1x.modal.buttonReverse
  31462. },
  31463. // 是否开启缩放效果
  31464. zoom: {
  31465. type: Boolean,
  31466. default: () => props$1x.modal.zoom
  31467. },
  31468. // 是否异步关闭,只对确定按钮有效
  31469. asyncClose: {
  31470. type: Boolean,
  31471. default: () => props$1x.modal.asyncClose
  31472. },
  31473. // 是否允许点击遮罩关闭modal
  31474. closeOnClickOverlay: {
  31475. type: Boolean,
  31476. default: () => props$1x.modal.closeOnClickOverlay
  31477. },
  31478. // 给一个负的margin-top,往上偏移,避免和键盘重合的情况
  31479. negativeTop: {
  31480. type: [String, Number],
  31481. default: () => props$1x.modal.negativeTop
  31482. },
  31483. // modal宽度,不支持百分比,可以数值,px,rpx单位
  31484. width: {
  31485. type: [String, Number],
  31486. default: () => props$1x.modal.width
  31487. },
  31488. // 确认按钮的样式,circle-圆形,square-方形,如设置,将不会显示取消按钮
  31489. confirmButtonShape: {
  31490. type: String,
  31491. default: () => props$1x.modal.confirmButtonShape
  31492. },
  31493. // 弹窗动画过度时间
  31494. duration: {
  31495. type: [Number],
  31496. default: props$1x.modal.duration
  31497. },
  31498. // 文案对齐方式
  31499. contentTextAlign: {
  31500. type: String,
  31501. default: () => props$1x.modal.contentTextAlign
  31502. },
  31503. // 异步确定时如果点击了取消时候的提示文案
  31504. asyncCloseTip: {
  31505. type: String,
  31506. default: () => props$1x.modal.asyncCloseTip
  31507. },
  31508. // 是否异步关闭,只对取消按钮有效
  31509. asyncCancelClose: {
  31510. type: Boolean,
  31511. default: () => props$1x.modal.asyncCancelClose
  31512. },
  31513. // 内容样式
  31514. contentStyle: {
  31515. type: Object,
  31516. default: () => props$1x.modal.contentStyle
  31517. }
  31518. }
  31519. });
  31520. const _sfc_main$14 = {
  31521. name: "u-modal",
  31522. mixins: [mpMixin, mixin, props$E],
  31523. data() {
  31524. return {
  31525. loading: false
  31526. };
  31527. },
  31528. watch: {
  31529. show(n2) {
  31530. if (n2 && this.loading)
  31531. this.loading = false;
  31532. }
  31533. },
  31534. emits: ["confirm", "cancel", "close", "update:show", "cancelOnAsync"],
  31535. computed: {
  31536. contentStyleCpu() {
  31537. let style = this.contentStyle;
  31538. style.paddingTop = `${this.title ? 12 : 25}px`;
  31539. return style;
  31540. }
  31541. },
  31542. methods: {
  31543. addUnit,
  31544. // 点击确定按钮
  31545. confirmHandler() {
  31546. if (this.asyncClose) {
  31547. this.loading = true;
  31548. } else {
  31549. this.$emit("update:show", false);
  31550. }
  31551. this.$emit("confirm");
  31552. },
  31553. // 点击取消按钮
  31554. cancelHandler() {
  31555. if (this.asyncClose && this.loading) {
  31556. if (this.asyncCloseTip) {
  31557. uni.showToast({
  31558. title: this.asyncCloseTip,
  31559. icon: "none"
  31560. });
  31561. }
  31562. this.$emit("cancelOnAsync");
  31563. } else {
  31564. if (!this.asyncCancelClose) {
  31565. this.$emit("update:show", false);
  31566. }
  31567. }
  31568. this.$emit("cancel");
  31569. },
  31570. // 点击遮罩
  31571. // 从原理上来说,modal的遮罩点击,并不是真的点击到了遮罩
  31572. // 因为modal依赖于popup的中部弹窗类型,中部弹窗比较特殊,虽有然遮罩,但是为了让弹窗内容能flex居中
  31573. // 多了一个透明的遮罩,此透明的遮罩会覆盖在灰色的遮罩上,所以实际上是点击不到灰色遮罩的,popup内部在
  31574. // 透明遮罩的子元素做了.stop处理,所以点击内容区,也不会导致误触发
  31575. clickHandler() {
  31576. if (this.closeOnClickOverlay) {
  31577. this.$emit("update:show", false);
  31578. this.$emit("close");
  31579. }
  31580. }
  31581. }
  31582. };
  31583. function _sfc_render$13(_ctx, _cache, $props, $setup, $data, $options) {
  31584. const _component_u_line = resolveEasycom(vue.resolveDynamicComponent("u-line"), __easycom_1$4);
  31585. const _component_u_loading_icon = resolveEasycom(vue.resolveDynamicComponent("u-loading-icon"), __easycom_0$e);
  31586. const _component_u_popup = resolveEasycom(vue.resolveDynamicComponent("u-popup"), __easycom_2);
  31587. return vue.openBlock(), vue.createBlock(_component_u_popup, {
  31588. mode: "center",
  31589. zoom: _ctx.zoom,
  31590. show: _ctx.show,
  31591. class: vue.normalizeClass([_ctx.customClass]),
  31592. customStyle: {
  31593. borderRadius: "6px",
  31594. overflow: "hidden",
  31595. marginTop: `-${$options.addUnit(_ctx.negativeTop)}`
  31596. },
  31597. closeOnClickOverlay: _ctx.closeOnClickOverlay,
  31598. safeAreaInsetBottom: false,
  31599. duration: _ctx.duration,
  31600. onClick: $options.clickHandler
  31601. }, {
  31602. bottom: vue.withCtx(() => [
  31603. vue.renderSlot(_ctx.$slots, "popupBottom", {}, void 0, true)
  31604. ]),
  31605. default: vue.withCtx(() => [
  31606. vue.createElementVNode(
  31607. "view",
  31608. {
  31609. class: "u-modal",
  31610. style: vue.normalizeStyle({
  31611. width: $options.addUnit(_ctx.width)
  31612. })
  31613. },
  31614. [
  31615. _ctx.title ? (vue.openBlock(), vue.createElementBlock(
  31616. "view",
  31617. {
  31618. key: 0,
  31619. class: "u-modal__title"
  31620. },
  31621. vue.toDisplayString(_ctx.title),
  31622. 1
  31623. /* TEXT */
  31624. )) : vue.createCommentVNode("v-if", true),
  31625. vue.createElementVNode(
  31626. "view",
  31627. {
  31628. class: "u-modal__content",
  31629. style: vue.normalizeStyle($options.contentStyleCpu)
  31630. },
  31631. [
  31632. vue.renderSlot(_ctx.$slots, "default", {}, () => [
  31633. vue.createElementVNode(
  31634. "text",
  31635. {
  31636. class: "u-modal__content__text",
  31637. style: vue.normalizeStyle({ textAlign: _ctx.contentTextAlign })
  31638. },
  31639. vue.toDisplayString(_ctx.content),
  31640. 5
  31641. /* TEXT, STYLE */
  31642. )
  31643. ], true)
  31644. ],
  31645. 4
  31646. /* STYLE */
  31647. ),
  31648. _ctx.$slots.confirmButton ? (vue.openBlock(), vue.createElementBlock("view", {
  31649. key: 1,
  31650. class: "u-modal__button-group--confirm-button"
  31651. }, [
  31652. vue.renderSlot(_ctx.$slots, "confirmButton", {}, void 0, true)
  31653. ])) : (vue.openBlock(), vue.createElementBlock(
  31654. vue.Fragment,
  31655. { key: 2 },
  31656. [
  31657. vue.createVNode(_component_u_line),
  31658. vue.createElementVNode(
  31659. "view",
  31660. {
  31661. class: "u-modal__button-group",
  31662. style: vue.normalizeStyle({
  31663. flexDirection: _ctx.buttonReverse ? "row-reverse" : "row"
  31664. })
  31665. },
  31666. [
  31667. _ctx.showCancelButton ? (vue.openBlock(), vue.createElementBlock(
  31668. "view",
  31669. {
  31670. key: 0,
  31671. class: vue.normalizeClass(["u-modal__button-group__wrapper u-modal__button-group__wrapper--cancel", [_ctx.showCancelButton && !_ctx.showConfirmButton && "u-modal__button-group__wrapper--only-cancel"]]),
  31672. "hover-stay-time": 150,
  31673. "hover-class": "u-modal__button-group__wrapper--hover",
  31674. onClick: _cache[0] || (_cache[0] = (...args) => $options.cancelHandler && $options.cancelHandler(...args))
  31675. },
  31676. [
  31677. vue.createElementVNode(
  31678. "text",
  31679. {
  31680. class: "u-modal__button-group__wrapper__text",
  31681. style: vue.normalizeStyle({
  31682. color: _ctx.cancelColor
  31683. })
  31684. },
  31685. vue.toDisplayString(_ctx.cancelText),
  31686. 5
  31687. /* TEXT, STYLE */
  31688. )
  31689. ],
  31690. 2
  31691. /* CLASS */
  31692. )) : vue.createCommentVNode("v-if", true),
  31693. _ctx.showConfirmButton && _ctx.showCancelButton ? (vue.openBlock(), vue.createBlock(_component_u_line, {
  31694. key: 1,
  31695. direction: "column"
  31696. })) : vue.createCommentVNode("v-if", true),
  31697. _ctx.showConfirmButton ? (vue.openBlock(), vue.createElementBlock(
  31698. "view",
  31699. {
  31700. key: 2,
  31701. class: vue.normalizeClass(["u-modal__button-group__wrapper u-modal__button-group__wrapper--confirm", [!_ctx.showCancelButton && _ctx.showConfirmButton && "u-modal__button-group__wrapper--only-confirm"]]),
  31702. "hover-stay-time": 150,
  31703. "hover-class": "u-modal__button-group__wrapper--hover",
  31704. onClick: _cache[1] || (_cache[1] = (...args) => $options.confirmHandler && $options.confirmHandler(...args))
  31705. },
  31706. [
  31707. $data.loading ? (vue.openBlock(), vue.createBlock(_component_u_loading_icon, { key: 0 })) : (vue.openBlock(), vue.createElementBlock(
  31708. "text",
  31709. {
  31710. key: 1,
  31711. class: "u-modal__button-group__wrapper__text",
  31712. style: vue.normalizeStyle({
  31713. color: _ctx.confirmColor
  31714. })
  31715. },
  31716. vue.toDisplayString(_ctx.confirmText),
  31717. 5
  31718. /* TEXT, STYLE */
  31719. ))
  31720. ],
  31721. 2
  31722. /* CLASS */
  31723. )) : vue.createCommentVNode("v-if", true)
  31724. ],
  31725. 4
  31726. /* STYLE */
  31727. )
  31728. ],
  31729. 64
  31730. /* STABLE_FRAGMENT */
  31731. ))
  31732. ],
  31733. 4
  31734. /* STYLE */
  31735. )
  31736. ]),
  31737. _: 3
  31738. /* FORWARDED */
  31739. }, 8, ["zoom", "show", "class", "customStyle", "closeOnClickOverlay", "duration", "onClick"]);
  31740. }
  31741. const uModal = /* @__PURE__ */ _export_sfc(_sfc_main$14, [["render", _sfc_render$13], ["__scopeId", "data-v-f667648f"], ["__file", "C:/Users/EDY/Desktop/项目/shuibei/uni_modules/uview-plus/components/u-modal/u-modal.vue"]]);
  31742. const __vite_glob_0_64 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
  31743. __proto__: null,
  31744. default: uModal
  31745. }, Symbol.toStringTag, { value: "Module" }));
  31746. const props$D = defineMixin({
  31747. props: {
  31748. // 是否开启顶部安全区适配
  31749. safeAreaInsetTop: {
  31750. type: Boolean,
  31751. default: () => true
  31752. },
  31753. // 是否固定在顶部
  31754. fixed: {
  31755. type: Boolean,
  31756. default: () => true
  31757. },
  31758. // 左边的图标
  31759. leftIcon: {
  31760. type: String,
  31761. default: "arrow-leftward"
  31762. },
  31763. // 背景颜色
  31764. bgColor: {
  31765. type: String,
  31766. default: () => "rgba(0,0,0,.15)"
  31767. },
  31768. // 导航栏高度
  31769. height: {
  31770. type: [String, Number],
  31771. default: () => "32px"
  31772. },
  31773. // 图标的大小
  31774. iconSize: {
  31775. type: [String, Number],
  31776. default: "20px"
  31777. },
  31778. // 图标的颜色
  31779. iconColor: {
  31780. type: String,
  31781. default: "#fff"
  31782. },
  31783. // 点击左侧区域(返回图标),是否自动返回上一页
  31784. autoBack: {
  31785. type: Boolean,
  31786. default: () => true
  31787. },
  31788. // 首页路径
  31789. homeUrl: {
  31790. type: [String],
  31791. default: ""
  31792. }
  31793. }
  31794. });
  31795. const _sfc_main$13 = {
  31796. name: "u-navbar-mini",
  31797. mixins: [mpMixin, mixin, props$D],
  31798. data() {
  31799. return {};
  31800. },
  31801. emits: ["leftClick", "homeClick"],
  31802. created() {
  31803. },
  31804. methods: {
  31805. addStyle,
  31806. addUnit,
  31807. sys,
  31808. getPx,
  31809. // 点击左侧区域
  31810. leftClick() {
  31811. this.$emit("leftClick");
  31812. if (this.autoBack) {
  31813. uni.navigateBack();
  31814. }
  31815. },
  31816. homeClick() {
  31817. if (this.homeUrl) {
  31818. uni.reLaunch({ url: this.homeUrl });
  31819. }
  31820. }
  31821. }
  31822. };
  31823. function _sfc_render$12(_ctx, _cache, $props, $setup, $data, $options) {
  31824. const _component_u_status_bar = resolveEasycom(vue.resolveDynamicComponent("u-status-bar"), __easycom_0$c);
  31825. const _component_up_icon = vue.resolveComponent("up-icon");
  31826. const _component_up_line = vue.resolveComponent("up-line");
  31827. return vue.openBlock(), vue.createElementBlock(
  31828. "view",
  31829. {
  31830. class: vue.normalizeClass(["u-navbar-mini", [_ctx.customClass]])
  31831. },
  31832. [
  31833. vue.createElementVNode(
  31834. "view",
  31835. {
  31836. class: vue.normalizeClass(["u-navbar-mini__inner", [_ctx.fixed && "u-navbar-mini--fixed"]])
  31837. },
  31838. [
  31839. _ctx.safeAreaInsetTop ? (vue.openBlock(), vue.createBlock(_component_u_status_bar, { key: 0 })) : vue.createCommentVNode("v-if", true),
  31840. vue.createElementVNode(
  31841. "view",
  31842. {
  31843. class: "u-navbar-mini__content",
  31844. style: vue.normalizeStyle({
  31845. height: $options.addUnit(_ctx.height),
  31846. backgroundColor: _ctx.bgColor
  31847. })
  31848. },
  31849. [
  31850. vue.createElementVNode("view", {
  31851. class: "u-navbar-mini__content__left",
  31852. "hover-class": "u-navbar-mini__content__left--hover",
  31853. "hover-start-time": "150",
  31854. onClick: _cache[0] || (_cache[0] = (...args) => $options.leftClick && $options.leftClick(...args))
  31855. }, [
  31856. vue.renderSlot(_ctx.$slots, "left", {}, () => [
  31857. vue.createVNode(_component_up_icon, {
  31858. name: _ctx.leftIcon,
  31859. size: _ctx.iconSize,
  31860. color: _ctx.iconColor
  31861. }, null, 8, ["name", "size", "color"])
  31862. ], true)
  31863. ]),
  31864. vue.createElementVNode("view", { style: { "padding": "10px 10px" } }, [
  31865. vue.createVNode(_component_up_line, {
  31866. direction: "col",
  31867. color: "#fff",
  31868. length: "16px"
  31869. })
  31870. ]),
  31871. vue.createElementVNode("view", {
  31872. class: "u-navbar-mini__content__center",
  31873. onClick: _cache[1] || (_cache[1] = (...args) => $options.homeClick && $options.homeClick(...args))
  31874. }, [
  31875. vue.renderSlot(_ctx.$slots, "center", {}, () => [
  31876. vue.createVNode(_component_up_icon, {
  31877. name: "home",
  31878. size: _ctx.iconSize,
  31879. color: _ctx.iconColor
  31880. }, null, 8, ["size", "color"])
  31881. ], true)
  31882. ])
  31883. ],
  31884. 4
  31885. /* STYLE */
  31886. )
  31887. ],
  31888. 2
  31889. /* CLASS */
  31890. )
  31891. ],
  31892. 2
  31893. /* CLASS */
  31894. );
  31895. }
  31896. const uNavbarMini = /* @__PURE__ */ _export_sfc(_sfc_main$13, [["render", _sfc_render$12], ["__scopeId", "data-v-dc7ccfda"], ["__file", "C:/Users/EDY/Desktop/项目/shuibei/uni_modules/uview-plus/components/u-navbar-mini/u-navbar-mini.vue"]]);
  31897. const __vite_glob_0_65 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
  31898. __proto__: null,
  31899. default: uNavbarMini
  31900. }, Symbol.toStringTag, { value: "Module" }));
  31901. const props$C = defineMixin({
  31902. props: {
  31903. // 是否开启顶部安全区适配
  31904. safeAreaInsetTop: {
  31905. type: Boolean,
  31906. default: () => props$1x.navbar.safeAreaInsetTop
  31907. },
  31908. // 固定在顶部时,是否生成一个等高元素,以防止塌陷
  31909. placeholder: {
  31910. type: Boolean,
  31911. default: () => props$1x.navbar.placeholder
  31912. },
  31913. // 是否固定在顶部
  31914. fixed: {
  31915. type: Boolean,
  31916. default: () => props$1x.navbar.fixed
  31917. },
  31918. // 是否显示下边框
  31919. border: {
  31920. type: Boolean,
  31921. default: () => props$1x.navbar.border
  31922. },
  31923. // 左边的图标
  31924. leftIcon: {
  31925. type: String,
  31926. default: () => props$1x.navbar.leftIcon
  31927. },
  31928. // 左边的提示文字
  31929. leftText: {
  31930. type: String,
  31931. default: () => props$1x.navbar.leftText
  31932. },
  31933. // 左右的提示文字
  31934. rightText: {
  31935. type: String,
  31936. default: () => props$1x.navbar.rightText
  31937. },
  31938. // 右边的图标
  31939. rightIcon: {
  31940. type: String,
  31941. default: () => props$1x.navbar.rightIcon
  31942. },
  31943. // 标题
  31944. title: {
  31945. type: [String, Number],
  31946. default: () => props$1x.navbar.title
  31947. },
  31948. // 标题颜色
  31949. titleColor: {
  31950. type: String,
  31951. default: () => props$1x.navbar.titleColor
  31952. },
  31953. // 背景颜色
  31954. bgColor: {
  31955. type: String,
  31956. default: () => props$1x.navbar.bgColor
  31957. },
  31958. // 状态栏背景颜色 不写会使用背景颜色bgColor
  31959. statusBarBgColor: {
  31960. type: String,
  31961. default: () => ""
  31962. },
  31963. // 标题的宽度
  31964. titleWidth: {
  31965. type: [String, Number],
  31966. default: () => props$1x.navbar.titleWidth
  31967. },
  31968. // 导航栏高度
  31969. height: {
  31970. type: [String, Number],
  31971. default: () => props$1x.navbar.height
  31972. },
  31973. // 左侧返回图标的大小
  31974. leftIconSize: {
  31975. type: [String, Number],
  31976. default: () => props$1x.navbar.leftIconSize
  31977. },
  31978. // 左侧返回图标的颜色
  31979. leftIconColor: {
  31980. type: String,
  31981. default: () => props$1x.navbar.leftIconColor
  31982. },
  31983. // 点击左侧区域(返回图标),是否自动返回上一页
  31984. autoBack: {
  31985. type: Boolean,
  31986. default: () => props$1x.navbar.autoBack
  31987. },
  31988. // 标题的样式,对象或字符串
  31989. titleStyle: {
  31990. type: [String, Object],
  31991. default: () => props$1x.navbar.titleStyle
  31992. }
  31993. }
  31994. });
  31995. const _sfc_main$12 = {
  31996. name: "u-navbar",
  31997. mixins: [mpMixin, mixin, props$C],
  31998. data() {
  31999. return {};
  32000. },
  32001. emits: ["leftClick", "rightClick"],
  32002. methods: {
  32003. addStyle,
  32004. addUnit,
  32005. getWindowInfo,
  32006. getPx,
  32007. // 点击左侧区域
  32008. leftClick() {
  32009. this.$emit("leftClick");
  32010. if (config$1.interceptor.navbarLeftClick != null) {
  32011. config$1.interceptor.navbarLeftClick();
  32012. } else {
  32013. if (this.autoBack) {
  32014. uni.navigateBack();
  32015. }
  32016. }
  32017. },
  32018. // 点击右侧区域
  32019. rightClick() {
  32020. this.$emit("rightClick");
  32021. }
  32022. }
  32023. };
  32024. function _sfc_render$11(_ctx, _cache, $props, $setup, $data, $options) {
  32025. const _component_u_status_bar = resolveEasycom(vue.resolveDynamicComponent("u-status-bar"), __easycom_0$c);
  32026. const _component_up_icon = vue.resolveComponent("up-icon");
  32027. return vue.openBlock(), vue.createElementBlock(
  32028. "view",
  32029. {
  32030. class: vue.normalizeClass(["u-navbar", [_ctx.customClass]])
  32031. },
  32032. [
  32033. _ctx.fixed && _ctx.placeholder ? (vue.openBlock(), vue.createElementBlock(
  32034. "view",
  32035. {
  32036. key: 0,
  32037. class: "u-navbar__placeholder",
  32038. style: vue.normalizeStyle({
  32039. height: $options.addUnit($options.getPx(_ctx.height) + $options.getWindowInfo().statusBarHeight, "px")
  32040. })
  32041. },
  32042. null,
  32043. 4
  32044. /* STYLE */
  32045. )) : vue.createCommentVNode("v-if", true),
  32046. vue.createElementVNode(
  32047. "view",
  32048. {
  32049. class: vue.normalizeClass([_ctx.fixed && "u-navbar--fixed"])
  32050. },
  32051. [
  32052. _ctx.safeAreaInsetTop ? (vue.openBlock(), vue.createBlock(_component_u_status_bar, {
  32053. key: 0,
  32054. bgColor: _ctx.statusBarBgColor ? _ctx.statusBarBgColor : _ctx.bgColor
  32055. }, null, 8, ["bgColor"])) : vue.createCommentVNode("v-if", true),
  32056. vue.createElementVNode(
  32057. "view",
  32058. {
  32059. class: vue.normalizeClass(["u-navbar__content", [_ctx.border && "u-border-bottom"]]),
  32060. style: vue.normalizeStyle({
  32061. height: $options.addUnit(_ctx.height),
  32062. backgroundColor: _ctx.bgColor
  32063. })
  32064. },
  32065. [
  32066. vue.createElementVNode("view", {
  32067. class: "u-navbar__content__left",
  32068. "hover-class": "u-navbar__content__left--hover",
  32069. "hover-start-time": "150",
  32070. onClick: _cache[0] || (_cache[0] = (...args) => $options.leftClick && $options.leftClick(...args))
  32071. }, [
  32072. vue.renderSlot(_ctx.$slots, "left", {}, () => [
  32073. _ctx.leftIcon ? (vue.openBlock(), vue.createBlock(_component_up_icon, {
  32074. key: 0,
  32075. name: _ctx.leftIcon,
  32076. size: _ctx.leftIconSize,
  32077. color: _ctx.leftIconColor
  32078. }, null, 8, ["name", "size", "color"])) : vue.createCommentVNode("v-if", true),
  32079. _ctx.leftText ? (vue.openBlock(), vue.createElementBlock(
  32080. "text",
  32081. {
  32082. key: 1,
  32083. style: vue.normalizeStyle({
  32084. color: _ctx.leftIconColor
  32085. }),
  32086. class: "u-navbar__content__left__text"
  32087. },
  32088. vue.toDisplayString(_ctx.leftText),
  32089. 5
  32090. /* TEXT, STYLE */
  32091. )) : vue.createCommentVNode("v-if", true)
  32092. ], true)
  32093. ]),
  32094. vue.renderSlot(_ctx.$slots, "center", {}, () => [
  32095. vue.createElementVNode(
  32096. "text",
  32097. {
  32098. class: "u-line-1 u-navbar__content__title",
  32099. style: vue.normalizeStyle([{
  32100. width: $options.addUnit(_ctx.titleWidth),
  32101. color: _ctx.titleColor
  32102. }, $options.addStyle(_ctx.titleStyle)])
  32103. },
  32104. vue.toDisplayString(_ctx.title),
  32105. 5
  32106. /* TEXT, STYLE */
  32107. )
  32108. ], true),
  32109. _ctx.$slots.right || _ctx.rightIcon || _ctx.rightText ? (vue.openBlock(), vue.createElementBlock("view", {
  32110. key: 0,
  32111. class: "u-navbar__content__right",
  32112. onClick: _cache[1] || (_cache[1] = (...args) => $options.rightClick && $options.rightClick(...args))
  32113. }, [
  32114. vue.renderSlot(_ctx.$slots, "right", {}, () => [
  32115. _ctx.rightIcon ? (vue.openBlock(), vue.createBlock(_component_up_icon, {
  32116. key: 0,
  32117. name: _ctx.rightIcon,
  32118. size: "20"
  32119. }, null, 8, ["name"])) : vue.createCommentVNode("v-if", true),
  32120. _ctx.rightText ? (vue.openBlock(), vue.createElementBlock(
  32121. "text",
  32122. {
  32123. key: 1,
  32124. class: "u-navbar__content__right__text"
  32125. },
  32126. vue.toDisplayString(_ctx.rightText),
  32127. 1
  32128. /* TEXT */
  32129. )) : vue.createCommentVNode("v-if", true)
  32130. ], true)
  32131. ])) : vue.createCommentVNode("v-if", true)
  32132. ],
  32133. 6
  32134. /* CLASS, STYLE */
  32135. )
  32136. ],
  32137. 2
  32138. /* CLASS */
  32139. )
  32140. ],
  32141. 2
  32142. /* CLASS */
  32143. );
  32144. }
  32145. const uNavbar = /* @__PURE__ */ _export_sfc(_sfc_main$12, [["render", _sfc_render$11], ["__scopeId", "data-v-f631659b"], ["__file", "C:/Users/EDY/Desktop/项目/shuibei/uni_modules/uview-plus/components/u-navbar/u-navbar.vue"]]);
  32146. const __vite_glob_0_66 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
  32147. __proto__: null,
  32148. default: uNavbar
  32149. }, Symbol.toStringTag, { value: "Module" }));
  32150. const props$B = defineMixin({
  32151. props: {
  32152. // 页面文字提示
  32153. tips: {
  32154. type: String,
  32155. default: () => props$1x.noNetwork.tips
  32156. },
  32157. // 一个z-index值,用于设置没有网络这个组件的层次,因为页面可能会有其他定位的元素层级过高,导致此组件被覆盖
  32158. zIndex: {
  32159. type: [String, Number],
  32160. default: () => props$1x.noNetwork.zIndex
  32161. },
  32162. // image 没有网络的图片提示
  32163. image: {
  32164. type: String,
  32165. default: () => props$1x.noNetwork.image
  32166. }
  32167. }
  32168. });
  32169. const _sfc_main$11 = {
  32170. name: "u-no-network",
  32171. mixins: [mpMixin, mixin, props$B],
  32172. data() {
  32173. return {
  32174. isConnected: true,
  32175. // 是否有网络连接
  32176. networkType: "none"
  32177. // 网络类型
  32178. };
  32179. },
  32180. mounted() {
  32181. this.isIOS = getDeviceInfo().platform === "ios";
  32182. uni.onNetworkStatusChange((res) => {
  32183. this.isConnected = res.isConnected;
  32184. this.networkType = res.networkType;
  32185. this.emitEvent(this.networkType);
  32186. });
  32187. uni.getNetworkType({
  32188. success: (res) => {
  32189. this.networkType = res.networkType;
  32190. this.emitEvent(this.networkType);
  32191. if (res.networkType == "none") {
  32192. this.isConnected = false;
  32193. } else {
  32194. this.isConnected = true;
  32195. }
  32196. }
  32197. });
  32198. },
  32199. emits: ["disconnected", "connected"],
  32200. methods: {
  32201. t: t$1,
  32202. retry() {
  32203. uni.getNetworkType({
  32204. success: (res) => {
  32205. this.networkType = res.networkType;
  32206. this.emitEvent(this.networkType);
  32207. if (res.networkType == "none") {
  32208. toast(t$1("up.noNetwork.disconnect"));
  32209. this.isConnected = false;
  32210. } else {
  32211. toast(t$1("up.noNetwork.connect"));
  32212. this.isConnected = true;
  32213. }
  32214. }
  32215. });
  32216. this.$emit("retry");
  32217. },
  32218. // 发出事件给父组件
  32219. emitEvent(networkType) {
  32220. this.$emit(networkType === "none" ? "disconnected" : "connected");
  32221. },
  32222. async openSettings() {
  32223. if (this.networkType == "none") {
  32224. this.openSystemSettings();
  32225. return;
  32226. }
  32227. },
  32228. openAppSettings() {
  32229. this.gotoAppSetting();
  32230. },
  32231. openSystemSettings() {
  32232. if (this.isIOS) {
  32233. this.gotoiOSSetting();
  32234. } else {
  32235. this.gotoAndroidSetting();
  32236. }
  32237. },
  32238. network() {
  32239. var result = null;
  32240. var cellularData = plus.ios.newObject("CTCellularData");
  32241. var state = cellularData.plusGetAttribute("restrictedState");
  32242. if (state == 0) {
  32243. result = null;
  32244. } else if (state == 2) {
  32245. result = 1;
  32246. } else if (state == 1) {
  32247. result = 2;
  32248. }
  32249. plus.ios.deleteObject(cellularData);
  32250. return result;
  32251. },
  32252. gotoAppSetting() {
  32253. if (this.isIOS) {
  32254. var UIApplication = plus.ios.import("UIApplication");
  32255. var application2 = UIApplication.sharedApplication();
  32256. var NSURL2 = plus.ios.import("NSURL");
  32257. var setting2 = NSURL2.URLWithString("app-settings:");
  32258. application2.openURL(setting2);
  32259. plus.ios.deleteObject(setting2);
  32260. plus.ios.deleteObject(NSURL2);
  32261. plus.ios.deleteObject(application2);
  32262. } else {
  32263. var Intent = plus.android.importClass("android.content.Intent");
  32264. var Settings = plus.android.importClass("android.provider.Settings");
  32265. var Uri = plus.android.importClass("android.net.Uri");
  32266. var mainActivity = plus.android.runtimeMainActivity();
  32267. var intent = new Intent();
  32268. intent.setAction(Settings.ACTION_APPLICATION_DETAILS_SETTINGS);
  32269. var uri = Uri.fromParts("package", mainActivity.getPackageName(), null);
  32270. intent.setData(uri);
  32271. mainActivity.startActivity(intent);
  32272. }
  32273. },
  32274. gotoiOSSetting() {
  32275. var UIApplication = plus.ios.import("UIApplication");
  32276. var application2 = UIApplication.sharedApplication();
  32277. var NSURL2 = plus.ios.import("NSURL");
  32278. var setting2 = NSURL2.URLWithString("App-prefs:root=General");
  32279. application2.openURL(setting2);
  32280. plus.ios.deleteObject(setting2);
  32281. plus.ios.deleteObject(NSURL2);
  32282. plus.ios.deleteObject(application2);
  32283. },
  32284. gotoAndroidSetting() {
  32285. var Intent = plus.android.importClass("android.content.Intent");
  32286. var Settings = plus.android.importClass("android.provider.Settings");
  32287. var mainActivity = plus.android.runtimeMainActivity();
  32288. var intent = new Intent(Settings.ACTION_SETTINGS);
  32289. mainActivity.startActivity(intent);
  32290. }
  32291. }
  32292. };
  32293. function _sfc_render$10(_ctx, _cache, $props, $setup, $data, $options) {
  32294. const _component_up_icon = vue.resolveComponent("up-icon");
  32295. const _component_u_button = resolveEasycom(vue.resolveDynamicComponent("u-button"), __easycom_0$8);
  32296. const _component_u_overlay = resolveEasycom(vue.resolveDynamicComponent("u-overlay"), __easycom_0$d);
  32297. return vue.openBlock(), vue.createBlock(_component_u_overlay, {
  32298. show: !$data.isConnected,
  32299. zIndex: _ctx.zIndex,
  32300. onTouchmove: vue.withModifiers(_ctx.noop, ["stop", "prevent"]),
  32301. customStyle: {
  32302. backgroundColor: "#fff",
  32303. display: "flex",
  32304. justifyContent: "center"
  32305. }
  32306. }, {
  32307. default: vue.withCtx(() => [
  32308. vue.createElementVNode("view", { class: "u-no-network" }, [
  32309. vue.createVNode(_component_up_icon, {
  32310. name: _ctx.image,
  32311. size: "150",
  32312. imgMode: "widthFit",
  32313. class: "u-no-network__error-icon"
  32314. }, null, 8, ["name"]),
  32315. vue.createElementVNode(
  32316. "text",
  32317. { class: "u-no-network__tips" },
  32318. vue.toDisplayString(_ctx.tips),
  32319. 1
  32320. /* TEXT */
  32321. ),
  32322. vue.createCommentVNode(" 只有APP平台,才能跳转设置页,因为需要调用plus环境 "),
  32323. vue.createElementVNode("view", { class: "u-no-network__app" }, [
  32324. vue.createElementVNode(
  32325. "text",
  32326. { class: "u-no-network__app__setting" },
  32327. vue.toDisplayString($options.t("up.noNetwork.pleaseCheck")),
  32328. 1
  32329. /* TEXT */
  32330. ),
  32331. vue.createElementVNode(
  32332. "text",
  32333. {
  32334. class: "u-no-network__app__to-setting",
  32335. onClick: _cache[0] || (_cache[0] = (...args) => $options.openSettings && $options.openSettings(...args))
  32336. },
  32337. vue.toDisplayString($options.t("up.common.settings")),
  32338. 1
  32339. /* TEXT */
  32340. )
  32341. ]),
  32342. vue.createElementVNode("view", { class: "u-no-network__retry" }, [
  32343. vue.createVNode(_component_u_button, {
  32344. size: "mini",
  32345. text: $options.t("up.common.retry"),
  32346. type: "primary",
  32347. plain: "",
  32348. onClick: $options.retry
  32349. }, null, 8, ["text", "onClick"])
  32350. ])
  32351. ])
  32352. ]),
  32353. _: 1
  32354. /* STABLE */
  32355. }, 8, ["show", "zIndex", "onTouchmove"]);
  32356. }
  32357. const uNoNetwork = /* @__PURE__ */ _export_sfc(_sfc_main$11, [["render", _sfc_render$10], ["__scopeId", "data-v-12a0c5bd"], ["__file", "C:/Users/EDY/Desktop/项目/shuibei/uni_modules/uview-plus/components/u-no-network/u-no-network.vue"]]);
  32358. const __vite_glob_0_67 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
  32359. __proto__: null,
  32360. default: uNoNetwork
  32361. }, Symbol.toStringTag, { value: "Module" }));
  32362. const props$A = defineMixin({
  32363. props: {
  32364. // 显示的内容,字符串
  32365. text: {
  32366. type: String,
  32367. default: () => props$1x.rowNotice.text
  32368. },
  32369. // 是否显示左侧的音量图标
  32370. icon: {
  32371. type: String,
  32372. default: () => props$1x.rowNotice.icon
  32373. },
  32374. // 通告模式,link-显示右箭头,closable-显示右侧关闭图标
  32375. mode: {
  32376. type: String,
  32377. default: () => props$1x.rowNotice.mode
  32378. },
  32379. // 文字颜色,各图标也会使用文字颜色
  32380. color: {
  32381. type: String,
  32382. default: () => props$1x.rowNotice.color
  32383. },
  32384. // 背景颜色
  32385. bgColor: {
  32386. type: String,
  32387. default: () => props$1x.rowNotice.bgColor
  32388. },
  32389. // 字体大小,单位px
  32390. fontSize: {
  32391. type: [String, Number],
  32392. default: () => props$1x.rowNotice.fontSize
  32393. },
  32394. // 水平滚动时的滚动速度,即每秒滚动多少px(rpx),这有利于控制文字无论多少时,都能有一个恒定的速度
  32395. speed: {
  32396. type: [String, Number],
  32397. default: () => props$1x.rowNotice.speed
  32398. }
  32399. }
  32400. });
  32401. const _sfc_main$10 = {
  32402. name: "u-row-notice",
  32403. mixins: [mpMixin, mixin, props$A],
  32404. data() {
  32405. return {
  32406. animationDuration: "0",
  32407. // 动画执行时间
  32408. animationPlayState: "paused",
  32409. // 动画的开始和结束执行
  32410. // nvue下,内容发生变化,导致滚动宽度也变化,需要标志为是否需要重新计算宽度
  32411. // 不能在内容变化时直接重新计算,因为nvue的animation模块上一次的滚动不是刚好结束,会有影响
  32412. nvueInit: true,
  32413. show: true
  32414. };
  32415. },
  32416. watch: {
  32417. text: {
  32418. immediate: true,
  32419. handler(newValue, oldValue) {
  32420. this.vue();
  32421. if (!test.string(newValue)) {
  32422. error("noticebar组件direction为row时,要求text参数为字符串形式");
  32423. }
  32424. }
  32425. },
  32426. fontSize() {
  32427. this.vue();
  32428. },
  32429. speed() {
  32430. this.vue();
  32431. }
  32432. },
  32433. computed: {
  32434. // 文字内容的样式
  32435. textStyle() {
  32436. let style = {};
  32437. style.whiteSpace = "nowrap !important";
  32438. style.color = this.color;
  32439. style.fontSize = addUnit(this.fontSize);
  32440. return style;
  32441. },
  32442. animationStyle() {
  32443. let style = {};
  32444. style.animationDuration = this.animationDuration;
  32445. style.animationPlayState = this.animationPlayState;
  32446. return style;
  32447. },
  32448. // 内部对用户传入的数据进一步分割,放到多个text标签循环,否则如果用户传入的字符串很长(100个字符以上)
  32449. // 放在一个text标签中进行滚动,在低端安卓机上,动画可能会出现抖动现象,需要分割到多个text中可解决此问题
  32450. innerText() {
  32451. let result = [], len = 20;
  32452. const textArr = this.text.split("");
  32453. for (let i2 = 0; i2 < textArr.length; i2 += len) {
  32454. result.push(textArr.slice(i2, i2 + len).join(""));
  32455. }
  32456. return result;
  32457. }
  32458. },
  32459. mounted() {
  32460. var pages2 = getCurrentPages();
  32461. var page2 = pages2[pages2.length - 1];
  32462. var currentWebview = page2.$getAppWebview();
  32463. currentWebview.addEventListener("hide", () => {
  32464. this.webviewHide = true;
  32465. });
  32466. currentWebview.addEventListener("show", () => {
  32467. this.webviewHide = false;
  32468. });
  32469. this.init();
  32470. },
  32471. emits: ["click", "close"],
  32472. methods: {
  32473. init() {
  32474. this.vue();
  32475. if (!test.string(this.text)) {
  32476. error("noticebar组件direction为row时,要求text参数为字符串形式");
  32477. }
  32478. },
  32479. // vue版处理
  32480. async vue() {
  32481. let textWidth = 0;
  32482. await sleep();
  32483. textWidth = (await this.$uGetRect(".u-notice__content__text")).width;
  32484. (await this.$uGetRect(".u-notice__content")).width;
  32485. this.animationDuration = `${textWidth / getPx(this.speed)}s`;
  32486. this.animationPlayState = "paused";
  32487. setTimeout(() => {
  32488. this.animationPlayState = "running";
  32489. }, 10);
  32490. },
  32491. // nvue版处理
  32492. async nvue() {
  32493. },
  32494. loopAnimation(textWidth, boxWidth) {
  32495. },
  32496. getNvueRect(el) {
  32497. },
  32498. // 点击通告栏
  32499. clickHandler(index2) {
  32500. this.$emit("click");
  32501. },
  32502. // 点击右侧按钮,需要判断点击的是关闭图标还是箭头图标
  32503. close() {
  32504. this.$emit("close");
  32505. }
  32506. },
  32507. beforeUnmount() {
  32508. this.stopAnimation = true;
  32509. }
  32510. };
  32511. function _sfc_render$$(_ctx, _cache, $props, $setup, $data, $options) {
  32512. const _component_up_icon = vue.resolveComponent("up-icon");
  32513. return vue.openBlock(), vue.createElementBlock("view", {
  32514. class: "u-notice",
  32515. onClick: _cache[0] || (_cache[0] = (...args) => $options.clickHandler && $options.clickHandler(...args))
  32516. }, [
  32517. vue.renderSlot(_ctx.$slots, "icon", {}, () => [
  32518. _ctx.icon ? (vue.openBlock(), vue.createElementBlock("view", {
  32519. key: 0,
  32520. class: "u-notice__left-icon"
  32521. }, [
  32522. vue.createVNode(_component_up_icon, {
  32523. name: _ctx.icon,
  32524. color: _ctx.color,
  32525. size: "19"
  32526. }, null, 8, ["name", "color"])
  32527. ])) : vue.createCommentVNode("v-if", true)
  32528. ], true),
  32529. vue.createElementVNode(
  32530. "view",
  32531. {
  32532. class: "u-notice__content",
  32533. ref: "u-notice__content"
  32534. },
  32535. [
  32536. vue.createElementVNode(
  32537. "view",
  32538. {
  32539. ref: "u-notice__content__text",
  32540. class: "u-notice__content__text",
  32541. style: vue.normalizeStyle([$options.animationStyle])
  32542. },
  32543. [
  32544. (vue.openBlock(true), vue.createElementBlock(
  32545. vue.Fragment,
  32546. null,
  32547. vue.renderList($options.innerText, (item, index2) => {
  32548. return vue.openBlock(), vue.createElementBlock(
  32549. "text",
  32550. {
  32551. key: index2,
  32552. style: vue.normalizeStyle([$options.textStyle])
  32553. },
  32554. vue.toDisplayString(item),
  32555. 5
  32556. /* TEXT, STYLE */
  32557. );
  32558. }),
  32559. 128
  32560. /* KEYED_FRAGMENT */
  32561. ))
  32562. ],
  32563. 4
  32564. /* STYLE */
  32565. )
  32566. ],
  32567. 512
  32568. /* NEED_PATCH */
  32569. ),
  32570. ["link", "closable"].includes(_ctx.mode) ? (vue.openBlock(), vue.createElementBlock("view", {
  32571. key: 0,
  32572. class: "u-notice__right-icon"
  32573. }, [
  32574. _ctx.mode === "link" ? (vue.openBlock(), vue.createBlock(_component_up_icon, {
  32575. key: 0,
  32576. name: "arrow-right",
  32577. size: 17,
  32578. color: _ctx.color
  32579. }, null, 8, ["color"])) : vue.createCommentVNode("v-if", true),
  32580. _ctx.mode === "closable" ? (vue.openBlock(), vue.createBlock(_component_up_icon, {
  32581. key: 1,
  32582. onClick: $options.close,
  32583. name: "close",
  32584. size: 16,
  32585. color: _ctx.color
  32586. }, null, 8, ["onClick", "color"])) : vue.createCommentVNode("v-if", true)
  32587. ])) : vue.createCommentVNode("v-if", true)
  32588. ]);
  32589. }
  32590. const __easycom_1$1 = /* @__PURE__ */ _export_sfc(_sfc_main$10, [["render", _sfc_render$$], ["__scopeId", "data-v-ab8dee7b"], ["__file", "C:/Users/EDY/Desktop/项目/shuibei/uni_modules/uview-plus/components/u-row-notice/u-row-notice.vue"]]);
  32591. const __vite_glob_0_88 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
  32592. __proto__: null,
  32593. default: __easycom_1$1
  32594. }, Symbol.toStringTag, { value: "Module" }));
  32595. const props$z = defineMixin({
  32596. props: {
  32597. // 显示的内容,数组
  32598. text: {
  32599. type: [Array, String],
  32600. default: () => props$1x.noticeBar.text
  32601. },
  32602. // 通告滚动模式,row-横向滚动,column-竖向滚动
  32603. direction: {
  32604. type: String,
  32605. default: () => props$1x.noticeBar.direction
  32606. },
  32607. // direction = row时,是否使用步进形式滚动
  32608. step: {
  32609. type: Boolean,
  32610. default: () => props$1x.noticeBar.step
  32611. },
  32612. // 是否显示左侧的音量图标
  32613. icon: {
  32614. type: String,
  32615. default: () => props$1x.noticeBar.icon
  32616. },
  32617. // 通告模式,link-显示右箭头,closable-显示右侧关闭图标
  32618. mode: {
  32619. type: String,
  32620. default: () => props$1x.noticeBar.mode
  32621. },
  32622. // 文字颜色,各图标也会使用文字颜色
  32623. color: {
  32624. type: String,
  32625. default: () => props$1x.noticeBar.color
  32626. },
  32627. // 背景颜色
  32628. bgColor: {
  32629. type: String,
  32630. default: () => props$1x.noticeBar.bgColor
  32631. },
  32632. // 水平滚动时的滚动速度,即每秒滚动多少px(px),这有利于控制文字无论多少时,都能有一个恒定的速度
  32633. speed: {
  32634. type: [String, Number],
  32635. default: () => props$1x.noticeBar.speed
  32636. },
  32637. // 字体大小
  32638. fontSize: {
  32639. type: [String, Number],
  32640. default: () => props$1x.noticeBar.fontSize
  32641. },
  32642. // 滚动一个周期的时间长,单位ms
  32643. duration: {
  32644. type: [String, Number],
  32645. default: () => props$1x.noticeBar.duration
  32646. },
  32647. // 是否禁止用手滑动切换
  32648. // 目前HX2.6.11,只支持App 2.5.5+、H5 2.5.5+、支付宝小程序、字节跳动小程序
  32649. disableTouch: {
  32650. type: Boolean,
  32651. default: () => props$1x.noticeBar.disableTouch
  32652. },
  32653. // 跳转的页面路径
  32654. url: {
  32655. type: String,
  32656. default: () => props$1x.noticeBar.url
  32657. },
  32658. // 页面跳转的类型
  32659. linkType: {
  32660. type: String,
  32661. default: () => props$1x.noticeBar.linkType
  32662. },
  32663. justifyContent: {
  32664. type: String,
  32665. default: () => props$1x.noticeBar.justifyContent
  32666. }
  32667. }
  32668. });
  32669. const _sfc_main$$ = {
  32670. name: "u-notice-bar",
  32671. mixins: [mpMixin, mixin, props$z],
  32672. data() {
  32673. return {
  32674. show: true
  32675. };
  32676. },
  32677. emits: ["click", "close"],
  32678. methods: {
  32679. addStyle,
  32680. // 点击通告栏
  32681. click(index2) {
  32682. this.$emit("click", index2);
  32683. if (this.url && this.linkType) {
  32684. this.openPage();
  32685. }
  32686. },
  32687. // 点击关闭按钮
  32688. close() {
  32689. this.show = false;
  32690. this.$emit("close");
  32691. }
  32692. }
  32693. };
  32694. function _sfc_render$_(_ctx, _cache, $props, $setup, $data, $options) {
  32695. const _component_u_column_notice = resolveEasycom(vue.resolveDynamicComponent("u-column-notice"), __easycom_0$6);
  32696. const _component_u_row_notice = resolveEasycom(vue.resolveDynamicComponent("u-row-notice"), __easycom_1$1);
  32697. return $data.show ? (vue.openBlock(), vue.createElementBlock(
  32698. "view",
  32699. {
  32700. key: 0,
  32701. class: "u-notice-bar",
  32702. style: vue.normalizeStyle([{
  32703. backgroundColor: _ctx.bgColor
  32704. }, $options.addStyle(_ctx.customStyle)])
  32705. },
  32706. [
  32707. _ctx.direction === "column" || _ctx.direction === "row" && _ctx.step ? (vue.openBlock(), vue.createBlock(_component_u_column_notice, {
  32708. key: 0,
  32709. color: _ctx.color,
  32710. bgColor: _ctx.bgColor,
  32711. text: _ctx.text,
  32712. mode: _ctx.mode,
  32713. step: _ctx.step,
  32714. icon: _ctx.icon,
  32715. "disable-touch": _ctx.disableTouch,
  32716. fontSize: _ctx.fontSize,
  32717. duration: _ctx.duration,
  32718. justifyContent: _ctx.justifyContent,
  32719. onClose: $options.close,
  32720. onClick: $options.click
  32721. }, null, 8, ["color", "bgColor", "text", "mode", "step", "icon", "disable-touch", "fontSize", "duration", "justifyContent", "onClose", "onClick"])) : (vue.openBlock(), vue.createBlock(_component_u_row_notice, {
  32722. key: 1,
  32723. color: _ctx.color,
  32724. bgColor: _ctx.bgColor,
  32725. text: _ctx.text,
  32726. mode: _ctx.mode,
  32727. fontSize: _ctx.fontSize,
  32728. speed: _ctx.speed,
  32729. url: _ctx.url,
  32730. linkType: _ctx.linkType,
  32731. icon: _ctx.icon,
  32732. onClose: $options.close,
  32733. onClick: $options.click
  32734. }, null, 8, ["color", "bgColor", "text", "mode", "fontSize", "speed", "url", "linkType", "icon", "onClose", "onClick"]))
  32735. ],
  32736. 4
  32737. /* STYLE */
  32738. )) : vue.createCommentVNode("v-if", true);
  32739. }
  32740. const uNoticeBar = /* @__PURE__ */ _export_sfc(_sfc_main$$, [["render", _sfc_render$_], ["__scopeId", "data-v-54bd9363"], ["__file", "C:/Users/EDY/Desktop/项目/shuibei/uni_modules/uview-plus/components/u-notice-bar/u-notice-bar.vue"]]);
  32741. const __vite_glob_0_68 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
  32742. __proto__: null,
  32743. default: uNoticeBar
  32744. }, Symbol.toStringTag, { value: "Module" }));
  32745. const props$y = defineMixin({
  32746. props: {
  32747. // 到顶部的距离
  32748. top: {
  32749. type: [String, Number],
  32750. default: () => props$1x.notify.top
  32751. },
  32752. // 是否展示组件
  32753. // show: {
  32754. // type: Boolean,
  32755. // default: () => defProps.notify.show
  32756. // },
  32757. // type主题,primary,success,warning,error
  32758. type: {
  32759. type: String,
  32760. default: () => props$1x.notify.type
  32761. },
  32762. // 字体颜色
  32763. color: {
  32764. type: String,
  32765. default: () => props$1x.notify.color
  32766. },
  32767. // 背景颜色
  32768. bgColor: {
  32769. type: String,
  32770. default: () => props$1x.notify.bgColor
  32771. },
  32772. // 展示的文字内容
  32773. message: {
  32774. type: String,
  32775. default: () => props$1x.notify.message
  32776. },
  32777. // 展示时长,为0时不消失,单位ms
  32778. duration: {
  32779. type: [String, Number],
  32780. default: () => props$1x.notify.duration
  32781. },
  32782. // 字体大小
  32783. fontSize: {
  32784. type: [String, Number],
  32785. default: () => props$1x.notify.fontSize
  32786. },
  32787. // 是否留出顶部安全距离(状态栏高度)
  32788. safeAreaInsetTop: {
  32789. type: Boolean,
  32790. default: () => props$1x.notify.safeAreaInsetTop
  32791. }
  32792. }
  32793. });
  32794. const _sfc_main$_ = {
  32795. name: "u-notify",
  32796. mixins: [mpMixin, mixin, props$y],
  32797. data() {
  32798. return {
  32799. // 是否展示组件
  32800. open: false,
  32801. timer: null,
  32802. config: {
  32803. // 到顶部的距离
  32804. top: props$1x.notify.top,
  32805. // type主题,primary,success,warning,error
  32806. type: props$1x.notify.type,
  32807. // 字体颜色
  32808. color: props$1x.notify.color,
  32809. // 背景颜色
  32810. bgColor: props$1x.notify.bgColor,
  32811. // 展示的文字内容
  32812. message: props$1x.notify.message,
  32813. // 展示时长,为0时不消失,单位ms
  32814. duration: props$1x.notify.duration,
  32815. // 字体大小
  32816. fontSize: props$1x.notify.fontSize,
  32817. // 是否留出顶部安全距离(状态栏高度)
  32818. safeAreaInsetTop: props$1x.notify.safeAreaInsetTop
  32819. },
  32820. // 合并后的配置,避免多次调用组件后,可能会复用之前使用的配置参数
  32821. tmpConfig: {}
  32822. };
  32823. },
  32824. computed: {
  32825. containerStyle() {
  32826. let top = 0;
  32827. if (this.tmpConfig.top === 0)
  32828. ;
  32829. const style = {
  32830. top: addUnit(this.tmpConfig.top === 0 ? top : this.tmpConfig.top),
  32831. // 因为组件底层为u-transition组件,必须将其设置为fixed定位
  32832. // 让其出现在导航栏底部
  32833. position: "fixed",
  32834. left: 0,
  32835. right: 0,
  32836. zIndex: 10076
  32837. };
  32838. return style;
  32839. },
  32840. // 组件背景颜色
  32841. backgroundColor() {
  32842. const style = {};
  32843. if (this.tmpConfig.bgColor) {
  32844. style.backgroundColor = this.tmpConfig.bgColor;
  32845. }
  32846. return style;
  32847. },
  32848. // 默认主题下的图标
  32849. icon() {
  32850. let icon;
  32851. if (this.tmpConfig.type === "success") {
  32852. icon = "checkmark-circle";
  32853. } else if (this.tmpConfig.type === "error") {
  32854. icon = "close-circle";
  32855. } else if (this.tmpConfig.type === "warning") {
  32856. icon = "error-circle";
  32857. }
  32858. return icon;
  32859. }
  32860. },
  32861. created() {
  32862. ["primary", "success", "error", "warning"].map((item) => {
  32863. this[item] = (message) => this.show({
  32864. type: item,
  32865. message
  32866. });
  32867. });
  32868. },
  32869. methods: {
  32870. addStyle,
  32871. addUnit,
  32872. show(options2) {
  32873. this.tmpConfig = deepMerge$1(this.config, options2);
  32874. this.clearTimer();
  32875. this.open = true;
  32876. if (this.tmpConfig.duration > 0) {
  32877. this.timer = setTimeout(() => {
  32878. this.open = false;
  32879. this.clearTimer();
  32880. typeof this.tmpConfig.complete === "function" && this.tmpConfig.complete();
  32881. }, this.tmpConfig.duration);
  32882. }
  32883. },
  32884. // 关闭notify
  32885. close() {
  32886. this.clearTimer();
  32887. },
  32888. clearTimer() {
  32889. this.open = false;
  32890. clearTimeout(this.timer);
  32891. this.timer = null;
  32892. }
  32893. },
  32894. beforeUnmount() {
  32895. this.clearTimer();
  32896. }
  32897. };
  32898. function _sfc_render$Z(_ctx, _cache, $props, $setup, $data, $options) {
  32899. const _component_u_status_bar = resolveEasycom(vue.resolveDynamicComponent("u-status-bar"), __easycom_0$c);
  32900. const _component_up_icon = vue.resolveComponent("up-icon");
  32901. const _component_u_transition = resolveEasycom(vue.resolveDynamicComponent("u-transition"), __easycom_2$1);
  32902. return vue.openBlock(), vue.createBlock(_component_u_transition, {
  32903. mode: "slide-down",
  32904. customStyle: $options.containerStyle,
  32905. show: $data.open
  32906. }, {
  32907. default: vue.withCtx(() => [
  32908. vue.createElementVNode(
  32909. "view",
  32910. {
  32911. class: vue.normalizeClass(["u-notify", [`u-notify--${$data.tmpConfig.type}`]]),
  32912. style: vue.normalizeStyle([$options.backgroundColor, $options.addStyle(_ctx.customStyle)])
  32913. },
  32914. [
  32915. $data.tmpConfig.safeAreaInsetTop ? (vue.openBlock(), vue.createBlock(_component_u_status_bar, { key: 0 })) : vue.createCommentVNode("v-if", true),
  32916. vue.createElementVNode("view", { class: "u-notify__warpper" }, [
  32917. vue.renderSlot(_ctx.$slots, "icon", {}, () => [
  32918. ["success", "warning", "error"].includes($data.tmpConfig.type) ? (vue.openBlock(), vue.createBlock(_component_up_icon, {
  32919. key: 0,
  32920. name: $data.tmpConfig.icon,
  32921. color: $data.tmpConfig.color,
  32922. size: 1.3 * $data.tmpConfig.fontSize,
  32923. customStyle: { marginRight: "4px" }
  32924. }, null, 8, ["name", "color", "size"])) : vue.createCommentVNode("v-if", true)
  32925. ], true),
  32926. vue.createElementVNode(
  32927. "text",
  32928. {
  32929. class: "u-notify__warpper__text",
  32930. style: vue.normalizeStyle({
  32931. fontSize: $options.addUnit($data.tmpConfig.fontSize),
  32932. color: $data.tmpConfig.color
  32933. })
  32934. },
  32935. vue.toDisplayString($data.tmpConfig.message),
  32936. 5
  32937. /* TEXT, STYLE */
  32938. )
  32939. ])
  32940. ],
  32941. 6
  32942. /* CLASS, STYLE */
  32943. )
  32944. ]),
  32945. _: 3
  32946. /* FORWARDED */
  32947. }, 8, ["customStyle", "show"]);
  32948. }
  32949. const uNotify = /* @__PURE__ */ _export_sfc(_sfc_main$_, [["render", _sfc_render$Z], ["__scopeId", "data-v-67836363"], ["__file", "C:/Users/EDY/Desktop/项目/shuibei/uni_modules/uview-plus/components/u-notify/u-notify.vue"]]);
  32950. const __vite_glob_0_69 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
  32951. __proto__: null,
  32952. default: uNotify
  32953. }, Symbol.toStringTag, { value: "Module" }));
  32954. const props$x = defineMixin({
  32955. props: {
  32956. // 步进器标识符,在change回调返回
  32957. name: {
  32958. type: [String, Number],
  32959. default: () => props$1x.numberBox.name
  32960. },
  32961. // 用于双向绑定的值,初始化时设置设为默认min值(最小值)
  32962. modelValue: {
  32963. type: [String, Number],
  32964. default: () => props$1x.numberBox.value
  32965. },
  32966. // 最小值
  32967. min: {
  32968. type: [String, Number],
  32969. default: () => props$1x.numberBox.min
  32970. },
  32971. // 最大值
  32972. max: {
  32973. type: [String, Number],
  32974. default: () => props$1x.numberBox.max
  32975. },
  32976. // 加减的步长,可为小数
  32977. step: {
  32978. type: [String, Number],
  32979. default: () => props$1x.numberBox.step
  32980. },
  32981. // 是否只允许输入整数
  32982. integer: {
  32983. type: Boolean,
  32984. default: () => props$1x.numberBox.integer
  32985. },
  32986. // 是否禁用,包括输入框,加减按钮
  32987. disabled: {
  32988. type: Boolean,
  32989. default: () => props$1x.numberBox.disabled
  32990. },
  32991. // 是否禁用输入框
  32992. disabledInput: {
  32993. type: Boolean,
  32994. default: () => props$1x.numberBox.disabledInput
  32995. },
  32996. // 是否开启异步变更,开启后需要手动控制输入值
  32997. asyncChange: {
  32998. type: Boolean,
  32999. default: () => props$1x.numberBox.asyncChange
  33000. },
  33001. // 输入框宽度,单位为px
  33002. inputWidth: {
  33003. type: [String, Number],
  33004. default: () => props$1x.numberBox.inputWidth
  33005. },
  33006. // 是否显示减少按钮
  33007. showMinus: {
  33008. type: Boolean,
  33009. default: () => props$1x.numberBox.showMinus
  33010. },
  33011. // 是否显示增加按钮
  33012. showPlus: {
  33013. type: Boolean,
  33014. default: () => props$1x.numberBox.showPlus
  33015. },
  33016. // 显示的小数位数
  33017. decimalLength: {
  33018. type: [String, Number, null],
  33019. default: () => props$1x.numberBox.decimalLength
  33020. },
  33021. // 是否开启长按加减手势
  33022. longPress: {
  33023. type: Boolean,
  33024. default: () => props$1x.numberBox.longPress
  33025. },
  33026. // 输入框文字和加减按钮图标的颜色
  33027. color: {
  33028. type: String,
  33029. default: () => props$1x.numberBox.color
  33030. },
  33031. // 按钮宽度
  33032. buttonWidth: {
  33033. type: [String, Number],
  33034. default: () => props$1x.numberBox.buttonWidth
  33035. },
  33036. // 按钮大小,宽高等于此值,单位px,输入框高度和此值保持一致
  33037. buttonSize: {
  33038. type: [String, Number],
  33039. default: () => props$1x.numberBox.buttonSize
  33040. },
  33041. // 按钮圆角
  33042. buttonRadius: {
  33043. type: [String],
  33044. default: () => props$1x.numberBox.buttonRadius
  33045. },
  33046. // 输入框和按钮的背景颜色
  33047. bgColor: {
  33048. type: String,
  33049. default: () => props$1x.numberBox.bgColor
  33050. },
  33051. // 按钮禁用背景色
  33052. disabledBgColor: {
  33053. type: String,
  33054. default: () => props$1x.numberBox.disabledBgColor
  33055. },
  33056. // 输入框背景颜色
  33057. inputBgColor: {
  33058. type: String,
  33059. default: () => props$1x.numberBox.inputBgColor
  33060. },
  33061. // 指定光标于键盘的距离,避免键盘遮挡输入框,单位px
  33062. cursorSpacing: {
  33063. type: [String, Number],
  33064. default: () => props$1x.numberBox.cursorSpacing
  33065. },
  33066. // 是否禁用增加按钮
  33067. disablePlus: {
  33068. type: Boolean,
  33069. default: () => props$1x.numberBox.disablePlus
  33070. },
  33071. // 是否禁用减少按钮
  33072. disableMinus: {
  33073. type: Boolean,
  33074. default: () => props$1x.numberBox.disableMinus
  33075. },
  33076. // 加减按钮图标的样式
  33077. iconStyle: {
  33078. type: [Object, String],
  33079. default: () => props$1x.numberBox.iconStyle
  33080. },
  33081. // 迷你模式
  33082. miniMode: {
  33083. type: Boolean,
  33084. default: () => props$1x.numberBox.miniMode
  33085. }
  33086. }
  33087. });
  33088. const _sfc_main$Z = {
  33089. name: "u-number-box",
  33090. mixins: [mpMixin, mixin, props$x],
  33091. data() {
  33092. return {
  33093. // 输入框实际操作的值
  33094. currentValue: "",
  33095. // 定时器
  33096. longPressTimer: null
  33097. };
  33098. },
  33099. watch: {
  33100. // 多个值之间,只要一个值发生变化,都要重新检查check()函数
  33101. watchChange(n2) {
  33102. this.check();
  33103. },
  33104. // 监听v-mode的变化,重新初始化内部的值
  33105. modelValue: {
  33106. handler: function(newV, oldV) {
  33107. if (newV !== this.currentValue) {
  33108. this.currentValue = this.format(this.modelValue);
  33109. }
  33110. },
  33111. immediate: true
  33112. }
  33113. },
  33114. computed: {
  33115. hideMinus() {
  33116. return this.currentValue == 0 && this.miniMode == true;
  33117. },
  33118. getCursorSpacing() {
  33119. return getPx(this.cursorSpacing);
  33120. },
  33121. // 按钮的样式
  33122. buttonStyle() {
  33123. return (type2) => {
  33124. const style = {
  33125. backgroundColor: this.bgColor,
  33126. width: addUnit(this.buttonWidth),
  33127. height: addUnit(this.buttonSize),
  33128. color: this.color,
  33129. borderRadius: this.buttonRadius
  33130. };
  33131. if (this.isDisabled(type2)) {
  33132. style.backgroundColor = this.disabledBgColor;
  33133. }
  33134. return style;
  33135. };
  33136. },
  33137. // 输入框的样式
  33138. inputStyle() {
  33139. this.disabled || this.disabledInput;
  33140. const style = {
  33141. color: this.color,
  33142. backgroundColor: this.inputBgColor || this.bgColor,
  33143. height: addUnit(this.buttonSize),
  33144. width: addUnit(this.inputWidth)
  33145. };
  33146. return style;
  33147. },
  33148. // 用于监听多个值发生变化
  33149. watchChange() {
  33150. return [this.integer, this.decimalLength, this.min, this.max];
  33151. },
  33152. isDisabled() {
  33153. return (type2) => {
  33154. if (type2 === "plus") {
  33155. return this.disabled || this.disablePlus || this.currentValue >= this.max;
  33156. }
  33157. return this.disabled || this.disableMinus || this.currentValue <= this.min;
  33158. };
  33159. }
  33160. },
  33161. mounted() {
  33162. this.init();
  33163. },
  33164. emits: ["update:modelValue", "focus", "blur", "overlimit", "change", "plus", "minus"],
  33165. methods: {
  33166. init() {
  33167. this.currentValue = this.format(this.modelValue);
  33168. },
  33169. // 格式化整理数据,限制范围
  33170. format(value2) {
  33171. value2 = this.filter(value2);
  33172. value2 = value2 === "" ? 0 : +value2;
  33173. value2 = Math.max(Math.min(this.max, value2), this.min);
  33174. if (this.decimalLength !== null) {
  33175. value2 = value2.toFixed(this.decimalLength);
  33176. }
  33177. return value2;
  33178. },
  33179. // 过滤非法的字符
  33180. filter(value2) {
  33181. value2 = String(value2).replace(/[^0-9.-]/g, "");
  33182. if (this.integer && value2.indexOf(".") !== -1) {
  33183. value2 = value2.split(".")[0];
  33184. }
  33185. return value2;
  33186. },
  33187. check() {
  33188. const val = this.format(this.currentValue);
  33189. if (val !== this.currentValue) {
  33190. this.currentValue = val;
  33191. this.emitChange(val);
  33192. }
  33193. },
  33194. // 判断是否出于禁止操作状态
  33195. // isDisabled(type) {
  33196. // if (type === 'plus') {
  33197. // // 在点击增加按钮情况下,判断整体的disabled,是否单独禁用增加按钮,以及当前值是否大于最大的允许值
  33198. // return (
  33199. // this.disabled ||
  33200. // this.disablePlus ||
  33201. // this.currentValue >= this.max
  33202. // )
  33203. // }
  33204. // // 点击减少按钮同理
  33205. // return (
  33206. // this.disabled ||
  33207. // this.disableMinus ||
  33208. // this.currentValue <= this.min
  33209. // )
  33210. // },
  33211. // 输入框活动焦点
  33212. onFocus(event) {
  33213. this.$emit("focus", {
  33214. ...event.detail,
  33215. name: this.name
  33216. });
  33217. },
  33218. // 输入框失去焦点
  33219. onBlur(event) {
  33220. this.format(event.detail.value);
  33221. this.$emit(
  33222. "blur",
  33223. {
  33224. ...event.detail,
  33225. name: this.name
  33226. }
  33227. );
  33228. },
  33229. // 输入框值发生变化
  33230. onInput(e2) {
  33231. const {
  33232. value: value2 = ""
  33233. } = e2.detail || {};
  33234. if (value2 === "") {
  33235. this.emitChange(this.min);
  33236. return;
  33237. }
  33238. let formatted = this.filter(value2);
  33239. this.emitChange(value2);
  33240. if (this.decimalLength !== null && formatted.indexOf(".") !== -1) {
  33241. const pair = formatted.split(".");
  33242. formatted = `${pair[0]}.${pair[1].slice(0, this.decimalLength)}`;
  33243. }
  33244. formatted = this.format(formatted);
  33245. this.emitChange(formatted);
  33246. },
  33247. // 发出change事件,type目前只支持点击时有值,手动输入不支持。
  33248. emitChange(value2, type2 = "") {
  33249. if (!this.asyncChange) {
  33250. this.$nextTick(() => {
  33251. this.$emit("update:modelValue", value2);
  33252. this.currentValue = value2;
  33253. this.$forceUpdate();
  33254. });
  33255. }
  33256. this.$emit("change", {
  33257. value: value2,
  33258. name: this.name,
  33259. type: type2
  33260. // 当前变更类型
  33261. });
  33262. },
  33263. onChange() {
  33264. const {
  33265. type: type2
  33266. } = this;
  33267. if (this.isDisabled(type2)) {
  33268. return this.$emit("overlimit", type2);
  33269. }
  33270. const diff = type2 === "minus" ? -this.step : +this.step;
  33271. const value2 = this.format(this.add(+this.currentValue, diff));
  33272. this.emitChange(value2, type2);
  33273. this.$emit(type2);
  33274. },
  33275. // 对值扩大后进行四舍五入,再除以扩大因子,避免出现浮点数操作的精度问题
  33276. add(num1, num2) {
  33277. const cardinal = Math.pow(10, 10);
  33278. return Math.round((num1 + num2) * cardinal) / cardinal;
  33279. },
  33280. // 点击加减按钮
  33281. clickHandler(type2) {
  33282. this.type = type2;
  33283. this.onChange();
  33284. },
  33285. longPressStep() {
  33286. this.clearTimeout();
  33287. this.longPressTimer = setTimeout(() => {
  33288. this.onChange();
  33289. this.longPressStep();
  33290. }, 250);
  33291. },
  33292. onTouchStart(type2) {
  33293. if (!this.longPress)
  33294. return;
  33295. this.clearTimeout();
  33296. this.type = type2;
  33297. this.longPressTimer = setTimeout(() => {
  33298. this.onChange();
  33299. this.longPressStep();
  33300. }, 600);
  33301. },
  33302. // 触摸结束,清除定时器,停止长按加减
  33303. onTouchEnd() {
  33304. if (!this.longPress)
  33305. return;
  33306. this.clearTimeout();
  33307. },
  33308. // 清除定时器
  33309. clearTimeout() {
  33310. clearTimeout(this.longPressTimer);
  33311. this.longPressTimer = null;
  33312. }
  33313. }
  33314. };
  33315. function _sfc_render$Y(_ctx, _cache, $props, $setup, $data, $options) {
  33316. const _component_up_icon = vue.resolveComponent("up-icon");
  33317. return vue.openBlock(), vue.createElementBlock("view", { class: "u-number-box" }, [
  33318. _ctx.showMinus && !$options.hideMinus && _ctx.$slots.minus ? (vue.openBlock(), vue.createElementBlock(
  33319. "view",
  33320. {
  33321. key: 0,
  33322. class: "u-number-box__slot cursor-pointer",
  33323. onClick: _cache[0] || (_cache[0] = vue.withModifiers(($event) => $options.clickHandler("minus"), ["stop"])),
  33324. onTouchstart: _cache[1] || (_cache[1] = ($event) => $options.onTouchStart("minus")),
  33325. onTouchend: _cache[2] || (_cache[2] = vue.withModifiers((...args) => $options.clearTimeout && $options.clearTimeout(...args), ["stop"]))
  33326. },
  33327. [
  33328. vue.renderSlot(_ctx.$slots, "minus", {}, void 0, true)
  33329. ],
  33330. 32
  33331. /* NEED_HYDRATION */
  33332. )) : _ctx.showMinus && !$options.hideMinus ? (vue.openBlock(), vue.createElementBlock(
  33333. "view",
  33334. {
  33335. key: 1,
  33336. class: vue.normalizeClass(["u-number-box__minus cursor-pointer", { "u-number-box__minus--disabled": $options.isDisabled("minus") }]),
  33337. onClick: _cache[3] || (_cache[3] = vue.withModifiers(($event) => $options.clickHandler("minus"), ["stop"])),
  33338. onTouchstart: _cache[4] || (_cache[4] = ($event) => $options.onTouchStart("minus")),
  33339. onTouchend: _cache[5] || (_cache[5] = vue.withModifiers((...args) => $options.clearTimeout && $options.clearTimeout(...args), ["stop"])),
  33340. "hover-class": "u-number-box__minus--hover",
  33341. "hover-stay-time": "150",
  33342. style: vue.normalizeStyle([$options.buttonStyle("minus")])
  33343. },
  33344. [
  33345. vue.createVNode(_component_up_icon, {
  33346. name: "minus",
  33347. color: $options.isDisabled("minus") ? "#c8c9cc" : "#323233",
  33348. size: "15",
  33349. bold: "",
  33350. customStyle: _ctx.iconStyle
  33351. }, null, 8, ["color", "customStyle"])
  33352. ],
  33353. 38
  33354. /* CLASS, STYLE, NEED_HYDRATION */
  33355. )) : vue.createCommentVNode("v-if", true),
  33356. !$options.hideMinus ? vue.renderSlot(_ctx.$slots, "input", { key: 2 }, () => [
  33357. vue.withDirectives(vue.createElementVNode("input", {
  33358. disabled: _ctx.disabledInput || _ctx.disabled,
  33359. "cursor-spacing": $options.getCursorSpacing,
  33360. class: vue.normalizeClass([{ "u-number-box__input--disabled": _ctx.disabled || _ctx.disabledInput }, "u-number-box__input"]),
  33361. "onUpdate:modelValue": _cache[6] || (_cache[6] = ($event) => $data.currentValue = $event),
  33362. onBlur: _cache[7] || (_cache[7] = (...args) => $options.onBlur && $options.onBlur(...args)),
  33363. onFocus: _cache[8] || (_cache[8] = (...args) => $options.onFocus && $options.onFocus(...args)),
  33364. onInput: _cache[9] || (_cache[9] = (...args) => $options.onInput && $options.onInput(...args)),
  33365. type: "number",
  33366. style: vue.normalizeStyle([$options.inputStyle])
  33367. }, null, 46, ["disabled", "cursor-spacing"]), [
  33368. [vue.vModelText, $data.currentValue]
  33369. ])
  33370. ], true) : vue.createCommentVNode("v-if", true),
  33371. _ctx.showPlus && _ctx.$slots.plus ? (vue.openBlock(), vue.createElementBlock(
  33372. "view",
  33373. {
  33374. key: 3,
  33375. class: "u-number-box__slot cursor-pointer",
  33376. onClick: _cache[10] || (_cache[10] = vue.withModifiers(($event) => $options.clickHandler("plus"), ["stop"])),
  33377. onTouchstart: _cache[11] || (_cache[11] = ($event) => $options.onTouchStart("plus")),
  33378. onTouchend: _cache[12] || (_cache[12] = vue.withModifiers((...args) => $options.clearTimeout && $options.clearTimeout(...args), ["stop"]))
  33379. },
  33380. [
  33381. vue.renderSlot(_ctx.$slots, "plus", {}, void 0, true)
  33382. ],
  33383. 32
  33384. /* NEED_HYDRATION */
  33385. )) : _ctx.showPlus ? (vue.openBlock(), vue.createElementBlock(
  33386. "view",
  33387. {
  33388. key: 4,
  33389. class: vue.normalizeClass(["u-number-box__plus cursor-pointer", { "u-number-box__minus--disabled": $options.isDisabled("plus") }]),
  33390. onClick: _cache[13] || (_cache[13] = vue.withModifiers(($event) => $options.clickHandler("plus"), ["stop"])),
  33391. onTouchstart: _cache[14] || (_cache[14] = ($event) => $options.onTouchStart("plus")),
  33392. onTouchend: _cache[15] || (_cache[15] = vue.withModifiers((...args) => $options.clearTimeout && $options.clearTimeout(...args), ["stop"])),
  33393. "hover-class": "u-number-box__plus--hover",
  33394. "hover-stay-time": "150",
  33395. style: vue.normalizeStyle([$options.buttonStyle("plus")])
  33396. },
  33397. [
  33398. vue.createVNode(_component_up_icon, {
  33399. name: "plus",
  33400. color: $options.isDisabled("plus") ? "#c8c9cc" : "#323233",
  33401. size: "15",
  33402. bold: "",
  33403. customStyle: _ctx.iconStyle
  33404. }, null, 8, ["color", "customStyle"])
  33405. ],
  33406. 38
  33407. /* CLASS, STYLE, NEED_HYDRATION */
  33408. )) : vue.createCommentVNode("v-if", true)
  33409. ]);
  33410. }
  33411. const uNumberBox = /* @__PURE__ */ _export_sfc(_sfc_main$Z, [["render", _sfc_render$Y], ["__scopeId", "data-v-eb6f6237"], ["__file", "C:/Users/EDY/Desktop/项目/shuibei/uni_modules/uview-plus/components/u-number-box/u-number-box.vue"]]);
  33412. const __vite_glob_0_70 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
  33413. __proto__: null,
  33414. default: uNumberBox
  33415. }, Symbol.toStringTag, { value: "Module" }));
  33416. const _sfc_main$Y = {
  33417. name: "u-pagination",
  33418. props: {
  33419. // 当前页码
  33420. currentPage: {
  33421. type: Number,
  33422. default: 1
  33423. },
  33424. // 每页条目数
  33425. pageSize: {
  33426. type: Number,
  33427. default: 10
  33428. },
  33429. // 总数据条目数
  33430. total: {
  33431. type: Number,
  33432. default: 0
  33433. },
  33434. // 上一页按钮文案
  33435. prevText: {
  33436. type: String,
  33437. default: ""
  33438. },
  33439. // 下一页按钮文案
  33440. nextText: {
  33441. type: String,
  33442. default: ""
  33443. },
  33444. buttonBgColor: {
  33445. type: String,
  33446. default: "#f5f7fa"
  33447. },
  33448. buttonBorderColor: {
  33449. type: String,
  33450. default: "#dcdfe6"
  33451. },
  33452. // 可选的每页条目数
  33453. pageSizes: {
  33454. type: Array,
  33455. default: () => [10, 20, 30, 40, 50]
  33456. },
  33457. // 布局方式(类似 el-pagination)
  33458. layout: {
  33459. type: String,
  33460. default: "prev, pager, next"
  33461. },
  33462. // 是否隐藏只有一个页面时的分页控件
  33463. hideOnSinglePage: {
  33464. type: Boolean,
  33465. default: false
  33466. }
  33467. },
  33468. emits: ["update:currentPage", "update:pageSize", "current-change", "size-change"],
  33469. data() {
  33470. return {
  33471. currentPageInput: this.currentPage + ""
  33472. };
  33473. },
  33474. computed: {
  33475. totalPages() {
  33476. return Math.max(1, Math.ceil(this.total / this.pageSize));
  33477. },
  33478. pageSizeIndex() {
  33479. const index2 = this.pageSizes.findIndex((size) => size.value === this.pageSize);
  33480. return index2 >= 0 ? index2 : 0;
  33481. },
  33482. pageSizeLabel() {
  33483. const found = this.pageSizes.find((size) => size.value === this.pageSize);
  33484. return (found == null ? void 0 : found.label) || this.pageSize;
  33485. },
  33486. displayedPages() {
  33487. const total = this.totalPages;
  33488. const current = this.currentPage;
  33489. if (total <= 4) {
  33490. return Array.from({ length: total }, (_2, i2) => i2 + 1);
  33491. }
  33492. const pages2 = [];
  33493. if (current <= 2) {
  33494. for (let i2 = 1; i2 <= 4; i2++) {
  33495. pages2.push(i2);
  33496. }
  33497. pages2.push("...");
  33498. pages2.push(total);
  33499. } else if (current >= total - 1) {
  33500. pages2.push(1);
  33501. pages2.push("...");
  33502. for (let i2 = total - 3; i2 <= total; i2++) {
  33503. pages2.push(i2);
  33504. }
  33505. } else {
  33506. pages2.push(1);
  33507. pages2.push("...");
  33508. pages2.push(current - 1);
  33509. pages2.push(current);
  33510. pages2.push(current + 1);
  33511. pages2.push("...");
  33512. pages2.push(total);
  33513. }
  33514. return pages2;
  33515. }
  33516. // 控制是否隐藏
  33517. },
  33518. watch: {
  33519. currentPage(val) {
  33520. this.currentPageInput = val + "";
  33521. }
  33522. },
  33523. methods: {
  33524. t: t$1,
  33525. handleSizeChange(e2) {
  33526. var _a2;
  33527. const selected = e2.detail.value;
  33528. const size = ((_a2 = this.pageSizes[selected]) == null ? void 0 : _a2.value) || this.pageSizes[0].value;
  33529. this.$emit("update:pageSize", size);
  33530. this.$emit("size-change", size);
  33531. },
  33532. prev() {
  33533. if (this.currentPage > 1) {
  33534. this.goTo(this.currentPage - 1);
  33535. }
  33536. },
  33537. next() {
  33538. if (this.currentPage < this.totalPages) {
  33539. this.goTo(this.currentPage + 1);
  33540. }
  33541. },
  33542. goTo(page2) {
  33543. if (page2 === "..." || page2 === this.currentPage)
  33544. return;
  33545. this.$emit("update:currentPage", page2);
  33546. this.$emit("current-change", page2);
  33547. },
  33548. onInputPage(e2) {
  33549. this.currentPageInput = e2.detail.value;
  33550. },
  33551. onConfirmPage(e2) {
  33552. const num = parseInt(e2.detail.value);
  33553. if (!isNaN(num) && num >= 1 && num <= this.totalPages) {
  33554. this.goTo(num);
  33555. }
  33556. }
  33557. }
  33558. };
  33559. function _sfc_render$X(_ctx, _cache, $props, $setup, $data, $options) {
  33560. const _component_up_icon = vue.resolveComponent("up-icon");
  33561. return vue.openBlock(), vue.createElementBlock("view", { class: "u-pagination" }, [
  33562. vue.createCommentVNode(" 上一页按钮 "),
  33563. vue.createElementVNode(
  33564. "view",
  33565. {
  33566. class: vue.normalizeClass([
  33567. "u-pagination-btn",
  33568. { disabled: $props.currentPage === 1 }
  33569. ]),
  33570. style: vue.normalizeStyle({ backgroundColor: $props.buttonBgColor, borderColor: $props.buttonBorderColor }),
  33571. onClick: _cache[0] || (_cache[0] = (...args) => $options.prev && $options.prev(...args))
  33572. },
  33573. [
  33574. $props.prevText ? (vue.openBlock(), vue.createElementBlock(
  33575. vue.Fragment,
  33576. { key: 0 },
  33577. [
  33578. vue.createTextVNode(
  33579. vue.toDisplayString($props.prevText),
  33580. 1
  33581. /* TEXT */
  33582. )
  33583. ],
  33584. 64
  33585. /* STABLE_FRAGMENT */
  33586. )) : (vue.openBlock(), vue.createBlock(_component_up_icon, {
  33587. key: 1,
  33588. name: "arrow-left"
  33589. }))
  33590. ],
  33591. 6
  33592. /* CLASS, STYLE */
  33593. ),
  33594. vue.createCommentVNode(" 页码列表 "),
  33595. $props.layout.includes("pager") ? (vue.openBlock(true), vue.createElementBlock(
  33596. vue.Fragment,
  33597. { key: 0 },
  33598. vue.renderList($options.displayedPages, (page2) => {
  33599. return vue.openBlock(), vue.createElementBlock("view", {
  33600. key: page2,
  33601. class: vue.normalizeClass([
  33602. "u-pagination-item",
  33603. { active: page2 === $props.currentPage }
  33604. ]),
  33605. onClick: ($event) => $options.goTo(page2)
  33606. }, vue.toDisplayString(page2), 11, ["onClick"]);
  33607. }),
  33608. 128
  33609. /* KEYED_FRAGMENT */
  33610. )) : vue.createCommentVNode("v-if", true),
  33611. vue.createCommentVNode(" 总数显示 "),
  33612. $props.total > 0 && $props.layout.includes("total") ? (vue.openBlock(), vue.createElementBlock(
  33613. "view",
  33614. {
  33615. key: 1,
  33616. class: "u-pagination-total"
  33617. },
  33618. vue.toDisplayString($props.currentPage) + " / " + vue.toDisplayString($options.totalPages),
  33619. 1
  33620. /* TEXT */
  33621. )) : vue.createCommentVNode("v-if", true),
  33622. vue.createCommentVNode(" 每页数量选择器 "),
  33623. vue.createCommentVNode(` <picker\r
  33624. v-if="layout.includes('sizes')"\r
  33625. mode="selector"\r
  33626. :range="pageSizes"\r
  33627. range-key="label"\r
  33628. :value="pageSizeIndex"\r
  33629. @change="handleSizeChange"\r
  33630. class="u-pagination-sizes"\r
  33631. >\r
  33632. <view>{{ pageSizeLabel }}</view>\r
  33633. </picker> `),
  33634. vue.createCommentVNode(" 下一页按钮 "),
  33635. vue.createElementVNode(
  33636. "view",
  33637. {
  33638. class: vue.normalizeClass([
  33639. "u-pagination-btn",
  33640. { disabled: $props.currentPage === $options.totalPages }
  33641. ]),
  33642. style: vue.normalizeStyle({ backgroundColor: $props.buttonBgColor, borderColor: $props.buttonBorderColor }),
  33643. onClick: _cache[1] || (_cache[1] = (...args) => $options.next && $options.next(...args))
  33644. },
  33645. [
  33646. $props.nextText ? (vue.openBlock(), vue.createElementBlock(
  33647. vue.Fragment,
  33648. { key: 0 },
  33649. [
  33650. vue.createTextVNode(
  33651. vue.toDisplayString($props.nextText),
  33652. 1
  33653. /* TEXT */
  33654. )
  33655. ],
  33656. 64
  33657. /* STABLE_FRAGMENT */
  33658. )) : (vue.openBlock(), vue.createBlock(_component_up_icon, {
  33659. key: 1,
  33660. name: "arrow-right"
  33661. }))
  33662. ],
  33663. 6
  33664. /* CLASS, STYLE */
  33665. ),
  33666. vue.createCommentVNode(" 跳转输入框 "),
  33667. vue.createCommentVNode(` <view v-if="layout.includes('jumper')">\r
  33668. <text>前往</text>\r
  33669. <input\r
  33670. type="number"\r
  33671. class="u-pagination-jumper"\r
  33672. :value="currentPageInput"\r
  33673. @input="onInputPage"\r
  33674. @confirm="onConfirmPage"\r
  33675. />\r
  33676. <text>页</text>\r
  33677. </view> `)
  33678. ]);
  33679. }
  33680. const uPagination = /* @__PURE__ */ _export_sfc(_sfc_main$Y, [["render", _sfc_render$X], ["__scopeId", "data-v-c04d6295"], ["__file", "C:/Users/EDY/Desktop/项目/shuibei/uni_modules/uview-plus/components/u-pagination/u-pagination.vue"]]);
  33681. const __vite_glob_0_73 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
  33682. __proto__: null,
  33683. default: uPagination
  33684. }, Symbol.toStringTag, { value: "Module" }));
  33685. const block0$2 = (Comp) => {
  33686. (Comp.$wxs || (Comp.$wxs = [])).push("handler");
  33687. (Comp.$wxsModules || (Comp.$wxsModules = {}))["handler"] = "155ce918";
  33688. };
  33689. const _sfc_main$X = {
  33690. name: "node",
  33691. options: {},
  33692. data() {
  33693. return {
  33694. ctrl: {}
  33695. };
  33696. },
  33697. props: {
  33698. name: String,
  33699. attrs: {
  33700. type: Object,
  33701. default() {
  33702. return {};
  33703. }
  33704. },
  33705. childs: Array,
  33706. opts: Array
  33707. },
  33708. components: {},
  33709. mounted() {
  33710. this.$nextTick(() => {
  33711. var _a2, _b;
  33712. for (this.root = this == null ? void 0 : this.$parent; this.root && ((_a2 = this.root) == null ? void 0 : _a2.$options.name) !== "mp-html"; this.root = (_b = this.root) == null ? void 0 : _b.$parent)
  33713. ;
  33714. });
  33715. if (this.opts[0]) {
  33716. let i2;
  33717. for (i2 = this.childs.length; i2--; ) {
  33718. if (this.childs[i2].name === "img")
  33719. break;
  33720. }
  33721. if (i2 !== -1) {
  33722. this.observer = uni.createIntersectionObserver(this).relativeToViewport({
  33723. top: 500,
  33724. bottom: 500
  33725. });
  33726. this.observer.observe("._img", (res) => {
  33727. if (res.intersectionRatio) {
  33728. this.$set(this.ctrl, "load", 1);
  33729. this.observer.disconnect();
  33730. }
  33731. });
  33732. }
  33733. }
  33734. },
  33735. beforeDestroy() {
  33736. if (this.observer) {
  33737. this.observer.disconnect();
  33738. }
  33739. },
  33740. methods: {
  33741. /**
  33742. * @description 播放视频事件
  33743. * @param {Event} e
  33744. */
  33745. play(e2) {
  33746. const i2 = e2.currentTarget.dataset.i;
  33747. const node2 = this.childs[i2];
  33748. this.root.$emit("play", {
  33749. source: node2.name,
  33750. attrs: {
  33751. ...node2.attrs,
  33752. src: node2.src[this.ctrl[i2] || 0]
  33753. }
  33754. });
  33755. },
  33756. /**
  33757. * @description 图片点击事件
  33758. * @param {Event} e
  33759. */
  33760. imgTap(e2) {
  33761. const node2 = this.childs[e2.currentTarget.dataset.i];
  33762. if (node2.a) {
  33763. this.linkTap(node2.a);
  33764. return;
  33765. }
  33766. if (node2.attrs.ignore)
  33767. return;
  33768. node2.attrs.src = node2.attrs.src || node2.attrs["data-src"];
  33769. this.root.$emit("imgtap", node2.attrs);
  33770. if (this.root.previewImg) {
  33771. uni.previewImage({
  33772. current: parseInt(node2.attrs.i),
  33773. urls: this.root.imgList
  33774. });
  33775. }
  33776. },
  33777. /**
  33778. * @description 图片长按
  33779. */
  33780. imgLongTap(e2) {
  33781. const attrs = this.childs[e2.currentTarget.dataset.i].attrs;
  33782. if (this.opts[3] && !attrs.ignore) {
  33783. uni.showActionSheet({
  33784. itemList: ["保存图片"],
  33785. success: () => {
  33786. const save = (path) => {
  33787. uni.saveImageToPhotosAlbum({
  33788. filePath: path,
  33789. success() {
  33790. uni.showToast({
  33791. title: "保存成功"
  33792. });
  33793. }
  33794. });
  33795. };
  33796. if (this.root.imgList[attrs.i].startsWith("http")) {
  33797. uni.downloadFile({
  33798. url: this.root.imgList[attrs.i],
  33799. success: (res) => save(res.tempFilePath)
  33800. });
  33801. } else {
  33802. save(this.root.imgList[attrs.i]);
  33803. }
  33804. }
  33805. });
  33806. }
  33807. },
  33808. /**
  33809. * @description 图片加载完成事件
  33810. * @param {Event} e
  33811. */
  33812. imgLoad(e2) {
  33813. const i2 = e2.currentTarget.dataset.i;
  33814. if (!this.childs[i2].w) {
  33815. this.$set(this.ctrl, i2, e2.detail.width);
  33816. } else if (this.opts[1] && !this.ctrl[i2] || this.ctrl[i2] === -1) {
  33817. this.$set(this.ctrl, i2, 1);
  33818. }
  33819. this.checkReady();
  33820. },
  33821. /**
  33822. * @description 检查是否所有图片加载完毕
  33823. */
  33824. checkReady() {
  33825. if (this.root && !this.root.lazyLoad) {
  33826. this.root._unloadimgs -= 1;
  33827. if (!this.root._unloadimgs) {
  33828. setTimeout(() => {
  33829. this.root.getRect().then((rect) => {
  33830. this.root.$emit("ready", rect);
  33831. }).catch(() => {
  33832. this.root.$emit("ready", {});
  33833. });
  33834. }, 350);
  33835. }
  33836. }
  33837. },
  33838. /**
  33839. * @description 链接点击事件
  33840. * @param {Event} e
  33841. */
  33842. linkTap(e2) {
  33843. const node2 = e2.currentTarget ? this.childs[e2.currentTarget.dataset.i] : {};
  33844. const attrs = node2.attrs || e2;
  33845. const href = attrs.href;
  33846. this.root.$emit("linktap", Object.assign({
  33847. innerText: this.root.getText(node2.children || [])
  33848. // 链接内的文本内容
  33849. }, attrs));
  33850. if (href) {
  33851. if (href[0] === "#") {
  33852. this.root.navigateTo(href.substring(1)).catch(() => {
  33853. });
  33854. } else if (href.split("?")[0].includes("://")) {
  33855. if (this.root.copyLink) {
  33856. plus.runtime.openWeb(href);
  33857. }
  33858. } else {
  33859. uni.navigateTo({
  33860. url: href,
  33861. fail() {
  33862. uni.switchTab({
  33863. url: href,
  33864. fail() {
  33865. }
  33866. });
  33867. }
  33868. });
  33869. }
  33870. }
  33871. },
  33872. /**
  33873. * @description 错误事件
  33874. * @param {Event} e
  33875. */
  33876. mediaError(e2) {
  33877. const i2 = e2.currentTarget.dataset.i;
  33878. const node2 = this.childs[i2];
  33879. if (node2.name === "video" || node2.name === "audio") {
  33880. let index2 = (this.ctrl[i2] || 0) + 1;
  33881. if (index2 > node2.src.length) {
  33882. index2 = 0;
  33883. }
  33884. if (index2 < node2.src.length) {
  33885. this.$set(this.ctrl, i2, index2);
  33886. return;
  33887. }
  33888. } else if (node2.name === "img") {
  33889. if (this.opts[2]) {
  33890. this.$set(this.ctrl, i2, -1);
  33891. }
  33892. this.checkReady();
  33893. }
  33894. if (this.root) {
  33895. this.root.$emit("error", {
  33896. source: node2.name,
  33897. attrs: node2.attrs,
  33898. errMsg: e2.detail.errMsg
  33899. });
  33900. }
  33901. }
  33902. }
  33903. };
  33904. function _sfc_render$W(_ctx, _cache, $props, $setup, $data, $options) {
  33905. const _component_node = vue.resolveComponent("node", true);
  33906. return vue.openBlock(), vue.createElementBlock("view", {
  33907. id: $props.attrs.id,
  33908. class: vue.normalizeClass("_block _" + $props.name + " " + $props.attrs.class),
  33909. style: vue.normalizeStyle($props.attrs.style)
  33910. }, [
  33911. (vue.openBlock(true), vue.createElementBlock(
  33912. vue.Fragment,
  33913. null,
  33914. vue.renderList($props.childs, (n2, i2) => {
  33915. return vue.openBlock(), vue.createElementBlock(
  33916. vue.Fragment,
  33917. { key: i2 },
  33918. [
  33919. vue.createCommentVNode(" 图片 "),
  33920. vue.createCommentVNode(" 占位图 "),
  33921. n2.name === "img" && !n2.t && ($props.opts[1] && !$data.ctrl[i2] || $data.ctrl[i2] < 0) ? (vue.openBlock(), vue.createElementBlock("image", {
  33922. key: 0,
  33923. class: "_img",
  33924. style: vue.normalizeStyle(n2.attrs.style),
  33925. src: $data.ctrl[i2] < 0 ? $props.opts[2] : $props.opts[1],
  33926. mode: "widthFix"
  33927. }, null, 12, ["src"])) : vue.createCommentVNode("v-if", true),
  33928. vue.createCommentVNode(" 显示图片 "),
  33929. vue.createCommentVNode(" 表格中的图片,使用 rich-text 防止大小不正确 "),
  33930. n2.name === "img" && n2.t ? (vue.openBlock(), vue.createElementBlock("rich-text", {
  33931. key: 1,
  33932. style: vue.normalizeStyle("display:" + n2.t),
  33933. nodes: [{ attrs: { style: n2.attrs.style || "", src: n2.attrs.src }, name: "img" }],
  33934. "data-i": i2,
  33935. onClick: _cache[0] || (_cache[0] = vue.withModifiers((...args) => $options.imgTap && $options.imgTap(...args), ["stop"]))
  33936. }, null, 12, ["nodes", "data-i"])) : n2.name === "img" ? (vue.openBlock(), vue.createElementBlock("image", {
  33937. key: 2,
  33938. id: n2.attrs.id,
  33939. class: vue.normalizeClass("_img " + n2.attrs.class),
  33940. style: vue.normalizeStyle(($data.ctrl[i2] === -1 ? "display:none;" : "") + "width:" + ($data.ctrl[i2] || 1) + "px;" + n2.attrs.style),
  33941. src: n2.attrs.src || ($data.ctrl.load ? n2.attrs["data-src"] : ""),
  33942. mode: !n2.h ? "widthFix" : !n2.w ? "heightFix" : n2.m || "",
  33943. "data-i": i2,
  33944. onLoad: _cache[1] || (_cache[1] = (...args) => $options.imgLoad && $options.imgLoad(...args)),
  33945. onError: _cache[2] || (_cache[2] = (...args) => $options.mediaError && $options.mediaError(...args)),
  33946. onClick: _cache[3] || (_cache[3] = vue.withModifiers((...args) => $options.imgTap && $options.imgTap(...args), ["stop"])),
  33947. onLongpress: _cache[4] || (_cache[4] = (...args) => $options.imgLongTap && $options.imgLongTap(...args))
  33948. }, null, 46, ["id", "src", "mode", "data-i"])) : n2.text ? (vue.openBlock(), vue.createElementBlock(
  33949. vue.Fragment,
  33950. { key: 3 },
  33951. [
  33952. vue.createCommentVNode(" 文本 "),
  33953. vue.createElementVNode(
  33954. "text",
  33955. { decode: "" },
  33956. vue.toDisplayString(n2.text),
  33957. 1
  33958. /* TEXT */
  33959. )
  33960. ],
  33961. 2112
  33962. /* STABLE_FRAGMENT, DEV_ROOT_FRAGMENT */
  33963. )) : n2.name === "br" ? (vue.openBlock(), vue.createElementBlock("text", { key: 4 }, vue.toDisplayString("\n"))) : n2.name === "a" ? (vue.openBlock(), vue.createElementBlock(
  33964. vue.Fragment,
  33965. { key: 5 },
  33966. [
  33967. vue.createCommentVNode(" 链接 "),
  33968. vue.createElementVNode("view", {
  33969. id: n2.attrs.id,
  33970. class: vue.normalizeClass((n2.attrs.href ? "_a " : "") + n2.attrs.class),
  33971. "hover-class": "_hover",
  33972. style: vue.normalizeStyle("display:inline;" + n2.attrs.style),
  33973. "data-i": i2,
  33974. onClick: _cache[5] || (_cache[5] = vue.withModifiers((...args) => $options.linkTap && $options.linkTap(...args), ["stop"]))
  33975. }, [
  33976. vue.createVNode(_component_node, {
  33977. name: "span",
  33978. childs: n2.children,
  33979. opts: $props.opts,
  33980. style: { "display": "inherit" }
  33981. }, null, 8, ["childs", "opts"])
  33982. ], 14, ["id", "data-i"])
  33983. ],
  33984. 2112
  33985. /* STABLE_FRAGMENT, DEV_ROOT_FRAGMENT */
  33986. )) : n2.html ? (vue.openBlock(), vue.createElementBlock(
  33987. vue.Fragment,
  33988. { key: 6 },
  33989. [
  33990. vue.createCommentVNode(" 视频 "),
  33991. vue.createElementVNode("view", {
  33992. id: n2.attrs.id,
  33993. class: vue.normalizeClass("_video " + n2.attrs.class),
  33994. style: vue.normalizeStyle(n2.attrs.style),
  33995. innerHTML: n2.html,
  33996. "data-i": i2,
  33997. onVplay: _cache[6] || (_cache[6] = vue.withModifiers((...args) => $options.play && $options.play(...args), ["stop"]))
  33998. }, null, 46, ["id", "innerHTML", "data-i"])
  33999. ],
  34000. 2112
  34001. /* STABLE_FRAGMENT, DEV_ROOT_FRAGMENT */
  34002. )) : n2.name === "iframe" ? (vue.openBlock(), vue.createElementBlock("iframe", {
  34003. key: 7,
  34004. style: vue.normalizeStyle(n2.attrs.style),
  34005. allowfullscreen: n2.attrs.allowfullscreen,
  34006. frameborder: n2.attrs.frameborder,
  34007. src: n2.attrs.src
  34008. }, null, 12, ["allowfullscreen", "frameborder", "src"])) : n2.name === "embed" ? (vue.openBlock(), vue.createElementBlock("embed", {
  34009. key: 8,
  34010. style: vue.normalizeStyle(n2.attrs.style),
  34011. src: n2.attrs.src
  34012. }, null, 12, ["src"])) : n2.name === "table" && n2.c || n2.name === "li" ? (vue.openBlock(), vue.createElementBlock("view", {
  34013. key: 9,
  34014. id: n2.attrs.id,
  34015. class: vue.normalizeClass("_" + n2.name + " " + n2.attrs.class),
  34016. style: vue.normalizeStyle(n2.attrs.style)
  34017. }, [
  34018. n2.name === "li" ? (vue.openBlock(), vue.createBlock(_component_node, {
  34019. key: 0,
  34020. childs: n2.children,
  34021. opts: $props.opts
  34022. }, null, 8, ["childs", "opts"])) : (vue.openBlock(true), vue.createElementBlock(
  34023. vue.Fragment,
  34024. { key: 1 },
  34025. vue.renderList(n2.children, (tbody, x2) => {
  34026. return vue.openBlock(), vue.createElementBlock(
  34027. "view",
  34028. {
  34029. key: x2,
  34030. class: vue.normalizeClass("_" + tbody.name + " " + tbody.attrs.class),
  34031. style: vue.normalizeStyle(tbody.attrs.style)
  34032. },
  34033. [
  34034. tbody.name === "td" || tbody.name === "th" ? (vue.openBlock(), vue.createBlock(_component_node, {
  34035. key: 0,
  34036. childs: tbody.children,
  34037. opts: $props.opts
  34038. }, null, 8, ["childs", "opts"])) : (vue.openBlock(true), vue.createElementBlock(
  34039. vue.Fragment,
  34040. { key: 1 },
  34041. vue.renderList(tbody.children, (tr, y2) => {
  34042. return vue.openBlock(), vue.createElementBlock(
  34043. vue.Fragment,
  34044. { key: y2 },
  34045. [
  34046. tr.name === "td" || tr.name === "th" ? (vue.openBlock(), vue.createElementBlock(
  34047. "view",
  34048. {
  34049. key: 0,
  34050. class: vue.normalizeClass("_" + tr.name + " " + tr.attrs.class),
  34051. style: vue.normalizeStyle(tr.attrs.style)
  34052. },
  34053. [
  34054. vue.createVNode(_component_node, {
  34055. childs: tr.children,
  34056. opts: $props.opts
  34057. }, null, 8, ["childs", "opts"])
  34058. ],
  34059. 6
  34060. /* CLASS, STYLE */
  34061. )) : (vue.openBlock(), vue.createElementBlock(
  34062. "view",
  34063. {
  34064. key: 1,
  34065. class: vue.normalizeClass("_" + tr.name + " " + tr.attrs.class),
  34066. style: vue.normalizeStyle(tr.attrs.style)
  34067. },
  34068. [
  34069. (vue.openBlock(true), vue.createElementBlock(
  34070. vue.Fragment,
  34071. null,
  34072. vue.renderList(tr.children, (td, z2) => {
  34073. return vue.openBlock(), vue.createElementBlock(
  34074. "view",
  34075. {
  34076. key: z2,
  34077. class: vue.normalizeClass("_" + td.name + " " + td.attrs.class),
  34078. style: vue.normalizeStyle(td.attrs.style)
  34079. },
  34080. [
  34081. vue.createVNode(_component_node, {
  34082. childs: td.children,
  34083. opts: $props.opts
  34084. }, null, 8, ["childs", "opts"])
  34085. ],
  34086. 6
  34087. /* CLASS, STYLE */
  34088. );
  34089. }),
  34090. 128
  34091. /* KEYED_FRAGMENT */
  34092. ))
  34093. ],
  34094. 6
  34095. /* CLASS, STYLE */
  34096. ))
  34097. ],
  34098. 64
  34099. /* STABLE_FRAGMENT */
  34100. );
  34101. }),
  34102. 128
  34103. /* KEYED_FRAGMENT */
  34104. ))
  34105. ],
  34106. 6
  34107. /* CLASS, STYLE */
  34108. );
  34109. }),
  34110. 128
  34111. /* KEYED_FRAGMENT */
  34112. ))
  34113. ], 14, ["id"])) : !n2.c ? (vue.openBlock(), vue.createElementBlock(
  34114. vue.Fragment,
  34115. { key: 10 },
  34116. [
  34117. vue.createCommentVNode(" insert "),
  34118. vue.createCommentVNode(" 富文本 "),
  34119. vue.createElementVNode("rich-text", {
  34120. id: n2.attrs.id,
  34121. style: vue.normalizeStyle("display:inline;" + n2.f),
  34122. preview: false,
  34123. selectable: $props.opts[4],
  34124. "user-select": $props.opts[4],
  34125. nodes: [n2]
  34126. }, null, 12, ["id", "selectable", "user-select", "nodes"])
  34127. ],
  34128. 2112
  34129. /* STABLE_FRAGMENT, DEV_ROOT_FRAGMENT */
  34130. )) : n2.c === 2 ? (vue.openBlock(), vue.createElementBlock(
  34131. vue.Fragment,
  34132. { key: 11 },
  34133. [
  34134. vue.createCommentVNode(" 继续递归 "),
  34135. vue.createElementVNode("view", {
  34136. id: n2.attrs.id,
  34137. class: vue.normalizeClass("_block _" + n2.name + " " + n2.attrs.class),
  34138. style: vue.normalizeStyle(n2.f + ";" + n2.attrs.style)
  34139. }, [
  34140. (vue.openBlock(true), vue.createElementBlock(
  34141. vue.Fragment,
  34142. null,
  34143. vue.renderList(n2.children, (n22, j2) => {
  34144. return vue.openBlock(), vue.createBlock(_component_node, {
  34145. key: j2,
  34146. style: vue.normalizeStyle(n22.f),
  34147. name: n22.name,
  34148. attrs: n22.attrs,
  34149. childs: n22.children,
  34150. opts: $props.opts
  34151. }, null, 8, ["style", "name", "attrs", "childs", "opts"]);
  34152. }),
  34153. 128
  34154. /* KEYED_FRAGMENT */
  34155. ))
  34156. ], 14, ["id"])
  34157. ],
  34158. 2112
  34159. /* STABLE_FRAGMENT, DEV_ROOT_FRAGMENT */
  34160. )) : (vue.openBlock(), vue.createBlock(_component_node, {
  34161. key: 12,
  34162. style: vue.normalizeStyle(n2.f),
  34163. name: n2.name,
  34164. attrs: n2.attrs,
  34165. childs: n2.children,
  34166. opts: $props.opts
  34167. }, null, 8, ["style", "name", "attrs", "childs", "opts"]))
  34168. ],
  34169. 64
  34170. /* STABLE_FRAGMENT */
  34171. );
  34172. }),
  34173. 128
  34174. /* KEYED_FRAGMENT */
  34175. ))
  34176. ], 14, ["id"]);
  34177. }
  34178. if (typeof block0$2 === "function")
  34179. block0$2(_sfc_main$X);
  34180. const node = /* @__PURE__ */ _export_sfc(_sfc_main$X, [["render", _sfc_render$W], ["__scopeId", "data-v-1200d422"], ["__file", "C:/Users/EDY/Desktop/项目/shuibei/uni_modules/uview-plus/components/u-parse/node/node.vue"]]);
  34181. const config = {
  34182. // 信任的标签(保持标签名不变)
  34183. trustTags: makeMap("a,abbr,ad,audio,b,blockquote,br,code,col,colgroup,dd,del,dl,dt,div,em,fieldset,h1,h2,h3,h4,h5,h6,hr,i,img,ins,label,legend,li,ol,p,q,ruby,rt,source,span,strong,sub,sup,table,tbody,td,tfoot,th,thead,tr,title,ul,video"),
  34184. // 块级标签(转为 div,其他的非信任标签转为 span)
  34185. blockTags: makeMap("address,article,aside,body,caption,center,cite,footer,header,html,nav,pre,section"),
  34186. // 行内标签
  34187. inlineTags: makeMap("abbr,b,big,code,del,em,i,ins,label,q,small,span,strong,sub,sup"),
  34188. // 要移除的标签
  34189. ignoreTags: makeMap("area,base,canvas,embed,frame,head,iframe,input,link,map,meta,param,rp,script,source,style,textarea,title,track,wbr"),
  34190. // 自闭合的标签
  34191. voidTags: makeMap("area,base,br,col,circle,ellipse,embed,frame,hr,img,input,line,link,meta,param,path,polygon,rect,source,track,use,wbr"),
  34192. // html 实体
  34193. entities: {
  34194. lt: "<",
  34195. gt: ">",
  34196. quot: '"',
  34197. apos: "'",
  34198. ensp: " ",
  34199. emsp: " ",
  34200. nbsp: " ",
  34201. semi: ";",
  34202. ndash: "–",
  34203. mdash: "—",
  34204. middot: "·",
  34205. lsquo: "‘",
  34206. rsquo: "’",
  34207. ldquo: "“",
  34208. rdquo: "”",
  34209. bull: "•",
  34210. hellip: "…",
  34211. larr: "←",
  34212. uarr: "↑",
  34213. rarr: "→",
  34214. darr: "↓"
  34215. },
  34216. // 默认的标签样式
  34217. tagStyle: {
  34218. address: "font-style:italic",
  34219. big: "display:inline;font-size:1.2em",
  34220. caption: "display:table-caption;text-align:center",
  34221. center: "text-align:center",
  34222. cite: "font-style:italic",
  34223. dd: "margin-left:40px",
  34224. mark: "background-color:yellow",
  34225. pre: "font-family:monospace;white-space:pre",
  34226. s: "text-decoration:line-through",
  34227. small: "display:inline;font-size:0.8em",
  34228. strike: "text-decoration:line-through",
  34229. u: "text-decoration:underline"
  34230. },
  34231. // svg 大小写对照表
  34232. svgDict: {
  34233. animatetransform: "animateTransform",
  34234. lineargradient: "linearGradient",
  34235. viewbox: "viewBox",
  34236. attributename: "attributeName",
  34237. repeatcount: "repeatCount",
  34238. repeatdur: "repeatDur",
  34239. foreignobject: "foreignObject"
  34240. }
  34241. };
  34242. const tagSelector = {};
  34243. let windowWidth;
  34244. const systemInfo = uni.getSystemInfoSync();
  34245. windowWidth = systemInfo.windowWidth;
  34246. const blankChar = makeMap(" ,\r,\n, ,\f");
  34247. let idIndex = 0;
  34248. config.ignoreTags.iframe = void 0;
  34249. config.trustTags.iframe = true;
  34250. config.ignoreTags.embed = void 0;
  34251. config.trustTags.embed = true;
  34252. function makeMap(str) {
  34253. const map = /* @__PURE__ */ Object.create(null);
  34254. const list = str.split(",");
  34255. for (let i2 = list.length; i2--; ) {
  34256. map[list[i2]] = true;
  34257. }
  34258. return map;
  34259. }
  34260. function decodeEntity(str, amp) {
  34261. let i2 = str.indexOf("&");
  34262. while (i2 !== -1) {
  34263. const j2 = str.indexOf(";", i2 + 3);
  34264. let code2;
  34265. if (j2 === -1)
  34266. break;
  34267. if (str[i2 + 1] === "#") {
  34268. code2 = parseInt((str[i2 + 2] === "x" ? "0" : "") + str.substring(i2 + 2, j2));
  34269. if (!isNaN(code2)) {
  34270. str = str.substr(0, i2) + String.fromCharCode(code2) + str.substr(j2 + 1);
  34271. }
  34272. } else {
  34273. code2 = str.substring(i2 + 1, j2);
  34274. if (config.entities[code2] || code2 === "amp" && amp) {
  34275. str = str.substr(0, i2) + (config.entities[code2] || "&") + str.substr(j2 + 1);
  34276. }
  34277. }
  34278. i2 = str.indexOf("&", i2 + 1);
  34279. }
  34280. return str;
  34281. }
  34282. function mergeNodes(nodes) {
  34283. let i2 = nodes.length - 1;
  34284. for (let j2 = i2; j2 >= -1; j2--) {
  34285. if (j2 === -1 || nodes[j2].c || !nodes[j2].name || nodes[j2].name !== "div" && nodes[j2].name !== "p" && nodes[j2].name[0] !== "h" || (nodes[j2].attrs.style || "").includes("inline")) {
  34286. if (i2 - j2 >= 5) {
  34287. nodes.splice(j2 + 1, i2 - j2, {
  34288. name: "div",
  34289. attrs: {},
  34290. children: nodes.slice(j2 + 1, i2 + 1)
  34291. });
  34292. }
  34293. i2 = j2 - 1;
  34294. }
  34295. }
  34296. }
  34297. function Parser(vm) {
  34298. this.options = vm || {};
  34299. this.tagStyle = Object.assign({}, config.tagStyle, this.options.tagStyle);
  34300. this.imgList = vm.imgList || [];
  34301. this.imgList._unloadimgs = 0;
  34302. this.plugins = vm.plugins || [];
  34303. this.attrs = /* @__PURE__ */ Object.create(null);
  34304. this.stack = [];
  34305. this.nodes = [];
  34306. this.pre = (this.options.containerStyle || "").includes("white-space") && this.options.containerStyle.includes("pre") ? 2 : 0;
  34307. }
  34308. Parser.prototype.parse = function(content) {
  34309. for (let i2 = this.plugins.length; i2--; ) {
  34310. if (this.plugins[i2].onUpdate) {
  34311. content = this.plugins[i2].onUpdate(content, config) || content;
  34312. }
  34313. }
  34314. new Lexer(this).parse(content);
  34315. while (this.stack.length) {
  34316. this.popNode();
  34317. }
  34318. if (this.nodes.length > 50) {
  34319. mergeNodes(this.nodes);
  34320. }
  34321. return this.nodes;
  34322. };
  34323. Parser.prototype.expose = function() {
  34324. for (let i2 = this.stack.length; i2--; ) {
  34325. const item = this.stack[i2];
  34326. if (item.c || item.name === "a" || item.name === "video" || item.name === "audio")
  34327. return;
  34328. item.c = 1;
  34329. }
  34330. };
  34331. Parser.prototype.hook = function(node2) {
  34332. for (let i2 = this.plugins.length; i2--; ) {
  34333. if (this.plugins[i2].onParse && this.plugins[i2].onParse(node2, this) === false) {
  34334. return false;
  34335. }
  34336. }
  34337. return true;
  34338. };
  34339. Parser.prototype.getUrl = function(url2) {
  34340. const domain2 = this.options.domain;
  34341. if (url2[0] === "/") {
  34342. if (url2[1] === "/") {
  34343. url2 = (domain2 ? domain2.split("://")[0] : "http") + ":" + url2;
  34344. } else if (domain2) {
  34345. url2 = domain2 + url2;
  34346. } else {
  34347. url2 = plus.io.convertLocalFileSystemURL(url2);
  34348. }
  34349. } else if (!url2.includes("data:") && !url2.includes("://")) {
  34350. if (domain2) {
  34351. url2 = domain2 + "/" + url2;
  34352. } else {
  34353. url2 = plus.io.convertLocalFileSystemURL(url2);
  34354. }
  34355. }
  34356. return url2;
  34357. };
  34358. Parser.prototype.parseStyle = function(node2) {
  34359. const attrs = node2.attrs;
  34360. const list = (this.tagStyle[node2.name] || "").split(";").concat((attrs.style || "").split(";"));
  34361. const styleObj = {};
  34362. let tmp = "";
  34363. if (attrs.id && !this.xml) {
  34364. if (this.options.useAnchor) {
  34365. this.expose();
  34366. } else if (node2.name !== "img" && node2.name !== "a" && node2.name !== "video" && node2.name !== "audio") {
  34367. attrs.id = void 0;
  34368. }
  34369. }
  34370. if (attrs.width) {
  34371. styleObj.width = parseFloat(attrs.width) + (attrs.width.includes("%") ? "%" : "px");
  34372. attrs.width = void 0;
  34373. }
  34374. if (attrs.height) {
  34375. styleObj.height = parseFloat(attrs.height) + (attrs.height.includes("%") ? "%" : "px");
  34376. attrs.height = void 0;
  34377. }
  34378. for (let i2 = 0, len = list.length; i2 < len; i2++) {
  34379. const info = list[i2].split(":");
  34380. if (info.length < 2)
  34381. continue;
  34382. const key = info.shift().trim().toLowerCase();
  34383. let value2 = info.join(":").trim();
  34384. if (value2[0] === "-" && value2.lastIndexOf("-") > 0 || value2.includes("safe")) {
  34385. tmp += `;${key}:${value2}`;
  34386. } else if (!styleObj[key] || value2.includes("import") || !styleObj[key].includes("import")) {
  34387. if (value2.includes("url")) {
  34388. let j2 = value2.indexOf("(") + 1;
  34389. if (j2) {
  34390. while (value2[j2] === '"' || value2[j2] === "'" || blankChar[value2[j2]]) {
  34391. j2++;
  34392. }
  34393. value2 = value2.substr(0, j2) + this.getUrl(value2.substr(j2));
  34394. }
  34395. } else if (value2.includes("rpx")) {
  34396. value2 = value2.replace(/[0-9.]+\s*rpx/g, ($2) => parseFloat($2) * windowWidth / 750 + "px");
  34397. }
  34398. styleObj[key] = value2;
  34399. }
  34400. }
  34401. node2.attrs.style = tmp;
  34402. return styleObj;
  34403. };
  34404. Parser.prototype.onTagName = function(name2) {
  34405. this.tagName = this.xml ? name2 : name2.toLowerCase();
  34406. if (this.tagName === "svg") {
  34407. this.xml = (this.xml || 0) + 1;
  34408. config.ignoreTags.style = void 0;
  34409. }
  34410. };
  34411. Parser.prototype.onAttrName = function(name2) {
  34412. name2 = this.xml ? name2 : name2.toLowerCase();
  34413. if (name2.includes("?") || name2.includes(";")) {
  34414. this.attrName = void 0;
  34415. return;
  34416. }
  34417. if (name2.substr(0, 5) === "data-") {
  34418. if (name2 === "data-src" && !this.attrs.src) {
  34419. this.attrName = "src";
  34420. } else if (this.tagName === "img" || this.tagName === "a") {
  34421. this.attrName = name2;
  34422. } else {
  34423. this.attrName = void 0;
  34424. }
  34425. } else {
  34426. this.attrName = name2;
  34427. this.attrs[name2] = "T";
  34428. }
  34429. };
  34430. Parser.prototype.onAttrVal = function(val) {
  34431. const name2 = this.attrName || "";
  34432. if (name2 === "style" || name2 === "href") {
  34433. this.attrs[name2] = decodeEntity(val, true);
  34434. } else if (name2.includes("src")) {
  34435. this.attrs[name2] = this.getUrl(decodeEntity(val, true));
  34436. } else if (name2) {
  34437. this.attrs[name2] = val;
  34438. }
  34439. };
  34440. Parser.prototype.onOpenTag = function(selfClose) {
  34441. const node2 = /* @__PURE__ */ Object.create(null);
  34442. node2.name = this.tagName;
  34443. node2.attrs = this.attrs;
  34444. if (this.options.nodes.length) {
  34445. node2.type = "node";
  34446. }
  34447. this.attrs = /* @__PURE__ */ Object.create(null);
  34448. const attrs = node2.attrs;
  34449. const parent = this.stack[this.stack.length - 1];
  34450. const siblings = parent ? parent.children : this.nodes;
  34451. const close = this.xml ? selfClose : config.voidTags[node2.name];
  34452. if (tagSelector[node2.name]) {
  34453. attrs.class = tagSelector[node2.name] + (attrs.class ? " " + attrs.class : "");
  34454. }
  34455. if (node2.name === "embed") {
  34456. this.expose();
  34457. }
  34458. if (node2.name === "video" || node2.name === "audio") {
  34459. if (node2.name === "video" && !attrs.id) {
  34460. attrs.id = "v" + idIndex++;
  34461. }
  34462. if (!attrs.controls && !attrs.autoplay) {
  34463. attrs.controls = "T";
  34464. }
  34465. node2.src = [];
  34466. if (attrs.src) {
  34467. node2.src.push(attrs.src);
  34468. attrs.src = void 0;
  34469. }
  34470. this.expose();
  34471. }
  34472. if (close) {
  34473. if (!this.hook(node2) || config.ignoreTags[node2.name]) {
  34474. if (node2.name === "base" && !this.options.domain) {
  34475. this.options.domain = attrs.href;
  34476. } else if (node2.name === "source" && parent && (parent.name === "video" || parent.name === "audio") && attrs.src) {
  34477. parent.src.push(attrs.src);
  34478. }
  34479. return;
  34480. }
  34481. const styleObj = this.parseStyle(node2);
  34482. if (node2.name === "img") {
  34483. if (attrs.src) {
  34484. if (attrs.src.includes("webp")) {
  34485. node2.webp = "T";
  34486. }
  34487. if (attrs.src.includes("data:") && this.options.previewImg !== "all" && !attrs["original-src"]) {
  34488. attrs.ignore = "T";
  34489. }
  34490. if (!attrs.ignore || node2.webp || attrs.src.includes("cloud://")) {
  34491. for (let i2 = this.stack.length; i2--; ) {
  34492. const item = this.stack[i2];
  34493. if (item.name === "a") {
  34494. node2.a = item.attrs;
  34495. }
  34496. if (item.name === "table" && !node2.webp && !attrs.src.includes("cloud://")) {
  34497. if (!styleObj.display || styleObj.display.includes("inline")) {
  34498. node2.t = "inline-block";
  34499. } else {
  34500. node2.t = styleObj.display;
  34501. }
  34502. styleObj.display = void 0;
  34503. }
  34504. item.c = 1;
  34505. }
  34506. attrs.i = this.imgList.length.toString();
  34507. let src = attrs["original-src"] || attrs.src;
  34508. this.imgList.push(src);
  34509. if (!node2.t) {
  34510. this.imgList._unloadimgs += 1;
  34511. }
  34512. if (this.options.lazyLoad) {
  34513. attrs["data-src"] = attrs.src;
  34514. attrs.src = void 0;
  34515. }
  34516. }
  34517. }
  34518. if (styleObj.display === "inline") {
  34519. styleObj.display = "";
  34520. }
  34521. if (attrs.ignore) {
  34522. styleObj["max-width"] = styleObj["max-width"] || "100%";
  34523. attrs.style += ";-webkit-touch-callout:none";
  34524. }
  34525. if (parseInt(styleObj.width) > windowWidth) {
  34526. styleObj.height = void 0;
  34527. }
  34528. if (!isNaN(parseInt(styleObj.width))) {
  34529. node2.w = "T";
  34530. }
  34531. if (!isNaN(parseInt(styleObj.height)) && (!styleObj.height.includes("%") || parent && (parent.attrs.style || "").includes("height"))) {
  34532. node2.h = "T";
  34533. }
  34534. if (node2.w && node2.h && styleObj["object-fit"]) {
  34535. if (styleObj["object-fit"] === "contain") {
  34536. node2.m = "aspectFit";
  34537. } else if (styleObj["object-fit"] === "cover") {
  34538. node2.m = "aspectFill";
  34539. }
  34540. }
  34541. } else if (node2.name === "svg") {
  34542. siblings.push(node2);
  34543. this.stack.push(node2);
  34544. this.popNode();
  34545. return;
  34546. }
  34547. for (const key in styleObj) {
  34548. if (styleObj[key]) {
  34549. attrs.style += `;${key}:${styleObj[key].replace(" !important", "")}`;
  34550. }
  34551. }
  34552. attrs.style = attrs.style.substr(1) || void 0;
  34553. } else {
  34554. if ((node2.name === "pre" || (attrs.style || "").includes("white-space") && attrs.style.includes("pre")) && this.pre !== 2) {
  34555. this.pre = node2.pre = 1;
  34556. }
  34557. node2.children = [];
  34558. this.stack.push(node2);
  34559. }
  34560. siblings.push(node2);
  34561. };
  34562. Parser.prototype.onCloseTag = function(name2) {
  34563. name2 = this.xml ? name2 : name2.toLowerCase();
  34564. let i2;
  34565. for (i2 = this.stack.length; i2--; ) {
  34566. if (this.stack[i2].name === name2)
  34567. break;
  34568. }
  34569. if (i2 !== -1) {
  34570. while (this.stack.length > i2) {
  34571. this.popNode();
  34572. }
  34573. } else if (name2 === "p" || name2 === "br") {
  34574. const siblings = this.stack.length ? this.stack[this.stack.length - 1].children : this.nodes;
  34575. siblings.push({
  34576. name: name2,
  34577. attrs: {
  34578. class: tagSelector[name2] || "",
  34579. style: this.tagStyle[name2] || ""
  34580. }
  34581. });
  34582. }
  34583. };
  34584. Parser.prototype.popNode = function() {
  34585. const node2 = this.stack.pop();
  34586. let attrs = node2.attrs;
  34587. const children = node2.children;
  34588. const parent = this.stack[this.stack.length - 1];
  34589. const siblings = parent ? parent.children : this.nodes;
  34590. if (!this.hook(node2) || config.ignoreTags[node2.name]) {
  34591. if (node2.name === "title" && children.length && children[0].type === "text" && this.options.setTitle) {
  34592. uni.setNavigationBarTitle({
  34593. title: children[0].text
  34594. });
  34595. }
  34596. siblings.pop();
  34597. return;
  34598. }
  34599. if (node2.pre && this.pre !== 2) {
  34600. this.pre = node2.pre = void 0;
  34601. for (let i2 = this.stack.length; i2--; ) {
  34602. if (this.stack[i2].pre) {
  34603. this.pre = 1;
  34604. }
  34605. }
  34606. }
  34607. const styleObj = {};
  34608. if (node2.name === "svg") {
  34609. if (this.xml > 1) {
  34610. this.xml--;
  34611. return;
  34612. }
  34613. let src = "";
  34614. const style = attrs.style;
  34615. attrs.style = "";
  34616. attrs.xmlns = "http://www.w3.org/2000/svg";
  34617. (function traversal(node3) {
  34618. if (node3.type === "text") {
  34619. src += node3.text;
  34620. return;
  34621. }
  34622. const name2 = config.svgDict[node3.name] || node3.name;
  34623. if (name2 === "foreignObject") {
  34624. for (const child of node3.children || []) {
  34625. if (child.attrs && !child.attrs.xmlns) {
  34626. child.attrs.xmlns = "http://www.w3.org/1999/xhtml";
  34627. break;
  34628. }
  34629. }
  34630. }
  34631. src += "<" + name2;
  34632. for (const item in node3.attrs) {
  34633. const val = node3.attrs[item];
  34634. if (val) {
  34635. src += ` ${config.svgDict[item] || item}="${val.replace(/"/g, "")}"`;
  34636. }
  34637. }
  34638. if (!node3.children) {
  34639. src += "/>";
  34640. } else {
  34641. src += ">";
  34642. for (let i2 = 0; i2 < node3.children.length; i2++) {
  34643. traversal(node3.children[i2]);
  34644. }
  34645. src += "</" + name2 + ">";
  34646. }
  34647. })(node2);
  34648. node2.name = "img";
  34649. node2.attrs = {
  34650. src: "data:image/svg+xml;utf8," + src.replace(/#/g, "%23"),
  34651. style,
  34652. ignore: "T"
  34653. };
  34654. node2.children = void 0;
  34655. this.xml = false;
  34656. config.ignoreTags.style = true;
  34657. return;
  34658. }
  34659. if (attrs.align) {
  34660. if (node2.name === "table") {
  34661. if (attrs.align === "center") {
  34662. styleObj["margin-inline-start"] = styleObj["margin-inline-end"] = "auto";
  34663. } else {
  34664. styleObj.float = attrs.align;
  34665. }
  34666. } else {
  34667. styleObj["text-align"] = attrs.align;
  34668. }
  34669. attrs.align = void 0;
  34670. }
  34671. if (attrs.dir) {
  34672. styleObj.direction = attrs.dir;
  34673. attrs.dir = void 0;
  34674. }
  34675. if (node2.name === "font") {
  34676. if (attrs.color) {
  34677. styleObj.color = attrs.color;
  34678. attrs.color = void 0;
  34679. }
  34680. if (attrs.face) {
  34681. styleObj["font-family"] = attrs.face;
  34682. attrs.face = void 0;
  34683. }
  34684. if (attrs.size) {
  34685. let size = parseInt(attrs.size);
  34686. if (!isNaN(size)) {
  34687. if (size < 1) {
  34688. size = 1;
  34689. } else if (size > 7) {
  34690. size = 7;
  34691. }
  34692. styleObj["font-size"] = ["x-small", "small", "medium", "large", "x-large", "xx-large", "xxx-large"][size - 1];
  34693. }
  34694. attrs.size = void 0;
  34695. }
  34696. }
  34697. if ((attrs.class || "").includes("align-center")) {
  34698. styleObj["text-align"] = "center";
  34699. }
  34700. Object.assign(styleObj, this.parseStyle(node2));
  34701. if (node2.name !== "table" && parseInt(styleObj.width) > windowWidth) {
  34702. styleObj["max-width"] = "100%";
  34703. styleObj["box-sizing"] = "border-box";
  34704. }
  34705. if (config.blockTags[node2.name]) {
  34706. node2.name = "div";
  34707. } else if (!config.trustTags[node2.name] && !this.xml) {
  34708. node2.name = "span";
  34709. }
  34710. if (node2.name === "a" || node2.name === "ad" || node2.name === "iframe") {
  34711. this.expose();
  34712. } else if (node2.name === "video") {
  34713. if ((styleObj.height || "").includes("auto")) {
  34714. styleObj.height = void 0;
  34715. }
  34716. let str = '<video style="width:100%;height:100%"';
  34717. for (const item in attrs) {
  34718. if (attrs[item]) {
  34719. str += " " + item + '="' + attrs[item] + '"';
  34720. }
  34721. }
  34722. if (this.options.pauseVideo) {
  34723. str += ` onplay="this.dispatchEvent(new CustomEvent('vplay',{bubbles:!0}));for(var e=document.getElementsByTagName('video'),t=0;t<e.length;t++)e[t]!=this&&e[t].pause()"`;
  34724. }
  34725. str += ">";
  34726. for (let i2 = 0; i2 < node2.src.length; i2++) {
  34727. str += '<source src="' + node2.src[i2] + '">';
  34728. }
  34729. str += "</video>";
  34730. node2.html = str;
  34731. } else if ((node2.name === "ul" || node2.name === "ol") && node2.c) {
  34732. const types2 = {
  34733. a: "lower-alpha",
  34734. A: "upper-alpha",
  34735. i: "lower-roman",
  34736. I: "upper-roman"
  34737. };
  34738. if (types2[attrs.type]) {
  34739. attrs.style += ";list-style-type:" + types2[attrs.type];
  34740. attrs.type = void 0;
  34741. }
  34742. for (let i2 = children.length; i2--; ) {
  34743. if (children[i2].name === "li") {
  34744. children[i2].c = 1;
  34745. }
  34746. }
  34747. } else if (node2.name === "table") {
  34748. let padding = parseFloat(attrs.cellpadding);
  34749. let spacing = parseFloat(attrs.cellspacing);
  34750. const border = parseFloat(attrs.border);
  34751. const bordercolor = styleObj["border-color"];
  34752. const borderstyle = styleObj["border-style"];
  34753. if (node2.c) {
  34754. if (isNaN(padding)) {
  34755. padding = 2;
  34756. }
  34757. if (isNaN(spacing)) {
  34758. spacing = 2;
  34759. }
  34760. }
  34761. if (border) {
  34762. attrs.style += `;border:${border}px ${borderstyle || "solid"} ${bordercolor || "gray"}`;
  34763. }
  34764. if (node2.flag && node2.c) {
  34765. styleObj.display = "grid";
  34766. if (styleObj["border-collapse"] === "collapse") {
  34767. styleObj["border-collapse"] = void 0;
  34768. spacing = 0;
  34769. }
  34770. if (spacing) {
  34771. styleObj["grid-gap"] = spacing + "px";
  34772. styleObj.padding = spacing + "px";
  34773. } else if (border) {
  34774. attrs.style += ";border-left:0;border-top:0";
  34775. }
  34776. const width = [];
  34777. const trList = [];
  34778. const cells = [];
  34779. const map = {};
  34780. (function traversal(nodes) {
  34781. for (let i2 = 0; i2 < nodes.length; i2++) {
  34782. if (nodes[i2].name === "tr") {
  34783. trList.push(nodes[i2]);
  34784. } else if (nodes[i2].name === "colgroup") {
  34785. let colI = 1;
  34786. for (const col of nodes[i2].children || []) {
  34787. if (col.name === "col") {
  34788. const style = col.attrs.style || "";
  34789. const start = style.indexOf("width") ? style.indexOf(";width") : 0;
  34790. if (start !== -1) {
  34791. let end = style.indexOf(";", start + 6);
  34792. if (end === -1) {
  34793. end = style.length;
  34794. }
  34795. width[colI] = style.substring(start ? start + 7 : 6, end);
  34796. }
  34797. colI += 1;
  34798. }
  34799. }
  34800. } else {
  34801. traversal(nodes[i2].children || []);
  34802. }
  34803. }
  34804. })(children);
  34805. for (let row = 1; row <= trList.length; row++) {
  34806. let col = 1;
  34807. for (let j2 = 0; j2 < trList[row - 1].children.length; j2++) {
  34808. const td = trList[row - 1].children[j2];
  34809. if (td.name === "td" || td.name === "th") {
  34810. while (map[row + "." + col]) {
  34811. col++;
  34812. }
  34813. let style = td.attrs.style || "";
  34814. let start = style.indexOf("width") ? style.indexOf(";width") : 0;
  34815. if (start !== -1) {
  34816. let end = style.indexOf(";", start + 6);
  34817. if (end === -1) {
  34818. end = style.length;
  34819. }
  34820. if (!td.attrs.colspan) {
  34821. width[col] = style.substring(start ? start + 7 : 6, end);
  34822. }
  34823. style = style.substr(0, start) + style.substr(end);
  34824. }
  34825. style += ";display:flex";
  34826. start = style.indexOf("vertical-align");
  34827. if (start !== -1) {
  34828. const val = style.substr(start + 15, 10);
  34829. if (val.includes("middle")) {
  34830. style += ";align-items:center";
  34831. } else if (val.includes("bottom")) {
  34832. style += ";align-items:flex-end";
  34833. }
  34834. } else {
  34835. style += ";align-items:center";
  34836. }
  34837. start = style.indexOf("text-align");
  34838. if (start !== -1) {
  34839. const val = style.substr(start + 11, 10);
  34840. if (val.includes("center")) {
  34841. style += ";justify-content: center";
  34842. } else if (val.includes("right")) {
  34843. style += ";justify-content: right";
  34844. }
  34845. }
  34846. style = (border ? `;border:${border}px ${borderstyle || "solid"} ${bordercolor || "gray"}` + (spacing ? "" : ";border-right:0;border-bottom:0") : "") + (padding ? `;padding:${padding}px` : "") + ";" + style;
  34847. if (td.attrs.colspan) {
  34848. style += `;grid-column-start:${col};grid-column-end:${col + parseInt(td.attrs.colspan)}`;
  34849. if (!td.attrs.rowspan) {
  34850. style += `;grid-row-start:${row};grid-row-end:${row + 1}`;
  34851. }
  34852. col += parseInt(td.attrs.colspan) - 1;
  34853. }
  34854. if (td.attrs.rowspan) {
  34855. style += `;grid-row-start:${row};grid-row-end:${row + parseInt(td.attrs.rowspan)}`;
  34856. if (!td.attrs.colspan) {
  34857. style += `;grid-column-start:${col};grid-column-end:${col + 1}`;
  34858. }
  34859. for (let rowspan = 1; rowspan < td.attrs.rowspan; rowspan++) {
  34860. for (let colspan = 0; colspan < (td.attrs.colspan || 1); colspan++) {
  34861. map[row + rowspan + "." + (col - colspan)] = 1;
  34862. }
  34863. }
  34864. }
  34865. if (style) {
  34866. td.attrs.style = style;
  34867. }
  34868. cells.push(td);
  34869. col++;
  34870. }
  34871. }
  34872. if (row === 1) {
  34873. let temp = "";
  34874. for (let i2 = 1; i2 < col; i2++) {
  34875. temp += (width[i2] ? width[i2] : "auto") + " ";
  34876. }
  34877. styleObj["grid-template-columns"] = temp;
  34878. }
  34879. }
  34880. node2.children = cells;
  34881. } else {
  34882. if (node2.c) {
  34883. styleObj.display = "table";
  34884. }
  34885. if (!isNaN(spacing)) {
  34886. styleObj["border-spacing"] = spacing + "px";
  34887. }
  34888. if (border || padding) {
  34889. (function traversal(nodes) {
  34890. for (let i2 = 0; i2 < nodes.length; i2++) {
  34891. const td = nodes[i2];
  34892. if (td.name === "th" || td.name === "td") {
  34893. if (border) {
  34894. td.attrs.style = `border:${border}px ${borderstyle || "solid"} ${bordercolor || "gray"};${td.attrs.style || ""}`;
  34895. }
  34896. if (padding) {
  34897. td.attrs.style = `padding:${padding}px;${td.attrs.style || ""}`;
  34898. }
  34899. } else if (td.children) {
  34900. traversal(td.children);
  34901. }
  34902. }
  34903. })(children);
  34904. }
  34905. }
  34906. if (this.options.scrollTable && !(attrs.style || "").includes("inline")) {
  34907. const table = Object.assign({}, node2);
  34908. node2.name = "div";
  34909. node2.attrs = {
  34910. style: "overflow:auto"
  34911. };
  34912. node2.children = [table];
  34913. attrs = table.attrs;
  34914. }
  34915. } else if ((node2.name === "tbody" || node2.name === "tr") && node2.flag && node2.c) {
  34916. node2.flag = void 0;
  34917. (function traversal(nodes) {
  34918. for (let i2 = 0; i2 < nodes.length; i2++) {
  34919. if (nodes[i2].name === "td") {
  34920. for (const style of ["color", "background", "background-color"]) {
  34921. if (styleObj[style]) {
  34922. nodes[i2].attrs.style = style + ":" + styleObj[style] + ";" + (nodes[i2].attrs.style || "");
  34923. }
  34924. }
  34925. } else {
  34926. traversal(nodes[i2].children || []);
  34927. }
  34928. }
  34929. })(children);
  34930. } else if ((node2.name === "td" || node2.name === "th") && (attrs.colspan || attrs.rowspan)) {
  34931. for (let i2 = this.stack.length; i2--; ) {
  34932. if (this.stack[i2].name === "table" || this.stack[i2].name === "tbody" || this.stack[i2].name === "tr") {
  34933. this.stack[i2].flag = 1;
  34934. }
  34935. }
  34936. } else if (node2.name === "ruby") {
  34937. node2.name = "span";
  34938. for (let i2 = 0; i2 < children.length - 1; i2++) {
  34939. if (children[i2].type === "text" && children[i2 + 1].name === "rt") {
  34940. children[i2] = {
  34941. name: "div",
  34942. attrs: {
  34943. style: "display:inline-block;text-align:center"
  34944. },
  34945. children: [{
  34946. name: "div",
  34947. attrs: {
  34948. style: "font-size:50%;" + (children[i2 + 1].attrs.style || "")
  34949. },
  34950. children: children[i2 + 1].children
  34951. }, children[i2]]
  34952. };
  34953. children.splice(i2 + 1, 1);
  34954. }
  34955. }
  34956. } else if (node2.c) {
  34957. (function traversal(node3) {
  34958. node3.c = 2;
  34959. for (let i2 = node3.children.length; i2--; ) {
  34960. const child = node3.children[i2];
  34961. if (child.name && (config.inlineTags[child.name] || (child.attrs.style || "").includes("inline") && child.children) && !child.c) {
  34962. traversal(child);
  34963. }
  34964. if (!child.c || child.name === "table") {
  34965. node3.c = 1;
  34966. }
  34967. }
  34968. })(node2);
  34969. }
  34970. if ((styleObj.display || "").includes("flex") && !node2.c) {
  34971. for (let i2 = children.length; i2--; ) {
  34972. const item = children[i2];
  34973. if (item.f) {
  34974. item.attrs.style = (item.attrs.style || "") + item.f;
  34975. item.f = void 0;
  34976. }
  34977. }
  34978. }
  34979. const flex = parent && ((parent.attrs.style || "").includes("flex") || (parent.attrs.style || "").includes("grid")) && !node2.c;
  34980. if (flex) {
  34981. node2.f = ";max-width:100%";
  34982. }
  34983. if (children.length >= 50 && node2.c && !(styleObj.display || "").includes("flex")) {
  34984. mergeNodes(children);
  34985. }
  34986. for (const key in styleObj) {
  34987. if (styleObj[key]) {
  34988. const val = `;${key}:${styleObj[key].replace(" !important", "")}`;
  34989. if (flex && (key.includes("flex") && key !== "flex-direction" || key === "align-self" || key.includes("grid") || styleObj[key][0] === "-" || key.includes("width") && val.includes("%"))) {
  34990. node2.f += val;
  34991. if (key === "width") {
  34992. attrs.style += ";width:100%";
  34993. }
  34994. } else {
  34995. attrs.style += val;
  34996. }
  34997. }
  34998. }
  34999. attrs.style = attrs.style.substr(1) || void 0;
  35000. };
  35001. Parser.prototype.onText = function(text) {
  35002. if (!this.pre) {
  35003. let trim2 = "";
  35004. let flag2;
  35005. for (let i2 = 0, len = text.length; i2 < len; i2++) {
  35006. if (!blankChar[text[i2]]) {
  35007. trim2 += text[i2];
  35008. } else {
  35009. if (trim2[trim2.length - 1] !== " ") {
  35010. trim2 += " ";
  35011. }
  35012. if (text[i2] === "\n" && !flag2) {
  35013. flag2 = true;
  35014. }
  35015. }
  35016. }
  35017. if (trim2 === " ") {
  35018. if (flag2)
  35019. return;
  35020. else {
  35021. const parent = this.stack[this.stack.length - 1];
  35022. if (parent && parent.name[0] === "t")
  35023. return;
  35024. }
  35025. }
  35026. text = trim2;
  35027. }
  35028. const node2 = /* @__PURE__ */ Object.create(null);
  35029. node2.type = "text";
  35030. node2.text = decodeEntity(text);
  35031. if (this.hook(node2)) {
  35032. const siblings = this.stack.length ? this.stack[this.stack.length - 1].children : this.nodes;
  35033. siblings.push(node2);
  35034. }
  35035. };
  35036. function Lexer(handler) {
  35037. this.handler = handler;
  35038. }
  35039. Lexer.prototype.parse = function(content) {
  35040. this.content = content || "";
  35041. this.i = 0;
  35042. this.start = 0;
  35043. this.state = this.text;
  35044. for (let len = this.content.length; this.i !== -1 && this.i < len; ) {
  35045. this.state();
  35046. }
  35047. };
  35048. Lexer.prototype.checkClose = function(method) {
  35049. const selfClose = this.content[this.i] === "/";
  35050. if (this.content[this.i] === ">" || selfClose && this.content[this.i + 1] === ">") {
  35051. if (method) {
  35052. this.handler[method](this.content.substring(this.start, this.i));
  35053. }
  35054. this.i += selfClose ? 2 : 1;
  35055. this.start = this.i;
  35056. this.handler.onOpenTag(selfClose);
  35057. if (this.handler.tagName === "script") {
  35058. this.i = this.content.indexOf("</", this.i);
  35059. if (this.i !== -1) {
  35060. this.i += 2;
  35061. this.start = this.i;
  35062. }
  35063. this.state = this.endTag;
  35064. } else {
  35065. this.state = this.text;
  35066. }
  35067. return true;
  35068. }
  35069. return false;
  35070. };
  35071. Lexer.prototype.text = function() {
  35072. this.i = this.content.indexOf("<", this.i);
  35073. if (this.i === -1) {
  35074. if (this.start < this.content.length) {
  35075. this.handler.onText(this.content.substring(this.start, this.content.length));
  35076. }
  35077. return;
  35078. }
  35079. const c2 = this.content[this.i + 1];
  35080. if (c2 >= "a" && c2 <= "z" || c2 >= "A" && c2 <= "Z") {
  35081. if (this.start !== this.i) {
  35082. this.handler.onText(this.content.substring(this.start, this.i));
  35083. }
  35084. this.start = ++this.i;
  35085. this.state = this.tagName;
  35086. } else if (c2 === "/" || c2 === "!" || c2 === "?") {
  35087. if (this.start !== this.i) {
  35088. this.handler.onText(this.content.substring(this.start, this.i));
  35089. }
  35090. const next = this.content[this.i + 2];
  35091. if (c2 === "/" && (next >= "a" && next <= "z" || next >= "A" && next <= "Z")) {
  35092. this.i += 2;
  35093. this.start = this.i;
  35094. this.state = this.endTag;
  35095. return;
  35096. }
  35097. let end = "-->";
  35098. if (c2 !== "!" || this.content[this.i + 2] !== "-" || this.content[this.i + 3] !== "-") {
  35099. end = ">";
  35100. }
  35101. this.i = this.content.indexOf(end, this.i);
  35102. if (this.i !== -1) {
  35103. this.i += end.length;
  35104. this.start = this.i;
  35105. }
  35106. } else {
  35107. this.i++;
  35108. }
  35109. };
  35110. Lexer.prototype.tagName = function() {
  35111. if (blankChar[this.content[this.i]]) {
  35112. this.handler.onTagName(this.content.substring(this.start, this.i));
  35113. while (blankChar[this.content[++this.i]])
  35114. ;
  35115. if (this.i < this.content.length && !this.checkClose()) {
  35116. this.start = this.i;
  35117. this.state = this.attrName;
  35118. }
  35119. } else if (!this.checkClose("onTagName")) {
  35120. this.i++;
  35121. }
  35122. };
  35123. Lexer.prototype.attrName = function() {
  35124. let c2 = this.content[this.i];
  35125. if (blankChar[c2] || c2 === "=") {
  35126. this.handler.onAttrName(this.content.substring(this.start, this.i));
  35127. let needVal = c2 === "=";
  35128. const len = this.content.length;
  35129. while (++this.i < len) {
  35130. c2 = this.content[this.i];
  35131. if (!blankChar[c2]) {
  35132. if (this.checkClose())
  35133. return;
  35134. if (needVal) {
  35135. this.start = this.i;
  35136. this.state = this.attrVal;
  35137. return;
  35138. }
  35139. if (this.content[this.i] === "=") {
  35140. needVal = true;
  35141. } else {
  35142. this.start = this.i;
  35143. this.state = this.attrName;
  35144. return;
  35145. }
  35146. }
  35147. }
  35148. } else if (!this.checkClose("onAttrName")) {
  35149. this.i++;
  35150. }
  35151. };
  35152. Lexer.prototype.attrVal = function() {
  35153. const c2 = this.content[this.i];
  35154. const len = this.content.length;
  35155. if (c2 === '"' || c2 === "'") {
  35156. this.start = ++this.i;
  35157. this.i = this.content.indexOf(c2, this.i);
  35158. if (this.i === -1)
  35159. return;
  35160. this.handler.onAttrVal(this.content.substring(this.start, this.i));
  35161. } else {
  35162. for (; this.i < len; this.i++) {
  35163. if (blankChar[this.content[this.i]]) {
  35164. this.handler.onAttrVal(this.content.substring(this.start, this.i));
  35165. break;
  35166. } else if (this.checkClose("onAttrVal"))
  35167. return;
  35168. }
  35169. }
  35170. while (blankChar[this.content[++this.i]])
  35171. ;
  35172. if (this.i < len && !this.checkClose()) {
  35173. this.start = this.i;
  35174. this.state = this.attrName;
  35175. }
  35176. };
  35177. Lexer.prototype.endTag = function() {
  35178. const c2 = this.content[this.i];
  35179. if (blankChar[c2] || c2 === ">" || c2 === "/") {
  35180. this.handler.onCloseTag(this.content.substring(this.start, this.i));
  35181. if (c2 !== ">") {
  35182. this.i = this.content.indexOf(">", this.i);
  35183. if (this.i === -1)
  35184. return;
  35185. }
  35186. this.start = ++this.i;
  35187. this.state = this.text;
  35188. } else {
  35189. this.i++;
  35190. }
  35191. };
  35192. const plugins = [];
  35193. const _sfc_main$W = {
  35194. name: "u-parse",
  35195. data() {
  35196. return {
  35197. nodes: []
  35198. };
  35199. },
  35200. props: {
  35201. containerStyle: {
  35202. type: String,
  35203. default: ""
  35204. },
  35205. content: {
  35206. type: String,
  35207. default: ""
  35208. },
  35209. copyLink: {
  35210. type: [Boolean, String],
  35211. default: true
  35212. },
  35213. domain: String,
  35214. errorImg: {
  35215. type: String,
  35216. default: ""
  35217. },
  35218. lazyLoad: {
  35219. type: [Boolean, String],
  35220. default: false
  35221. },
  35222. loadingImg: {
  35223. type: String,
  35224. default: ""
  35225. },
  35226. pauseVideo: {
  35227. type: [Boolean, String],
  35228. default: true
  35229. },
  35230. previewImg: {
  35231. type: [Boolean, String],
  35232. default: true
  35233. },
  35234. scrollTable: [Boolean, String],
  35235. selectable: [Boolean, String],
  35236. setTitle: {
  35237. type: [Boolean, String],
  35238. default: true
  35239. },
  35240. showImgMenu: {
  35241. type: [Boolean, String],
  35242. default: true
  35243. },
  35244. tagStyle: Object,
  35245. useAnchor: [Boolean, Number]
  35246. },
  35247. emits: ["load", "ready", "imgTap", "linkTap", "play", "error"],
  35248. components: {
  35249. node
  35250. },
  35251. watch: {
  35252. content(content) {
  35253. this.setContent(content);
  35254. }
  35255. },
  35256. created() {
  35257. this.plugins = [];
  35258. for (let i2 = plugins.length; i2--; ) {
  35259. this.plugins.push(new plugins[i2](this));
  35260. }
  35261. },
  35262. mounted() {
  35263. if (this.content && !this.nodes.length) {
  35264. this.setContent(this.content);
  35265. }
  35266. },
  35267. beforeUnmount() {
  35268. this._hook("onDetached");
  35269. },
  35270. methods: {
  35271. /**
  35272. * @description 将锚点跳转的范围限定在一个 scroll-view 内
  35273. * @param {Object} page scroll-view 所在页面的示例
  35274. * @param {String} selector scroll-view 的选择器
  35275. * @param {String} scrollTop scroll-view scroll-top 属性绑定的变量名
  35276. */
  35277. in(page2, selector, scrollTop) {
  35278. if (page2 && selector && scrollTop) {
  35279. this._in = {
  35280. page: page2,
  35281. selector,
  35282. scrollTop
  35283. };
  35284. }
  35285. },
  35286. /**
  35287. * @description 锚点跳转
  35288. * @param {String} id 要跳转的锚点 id
  35289. * @param {Number} offset 跳转位置的偏移量
  35290. * @returns {Promise}
  35291. */
  35292. navigateTo(id, offset) {
  35293. return new Promise((resolve, reject) => {
  35294. if (!this.useAnchor) {
  35295. reject(Error("Anchor is disabled"));
  35296. return;
  35297. }
  35298. offset = offset || parseInt(this.useAnchor) || 0;
  35299. let deep = " ";
  35300. const selector = uni.createSelectorQuery().in(this._in ? this._in.page : this).select((this._in ? this._in.selector : "._root") + (id ? `${deep}#${id}` : "")).boundingClientRect();
  35301. if (this._in) {
  35302. selector.select(this._in.selector).scrollOffset().select(this._in.selector).boundingClientRect();
  35303. } else {
  35304. selector.selectViewport().scrollOffset();
  35305. }
  35306. selector.exec((res) => {
  35307. if (!res[0]) {
  35308. reject(Error("Label not found"));
  35309. return;
  35310. }
  35311. const scrollTop = res[1].scrollTop + res[0].top - (res[2] ? res[2].top : 0) + offset;
  35312. if (this._in) {
  35313. this._in.page[this._in.scrollTop] = scrollTop;
  35314. } else {
  35315. uni.pageScrollTo({
  35316. scrollTop,
  35317. duration: 300
  35318. });
  35319. }
  35320. resolve();
  35321. });
  35322. });
  35323. },
  35324. /**
  35325. * @description 获取文本内容
  35326. * @return {String}
  35327. */
  35328. getText(nodes) {
  35329. let text = "";
  35330. (function traversal(nodes2) {
  35331. for (let i2 = 0; i2 < nodes2.length; i2++) {
  35332. const node2 = nodes2[i2];
  35333. if (node2.type === "text") {
  35334. text += node2.text.replace(/&amp;/g, "&");
  35335. } else if (node2.name === "br") {
  35336. text += "\n";
  35337. } else {
  35338. const isBlock = node2.name === "p" || node2.name === "div" || node2.name === "tr" || node2.name === "li" || node2.name[0] === "h" && node2.name[1] > "0" && node2.name[1] < "7";
  35339. if (isBlock && text && text[text.length - 1] !== "\n") {
  35340. text += "\n";
  35341. }
  35342. if (node2.children) {
  35343. traversal(node2.children);
  35344. }
  35345. if (isBlock && text[text.length - 1] !== "\n") {
  35346. text += "\n";
  35347. } else if (node2.name === "td" || node2.name === "th") {
  35348. text += " ";
  35349. }
  35350. }
  35351. }
  35352. })(nodes || this.nodes);
  35353. return text;
  35354. },
  35355. /**
  35356. * @description 获取内容大小和位置
  35357. * @return {Promise}
  35358. */
  35359. getRect() {
  35360. return new Promise((resolve, reject) => {
  35361. uni.createSelectorQuery().in(this).select("#_root").boundingClientRect().exec((res) => res[0] ? resolve(res[0]) : reject(Error("Root label not found")));
  35362. });
  35363. },
  35364. /**
  35365. * @description 暂停播放媒体
  35366. */
  35367. pauseMedia() {
  35368. for (let i2 = (this._videos || []).length; i2--; ) {
  35369. this._videos[i2].pause();
  35370. }
  35371. const command = 'for(var e=document.getElementsByTagName("video"),i=e.length;i--;)e[i].pause()';
  35372. let page2 = this.$parent;
  35373. while (!page2.$scope)
  35374. page2 = page2.$parent;
  35375. page2.$scope.$getAppWebview().evalJS(command);
  35376. },
  35377. /**
  35378. * @description 设置媒体播放速率
  35379. * @param {Number} rate 播放速率
  35380. */
  35381. setPlaybackRate(rate) {
  35382. this.playbackRate = rate;
  35383. for (let i2 = (this._videos || []).length; i2--; ) {
  35384. this._videos[i2].playbackRate(rate);
  35385. }
  35386. const command = 'for(var e=document.getElementsByTagName("video"),i=e.length;i--;)e[i].playbackRate=' + rate;
  35387. let page2 = this.$parent;
  35388. while (!page2.$scope)
  35389. page2 = page2.$parent;
  35390. page2.$scope.$getAppWebview().evalJS(command);
  35391. },
  35392. /**
  35393. * @description 设置内容
  35394. * @param {String} content html 内容
  35395. * @param {Boolean} append 是否在尾部追加
  35396. */
  35397. setContent(content, append) {
  35398. if (!append || !this.imgList) {
  35399. this.imgList = [];
  35400. }
  35401. const nodes = new Parser(this).parse(content);
  35402. this.$set(this, "nodes", append ? (this.nodes || []).concat(nodes) : nodes);
  35403. this._videos = [];
  35404. this.$nextTick(() => {
  35405. this._hook("onLoad");
  35406. this.$emit("load");
  35407. });
  35408. if (this.lazyLoad || this.imgList._unloadimgs < this.imgList.length / 2) {
  35409. let height = 0;
  35410. const callback = (rect) => {
  35411. if (!rect || !rect.height)
  35412. rect = {};
  35413. if (rect.height === height) {
  35414. this.$emit("ready", rect);
  35415. } else {
  35416. height = rect.height;
  35417. setTimeout(() => {
  35418. this.getRect().then(callback).catch(callback);
  35419. }, 350);
  35420. }
  35421. };
  35422. this.getRect().then(callback).catch(callback);
  35423. } else {
  35424. if (!this.imgList._unloadimgs) {
  35425. this.getRect().then((rect) => {
  35426. this.$emit("ready", rect);
  35427. }).catch(() => {
  35428. this.$emit("ready", {});
  35429. });
  35430. }
  35431. }
  35432. },
  35433. /**
  35434. * @description 调用插件钩子函数
  35435. */
  35436. _hook(name2) {
  35437. for (let i2 = plugins.length; i2--; ) {
  35438. if (this.plugins[i2][name2]) {
  35439. this.plugins[i2][name2]();
  35440. }
  35441. }
  35442. }
  35443. }
  35444. };
  35445. function _sfc_render$V(_ctx, _cache, $props, $setup, $data, $options) {
  35446. const _component_node = vue.resolveComponent("node");
  35447. return vue.openBlock(), vue.createElementBlock(
  35448. "view",
  35449. {
  35450. id: "_root",
  35451. class: vue.normalizeClass(($props.selectable ? "_select " : "") + "_root"),
  35452. style: vue.normalizeStyle($props.containerStyle)
  35453. },
  35454. [
  35455. !$data.nodes[0] ? vue.renderSlot(_ctx.$slots, "default", { key: 0 }, void 0, true) : (vue.openBlock(), vue.createBlock(_component_node, {
  35456. key: 1,
  35457. childs: $data.nodes,
  35458. opts: [$props.lazyLoad, $props.loadingImg, $props.errorImg, $props.showImgMenu, $props.selectable],
  35459. name: "span"
  35460. }, null, 8, ["childs", "opts"]))
  35461. ],
  35462. 6
  35463. /* CLASS, STYLE */
  35464. );
  35465. }
  35466. const uParse = /* @__PURE__ */ _export_sfc(_sfc_main$W, [["render", _sfc_render$V], ["__scopeId", "data-v-cd79d006"], ["__file", "C:/Users/EDY/Desktop/项目/shuibei/uni_modules/uview-plus/components/u-parse/u-parse.vue"]]);
  35467. const __vite_glob_0_74 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
  35468. __proto__: null,
  35469. default: uParse
  35470. }, Symbol.toStringTag, { value: "Module" }));
  35471. const props$w = {
  35472. props: {
  35473. // PDF文件地址
  35474. src: {
  35475. type: String,
  35476. default: ""
  35477. },
  35478. // 组件高度
  35479. height: {
  35480. type: String,
  35481. default: "700px"
  35482. },
  35483. // pdfjs资源域名
  35484. baseUrl: {
  35485. type: String,
  35486. default: "https://uview-plus.jiangruyi.com/h5"
  35487. }
  35488. }
  35489. };
  35490. const _sfc_main$V = {
  35491. name: "up-pdf-reader",
  35492. mixins: [props$w],
  35493. data() {
  35494. return {
  35495. baseUrlInner: "https://uview-plus.jiangruyi.com/h5",
  35496. viewerUrl: ""
  35497. };
  35498. },
  35499. watch: {
  35500. baseUrl: function(val) {
  35501. this.baseUrl = val;
  35502. },
  35503. src: function(val) {
  35504. this.viewerUrl = `${this.baseUrlInner}/static/pdfjs/web/viewer.html?file=` + encodeURIComponent(val);
  35505. }
  35506. },
  35507. mounted() {
  35508. if (this.baseUrl) {
  35509. this.baseUrlInner = this.baseUrl;
  35510. }
  35511. this.viewerUrl = `${this.baseUrlInner}/static/pdfjs/web/viewer.html?file=` + encodeURIComponent(this.src);
  35512. }
  35513. };
  35514. function _sfc_render$U(_ctx, _cache, $props, $setup, $data, $options) {
  35515. return vue.openBlock(), vue.createElementBlock(
  35516. "view",
  35517. {
  35518. class: "up-pdf-reader",
  35519. style: vue.normalizeStyle({ height: _ctx.height })
  35520. },
  35521. [
  35522. vue.createElementVNode("web-view", {
  35523. fullscreen: false,
  35524. src: $data.viewerUrl,
  35525. style: vue.normalizeStyle({ width: "750rpx", height: _ctx.height }),
  35526. "webview-styles": { width: "750rpx", height: _ctx.height },
  35527. frameborder: "0"
  35528. }, null, 12, ["src", "webview-styles"])
  35529. ],
  35530. 4
  35531. /* STYLE */
  35532. );
  35533. }
  35534. const uPdfReader = /* @__PURE__ */ _export_sfc(_sfc_main$V, [["render", _sfc_render$U], ["__scopeId", "data-v-2149504b"], ["__file", "C:/Users/EDY/Desktop/项目/shuibei/uni_modules/uview-plus/components/u-pdf-reader/u-pdf-reader.vue"]]);
  35535. const __vite_glob_0_75 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
  35536. __proto__: null,
  35537. default: uPdfReader
  35538. }, Symbol.toStringTag, { value: "Module" }));
  35539. const props$v = defineMixin({
  35540. props: {}
  35541. });
  35542. const _sfc_main$U = {
  35543. name: "u-picker-column",
  35544. mixins: [mpMixin, mixin, props$v]
  35545. };
  35546. function _sfc_render$T(_ctx, _cache, $props, $setup, $data, $options) {
  35547. return vue.openBlock(), vue.createElementBlock("picker-view-column", null, [
  35548. vue.createElementVNode("view", { class: "u-picker-column" })
  35549. ]);
  35550. }
  35551. const uPickerColumn = /* @__PURE__ */ _export_sfc(_sfc_main$U, [["render", _sfc_render$T], ["__file", "C:/Users/EDY/Desktop/项目/shuibei/uni_modules/uview-plus/components/u-picker-column/u-picker-column.vue"]]);
  35552. const __vite_glob_0_76 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
  35553. __proto__: null,
  35554. default: uPickerColumn
  35555. }, Symbol.toStringTag, { value: "Module" }));
  35556. const _sfc_main$T = {
  35557. name: "u-picker-data",
  35558. props: {
  35559. modelValue: {
  35560. type: [String, Number],
  35561. default: ""
  35562. },
  35563. title: {
  35564. type: String,
  35565. default: ""
  35566. },
  35567. description: {
  35568. type: String,
  35569. default: ""
  35570. },
  35571. options: {
  35572. type: Array,
  35573. default: () => {
  35574. return [];
  35575. }
  35576. },
  35577. valueKey: {
  35578. type: String,
  35579. default: "id"
  35580. },
  35581. labelKey: {
  35582. type: String,
  35583. default: "name"
  35584. }
  35585. },
  35586. data() {
  35587. return {
  35588. show: false,
  35589. current: "",
  35590. defaultIndex: []
  35591. };
  35592. },
  35593. created() {
  35594. if (this.modelValue) {
  35595. this.options.forEach((ele, index2) => {
  35596. if (ele[this.valueKey] == this.modelValue) {
  35597. this.current = ele[this.labelKey];
  35598. this.defaultIndex = [index2];
  35599. }
  35600. });
  35601. }
  35602. },
  35603. watch: {
  35604. modelValue() {
  35605. if (this.modelValue) {
  35606. this.options.forEach((ele, index2) => {
  35607. if (ele[this.valueKey] == this.modelValue) {
  35608. this.current = ele[this.labelKey];
  35609. this.defaultIndex = [index2];
  35610. }
  35611. });
  35612. }
  35613. }
  35614. },
  35615. computed: {
  35616. optionsInner() {
  35617. return [this.options];
  35618. }
  35619. },
  35620. emits: ["update:modelValue", "cancel", "close", "confirm"],
  35621. methods: {
  35622. hideKeyboard() {
  35623. uni.hideKeyboard();
  35624. },
  35625. cancel() {
  35626. this.show = false;
  35627. this.$emit("cancel");
  35628. },
  35629. close() {
  35630. this.$emit("close");
  35631. },
  35632. confirm(e2) {
  35633. const {
  35634. columnIndex,
  35635. index: index2,
  35636. value: value2
  35637. } = e2;
  35638. this.show = false;
  35639. this.$emit("update:modelValue", value2[0][this.valueKey]);
  35640. this.defaultIndex = columnIndex;
  35641. this.current = value2[0][this.labelKey];
  35642. this.$emit("confirm");
  35643. }
  35644. }
  35645. };
  35646. function _sfc_render$S(_ctx, _cache, $props, $setup, $data, $options) {
  35647. const _component_up_input = vue.resolveComponent("up-input");
  35648. const _component_up_picker = vue.resolveComponent("up-picker");
  35649. return vue.openBlock(), vue.createElementBlock("view", { class: "u-picker-data" }, [
  35650. vue.createElementVNode("view", { class: "u-picker-data__trigger" }, [
  35651. vue.renderSlot(_ctx.$slots, "trigger", { current: $data.current }, void 0, true),
  35652. !_ctx.$slots["trigger"] ? (vue.openBlock(), vue.createBlock(_component_up_input, {
  35653. key: 0,
  35654. modelValue: $data.current,
  35655. disabled: "",
  35656. disabledColor: "#ffffff",
  35657. placeholder: $props.title,
  35658. border: "none"
  35659. }, null, 8, ["modelValue", "placeholder"])) : vue.createCommentVNode("v-if", true),
  35660. vue.createElementVNode("view", {
  35661. onClick: _cache[0] || (_cache[0] = ($event) => $data.show = true),
  35662. class: "u-picker-data__trigger__cover"
  35663. })
  35664. ]),
  35665. vue.createVNode(_component_up_picker, {
  35666. show: $data.show,
  35667. columns: $options.optionsInner,
  35668. keyName: $props.labelKey,
  35669. defaultIndex: $data.defaultIndex,
  35670. onConfirm: $options.confirm,
  35671. onCancel: $options.cancel,
  35672. onClose: $options.close
  35673. }, null, 8, ["show", "columns", "keyName", "defaultIndex", "onConfirm", "onCancel", "onClose"])
  35674. ]);
  35675. }
  35676. const uPickerData = /* @__PURE__ */ _export_sfc(_sfc_main$T, [["render", _sfc_render$S], ["__scopeId", "data-v-cdfa3c95"], ["__file", "C:/Users/EDY/Desktop/项目/shuibei/uni_modules/uview-plus/components/u-picker-data/u-picker-data.vue"]]);
  35677. const __vite_glob_0_77 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
  35678. __proto__: null,
  35679. default: uPickerData
  35680. }, Symbol.toStringTag, { value: "Module" }));
  35681. const _sfc_main$S = {
  35682. name: "up-poster",
  35683. props: {
  35684. json: {
  35685. type: Object,
  35686. default: () => ({})
  35687. }
  35688. },
  35689. data() {
  35690. return {
  35691. canvasId: "u-poster-canvas-" + Date.now(),
  35692. showCanvas: false,
  35693. canvasWidth: 0,
  35694. canvasHeight: 0,
  35695. // 二维码相关数据
  35696. qrCodeValue: "",
  35697. qrCodeSize: 200,
  35698. qrCodeShow: false,
  35699. // 存储多个二维码的数据
  35700. qrCodeMap: /* @__PURE__ */ new Map()
  35701. };
  35702. },
  35703. computed: {
  35704. // 根据传入的css生成文本样式
  35705. getTextStyle() {
  35706. return (css) => {
  35707. const style = {};
  35708. if (css.color)
  35709. style.color = css.color;
  35710. if (css.fontSize)
  35711. style.fontSize = css.fontSize;
  35712. if (css.fontWeight)
  35713. style.fontWeight = css.fontWeight;
  35714. if (css.lineHeight)
  35715. style.lineHeight = css.lineHeight;
  35716. if (css.textAlign)
  35717. style.textAlign = css.textAlign;
  35718. return style;
  35719. };
  35720. }
  35721. },
  35722. methods: {
  35723. /**
  35724. * 导出海报图片
  35725. * @description 根据json配置生成海报并导出为临时图片路径
  35726. * @returns {Promise<Object>} 返回包含图片信息的对象
  35727. * @author jry ijry@qq.com
  35728. */
  35729. async exportImage() {
  35730. return new Promise(async (resolve, reject) => {
  35731. try {
  35732. const posterSize = this.json.css;
  35733. const width = this.convertRpxToPx(posterSize.width || "750rpx");
  35734. const height = this.convertRpxToPx(posterSize.height || "1114rpx");
  35735. this.canvasWidth = width;
  35736. this.canvasHeight = height;
  35737. this.showCanvas = true;
  35738. await this.$nextTick();
  35739. const ctx = uni.createCanvasContext(this.canvasId, this);
  35740. if (posterSize.background) {
  35741. if (posterSize.background.includes("linear-gradient") || posterSize.background.includes("radial-gradient")) {
  35742. this.drawGradientBackground(ctx, posterSize, 0, 0, width, height);
  35743. } else {
  35744. ctx.setFillStyle(posterSize.background);
  35745. ctx.fillRect(0, 0, width, height);
  35746. }
  35747. }
  35748. for (const item of this.json.views) {
  35749. await this.drawItem(ctx, item, width, height);
  35750. }
  35751. ctx.draw(false, () => {
  35752. setTimeout(() => {
  35753. uni.canvasToTempFilePath({
  35754. canvasId: this.canvasId,
  35755. success: (res) => {
  35756. this.showCanvas = false;
  35757. resolve({
  35758. width,
  35759. height,
  35760. path: res.tempFilePath,
  35761. // H5下添加blob格式
  35762. blob: this.dataURLToBlob(res.tempFilePath)
  35763. });
  35764. },
  35765. fail: (err) => {
  35766. this.showCanvas = false;
  35767. reject(new Error("导出图片失败: " + JSON.stringify(err)));
  35768. }
  35769. }, this);
  35770. }, 300);
  35771. });
  35772. setTimeout(() => {
  35773. this.showCanvas = false;
  35774. reject(new Error("导出图片超时"));
  35775. }, 1e4);
  35776. } catch (error2) {
  35777. this.showCanvas = false;
  35778. reject(error2);
  35779. }
  35780. });
  35781. },
  35782. /**
  35783. * 绘制单个元素
  35784. * @description 根据元素类型绘制文本、图片、矩形或二维码到canvas
  35785. * @param {Object} ctx canvas上下文
  35786. * @param {Object} item 元素配置信息
  35787. * @param {Number} canvasWidth canvas宽度
  35788. * @param {Number} canvasHeight canvas高度
  35789. * @returns {Promise} 绘制完成的Promise
  35790. * @author jry ijry@qq.com
  35791. */
  35792. async drawItem(ctx, item, canvasWidth, canvasHeight) {
  35793. const css = item.css || {};
  35794. const left = this.convertRpxToPx(css.left || "0rpx");
  35795. const top = this.convertRpxToPx(css.top || "0rpx");
  35796. const width = this.convertRpxToPx(css.width || "0rpx");
  35797. const height = this.convertRpxToPx(css.height || "0rpx");
  35798. switch (item.type) {
  35799. case "view":
  35800. if (css.background) {
  35801. if (css.background.includes("linear-gradient") || css.background.includes("radial-gradient")) {
  35802. this.drawGradientBackground(ctx, css, left, top, width, height);
  35803. } else {
  35804. ctx.setFillStyle(css.background);
  35805. if (css.radius) {
  35806. const radius = this.convertRpxToPx(css.radius);
  35807. this.drawRoundRect(ctx, left, top, width, height, radius, css.background);
  35808. } else {
  35809. ctx.fillRect(left, top, width, height);
  35810. }
  35811. }
  35812. }
  35813. break;
  35814. case "text":
  35815. if (css.color)
  35816. ctx.setFillStyle(css.color);
  35817. if (css.fontSize) {
  35818. const fontSize = this.convertRpxToPx(css.fontSize);
  35819. ctx.setFontSize(fontSize);
  35820. }
  35821. if (css.fontWeight) {
  35822. ctx.setLineWidth(css.fontWeight === "bold" ? 2 : 1);
  35823. }
  35824. if (css.lineClamp) {
  35825. this.drawTextWithLineClamp(ctx, item.text, left, top, width, css);
  35826. } else {
  35827. const textBaseLine = css.fontSize ? this.convertRpxToPx(css.fontSize) / 2 : 10;
  35828. ctx.fillText(item.text, left, top + textBaseLine);
  35829. }
  35830. break;
  35831. case "image":
  35832. return new Promise((resolve) => {
  35833. uni.getImageInfo({
  35834. src: item.src,
  35835. success: (res) => {
  35836. if (css.radius) {
  35837. const radius = this.convertRpxToPx(css.radius);
  35838. this.clipRoundRect(ctx, left, top, width, height, radius);
  35839. }
  35840. ctx.drawImage(item.src, left, top, width, height);
  35841. ctx.restore();
  35842. resolve();
  35843. },
  35844. fail: () => {
  35845. ctx.setFillStyle("#f5f5f5");
  35846. ctx.fillRect(left, top, width, height);
  35847. resolve();
  35848. }
  35849. });
  35850. });
  35851. case "qrcode":
  35852. if (item.text) {
  35853. const qrCodeImageUrl = await this.generateQRCode(item.text, width, height);
  35854. return new Promise((resolve) => {
  35855. uni.getImageInfo({
  35856. src: qrCodeImageUrl,
  35857. success: (res) => {
  35858. ctx.drawImage(res.path, left, top, width, height);
  35859. resolve();
  35860. },
  35861. fail: () => {
  35862. ctx.setFillStyle("#f5f5f5");
  35863. ctx.fillRect(left, top, width, height);
  35864. ctx.setFillStyle("#999");
  35865. ctx.setFontSize(12);
  35866. ctx.setTextAlign("center");
  35867. ctx.fillText("QR", left + width / 2, top + height / 2);
  35868. ctx.setTextAlign("left");
  35869. resolve();
  35870. }
  35871. });
  35872. });
  35873. } else {
  35874. ctx.setFillStyle("#f5f5f5");
  35875. ctx.fillRect(left, top, width, height);
  35876. ctx.setFillStyle("#999");
  35877. ctx.setFontSize(12);
  35878. ctx.setTextAlign("center");
  35879. ctx.fillText("QR", left + width / 2, top + height / 2);
  35880. ctx.setTextAlign("left");
  35881. }
  35882. break;
  35883. }
  35884. },
  35885. /**
  35886. * 绘制圆角矩形
  35887. * @description 绘制指定位置和尺寸的圆角矩形
  35888. * @param {Object} ctx canvas上下文
  35889. * @param {Number} x x坐标
  35890. * @param {Number} y y坐标
  35891. * @param {Number} width 宽度
  35892. * @param {Number} height 高度
  35893. * @param {Number} radius 圆角半径
  35894. * @param {String} fillColor 填充颜色
  35895. * @author jry ijry@qq.com
  35896. */
  35897. drawRoundRect(ctx, x2, y2, width, height, radius, fillColor) {
  35898. ctx.save();
  35899. ctx.beginPath();
  35900. ctx.moveTo(x2 + radius, y2);
  35901. ctx.lineTo(x2 + width - radius, y2);
  35902. ctx.quadraticCurveTo(x2 + width, y2, x2 + width, y2 + radius);
  35903. ctx.lineTo(x2 + width, y2 + height - radius);
  35904. ctx.quadraticCurveTo(x2 + width, y2 + height, x2 + width - radius, y2 + height);
  35905. ctx.lineTo(x2 + radius, y2 + height);
  35906. ctx.quadraticCurveTo(x2, y2 + height, x2, y2 + height - radius);
  35907. ctx.lineTo(x2, y2 + radius);
  35908. ctx.quadraticCurveTo(x2, y2, x2 + radius, y2);
  35909. ctx.closePath();
  35910. if (fillColor) {
  35911. ctx.setFillStyle(fillColor);
  35912. ctx.fill();
  35913. }
  35914. ctx.restore();
  35915. },
  35916. /**
  35917. * 裁剪圆角矩形区域
  35918. * @description 在canvas上创建圆角矩形裁剪区域
  35919. * @param {Object} ctx canvas上下文
  35920. * @param {Number} x x坐标
  35921. * @param {Number} y y坐标
  35922. * @param {Number} width 宽度
  35923. * @param {Number} height 高度
  35924. * @param {Number} radius 圆角半径
  35925. * @author jry ijry@qq.com
  35926. */
  35927. clipRoundRect(ctx, x2, y2, width, height, radius) {
  35928. ctx.save();
  35929. ctx.beginPath();
  35930. ctx.arc(x2 + radius, y2 + radius, radius, Math.PI, Math.PI * 1.5);
  35931. ctx.lineTo(x2 + width - radius, y2);
  35932. ctx.arc(x2 + width - radius, y2 + radius, radius, Math.PI * 1.5, Math.PI * 2);
  35933. ctx.lineTo(x2 + width, y2 + height - radius);
  35934. ctx.arc(x2 + width - radius, y2 + height - radius, radius, 0, Math.PI * 0.5);
  35935. ctx.lineTo(x2 + radius, y2 + height);
  35936. ctx.arc(x2 + radius, y2 + height - radius, radius, Math.PI * 0.5, Math.PI);
  35937. ctx.closePath();
  35938. ctx.clip();
  35939. },
  35940. /**
  35941. * 绘制带行数限制的文本
  35942. * @description 绘制可控制最大行数的文本,超出部分显示省略号
  35943. * @param {Object} ctx canvas上下文
  35944. * @param {String} text 文本内容
  35945. * @param {Number} x x坐标
  35946. * @param {Number} y y坐标
  35947. * @param {Number} maxWidth 最大宽度
  35948. * @param {Object} css 样式配置
  35949. * @author jry ijry@qq.com
  35950. */
  35951. drawTextWithLineClamp(ctx, text, x2, y2, maxWidth, css) {
  35952. const lineClamp = parseInt(css.lineClamp) || 1;
  35953. const lineHeight = css.lineHeight ? this.convertRpxToPx(css.lineHeight) : 20;
  35954. const lines = [];
  35955. let currentLine = "";
  35956. for (let i2 = 0; i2 < text.length; i2++) {
  35957. const char = text[i2];
  35958. const testLine = currentLine + char;
  35959. const metrics = ctx.measureText(testLine);
  35960. if (metrics.width > maxWidth && currentLine !== "") {
  35961. lines.push(currentLine);
  35962. currentLine = char;
  35963. if (lines.length === lineClamp) {
  35964. if (metrics.width > maxWidth) {
  35965. let fitLine = currentLine.substring(0, currentLine.length - 1);
  35966. while (ctx.measureText(fitLine + "...").width > maxWidth && fitLine.length > 0) {
  35967. fitLine = fitLine.substring(0, fitLine.length - 1);
  35968. }
  35969. lines[lines.length - 1] = fitLine + "...";
  35970. }
  35971. break;
  35972. }
  35973. } else {
  35974. currentLine = testLine;
  35975. }
  35976. if (i2 === text.length - 1 && lines.length < lineClamp) {
  35977. lines.push(currentLine);
  35978. }
  35979. }
  35980. for (let i2 = 0; i2 < lines.length; i2++) {
  35981. const textBaseLine = css.fontSize ? this.convertRpxToPx(css.fontSize) / 2 : 10;
  35982. ctx.fillText(lines[i2], x2, y2 + i2 * lineHeight + textBaseLine);
  35983. }
  35984. },
  35985. /**
  35986. * 生成二维码图片
  35987. * @description 根据文本内容生成二维码图片URL
  35988. * @param {String} text 二维码内容
  35989. * @param {Number} width 二维码宽度
  35990. * @param {Number} height 二维码高度
  35991. * @returns {Promise<String>} 二维码图片URL
  35992. * @author jry ijry@qq.com
  35993. */
  35994. generateQRCode(text, width, height) {
  35995. return new Promise((resolve) => {
  35996. const qrCodeKey = `${text}_${width}_${height}`;
  35997. if (this.qrCodeMap.has(qrCodeKey)) {
  35998. resolve(this.qrCodeMap.get(qrCodeKey));
  35999. return;
  36000. }
  36001. try {
  36002. this.qrCodeValue = text;
  36003. this.qrCodeSize = Math.max(width, height);
  36004. this.qrCodeShow = true;
  36005. this.$nextTick(() => {
  36006. if (this.$refs.qrCode) {
  36007. setTimeout(() => {
  36008. this.$refs.qrCode.toTempFilePath({
  36009. success: (res) => {
  36010. this.qrCodeMap.set(qrCodeKey, res.tempFilePath);
  36011. this.qrCodeShow = false;
  36012. resolve(res.tempFilePath);
  36013. },
  36014. fail: (err) => {
  36015. formatAppLog("error", "at uni_modules/uview-plus/components/u-poster/u-poster.vue:437", "二维码生成失败:", err);
  36016. this.qrCodeShow = false;
  36017. }
  36018. });
  36019. }, 300);
  36020. } else {
  36021. this.qrCodeShow = false;
  36022. }
  36023. });
  36024. } catch (error2) {
  36025. formatAppLog("error", "at uni_modules/uview-plus/components/u-poster/u-poster.vue:448", "生成二维码出错:", error2);
  36026. this.qrCodeShow = false;
  36027. }
  36028. });
  36029. },
  36030. /**
  36031. * 将rpx单位转换为px
  36032. * @description 根据屏幕密度将rpx单位转换为px单位
  36033. * @param {String|Number} rpxValue rpx值
  36034. * @returns {Number} 转换后的px值
  36035. * @author jry ijry@qq.com
  36036. */
  36037. convertRpxToPx(rpxValue) {
  36038. if (typeof rpxValue === "number")
  36039. return rpxValue;
  36040. if (typeof rpxValue === "string" && rpxValue.endsWith("rpx")) {
  36041. const value2 = parseFloat(rpxValue);
  36042. return uni.rpx2px(value2);
  36043. }
  36044. return parseFloat(rpxValue) || 0;
  36045. },
  36046. /**
  36047. * 绘制渐变背景
  36048. * @description 绘制线性渐变或径向渐变背景
  36049. * @param {Object} ctx canvas上下文
  36050. * @param {Object} css 样式配置
  36051. * @param {Number} left 左边距
  36052. * @param {Number} top 上边距
  36053. * @param {Number} width 宽度
  36054. * @param {Number} height 高度
  36055. * @author jry ijry@qq.com
  36056. */
  36057. drawGradientBackground(ctx, css, left, top, width, height) {
  36058. const background = css.background;
  36059. let gradient = null;
  36060. if (background.includes("linear-gradient")) {
  36061. const angleMatch = background.match(/linear-gradient\((\d+)deg/);
  36062. const angle = angleMatch ? parseInt(angleMatch[1]) : 135;
  36063. let startX = left, startY = top, endX = left + width, endY = top + height;
  36064. if (angle === 0) {
  36065. startX = left;
  36066. startY = top + height;
  36067. endX = left;
  36068. endY = top;
  36069. } else if (angle === 90) {
  36070. startX = left;
  36071. startY = top;
  36072. endX = left + width;
  36073. endY = top;
  36074. } else if (angle === 180) {
  36075. startX = left;
  36076. startY = top;
  36077. endX = left;
  36078. endY = top + height;
  36079. } else if (angle === 270) {
  36080. startX = left + width;
  36081. startY = top;
  36082. endX = left;
  36083. endY = top;
  36084. }
  36085. gradient = ctx.createLinearGradient(startX, startY, endX, endY);
  36086. const colorMatches = background.match(/#[0-9a-fA-F]+|rgba?\([^)]+\)/g);
  36087. if (colorMatches && colorMatches.length >= 2) {
  36088. colorMatches.forEach((color2, index2) => {
  36089. const stop = index2 / (colorMatches.length - 1);
  36090. gradient.addColorStop(stop, color2);
  36091. });
  36092. }
  36093. } else if (background.includes("radial-gradient")) {
  36094. const centerX = left + width / 2;
  36095. const centerY = top + height / 2;
  36096. const radius = Math.min(width, height) / 2;
  36097. gradient = ctx.createRadialGradient(centerX, centerY, 0, centerX, centerY, radius);
  36098. const colorMatches = background.match(/#[0-9a-fA-F]+|rgba?\([^)]+\)/g);
  36099. if (colorMatches && colorMatches.length >= 2) {
  36100. colorMatches.forEach((color2, index2) => {
  36101. const stop = index2 / (colorMatches.length - 1);
  36102. gradient.addColorStop(stop, color2);
  36103. });
  36104. }
  36105. }
  36106. if (gradient) {
  36107. ctx.setFillStyle(gradient);
  36108. if (css.radius) {
  36109. const radius = this.convertRpxToPx(css.radius);
  36110. this.drawRoundRect(ctx, left, top, width, height, radius, gradient);
  36111. } else {
  36112. ctx.fillRect(left, top, width, height);
  36113. }
  36114. }
  36115. },
  36116. /**
  36117. * 将dataURL转换为Blob
  36118. * @description H5环境下将base64格式的dataURL转换为Blob对象
  36119. * @param {String} dataURL base64格式的图片数据
  36120. * @returns {Blob} Blob对象
  36121. * @author jry ijry@qq.com
  36122. */
  36123. dataURLToBlob(dataURL) {
  36124. return null;
  36125. }
  36126. }
  36127. };
  36128. function _sfc_render$R(_ctx, _cache, $props, $setup, $data, $options) {
  36129. const _component_up_qrcode = vue.resolveComponent("up-qrcode");
  36130. return vue.openBlock(), vue.createElementBlock("view", { class: "up-poster" }, [
  36131. vue.createCommentVNode(" canvas用于绘制海报 "),
  36132. $data.showCanvas ? (vue.openBlock(), vue.createElementBlock("canvas", {
  36133. key: 0,
  36134. class: "up-poster__hidden-canvas",
  36135. "canvas-id": $data.canvasId,
  36136. id: $data.canvasId,
  36137. style: vue.normalizeStyle({ width: $data.canvasWidth + "px", height: $data.canvasHeight + "px" })
  36138. }, null, 12, ["canvas-id", "id"])) : vue.createCommentVNode("v-if", true),
  36139. vue.createCommentVNode(" 隐藏的二维码组件,用于生成二维码图片 "),
  36140. vue.createVNode(_component_up_qrcode, {
  36141. ref: "qrCode",
  36142. val: $data.qrCodeValue,
  36143. size: $data.qrCodeSize,
  36144. margin: 0,
  36145. loadMake: false,
  36146. background: "#ffffff",
  36147. foreground: "#000000",
  36148. class: vue.normalizeClass(["up-poster__hidden-qrcode", $data.qrCodeShow ? "" : "up-poster__hidden-qrcode--hidden"])
  36149. }, null, 8, ["val", "size", "class"])
  36150. ]);
  36151. }
  36152. const uPoster = /* @__PURE__ */ _export_sfc(_sfc_main$S, [["render", _sfc_render$R], ["__scopeId", "data-v-79cfe3ab"], ["__file", "C:/Users/EDY/Desktop/项目/shuibei/uni_modules/uview-plus/components/u-poster/u-poster.vue"]]);
  36153. const __vite_glob_0_80 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
  36154. __proto__: null,
  36155. default: uPoster
  36156. }, Symbol.toStringTag, { value: "Module" }));
  36157. const _sfc_main$R = {
  36158. name: "u-pull-refresh",
  36159. props: {
  36160. // 是否正在刷新
  36161. refreshing: {
  36162. type: Boolean,
  36163. default: false
  36164. },
  36165. // 下拉刷新阈值
  36166. threshold: {
  36167. type: Number,
  36168. default: 80
  36169. },
  36170. // 阻尼系数
  36171. damping: {
  36172. type: Number,
  36173. default: 0.4
  36174. },
  36175. // 最大下拉距离
  36176. maxDistance: {
  36177. type: Number,
  36178. default: 120
  36179. },
  36180. // 是否显示加载更多
  36181. showLoadmore: {
  36182. type: Boolean,
  36183. default: false
  36184. },
  36185. // u-loadmore 组件的 props 配置
  36186. loadmoreProps: {
  36187. type: Object,
  36188. default: () => ({
  36189. status: "loadmore"
  36190. // loadmoreText: '加载更多',
  36191. // loadingText: '正在加载...',
  36192. // nomoreText: '没有更多了'
  36193. })
  36194. },
  36195. // 是否使用 scroll-view 包装内容
  36196. useScrollView: {
  36197. type: Boolean,
  36198. default: true
  36199. },
  36200. // scroll-view 相关属性
  36201. enableBackToTop: {
  36202. type: Boolean,
  36203. default: false
  36204. },
  36205. lowerThreshold: {
  36206. type: [Number, String],
  36207. default: 50
  36208. },
  36209. scrollTop: {
  36210. type: [Number, String],
  36211. default: 0
  36212. }
  36213. },
  36214. data() {
  36215. return {
  36216. // 下拉刷新相关
  36217. isRefreshing: false,
  36218. refreshStatus: "pull",
  36219. // pull, release, refreshing
  36220. refreshDistance: 0,
  36221. startY: 0,
  36222. currentY: 0,
  36223. touching: false,
  36224. // 动画相关
  36225. contentTranslateY: 0
  36226. };
  36227. },
  36228. emits: ["refresh", "loadmore", "scroll"],
  36229. watch: {
  36230. refreshing: {
  36231. handler(newVal) {
  36232. if (!newVal) {
  36233. this.finishRefresh();
  36234. } else {
  36235. this.startRefresh();
  36236. }
  36237. }
  36238. }
  36239. },
  36240. methods: {
  36241. t: t$1,
  36242. // 触摸开始
  36243. onTouchStart(e2) {
  36244. if (this.isRefreshing)
  36245. return;
  36246. this.touching = true;
  36247. this.startY = e2.touches[0].pageY;
  36248. this.currentY = this.startY;
  36249. this.refreshStatus = "pull";
  36250. },
  36251. // 触摸移动
  36252. onTouchMove(e2) {
  36253. if (!this.touching || this.isRefreshing)
  36254. return;
  36255. this.currentY = e2.touches[0].pageY;
  36256. const diff = this.currentY - this.startY;
  36257. if (diff > 0 && this.isScrollViewAtTop()) {
  36258. this.refreshDistance = Math.min(diff * this.damping, this.maxDistance);
  36259. this.contentTranslateY = this.refreshDistance;
  36260. if (this.refreshDistance >= this.threshold) {
  36261. this.refreshStatus = "release";
  36262. } else {
  36263. this.refreshStatus = "pull";
  36264. }
  36265. e2.preventDefault();
  36266. e2.stopPropagation();
  36267. }
  36268. },
  36269. // 触摸结束
  36270. onTouchEnd() {
  36271. if (!this.touching)
  36272. return;
  36273. this.touching = false;
  36274. if (this.refreshDistance >= this.threshold && !this.isRefreshing) {
  36275. this.startRefresh();
  36276. this.$emit("refresh");
  36277. } else {
  36278. this.resetRefresh();
  36279. }
  36280. },
  36281. // 开始刷新
  36282. startRefresh() {
  36283. this.isRefreshing = true;
  36284. this.refreshStatus = "refreshing";
  36285. this.refreshDistance = this.threshold;
  36286. this.contentTranslateY = this.threshold;
  36287. },
  36288. // 完成刷新
  36289. finishRefresh() {
  36290. this.isRefreshing = false;
  36291. this.refreshStatus = "pull";
  36292. this.resetRefresh();
  36293. },
  36294. // 重置刷新状态
  36295. resetRefresh() {
  36296. this.refreshDistance = 0;
  36297. this.contentTranslateY = 0;
  36298. },
  36299. // 检查 scroll-view 是否在顶部
  36300. isScrollViewAtTop() {
  36301. return true;
  36302. },
  36303. // 处理滚动事件
  36304. handleScroll(e2) {
  36305. this.$emit("scroll", e2);
  36306. },
  36307. // 处理滚动到底部事件
  36308. handleScrollToLower(e2) {
  36309. if (this.showLoadmore && this.loadmoreProps.status === "loadmore") {
  36310. this.$emit("loadmore");
  36311. }
  36312. }
  36313. }
  36314. };
  36315. function _sfc_render$Q(_ctx, _cache, $props, $setup, $data, $options) {
  36316. const _component_up_icon = vue.resolveComponent("up-icon");
  36317. const _component_u_loadmore = resolveEasycom(vue.resolveDynamicComponent("u-loadmore"), __easycom_0$1);
  36318. return vue.openBlock(), vue.createElementBlock(
  36319. "view",
  36320. {
  36321. class: "u-pull-refresh",
  36322. onTouchstart: _cache[2] || (_cache[2] = (...args) => $options.onTouchStart && $options.onTouchStart(...args)),
  36323. onTouchmove: _cache[3] || (_cache[3] = (...args) => $options.onTouchMove && $options.onTouchMove(...args)),
  36324. onTouchend: _cache[4] || (_cache[4] = (...args) => $options.onTouchEnd && $options.onTouchEnd(...args)),
  36325. onTouchcancel: _cache[5] || (_cache[5] = (...args) => $options.onTouchEnd && $options.onTouchEnd(...args))
  36326. },
  36327. [
  36328. vue.createCommentVNode(" 下拉刷新区域 "),
  36329. vue.createElementVNode(
  36330. "view",
  36331. {
  36332. class: vue.normalizeClass(["refresh-area", { refreshing: $data.isRefreshing }]),
  36333. style: vue.normalizeStyle({ height: $data.refreshDistance + "px" })
  36334. },
  36335. [
  36336. vue.createCommentVNode(" 不同状态的插槽 "),
  36337. $data.refreshStatus === "pull" ? vue.renderSlot(_ctx.$slots, "pull", {
  36338. key: 0,
  36339. distance: $data.refreshDistance,
  36340. threshold: $props.threshold
  36341. }, () => [
  36342. vue.createCommentVNode(" 默认下拉状态 "),
  36343. vue.createElementVNode("view", { class: "refresh-content" }, [
  36344. vue.createElementVNode("view", { class: "refresh-indicator" }, [
  36345. vue.createVNode(_component_up_icon, {
  36346. name: "arrow-downward",
  36347. size: "26px"
  36348. })
  36349. ]),
  36350. vue.createElementVNode(
  36351. "text",
  36352. { class: "refresh-text" },
  36353. vue.toDisplayString($options.t("up.pullRefresh.pull")),
  36354. 1
  36355. /* TEXT */
  36356. )
  36357. ])
  36358. ], true) : $data.refreshStatus === "release" ? vue.renderSlot(_ctx.$slots, "release", {
  36359. key: 1,
  36360. distance: $data.refreshDistance,
  36361. threshold: $props.threshold
  36362. }, () => [
  36363. vue.createCommentVNode(" 默认释放状态 "),
  36364. vue.createElementVNode("view", { class: "refresh-content" }, [
  36365. vue.createElementVNode("view", { class: "refresh-indicator" }, [
  36366. vue.createVNode(_component_up_icon, {
  36367. name: "arrow-upward",
  36368. size: "26px"
  36369. })
  36370. ]),
  36371. vue.createElementVNode(
  36372. "text",
  36373. { class: "refresh-text" },
  36374. vue.toDisplayString($options.t("up.pullRefresh.release")),
  36375. 1
  36376. /* TEXT */
  36377. )
  36378. ])
  36379. ], true) : $data.refreshStatus === "refreshing" ? vue.renderSlot(_ctx.$slots, "refreshing", { key: 2 }, () => [
  36380. vue.createCommentVNode(" 默认刷新中状态 "),
  36381. vue.createElementVNode("view", { class: "refresh-content" }, [
  36382. vue.createElementVNode("view", { class: "refresh-indicator" }, [
  36383. vue.createElementVNode("view", { class: "spinner" })
  36384. ]),
  36385. vue.createElementVNode(
  36386. "text",
  36387. { class: "refresh-text" },
  36388. vue.toDisplayString($options.t("up.pullRefresh.refreshing")) + "...",
  36389. 1
  36390. /* TEXT */
  36391. )
  36392. ])
  36393. ], true) : vue.createCommentVNode("v-if", true)
  36394. ],
  36395. 6
  36396. /* CLASS, STYLE */
  36397. ),
  36398. vue.createCommentVNode(" 内容区域 "),
  36399. vue.createElementVNode(
  36400. "view",
  36401. {
  36402. class: "refresh-content-wrapper",
  36403. style: vue.normalizeStyle({ transform: `translateY(${$data.contentTranslateY}px)` })
  36404. },
  36405. [
  36406. $props.useScrollView ? (vue.openBlock(), vue.createElementBlock("scroll-view", {
  36407. key: 0,
  36408. class: "scroll-wrapper",
  36409. "scroll-y": true,
  36410. "enable-back-to-top": $props.enableBackToTop,
  36411. "scroll-top": $props.scrollTop,
  36412. "lower-threshold": $props.lowerThreshold,
  36413. onScroll: _cache[0] || (_cache[0] = (...args) => $options.handleScroll && $options.handleScroll(...args)),
  36414. onScrolltolower: _cache[1] || (_cache[1] = (...args) => $options.handleScrollToLower && $options.handleScrollToLower(...args))
  36415. }, [
  36416. vue.renderSlot(_ctx.$slots, "default", {}, void 0, true),
  36417. vue.createCommentVNode(" 使用 u-loadmore 组件实现上拉加载更多 "),
  36418. $props.showLoadmore ? (vue.openBlock(), vue.createBlock(
  36419. _component_u_loadmore,
  36420. vue.normalizeProps(vue.mergeProps({ key: 0 }, $props.loadmoreProps)),
  36421. null,
  36422. 16
  36423. /* FULL_PROPS */
  36424. )) : vue.createCommentVNode("v-if", true)
  36425. ], 40, ["enable-back-to-top", "scroll-top", "lower-threshold"])) : (vue.openBlock(), vue.createElementBlock("view", { key: 1 }, [
  36426. vue.renderSlot(_ctx.$slots, "default", {}, void 0, true),
  36427. vue.createCommentVNode(" 使用 u-loadmore 组件实现上拉加载更多 "),
  36428. $props.showLoadmore ? (vue.openBlock(), vue.createBlock(
  36429. _component_u_loadmore,
  36430. vue.normalizeProps(vue.mergeProps({ key: 0 }, $props.loadmoreProps)),
  36431. null,
  36432. 16
  36433. /* FULL_PROPS */
  36434. )) : vue.createCommentVNode("v-if", true)
  36435. ]))
  36436. ],
  36437. 4
  36438. /* STYLE */
  36439. )
  36440. ],
  36441. 32
  36442. /* NEED_HYDRATION */
  36443. );
  36444. }
  36445. const __easycom_1 = /* @__PURE__ */ _export_sfc(_sfc_main$R, [["render", _sfc_render$Q], ["__scopeId", "data-v-34a6b4c5"], ["__file", "C:/Users/EDY/Desktop/项目/shuibei/uni_modules/uview-plus/components/u-pull-refresh/u-pull-refresh.vue"]]);
  36446. const __vite_glob_0_81 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
  36447. __proto__: null,
  36448. default: __easycom_1
  36449. }, Symbol.toStringTag, { value: "Module" }));
  36450. let QRCode = {};
  36451. (function() {
  36452. function unicodeFormat8(code2) {
  36453. var c0, c1, c2;
  36454. if (code2 < 128) {
  36455. return [code2];
  36456. } else if (code2 < 2048) {
  36457. c0 = 192 + (code2 >> 6);
  36458. c1 = 128 + (code2 & 63);
  36459. return [c0, c1];
  36460. } else {
  36461. c0 = 224 + (code2 >> 12);
  36462. c1 = 128 + (code2 >> 6 & 63);
  36463. c2 = 128 + (code2 & 63);
  36464. return [c0, c1, c2];
  36465. }
  36466. }
  36467. function getUTF8Bytes(string2) {
  36468. var utf8codes = [];
  36469. for (var i3 = 0; i3 < string2.length; i3++) {
  36470. var code2 = string2.charCodeAt(i3);
  36471. var utf8 = unicodeFormat8(code2);
  36472. for (var j2 = 0; j2 < utf8.length; j2++) {
  36473. utf8codes.push(utf8[j2]);
  36474. }
  36475. }
  36476. return utf8codes;
  36477. }
  36478. function QRCodeAlg(data, errorCorrectLevel) {
  36479. this.typeNumber = -1;
  36480. this.errorCorrectLevel = errorCorrectLevel;
  36481. this.modules = null;
  36482. this.moduleCount = 0;
  36483. this.dataCache = null;
  36484. this.rsBlocks = null;
  36485. this.totalDataCount = -1;
  36486. this.data = data;
  36487. this.utf8bytes = getUTF8Bytes(data);
  36488. this.make();
  36489. }
  36490. QRCodeAlg.prototype = {
  36491. constructor: QRCodeAlg,
  36492. /**
  36493. * 获取二维码矩阵大小
  36494. * @return {num} 矩阵大小
  36495. */
  36496. getModuleCount: function() {
  36497. return this.moduleCount;
  36498. },
  36499. /**
  36500. * 编码
  36501. */
  36502. make: function() {
  36503. this.getRightType();
  36504. this.dataCache = this.createData();
  36505. this.createQrcode();
  36506. },
  36507. /**
  36508. * 设置二位矩阵功能图形
  36509. * @param {bool} test 表示是否在寻找最好掩膜阶段
  36510. * @param {num} maskPattern 掩膜的版本
  36511. */
  36512. makeImpl: function(maskPattern) {
  36513. this.moduleCount = this.typeNumber * 4 + 17;
  36514. this.modules = new Array(this.moduleCount);
  36515. for (var row = 0; row < this.moduleCount; row++) {
  36516. this.modules[row] = new Array(this.moduleCount);
  36517. }
  36518. this.setupPositionProbePattern(0, 0);
  36519. this.setupPositionProbePattern(this.moduleCount - 7, 0);
  36520. this.setupPositionProbePattern(0, this.moduleCount - 7);
  36521. this.setupPositionAdjustPattern();
  36522. this.setupTimingPattern();
  36523. this.setupTypeInfo(true, maskPattern);
  36524. if (this.typeNumber >= 7) {
  36525. this.setupTypeNumber(true);
  36526. }
  36527. this.mapData(this.dataCache, maskPattern);
  36528. },
  36529. /**
  36530. * 设置二维码的位置探测图形
  36531. * @param {num} row 探测图形的中心横坐标
  36532. * @param {num} col 探测图形的中心纵坐标
  36533. */
  36534. setupPositionProbePattern: function(row, col) {
  36535. for (var r2 = -1; r2 <= 7; r2++) {
  36536. if (row + r2 <= -1 || this.moduleCount <= row + r2)
  36537. continue;
  36538. for (var c2 = -1; c2 <= 7; c2++) {
  36539. if (col + c2 <= -1 || this.moduleCount <= col + c2)
  36540. continue;
  36541. if (0 <= r2 && r2 <= 6 && (c2 == 0 || c2 == 6) || 0 <= c2 && c2 <= 6 && (r2 == 0 || r2 == 6) || 2 <= r2 && r2 <= 4 && 2 <= c2 && c2 <= 4) {
  36542. this.modules[row + r2][col + c2] = true;
  36543. } else {
  36544. this.modules[row + r2][col + c2] = false;
  36545. }
  36546. }
  36547. }
  36548. },
  36549. /**
  36550. * 创建二维码
  36551. * @return {[type]} [description]
  36552. */
  36553. createQrcode: function() {
  36554. var minLostPoint = 0;
  36555. var pattern2 = 0;
  36556. var bestModules = null;
  36557. for (var i3 = 0; i3 < 8; i3++) {
  36558. this.makeImpl(i3);
  36559. var lostPoint = QRUtil.getLostPoint(this);
  36560. if (i3 == 0 || minLostPoint > lostPoint) {
  36561. minLostPoint = lostPoint;
  36562. pattern2 = i3;
  36563. bestModules = this.modules;
  36564. }
  36565. }
  36566. this.modules = bestModules;
  36567. this.setupTypeInfo(false, pattern2);
  36568. if (this.typeNumber >= 7) {
  36569. this.setupTypeNumber(false);
  36570. }
  36571. },
  36572. /**
  36573. * 设置定位图形
  36574. * @return {[type]} [description]
  36575. */
  36576. setupTimingPattern: function() {
  36577. for (var r2 = 8; r2 < this.moduleCount - 8; r2++) {
  36578. if (this.modules[r2][6] != null) {
  36579. continue;
  36580. }
  36581. this.modules[r2][6] = r2 % 2 == 0;
  36582. if (this.modules[6][r2] != null) {
  36583. continue;
  36584. }
  36585. this.modules[6][r2] = r2 % 2 == 0;
  36586. }
  36587. },
  36588. /**
  36589. * 设置矫正图形
  36590. * @return {[type]} [description]
  36591. */
  36592. setupPositionAdjustPattern: function() {
  36593. var pos = QRUtil.getPatternPosition(this.typeNumber);
  36594. for (var i3 = 0; i3 < pos.length; i3++) {
  36595. for (var j2 = 0; j2 < pos.length; j2++) {
  36596. var row = pos[i3];
  36597. var col = pos[j2];
  36598. if (this.modules[row][col] != null) {
  36599. continue;
  36600. }
  36601. for (var r2 = -2; r2 <= 2; r2++) {
  36602. for (var c2 = -2; c2 <= 2; c2++) {
  36603. if (r2 == -2 || r2 == 2 || c2 == -2 || c2 == 2 || r2 == 0 && c2 == 0) {
  36604. this.modules[row + r2][col + c2] = true;
  36605. } else {
  36606. this.modules[row + r2][col + c2] = false;
  36607. }
  36608. }
  36609. }
  36610. }
  36611. }
  36612. },
  36613. /**
  36614. * 设置版本信息(7以上版本才有)
  36615. * @param {bool} test 是否处于判断最佳掩膜阶段
  36616. * @return {[type]} [description]
  36617. */
  36618. setupTypeNumber: function(test2) {
  36619. var bits = QRUtil.getBCHTypeNumber(this.typeNumber);
  36620. for (var i3 = 0; i3 < 18; i3++) {
  36621. var mod = !test2 && (bits >> i3 & 1) == 1;
  36622. this.modules[Math.floor(i3 / 3)][i3 % 3 + this.moduleCount - 8 - 3] = mod;
  36623. this.modules[i3 % 3 + this.moduleCount - 8 - 3][Math.floor(i3 / 3)] = mod;
  36624. }
  36625. },
  36626. /**
  36627. * 设置格式信息(纠错等级和掩膜版本)
  36628. * @param {bool} test
  36629. * @param {num} maskPattern 掩膜版本
  36630. * @return {}
  36631. */
  36632. setupTypeInfo: function(test2, maskPattern) {
  36633. var data = QRErrorCorrectLevel[this.errorCorrectLevel] << 3 | maskPattern;
  36634. var bits = QRUtil.getBCHTypeInfo(data);
  36635. for (var i3 = 0; i3 < 15; i3++) {
  36636. var mod = !test2 && (bits >> i3 & 1) == 1;
  36637. if (i3 < 6) {
  36638. this.modules[i3][8] = mod;
  36639. } else if (i3 < 8) {
  36640. this.modules[i3 + 1][8] = mod;
  36641. } else {
  36642. this.modules[this.moduleCount - 15 + i3][8] = mod;
  36643. }
  36644. var mod = !test2 && (bits >> i3 & 1) == 1;
  36645. if (i3 < 8) {
  36646. this.modules[8][this.moduleCount - i3 - 1] = mod;
  36647. } else if (i3 < 9) {
  36648. this.modules[8][15 - i3 - 1 + 1] = mod;
  36649. } else {
  36650. this.modules[8][15 - i3 - 1] = mod;
  36651. }
  36652. }
  36653. this.modules[this.moduleCount - 8][8] = !test2;
  36654. },
  36655. /**
  36656. * 数据编码
  36657. * @return {[type]} [description]
  36658. */
  36659. createData: function() {
  36660. var buffer = new QRBitBuffer();
  36661. var lengthBits = this.typeNumber > 9 ? 16 : 8;
  36662. buffer.put(4, 4);
  36663. buffer.put(this.utf8bytes.length, lengthBits);
  36664. for (var i3 = 0, l2 = this.utf8bytes.length; i3 < l2; i3++) {
  36665. buffer.put(this.utf8bytes[i3], 8);
  36666. }
  36667. if (buffer.length + 4 <= this.totalDataCount * 8) {
  36668. buffer.put(0, 4);
  36669. }
  36670. while (buffer.length % 8 != 0) {
  36671. buffer.putBit(false);
  36672. }
  36673. while (true) {
  36674. if (buffer.length >= this.totalDataCount * 8) {
  36675. break;
  36676. }
  36677. buffer.put(QRCodeAlg.PAD0, 8);
  36678. if (buffer.length >= this.totalDataCount * 8) {
  36679. break;
  36680. }
  36681. buffer.put(QRCodeAlg.PAD1, 8);
  36682. }
  36683. return this.createBytes(buffer);
  36684. },
  36685. /**
  36686. * 纠错码编码
  36687. * @param {buffer} buffer 数据编码
  36688. * @return {[type]}
  36689. */
  36690. createBytes: function(buffer) {
  36691. var offset = 0;
  36692. var maxDcCount = 0;
  36693. var maxEcCount = 0;
  36694. var length = this.rsBlock.length / 3;
  36695. var rsBlocks = new Array();
  36696. for (var i3 = 0; i3 < length; i3++) {
  36697. var count = this.rsBlock[i3 * 3 + 0];
  36698. var totalCount = this.rsBlock[i3 * 3 + 1];
  36699. var dataCount = this.rsBlock[i3 * 3 + 2];
  36700. for (var j2 = 0; j2 < count; j2++) {
  36701. rsBlocks.push([dataCount, totalCount]);
  36702. }
  36703. }
  36704. var dcdata = new Array(rsBlocks.length);
  36705. var ecdata = new Array(rsBlocks.length);
  36706. for (var r2 = 0; r2 < rsBlocks.length; r2++) {
  36707. var dcCount = rsBlocks[r2][0];
  36708. var ecCount = rsBlocks[r2][1] - dcCount;
  36709. maxDcCount = Math.max(maxDcCount, dcCount);
  36710. maxEcCount = Math.max(maxEcCount, ecCount);
  36711. dcdata[r2] = new Array(dcCount);
  36712. for (var i3 = 0; i3 < dcdata[r2].length; i3++) {
  36713. dcdata[r2][i3] = 255 & buffer.buffer[i3 + offset];
  36714. }
  36715. offset += dcCount;
  36716. var rsPoly = QRUtil.getErrorCorrectPolynomial(ecCount);
  36717. var rawPoly = new QRPolynomial(dcdata[r2], rsPoly.getLength() - 1);
  36718. var modPoly = rawPoly.mod(rsPoly);
  36719. ecdata[r2] = new Array(rsPoly.getLength() - 1);
  36720. for (var i3 = 0; i3 < ecdata[r2].length; i3++) {
  36721. var modIndex = i3 + modPoly.getLength() - ecdata[r2].length;
  36722. ecdata[r2][i3] = modIndex >= 0 ? modPoly.get(modIndex) : 0;
  36723. }
  36724. }
  36725. var data = new Array(this.totalDataCount);
  36726. var index2 = 0;
  36727. for (var i3 = 0; i3 < maxDcCount; i3++) {
  36728. for (var r2 = 0; r2 < rsBlocks.length; r2++) {
  36729. if (i3 < dcdata[r2].length) {
  36730. data[index2++] = dcdata[r2][i3];
  36731. }
  36732. }
  36733. }
  36734. for (var i3 = 0; i3 < maxEcCount; i3++) {
  36735. for (var r2 = 0; r2 < rsBlocks.length; r2++) {
  36736. if (i3 < ecdata[r2].length) {
  36737. data[index2++] = ecdata[r2][i3];
  36738. }
  36739. }
  36740. }
  36741. return data;
  36742. },
  36743. /**
  36744. * 布置模块,构建最终信息
  36745. * @param {} data
  36746. * @param {} maskPattern
  36747. * @return {}
  36748. */
  36749. mapData: function(data, maskPattern) {
  36750. var inc = -1;
  36751. var row = this.moduleCount - 1;
  36752. var bitIndex = 7;
  36753. var byteIndex = 0;
  36754. for (var col = this.moduleCount - 1; col > 0; col -= 2) {
  36755. if (col == 6)
  36756. col--;
  36757. while (true) {
  36758. for (var c2 = 0; c2 < 2; c2++) {
  36759. if (this.modules[row][col - c2] == null) {
  36760. var dark = false;
  36761. if (byteIndex < data.length) {
  36762. dark = (data[byteIndex] >>> bitIndex & 1) == 1;
  36763. }
  36764. var mask = QRUtil.getMask(maskPattern, row, col - c2);
  36765. if (mask) {
  36766. dark = !dark;
  36767. }
  36768. this.modules[row][col - c2] = dark;
  36769. bitIndex--;
  36770. if (bitIndex == -1) {
  36771. byteIndex++;
  36772. bitIndex = 7;
  36773. }
  36774. }
  36775. }
  36776. row += inc;
  36777. if (row < 0 || this.moduleCount <= row) {
  36778. row -= inc;
  36779. inc = -inc;
  36780. break;
  36781. }
  36782. }
  36783. }
  36784. }
  36785. };
  36786. QRCodeAlg.PAD0 = 236;
  36787. QRCodeAlg.PAD1 = 17;
  36788. var QRErrorCorrectLevel = [1, 0, 3, 2];
  36789. var QRMaskPattern = {
  36790. PATTERN000: 0,
  36791. PATTERN001: 1,
  36792. PATTERN010: 2,
  36793. PATTERN011: 3,
  36794. PATTERN100: 4,
  36795. PATTERN101: 5,
  36796. PATTERN110: 6,
  36797. PATTERN111: 7
  36798. };
  36799. var QRUtil = {
  36800. /*
  36801. 每个版本矫正图形的位置
  36802. */
  36803. PATTERN_POSITION_TABLE: [
  36804. [],
  36805. [6, 18],
  36806. [6, 22],
  36807. [6, 26],
  36808. [6, 30],
  36809. [6, 34],
  36810. [6, 22, 38],
  36811. [6, 24, 42],
  36812. [6, 26, 46],
  36813. [6, 28, 50],
  36814. [6, 30, 54],
  36815. [6, 32, 58],
  36816. [6, 34, 62],
  36817. [6, 26, 46, 66],
  36818. [6, 26, 48, 70],
  36819. [6, 26, 50, 74],
  36820. [6, 30, 54, 78],
  36821. [6, 30, 56, 82],
  36822. [6, 30, 58, 86],
  36823. [6, 34, 62, 90],
  36824. [6, 28, 50, 72, 94],
  36825. [6, 26, 50, 74, 98],
  36826. [6, 30, 54, 78, 102],
  36827. [6, 28, 54, 80, 106],
  36828. [6, 32, 58, 84, 110],
  36829. [6, 30, 58, 86, 114],
  36830. [6, 34, 62, 90, 118],
  36831. [6, 26, 50, 74, 98, 122],
  36832. [6, 30, 54, 78, 102, 126],
  36833. [6, 26, 52, 78, 104, 130],
  36834. [6, 30, 56, 82, 108, 134],
  36835. [6, 34, 60, 86, 112, 138],
  36836. [6, 30, 58, 86, 114, 142],
  36837. [6, 34, 62, 90, 118, 146],
  36838. [6, 30, 54, 78, 102, 126, 150],
  36839. [6, 24, 50, 76, 102, 128, 154],
  36840. [6, 28, 54, 80, 106, 132, 158],
  36841. [6, 32, 58, 84, 110, 136, 162],
  36842. [6, 26, 54, 82, 110, 138, 166],
  36843. [6, 30, 58, 86, 114, 142, 170]
  36844. ],
  36845. G15: 1 << 10 | 1 << 8 | 1 << 5 | 1 << 4 | 1 << 2 | 1 << 1 | 1 << 0,
  36846. G18: 1 << 12 | 1 << 11 | 1 << 10 | 1 << 9 | 1 << 8 | 1 << 5 | 1 << 2 | 1 << 0,
  36847. G15_MASK: 1 << 14 | 1 << 12 | 1 << 10 | 1 << 4 | 1 << 1,
  36848. /*
  36849. BCH编码格式信息
  36850. */
  36851. getBCHTypeInfo: function(data) {
  36852. var d2 = data << 10;
  36853. while (QRUtil.getBCHDigit(d2) - QRUtil.getBCHDigit(QRUtil.G15) >= 0) {
  36854. d2 ^= QRUtil.G15 << QRUtil.getBCHDigit(d2) - QRUtil.getBCHDigit(QRUtil.G15);
  36855. }
  36856. return (data << 10 | d2) ^ QRUtil.G15_MASK;
  36857. },
  36858. /*
  36859. BCH编码版本信息
  36860. */
  36861. getBCHTypeNumber: function(data) {
  36862. var d2 = data << 12;
  36863. while (QRUtil.getBCHDigit(d2) - QRUtil.getBCHDigit(QRUtil.G18) >= 0) {
  36864. d2 ^= QRUtil.G18 << QRUtil.getBCHDigit(d2) - QRUtil.getBCHDigit(QRUtil.G18);
  36865. }
  36866. return data << 12 | d2;
  36867. },
  36868. /*
  36869. 获取BCH位信息
  36870. */
  36871. getBCHDigit: function(data) {
  36872. var digit = 0;
  36873. while (data != 0) {
  36874. digit++;
  36875. data >>>= 1;
  36876. }
  36877. return digit;
  36878. },
  36879. /*
  36880. 获取版本对应的矫正图形位置
  36881. */
  36882. getPatternPosition: function(typeNumber) {
  36883. return QRUtil.PATTERN_POSITION_TABLE[typeNumber - 1];
  36884. },
  36885. /*
  36886. 掩膜算法
  36887. */
  36888. getMask: function(maskPattern, i3, j2) {
  36889. switch (maskPattern) {
  36890. case QRMaskPattern.PATTERN000:
  36891. return (i3 + j2) % 2 == 0;
  36892. case QRMaskPattern.PATTERN001:
  36893. return i3 % 2 == 0;
  36894. case QRMaskPattern.PATTERN010:
  36895. return j2 % 3 == 0;
  36896. case QRMaskPattern.PATTERN011:
  36897. return (i3 + j2) % 3 == 0;
  36898. case QRMaskPattern.PATTERN100:
  36899. return (Math.floor(i3 / 2) + Math.floor(j2 / 3)) % 2 == 0;
  36900. case QRMaskPattern.PATTERN101:
  36901. return i3 * j2 % 2 + i3 * j2 % 3 == 0;
  36902. case QRMaskPattern.PATTERN110:
  36903. return (i3 * j2 % 2 + i3 * j2 % 3) % 2 == 0;
  36904. case QRMaskPattern.PATTERN111:
  36905. return (i3 * j2 % 3 + (i3 + j2) % 2) % 2 == 0;
  36906. default:
  36907. throw new Error("bad maskPattern:" + maskPattern);
  36908. }
  36909. },
  36910. /*
  36911. 获取RS的纠错多项式
  36912. */
  36913. getErrorCorrectPolynomial: function(errorCorrectLength) {
  36914. var a2 = new QRPolynomial([1], 0);
  36915. for (var i3 = 0; i3 < errorCorrectLength; i3++) {
  36916. a2 = a2.multiply(new QRPolynomial([1, QRMath.gexp(i3)], 0));
  36917. }
  36918. return a2;
  36919. },
  36920. /*
  36921. 获取评价
  36922. */
  36923. getLostPoint: function(qrCode) {
  36924. var moduleCount = qrCode.getModuleCount(), lostPoint = 0, darkCount = 0;
  36925. for (var row = 0; row < moduleCount; row++) {
  36926. var sameCount = 0;
  36927. var head = qrCode.modules[row][0];
  36928. for (var col = 0; col < moduleCount; col++) {
  36929. var current = qrCode.modules[row][col];
  36930. if (col < moduleCount - 6) {
  36931. if (current && !qrCode.modules[row][col + 1] && qrCode.modules[row][col + 2] && qrCode.modules[row][col + 3] && qrCode.modules[row][col + 4] && !qrCode.modules[row][col + 5] && qrCode.modules[row][col + 6]) {
  36932. if (col < moduleCount - 10) {
  36933. if (qrCode.modules[row][col + 7] && qrCode.modules[row][col + 8] && qrCode.modules[row][col + 9] && qrCode.modules[row][col + 10]) {
  36934. lostPoint += 40;
  36935. }
  36936. } else if (col > 3) {
  36937. if (qrCode.modules[row][col - 1] && qrCode.modules[row][col - 2] && qrCode.modules[row][col - 3] && qrCode.modules[row][col - 4]) {
  36938. lostPoint += 40;
  36939. }
  36940. }
  36941. }
  36942. }
  36943. if (row < moduleCount - 1 && col < moduleCount - 1) {
  36944. var count = 0;
  36945. if (current)
  36946. count++;
  36947. if (qrCode.modules[row + 1][col])
  36948. count++;
  36949. if (qrCode.modules[row][col + 1])
  36950. count++;
  36951. if (qrCode.modules[row + 1][col + 1])
  36952. count++;
  36953. if (count == 0 || count == 4) {
  36954. lostPoint += 3;
  36955. }
  36956. }
  36957. if (head ^ current) {
  36958. sameCount++;
  36959. } else {
  36960. head = current;
  36961. if (sameCount >= 5) {
  36962. lostPoint += 3 + sameCount - 5;
  36963. }
  36964. sameCount = 1;
  36965. }
  36966. if (current) {
  36967. darkCount++;
  36968. }
  36969. }
  36970. }
  36971. for (var col = 0; col < moduleCount; col++) {
  36972. var sameCount = 0;
  36973. var head = qrCode.modules[0][col];
  36974. for (var row = 0; row < moduleCount; row++) {
  36975. var current = qrCode.modules[row][col];
  36976. if (row < moduleCount - 6) {
  36977. if (current && !qrCode.modules[row + 1][col] && qrCode.modules[row + 2][col] && qrCode.modules[row + 3][col] && qrCode.modules[row + 4][col] && !qrCode.modules[row + 5][col] && qrCode.modules[row + 6][col]) {
  36978. if (row < moduleCount - 10) {
  36979. if (qrCode.modules[row + 7][col] && qrCode.modules[row + 8][col] && qrCode.modules[row + 9][col] && qrCode.modules[row + 10][col]) {
  36980. lostPoint += 40;
  36981. }
  36982. } else if (row > 3) {
  36983. if (qrCode.modules[row - 1][col] && qrCode.modules[row - 2][col] && qrCode.modules[row - 3][col] && qrCode.modules[row - 4][col]) {
  36984. lostPoint += 40;
  36985. }
  36986. }
  36987. }
  36988. }
  36989. if (head ^ current) {
  36990. sameCount++;
  36991. } else {
  36992. head = current;
  36993. if (sameCount >= 5) {
  36994. lostPoint += 3 + sameCount - 5;
  36995. }
  36996. sameCount = 1;
  36997. }
  36998. }
  36999. }
  37000. var ratio = Math.abs(100 * darkCount / moduleCount / moduleCount - 50) / 5;
  37001. lostPoint += ratio * 10;
  37002. return lostPoint;
  37003. }
  37004. };
  37005. var QRMath = {
  37006. /*
  37007. 将n转化为a^m
  37008. */
  37009. glog: function(n2) {
  37010. if (n2 < 1) {
  37011. throw new Error("glog(" + n2 + ")");
  37012. }
  37013. return QRMath.LOG_TABLE[n2];
  37014. },
  37015. /*
  37016. 将a^m转化为n
  37017. */
  37018. gexp: function(n2) {
  37019. while (n2 < 0) {
  37020. n2 += 255;
  37021. }
  37022. while (n2 >= 256) {
  37023. n2 -= 255;
  37024. }
  37025. return QRMath.EXP_TABLE[n2];
  37026. },
  37027. EXP_TABLE: new Array(256),
  37028. LOG_TABLE: new Array(256)
  37029. };
  37030. for (var i2 = 0; i2 < 8; i2++) {
  37031. QRMath.EXP_TABLE[i2] = 1 << i2;
  37032. }
  37033. for (var i2 = 8; i2 < 256; i2++) {
  37034. QRMath.EXP_TABLE[i2] = QRMath.EXP_TABLE[i2 - 4] ^ QRMath.EXP_TABLE[i2 - 5] ^ QRMath.EXP_TABLE[i2 - 6] ^ QRMath.EXP_TABLE[i2 - 8];
  37035. }
  37036. for (var i2 = 0; i2 < 255; i2++) {
  37037. QRMath.LOG_TABLE[QRMath.EXP_TABLE[i2]] = i2;
  37038. }
  37039. function QRPolynomial(num, shift) {
  37040. if (num.length == void 0) {
  37041. throw new Error(num.length + "/" + shift);
  37042. }
  37043. var offset = 0;
  37044. while (offset < num.length && num[offset] == 0) {
  37045. offset++;
  37046. }
  37047. this.num = new Array(num.length - offset + shift);
  37048. for (var i3 = 0; i3 < num.length - offset; i3++) {
  37049. this.num[i3] = num[i3 + offset];
  37050. }
  37051. }
  37052. QRPolynomial.prototype = {
  37053. get: function(index2) {
  37054. return this.num[index2];
  37055. },
  37056. getLength: function() {
  37057. return this.num.length;
  37058. },
  37059. /**
  37060. * 多项式乘法
  37061. * @param {QRPolynomial} e 被乘多项式
  37062. * @return {[type]} [description]
  37063. */
  37064. multiply: function(e2) {
  37065. var num = new Array(this.getLength() + e2.getLength() - 1);
  37066. for (var i3 = 0; i3 < this.getLength(); i3++) {
  37067. for (var j2 = 0; j2 < e2.getLength(); j2++) {
  37068. num[i3 + j2] ^= QRMath.gexp(QRMath.glog(this.get(i3)) + QRMath.glog(e2.get(j2)));
  37069. }
  37070. }
  37071. return new QRPolynomial(num, 0);
  37072. },
  37073. /**
  37074. * 多项式模运算
  37075. * @param {QRPolynomial} e 模多项式
  37076. * @return {}
  37077. */
  37078. mod: function(e2) {
  37079. var tl = this.getLength(), el = e2.getLength();
  37080. if (tl - el < 0) {
  37081. return this;
  37082. }
  37083. var num = new Array(tl);
  37084. for (var i3 = 0; i3 < tl; i3++) {
  37085. num[i3] = this.get(i3);
  37086. }
  37087. while (num.length >= el) {
  37088. var ratio = QRMath.glog(num[0]) - QRMath.glog(e2.get(0));
  37089. for (var i3 = 0; i3 < e2.getLength(); i3++) {
  37090. num[i3] ^= QRMath.gexp(QRMath.glog(e2.get(i3)) + ratio);
  37091. }
  37092. while (num[0] == 0) {
  37093. num.shift();
  37094. }
  37095. }
  37096. return new QRPolynomial(num, 0);
  37097. }
  37098. };
  37099. var RS_BLOCK_TABLE = [
  37100. // L
  37101. // M
  37102. // Q
  37103. // H
  37104. // 1
  37105. [1, 26, 19],
  37106. [1, 26, 16],
  37107. [1, 26, 13],
  37108. [1, 26, 9],
  37109. // 2
  37110. [1, 44, 34],
  37111. [1, 44, 28],
  37112. [1, 44, 22],
  37113. [1, 44, 16],
  37114. // 3
  37115. [1, 70, 55],
  37116. [1, 70, 44],
  37117. [2, 35, 17],
  37118. [2, 35, 13],
  37119. // 4
  37120. [1, 100, 80],
  37121. [2, 50, 32],
  37122. [2, 50, 24],
  37123. [4, 25, 9],
  37124. // 5
  37125. [1, 134, 108],
  37126. [2, 67, 43],
  37127. [2, 33, 15, 2, 34, 16],
  37128. [2, 33, 11, 2, 34, 12],
  37129. // 6
  37130. [2, 86, 68],
  37131. [4, 43, 27],
  37132. [4, 43, 19],
  37133. [4, 43, 15],
  37134. // 7
  37135. [2, 98, 78],
  37136. [4, 49, 31],
  37137. [2, 32, 14, 4, 33, 15],
  37138. [4, 39, 13, 1, 40, 14],
  37139. // 8
  37140. [2, 121, 97],
  37141. [2, 60, 38, 2, 61, 39],
  37142. [4, 40, 18, 2, 41, 19],
  37143. [4, 40, 14, 2, 41, 15],
  37144. // 9
  37145. [2, 146, 116],
  37146. [3, 58, 36, 2, 59, 37],
  37147. [4, 36, 16, 4, 37, 17],
  37148. [4, 36, 12, 4, 37, 13],
  37149. // 10
  37150. [2, 86, 68, 2, 87, 69],
  37151. [4, 69, 43, 1, 70, 44],
  37152. [6, 43, 19, 2, 44, 20],
  37153. [6, 43, 15, 2, 44, 16],
  37154. // 11
  37155. [4, 101, 81],
  37156. [1, 80, 50, 4, 81, 51],
  37157. [4, 50, 22, 4, 51, 23],
  37158. [3, 36, 12, 8, 37, 13],
  37159. // 12
  37160. [2, 116, 92, 2, 117, 93],
  37161. [6, 58, 36, 2, 59, 37],
  37162. [4, 46, 20, 6, 47, 21],
  37163. [7, 42, 14, 4, 43, 15],
  37164. // 13
  37165. [4, 133, 107],
  37166. [8, 59, 37, 1, 60, 38],
  37167. [8, 44, 20, 4, 45, 21],
  37168. [12, 33, 11, 4, 34, 12],
  37169. // 14
  37170. [3, 145, 115, 1, 146, 116],
  37171. [4, 64, 40, 5, 65, 41],
  37172. [11, 36, 16, 5, 37, 17],
  37173. [11, 36, 12, 5, 37, 13],
  37174. // 15
  37175. [5, 109, 87, 1, 110, 88],
  37176. [5, 65, 41, 5, 66, 42],
  37177. [5, 54, 24, 7, 55, 25],
  37178. [11, 36, 12],
  37179. // 16
  37180. [5, 122, 98, 1, 123, 99],
  37181. [7, 73, 45, 3, 74, 46],
  37182. [15, 43, 19, 2, 44, 20],
  37183. [3, 45, 15, 13, 46, 16],
  37184. // 17
  37185. [1, 135, 107, 5, 136, 108],
  37186. [10, 74, 46, 1, 75, 47],
  37187. [1, 50, 22, 15, 51, 23],
  37188. [2, 42, 14, 17, 43, 15],
  37189. // 18
  37190. [5, 150, 120, 1, 151, 121],
  37191. [9, 69, 43, 4, 70, 44],
  37192. [17, 50, 22, 1, 51, 23],
  37193. [2, 42, 14, 19, 43, 15],
  37194. // 19
  37195. [3, 141, 113, 4, 142, 114],
  37196. [3, 70, 44, 11, 71, 45],
  37197. [17, 47, 21, 4, 48, 22],
  37198. [9, 39, 13, 16, 40, 14],
  37199. // 20
  37200. [3, 135, 107, 5, 136, 108],
  37201. [3, 67, 41, 13, 68, 42],
  37202. [15, 54, 24, 5, 55, 25],
  37203. [15, 43, 15, 10, 44, 16],
  37204. // 21
  37205. [4, 144, 116, 4, 145, 117],
  37206. [17, 68, 42],
  37207. [17, 50, 22, 6, 51, 23],
  37208. [19, 46, 16, 6, 47, 17],
  37209. // 22
  37210. [2, 139, 111, 7, 140, 112],
  37211. [17, 74, 46],
  37212. [7, 54, 24, 16, 55, 25],
  37213. [34, 37, 13],
  37214. // 23
  37215. [4, 151, 121, 5, 152, 122],
  37216. [4, 75, 47, 14, 76, 48],
  37217. [11, 54, 24, 14, 55, 25],
  37218. [16, 45, 15, 14, 46, 16],
  37219. // 24
  37220. [6, 147, 117, 4, 148, 118],
  37221. [6, 73, 45, 14, 74, 46],
  37222. [11, 54, 24, 16, 55, 25],
  37223. [30, 46, 16, 2, 47, 17],
  37224. // 25
  37225. [8, 132, 106, 4, 133, 107],
  37226. [8, 75, 47, 13, 76, 48],
  37227. [7, 54, 24, 22, 55, 25],
  37228. [22, 45, 15, 13, 46, 16],
  37229. // 26
  37230. [10, 142, 114, 2, 143, 115],
  37231. [19, 74, 46, 4, 75, 47],
  37232. [28, 50, 22, 6, 51, 23],
  37233. [33, 46, 16, 4, 47, 17],
  37234. // 27
  37235. [8, 152, 122, 4, 153, 123],
  37236. [22, 73, 45, 3, 74, 46],
  37237. [8, 53, 23, 26, 54, 24],
  37238. [12, 45, 15, 28, 46, 16],
  37239. // 28
  37240. [3, 147, 117, 10, 148, 118],
  37241. [3, 73, 45, 23, 74, 46],
  37242. [4, 54, 24, 31, 55, 25],
  37243. [11, 45, 15, 31, 46, 16],
  37244. // 29
  37245. [7, 146, 116, 7, 147, 117],
  37246. [21, 73, 45, 7, 74, 46],
  37247. [1, 53, 23, 37, 54, 24],
  37248. [19, 45, 15, 26, 46, 16],
  37249. // 30
  37250. [5, 145, 115, 10, 146, 116],
  37251. [19, 75, 47, 10, 76, 48],
  37252. [15, 54, 24, 25, 55, 25],
  37253. [23, 45, 15, 25, 46, 16],
  37254. // 31
  37255. [13, 145, 115, 3, 146, 116],
  37256. [2, 74, 46, 29, 75, 47],
  37257. [42, 54, 24, 1, 55, 25],
  37258. [23, 45, 15, 28, 46, 16],
  37259. // 32
  37260. [17, 145, 115],
  37261. [10, 74, 46, 23, 75, 47],
  37262. [10, 54, 24, 35, 55, 25],
  37263. [19, 45, 15, 35, 46, 16],
  37264. // 33
  37265. [17, 145, 115, 1, 146, 116],
  37266. [14, 74, 46, 21, 75, 47],
  37267. [29, 54, 24, 19, 55, 25],
  37268. [11, 45, 15, 46, 46, 16],
  37269. // 34
  37270. [13, 145, 115, 6, 146, 116],
  37271. [14, 74, 46, 23, 75, 47],
  37272. [44, 54, 24, 7, 55, 25],
  37273. [59, 46, 16, 1, 47, 17],
  37274. // 35
  37275. [12, 151, 121, 7, 152, 122],
  37276. [12, 75, 47, 26, 76, 48],
  37277. [39, 54, 24, 14, 55, 25],
  37278. [22, 45, 15, 41, 46, 16],
  37279. // 36
  37280. [6, 151, 121, 14, 152, 122],
  37281. [6, 75, 47, 34, 76, 48],
  37282. [46, 54, 24, 10, 55, 25],
  37283. [2, 45, 15, 64, 46, 16],
  37284. // 37
  37285. [17, 152, 122, 4, 153, 123],
  37286. [29, 74, 46, 14, 75, 47],
  37287. [49, 54, 24, 10, 55, 25],
  37288. [24, 45, 15, 46, 46, 16],
  37289. // 38
  37290. [4, 152, 122, 18, 153, 123],
  37291. [13, 74, 46, 32, 75, 47],
  37292. [48, 54, 24, 14, 55, 25],
  37293. [42, 45, 15, 32, 46, 16],
  37294. // 39
  37295. [20, 147, 117, 4, 148, 118],
  37296. [40, 75, 47, 7, 76, 48],
  37297. [43, 54, 24, 22, 55, 25],
  37298. [10, 45, 15, 67, 46, 16],
  37299. // 40
  37300. [19, 148, 118, 6, 149, 119],
  37301. [18, 75, 47, 31, 76, 48],
  37302. [34, 54, 24, 34, 55, 25],
  37303. [20, 45, 15, 61, 46, 16]
  37304. ];
  37305. QRCodeAlg.prototype.getRightType = function() {
  37306. for (var typeNumber = 1; typeNumber < 41; typeNumber++) {
  37307. var rsBlock = RS_BLOCK_TABLE[(typeNumber - 1) * 4 + this.errorCorrectLevel];
  37308. if (rsBlock == void 0) {
  37309. throw new Error("bad rs block @ typeNumber:" + typeNumber + "/errorCorrectLevel:" + this.errorCorrectLevel);
  37310. }
  37311. var length = rsBlock.length / 3;
  37312. var totalDataCount = 0;
  37313. for (var i3 = 0; i3 < length; i3++) {
  37314. var count = rsBlock[i3 * 3 + 0];
  37315. var dataCount = rsBlock[i3 * 3 + 2];
  37316. totalDataCount += dataCount * count;
  37317. }
  37318. var lengthBytes = typeNumber > 9 ? 2 : 1;
  37319. if (this.utf8bytes.length + lengthBytes < totalDataCount || typeNumber == 40) {
  37320. this.typeNumber = typeNumber;
  37321. this.rsBlock = rsBlock;
  37322. this.totalDataCount = totalDataCount;
  37323. break;
  37324. }
  37325. }
  37326. };
  37327. function QRBitBuffer() {
  37328. this.buffer = new Array();
  37329. this.length = 0;
  37330. }
  37331. QRBitBuffer.prototype = {
  37332. get: function(index2) {
  37333. var bufIndex = Math.floor(index2 / 8);
  37334. return this.buffer[bufIndex] >>> 7 - index2 % 8 & 1;
  37335. },
  37336. put: function(num, length) {
  37337. for (var i3 = 0; i3 < length; i3++) {
  37338. this.putBit(num >>> length - i3 - 1 & 1);
  37339. }
  37340. },
  37341. putBit: function(bit) {
  37342. var bufIndex = Math.floor(this.length / 8);
  37343. if (this.buffer.length <= bufIndex) {
  37344. this.buffer.push(0);
  37345. }
  37346. if (bit) {
  37347. this.buffer[bufIndex] |= 128 >>> this.length % 8;
  37348. }
  37349. this.length++;
  37350. }
  37351. };
  37352. let qrcodeAlgObjCache = [];
  37353. QRCode = function(opt) {
  37354. this.options = {
  37355. text: "",
  37356. size: 256,
  37357. correctLevel: 3,
  37358. background: "#ffffff",
  37359. foreground: "#000000",
  37360. pdground: "#000000",
  37361. image: "",
  37362. imageSize: 30,
  37363. canvasId: opt.canvasId,
  37364. nvueContext: opt.nvueContext,
  37365. context: opt.context,
  37366. usingComponents: opt.usingComponents,
  37367. showLoading: opt.showLoading,
  37368. loadingText: opt.loadingText
  37369. };
  37370. let canvas = null;
  37371. if (typeof opt === "string") {
  37372. opt = {
  37373. text: opt
  37374. };
  37375. }
  37376. if (opt) {
  37377. for (var i3 in opt) {
  37378. this.options[i3] = opt[i3];
  37379. }
  37380. }
  37381. var qrCodeAlg = null;
  37382. for (var i3 = 0, l2 = qrcodeAlgObjCache.length; i3 < l2; i3++) {
  37383. if (qrcodeAlgObjCache[i3].text == this.options.text && qrcodeAlgObjCache[i3].text.correctLevel == this.options.correctLevel) {
  37384. qrCodeAlg = qrcodeAlgObjCache[i3].obj;
  37385. break;
  37386. }
  37387. }
  37388. if (i3 == l2) {
  37389. qrCodeAlg = new QRCodeAlg(this.options.text, this.options.correctLevel);
  37390. qrcodeAlgObjCache.push({
  37391. text: this.options.text,
  37392. correctLevel: this.options.correctLevel,
  37393. obj: qrCodeAlg
  37394. });
  37395. }
  37396. let getForeGround = function(config2) {
  37397. var options2 = config2.options;
  37398. if (options2.pdground && (config2.row > 1 && config2.row < 5 && config2.col > 1 && config2.col < 5 || config2.row > config2.count - 6 && config2.row < config2.count - 2 && config2.col > 1 && config2.col < 5 || config2.row > 1 && config2.row < 5 && config2.col > config2.count - 6 && config2.col < config2.count - 2)) {
  37399. return options2.pdground;
  37400. }
  37401. return options2.foreground;
  37402. };
  37403. let getCanvas = async (id) => {
  37404. return new Promise((resolve, reject) => {
  37405. try {
  37406. const query = uni.createSelectorQuery().in(this.options.context);
  37407. query.select(`#${id}`).fields({ node: true, size: true }).exec((res) => {
  37408. resolve(res[0].node);
  37409. });
  37410. } catch (e2) {
  37411. formatAppLog("error", "at uni_modules/uview-plus/components/u-qrcode/qrcode.js:1101", "createCanvasContextFail", e2);
  37412. }
  37413. });
  37414. };
  37415. let createCanvas = async function(options2) {
  37416. let isApp = false;
  37417. isApp = true;
  37418. if (options2.showLoading) {
  37419. uni.showLoading({
  37420. title: options2.loadingText,
  37421. mask: true
  37422. });
  37423. }
  37424. var ctx = "";
  37425. if (options2.nvueContext) {
  37426. ctx = options2.nvueContext;
  37427. } else {
  37428. canvas = await getCanvas(options2.canvasId);
  37429. ctx = uni.createCanvasContext(options2.canvasId, options2.context);
  37430. }
  37431. options2.context.ctx = ctx;
  37432. options2.context.canvas = canvas;
  37433. var count = qrCodeAlg.getModuleCount();
  37434. var ratioSize = options2.size;
  37435. var ratioImgSize = options2.imageSize;
  37436. var tileW = (ratioSize / count).toPrecision(4);
  37437. var tileH = (ratioSize / count).toPrecision(4);
  37438. for (var row = 0; row < count; row++) {
  37439. for (var col = 0; col < count; col++) {
  37440. var w2 = Math.ceil((col + 1) * tileW) - Math.floor(col * tileW);
  37441. var h2 = Math.ceil((row + 1) * tileH) - Math.floor(row * tileH);
  37442. var foreground = getForeGround({
  37443. row,
  37444. col,
  37445. count,
  37446. options: options2
  37447. });
  37448. if (options2.nvueContext) {
  37449. ctx.setFillStyle(qrCodeAlg.modules[row][col] ? foreground : options2.background);
  37450. } else {
  37451. ctx.fillStyle = qrCodeAlg.modules[row][col] ? foreground : options2.background;
  37452. }
  37453. ctx.fillRect(Math.round(col * tileW), Math.round(row * tileH), w2, h2);
  37454. }
  37455. }
  37456. if (options2.image) {
  37457. let drawRoundedRect = function(ctxi, x3, y3, width, height, r2, lineWidth, fill, stroke) {
  37458. if (options2.nvueContext || isApp) {
  37459. ctxi.setLineWidth(lineWidth);
  37460. ctxi.setFillStyle(options2.background);
  37461. ctxi.setStrokeStyle(options2.background);
  37462. } else {
  37463. ctxi.lineWidth = lineWidth;
  37464. ctxi.fillStyle = options2.background;
  37465. ctxi.strokeStyle = options2.background;
  37466. }
  37467. ctxi.beginPath();
  37468. ctxi.moveTo(x3 + r2, y3);
  37469. ctxi.lineTo(x3 + width, y3);
  37470. ctxi.arc(x3 + width - r2, y3 + r2, r2, -Math.PI / 2, 0);
  37471. ctxi.lineTo(x3 + width, y3 + height - r2);
  37472. ctxi.arc(x3 + width - r2, y3 + height - r2, r2, 0, Math.PI / 2);
  37473. ctxi.lineTo(x3 + r2, y3 + height);
  37474. ctxi.arc(x3 + r2, y3 + height - r2, r2, Math.PI / 2, Math.PI);
  37475. ctxi.lineTo(x3, y3 + r2);
  37476. ctxi.arc(x3 + r2, y3 + r2, r2, Math.PI, Math.PI * 3 / 2);
  37477. ctxi.closePath();
  37478. if (fill) {
  37479. ctxi.fill();
  37480. }
  37481. if (stroke) {
  37482. ctxi.stroke();
  37483. }
  37484. };
  37485. var x2 = Number(((ratioSize - ratioImgSize) / 2).toFixed(2));
  37486. var y2 = Number(((ratioSize - ratioImgSize) / 2).toFixed(2));
  37487. drawRoundedRect(ctx, x2, y2, ratioImgSize, ratioImgSize, 2, 6, true, true);
  37488. if (options2.nvueContext) {
  37489. ctx.drawImage(options2.image, x2, y2, ratioImgSize, ratioImgSize);
  37490. } else {
  37491. const img = new Image();
  37492. img.onload = () => {
  37493. ctx.drawImage(img, x2, y2, ratioImgSize, ratioImgSize);
  37494. };
  37495. img.src = options2.image;
  37496. }
  37497. }
  37498. setTimeout(() => {
  37499. if (options2.nvueContext || isApp) {
  37500. ctx.draw(true, () => {
  37501. setTimeout(() => {
  37502. if (options2.nvueContext) {
  37503. ctx.toTempFilePath(
  37504. 0,
  37505. 0,
  37506. options2.width,
  37507. options2.height,
  37508. options2.width,
  37509. options2.height,
  37510. "",
  37511. 1,
  37512. function(res) {
  37513. if (options2.cbResult) {
  37514. options2.cbResult(res.tempFilePath);
  37515. }
  37516. }
  37517. );
  37518. } else {
  37519. uni.canvasToTempFilePath({
  37520. width: options2.width,
  37521. height: options2.height,
  37522. destWidth: options2.width,
  37523. destHeight: options2.height,
  37524. canvasId: options2.canvasId,
  37525. quality: Number(1),
  37526. success: function(res) {
  37527. if (options2.cbResult) {
  37528. if (!empty2(res.tempFilePath)) {
  37529. options2.cbResult(res.tempFilePath);
  37530. } else if (!empty2(res.apFilePath)) {
  37531. options2.cbResult(res.apFilePath);
  37532. } else {
  37533. options2.cbResult(res.tempFilePath);
  37534. }
  37535. }
  37536. },
  37537. fail: function(res) {
  37538. if (options2.cbResult) {
  37539. options2.cbResult(res);
  37540. }
  37541. },
  37542. complete: function() {
  37543. uni.hideLoading();
  37544. }
  37545. }, options2.context);
  37546. }
  37547. }, options2.text.length + 100);
  37548. });
  37549. } else {
  37550. options2.cbResult("");
  37551. }
  37552. }, options2.usingComponents ? 0 : 150);
  37553. };
  37554. createCanvas(this.options);
  37555. let empty2 = function(v2) {
  37556. let tp = typeof v2, rt = false;
  37557. if (tp == "number" && String(v2) == "") {
  37558. rt = true;
  37559. } else if (tp == "undefined") {
  37560. rt = true;
  37561. } else if (tp == "object") {
  37562. if (JSON.stringify(v2) == "{}" || JSON.stringify(v2) == "[]" || v2 == null)
  37563. rt = true;
  37564. } else if (tp == "string") {
  37565. if (v2 == "" || v2 == "undefined" || v2 == "null" || v2 == "{}" || v2 == "[]")
  37566. rt = true;
  37567. } else if (tp == "function") {
  37568. rt = false;
  37569. }
  37570. return rt;
  37571. };
  37572. };
  37573. QRCode.prototype.clear = function(fn) {
  37574. var ctx = "";
  37575. if (options.nvueContext) {
  37576. ctx = options.nvueContext;
  37577. } else {
  37578. uni.createCanvasContext(this.options.canvasId, this.options.context);
  37579. }
  37580. ctx.clearRect(0, 0, this.options.size, this.options.size);
  37581. ctx.draw(false, () => {
  37582. if (fn) {
  37583. fn();
  37584. }
  37585. });
  37586. };
  37587. })();
  37588. const QRCode$1 = QRCode;
  37589. let qrcode;
  37590. const _sfc_main$Q = {
  37591. name: "u-qrcode",
  37592. props: {
  37593. cid: {
  37594. type: String,
  37595. default: () => `u-qrcode-canvas${Math.floor(Math.random() * 1e6)}`
  37596. },
  37597. size: {
  37598. type: Number,
  37599. default: 200
  37600. },
  37601. unit: {
  37602. type: String,
  37603. default: "px"
  37604. },
  37605. show: {
  37606. type: Boolean,
  37607. default: true
  37608. },
  37609. val: {
  37610. type: String,
  37611. default: ""
  37612. },
  37613. background: {
  37614. type: String,
  37615. default: "#ffffff"
  37616. },
  37617. foreground: {
  37618. type: String,
  37619. default: "#000000"
  37620. },
  37621. pdground: {
  37622. type: String,
  37623. default: "#000000"
  37624. },
  37625. icon: {
  37626. type: String,
  37627. default: ""
  37628. },
  37629. iconSize: {
  37630. type: Number,
  37631. default: 40
  37632. },
  37633. lv: {
  37634. type: Number,
  37635. default: 3
  37636. },
  37637. onval: {
  37638. type: Boolean,
  37639. default: true
  37640. },
  37641. loadMake: {
  37642. type: Boolean,
  37643. default: true
  37644. },
  37645. usingComponents: {
  37646. type: Boolean,
  37647. default: true
  37648. },
  37649. showLoading: {
  37650. type: Boolean,
  37651. default: true
  37652. },
  37653. loadingText: {
  37654. type: String,
  37655. default: "生成中"
  37656. },
  37657. allowPreview: {
  37658. type: Boolean,
  37659. default: false
  37660. },
  37661. // 是否使用根节点宽高
  37662. useRootHeightAndWidth: {
  37663. type: Boolean,
  37664. default: () => false
  37665. }
  37666. },
  37667. emits: ["result", "longpressCallback"],
  37668. data() {
  37669. return {
  37670. loading: false,
  37671. result: "",
  37672. popupShow: false,
  37673. list: [
  37674. {
  37675. name: "保存二维码"
  37676. }
  37677. ],
  37678. rootId: `rootId${Number(Math.random() * 100).toFixed(0)}`,
  37679. ganvas: null,
  37680. context: "",
  37681. canvasObj: {},
  37682. sizeLocal: this.size,
  37683. ctx: null,
  37684. // ctx 在new Qrcode 时js文件内部设置
  37685. canvas: null
  37686. // ctx 在new Qrcode 时js文件内部设置
  37687. };
  37688. },
  37689. async mounted() {
  37690. if (this.useRootHeightAndWidth) {
  37691. await this.setNewSize();
  37692. }
  37693. if (this.loadMake) {
  37694. if (!this._empty(this.val)) {
  37695. setTimeout(() => {
  37696. setTimeout(() => {
  37697. this._makeCode();
  37698. });
  37699. }, 0);
  37700. }
  37701. }
  37702. },
  37703. methods: {
  37704. _makeCode() {
  37705. let that2 = this;
  37706. if (!this._empty(this.val)) {
  37707. this.loading = true;
  37708. qrcode = new QRCode$1({
  37709. context: that2,
  37710. // 上下文环境
  37711. canvasId: that2.cid,
  37712. // canvas-id
  37713. nvueContext: that2.context,
  37714. usingComponents: that2.usingComponents,
  37715. // 是否是自定义组件
  37716. showLoading: false,
  37717. // 是否显示loading
  37718. loadingText: that2.loadingText,
  37719. // loading文字
  37720. text: that2.val,
  37721. // 生成内容
  37722. size: that2.sizeLocal,
  37723. // 二维码大小
  37724. background: that2.background,
  37725. // 背景色
  37726. foreground: that2.foreground,
  37727. // 前景色
  37728. pdground: that2.pdground,
  37729. // 定位角点颜色
  37730. correctLevel: that2.lv,
  37731. // 容错级别
  37732. image: that2.icon,
  37733. // 二维码图标
  37734. imageSize: that2.iconSize,
  37735. // 二维码图标大小
  37736. cbResult: function(res) {
  37737. that2._result(res);
  37738. }
  37739. });
  37740. } else {
  37741. uni.showToast({
  37742. title: "二维码内容不能为空",
  37743. icon: "none",
  37744. duration: 2e3
  37745. });
  37746. }
  37747. },
  37748. _clearCode() {
  37749. this._result("");
  37750. qrcode.clear();
  37751. },
  37752. _saveCode() {
  37753. let that2 = this;
  37754. if (this.result != "") {
  37755. uni.saveImageToPhotosAlbum({
  37756. filePath: that2.result,
  37757. success: function() {
  37758. uni.showToast({
  37759. title: "二维码保存成功",
  37760. icon: "success",
  37761. duration: 2e3
  37762. });
  37763. }
  37764. });
  37765. }
  37766. },
  37767. preview(e2) {
  37768. if (this.allowPreview) {
  37769. uni.previewImage({
  37770. urls: [this.result],
  37771. longPressActions: {
  37772. itemList: ["保存二维码图片"],
  37773. success: function(data) {
  37774. switch (data.tapIndex) {
  37775. case 0:
  37776. that._saveCode();
  37777. break;
  37778. }
  37779. },
  37780. fail: function(err) {
  37781. formatAppLog("log", "at uni_modules/uview-plus/components/u-qrcode/u-qrcode.vue:254", err.errMsg);
  37782. }
  37783. }
  37784. });
  37785. }
  37786. this.$emit("preview", {
  37787. url: this.result
  37788. }, e2);
  37789. },
  37790. async toTempFilePath({ success, fail }) {
  37791. if (this.context) {
  37792. this.ctx.toTempFilePath(
  37793. 0,
  37794. 0,
  37795. this.sizeLocal,
  37796. this.sizeLocal,
  37797. this.sizeLocal,
  37798. this.sizeLocal,
  37799. "",
  37800. 1,
  37801. (res) => {
  37802. success(res);
  37803. }
  37804. );
  37805. } else {
  37806. uni.canvasToTempFilePath(
  37807. {
  37808. canvasId: this.cid,
  37809. success: (res) => {
  37810. success(res);
  37811. },
  37812. fail
  37813. },
  37814. this
  37815. );
  37816. }
  37817. },
  37818. async longpress() {
  37819. this.toTempFilePath({
  37820. success: (res) => {
  37821. this.$emit("longpressCallback", res.tempFilePath);
  37822. },
  37823. fail: (err) => {
  37824. }
  37825. });
  37826. },
  37827. /**
  37828. * 使用根节点宽高 设置新的size
  37829. * @return {Promise<void>}
  37830. */
  37831. async setNewSize() {
  37832. const rootNode = await this.getNode(this.rootId, false);
  37833. const { width, height } = rootNode;
  37834. if (width > height) {
  37835. this.sizeLocal = height;
  37836. } else {
  37837. this.sizeLocal = width;
  37838. }
  37839. },
  37840. /**
  37841. * 获取节点
  37842. * @param id 节点id
  37843. * @param isCanvas 是否为Canvas节点
  37844. * @return {Promise<unknown>}
  37845. */
  37846. async getNode(id, isCanvas) {
  37847. return new Promise((resolve, reject) => {
  37848. try {
  37849. const query = uni.createSelectorQuery().in(this);
  37850. query.select(`#${id}`).fields({ node: true, size: true }).exec((res) => {
  37851. if (isCanvas) {
  37852. resolve(res[0].node);
  37853. } else {
  37854. resolve(res[0]);
  37855. }
  37856. });
  37857. } catch (e2) {
  37858. formatAppLog("error", "at uni_modules/uview-plus/components/u-qrcode/u-qrcode.vue:361", "获取节点失败", e2);
  37859. }
  37860. });
  37861. },
  37862. selectClick(index2) {
  37863. switch (index2) {
  37864. case 0:
  37865. alert("保存二维码");
  37866. this._saveCode();
  37867. break;
  37868. }
  37869. },
  37870. _result(res) {
  37871. this.loading = false;
  37872. this.result = res;
  37873. this.$emit("result", res);
  37874. },
  37875. _empty(v2) {
  37876. let tp = typeof v2, rt = false;
  37877. if (tp == "number" && String(v2) == "") {
  37878. rt = true;
  37879. } else if (tp == "undefined") {
  37880. rt = true;
  37881. } else if (tp == "object") {
  37882. if (JSON.stringify(v2) == "{}" || JSON.stringify(v2) == "[]" || v2 == null)
  37883. rt = true;
  37884. } else if (tp == "string") {
  37885. if (v2 == "" || v2 == "undefined" || v2 == "null" || v2 == "{}" || v2 == "[]")
  37886. rt = true;
  37887. } else if (tp == "function") {
  37888. rt = false;
  37889. }
  37890. return rt;
  37891. }
  37892. },
  37893. watch: {
  37894. size: function(n2, o2) {
  37895. if (n2 != o2 && !this._empty(n2)) {
  37896. this.cSize = n2;
  37897. if (!this._empty(this.val)) {
  37898. setTimeout(() => {
  37899. this._makeCode();
  37900. }, 100);
  37901. }
  37902. }
  37903. },
  37904. val: function(n2, o2) {
  37905. if (this.onval) {
  37906. if (n2 != o2 && !this._empty(n2)) {
  37907. setTimeout(() => {
  37908. this._makeCode();
  37909. }, 0);
  37910. }
  37911. }
  37912. }
  37913. },
  37914. computed: {}
  37915. };
  37916. function _sfc_render$P(_ctx, _cache, $props, $setup, $data, $options) {
  37917. const _component_up_loading_icon = vue.resolveComponent("up-loading-icon");
  37918. return vue.openBlock(), vue.createElementBlock("view", {
  37919. class: "u-qrcode",
  37920. id: $data.rootId,
  37921. style: vue.normalizeStyle({
  37922. width: $props.useRootHeightAndWidth ? "100%" : "auto",
  37923. height: $props.useRootHeightAndWidth ? "100%" : "auto"
  37924. }),
  37925. onLongpress: _cache[1] || (_cache[1] = (...args) => $options.longpress && $options.longpress(...args))
  37926. }, [
  37927. vue.createElementVNode("view", {
  37928. class: "u-qrcode__content",
  37929. onClick: _cache[0] || (_cache[0] = (...args) => $options.preview && $options.preview(...args))
  37930. }, [
  37931. vue.createElementVNode("canvas", {
  37932. class: "u-qrcode__canvas",
  37933. id: $props.cid,
  37934. "canvas-id": $props.cid,
  37935. style: vue.normalizeStyle({ width: $data.sizeLocal + $props.unit, height: $data.sizeLocal + $props.unit })
  37936. }, null, 12, ["id", "canvas-id"]),
  37937. vue.createElementVNode("canvas", {
  37938. class: "u-qrcode__canvas",
  37939. id: $props.cid,
  37940. "canvas-id": $props.cid,
  37941. style: vue.normalizeStyle({ width: $data.sizeLocal + $props.unit, height: $data.sizeLocal + $props.unit })
  37942. }, null, 12, ["id", "canvas-id"]),
  37943. $props.showLoading && $data.loading ? (vue.openBlock(), vue.createElementBlock(
  37944. "view",
  37945. {
  37946. key: 0,
  37947. class: "u-qrcode__loading",
  37948. style: vue.normalizeStyle({ width: $data.sizeLocal + $props.unit, height: $data.sizeLocal + $props.unit })
  37949. },
  37950. [
  37951. vue.createVNode(_component_up_loading_icon, {
  37952. vertical: "",
  37953. text: $props.loadingText,
  37954. textSize: "14px"
  37955. }, null, 8, ["text"])
  37956. ],
  37957. 4
  37958. /* STYLE */
  37959. )) : vue.createCommentVNode("v-if", true)
  37960. ])
  37961. ], 44, ["id"]);
  37962. }
  37963. const uQrcode = /* @__PURE__ */ _export_sfc(_sfc_main$Q, [["render", _sfc_render$P], ["__scopeId", "data-v-44e78b4f"], ["__file", "C:/Users/EDY/Desktop/项目/shuibei/uni_modules/uview-plus/components/u-qrcode/u-qrcode.vue"]]);
  37964. const __vite_glob_0_82 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
  37965. __proto__: null,
  37966. default: uQrcode
  37967. }, Symbol.toStringTag, { value: "Module" }));
  37968. const props$u = defineMixin({
  37969. props: {
  37970. // 绑定的值
  37971. modelValue: {
  37972. type: [String, Number, Boolean],
  37973. default: () => props$1x.radioGroup.value
  37974. },
  37975. // 是否禁用全部radio
  37976. disabled: {
  37977. type: Boolean,
  37978. default: () => props$1x.radioGroup.disabled
  37979. },
  37980. // 形状,circle-圆形,square-方形
  37981. shape: {
  37982. type: String,
  37983. default: () => props$1x.radioGroup.shape
  37984. },
  37985. // 选中状态下的颜色,如设置此值,将会覆盖parent的activeColor值
  37986. activeColor: {
  37987. type: String,
  37988. default: () => props$1x.radioGroup.activeColor
  37989. },
  37990. // 未选中的颜色
  37991. inactiveColor: {
  37992. type: String,
  37993. default: () => props$1x.radioGroup.inactiveColor
  37994. },
  37995. // 标识符
  37996. name: {
  37997. type: String,
  37998. default: () => props$1x.radioGroup.name
  37999. },
  38000. // 整个组件的尺寸,默认px
  38001. size: {
  38002. type: [String, Number],
  38003. default: () => props$1x.radioGroup.size
  38004. },
  38005. // 布局方式,row-横向,column-纵向
  38006. placement: {
  38007. type: String,
  38008. default: () => props$1x.radioGroup.placement
  38009. },
  38010. // label的文本
  38011. label: {
  38012. type: [String],
  38013. default: () => props$1x.radioGroup.label
  38014. },
  38015. // label的颜色 (默认 '#303133' )
  38016. labelColor: {
  38017. type: [String],
  38018. default: () => props$1x.radioGroup.labelColor
  38019. },
  38020. // label的字体大小,px单位
  38021. labelSize: {
  38022. type: [String, Number],
  38023. default: () => props$1x.radioGroup.labelSize
  38024. },
  38025. // 是否禁止点击文本操作checkbox(默认 false )
  38026. labelDisabled: {
  38027. type: Boolean,
  38028. default: () => props$1x.radioGroup.labelDisabled
  38029. },
  38030. // 图标颜色
  38031. iconColor: {
  38032. type: String,
  38033. default: () => props$1x.radioGroup.iconColor
  38034. },
  38035. // 图标的大小,单位px
  38036. iconSize: {
  38037. type: [String, Number],
  38038. default: () => props$1x.radioGroup.iconSize
  38039. },
  38040. // 竖向配列时,是否显示下划线
  38041. borderBottom: {
  38042. type: Boolean,
  38043. default: () => props$1x.radioGroup.borderBottom
  38044. },
  38045. // 图标与文字的对齐方式
  38046. iconPlacement: {
  38047. type: String,
  38048. default: () => props$1x.radio.iconPlacement
  38049. },
  38050. // item 之间的间距
  38051. gap: {
  38052. type: [String, Number],
  38053. default: () => props$1x.radioGroup.gap
  38054. }
  38055. }
  38056. });
  38057. const _sfc_main$P = {
  38058. name: "u-radio-group",
  38059. mixins: [mpMixin, mixin, props$u],
  38060. computed: {
  38061. // 这里computed的变量,都是子组件u-radio需要用到的,由于头条小程序的兼容性差异,子组件无法实时监听父组件参数的变化
  38062. // 所以需要手动通知子组件,这里返回一个parentData变量,供watch监听,在其中去通知每一个子组件重新从父组件(u-radio-group)
  38063. // 拉取父组件新的变化后的参数
  38064. parentData() {
  38065. return [
  38066. this.modelValue,
  38067. this.disabled,
  38068. this.inactiveColor,
  38069. this.activeColor,
  38070. this.size,
  38071. this.labelDisabled,
  38072. this.shape,
  38073. this.iconSize,
  38074. this.borderBottom,
  38075. this.placement
  38076. ];
  38077. },
  38078. bemClass() {
  38079. return this.bem("radio-group", ["placement"]);
  38080. },
  38081. radioGroupStyle() {
  38082. const style = {
  38083. gap: addUnit(this.gap)
  38084. };
  38085. return deepMerge$1(style, addStyle(this.customStyle));
  38086. }
  38087. },
  38088. watch: {
  38089. // 当父组件需要子组件需要共享的参数发生了变化,手动通知子组件
  38090. parentData() {
  38091. if (this.children.length) {
  38092. this.children.map((child) => {
  38093. typeof child.init === "function" && child.init();
  38094. });
  38095. }
  38096. }
  38097. },
  38098. data() {
  38099. return {};
  38100. },
  38101. created() {
  38102. this.children = [];
  38103. },
  38104. emits: ["update:modelValue", "change"],
  38105. methods: {
  38106. // 将其他的radio设置为未选中的状态
  38107. unCheckedOther(childInstance) {
  38108. this.children.map((child) => {
  38109. if (childInstance !== child) {
  38110. child.checked = false;
  38111. }
  38112. });
  38113. const {
  38114. name: name2
  38115. } = childInstance;
  38116. this.$emit("update:modelValue", name2);
  38117. this.$emit("change", name2);
  38118. }
  38119. }
  38120. };
  38121. function _sfc_render$O(_ctx, _cache, $props, $setup, $data, $options) {
  38122. return vue.openBlock(), vue.createElementBlock(
  38123. "view",
  38124. {
  38125. class: vue.normalizeClass(["u-radio-group", $options.bemClass]),
  38126. style: vue.normalizeStyle($options.radioGroupStyle)
  38127. },
  38128. [
  38129. vue.renderSlot(_ctx.$slots, "default", {}, void 0, true)
  38130. ],
  38131. 6
  38132. /* CLASS, STYLE */
  38133. );
  38134. }
  38135. const uRadioGroup = /* @__PURE__ */ _export_sfc(_sfc_main$P, [["render", _sfc_render$O], ["__scopeId", "data-v-cbc8bf70"], ["__file", "C:/Users/EDY/Desktop/项目/shuibei/uni_modules/uview-plus/components/u-radio-group/u-radio-group.vue"]]);
  38136. const __vite_glob_0_83 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
  38137. __proto__: null,
  38138. default: uRadioGroup
  38139. }, Symbol.toStringTag, { value: "Module" }));
  38140. const props$t = defineMixin({
  38141. props: {
  38142. // radio的名称
  38143. name: {
  38144. type: [String, Number, Boolean],
  38145. default: () => props$1x.radio.name
  38146. },
  38147. // 形状,square为方形,circle为圆型
  38148. shape: {
  38149. type: String,
  38150. default: () => props$1x.radio.shape
  38151. },
  38152. // 是否禁用
  38153. disabled: {
  38154. type: [String, Boolean],
  38155. default: () => props$1x.radio.disabled
  38156. },
  38157. // 是否禁止点击提示语选中单选框
  38158. labelDisabled: {
  38159. type: [String, Boolean],
  38160. default: () => props$1x.radio.labelDisabled
  38161. },
  38162. // 选中状态下的颜色,如设置此值,将会覆盖parent的activeColor值
  38163. activeColor: {
  38164. type: String,
  38165. default: () => props$1x.radio.activeColor
  38166. },
  38167. // 未选中的颜色
  38168. inactiveColor: {
  38169. type: String,
  38170. default: () => props$1x.radio.inactiveColor
  38171. },
  38172. // 图标的大小,单位px
  38173. iconSize: {
  38174. type: [String, Number],
  38175. default: () => props$1x.radio.iconSize
  38176. },
  38177. // label的字体大小,px单位
  38178. labelSize: {
  38179. type: [String, Number],
  38180. default: () => props$1x.radio.labelSize
  38181. },
  38182. // label提示文字,因为nvue下,直接slot进来的文字,由于特殊的结构,无法修改样式
  38183. label: {
  38184. type: [String, Number],
  38185. default: () => props$1x.radio.label
  38186. },
  38187. // 整体的大小
  38188. size: {
  38189. type: [String, Number],
  38190. default: () => props$1x.radio.size
  38191. },
  38192. // 图标颜色
  38193. color: {
  38194. type: String,
  38195. default: () => props$1x.radio.color
  38196. },
  38197. // label的颜色
  38198. labelColor: {
  38199. type: String,
  38200. default: () => props$1x.radio.labelColor
  38201. },
  38202. // 图标颜色
  38203. iconColor: {
  38204. type: String,
  38205. default: () => props$1x.radio.iconColor
  38206. }
  38207. }
  38208. });
  38209. const _sfc_main$O = {
  38210. name: "u-radio",
  38211. mixins: [mpMixin, mixin, props$t],
  38212. data() {
  38213. return {
  38214. checked: false,
  38215. // 当你看到这段代码的时候,
  38216. // 父组件的默认值,因为头条小程序不支持在computed中使用this.parent.shape的形式
  38217. // 故只能使用如此方法
  38218. parentData: {
  38219. iconSize: 12,
  38220. labelDisabled: null,
  38221. disabled: null,
  38222. shape: null,
  38223. activeColor: null,
  38224. inactiveColor: null,
  38225. size: 18,
  38226. value: null,
  38227. modelValue: null,
  38228. iconColor: null,
  38229. placement: "row",
  38230. borderBottom: false,
  38231. iconPlacement: "left"
  38232. }
  38233. };
  38234. },
  38235. computed: {
  38236. // 是否禁用,如果父组件u-raios-group禁用的话,将会忽略子组件的配置
  38237. elDisabled() {
  38238. return this.disabled !== "" ? this.disabled : this.parentData.disabled !== null ? this.parentData.disabled : false;
  38239. },
  38240. // 是否禁用label点击
  38241. elLabelDisabled() {
  38242. return this.labelDisabled !== "" ? this.labelDisabled : this.parentData.labelDisabled !== null ? this.parentData.labelDisabled : false;
  38243. },
  38244. // 组件尺寸,对应size的值,默认值为21px
  38245. elSize() {
  38246. return this.size ? this.size : this.parentData.size ? this.parentData.size : 21;
  38247. },
  38248. // 组件的勾选图标的尺寸,默认12px
  38249. elIconSize() {
  38250. return this.iconSize ? this.iconSize : this.parentData.iconSize ? this.parentData.iconSize : 12;
  38251. },
  38252. // 组件选中激活时的颜色
  38253. elActiveColor() {
  38254. return this.activeColor ? this.activeColor : this.parentData.activeColor ? this.parentData.activeColor : "#2979ff";
  38255. },
  38256. // 组件选未中激活时的颜色
  38257. elInactiveColor() {
  38258. return this.inactiveColor ? this.inactiveColor : this.parentData.inactiveColor ? this.parentData.inactiveColor : "#c8c9cc";
  38259. },
  38260. // label的颜色
  38261. elLabelColor() {
  38262. return this.labelColor ? this.labelColor : this.parentData.labelColor ? this.parentData.labelColor : "#606266";
  38263. },
  38264. // 组件的形状
  38265. elShape() {
  38266. return this.shape ? this.shape : this.parentData.shape ? this.parentData.shape : "circle";
  38267. },
  38268. // label大小
  38269. elLabelSize() {
  38270. return addUnit(this.labelSize ? this.labelSize : this.parentData.labelSize ? this.parentData.labelSize : "15");
  38271. },
  38272. elIconColor() {
  38273. const iconColor = this.iconColor ? this.iconColor : this.parentData.iconColor ? this.parentData.iconColor : "#ffffff";
  38274. if (this.elDisabled) {
  38275. return this.checked ? this.elInactiveColor : "transparent";
  38276. } else {
  38277. return this.checked ? iconColor : "transparent";
  38278. }
  38279. },
  38280. iconClasses() {
  38281. let classes = [];
  38282. classes.push("u-radio__icon-wrap--" + this.elShape);
  38283. if (this.elDisabled) {
  38284. classes.push("u-radio__icon-wrap--disabled");
  38285. }
  38286. if (this.checked && this.elDisabled) {
  38287. classes.push("u-radio__icon-wrap--disabled--checked");
  38288. }
  38289. return classes;
  38290. },
  38291. iconWrapStyle() {
  38292. const style = {};
  38293. style.backgroundColor = this.checked && !this.elDisabled ? this.elActiveColor : "#ffffff";
  38294. style.borderColor = this.checked && !this.elDisabled ? this.elActiveColor : this.elInactiveColor;
  38295. style.width = addUnit(this.elSize);
  38296. style.height = addUnit(this.elSize);
  38297. if (this.parentData.iconPlacement === "right") {
  38298. style.marginRight = 0;
  38299. }
  38300. return style;
  38301. },
  38302. radioStyle() {
  38303. const style = {};
  38304. if (this.parentData.borderBottom && this.parentData.placement === "row") {
  38305. error("检测到您将borderBottom设置为true,需要同时将u-radio-group的placement设置为column才有效");
  38306. }
  38307. if (this.parentData.borderBottom && this.parentData.placement === "column") {
  38308. style.paddingBottom = os() === "ios" ? "12px" : "8px";
  38309. }
  38310. return deepMerge$1(style, addStyle(this.customStyle));
  38311. }
  38312. },
  38313. mounted() {
  38314. this.init();
  38315. },
  38316. emits: ["change"],
  38317. methods: {
  38318. init() {
  38319. this.updateParentData();
  38320. if (!this.parent) {
  38321. error("u-radio必须搭配u-radio-group组件使用");
  38322. }
  38323. this.checked = this.name === this.parentData.modelValue;
  38324. },
  38325. updateParentData() {
  38326. this.getParentData("u-radio-group");
  38327. },
  38328. // 点击图标
  38329. iconClickHandler(e2) {
  38330. this.preventEvent(e2);
  38331. if (!this.elDisabled) {
  38332. this.setRadioCheckedStatus();
  38333. }
  38334. },
  38335. // 横向两端排列时,点击组件即可触发选中事件
  38336. wrapperClickHandler(e2) {
  38337. this.parentData.iconPlacement === "right" && this.iconClickHandler(e2);
  38338. },
  38339. // 点击label
  38340. labelClickHandler(e2) {
  38341. this.preventEvent(e2);
  38342. if (!this.elLabelDisabled && !this.elDisabled) {
  38343. this.setRadioCheckedStatus();
  38344. }
  38345. },
  38346. emitEvent() {
  38347. if (!this.checked) {
  38348. this.$emit("change", this.name);
  38349. this.$nextTick(() => {
  38350. formValidate(this, "change");
  38351. });
  38352. }
  38353. },
  38354. // 改变组件选中状态
  38355. // 这里的改变的依据是,更改本组件的checked值为true,同时通过父组件遍历所有u-radio实例
  38356. // 将本组件外的其他u-radio的checked都设置为false(都被取消选中状态),因而只剩下一个为选中状态
  38357. setRadioCheckedStatus() {
  38358. this.emitEvent();
  38359. this.checked = true;
  38360. typeof this.parent.unCheckedOther === "function" && this.parent.unCheckedOther(this);
  38361. }
  38362. }
  38363. };
  38364. function _sfc_render$N(_ctx, _cache, $props, $setup, $data, $options) {
  38365. const _component_up_icon = vue.resolveComponent("up-icon");
  38366. return vue.openBlock(), vue.createElementBlock(
  38367. "view",
  38368. {
  38369. class: vue.normalizeClass(["u-radio cursor-pointer", [`u-radio-label--${$data.parentData.iconPlacement}`, $data.parentData.borderBottom && $data.parentData.placement === "column" && "u-border-bottom"]]),
  38370. onClick: _cache[2] || (_cache[2] = vue.withModifiers((...args) => $options.wrapperClickHandler && $options.wrapperClickHandler(...args), ["stop"])),
  38371. style: vue.normalizeStyle([$options.radioStyle])
  38372. },
  38373. [
  38374. vue.createElementVNode(
  38375. "view",
  38376. {
  38377. class: vue.normalizeClass(["u-radio__icon-wrap cursor-pointer", $options.iconClasses]),
  38378. onClick: _cache[0] || (_cache[0] = vue.withModifiers((...args) => $options.iconClickHandler && $options.iconClickHandler(...args), ["stop"])),
  38379. style: vue.normalizeStyle([$options.iconWrapStyle])
  38380. },
  38381. [
  38382. vue.renderSlot(_ctx.$slots, "icon", {
  38383. elIconSize: $options.elIconSize,
  38384. elIconColor: $options.elIconColor
  38385. }, () => [
  38386. vue.createVNode(_component_up_icon, {
  38387. class: "u-radio__icon-wrap__icon",
  38388. name: "checkbox-mark",
  38389. size: $options.elIconSize,
  38390. color: $options.elIconColor
  38391. }, null, 8, ["size", "color"])
  38392. ], true)
  38393. ],
  38394. 6
  38395. /* CLASS, STYLE */
  38396. ),
  38397. vue.createElementVNode("view", {
  38398. class: "u-radio__label-wrap cursor-pointer",
  38399. onClick: _cache[1] || (_cache[1] = vue.withModifiers((...args) => $options.labelClickHandler && $options.labelClickHandler(...args), ["stop"]))
  38400. }, [
  38401. vue.renderSlot(_ctx.$slots, "label", {
  38402. label: _ctx.label,
  38403. elDisabled: $options.elDisabled
  38404. }, () => [
  38405. vue.createElementVNode(
  38406. "text",
  38407. {
  38408. class: "u-radio__text",
  38409. style: vue.normalizeStyle({
  38410. color: $options.elDisabled ? $options.elInactiveColor : $options.elLabelColor,
  38411. fontSize: $options.elLabelSize,
  38412. lineHeight: $options.elLabelSize
  38413. })
  38414. },
  38415. vue.toDisplayString(_ctx.label),
  38416. 5
  38417. /* TEXT, STYLE */
  38418. )
  38419. ], true)
  38420. ])
  38421. ],
  38422. 6
  38423. /* CLASS, STYLE */
  38424. );
  38425. }
  38426. const uRadio = /* @__PURE__ */ _export_sfc(_sfc_main$O, [["render", _sfc_render$N], ["__scopeId", "data-v-83036558"], ["__file", "C:/Users/EDY/Desktop/项目/shuibei/uni_modules/uview-plus/components/u-radio/u-radio.vue"]]);
  38427. const __vite_glob_0_84 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
  38428. __proto__: null,
  38429. default: uRadio
  38430. }, Symbol.toStringTag, { value: "Module" }));
  38431. const props$s = defineMixin({
  38432. props: {
  38433. // 用于v-model双向绑定选中的星星数量
  38434. modelValue: {
  38435. type: [String, Number],
  38436. default: () => props$1x.rate.value
  38437. },
  38438. // 要显示的星星数量
  38439. count: {
  38440. type: [String, Number],
  38441. default: () => props$1x.rate.count
  38442. },
  38443. // 是否不可选中
  38444. disabled: {
  38445. type: Boolean,
  38446. default: () => props$1x.rate.disabled
  38447. },
  38448. // 是否只读
  38449. readonly: {
  38450. type: Boolean,
  38451. default: () => props$1x.rate.readonly
  38452. },
  38453. // 星星的大小,单位px
  38454. size: {
  38455. type: [String, Number],
  38456. default: () => props$1x.rate.size
  38457. },
  38458. // 未选中时的颜色
  38459. inactiveColor: {
  38460. type: String,
  38461. default: () => props$1x.rate.inactiveColor
  38462. },
  38463. // 选中的颜色
  38464. activeColor: {
  38465. type: String,
  38466. default: () => props$1x.rate.activeColor
  38467. },
  38468. // 星星之间的间距,单位px
  38469. gutter: {
  38470. type: [String, Number],
  38471. default: () => props$1x.rate.gutter
  38472. },
  38473. // 最少能选择的星星个数
  38474. minCount: {
  38475. type: [String, Number],
  38476. default: () => props$1x.rate.minCount
  38477. },
  38478. // 是否允许半星
  38479. allowHalf: {
  38480. type: Boolean,
  38481. default: () => props$1x.rate.allowHalf
  38482. },
  38483. // 选中时的图标(星星)
  38484. activeIcon: {
  38485. type: String,
  38486. default: () => props$1x.rate.activeIcon
  38487. },
  38488. // 未选中时的图标(星星)
  38489. inactiveIcon: {
  38490. type: String,
  38491. default: () => props$1x.rate.inactiveIcon
  38492. },
  38493. // 是否可以通过滑动手势选择评分
  38494. touchable: {
  38495. type: Boolean,
  38496. default: () => props$1x.rate.touchable
  38497. }
  38498. }
  38499. });
  38500. const _sfc_main$N = {
  38501. name: "u-rate",
  38502. mixins: [mpMixin, mixin, props$s],
  38503. data() {
  38504. return {
  38505. // 生成一个唯一id,否则一个页面多个评分组件,会造成冲突
  38506. elId: guid(),
  38507. elClass: guid(),
  38508. rateBoxLeft: 0,
  38509. // 评分盒子左边到屏幕左边的距离,用于滑动选择时计算距离
  38510. activeIndex: this.modelValue,
  38511. rateWidth: 0,
  38512. // 每个星星的宽度
  38513. // 标识是否正在滑动,由于iOS事件上touch比click先触发,导致快速滑动结束后,接着触发click,导致事件混乱而出错
  38514. moving: false
  38515. };
  38516. },
  38517. watch: {
  38518. modelValue(val) {
  38519. this.activeIndex = val;
  38520. },
  38521. activeIndex: "emitEvent"
  38522. },
  38523. emits: ["update:modelValue", "change"],
  38524. methods: {
  38525. addStyle,
  38526. addUnit,
  38527. init() {
  38528. sleep().then(() => {
  38529. this.getRateItemRect();
  38530. this.getRateIconWrapRect();
  38531. });
  38532. },
  38533. // 获取评分组件盒子的布局信息
  38534. async getRateItemRect() {
  38535. await sleep();
  38536. this.$uGetRect("#" + this.elId).then((res) => {
  38537. this.rateBoxLeft = res.left;
  38538. });
  38539. },
  38540. // 获取单个星星的尺寸
  38541. getRateIconWrapRect() {
  38542. this.$uGetRect("." + this.elClass).then((res) => {
  38543. this.rateWidth = res.width;
  38544. });
  38545. },
  38546. // 手指滑动
  38547. touchMove(e2) {
  38548. if (!this.touchable) {
  38549. return;
  38550. }
  38551. this.preventEvent(e2);
  38552. const x2 = e2.changedTouches[0].pageX;
  38553. this.getActiveIndex(x2);
  38554. },
  38555. // 停止滑动
  38556. touchEnd(e2) {
  38557. if (!this.touchable) {
  38558. return;
  38559. }
  38560. this.preventEvent(e2);
  38561. const x2 = e2.changedTouches[0].pageX;
  38562. this.getActiveIndex(x2);
  38563. },
  38564. // 通过点击,直接选中
  38565. clickHandler(e2, index2) {
  38566. if (os() === "ios" && this.moving) {
  38567. return;
  38568. }
  38569. this.preventEvent(e2);
  38570. let x2 = 0;
  38571. x2 = e2.changedTouches[0].pageX;
  38572. this.getActiveIndex(x2, true);
  38573. },
  38574. // 发出事件
  38575. emitEvent() {
  38576. this.$emit("change", this.activeIndex);
  38577. this.$emit("update:modelValue", this.activeIndex);
  38578. },
  38579. // 获取当前激活的评分图标
  38580. getActiveIndex(x2, isClick = false) {
  38581. if (this.disabled || this.readonly) {
  38582. return;
  38583. }
  38584. const allRateWidth = this.rateWidth * this.count + this.rateBoxLeft;
  38585. x2 = range$1(this.rateBoxLeft, allRateWidth, x2) - this.rateBoxLeft;
  38586. const distance = x2;
  38587. let index2;
  38588. if (this.allowHalf) {
  38589. index2 = Math.floor(distance / this.rateWidth);
  38590. const decimal = distance % this.rateWidth;
  38591. if (decimal <= this.rateWidth / 2 && decimal > 0) {
  38592. index2 += 0.5;
  38593. } else if (decimal > this.rateWidth / 2) {
  38594. index2++;
  38595. }
  38596. } else {
  38597. index2 = Math.floor(distance / this.rateWidth);
  38598. const decimal = distance % this.rateWidth;
  38599. if (isClick) {
  38600. if (decimal > 0)
  38601. index2++;
  38602. } else {
  38603. if (decimal > this.rateWidth / 2)
  38604. index2++;
  38605. }
  38606. }
  38607. this.activeIndex = Math.min(index2, this.count);
  38608. if (this.activeIndex < this.minCount) {
  38609. this.activeIndex = this.minCount;
  38610. }
  38611. setTimeout(() => {
  38612. this.moving = true;
  38613. }, 10);
  38614. setTimeout(() => {
  38615. this.moving = false;
  38616. }, 10);
  38617. }
  38618. },
  38619. mounted() {
  38620. this.init();
  38621. }
  38622. };
  38623. function _sfc_render$M(_ctx, _cache, $props, $setup, $data, $options) {
  38624. const _component_up_icon = vue.resolveComponent("up-icon");
  38625. return vue.openBlock(), vue.createElementBlock("view", {
  38626. class: "u-rate",
  38627. id: $data.elId,
  38628. ref: "u-rate",
  38629. style: vue.normalizeStyle([$options.addStyle(_ctx.customStyle)])
  38630. }, [
  38631. vue.createElementVNode(
  38632. "view",
  38633. {
  38634. class: "u-rate__content",
  38635. onTouchmove: _cache[0] || (_cache[0] = vue.withModifiers((...args) => $options.touchMove && $options.touchMove(...args), ["stop"])),
  38636. onTouchend: _cache[1] || (_cache[1] = vue.withModifiers((...args) => $options.touchEnd && $options.touchEnd(...args), ["stop"]))
  38637. },
  38638. [
  38639. (vue.openBlock(true), vue.createElementBlock(
  38640. vue.Fragment,
  38641. null,
  38642. vue.renderList(Number(_ctx.count), (item, index2) => {
  38643. return vue.openBlock(), vue.createElementBlock(
  38644. "view",
  38645. {
  38646. class: vue.normalizeClass(["u-rate__content__item cursor-pointer", [$data.elClass]]),
  38647. key: index2
  38648. },
  38649. [
  38650. vue.createElementVNode("view", {
  38651. class: "u-rate__content__item__icon-wrap",
  38652. ref_for: true,
  38653. ref: "u-rate__content__item__icon-wrap",
  38654. onClick: vue.withModifiers(($event) => $options.clickHandler($event, index2 + 1), ["stop"])
  38655. }, [
  38656. vue.createVNode(_component_up_icon, {
  38657. name: Math.floor($data.activeIndex) > index2 ? _ctx.activeIcon : _ctx.inactiveIcon,
  38658. color: _ctx.disabled ? "#c8c9cc" : Math.floor($data.activeIndex) > index2 ? _ctx.activeColor : _ctx.inactiveColor,
  38659. "custom-style": {
  38660. padding: `0 ${$options.addUnit(_ctx.gutter / 2)}`
  38661. },
  38662. size: _ctx.size
  38663. }, null, 8, ["name", "color", "custom-style", "size"])
  38664. ], 8, ["onClick"]),
  38665. _ctx.allowHalf ? (vue.openBlock(), vue.createElementBlock("view", {
  38666. key: 0,
  38667. onClick: vue.withModifiers(($event) => $options.clickHandler($event, index2 + 1), ["stop"]),
  38668. class: "u-rate__content__item__icon-wrap u-rate__content__item__icon-wrap--half",
  38669. style: vue.normalizeStyle([{
  38670. width: $options.addUnit($data.rateWidth / 2)
  38671. }]),
  38672. ref_for: true,
  38673. ref: "u-rate__content__item__icon-wrap"
  38674. }, [
  38675. vue.createVNode(_component_up_icon, {
  38676. name: Math.ceil($data.activeIndex) > index2 ? _ctx.activeIcon : _ctx.inactiveIcon,
  38677. color: _ctx.disabled ? "#c8c9cc" : Math.ceil($data.activeIndex) > index2 ? _ctx.activeColor : _ctx.inactiveColor,
  38678. "custom-style": {
  38679. padding: `0 ${$options.addUnit(_ctx.gutter / 2)}`
  38680. },
  38681. size: _ctx.size
  38682. }, null, 8, ["name", "color", "custom-style", "size"])
  38683. ], 12, ["onClick"])) : vue.createCommentVNode("v-if", true)
  38684. ],
  38685. 2
  38686. /* CLASS */
  38687. );
  38688. }),
  38689. 128
  38690. /* KEYED_FRAGMENT */
  38691. ))
  38692. ],
  38693. 32
  38694. /* NEED_HYDRATION */
  38695. )
  38696. ], 12, ["id"]);
  38697. }
  38698. const uRate = /* @__PURE__ */ _export_sfc(_sfc_main$N, [["render", _sfc_render$M], ["__scopeId", "data-v-69a384ee"], ["__file", "C:/Users/EDY/Desktop/项目/shuibei/uni_modules/uview-plus/components/u-rate/u-rate.vue"]]);
  38699. const __vite_glob_0_85 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
  38700. __proto__: null,
  38701. default: uRate
  38702. }, Symbol.toStringTag, { value: "Module" }));
  38703. const props$r = defineMixin({
  38704. props: {
  38705. // 默认的显示占位高度
  38706. showHeight: {
  38707. type: [String, Number],
  38708. default: () => props$1x.readMore.showHeight
  38709. },
  38710. // 展开后是否显示"收起"按钮
  38711. toggle: {
  38712. type: Boolean,
  38713. default: () => props$1x.readMore.toggle
  38714. },
  38715. // 关闭时的提示文字
  38716. closeText: {
  38717. type: String,
  38718. default: () => props$1x.readMore.closeText
  38719. },
  38720. // 展开时的提示文字
  38721. openText: {
  38722. type: String,
  38723. default: () => props$1x.readMore.openText
  38724. },
  38725. // 提示的文字颜色
  38726. color: {
  38727. type: String,
  38728. default: () => props$1x.readMore.color
  38729. },
  38730. // 提示文字的大小
  38731. fontSize: {
  38732. type: [String, Number],
  38733. default: () => props$1x.readMore.fontSize
  38734. },
  38735. // 是否显示阴影
  38736. // 此参数不能写在props/readMore.js中进行默认配置,因为使用了条件编译,在外部js中
  38737. // uni无法准确识别当前是否处于nvue还是非nvue下
  38738. shadowStyle: {
  38739. type: Object,
  38740. default: () => ({
  38741. backgroundImage: "linear-gradient(-180deg, rgba(255, 255, 255, 0) 0%, #fff 80%)",
  38742. paddingTop: "100px",
  38743. marginTop: "-100px"
  38744. })
  38745. },
  38746. // 段落首行缩进的字符个数
  38747. textIndent: {
  38748. type: String,
  38749. default: () => props$1x.readMore.textIndent
  38750. },
  38751. // open和close事件时,将此参数返回在回调参数中
  38752. name: {
  38753. type: [String, Number],
  38754. default: () => props$1x.readMore.name
  38755. }
  38756. }
  38757. });
  38758. const _sfc_main$M = {
  38759. name: "u-read-more",
  38760. mixins: [mpMixin, mixin, props$r],
  38761. data() {
  38762. return {
  38763. isLongContent: false,
  38764. // 是否需要隐藏一部分内容
  38765. status: "close",
  38766. // 当前隐藏与显示的状态,close-收起状态,open-展开状态
  38767. elId: guid(),
  38768. // 生成唯一class
  38769. contentHeight: 100
  38770. // 内容高度
  38771. };
  38772. },
  38773. computed: {
  38774. // 展开后无需阴影,收起时才需要阴影样式
  38775. innerShadowStyle() {
  38776. if (this.status === "open")
  38777. return {};
  38778. else
  38779. return this.shadowStyle;
  38780. }
  38781. },
  38782. mounted() {
  38783. this.init();
  38784. },
  38785. emits: ["open", "close"],
  38786. methods: {
  38787. addUnit,
  38788. async init() {
  38789. this.getContentHeight().then((height) => {
  38790. this.contentHeight = height;
  38791. if (height > getPx(this.showHeight)) {
  38792. this.isLongContent = true;
  38793. this.status = "close";
  38794. } else {
  38795. this.isLongContent = false;
  38796. this.status = "close";
  38797. }
  38798. });
  38799. },
  38800. // 获取内容的高度
  38801. async getContentHeight() {
  38802. await sleep(30);
  38803. return new Promise((resolve) => {
  38804. this.$uGetRect("." + this.elId).then((res) => {
  38805. resolve(res.height);
  38806. });
  38807. });
  38808. },
  38809. // 展开或者收起
  38810. toggleReadMore() {
  38811. this.status = this.status === "close" ? "open" : "close";
  38812. if (this.toggle == false)
  38813. this.isLongContent = false;
  38814. this.$emit(this.status, this.name);
  38815. }
  38816. }
  38817. };
  38818. function _sfc_render$L(_ctx, _cache, $props, $setup, $data, $options) {
  38819. const _component_up_text = vue.resolveComponent("up-text");
  38820. const _component_up_icon = vue.resolveComponent("up-icon");
  38821. return vue.openBlock(), vue.createElementBlock("view", { class: "u-read-more" }, [
  38822. vue.createElementVNode(
  38823. "view",
  38824. {
  38825. class: "u-read-more__content",
  38826. style: vue.normalizeStyle({
  38827. height: $data.isLongContent && $data.status === "close" ? $options.addUnit(_ctx.showHeight) : $options.addUnit($data.contentHeight),
  38828. textIndent: _ctx.textIndent
  38829. })
  38830. },
  38831. [
  38832. vue.createElementVNode(
  38833. "view",
  38834. {
  38835. class: vue.normalizeClass(["u-read-more__content__inner", [$data.elId]]),
  38836. ref: "u-read-more__content__inner"
  38837. },
  38838. [
  38839. vue.renderSlot(_ctx.$slots, "default", {}, void 0, true)
  38840. ],
  38841. 2
  38842. /* CLASS */
  38843. )
  38844. ],
  38845. 4
  38846. /* STYLE */
  38847. ),
  38848. $data.isLongContent ? (vue.openBlock(), vue.createElementBlock(
  38849. "view",
  38850. {
  38851. key: 0,
  38852. class: "u-read-more__toggle",
  38853. style: vue.normalizeStyle([$options.innerShadowStyle])
  38854. },
  38855. [
  38856. vue.renderSlot(_ctx.$slots, "toggle", {}, () => [
  38857. vue.createElementVNode("view", {
  38858. class: "u-read-more__toggle__text",
  38859. onClick: _cache[0] || (_cache[0] = (...args) => $options.toggleReadMore && $options.toggleReadMore(...args))
  38860. }, [
  38861. vue.createVNode(_component_up_text, {
  38862. text: $data.status === "close" ? _ctx.closeText : _ctx.openText,
  38863. color: _ctx.color,
  38864. size: _ctx.fontSize,
  38865. lineHeight: _ctx.fontSize,
  38866. margin: "0 5px 0 0"
  38867. }, null, 8, ["text", "color", "size", "lineHeight"]),
  38868. vue.createElementVNode("view", { class: "u-read-more__toggle__icon" }, [
  38869. vue.createVNode(_component_up_icon, {
  38870. color: _ctx.color,
  38871. size: _ctx.fontSize + 2,
  38872. name: $data.status === "close" ? "arrow-down" : "arrow-up"
  38873. }, null, 8, ["color", "size", "name"])
  38874. ])
  38875. ])
  38876. ], true)
  38877. ],
  38878. 4
  38879. /* STYLE */
  38880. )) : vue.createCommentVNode("v-if", true)
  38881. ]);
  38882. }
  38883. const uReadMore = /* @__PURE__ */ _export_sfc(_sfc_main$M, [["render", _sfc_render$L], ["__scopeId", "data-v-4bc7fe29"], ["__file", "C:/Users/EDY/Desktop/项目/shuibei/uni_modules/uview-plus/components/u-read-more/u-read-more.vue"]]);
  38884. const __vite_glob_0_86 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
  38885. __proto__: null,
  38886. default: uReadMore
  38887. }, Symbol.toStringTag, { value: "Module" }));
  38888. const _sfc_main$L = {
  38889. name: "u-virtual-list",
  38890. props: {
  38891. // 数据源
  38892. listData: {
  38893. type: Array,
  38894. default: () => []
  38895. },
  38896. // 每项高度(固定高度模式)
  38897. itemHeight: {
  38898. type: Number,
  38899. default: 50
  38900. },
  38901. // 容器高度
  38902. height: {
  38903. type: [String, Number],
  38904. default: "100%"
  38905. },
  38906. // 缓冲区项数
  38907. buffer: {
  38908. type: Number,
  38909. default: 4
  38910. },
  38911. // 索引键名
  38912. keyField: {
  38913. type: String,
  38914. default: "id"
  38915. },
  38916. // 当前滚动位置
  38917. scrollTop: {
  38918. type: Number,
  38919. default: 0
  38920. }
  38921. },
  38922. data() {
  38923. return {
  38924. // 起始索引
  38925. startIndex: 0,
  38926. // 容器实际高度
  38927. containerHeight: 0
  38928. };
  38929. },
  38930. computed: {
  38931. // 可视区域显示的项数(根据容器实际高度自动计算)
  38932. remain() {
  38933. if (this.containerHeight <= 0) {
  38934. return Math.ceil(500 / this.itemHeight) || 10;
  38935. }
  38936. const calculated = Math.ceil(this.containerHeight / this.itemHeight);
  38937. return Math.max(1, calculated);
  38938. },
  38939. // 可视项数量
  38940. visibleCount() {
  38941. return this.remain + this.buffer;
  38942. },
  38943. // 可视项
  38944. visibleItems() {
  38945. const start = Math.max(0, this.startIndex - Math.floor(this.buffer / 2));
  38946. const end = Math.min(this.listData.length, start + this.visibleCount);
  38947. return this.listData.slice(start, end).map((item, index2) => {
  38948. return {
  38949. ...item,
  38950. _virtualIndex: start + index2
  38951. };
  38952. });
  38953. },
  38954. // 顶部占位高度
  38955. topPlaceholderHeight() {
  38956. const start = Math.max(0, this.startIndex - Math.floor(this.buffer / 2));
  38957. return start * this.itemHeight;
  38958. },
  38959. // 底部占位高度
  38960. bottomPlaceholderHeight() {
  38961. const start = Math.max(0, this.startIndex - Math.floor(this.buffer / 2));
  38962. const end = Math.min(this.listData.length, start + this.visibleCount);
  38963. return (this.listData.length - end) * this.itemHeight;
  38964. }
  38965. },
  38966. emits: ["update:scrollTop", "scroll"],
  38967. watch: {
  38968. listData: {
  38969. handler() {
  38970. this.updateVisibleItems();
  38971. },
  38972. immediate: true
  38973. },
  38974. scrollTop: {
  38975. handler(newVal) {
  38976. this.updateVisibleItems();
  38977. }
  38978. }
  38979. },
  38980. mounted() {
  38981. this.measureContainerHeight();
  38982. },
  38983. methods: {
  38984. addUnit,
  38985. // 测量容器高度
  38986. measureContainerHeight() {
  38987. this.$nextTick(() => {
  38988. const query = uni.createSelectorQuery().in(this);
  38989. query.select(".u-virtual-list").boundingClientRect((rect) => {
  38990. if (rect) {
  38991. this.containerHeight = rect.height || 500;
  38992. } else {
  38993. this.containerHeight = this.calculateDefaultHeight();
  38994. }
  38995. }).exec();
  38996. });
  38997. },
  38998. // 计算默认高度
  38999. calculateDefaultHeight() {
  39000. const height = this.height;
  39001. if (typeof height === "number") {
  39002. return height;
  39003. }
  39004. if (typeof height === "string") {
  39005. if (height.includes("px")) {
  39006. return parseInt(height) || 500;
  39007. } else if (height.includes("vh")) {
  39008. const vh = parseInt(height);
  39009. return isNaN(vh) ? 500 : vh / 100 * this.getViewportHeight();
  39010. } else if (height.includes("%")) {
  39011. return 500;
  39012. } else {
  39013. const num = parseInt(height);
  39014. return isNaN(num) ? 500 : num;
  39015. }
  39016. }
  39017. return 500;
  39018. },
  39019. // 获取视口高度
  39020. getViewportHeight() {
  39021. try {
  39022. const res = uni.getSystemInfoSync();
  39023. return res.windowHeight;
  39024. } catch (e2) {
  39025. return 600;
  39026. }
  39027. },
  39028. getItemKey(item) {
  39029. return item[this.keyField] !== void 0 ? item[this.keyField] : item._virtualIndex;
  39030. },
  39031. // 更新可视项
  39032. updateVisibleItems() {
  39033. const index2 = Math.floor(this.scrollTop / this.itemHeight);
  39034. this.startIndex = Math.max(0, index2);
  39035. },
  39036. // 处理滚动
  39037. handleScroll(e2) {
  39038. const scrollTop = e2.detail.scrollTop;
  39039. this.$emit("update:scrollTop", scrollTop);
  39040. this.$emit("scroll", scrollTop);
  39041. },
  39042. // 处理触摸移动,阻止事件冒泡
  39043. handleTouchMove(e2) {
  39044. e2.stopPropagation();
  39045. },
  39046. // 获取可见项范围
  39047. getVisibleRange() {
  39048. const start = Math.max(0, this.startIndex - Math.floor(this.buffer / 2));
  39049. const end = Math.min(this.listData.length, start + this.visibleCount);
  39050. return { start, end };
  39051. }
  39052. }
  39053. };
  39054. function _sfc_render$K(_ctx, _cache, $props, $setup, $data, $options) {
  39055. return vue.openBlock(), vue.createElementBlock(
  39056. "view",
  39057. {
  39058. class: "u-virtual-list",
  39059. style: vue.normalizeStyle({ height: $options.addUnit($props.height) }),
  39060. ref: "container"
  39061. },
  39062. [
  39063. vue.createElementVNode("scroll-view", {
  39064. class: "virtual-scroll-container",
  39065. "scroll-y": true,
  39066. "scroll-top": $props.scrollTop,
  39067. style: { height: "100%" },
  39068. onScroll: _cache[0] || (_cache[0] = (...args) => $options.handleScroll && $options.handleScroll(...args))
  39069. }, [
  39070. vue.createCommentVNode(' @touchmove.stop.prevent="handleTouchMove" '),
  39071. vue.createElementVNode("view", { class: "scroll-content" }, [
  39072. vue.createCommentVNode(" 顶部占位 "),
  39073. vue.createElementVNode(
  39074. "view",
  39075. {
  39076. style: vue.normalizeStyle({ height: $options.topPlaceholderHeight + "px" })
  39077. },
  39078. null,
  39079. 4
  39080. /* STYLE */
  39081. ),
  39082. vue.createCommentVNode(" 可见项 "),
  39083. (vue.openBlock(true), vue.createElementBlock(
  39084. vue.Fragment,
  39085. null,
  39086. vue.renderList($options.visibleItems, (item) => {
  39087. return vue.openBlock(), vue.createElementBlock(
  39088. "view",
  39089. {
  39090. key: $options.getItemKey(item),
  39091. class: "list-item",
  39092. style: vue.normalizeStyle({ height: $props.itemHeight + "px" })
  39093. },
  39094. [
  39095. vue.renderSlot(_ctx.$slots, "default", {
  39096. item,
  39097. index: item._virtualIndex
  39098. }, void 0, true)
  39099. ],
  39100. 4
  39101. /* STYLE */
  39102. );
  39103. }),
  39104. 128
  39105. /* KEYED_FRAGMENT */
  39106. )),
  39107. vue.createCommentVNode(" 底部占位 "),
  39108. vue.createElementVNode(
  39109. "view",
  39110. {
  39111. style: vue.normalizeStyle({ height: $options.bottomPlaceholderHeight + "px" })
  39112. },
  39113. null,
  39114. 4
  39115. /* STYLE */
  39116. )
  39117. ])
  39118. ], 40, ["scroll-top"])
  39119. ],
  39120. 4
  39121. /* STYLE */
  39122. );
  39123. }
  39124. const __easycom_0 = /* @__PURE__ */ _export_sfc(_sfc_main$L, [["render", _sfc_render$K], ["__scopeId", "data-v-2f4c3fe0"], ["__file", "C:/Users/EDY/Desktop/项目/shuibei/uni_modules/uview-plus/components/u-virtual-list/u-virtual-list.vue"]]);
  39125. const __vite_glob_0_128 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
  39126. __proto__: null,
  39127. default: __easycom_0
  39128. }, Symbol.toStringTag, { value: "Module" }));
  39129. const _sfc_main$K = {
  39130. name: "u-refresh-virtual-list",
  39131. props: {
  39132. // 数据源
  39133. listData: {
  39134. type: Array,
  39135. default: () => []
  39136. },
  39137. // 每项高度(固定高度模式)
  39138. itemHeight: {
  39139. type: Number,
  39140. default: 50
  39141. },
  39142. // 容器高度
  39143. height: {
  39144. type: [String, Number],
  39145. default: "100%"
  39146. },
  39147. // 缓冲区项数
  39148. buffer: {
  39149. type: Number,
  39150. default: 4
  39151. },
  39152. // 索引键名
  39153. keyField: {
  39154. type: String,
  39155. default: "id"
  39156. }
  39157. },
  39158. data() {
  39159. return {
  39160. refreshing: false,
  39161. scrollTop: 0
  39162. };
  39163. },
  39164. methods: {
  39165. handleRefresh() {
  39166. this.refreshing = true;
  39167. this.$emit("refresh");
  39168. },
  39169. handleScroll(scrollTop) {
  39170. this.scrollTop = scrollTop;
  39171. this.$emit("scroll", scrollTop);
  39172. },
  39173. finishRefresh() {
  39174. this.refreshing = false;
  39175. },
  39176. scrollTo(top) {
  39177. this.scrollTop = top;
  39178. },
  39179. scrollToTop() {
  39180. this.scrollTo(0);
  39181. }
  39182. }
  39183. };
  39184. function _sfc_render$J(_ctx, _cache, $props, $setup, $data, $options) {
  39185. const _component_u_virtual_list = resolveEasycom(vue.resolveDynamicComponent("u-virtual-list"), __easycom_0);
  39186. const _component_u_pull_refresh = resolveEasycom(vue.resolveDynamicComponent("u-pull-refresh"), __easycom_1);
  39187. return vue.openBlock(), vue.createBlock(_component_u_pull_refresh, {
  39188. refreshing: $data.refreshing,
  39189. threshold: 50,
  39190. onRefresh: $options.handleRefresh
  39191. }, {
  39192. default: vue.withCtx(() => [
  39193. vue.createVNode(_component_u_virtual_list, {
  39194. ref: "virtualList",
  39195. "list-data": $props.listData,
  39196. "item-height": $props.itemHeight,
  39197. height: $props.height,
  39198. buffer: $props.buffer,
  39199. "key-field": $props.keyField,
  39200. "scroll-top": $data.scrollTop,
  39201. onScroll: $options.handleScroll
  39202. }, {
  39203. default: vue.withCtx(({ item, index: index2 }) => [
  39204. vue.renderSlot(_ctx.$slots, "default", {
  39205. item,
  39206. index: index2
  39207. })
  39208. ]),
  39209. _: 3
  39210. /* FORWARDED */
  39211. }, 8, ["list-data", "item-height", "height", "buffer", "key-field", "scroll-top", "onScroll"])
  39212. ]),
  39213. _: 3
  39214. /* FORWARDED */
  39215. }, 8, ["refreshing", "onRefresh"]);
  39216. }
  39217. const uRefreshVirtualList = /* @__PURE__ */ _export_sfc(_sfc_main$K, [["render", _sfc_render$J], ["__file", "C:/Users/EDY/Desktop/项目/shuibei/uni_modules/uview-plus/components/u-refresh-virtual-list/u-refresh-virtual-list.vue"]]);
  39218. const __vite_glob_0_87 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
  39219. __proto__: null,
  39220. default: uRefreshVirtualList
  39221. }, Symbol.toStringTag, { value: "Module" }));
  39222. const props$q = defineMixin({
  39223. props: {
  39224. // 给col添加间距,左右边距各占一半
  39225. gutter: {
  39226. type: [String, Number],
  39227. default: () => props$1x.row.gutter
  39228. },
  39229. // 水平排列方式,可选值为`start`(或`flex-start`)、`end`(或`flex-end`)、`center`、`around`(或`space-around`)、`between`(或`space-between`)
  39230. justify: {
  39231. type: String,
  39232. default: () => props$1x.row.justify
  39233. },
  39234. // 垂直对齐方式,可选值为top、center、bottom
  39235. align: {
  39236. type: String,
  39237. default: () => props$1x.row.align
  39238. }
  39239. }
  39240. });
  39241. const _sfc_main$J = {
  39242. name: "u-row",
  39243. mixins: [mpMixin, mixin, props$q],
  39244. data() {
  39245. return {};
  39246. },
  39247. computed: {
  39248. uJustify() {
  39249. if (this.justify == "end" || this.justify == "start")
  39250. return "flex-" + this.justify;
  39251. else if (this.justify == "around" || this.justify == "between")
  39252. return "space-" + this.justify;
  39253. else
  39254. return this.justify;
  39255. },
  39256. uAlignItem() {
  39257. if (this.align == "top")
  39258. return "flex-start";
  39259. if (this.align == "bottom")
  39260. return "flex-end";
  39261. else
  39262. return this.align;
  39263. },
  39264. rowStyle() {
  39265. const style = {
  39266. alignItems: this.uAlignItem,
  39267. justifyContent: this.uJustify
  39268. };
  39269. if (this.gutter) {
  39270. style.marginLeft = addUnit(-Number(this.gutter) / 2);
  39271. style.marginRight = addUnit(-Number(this.gutter) / 2);
  39272. }
  39273. return deepMerge$1(style, addStyle(this.customStyle));
  39274. }
  39275. },
  39276. emits: ["click"],
  39277. methods: {
  39278. clickHandler(e2) {
  39279. this.$emit("click");
  39280. },
  39281. async getComponentWidth() {
  39282. await sleep();
  39283. return new Promise((resolve) => {
  39284. this.$uGetRect(".u-row").then((res) => {
  39285. resolve(res.width);
  39286. });
  39287. });
  39288. }
  39289. }
  39290. };
  39291. function _sfc_render$I(_ctx, _cache, $props, $setup, $data, $options) {
  39292. return vue.openBlock(), vue.createElementBlock(
  39293. "view",
  39294. {
  39295. class: "u-row",
  39296. ref: "u-row",
  39297. style: vue.normalizeStyle([$options.rowStyle]),
  39298. onClick: _cache[0] || (_cache[0] = (...args) => $options.clickHandler && $options.clickHandler(...args))
  39299. },
  39300. [
  39301. vue.renderSlot(_ctx.$slots, "default", {}, void 0, true)
  39302. ],
  39303. 4
  39304. /* STYLE */
  39305. );
  39306. }
  39307. const uRow = /* @__PURE__ */ _export_sfc(_sfc_main$J, [["render", _sfc_render$I], ["__scopeId", "data-v-a2f99026"], ["__file", "C:/Users/EDY/Desktop/项目/shuibei/uni_modules/uview-plus/components/u-row/u-row.vue"]]);
  39308. const __vite_glob_0_89 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
  39309. __proto__: null,
  39310. default: uRow
  39311. }, Symbol.toStringTag, { value: "Module" }));
  39312. const props$p = defineMixin({
  39313. props: {
  39314. // 指示器的整体宽度
  39315. indicatorWidth: {
  39316. type: [String, Number],
  39317. default: () => props$1x.scrollList.indicatorWidth
  39318. },
  39319. // 滑块的宽度
  39320. indicatorBarWidth: {
  39321. type: [String, Number],
  39322. default: () => props$1x.scrollList.indicatorBarWidth
  39323. },
  39324. // 是否显示面板指示器
  39325. indicator: {
  39326. type: Boolean,
  39327. default: () => props$1x.scrollList.indicator
  39328. },
  39329. // 指示器非激活颜色
  39330. indicatorColor: {
  39331. type: String,
  39332. default: () => props$1x.scrollList.indicatorColor
  39333. },
  39334. // 指示器的激活颜色
  39335. indicatorActiveColor: {
  39336. type: String,
  39337. default: () => props$1x.scrollList.indicatorActiveColor
  39338. },
  39339. // 指示器样式,可通过bottom,left,right进行定位
  39340. indicatorStyle: {
  39341. type: [String, Object],
  39342. default: () => props$1x.scrollList.indicatorStyle
  39343. }
  39344. }
  39345. });
  39346. const block0$1 = (Comp) => {
  39347. (Comp.$wxs || (Comp.$wxs = [])).push("wxs");
  39348. (Comp.$wxsModules || (Comp.$wxsModules = {}))["wxs"] = "0c1bc38e";
  39349. };
  39350. const _sfc_main$I = {
  39351. name: "u-scroll-list",
  39352. mixins: [mpMixin, mixin, props$p],
  39353. data() {
  39354. return {
  39355. scrollInfo: {
  39356. scrollLeft: 0,
  39357. scrollWidth: 0
  39358. },
  39359. scrollWidth: 0
  39360. };
  39361. },
  39362. computed: {
  39363. // 指示器为线型的样式
  39364. barStyle() {
  39365. const style = {};
  39366. style.width = addUnit(this.indicatorBarWidth);
  39367. style.backgroundColor = this.indicatorActiveColor;
  39368. return style;
  39369. },
  39370. lineStyle() {
  39371. const style = {};
  39372. style.width = addUnit(this.indicatorWidth);
  39373. style.backgroundColor = this.indicatorColor;
  39374. return style;
  39375. }
  39376. },
  39377. mounted() {
  39378. this.init();
  39379. },
  39380. emits: ["left", "right"],
  39381. methods: {
  39382. addStyle,
  39383. getPx,
  39384. init() {
  39385. this.getComponentWidth();
  39386. },
  39387. //
  39388. scrollEvent(status) {
  39389. this.$emit(status);
  39390. },
  39391. // 获取组件的宽度
  39392. async getComponentWidth() {
  39393. await sleep(30);
  39394. this.$uGetRect(".u-scroll-list").then((size) => {
  39395. this.scrollWidth = size.width;
  39396. });
  39397. }
  39398. }
  39399. };
  39400. function _sfc_render$H(_ctx, _cache, $props, $setup, $data, $options) {
  39401. return vue.openBlock(), vue.createElementBlock(
  39402. "view",
  39403. {
  39404. class: "u-scroll-list",
  39405. ref: "u-scroll-list"
  39406. },
  39407. [
  39408. vue.createCommentVNode(" 以上平台,支持wxs "),
  39409. vue.createElementVNode("scroll-view", {
  39410. class: "u-scroll-list__scroll-view scroll-view-native",
  39411. "scroll-x": "",
  39412. "enable-flex": "",
  39413. onScroll: _cache[0] || (_cache[0] = (...args) => _ctx.wxs.scroll && _ctx.wxs.scroll(...args)),
  39414. onScrolltoupper: _cache[1] || (_cache[1] = (...args) => _ctx.wxs.scrolltoupper && _ctx.wxs.scrolltoupper(...args)),
  39415. onScrolltolower: _cache[2] || (_cache[2] = (...args) => _ctx.wxs.scrolltolower && _ctx.wxs.scrolltolower(...args)),
  39416. "data-scrollWidth": $data.scrollWidth,
  39417. "data-barWidth": $options.getPx(_ctx.indicatorBarWidth),
  39418. "data-indicatorWidth": $options.getPx(_ctx.indicatorWidth),
  39419. "show-scrollbar": false,
  39420. "upper-threshold": 0,
  39421. "lower-threshold": 0
  39422. }, [
  39423. vue.createElementVNode("view", { class: "u-scroll-list__scroll-view__content" }, [
  39424. vue.renderSlot(_ctx.$slots, "default", {}, void 0, true)
  39425. ])
  39426. ], 40, ["data-scrollWidth", "data-barWidth", "data-indicatorWidth"]),
  39427. _ctx.indicator ? (vue.openBlock(), vue.createElementBlock(
  39428. "view",
  39429. {
  39430. key: 0,
  39431. class: "u-scroll-list__indicator",
  39432. style: vue.normalizeStyle([$options.addStyle(_ctx.indicatorStyle)])
  39433. },
  39434. [
  39435. vue.createElementVNode(
  39436. "view",
  39437. {
  39438. class: "u-scroll-list__indicator__line",
  39439. style: vue.normalizeStyle([$options.lineStyle])
  39440. },
  39441. [
  39442. vue.createElementVNode(
  39443. "view",
  39444. {
  39445. class: "u-scroll-list__indicator__line__bar",
  39446. style: vue.normalizeStyle([$options.barStyle]),
  39447. ref: "u-scroll-list__indicator__line__bar"
  39448. },
  39449. null,
  39450. 4
  39451. /* STYLE */
  39452. )
  39453. ],
  39454. 4
  39455. /* STYLE */
  39456. )
  39457. ],
  39458. 4
  39459. /* STYLE */
  39460. )) : vue.createCommentVNode("v-if", true)
  39461. ],
  39462. 512
  39463. /* NEED_PATCH */
  39464. );
  39465. }
  39466. if (typeof block0$1 === "function")
  39467. block0$1(_sfc_main$I);
  39468. const uScrollList = /* @__PURE__ */ _export_sfc(_sfc_main$I, [["render", _sfc_render$H], ["__scopeId", "data-v-75b0f429"], ["__file", "C:/Users/EDY/Desktop/项目/shuibei/uni_modules/uview-plus/components/u-scroll-list/u-scroll-list.vue"]]);
  39469. const __vite_glob_0_91 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
  39470. __proto__: null,
  39471. default: uScrollList
  39472. }, Symbol.toStringTag, { value: "Module" }));
  39473. const props$o = defineMixin({
  39474. props: {
  39475. // 绑定的值
  39476. modelValue: {
  39477. type: [String, Number],
  39478. default: () => props$1x.search.value
  39479. },
  39480. // 搜索框形状,round-圆形,square-方形
  39481. shape: {
  39482. type: String,
  39483. default: () => props$1x.search.shape
  39484. },
  39485. // 搜索框背景色
  39486. bgColor: {
  39487. type: String,
  39488. default: () => props$1x.search.bgColor
  39489. },
  39490. // 占位提示文字
  39491. placeholder: {
  39492. type: String,
  39493. default: () => props$1x.search.placeholder
  39494. },
  39495. // 是否启用清除控件
  39496. clearabled: {
  39497. type: Boolean,
  39498. default: () => props$1x.search.clearabled
  39499. },
  39500. // 是否仅聚焦时显示清除控件
  39501. onlyClearableOnFocused: {
  39502. type: Boolean,
  39503. default: true
  39504. },
  39505. // 是否自动聚焦
  39506. focus: {
  39507. type: Boolean,
  39508. default: () => props$1x.search.focus
  39509. },
  39510. // 是否在搜索框右侧显示取消按钮
  39511. showAction: {
  39512. type: Boolean,
  39513. default: () => props$1x.search.showAction
  39514. },
  39515. // 右侧取消按钮文字
  39516. actionText: {
  39517. type: String,
  39518. default: () => props$1x.search.actionText
  39519. },
  39520. // 搜索框左侧文本
  39521. label: {
  39522. type: [String, Number, null],
  39523. default: () => props$1x.search.label
  39524. },
  39525. // 输入框内容对齐方式,可选值为:left|center|right
  39526. inputAlign: {
  39527. type: String,
  39528. default: () => props$1x.search.inputAlign
  39529. },
  39530. // 是否启用输入框
  39531. disabled: {
  39532. type: Boolean,
  39533. default: () => props$1x.search.disabled
  39534. },
  39535. // 开启showAction时,是否在input获取焦点时才显示
  39536. animation: {
  39537. type: Boolean,
  39538. default: () => props$1x.search.animation
  39539. },
  39540. // 边框颜色,只要配置了颜色,才会有边框
  39541. borderColor: {
  39542. type: String,
  39543. default: () => props$1x.search.borderColor
  39544. },
  39545. // 搜索图标的颜色,默认同输入框字体颜色
  39546. searchIconColor: {
  39547. type: String,
  39548. default: () => props$1x.search.searchIconColor
  39549. },
  39550. // 搜索图标的大小
  39551. searchIconSize: {
  39552. type: [Number, String],
  39553. default: () => props$1x.search.searchIconSize
  39554. },
  39555. // 输入框字体颜色
  39556. color: {
  39557. type: String,
  39558. default: () => props$1x.search.color
  39559. },
  39560. // placeholder的颜色
  39561. placeholderColor: {
  39562. type: String,
  39563. default: () => props$1x.search.placeholderColor
  39564. },
  39565. // 左边输入框的图标,可以为uView图标名称或图片路径
  39566. searchIcon: {
  39567. type: String,
  39568. default: () => props$1x.search.searchIcon
  39569. },
  39570. // 组件与其他上下左右元素之间的距离,带单位的字符串形式,如"30px"
  39571. margin: {
  39572. type: String,
  39573. default: () => props$1x.search.margin
  39574. },
  39575. // 应该是uView-plus版本新增的,用于控制搜索图标的插槽位置
  39576. iconPosition: {
  39577. type: String,
  39578. default: () => props$1x.search.iconPosition
  39579. },
  39580. // 输入框最大能输入的长度,-1为不限制长度
  39581. maxlength: {
  39582. type: [String, Number],
  39583. default: () => props$1x.search.maxlength
  39584. },
  39585. // 输入框高度,单位px
  39586. height: {
  39587. type: [String, Number],
  39588. default: () => props$1x.search.height
  39589. },
  39590. // 键盘弹起时,是否自动上推页面
  39591. adjustPosition: {
  39592. type: Boolean,
  39593. default: () => props$1x.search.adjustPosition
  39594. },
  39595. // 键盘收起时,是否自动失去焦点
  39596. autoBlur: {
  39597. type: Boolean,
  39598. default: () => props$1x.search.autoBlur
  39599. },
  39600. // 输入框的样式,对象形式
  39601. inputStyle: {
  39602. type: Object,
  39603. default: () => props$1x.search.inputStyle
  39604. },
  39605. // 右侧控件的样式,对象形式
  39606. actionStyle: {
  39607. type: Object,
  39608. default: () => props$1x.search.actionStyle
  39609. },
  39610. // 自定义样式,对象形式
  39611. customStyle: {
  39612. type: Object,
  39613. default: () => props$1x.search.customStyle
  39614. }
  39615. }
  39616. });
  39617. const _sfc_main$H = {
  39618. name: "u-search",
  39619. mixins: [mpMixin, mixin, props$o],
  39620. data() {
  39621. return {
  39622. keyword: "",
  39623. show: false,
  39624. // 标记input当前状态是否处于聚焦中,如果是,才会显示右侧的清除控件
  39625. focused: this.focus
  39626. // 绑定输入框的值
  39627. // inputValue: this.value
  39628. };
  39629. },
  39630. watch: {
  39631. keyword(nVal) {
  39632. this.$emit("update:modelValue", nVal);
  39633. this.$emit("change", nVal);
  39634. },
  39635. modelValue: {
  39636. immediate: true,
  39637. handler(nVal) {
  39638. this.keyword = nVal;
  39639. }
  39640. }
  39641. },
  39642. computed: {
  39643. showActionBtn() {
  39644. return !this.animation && this.showAction;
  39645. },
  39646. // 是否显示清除控件
  39647. isShowClear() {
  39648. const { clearabled, focused, keyword, onlyClearableOnFocused } = this;
  39649. if (!clearabled) {
  39650. return false;
  39651. }
  39652. if (onlyClearableOnFocused) {
  39653. return !!focused && keyword !== "";
  39654. } else {
  39655. return keyword !== "";
  39656. }
  39657. }
  39658. },
  39659. emits: ["clear", "search", "custom", "focus", "blur", "click", "clickIcon", "update:modelValue", "change"],
  39660. methods: {
  39661. addStyle,
  39662. addUnit,
  39663. // 目前HX2.6.9 v-model双向绑定无效,故监听input事件获取输入框内容的变化
  39664. inputChange(e2) {
  39665. this.keyword = e2.detail.value;
  39666. },
  39667. // 清空输入
  39668. // 也可以作为用户通过this.$refs形式调用清空输入框内容
  39669. clear() {
  39670. this.keyword = "";
  39671. this.$nextTick(() => {
  39672. this.$emit("clear");
  39673. });
  39674. },
  39675. // 确定搜索
  39676. search(e2) {
  39677. this.$emit("search", e2.detail.value);
  39678. try {
  39679. uni.hideKeyboard();
  39680. } catch (e3) {
  39681. }
  39682. },
  39683. // 点击右边自定义按钮的事件
  39684. custom() {
  39685. this.$emit("custom", this.keyword);
  39686. try {
  39687. uni.hideKeyboard();
  39688. } catch (e2) {
  39689. }
  39690. },
  39691. // 获取焦点
  39692. getFocus() {
  39693. this.focused = true;
  39694. if (this.animation && this.showAction)
  39695. this.show = true;
  39696. this.$emit("focus", this.keyword);
  39697. },
  39698. // 失去焦点
  39699. blur() {
  39700. setTimeout(() => {
  39701. this.focused = false;
  39702. }, 100);
  39703. this.show = false;
  39704. this.$emit("blur", this.keyword);
  39705. },
  39706. // 点击搜索框,只有disabled=true时才发出事件,因为禁止了输入,意味着是想跳转真正的搜索页
  39707. clickHandler() {
  39708. if (this.disabled)
  39709. this.$emit("click");
  39710. },
  39711. // 点击左边图标
  39712. clickIcon(e2) {
  39713. this.$emit("clickIcon", this.keyword);
  39714. try {
  39715. uni.hideKeyboard();
  39716. } catch (e3) {
  39717. }
  39718. }
  39719. }
  39720. };
  39721. function _sfc_render$G(_ctx, _cache, $props, $setup, $data, $options) {
  39722. const _component_up_icon = vue.resolveComponent("up-icon");
  39723. return vue.openBlock(), vue.createElementBlock(
  39724. "view",
  39725. {
  39726. class: vue.normalizeClass(["u-search", [_ctx.iconPosition === "right" && "u-search__reverse"]]),
  39727. onClick: _cache[6] || (_cache[6] = (...args) => $options.clickHandler && $options.clickHandler(...args)),
  39728. style: vue.normalizeStyle([{
  39729. margin: _ctx.margin
  39730. }, $options.addStyle(_ctx.customStyle)])
  39731. },
  39732. [
  39733. vue.createElementVNode(
  39734. "view",
  39735. {
  39736. class: "u-search__content",
  39737. style: vue.normalizeStyle({
  39738. backgroundColor: _ctx.bgColor,
  39739. borderRadius: _ctx.shape == "round" ? "100px" : "4px",
  39740. borderColor: _ctx.borderColor
  39741. })
  39742. },
  39743. [
  39744. _ctx.$slots.label || _ctx.label !== null ? vue.renderSlot(_ctx.$slots, "label", { key: 0 }, () => [
  39745. vue.createElementVNode(
  39746. "text",
  39747. { class: "u-search__content__label" },
  39748. vue.toDisplayString(_ctx.label),
  39749. 1
  39750. /* TEXT */
  39751. )
  39752. ], true) : vue.createCommentVNode("v-if", true),
  39753. vue.createElementVNode("view", { class: "u-search__content__icon" }, [
  39754. vue.createVNode(_component_up_icon, {
  39755. onClick: $options.clickIcon,
  39756. size: _ctx.searchIconSize,
  39757. name: _ctx.searchIcon,
  39758. color: _ctx.searchIconColor ? _ctx.searchIconColor : _ctx.color
  39759. }, null, 8, ["onClick", "size", "name", "color"])
  39760. ]),
  39761. vue.createElementVNode("input", {
  39762. "confirm-type": "search",
  39763. onBlur: _cache[0] || (_cache[0] = (...args) => $options.blur && $options.blur(...args)),
  39764. value: $data.keyword,
  39765. onConfirm: _cache[1] || (_cache[1] = (...args) => $options.search && $options.search(...args)),
  39766. onInput: _cache[2] || (_cache[2] = (...args) => $options.inputChange && $options.inputChange(...args)),
  39767. disabled: _ctx.disabled,
  39768. onFocus: _cache[3] || (_cache[3] = (...args) => $options.getFocus && $options.getFocus(...args)),
  39769. focus: _ctx.focus,
  39770. maxlength: _ctx.maxlength,
  39771. "adjust-position": _ctx.adjustPosition,
  39772. "auto-blur": _ctx.autoBlur,
  39773. "placeholder-class": "u-search__content__input--placeholder",
  39774. placeholder: _ctx.placeholder,
  39775. "placeholder-style": `color: ${_ctx.placeholderColor}`,
  39776. class: "u-search__content__input",
  39777. type: "text",
  39778. style: vue.normalizeStyle([{
  39779. pointerEvents: _ctx.disabled ? "none" : "auto",
  39780. textAlign: _ctx.inputAlign,
  39781. color: _ctx.color,
  39782. backgroundColor: _ctx.bgColor,
  39783. height: $options.addUnit(_ctx.height)
  39784. }, _ctx.inputStyle])
  39785. }, null, 44, ["value", "disabled", "focus", "maxlength", "adjust-position", "auto-blur", "placeholder", "placeholder-style"]),
  39786. $options.isShowClear ? (vue.openBlock(), vue.createElementBlock("view", {
  39787. key: 1,
  39788. class: "u-search__content__icon u-search__content__close",
  39789. onClick: _cache[4] || (_cache[4] = (...args) => $options.clear && $options.clear(...args))
  39790. }, [
  39791. vue.createVNode(_component_up_icon, {
  39792. name: "close",
  39793. size: "11",
  39794. color: "#ffffff",
  39795. customStyle: "line-height: 12px"
  39796. })
  39797. ])) : vue.createCommentVNode("v-if", true),
  39798. vue.renderSlot(_ctx.$slots, "inputRight", {}, void 0, true)
  39799. ],
  39800. 4
  39801. /* STYLE */
  39802. ),
  39803. vue.createElementVNode(
  39804. "text",
  39805. {
  39806. style: vue.normalizeStyle([_ctx.actionStyle]),
  39807. class: vue.normalizeClass(["u-search__action", [($options.showActionBtn || $data.show) && "u-search__action--active"]]),
  39808. onClick: _cache[5] || (_cache[5] = vue.withModifiers((...args) => $options.custom && $options.custom(...args), ["stop", "prevent"]))
  39809. },
  39810. vue.toDisplayString(_ctx.actionText),
  39811. 7
  39812. /* TEXT, CLASS, STYLE */
  39813. )
  39814. ],
  39815. 6
  39816. /* CLASS, STYLE */
  39817. );
  39818. }
  39819. const uSearch = /* @__PURE__ */ _export_sfc(_sfc_main$H, [["render", _sfc_render$G], ["__scopeId", "data-v-e082a34a"], ["__file", "C:/Users/EDY/Desktop/项目/shuibei/uni_modules/uview-plus/components/u-search/u-search.vue"]]);
  39820. const __vite_glob_0_92 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
  39821. __proto__: null,
  39822. default: uSearch
  39823. }, Symbol.toStringTag, { value: "Module" }));
  39824. const _sfc_main$G = {
  39825. name: "up-select",
  39826. emits: ["update:current", "select"],
  39827. props: {
  39828. maxHeight: {
  39829. type: String,
  39830. default: "90vh"
  39831. },
  39832. overlay: {
  39833. type: Boolean,
  39834. default: true
  39835. },
  39836. overlayOpacity: {
  39837. type: Number,
  39838. default: 0.01
  39839. },
  39840. overlayStyle: {
  39841. type: Object,
  39842. default: () => {
  39843. return {};
  39844. }
  39845. },
  39846. duration: {
  39847. type: Number,
  39848. default: 300
  39849. },
  39850. label: {
  39851. type: String,
  39852. default: "选项"
  39853. },
  39854. options: {
  39855. type: Array,
  39856. default: () => {
  39857. return [];
  39858. }
  39859. },
  39860. keyName: {
  39861. type: String,
  39862. default: "id"
  39863. },
  39864. labelName: {
  39865. type: String,
  39866. default: "name"
  39867. },
  39868. showOptionsLabel: {
  39869. type: Boolean,
  39870. default: false
  39871. },
  39872. current: {
  39873. type: [String, Number],
  39874. default: ""
  39875. },
  39876. zIndex: {
  39877. type: Number,
  39878. default: 11e3
  39879. },
  39880. itemColor: {
  39881. type: String,
  39882. default: "#333333"
  39883. },
  39884. iconColor: {
  39885. type: String,
  39886. default: ""
  39887. },
  39888. iconSize: {
  39889. type: [String],
  39890. default: "13px"
  39891. }
  39892. },
  39893. data() {
  39894. return {
  39895. isOpen: false,
  39896. optionsWrapLeft: "auto",
  39897. optionsWrapRight: "auto"
  39898. };
  39899. },
  39900. computed: {
  39901. currentLabel() {
  39902. let name2 = "";
  39903. this.options.forEach((ele) => {
  39904. if (ele[this.keyName] === this.current) {
  39905. name2 = ele[this.labelName];
  39906. }
  39907. });
  39908. return name2;
  39909. }
  39910. },
  39911. methods: {
  39912. openSelect() {
  39913. this.isOpen = true;
  39914. this.$nextTick(() => {
  39915. if (this.isOpen) {
  39916. this.adjustOptionsWrapPosition();
  39917. }
  39918. });
  39919. },
  39920. overlayClick() {
  39921. this.isOpen = false;
  39922. },
  39923. selectItem(item) {
  39924. this.isOpen = false;
  39925. this.$emit("update:current", item[this.keyName]);
  39926. this.$emit("select", item);
  39927. },
  39928. adjustOptionsWrapPosition() {
  39929. let wi = getWindowInfo();
  39930. let windowWidth2 = wi.windowWidth;
  39931. this.$uGetRect(".u-select__options__wrap").then((rect) => {
  39932. formatAppLog("log", "at uni_modules/uview-plus/components/u-select/u-select.vue:158", rect);
  39933. if (rect.left + rect.width > windowWidth2) {
  39934. this.optionsWrapLeft = "auto";
  39935. this.optionsWrapRight = `0px`;
  39936. }
  39937. });
  39938. }
  39939. }
  39940. };
  39941. function _sfc_render$F(_ctx, _cache, $props, $setup, $data, $options) {
  39942. const _component_up_icon = vue.resolveComponent("up-icon");
  39943. const _component_u_overlay = resolveEasycom(vue.resolveDynamicComponent("u-overlay"), __easycom_0$d);
  39944. return vue.openBlock(), vue.createElementBlock("view", { class: "u-select" }, [
  39945. vue.createElementVNode("view", { class: "u-select__content" }, [
  39946. vue.createElementVNode("view", {
  39947. class: "u-select__label",
  39948. onClick: _cache[0] || (_cache[0] = (...args) => $options.openSelect && $options.openSelect(...args))
  39949. }, [
  39950. vue.renderSlot(_ctx.$slots, "text", { currentLabel: $options.currentLabel }, () => [
  39951. $props.showOptionsLabel ? (vue.openBlock(), vue.createElementBlock(
  39952. "text",
  39953. {
  39954. key: 0,
  39955. class: "u-select__text"
  39956. },
  39957. vue.toDisplayString($options.currentLabel),
  39958. 1
  39959. /* TEXT */
  39960. )) : (vue.openBlock(), vue.createElementBlock(
  39961. "text",
  39962. {
  39963. key: 1,
  39964. class: "u-select__text"
  39965. },
  39966. vue.toDisplayString($props.label),
  39967. 1
  39968. /* TEXT */
  39969. ))
  39970. ], true),
  39971. vue.renderSlot(_ctx.$slots, "icon", {}, () => [
  39972. vue.createVNode(_component_up_icon, {
  39973. name: "arrow-down",
  39974. size: $props.iconSize,
  39975. color: $props.iconColor
  39976. }, null, 8, ["size", "color"])
  39977. ], true)
  39978. ]),
  39979. $props.overlay ? (vue.openBlock(), vue.createBlock(_component_u_overlay, {
  39980. key: 0,
  39981. show: $data.isOpen,
  39982. onClick: $options.overlayClick,
  39983. zIndex: $props.zIndex,
  39984. duration: $props.duration + 50,
  39985. customStyle: $props.overlayStyle,
  39986. opacity: $props.overlayOpacity,
  39987. onTouchmove: vue.withModifiers(_ctx.noop, ["stop", "prevent"])
  39988. }, null, 8, ["show", "onClick", "zIndex", "duration", "customStyle", "opacity", "onTouchmove"])) : vue.createCommentVNode("v-if", true),
  39989. vue.createElementVNode(
  39990. "view",
  39991. {
  39992. class: "u-select__options__wrap",
  39993. style: vue.normalizeStyle({ overflowY: "auto", zIndex: $props.zIndex + 1, left: $data.optionsWrapLeft, right: $data.optionsWrapRight, maxHeight: $props.maxHeight })
  39994. },
  39995. [
  39996. $data.isOpen ? (vue.openBlock(), vue.createElementBlock("view", {
  39997. key: 0,
  39998. class: "u-select__options"
  39999. }, [
  40000. vue.renderSlot(_ctx.$slots, "options", {}, () => [
  40001. (vue.openBlock(true), vue.createElementBlock(
  40002. vue.Fragment,
  40003. null,
  40004. vue.renderList($props.options, (item, index2) => {
  40005. return vue.openBlock(), vue.createElementBlock("view", {
  40006. class: vue.normalizeClass(["u-select__options_item", $props.current == item[$props.keyName] ? "active" : ""]),
  40007. key: index2,
  40008. onClick: ($event) => $options.selectItem(item)
  40009. }, [
  40010. vue.renderSlot(_ctx.$slots, "optionItem", { item }, () => [
  40011. vue.createElementVNode(
  40012. "text",
  40013. {
  40014. class: "u-select__item_text",
  40015. style: vue.normalizeStyle({ color: $props.itemColor })
  40016. },
  40017. vue.toDisplayString(item[$props.labelName]),
  40018. 5
  40019. /* TEXT, STYLE */
  40020. )
  40021. ], true)
  40022. ], 10, ["onClick"]);
  40023. }),
  40024. 128
  40025. /* KEYED_FRAGMENT */
  40026. ))
  40027. ], true)
  40028. ])) : vue.createCommentVNode("v-if", true)
  40029. ],
  40030. 4
  40031. /* STYLE */
  40032. )
  40033. ])
  40034. ]);
  40035. }
  40036. const uSelect = /* @__PURE__ */ _export_sfc(_sfc_main$G, [["render", _sfc_render$F], ["__scopeId", "data-v-791c325c"], ["__file", "C:/Users/EDY/Desktop/项目/shuibei/uni_modules/uview-plus/components/u-select/u-select.vue"]]);
  40037. const __vite_glob_0_93 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
  40038. __proto__: null,
  40039. default: uSelect
  40040. }, Symbol.toStringTag, { value: "Module" }));
  40041. const _sfc_main$F = {
  40042. name: "u-short-video",
  40043. props: {
  40044. // tabs标签列表
  40045. tabsList: {
  40046. type: Array,
  40047. default: () => [
  40048. { name: "推荐" },
  40049. { name: "关注" },
  40050. { name: "朋友" },
  40051. { name: "本地" }
  40052. ]
  40053. },
  40054. // 视频列表数据
  40055. videoList: {
  40056. type: Array,
  40057. default: () => []
  40058. },
  40059. // 当前选中的tab索引
  40060. currentTab: {
  40061. type: Number,
  40062. default: 0
  40063. },
  40064. // 当前播放的视频索引
  40065. currentVideo: {
  40066. type: Number,
  40067. default: 0
  40068. }
  40069. },
  40070. data() {
  40071. return {
  40072. progressValue: 0,
  40073. showSpeedSheet: false,
  40074. currentSpeedVideoIndex: 0,
  40075. speedOptions: [
  40076. { name: "0.5x", value: 0.5 },
  40077. { name: "0.75x", value: 0.75 },
  40078. { name: "1.0x", value: 1 },
  40079. { name: "1.25x", value: 1.25 },
  40080. { name: "1.5x", value: 1.5 },
  40081. { name: "2.0x", value: 2 }
  40082. ]
  40083. };
  40084. },
  40085. methods: {
  40086. // 处理tab切换
  40087. handleTabChange(index2) {
  40088. this.$emit("tabChange", index2);
  40089. },
  40090. // 处理swiper切换
  40091. handleSwiperChange(e2) {
  40092. const currentIndex = e2.detail.current;
  40093. this.pauseCurrentVideo();
  40094. this.$nextTick(() => {
  40095. this.playVideo(currentIndex);
  40096. });
  40097. this.$emit("videoChange", currentIndex);
  40098. },
  40099. // 处理点赞
  40100. handleLike(item, index2) {
  40101. this.$emit("like", { item, index: index2 });
  40102. },
  40103. // 处理评论
  40104. handleComment(item, index2) {
  40105. this.$emit("comment", { item, index: index2 });
  40106. },
  40107. // 处理分享
  40108. handleShare(item, index2) {
  40109. this.$emit("share", { item, index: index2 });
  40110. },
  40111. // 处理收藏
  40112. handleCollect(item, index2) {
  40113. this.$emit("collect", { item, index: index2 });
  40114. },
  40115. // 进度条拖动中
  40116. onProgressChanging(value2) {
  40117. if (this.videoList[this.currentVideo]) {
  40118. this.videoList[this.currentVideo]["progressValue"] = value2.detail.value;
  40119. }
  40120. this.$emit("progressChanging", {
  40121. progress: value2.detail.value,
  40122. index: this.currentVideo
  40123. });
  40124. },
  40125. // 进度条值改变
  40126. onProgressChange(value2) {
  40127. if (this.videoList[this.currentVideo]) {
  40128. this.$set(this.videoList[this.currentVideo], "progressValue", value2.detail.value);
  40129. }
  40130. this.$emit("progressChange", {
  40131. progress: value2.detail.value,
  40132. index: this.currentVideo
  40133. });
  40134. },
  40135. // 显示倍速选项
  40136. showSpeedOptions(index2) {
  40137. this.currentSpeedVideoIndex = index2;
  40138. this.showSpeedSheet = true;
  40139. },
  40140. // 选择倍速
  40141. selectSpeed(action) {
  40142. const videoContext = uni.createVideoContext("video-" + this.currentSpeedVideoIndex, this);
  40143. videoContext.playbackRate(action.value);
  40144. this.$set(this.videoList[this.currentSpeedVideoIndex], "playbackRate", action.value);
  40145. this.showSpeedSheet = false;
  40146. },
  40147. // 播放指定索引的视频
  40148. playVideo(index2) {
  40149. const videoContext = uni.createVideoContext("video-" + index2, this);
  40150. videoContext.play();
  40151. },
  40152. // 暂停当前视频
  40153. pauseCurrentVideo() {
  40154. const videoContext = uni.createVideoContext("video-" + this.currentVideo, this);
  40155. videoContext.pause();
  40156. },
  40157. // 视频播放事件
  40158. onVideoPlay(e2) {
  40159. this.$emit("videoPlay", { index: this.currentVideo, event: e2 });
  40160. },
  40161. // 视频暂停事件
  40162. onVideoPause(e2) {
  40163. this.$emit("videoPause", { index: this.currentVideo, event: e2 });
  40164. },
  40165. // 视频结束事件
  40166. onVideoEnded(e2) {
  40167. this.$emit("videoEnded", { index: this.currentVideo, event: e2 });
  40168. },
  40169. // 视频时间更新事件
  40170. onTimeUpdate(e2) {
  40171. const progress = e2.detail.currentTime / e2.detail.duration * 100;
  40172. if (this.videoList[this.currentVideo]) {
  40173. this.$set(this.videoList[this.currentVideo], "progress", progress);
  40174. }
  40175. this.$emit("timeUpdate", { index: this.currentVideo, event: e2 });
  40176. },
  40177. // 视频元数据加载完成事件
  40178. onLoadedMetadata(e2) {
  40179. this.$emit("loadedMetadata", { index: this.currentVideo, event: e2 });
  40180. }
  40181. }
  40182. };
  40183. function _sfc_render$E(_ctx, _cache, $props, $setup, $data, $options) {
  40184. var _a2;
  40185. const _component_up_icon = vue.resolveComponent("up-icon");
  40186. const _component_up_tabs = vue.resolveComponent("up-tabs");
  40187. const _component_u_avatar = resolveEasycom(vue.resolveDynamicComponent("u-avatar"), __easycom_0$a);
  40188. const _component_up_button = vue.resolveComponent("up-button");
  40189. const _component_up_action_sheet = vue.resolveComponent("up-action-sheet");
  40190. const _component_up_slider = vue.resolveComponent("up-slider");
  40191. const _component_up_tabbar_item = vue.resolveComponent("up-tabbar-item");
  40192. const _component_up_tabbar = vue.resolveComponent("up-tabbar");
  40193. return vue.openBlock(), vue.createElementBlock("view", { class: "u-short-video" }, [
  40194. vue.createCommentVNode(" 顶部导航区域 "),
  40195. vue.createElementVNode("view", { class: "u-short-video__header" }, [
  40196. vue.renderSlot(_ctx.$slots, "menu", {}, () => [
  40197. vue.createElementVNode("view", { class: "u-short-video__header__menu" }, [
  40198. vue.createVNode(_component_up_icon, {
  40199. name: "grid",
  40200. size: "24"
  40201. })
  40202. ])
  40203. ], true),
  40204. vue.createVNode(_component_up_tabs, {
  40205. list: $props.tabsList,
  40206. current: $props.currentTab,
  40207. lineColor: "#ddd",
  40208. activeStyle: {
  40209. color: "#ddd",
  40210. fontWeight: 400,
  40211. transform: "scale(1)"
  40212. },
  40213. inactiveStyle: {
  40214. color: "#bbb",
  40215. transform: "scale(1)"
  40216. },
  40217. onChange: $options.handleTabChange,
  40218. class: "u-short-video__header__tabs"
  40219. }, null, 8, ["list", "current", "activeStyle", "inactiveStyle", "onChange"]),
  40220. vue.renderSlot(_ctx.$slots, "search", {}, () => [
  40221. vue.createElementVNode("view", { class: "u-short-video__header__search" }, [
  40222. vue.createVNode(_component_up_icon, {
  40223. name: "search",
  40224. size: "24"
  40225. })
  40226. ])
  40227. ], true)
  40228. ]),
  40229. vue.createCommentVNode(" 视频内容区域 "),
  40230. vue.createElementVNode("swiper", {
  40231. vertical: true,
  40232. autoplay: false,
  40233. onChange: _cache[5] || (_cache[5] = (...args) => $options.handleSwiperChange && $options.handleSwiperChange(...args)),
  40234. current: $props.currentVideo,
  40235. class: "u-short-video__content"
  40236. }, [
  40237. (vue.openBlock(true), vue.createElementBlock(
  40238. vue.Fragment,
  40239. null,
  40240. vue.renderList($props.videoList, (item, index2) => {
  40241. return vue.openBlock(), vue.createElementBlock("swiper-item", { key: index2 }, [
  40242. vue.createElementVNode("view", { class: "u-short-video__content__item" }, [
  40243. vue.createCommentVNode(" 视频播放区域 "),
  40244. vue.createElementVNode("view", { class: "u-short-video__content__video" }, [
  40245. vue.createElementVNode("video", {
  40246. id: "video-" + index2,
  40247. src: item.videoUrl,
  40248. autoplay: index2 === $props.currentVideo,
  40249. controls: false,
  40250. "show-fullscreen-btn": false,
  40251. "show-play-btn": false,
  40252. "show-center-play-btn": false,
  40253. "enable-progress-gesture": true,
  40254. loop: true,
  40255. "playback-rate": item.playbackRate || 1,
  40256. onPlay: _cache[0] || (_cache[0] = (...args) => $options.onVideoPlay && $options.onVideoPlay(...args)),
  40257. onPause: _cache[1] || (_cache[1] = (...args) => $options.onVideoPause && $options.onVideoPause(...args)),
  40258. onEnded: _cache[2] || (_cache[2] = (...args) => $options.onVideoEnded && $options.onVideoEnded(...args)),
  40259. onTimeupdate: _cache[3] || (_cache[3] = (...args) => $options.onTimeUpdate && $options.onTimeUpdate(...args)),
  40260. onLoadedmetadata: _cache[4] || (_cache[4] = (...args) => $options.onLoadedMetadata && $options.onLoadedMetadata(...args)),
  40261. style: { "width": "100%", "height": "100%" }
  40262. }, null, 40, ["id", "src", "autoplay", "playback-rate"]),
  40263. vue.createCommentVNode(" 倍速设置按钮 "),
  40264. vue.createCommentVNode(' <view class="u-short-video__content__video__speed" @click="showSpeedOptions(index)">\n <text class="speed-text">{{ item.playbackRate || 1.0 }}x</text>\n <up-icon name="arrow-down" size="12" color="#fff"></up-icon>\n </view> ')
  40265. ]),
  40266. vue.createCommentVNode(" 作者信息 "),
  40267. vue.createElementVNode("view", { class: "u-short-video__content__author" }, [
  40268. vue.createElementVNode("view", { class: "u-short-video__content__author__avatar" }, [
  40269. vue.createVNode(_component_u_avatar, {
  40270. src: item.author.avatar,
  40271. size: "50px"
  40272. }, null, 8, ["src"])
  40273. ]),
  40274. vue.createElementVNode("view", { class: "u-short-video__content__author__info" }, [
  40275. vue.createElementVNode(
  40276. "text",
  40277. { class: "u-short-video__content__author__name" },
  40278. vue.toDisplayString(item.author.name),
  40279. 1
  40280. /* TEXT */
  40281. ),
  40282. vue.createElementVNode(
  40283. "text",
  40284. { class: "u-short-video__content__author__desc" },
  40285. vue.toDisplayString(item.author.desc),
  40286. 1
  40287. /* TEXT */
  40288. )
  40289. ]),
  40290. vue.createElementVNode("view", { class: "u-short-video__content__author__follow" }, [
  40291. vue.createVNode(_component_up_button, {
  40292. type: "primary",
  40293. size: "mini"
  40294. }, {
  40295. default: vue.withCtx(() => [
  40296. vue.createTextVNode("关注")
  40297. ]),
  40298. _: 1
  40299. /* STABLE */
  40300. })
  40301. ])
  40302. ]),
  40303. vue.createCommentVNode(" 右侧操作区域 "),
  40304. vue.createElementVNode("view", { class: "u-short-video__content__actions" }, [
  40305. vue.renderSlot(_ctx.$slots, "actions", {
  40306. item,
  40307. index: index2
  40308. }, () => [
  40309. vue.createElementVNode("view", {
  40310. class: "u-short-video__content__actions__item",
  40311. onClick: ($event) => $options.handleLike(item, index2)
  40312. }, [
  40313. vue.createVNode(_component_up_icon, {
  40314. color: "#eee",
  40315. name: item.isLiked ? "thumb-up-fill" : "thumb-up",
  40316. size: "32px"
  40317. }, null, 8, ["name"]),
  40318. vue.createElementVNode(
  40319. "text",
  40320. { class: "u-short-video__content__actions__text" },
  40321. vue.toDisplayString(item.likeCount),
  40322. 1
  40323. /* TEXT */
  40324. )
  40325. ], 8, ["onClick"]),
  40326. vue.createElementVNode("view", {
  40327. class: "u-short-video__content__actions__item",
  40328. onClick: ($event) => $options.handleComment(item, index2)
  40329. }, [
  40330. vue.createVNode(_component_up_icon, {
  40331. color: "#eee",
  40332. name: "chat",
  40333. size: "32px"
  40334. }),
  40335. vue.createElementVNode(
  40336. "text",
  40337. { class: "u-short-video__content__actions__text" },
  40338. vue.toDisplayString(item.commentCount),
  40339. 1
  40340. /* TEXT */
  40341. )
  40342. ], 8, ["onClick"]),
  40343. vue.createElementVNode("view", {
  40344. class: "u-short-video__content__actions__item",
  40345. onClick: ($event) => $options.handleShare(item, index2)
  40346. }, [
  40347. vue.createVNode(_component_up_icon, {
  40348. color: "#eee",
  40349. name: "share",
  40350. size: "32px"
  40351. }),
  40352. vue.createElementVNode(
  40353. "text",
  40354. { class: "u-short-video__content__actions__text" },
  40355. vue.toDisplayString(item.shareCount),
  40356. 1
  40357. /* TEXT */
  40358. )
  40359. ], 8, ["onClick"]),
  40360. vue.createElementVNode("view", {
  40361. class: "u-short-video__content__actions__item",
  40362. onClick: ($event) => $options.handleCollect(item, index2)
  40363. }, [
  40364. vue.createVNode(_component_up_icon, {
  40365. color: "#eee",
  40366. name: item.isCollected ? "bookmark-fill" : "bookmark",
  40367. size: "32px"
  40368. }, null, 8, ["name"]),
  40369. vue.createElementVNode(
  40370. "text",
  40371. { class: "u-short-video__content__actions__text" },
  40372. vue.toDisplayString(item.collectCount),
  40373. 1
  40374. /* TEXT */
  40375. )
  40376. ], 8, ["onClick"])
  40377. ], true)
  40378. ])
  40379. ])
  40380. ]);
  40381. }),
  40382. 128
  40383. /* KEYED_FRAGMENT */
  40384. ))
  40385. ], 40, ["current"]),
  40386. vue.createCommentVNode(" 倍速选择弹窗 "),
  40387. vue.createVNode(_component_up_action_sheet, {
  40388. show: $data.showSpeedSheet,
  40389. actions: $data.speedOptions,
  40390. title: "播放速度",
  40391. onClose: _cache[6] || (_cache[6] = ($event) => $data.showSpeedSheet = false),
  40392. onSelect: $options.selectSpeed
  40393. }, null, 8, ["show", "actions", "onSelect"]),
  40394. vue.createCommentVNode(" 底部导航栏 "),
  40395. vue.createElementVNode("view", { class: "u-short-video__footer" }, [
  40396. vue.createCommentVNode(" 进度条 "),
  40397. vue.createElementVNode("view", {
  40398. class: "u-short-video__progress",
  40399. style: { "z-index": "999" }
  40400. }, [
  40401. vue.createVNode(_component_up_slider, {
  40402. value: (_a2 = $props.videoList[$props.currentVideo]) == null ? void 0 : _a2.progress,
  40403. min: 0,
  40404. max: 100,
  40405. step: 1,
  40406. "show-value": false,
  40407. innerStyle: { padding: 0 },
  40408. activeColor: "rgba(255,255,255,0.32)",
  40409. "inactive-color": "rgba(255,255,255,0.3)",
  40410. "block-size": "6px",
  40411. "block-color": "rgba(255,255,255,0.5)",
  40412. height: "1px",
  40413. onChanging: $options.onProgressChanging,
  40414. onChange: $options.onProgressChange
  40415. }, null, 8, ["value", "onChanging", "onChange"])
  40416. ]),
  40417. vue.renderSlot(_ctx.$slots, "tabbar", {}, () => [
  40418. vue.createVNode(_component_up_tabbar, {
  40419. fixed: true,
  40420. placeholder: true,
  40421. safeAreaInsetBottom: true,
  40422. borderColor: "rgba(255,255,255,0.25) !important",
  40423. backgroundColor: "rgba(255,255,255,0.05)"
  40424. }, {
  40425. default: vue.withCtx(() => [
  40426. vue.createVNode(_component_up_tabbar_item, {
  40427. onClick: _ctx.goNext,
  40428. text: "首页",
  40429. icon: "home"
  40430. }, null, 8, ["onClick"]),
  40431. vue.createVNode(_component_up_tabbar_item, {
  40432. text: "放映厅",
  40433. icon: "photo"
  40434. }),
  40435. vue.createVNode(_component_up_tabbar_item, {
  40436. text: "直播",
  40437. icon: "play-right"
  40438. }),
  40439. vue.createVNode(_component_up_tabbar_item, {
  40440. text: "我的",
  40441. icon: "account"
  40442. })
  40443. ]),
  40444. _: 1
  40445. /* STABLE */
  40446. })
  40447. ], true)
  40448. ])
  40449. ]);
  40450. }
  40451. const uShortVideo = /* @__PURE__ */ _export_sfc(_sfc_main$F, [["render", _sfc_render$E], ["__scopeId", "data-v-577dd224"], ["__file", "C:/Users/EDY/Desktop/项目/shuibei/uni_modules/uview-plus/components/u-short-video/u-short-video.vue"]]);
  40452. const __vite_glob_0_94 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
  40453. __proto__: null,
  40454. default: uShortVideo
  40455. }, Symbol.toStringTag, { value: "Module" }));
  40456. const _sfc_main$E = {
  40457. name: "u-signature",
  40458. props: {
  40459. // 画布宽度
  40460. width: {
  40461. type: [String, Number],
  40462. default: 300
  40463. },
  40464. // 画布高度
  40465. height: {
  40466. type: [String, Number],
  40467. default: 200
  40468. },
  40469. // 背景颜色
  40470. bgColor: {
  40471. type: String,
  40472. default: "#ffffff"
  40473. },
  40474. // 默认笔画颜色
  40475. color: {
  40476. type: String,
  40477. default: "#000000"
  40478. },
  40479. // 默认笔画粗细
  40480. thickness: {
  40481. type: [String, Number],
  40482. default: 3
  40483. },
  40484. // 是否显示工具栏
  40485. showToolbar: {
  40486. type: Boolean,
  40487. default: true
  40488. }
  40489. },
  40490. data() {
  40491. return {
  40492. canvasId: "u-signature-" + Math.random().toString(36).substr(2, 9),
  40493. canvasWidth: 300,
  40494. canvasHeight: 200,
  40495. lineColor: "#000000",
  40496. lineWidth: 3,
  40497. isDrawing: false,
  40498. pathStack: [],
  40499. // 存储绘制路径用于回退
  40500. currentPath: [],
  40501. // 当前绘制路径
  40502. ctx: null,
  40503. isEmpty: true,
  40504. presetColors: [
  40505. "#000000",
  40506. // 黑色
  40507. "#ff0000",
  40508. // 红色
  40509. "#00ff00",
  40510. // 绿色
  40511. "#0000ff",
  40512. // 蓝色
  40513. "#ffff00",
  40514. // 黄色
  40515. "#00ffff",
  40516. // 青色
  40517. "#ff00ff",
  40518. // 紫色
  40519. "#ffffff"
  40520. // 白色
  40521. ],
  40522. showBrushSettings: false,
  40523. showColorSettings: false,
  40524. lastPoint: null
  40525. // 保存上一个点的坐标
  40526. };
  40527. },
  40528. mounted() {
  40529. this.initCanvas();
  40530. },
  40531. watch: {
  40532. width: {
  40533. handler(newVal) {
  40534. this.canvasWidth = Number(newVal);
  40535. },
  40536. immediate: true
  40537. },
  40538. height: {
  40539. handler(newVal) {
  40540. this.canvasHeight = Number(newVal);
  40541. },
  40542. immediate: true
  40543. },
  40544. color: {
  40545. handler(newVal) {
  40546. this.lineColor = newVal;
  40547. },
  40548. immediate: true
  40549. },
  40550. thickness: {
  40551. handler(newVal) {
  40552. this.lineWidth = Number(newVal);
  40553. },
  40554. immediate: true
  40555. }
  40556. },
  40557. methods: {
  40558. initCanvas() {
  40559. const ctx = uni.createCanvasContext(this.canvasId, this);
  40560. this.ctx = ctx;
  40561. this.clearCanvas();
  40562. },
  40563. touchStart(e2) {
  40564. if (!this.ctx)
  40565. return;
  40566. this.isDrawing = true;
  40567. this.isEmpty = false;
  40568. this.currentPath = [];
  40569. const { x: x2, y: y2 } = this.getCanvasPoint(e2);
  40570. this.ctx.beginPath();
  40571. this.ctx.moveTo(x2, y2);
  40572. this.ctx.setLineCap("round");
  40573. this.ctx.setLineJoin("round");
  40574. this.ctx.setStrokeStyle(this.lineColor);
  40575. this.ctx.setLineWidth(this.lineWidth);
  40576. this.currentPath.push({
  40577. x: x2,
  40578. y: y2,
  40579. type: "start",
  40580. color: this.lineColor,
  40581. width: this.lineWidth
  40582. });
  40583. this.lastPoint = { x: x2, y: y2 };
  40584. e2.preventDefault();
  40585. },
  40586. touchMove(e2) {
  40587. if (!this.isDrawing || !this.ctx)
  40588. return;
  40589. e2.preventDefault();
  40590. const { x: x2, y: y2 } = this.getCanvasPoint(e2);
  40591. if (this.lastPoint) {
  40592. const distance = Math.sqrt(Math.pow(x2 - this.lastPoint.x, 2) + Math.pow(y2 - this.lastPoint.y, 2));
  40593. const steps = Math.max(1, Math.floor(distance / 1));
  40594. for (let i2 = 1; i2 <= steps; i2++) {
  40595. const t2 = i2 / steps;
  40596. const midX = this.lastPoint.x + (x2 - this.lastPoint.x) * t2;
  40597. const midY = this.lastPoint.y + (y2 - this.lastPoint.y) * t2;
  40598. this.ctx.lineTo(midX, midY);
  40599. this.ctx.stroke();
  40600. this.currentPath.push({
  40601. x: midX,
  40602. y: midY,
  40603. type: "move"
  40604. });
  40605. }
  40606. } else {
  40607. this.ctx.lineTo(x2, y2);
  40608. this.ctx.stroke();
  40609. this.currentPath.push({
  40610. x: x2,
  40611. y: y2,
  40612. type: "move"
  40613. });
  40614. }
  40615. this.ctx.draw(true);
  40616. this.lastPoint = { x: x2, y: y2 };
  40617. },
  40618. touchEnd(e2) {
  40619. if (!this.isDrawing || !this.ctx)
  40620. return;
  40621. this.isDrawing = false;
  40622. this.ctx.closePath();
  40623. this.lastPoint = null;
  40624. if (this.currentPath.length > 0) {
  40625. this.pathStack.push([...this.currentPath]);
  40626. }
  40627. },
  40628. // 同步获取canvas坐标点(兼容处理)
  40629. getCanvasPoint(e2) {
  40630. const touch = e2.touches[0];
  40631. uni.createSelectorQuery().in(this).select(".u-signature__canvas");
  40632. return {
  40633. x: touch.x,
  40634. y: touch.y
  40635. };
  40636. },
  40637. // 选择颜色
  40638. selectColor(color2) {
  40639. this.lineColor = color2;
  40640. },
  40641. // 回退操作
  40642. undo() {
  40643. if (this.pathStack.length === 0)
  40644. return;
  40645. this.pathStack.pop();
  40646. this.redraw();
  40647. },
  40648. // 重新绘制所有路径
  40649. redraw() {
  40650. this.clearCanvas();
  40651. if (this.pathStack.length === 0) {
  40652. this.isEmpty = true;
  40653. return;
  40654. }
  40655. this.isEmpty = false;
  40656. this.pathStack.forEach((path) => {
  40657. if (path.length === 0)
  40658. return;
  40659. this.ctx.beginPath();
  40660. this.ctx.setLineCap("round");
  40661. this.ctx.setLineJoin("round");
  40662. path.forEach((point, index2) => {
  40663. if (index2 === 0 && point.type === "start") {
  40664. this.ctx.setStrokeStyle(point.color);
  40665. this.ctx.setLineWidth(point.width);
  40666. this.ctx.moveTo(point.x, point.y);
  40667. ({ x: point.x, y: point.y });
  40668. } else if (point.type === "move") {
  40669. this.ctx.lineTo(point.x, point.y);
  40670. ({ x: point.x, y: point.y });
  40671. }
  40672. });
  40673. this.ctx.stroke();
  40674. this.ctx.draw(true);
  40675. });
  40676. },
  40677. // 清空画布
  40678. clear() {
  40679. this.pathStack = [];
  40680. this.currentPath = [];
  40681. this.isEmpty = true;
  40682. this.lastPoint = null;
  40683. this.clearCanvas();
  40684. },
  40685. // 清空画布内容
  40686. clearCanvas() {
  40687. if (!this.ctx)
  40688. return;
  40689. this.ctx.setFillStyle(this.bgColor);
  40690. this.ctx.fillRect(0, 0, this.canvasWidth, this.canvasHeight);
  40691. this.ctx.draw();
  40692. },
  40693. // 导出签名图片
  40694. exportSignature() {
  40695. if (this.isEmpty)
  40696. return;
  40697. uni.canvasToTempFilePath({
  40698. canvasId: this.canvasId,
  40699. fileType: "png",
  40700. quality: 1,
  40701. success: (res) => {
  40702. this.$emit("confirm", res.tempFilePath);
  40703. },
  40704. fail: (err) => {
  40705. this.$emit("error", err);
  40706. }
  40707. }, this);
  40708. },
  40709. // 切换笔画设置显示
  40710. toggleBrushSettings() {
  40711. this.showBrushSettings = !this.showBrushSettings;
  40712. if (this.showBrushSettings) {
  40713. this.showColorSettings = false;
  40714. }
  40715. },
  40716. // 切换颜色设置显示
  40717. toggleColorSettings() {
  40718. this.showColorSettings = !this.showColorSettings;
  40719. if (this.showColorSettings) {
  40720. this.showBrushSettings = false;
  40721. }
  40722. }
  40723. }
  40724. };
  40725. function _sfc_render$D(_ctx, _cache, $props, $setup, $data, $options) {
  40726. const _component_up_icon = vue.resolveComponent("up-icon");
  40727. const _component_up_slider = vue.resolveComponent("up-slider");
  40728. return vue.openBlock(), vue.createElementBlock("view", { class: "u-signature" }, [
  40729. vue.createElementVNode("view", { class: "u-signature__canvas-wrap" }, [
  40730. vue.createElementVNode("canvas", {
  40731. class: "u-signature__canvas",
  40732. "canvas-id": $data.canvasId,
  40733. "disable-scroll": true,
  40734. onTouchstart: _cache[0] || (_cache[0] = (...args) => $options.touchStart && $options.touchStart(...args)),
  40735. onTouchmove: _cache[1] || (_cache[1] = (...args) => $options.touchMove && $options.touchMove(...args)),
  40736. onTouchend: _cache[2] || (_cache[2] = (...args) => $options.touchEnd && $options.touchEnd(...args)),
  40737. style: vue.normalizeStyle({
  40738. width: $data.canvasWidth + "px",
  40739. height: $data.canvasHeight + "px",
  40740. background: $props.bgColor
  40741. })
  40742. }, null, 44, ["canvas-id"])
  40743. ]),
  40744. $props.showToolbar ? (vue.openBlock(), vue.createElementBlock("view", {
  40745. key: 0,
  40746. class: "u-signature__toolbar"
  40747. }, [
  40748. vue.createElementVNode("view", { class: "u-signature__toolbar-icons u-flex u-flex-x" }, [
  40749. vue.createElementVNode("view", {
  40750. class: "u-signature__toolbar-icon",
  40751. onClick: _cache[3] || (_cache[3] = (...args) => $options.undo && $options.undo(...args))
  40752. }, [
  40753. vue.createVNode(_component_up_icon, {
  40754. name: "arrow-left",
  40755. size: "22",
  40756. color: $data.pathStack.length === 0 ? "#ccc" : "#999"
  40757. }, null, 8, ["color"])
  40758. ]),
  40759. vue.createElementVNode("view", {
  40760. class: "u-signature__toolbar-icon",
  40761. onClick: _cache[4] || (_cache[4] = (...args) => $options.clear && $options.clear(...args))
  40762. }, [
  40763. vue.createVNode(_component_up_icon, {
  40764. name: "trash",
  40765. size: "25",
  40766. color: "#999"
  40767. })
  40768. ]),
  40769. vue.createElementVNode("view", {
  40770. class: "u-signature__toolbar-icon",
  40771. onClick: _cache[5] || (_cache[5] = (...args) => $options.toggleBrushSettings && $options.toggleBrushSettings(...args))
  40772. }, [
  40773. vue.createVNode(_component_up_icon, {
  40774. name: "edit-pen",
  40775. size: "25",
  40776. color: "#999"
  40777. })
  40778. ]),
  40779. vue.createElementVNode("view", {
  40780. class: "u-signature__toolbar-icon",
  40781. onClick: _cache[6] || (_cache[6] = (...args) => $options.toggleColorSettings && $options.toggleColorSettings(...args))
  40782. }, [
  40783. vue.createVNode(_component_up_icon, {
  40784. name: "grid",
  40785. size: "24",
  40786. color: "#999"
  40787. })
  40788. ]),
  40789. vue.createElementVNode("view", {
  40790. class: "u-signature__toolbar-icon",
  40791. onClick: _cache[7] || (_cache[7] = (...args) => $options.exportSignature && $options.exportSignature(...args))
  40792. }, [
  40793. vue.createVNode(_component_up_icon, {
  40794. name: "checkmark",
  40795. size: "25",
  40796. color: $data.isEmpty ? "#ccc" : "#999"
  40797. }, null, 8, ["color"])
  40798. ])
  40799. ]),
  40800. vue.createCommentVNode(" 笔画设置 "),
  40801. $data.showBrushSettings ? (vue.openBlock(), vue.createElementBlock("view", {
  40802. key: 0,
  40803. class: "u-signature__brush-settings"
  40804. }, [
  40805. vue.createElementVNode("view", { class: "u-signature__progress" }, [
  40806. vue.createElementVNode(
  40807. "text",
  40808. { class: "u-signature__progress-label" },
  40809. vue.toDisplayString(_ctx.t("up.signature.penSize")) + ":",
  40810. 1
  40811. /* TEXT */
  40812. ),
  40813. vue.createVNode(_component_up_slider, {
  40814. modelValue: $data.lineWidth,
  40815. "onUpdate:modelValue": _cache[8] || (_cache[8] = ($event) => $data.lineWidth = $event),
  40816. min: 1,
  40817. max: 20,
  40818. step: 1,
  40819. onShowValue: ($event) => true,
  40820. "value-show": $data.lineWidth
  40821. }, null, 8, ["modelValue", "value-show"])
  40822. ])
  40823. ])) : vue.createCommentVNode("v-if", true),
  40824. vue.createCommentVNode(" 颜色设置 "),
  40825. $data.showColorSettings ? (vue.openBlock(), vue.createElementBlock("view", {
  40826. key: 1,
  40827. class: "u-signature__color-settings"
  40828. }, [
  40829. vue.createElementVNode("view", { class: "u-signature__color-picker" }, [
  40830. vue.createElementVNode(
  40831. "text",
  40832. { class: "u-signature__color-label" },
  40833. vue.toDisplayString(_ctx.t("up.signature.penColor")) + ":",
  40834. 1
  40835. /* TEXT */
  40836. ),
  40837. vue.createElementVNode("view", { class: "u-signature__colors" }, [
  40838. (vue.openBlock(true), vue.createElementBlock(
  40839. vue.Fragment,
  40840. null,
  40841. vue.renderList($data.presetColors, (color2, index2) => {
  40842. return vue.openBlock(), vue.createElementBlock("view", {
  40843. key: index2,
  40844. class: vue.normalizeClass(["u-signature__color-item", { "u-signature__color-item--active": $data.lineColor === color2 }]),
  40845. style: vue.normalizeStyle({ backgroundColor: color2 }),
  40846. onClick: ($event) => $options.selectColor(color2)
  40847. }, null, 14, ["onClick"]);
  40848. }),
  40849. 128
  40850. /* KEYED_FRAGMENT */
  40851. ))
  40852. ])
  40853. ])
  40854. ])) : vue.createCommentVNode("v-if", true)
  40855. ])) : vue.createCommentVNode("v-if", true)
  40856. ]);
  40857. }
  40858. const uSignature = /* @__PURE__ */ _export_sfc(_sfc_main$E, [["render", _sfc_render$D], ["__scopeId", "data-v-374dbb3e"], ["__file", "C:/Users/EDY/Desktop/项目/shuibei/uni_modules/uview-plus/components/u-signature/u-signature.vue"]]);
  40859. const __vite_glob_0_95 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
  40860. __proto__: null,
  40861. default: uSignature
  40862. }, Symbol.toStringTag, { value: "Module" }));
  40863. const props$n = defineMixin({
  40864. props: {
  40865. // 是否展示骨架组件
  40866. loading: {
  40867. type: Boolean,
  40868. default: () => props$1x.skeleton.loading
  40869. },
  40870. // 是否开启动画效果
  40871. animate: {
  40872. type: Boolean,
  40873. default: () => props$1x.skeleton.animate
  40874. },
  40875. // 段落占位图行数
  40876. rows: {
  40877. type: [String, Number],
  40878. default: () => props$1x.skeleton.rows
  40879. },
  40880. // 段落占位图的宽度
  40881. rowsWidth: {
  40882. type: [String, Number, Array],
  40883. default: () => props$1x.skeleton.rowsWidth
  40884. },
  40885. // 段落占位图的高度
  40886. rowsHeight: {
  40887. type: [String, Number, Array],
  40888. default: () => props$1x.skeleton.rowsHeight
  40889. },
  40890. // 是否展示标题占位图
  40891. title: {
  40892. type: Boolean,
  40893. default: () => props$1x.skeleton.title
  40894. },
  40895. // 段落标题的宽度
  40896. titleWidth: {
  40897. type: [String, Number],
  40898. default: () => props$1x.skeleton.titleWidth
  40899. },
  40900. // 段落标题的高度
  40901. titleHeight: {
  40902. type: [String, Number],
  40903. default: () => props$1x.skeleton.titleHeight
  40904. },
  40905. // 是否展示头像占位图
  40906. avatar: {
  40907. type: Boolean,
  40908. default: () => props$1x.skeleton.avatar
  40909. },
  40910. // 头像占位图大小
  40911. avatarSize: {
  40912. type: [String, Number],
  40913. default: () => props$1x.skeleton.avatarSize
  40914. },
  40915. // 头像占位图的形状,circle-圆形,square-方形
  40916. avatarShape: {
  40917. type: String,
  40918. default: () => props$1x.skeleton.avatarShape
  40919. }
  40920. }
  40921. });
  40922. const _sfc_main$D = {
  40923. name: "u-skeleton",
  40924. mixins: [mpMixin, mixin, props$n],
  40925. data() {
  40926. return {
  40927. width: 0
  40928. };
  40929. },
  40930. watch: {
  40931. loading() {
  40932. this.getComponentWidth();
  40933. }
  40934. },
  40935. computed: {
  40936. rowsArray() {
  40937. if (/%$/.test(this.rowsHeight)) {
  40938. error("rowsHeight参数不支持百分比单位");
  40939. }
  40940. const rows = [];
  40941. for (let i2 = 0; i2 < this.rows; i2++) {
  40942. let item = {}, rowWidth = test.array(this.rowsWidth) ? this.rowsWidth[i2] || (i2 === this.rows - 1 ? "70%" : "100%") : i2 === this.rows - 1 ? "70%" : this.rowsWidth, rowHeight = test.array(this.rowsHeight) ? this.rowsHeight[i2] || "18px" : this.rowsHeight;
  40943. item.marginTop = !this.title && i2 === 0 ? 0 : this.title && i2 === 0 ? "20px" : "12px";
  40944. if (/%$/.test(rowWidth)) {
  40945. item.width = addUnit(this.width * parseInt(rowWidth) / 100);
  40946. } else {
  40947. item.width = addUnit(rowWidth);
  40948. }
  40949. item.height = addUnit(rowHeight);
  40950. rows.push(item);
  40951. }
  40952. return rows;
  40953. },
  40954. uTitleWidth() {
  40955. let tWidth = 0;
  40956. if (/%$/.test(this.titleWidth)) {
  40957. tWidth = addUnit(this.width * parseInt(this.titleWidth) / 100);
  40958. } else {
  40959. tWidth = addUnit(this.titleWidth);
  40960. }
  40961. return addUnit(tWidth);
  40962. }
  40963. },
  40964. mounted() {
  40965. this.init();
  40966. },
  40967. methods: {
  40968. addUnit,
  40969. init() {
  40970. this.getComponentWidth();
  40971. },
  40972. async setNvueAnimation() {
  40973. },
  40974. // 获取组件的宽度
  40975. async getComponentWidth() {
  40976. await sleep(20);
  40977. this.$uGetRect(".u-skeleton__wrapper__content").then((size) => {
  40978. this.width = size.width;
  40979. });
  40980. }
  40981. }
  40982. };
  40983. function _sfc_render$C(_ctx, _cache, $props, $setup, $data, $options) {
  40984. return vue.openBlock(), vue.createElementBlock("view", { class: "u-skeleton" }, [
  40985. _ctx.loading ? (vue.openBlock(), vue.createElementBlock(
  40986. "view",
  40987. {
  40988. key: 0,
  40989. class: "u-skeleton__wrapper",
  40990. ref: "u-skeleton__wrapper",
  40991. style: { "display": "flex", "flex-direction": "row" }
  40992. },
  40993. [
  40994. _ctx.avatar ? (vue.openBlock(), vue.createElementBlock(
  40995. "view",
  40996. {
  40997. key: 0,
  40998. class: vue.normalizeClass(["u-skeleton__wrapper__avatar", [`u-skeleton__wrapper__avatar--${_ctx.avatarShape}`, _ctx.animate && "animate"]]),
  40999. style: vue.normalizeStyle({
  41000. height: $options.addUnit(_ctx.avatarSize),
  41001. width: $options.addUnit(_ctx.avatarSize)
  41002. })
  41003. },
  41004. null,
  41005. 6
  41006. /* CLASS, STYLE */
  41007. )) : vue.createCommentVNode("v-if", true),
  41008. vue.createElementVNode(
  41009. "view",
  41010. {
  41011. class: "u-skeleton__wrapper__content",
  41012. ref: "u-skeleton__wrapper__content",
  41013. style: { "flex": "1" }
  41014. },
  41015. [
  41016. _ctx.title ? (vue.openBlock(), vue.createElementBlock(
  41017. "view",
  41018. {
  41019. key: 0,
  41020. class: vue.normalizeClass(["u-skeleton__wrapper__content__title", [_ctx.animate && "animate"]]),
  41021. style: vue.normalizeStyle({
  41022. width: $options.uTitleWidth,
  41023. height: $options.addUnit(_ctx.titleHeight)
  41024. })
  41025. },
  41026. null,
  41027. 6
  41028. /* CLASS, STYLE */
  41029. )) : vue.createCommentVNode("v-if", true),
  41030. (vue.openBlock(true), vue.createElementBlock(
  41031. vue.Fragment,
  41032. null,
  41033. vue.renderList($options.rowsArray, (item, index2) => {
  41034. return vue.openBlock(), vue.createElementBlock(
  41035. "view",
  41036. {
  41037. class: vue.normalizeClass(["u-skeleton__wrapper__content__rows", [_ctx.animate && "animate"]]),
  41038. key: index2,
  41039. style: vue.normalizeStyle({
  41040. width: item.width,
  41041. height: item.height,
  41042. marginTop: item.marginTop
  41043. })
  41044. },
  41045. null,
  41046. 6
  41047. /* CLASS, STYLE */
  41048. );
  41049. }),
  41050. 128
  41051. /* KEYED_FRAGMENT */
  41052. ))
  41053. ],
  41054. 512
  41055. /* NEED_PATCH */
  41056. )
  41057. ],
  41058. 512
  41059. /* NEED_PATCH */
  41060. )) : vue.renderSlot(_ctx.$slots, "default", { key: 1 }, void 0, true)
  41061. ]);
  41062. }
  41063. const uSkeleton = /* @__PURE__ */ _export_sfc(_sfc_main$D, [["render", _sfc_render$C], ["__scopeId", "data-v-b376446f"], ["__file", "C:/Users/EDY/Desktop/项目/shuibei/uni_modules/uview-plus/components/u-skeleton/u-skeleton.vue"]]);
  41064. const __vite_glob_0_96 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
  41065. __proto__: null,
  41066. default: uSkeleton
  41067. }, Symbol.toStringTag, { value: "Module" }));
  41068. const props$m = defineMixin({
  41069. props: {
  41070. // 最小可选值
  41071. min: {
  41072. type: [Number, String],
  41073. default: () => props$1x.slider.min
  41074. },
  41075. // 最大可选值
  41076. max: {
  41077. type: [Number, String],
  41078. default: () => props$1x.slider.max
  41079. },
  41080. // 步长,取值必须大于 0,并且可被(max - min)整除
  41081. step: {
  41082. type: [Number, String],
  41083. default: () => props$1x.slider.step
  41084. },
  41085. // 当前取值
  41086. modelValue: {
  41087. type: [String, Number],
  41088. default: () => props$1x.slider.value
  41089. },
  41090. // 是否区间模式
  41091. isRange: {
  41092. type: Boolean,
  41093. default: false
  41094. },
  41095. // 双滑块时值
  41096. rangeValue: {
  41097. type: [Array],
  41098. default: [0, 0]
  41099. },
  41100. // 滑块右侧已选择部分的背景色
  41101. activeColor: {
  41102. type: String,
  41103. default: () => props$1x.slider.activeColor
  41104. },
  41105. // 滑块左侧未选择部分的背景色
  41106. inactiveColor: {
  41107. type: String,
  41108. default: () => props$1x.slider.inactiveColor
  41109. },
  41110. // 滑块的大小,取值范围为 12 - 28
  41111. blockSize: {
  41112. type: [Number, String],
  41113. default: () => props$1x.slider.blockSize
  41114. },
  41115. // 滑块的颜色
  41116. blockColor: {
  41117. type: String,
  41118. default: () => props$1x.slider.blockColor
  41119. },
  41120. // 用户对滑块的自定义颜色
  41121. blockStyle: {
  41122. type: Object,
  41123. default: () => props$1x.slider.blockStyle
  41124. },
  41125. // 禁用状态
  41126. disabled: {
  41127. type: Boolean,
  41128. default: () => props$1x.slider.disabled
  41129. },
  41130. // 是否显示当前的选择值
  41131. showValue: {
  41132. type: Boolean,
  41133. default: () => props$1x.slider.showValue
  41134. },
  41135. // 是否渲染uni-app框架内置组件
  41136. useNative: {
  41137. type: Boolean,
  41138. default: () => props$1x.slider.useNative
  41139. },
  41140. // 滑块高度
  41141. height: {
  41142. type: String,
  41143. default: () => props$1x.slider.height
  41144. },
  41145. innerStyle: {
  41146. type: Object,
  41147. default: () => props$1x.slider.innerStyle
  41148. }
  41149. }
  41150. });
  41151. const _sfc_main$C = {
  41152. name: "u-slider",
  41153. mixins: [mpMixin, mixin, props$m],
  41154. emits: ["start", "changing", "change", "update:modelValue"],
  41155. data() {
  41156. return {
  41157. startX: 0,
  41158. status: "end",
  41159. newValue: 0,
  41160. distanceX: 0,
  41161. startValue0: 0,
  41162. startValue: 0,
  41163. barStyle0: {},
  41164. barStyle: {},
  41165. sliderRect: {
  41166. left: 0,
  41167. width: 0
  41168. }
  41169. };
  41170. },
  41171. watch: {
  41172. modelValue(n2) {
  41173. if (this.status == "end") {
  41174. const $crtFmtValue = this.updateValue(this.modelValue, false);
  41175. this.$emit("change", $crtFmtValue);
  41176. }
  41177. },
  41178. rangeValue: {
  41179. handler(n2) {
  41180. if (this.status == "end") {
  41181. this.updateValue(this.rangeValue[0], false, 0);
  41182. this.updateValue(this.rangeValue[1], false, 1);
  41183. this.$emit("change", this.rangeValue);
  41184. }
  41185. },
  41186. deep: true
  41187. }
  41188. },
  41189. created() {
  41190. },
  41191. computed: {
  41192. innerStyleCpu() {
  41193. let style = this.innerStyle;
  41194. style.height = this.isRange && this.showValue ? getPx(this.blockSize) + 24 + "px" : getPx(this.blockSize) + "px";
  41195. return style;
  41196. }
  41197. },
  41198. async mounted() {
  41199. if (!this.useNative) {
  41200. this.$uGetRect(".u-slider__base").then((rect) => {
  41201. this.sliderRect = rect;
  41202. if (this.sliderRect.width == 0) {
  41203. formatAppLog("info", "at uni_modules/uview-plus/components/u-slider/u-slider.vue:193", "如在弹窗等元素中使用,请使用v-if来显示滑块,否则无法计算长度。");
  41204. }
  41205. this.init();
  41206. });
  41207. }
  41208. },
  41209. methods: {
  41210. addStyle,
  41211. getPx,
  41212. init() {
  41213. if (this.isRange) {
  41214. this.updateValue(this.rangeValue[0], false, 0);
  41215. this.updateValue(this.rangeValue[1], false, 1);
  41216. } else {
  41217. this.updateValue(this.modelValue, false);
  41218. }
  41219. },
  41220. // native拖动过程中触发
  41221. changingHandler(e2) {
  41222. const {
  41223. value: value2
  41224. } = e2.detail;
  41225. this.$emit("update:modelValue", value2);
  41226. this.$emit("changing", value2);
  41227. },
  41228. // native滑动结束时触发
  41229. changeHandler(e2) {
  41230. const {
  41231. value: value2
  41232. } = e2.detail;
  41233. this.$emit("update:modelValue", value2);
  41234. this.$emit("change", value2);
  41235. },
  41236. onTouchStart(event, index2 = 1) {
  41237. if (this.disabled)
  41238. return;
  41239. this.startX = 0;
  41240. let touches = event.touches[0];
  41241. this.startX = touches.clientX;
  41242. if (this.isRange) {
  41243. this.startValue0 = this.format(this.rangeValue[0], 0);
  41244. this.startValue = this.format(this.rangeValue[1], 1);
  41245. } else {
  41246. this.startValue = this.format(this.modelValue);
  41247. }
  41248. this.status = "start";
  41249. let clientX = 0;
  41250. clientX = touches.clientX;
  41251. this.distanceX = clientX - this.sliderRect.left;
  41252. this.newValue = this.distanceX / this.sliderRect.width * (this.max - this.min) + parseFloat(this.min);
  41253. this.status = "moving";
  41254. let $crtFmtValue = this.updateValue(this.newValue, true, index2);
  41255. this.$emit("changing", $crtFmtValue);
  41256. },
  41257. onTouchMove(event, index2 = 1) {
  41258. if (this.disabled)
  41259. return;
  41260. if (this.status == "start")
  41261. this.$emit("start");
  41262. let touches = event.touches[0];
  41263. let clientX = 0;
  41264. clientX = touches.clientX;
  41265. this.distanceX = clientX - this.sliderRect.left;
  41266. this.newValue = this.distanceX / this.sliderRect.width * (this.max - this.min) + parseFloat(this.min);
  41267. this.status = "moving";
  41268. let $crtFmtValue = this.updateValue(this.newValue, true, index2);
  41269. this.$emit("changing", $crtFmtValue);
  41270. },
  41271. onTouchEnd(event, index2 = 1) {
  41272. if (this.disabled)
  41273. return;
  41274. if (this.status === "moving") {
  41275. let $crtFmtValue = this.updateValue(this.newValue, false, index2);
  41276. this.$emit("change", $crtFmtValue);
  41277. }
  41278. this.status = "end";
  41279. },
  41280. onTouchStart2(event, index2 = 1) {
  41281. if (!this.isRange)
  41282. ;
  41283. },
  41284. onTouchMove2(event, index2 = 1) {
  41285. if (!this.isRange)
  41286. ;
  41287. },
  41288. onTouchEnd2(event, index2 = 1) {
  41289. if (!this.isRange)
  41290. ;
  41291. },
  41292. onClick(event) {
  41293. if (this.disabled)
  41294. return;
  41295. let clientX = event.detail.x - this.sliderRect.left;
  41296. this.newValue = clientX / this.sliderRect.width * (this.max - this.min) + parseFloat(this.min);
  41297. this.updateValue(this.newValue, false, 1);
  41298. },
  41299. updateValue(value2, drag, index2 = 1) {
  41300. let valueFormat = this.format(value2, index2);
  41301. if (valueFormat > this.max) {
  41302. valueFormat = this.max;
  41303. }
  41304. let width = Math.min((valueFormat - this.min) / (this.max - this.min) * this.sliderRect.width, this.sliderRect.width);
  41305. let barStyle = {
  41306. width: width + "px"
  41307. };
  41308. if (drag == true) {
  41309. barStyle.transition = "none";
  41310. } else {
  41311. delete barStyle.transition;
  41312. }
  41313. if (this.isRange) {
  41314. this.rangeValue[index2] = valueFormat;
  41315. this.$emit("update:modelValue", this.rangeValue);
  41316. } else {
  41317. this.$emit("update:modelValue", valueFormat);
  41318. }
  41319. switch (index2) {
  41320. case 0:
  41321. this.barStyle0 = { ...barStyle };
  41322. break;
  41323. case 1:
  41324. this.barStyle = { ...barStyle };
  41325. break;
  41326. }
  41327. if (this.isRange) {
  41328. return this.rangeValue;
  41329. } else {
  41330. return valueFormat;
  41331. }
  41332. },
  41333. format(value2, index2 = 1) {
  41334. if (this.isRange) {
  41335. switch (index2) {
  41336. case 0:
  41337. return Math.round(
  41338. Math.max(this.min, Math.min(value2, this.rangeValue[1] - parseInt(this.step), this.max)) / parseInt(this.step)
  41339. ) * parseInt(this.step);
  41340. case 1:
  41341. return Math.round(
  41342. Math.max(this.min, this.rangeValue[0] + parseInt(this.step), Math.min(value2, this.max)) / parseInt(this.step)
  41343. ) * parseInt(this.step);
  41344. }
  41345. } else {
  41346. return Math.round(
  41347. Math.max(this.min, Math.min(value2, this.max)) / parseInt(this.step)
  41348. ) * parseInt(this.step);
  41349. }
  41350. }
  41351. }
  41352. };
  41353. function _sfc_render$B(_ctx, _cache, $props, $setup, $data, $options) {
  41354. return vue.openBlock(), vue.createElementBlock(
  41355. "view",
  41356. {
  41357. class: "u-slider",
  41358. style: vue.normalizeStyle([$options.addStyle(_ctx.customStyle)])
  41359. },
  41360. [
  41361. !_ctx.useNative || _ctx.isRange ? (vue.openBlock(), vue.createElementBlock(
  41362. vue.Fragment,
  41363. { key: 0 },
  41364. [
  41365. vue.createElementVNode(
  41366. "view",
  41367. {
  41368. ref: "u-slider-inner",
  41369. class: vue.normalizeClass(["u-slider-inner", [_ctx.disabled ? "u-slider--disabled" : ""]]),
  41370. onClick: _cache[9] || (_cache[9] = (...args) => $options.onClick && $options.onClick(...args)),
  41371. "on:onTouchStart": _cache[10] || (_cache[10] = ($event) => $options.onTouchStart2($event, 1)),
  41372. onTouchmove: _cache[11] || (_cache[11] = ($event) => $options.onTouchMove2($event, 1)),
  41373. onTouchend: _cache[12] || (_cache[12] = ($event) => $options.onTouchEnd2($event, 1)),
  41374. onTouchcancel: _cache[13] || (_cache[13] = ($event) => $options.onTouchEnd2($event, 1)),
  41375. style: vue.normalizeStyle($options.innerStyleCpu)
  41376. },
  41377. [
  41378. vue.createElementVNode(
  41379. "view",
  41380. {
  41381. ref: "u-slider__base",
  41382. class: "u-slider__base",
  41383. style: vue.normalizeStyle([
  41384. {
  41385. height: _ctx.height,
  41386. backgroundColor: _ctx.inactiveColor
  41387. }
  41388. ])
  41389. },
  41390. null,
  41391. 4
  41392. /* STYLE */
  41393. ),
  41394. vue.createElementVNode(
  41395. "view",
  41396. {
  41397. onClick: _cache[0] || (_cache[0] = (...args) => $options.onClick && $options.onClick(...args)),
  41398. class: "u-slider__gap",
  41399. style: vue.normalizeStyle([
  41400. $data.barStyle,
  41401. {
  41402. height: _ctx.height,
  41403. marginTop: "-" + _ctx.height,
  41404. backgroundColor: _ctx.activeColor
  41405. }
  41406. ])
  41407. },
  41408. null,
  41409. 4
  41410. /* STYLE */
  41411. ),
  41412. _ctx.isRange ? (vue.openBlock(), vue.createElementBlock(
  41413. "view",
  41414. {
  41415. key: 0,
  41416. class: "u-slider__gap u-slider__gap-0",
  41417. style: vue.normalizeStyle([
  41418. $data.barStyle0,
  41419. {
  41420. height: _ctx.height,
  41421. marginTop: "-" + _ctx.height,
  41422. backgroundColor: _ctx.inactiveColor
  41423. }
  41424. ])
  41425. },
  41426. null,
  41427. 4
  41428. /* STYLE */
  41429. )) : vue.createCommentVNode("v-if", true),
  41430. _ctx.isRange && _ctx.showValue ? (vue.openBlock(), vue.createElementBlock(
  41431. "text",
  41432. {
  41433. key: 1,
  41434. class: "u-slider__show-range-value",
  41435. style: vue.normalizeStyle({ left: $options.getPx($data.barStyle0.width) + $options.getPx(_ctx.blockSize) / 2 + "px" })
  41436. },
  41437. vue.toDisplayString(this.rangeValue[0]),
  41438. 5
  41439. /* TEXT, STYLE */
  41440. )) : vue.createCommentVNode("v-if", true),
  41441. _ctx.isRange && _ctx.showValue ? (vue.openBlock(), vue.createElementBlock(
  41442. "text",
  41443. {
  41444. key: 2,
  41445. class: "u-slider__show-range-value",
  41446. style: vue.normalizeStyle({ left: $options.getPx($data.barStyle.width) + $options.getPx(_ctx.blockSize) / 2 + "px" })
  41447. },
  41448. vue.toDisplayString(this.rangeValue[1]),
  41449. 5
  41450. /* TEXT, STYLE */
  41451. )) : vue.createCommentVNode("v-if", true),
  41452. _ctx.isRange ? (vue.openBlock(), vue.createElementBlock(
  41453. "view",
  41454. {
  41455. key: 3,
  41456. class: "u-slider__button-wrap u-slider__button-wrap-0",
  41457. onTouchstart: _cache[1] || (_cache[1] = ($event) => $options.onTouchStart($event, 0)),
  41458. onTouchmove: _cache[2] || (_cache[2] = ($event) => $options.onTouchMove($event, 0)),
  41459. onTouchend: _cache[3] || (_cache[3] = ($event) => $options.onTouchEnd($event, 0)),
  41460. onTouchcancel: _cache[4] || (_cache[4] = ($event) => $options.onTouchEnd($event, 0)),
  41461. style: vue.normalizeStyle({ left: $options.getPx($data.barStyle0.width) + $options.getPx(_ctx.blockSize) / 2 + "px" })
  41462. },
  41463. [
  41464. _ctx.$slots.min || _ctx.$slots.$min ? vue.renderSlot(_ctx.$slots, "min", { key: 0 }, void 0, true) : (vue.openBlock(), vue.createElementBlock(
  41465. "view",
  41466. {
  41467. key: 1,
  41468. class: "u-slider__button",
  41469. style: vue.normalizeStyle([_ctx.blockStyle, {
  41470. height: $options.getPx(_ctx.blockSize, true),
  41471. width: $options.getPx(_ctx.blockSize, true),
  41472. backgroundColor: _ctx.blockColor
  41473. }])
  41474. },
  41475. null,
  41476. 4
  41477. /* STYLE */
  41478. ))
  41479. ],
  41480. 36
  41481. /* STYLE, NEED_HYDRATION */
  41482. )) : vue.createCommentVNode("v-if", true),
  41483. vue.createElementVNode(
  41484. "view",
  41485. {
  41486. class: "u-slider__button-wrap",
  41487. onTouchstart: _cache[5] || (_cache[5] = (...args) => $options.onTouchStart && $options.onTouchStart(...args)),
  41488. onTouchmove: _cache[6] || (_cache[6] = (...args) => $options.onTouchMove && $options.onTouchMove(...args)),
  41489. onTouchend: _cache[7] || (_cache[7] = (...args) => $options.onTouchEnd && $options.onTouchEnd(...args)),
  41490. onTouchcancel: _cache[8] || (_cache[8] = (...args) => $options.onTouchEnd && $options.onTouchEnd(...args)),
  41491. style: vue.normalizeStyle({ left: $options.getPx($data.barStyle.width) + $options.getPx(_ctx.blockSize) / 2 + "px" })
  41492. },
  41493. [
  41494. _ctx.isRange && (_ctx.$slots.max || _ctx.$slots.$max) ? vue.renderSlot(_ctx.$slots, "max", { key: 0 }, void 0, true) : _ctx.$slots.default || _ctx.$slots.$default ? vue.renderSlot(_ctx.$slots, "default", { key: 1 }, void 0, true) : (vue.openBlock(), vue.createElementBlock(
  41495. "view",
  41496. {
  41497. key: 2,
  41498. class: "u-slider__button",
  41499. style: vue.normalizeStyle([_ctx.blockStyle, {
  41500. height: $options.getPx(_ctx.blockSize, true),
  41501. width: $options.getPx(_ctx.blockSize, true),
  41502. backgroundColor: _ctx.blockColor
  41503. }])
  41504. },
  41505. null,
  41506. 4
  41507. /* STYLE */
  41508. ))
  41509. ],
  41510. 36
  41511. /* STYLE, NEED_HYDRATION */
  41512. )
  41513. ],
  41514. 38
  41515. /* CLASS, STYLE, NEED_HYDRATION */
  41516. ),
  41517. _ctx.showValue && !_ctx.isRange ? (vue.openBlock(), vue.createElementBlock(
  41518. "view",
  41519. {
  41520. key: 0,
  41521. class: "u-slider__show-value"
  41522. },
  41523. vue.toDisplayString(_ctx.modelValue),
  41524. 1
  41525. /* TEXT */
  41526. )) : vue.createCommentVNode("v-if", true)
  41527. ],
  41528. 64
  41529. /* STABLE_FRAGMENT */
  41530. )) : (vue.openBlock(), vue.createElementBlock("slider", {
  41531. key: 1,
  41532. class: "u-slider__native",
  41533. min: _ctx.min,
  41534. max: _ctx.max,
  41535. step: _ctx.step,
  41536. value: _ctx.modelValue,
  41537. activeColor: _ctx.activeColor,
  41538. backgroundColor: _ctx.inactiveColor,
  41539. blockSize: $options.getPx(_ctx.blockSize),
  41540. blockColor: _ctx.blockColor,
  41541. showValue: _ctx.showValue,
  41542. disabled: _ctx.disabled,
  41543. onChanging: _cache[14] || (_cache[14] = (...args) => $options.changingHandler && $options.changingHandler(...args)),
  41544. onChange: _cache[15] || (_cache[15] = (...args) => $options.changeHandler && $options.changeHandler(...args))
  41545. }, null, 40, ["min", "max", "step", "value", "activeColor", "backgroundColor", "blockSize", "blockColor", "showValue", "disabled"]))
  41546. ],
  41547. 4
  41548. /* STYLE */
  41549. );
  41550. }
  41551. const uSlider = /* @__PURE__ */ _export_sfc(_sfc_main$C, [["render", _sfc_render$B], ["__scopeId", "data-v-7b84e269"], ["__file", "C:/Users/EDY/Desktop/项目/shuibei/uni_modules/uview-plus/components/u-slider/u-slider.vue"]]);
  41552. const __vite_glob_0_97 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
  41553. __proto__: null,
  41554. default: uSlider
  41555. }, Symbol.toStringTag, { value: "Module" }));
  41556. const props$l = defineMixin({
  41557. props: {
  41558. // 标题
  41559. title: {
  41560. type: [String, Number],
  41561. default: () => props$1x.stepsItem.title
  41562. },
  41563. // 描述文本
  41564. desc: {
  41565. type: [String, Number],
  41566. default: () => props$1x.stepsItem.desc
  41567. },
  41568. // 图标大小
  41569. iconSize: {
  41570. type: [String, Number],
  41571. default: () => props$1x.stepsItem.iconSize
  41572. },
  41573. // 当前步骤是否处于失败状态
  41574. error: {
  41575. type: Boolean,
  41576. default: () => props$1x.stepsItem.error
  41577. },
  41578. // 自定义样式
  41579. itemStyle: {
  41580. type: [Object],
  41581. default: {}
  41582. }
  41583. }
  41584. });
  41585. const _sfc_main$B = {
  41586. name: "u-steps-item",
  41587. mixins: [mpMixin, mixin, props$l],
  41588. data() {
  41589. return {
  41590. index: 0,
  41591. childLength: 0,
  41592. showLine: false,
  41593. size: {
  41594. height: 0,
  41595. width: 0
  41596. },
  41597. parentData: {
  41598. direction: "row",
  41599. current: 0,
  41600. activeColor: "",
  41601. inactiveColor: "",
  41602. activeIcon: "",
  41603. inactiveIcon: "",
  41604. dot: false
  41605. }
  41606. };
  41607. },
  41608. watch: {
  41609. "parentData"(newValue, oldValue) {
  41610. }
  41611. },
  41612. created() {
  41613. this.init();
  41614. },
  41615. computed: {
  41616. lineStyle() {
  41617. var _a2, _b;
  41618. const style = {};
  41619. if (this.parentData.direction === "row") {
  41620. style.width = this.size.width + "px";
  41621. style.left = this.size.width / 2 + "px";
  41622. } else {
  41623. style.height = this.size.height + "px";
  41624. }
  41625. style.backgroundColor = ((_b = (_a2 = this.parent.children) == null ? void 0 : _a2[this.index + 1]) == null ? void 0 : _b.error) ? color$3.error : this.index < this.parentData.current ? this.parentData.activeColor : this.parentData.inactiveColor;
  41626. return style;
  41627. },
  41628. itemStyleInner() {
  41629. return {
  41630. ...this.itemStyle
  41631. };
  41632. },
  41633. statusClass() {
  41634. const {
  41635. index: index2,
  41636. error: error2
  41637. } = this;
  41638. const {
  41639. current
  41640. } = this.parentData;
  41641. if (current == index2) {
  41642. return error2 === true ? "error" : "process";
  41643. } else if (error2) {
  41644. return "error";
  41645. } else if (current > index2) {
  41646. return "finish";
  41647. } else {
  41648. return "wait";
  41649. }
  41650. },
  41651. statusColor() {
  41652. let colorTmp = "";
  41653. switch (this.statusClass) {
  41654. case "finish":
  41655. colorTmp = this.parentData.activeColor;
  41656. break;
  41657. case "error":
  41658. colorTmp = color$3.error;
  41659. break;
  41660. case "process":
  41661. colorTmp = this.parentData.dot ? this.parentData.activeColor : "transparent";
  41662. break;
  41663. default:
  41664. colorTmp = this.parentData.inactiveColor;
  41665. break;
  41666. }
  41667. return colorTmp;
  41668. },
  41669. contentStyle() {
  41670. const style = {};
  41671. if (this.parentData.direction === "column") {
  41672. style.marginLeft = this.parentData.dot ? "2px" : "6px";
  41673. style.marginTop = this.parentData.dot ? "0px" : "6px";
  41674. } else {
  41675. style.marginTop = this.parentData.dot ? "2px" : "6px";
  41676. style.marginLeft = this.parentData.dot ? "2px" : "6px";
  41677. }
  41678. return style;
  41679. }
  41680. },
  41681. mounted() {
  41682. this.parent && this.parent.updateFromChild();
  41683. sleep().then(() => {
  41684. this.getStepsItemRect();
  41685. });
  41686. },
  41687. methods: {
  41688. init() {
  41689. this.updateParentData();
  41690. if (!this.parent) {
  41691. return error("u-steps-item必须要搭配u-steps组件使用");
  41692. }
  41693. this.index = this.parent.children.indexOf(this);
  41694. this.childLength = this.parent.children.length;
  41695. },
  41696. updateParentData() {
  41697. this.getParentData("u-steps");
  41698. },
  41699. // 父组件数据发生变化
  41700. updateFromParent() {
  41701. this.init();
  41702. },
  41703. // 获取组件的尺寸,用于设置横线的位置
  41704. getStepsItemRect() {
  41705. this.$uGetRect(".u-steps-item").then((size) => {
  41706. this.size = size;
  41707. });
  41708. }
  41709. }
  41710. };
  41711. function _sfc_render$A(_ctx, _cache, $props, $setup, $data, $options) {
  41712. const _component_up_icon = vue.resolveComponent("up-icon");
  41713. const _component_up_text = vue.resolveComponent("up-text");
  41714. return vue.openBlock(), vue.createElementBlock(
  41715. "view",
  41716. {
  41717. class: vue.normalizeClass(["u-steps-item", [`u-steps-item--${$data.parentData.direction}`]]),
  41718. ref: "u-steps-item"
  41719. },
  41720. [
  41721. $data.index + 1 < $data.childLength ? (vue.openBlock(), vue.createElementBlock(
  41722. "view",
  41723. {
  41724. key: 0,
  41725. class: vue.normalizeClass(["u-steps-item__line", [`u-steps-item__line--${$data.parentData.direction}`]]),
  41726. style: vue.normalizeStyle([$options.lineStyle])
  41727. },
  41728. null,
  41729. 6
  41730. /* CLASS, STYLE */
  41731. )) : vue.createCommentVNode("v-if", true),
  41732. vue.createElementVNode(
  41733. "view",
  41734. {
  41735. class: vue.normalizeClass(["u-steps-item__wrapper", [`u-steps-item__wrapper--${$data.parentData.direction}`, $data.parentData.dot && `u-steps-item__wrapper--${$data.parentData.direction}--dot`]]),
  41736. style: vue.normalizeStyle([$options.itemStyleInner])
  41737. },
  41738. [
  41739. vue.renderSlot(_ctx.$slots, "icon", {}, () => [
  41740. $data.parentData.dot ? (vue.openBlock(), vue.createElementBlock(
  41741. "view",
  41742. {
  41743. key: 0,
  41744. class: "u-steps-item__wrapper__dot",
  41745. style: vue.normalizeStyle({
  41746. backgroundColor: $options.statusColor
  41747. })
  41748. },
  41749. null,
  41750. 4
  41751. /* STYLE */
  41752. )) : $data.parentData.activeIcon || $data.parentData.inactiveIcon ? (vue.openBlock(), vue.createElementBlock("view", {
  41753. key: 1,
  41754. class: "u-steps-item__wrapper__icon"
  41755. }, [
  41756. vue.createVNode(_component_up_icon, {
  41757. name: $data.index <= $data.parentData.current ? $data.parentData.activeIcon : $data.parentData.inactiveIcon,
  41758. size: _ctx.iconSize,
  41759. color: $data.index <= $data.parentData.current ? $data.parentData.activeColor : $data.parentData.inactiveColor
  41760. }, null, 8, ["name", "size", "color"])
  41761. ])) : (vue.openBlock(), vue.createElementBlock(
  41762. "view",
  41763. {
  41764. key: 2,
  41765. style: vue.normalizeStyle({
  41766. backgroundColor: $options.statusClass === "process" ? $data.parentData.activeColor : "transparent",
  41767. borderColor: $options.statusColor
  41768. }),
  41769. class: "u-steps-item__wrapper__circle"
  41770. },
  41771. [
  41772. $options.statusClass === "process" || $options.statusClass === "wait" ? (vue.openBlock(), vue.createElementBlock(
  41773. "text",
  41774. {
  41775. key: 0,
  41776. class: "u-steps-item__wrapper__circle__text",
  41777. style: vue.normalizeStyle({
  41778. color: $data.index == $data.parentData.current ? "#ffffff" : $data.parentData.inactiveColor
  41779. })
  41780. },
  41781. vue.toDisplayString($data.index + 1),
  41782. 5
  41783. /* TEXT, STYLE */
  41784. )) : (vue.openBlock(), vue.createBlock(_component_up_icon, {
  41785. key: 1,
  41786. color: $options.statusClass === "error" ? "error" : $data.parentData.activeColor,
  41787. size: "12",
  41788. name: $options.statusClass === "error" ? "close" : "checkmark"
  41789. }, null, 8, ["color", "name"]))
  41790. ],
  41791. 4
  41792. /* STYLE */
  41793. ))
  41794. ], true)
  41795. ],
  41796. 6
  41797. /* CLASS, STYLE */
  41798. ),
  41799. vue.createElementVNode(
  41800. "view",
  41801. {
  41802. class: vue.normalizeClass(["u-steps-item__content", [
  41803. `u-steps-item__content--${$data.parentData.direction}`,
  41804. $data.parentData.current == $data.index ? "u-steps-item__content--current" : ""
  41805. ]]),
  41806. style: vue.normalizeStyle([$options.contentStyle])
  41807. },
  41808. [
  41809. vue.renderSlot(_ctx.$slots, "content", { index: $data.index }, void 0, true),
  41810. !_ctx.$slots["content"] ? (vue.openBlock(), vue.createElementBlock(
  41811. vue.Fragment,
  41812. { key: 0 },
  41813. [
  41814. vue.createElementVNode("view", { class: "u-steps-item__content__title" }, [
  41815. vue.renderSlot(_ctx.$slots, "title", {}, void 0, true),
  41816. !_ctx.$slots["title"] ? (vue.openBlock(), vue.createBlock(_component_up_text, {
  41817. key: 0,
  41818. text: _ctx.title,
  41819. type: $data.parentData.current == $data.index ? "main" : "content",
  41820. lineHeight: "20px",
  41821. size: $data.parentData.current == $data.index ? 14 : 13
  41822. }, null, 8, ["text", "type", "size"])) : vue.createCommentVNode("v-if", true)
  41823. ]),
  41824. vue.createElementVNode("view", { class: "u-steps-item__content__desc" }, [
  41825. vue.renderSlot(_ctx.$slots, "desc", {}, void 0, true),
  41826. !_ctx.$slots["desc"] ? (vue.openBlock(), vue.createBlock(_component_up_text, {
  41827. key: 0,
  41828. text: _ctx.desc,
  41829. type: "tips",
  41830. size: "12"
  41831. }, null, 8, ["text"])) : vue.createCommentVNode("v-if", true)
  41832. ])
  41833. ],
  41834. 64
  41835. /* STABLE_FRAGMENT */
  41836. )) : vue.createCommentVNode("v-if", true)
  41837. ],
  41838. 6
  41839. /* CLASS, STYLE */
  41840. ),
  41841. vue.createCommentVNode(' <view\r\n class="u-steps-item__line"\r\n v-if="showLine && parentData.direction === \'column\'"\r\n :class="[`u-steps-item__line--${parentData.direction}`]"\r\n :style="[lineStyle]"\r\n ></view> ')
  41842. ],
  41843. 2
  41844. /* CLASS */
  41845. );
  41846. }
  41847. const uStepsItem = /* @__PURE__ */ _export_sfc(_sfc_main$B, [["render", _sfc_render$A], ["__scopeId", "data-v-3c8d19a1"], ["__file", "C:/Users/EDY/Desktop/项目/shuibei/uni_modules/uview-plus/components/u-steps-item/u-steps-item.vue"]]);
  41848. const __vite_glob_0_99 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
  41849. __proto__: null,
  41850. default: uStepsItem
  41851. }, Symbol.toStringTag, { value: "Module" }));
  41852. const props$k = defineMixin({
  41853. props: {
  41854. // 排列方向
  41855. direction: {
  41856. type: String,
  41857. default: () => props$1x.steps.direction
  41858. },
  41859. // 设置第几个步骤
  41860. current: {
  41861. type: [String, Number],
  41862. default: () => props$1x.steps.current
  41863. },
  41864. // 激活状态颜色
  41865. activeColor: {
  41866. type: String,
  41867. default: () => props$1x.steps.activeColor
  41868. },
  41869. // 未激活状态颜色
  41870. inactiveColor: {
  41871. type: String,
  41872. default: () => props$1x.steps.inactiveColor
  41873. },
  41874. // 激活状态的图标
  41875. activeIcon: {
  41876. type: String,
  41877. default: () => props$1x.steps.activeIcon
  41878. },
  41879. // 未激活状态图标
  41880. inactiveIcon: {
  41881. type: String,
  41882. default: () => props$1x.steps.inactiveIcon
  41883. },
  41884. // 是否显示点类型
  41885. dot: {
  41886. type: Boolean,
  41887. default: () => props$1x.steps.dot
  41888. }
  41889. }
  41890. });
  41891. const _sfc_main$A = {
  41892. name: "u-steps",
  41893. mixins: [mpMixin, mixin, props$k],
  41894. data() {
  41895. return {};
  41896. },
  41897. watch: {
  41898. children() {
  41899. this.updateChildData();
  41900. },
  41901. parentData() {
  41902. this.updateChildData();
  41903. }
  41904. },
  41905. computed: {
  41906. // 监听参数的变化,通过watch中,手动去更新子组件的数据,否则子组件不会自动变化
  41907. parentData() {
  41908. return [this.current, this.direction, this.activeColor, this.inactiveColor, this.activeIcon, this.inactiveIcon, this.dot];
  41909. }
  41910. },
  41911. methods: {
  41912. // 更新子组件的数据
  41913. updateChildData() {
  41914. this.children.map((child) => {
  41915. test.func((child || {}).updateFromParent()) && child.updateFromParent();
  41916. });
  41917. },
  41918. // 接受子组件的通知,去修改其他子组件的数据
  41919. updateFromChild() {
  41920. this.updateChildData();
  41921. }
  41922. },
  41923. created() {
  41924. this.children = [];
  41925. },
  41926. options: {
  41927. virtualHost: false
  41928. }
  41929. };
  41930. function _sfc_render$z(_ctx, _cache, $props, $setup, $data, $options) {
  41931. return vue.openBlock(), vue.createElementBlock(
  41932. "view",
  41933. {
  41934. class: vue.normalizeClass(["u-steps", [`u-steps--${_ctx.direction}`]])
  41935. },
  41936. [
  41937. vue.renderSlot(_ctx.$slots, "default", {}, void 0, true)
  41938. ],
  41939. 2
  41940. /* CLASS */
  41941. );
  41942. }
  41943. const uSteps = /* @__PURE__ */ _export_sfc(_sfc_main$A, [["render", _sfc_render$z], ["__scopeId", "data-v-504c0814"], ["__file", "C:/Users/EDY/Desktop/项目/shuibei/uni_modules/uview-plus/components/u-steps/u-steps.vue"]]);
  41944. const __vite_glob_0_100 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
  41945. __proto__: null,
  41946. default: uSteps
  41947. }, Symbol.toStringTag, { value: "Module" }));
  41948. const props$j = defineMixin({
  41949. props: {
  41950. // 吸顶容器到顶部某个距离的时候,进行吸顶,在H5平台,NavigationBar为44px
  41951. offsetTop: {
  41952. type: [String, Number],
  41953. default: () => props$1x.sticky.offsetTop
  41954. },
  41955. // 自定义导航栏的高度
  41956. customNavHeight: {
  41957. type: [String, Number],
  41958. default: () => props$1x.sticky.customNavHeight
  41959. },
  41960. // 是否开启吸顶功能
  41961. disabled: {
  41962. type: Boolean,
  41963. default: () => props$1x.sticky.disabled
  41964. },
  41965. // 吸顶区域的背景颜色
  41966. bgColor: {
  41967. type: String,
  41968. default: () => props$1x.sticky.bgColor
  41969. },
  41970. // z-index值
  41971. zIndex: {
  41972. type: [String, Number],
  41973. default: () => props$1x.sticky.zIndex
  41974. },
  41975. // 列表中的索引值
  41976. index: {
  41977. type: [String, Number],
  41978. default: () => props$1x.sticky.index
  41979. }
  41980. }
  41981. });
  41982. const _sfc_main$z = {
  41983. name: "u-sticky",
  41984. mixins: [mpMixin, mixin, props$j],
  41985. data() {
  41986. return {
  41987. cssSticky: false,
  41988. // 是否使用css的sticky实现
  41989. stickyTop: 0,
  41990. // 吸顶的top值,因为可能受自定义导航栏影响,最终的吸顶值非offsetTop值
  41991. elId: guid(),
  41992. left: 0,
  41993. // js模式时,吸顶的内容因为处于postition: fixed模式,为了和原来保持一致的样式,需要记录并重新设置它的left,height,width属性
  41994. width: "auto",
  41995. height: "auto",
  41996. fixed: false
  41997. // js模式时,是否处于吸顶模式
  41998. };
  41999. },
  42000. computed: {
  42001. style() {
  42002. const style = {};
  42003. if (!this.disabled) {
  42004. if (this.cssSticky) {
  42005. style.position = "sticky";
  42006. style.zIndex = this.uZindex;
  42007. style.top = addUnit(this.stickyTop);
  42008. } else {
  42009. style.height = this.fixed ? this.height + "px" : "auto";
  42010. }
  42011. } else {
  42012. style.position = "static";
  42013. }
  42014. style.backgroundColor = this.bgColor;
  42015. return deepMerge$1(addStyle(this.customStyle), style);
  42016. },
  42017. // 吸顶内容的样式
  42018. stickyContent() {
  42019. const style = {};
  42020. if (!this.cssSticky) {
  42021. style.position = this.fixed ? "fixed" : "static";
  42022. style.top = this.stickyTop + "px";
  42023. style.left = this.left + "px";
  42024. style.width = this.width == "auto" ? "auto" : this.width + "px";
  42025. style.zIndex = this.uZindex;
  42026. }
  42027. return style;
  42028. },
  42029. uZindex() {
  42030. return this.zIndex ? this.zIndex : zIndex.sticky;
  42031. }
  42032. },
  42033. mounted() {
  42034. this.init();
  42035. },
  42036. watch: {
  42037. offsetTop(nval) {
  42038. this.getStickyTop();
  42039. }
  42040. },
  42041. methods: {
  42042. init() {
  42043. this.getStickyTop();
  42044. this.checkSupportCssSticky();
  42045. if (!this.cssSticky) {
  42046. !this.disabled && this.initObserveContent();
  42047. }
  42048. },
  42049. initObserveContent() {
  42050. this.$uGetRect("#" + this.elId).then((res) => {
  42051. this.height = res.height;
  42052. this.left = res.left;
  42053. this.width = res.width;
  42054. this.$nextTick(() => {
  42055. this.observeContent();
  42056. });
  42057. });
  42058. },
  42059. observeContent() {
  42060. this.disconnectObserver("contentObserver");
  42061. const contentObserver = uni.createIntersectionObserver(this, {
  42062. // 检测的区间范围
  42063. thresholds: [0.95, 0.98, 1]
  42064. });
  42065. contentObserver.relativeToViewport({
  42066. top: -this.stickyTop
  42067. });
  42068. contentObserver.observe(`#${this.elId}`, (res) => {
  42069. this.setFixed(res.boundingClientRect.top);
  42070. });
  42071. this.contentObserver = contentObserver;
  42072. },
  42073. setFixed(top) {
  42074. const fixed = top <= this.stickyTop;
  42075. this.fixed = fixed;
  42076. },
  42077. disconnectObserver(observerName) {
  42078. const observer = this[observerName];
  42079. observer && observer.disconnect();
  42080. },
  42081. getStickyTop() {
  42082. this.stickyTop = getPx(this.offsetTop) + getPx(this.customNavHeight);
  42083. },
  42084. async checkSupportCssSticky() {
  42085. if (os() === "android" && Number(getDeviceInfo().system) > 8) {
  42086. this.cssSticky = true;
  42087. }
  42088. this.cssSticky = await this.checkComputedStyle();
  42089. if (os() === "ios") {
  42090. this.cssSticky = true;
  42091. }
  42092. },
  42093. // 在APP和微信小程序上,通过uni.createSelectorQuery可以判断是否支持css sticky
  42094. checkComputedStyle() {
  42095. return new Promise((resolve) => {
  42096. uni.createSelectorQuery().in(this).select(".u-sticky").fields({
  42097. computedStyle: ["position"]
  42098. }).exec((e2) => {
  42099. resolve("sticky" === e2[0].position);
  42100. });
  42101. });
  42102. },
  42103. // H5通过创建元素的形式嗅探是否支持css sticky
  42104. // 判断浏览器是否支持sticky属性
  42105. checkCssStickyForH5() {
  42106. }
  42107. },
  42108. beforeUnmount() {
  42109. this.disconnectObserver("contentObserver");
  42110. }
  42111. };
  42112. function _sfc_render$y(_ctx, _cache, $props, $setup, $data, $options) {
  42113. return vue.openBlock(), vue.createElementBlock(
  42114. "view",
  42115. {
  42116. class: "u-sticky",
  42117. style: vue.normalizeStyle([$options.style])
  42118. },
  42119. [
  42120. vue.createElementVNode("view", {
  42121. id: $data.elId,
  42122. style: vue.normalizeStyle([$options.stickyContent]),
  42123. class: "u-sticky__content"
  42124. }, [
  42125. vue.renderSlot(_ctx.$slots, "default", {}, void 0, true)
  42126. ], 12, ["id"])
  42127. ],
  42128. 4
  42129. /* STYLE */
  42130. );
  42131. }
  42132. const uSticky = /* @__PURE__ */ _export_sfc(_sfc_main$z, [["render", _sfc_render$y], ["__scopeId", "data-v-8b303089"], ["__file", "C:/Users/EDY/Desktop/项目/shuibei/uni_modules/uview-plus/components/u-sticky/u-sticky.vue"]]);
  42133. const __vite_glob_0_101 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
  42134. __proto__: null,
  42135. default: uSticky
  42136. }, Symbol.toStringTag, { value: "Module" }));
  42137. const props$i = defineMixin({
  42138. props: {
  42139. // tab的数据
  42140. list: {
  42141. type: Array,
  42142. default: () => props$1x.subsection.list
  42143. },
  42144. // 当前活动的tab的index
  42145. current: {
  42146. type: [String, Number],
  42147. default: () => props$1x.subsection.current
  42148. },
  42149. // 激活的颜色
  42150. activeColor: {
  42151. type: String,
  42152. default: () => props$1x.subsection.activeColor
  42153. },
  42154. // 未激活的颜色
  42155. inactiveColor: {
  42156. type: String,
  42157. default: () => props$1x.subsection.inactiveColor
  42158. },
  42159. // 模式选择,mode=button为按钮形式,mode=subsection时为分段模式
  42160. mode: {
  42161. type: String,
  42162. default: () => props$1x.subsection.mode
  42163. },
  42164. // 字体大小
  42165. fontSize: {
  42166. type: [String, Number],
  42167. default: () => props$1x.subsection.fontSize
  42168. },
  42169. // 激活tab的字体是否加粗
  42170. bold: {
  42171. type: Boolean,
  42172. default: () => props$1x.subsection.bold
  42173. },
  42174. // mode = button时,组件背景颜色
  42175. bgColor: {
  42176. type: String,
  42177. default: () => props$1x.subsection.bgColor
  42178. },
  42179. // 从list元素对象中读取的键名
  42180. keyName: {
  42181. type: String,
  42182. default: () => props$1x.subsection.keyName
  42183. },
  42184. // 从`list`元素对象中读取激活时的颜色 如果存在字段 优先级大于 activeColor
  42185. activeColorKeyName: {
  42186. type: String,
  42187. default: () => props$1x.subsection.activeColorKeyName
  42188. },
  42189. // 从`list`元素对象中读取未激活时的颜色 如果存在字段 优先级大于 inactiveColor
  42190. inactiveColorKeyName: {
  42191. type: String,
  42192. default: () => props$1x.subsection.inactiveColorKeyName
  42193. },
  42194. // 是否禁用
  42195. disabled: {
  42196. type: Boolean,
  42197. default: () => props$1x.subsection.disabled
  42198. }
  42199. }
  42200. });
  42201. const _sfc_main$y = {
  42202. name: "u-subsection",
  42203. mixins: [mpMixin, mixin, props$i],
  42204. data() {
  42205. return {
  42206. // 组件尺寸
  42207. itemRect: {
  42208. width: 0,
  42209. height: 0
  42210. },
  42211. innerCurrent: "",
  42212. windowResizeCallback: {}
  42213. };
  42214. },
  42215. watch: {
  42216. list(newValue, oldValue) {
  42217. this.init();
  42218. },
  42219. current: {
  42220. immediate: true,
  42221. handler(n2) {
  42222. if (n2 !== this.innerCurrent) {
  42223. this.innerCurrent = n2;
  42224. }
  42225. }
  42226. }
  42227. },
  42228. computed: {
  42229. wrapperStyle() {
  42230. const style = {};
  42231. if (this.mode === "button") {
  42232. style.backgroundColor = this.bgColor;
  42233. }
  42234. return style;
  42235. },
  42236. // 滑块的样式
  42237. barStyle() {
  42238. const style = {};
  42239. style.width = `${this.itemRect.width}px`;
  42240. style.height = `${this.itemRect.height}px`;
  42241. style.transform = `translateX(${this.innerCurrent * this.itemRect.width}px)`;
  42242. if (this.mode === "subsection") {
  42243. style.backgroundColor = this.activeColor;
  42244. }
  42245. return style;
  42246. },
  42247. // 分段器item的样式
  42248. itemStyle(index2) {
  42249. return (index3) => {
  42250. const style = {};
  42251. if (this.mode === "subsection") {
  42252. style.borderColor = this.activeColor;
  42253. style.borderWidth = "1px";
  42254. style.borderStyle = "solid";
  42255. }
  42256. return style;
  42257. };
  42258. },
  42259. // 分段器文字颜色
  42260. textStyle(index2, item) {
  42261. return (index3, item2) => {
  42262. const style = {};
  42263. style.fontWeight = this.bold && this.innerCurrent === index3 ? "bold" : "normal";
  42264. style.fontSize = addUnit(this.fontSize);
  42265. let activeColorTemp = null;
  42266. let inactiveColorTemp = null;
  42267. if (typeof item2 === "object" && item2[this.activeColorKeyName]) {
  42268. activeColorTemp = item2[this.activeColorKeyName];
  42269. }
  42270. if (typeof item2 === "object" && item2[this.inactiveColorKeyName]) {
  42271. inactiveColorTemp = item2[this.inactiveColorKeyName];
  42272. }
  42273. if (this.mode === "subsection") {
  42274. if (this.innerCurrent === index3) {
  42275. style.color = activeColorTemp ? activeColorTemp : "#FFF";
  42276. } else {
  42277. style.color = inactiveColorTemp ? inactiveColorTemp : this.inactiveColor;
  42278. }
  42279. } else {
  42280. if (this.innerCurrent === index3) {
  42281. style.color = activeColorTemp ? activeColorTemp : this.activeColor;
  42282. } else {
  42283. style.color = inactiveColorTemp ? inactiveColorTemp : this.inactiveColor;
  42284. }
  42285. }
  42286. return style;
  42287. };
  42288. }
  42289. },
  42290. mounted() {
  42291. this.init();
  42292. },
  42293. beforeUnmount() {
  42294. },
  42295. emits: ["change", "update:current"],
  42296. methods: {
  42297. addStyle,
  42298. init() {
  42299. this.innerCurrent = this.current;
  42300. sleep().then(() => this.getRect());
  42301. },
  42302. // 判断展示文本
  42303. getText(item) {
  42304. return typeof item === "object" ? item[this.keyName] : item;
  42305. },
  42306. // 获取组件的尺寸
  42307. getRect() {
  42308. this.$uGetRect(".u-subsection__item--0").then((size) => {
  42309. this.itemRect = size;
  42310. });
  42311. },
  42312. clickHandler(index2) {
  42313. if (this.disabled) {
  42314. return;
  42315. }
  42316. this.innerCurrent = index2;
  42317. this.$emit("update:current", index2);
  42318. this.$emit("change", index2);
  42319. },
  42320. /**
  42321. * 获取当前文字区域的 class禁用样式
  42322. * @param index
  42323. */
  42324. getTextViewDisableClass(index2) {
  42325. if (this.disabled) {
  42326. if (this.mode === "button") {
  42327. return "item-button--disabled";
  42328. } else {
  42329. return "item-subsection--disabled";
  42330. }
  42331. }
  42332. return "";
  42333. }
  42334. }
  42335. };
  42336. function _sfc_render$x(_ctx, _cache, $props, $setup, $data, $options) {
  42337. return vue.openBlock(), vue.createElementBlock(
  42338. "view",
  42339. {
  42340. class: vue.normalizeClass(["u-subsection", [`u-subsection--${_ctx.mode}`]]),
  42341. ref: "u-subsection",
  42342. style: vue.normalizeStyle([$options.addStyle(_ctx.customStyle), $options.wrapperStyle])
  42343. },
  42344. [
  42345. vue.createElementVNode(
  42346. "view",
  42347. {
  42348. class: vue.normalizeClass(["u-subsection__bar cursor-pointer", [
  42349. _ctx.mode === "button" && "u-subsection--button__bar",
  42350. $data.innerCurrent === 0 && _ctx.mode === "subsection" && "u-subsection__bar--first",
  42351. $data.innerCurrent > 0 && $data.innerCurrent < _ctx.list.length - 1 && _ctx.mode === "subsection" && "u-subsection__bar--center",
  42352. $data.innerCurrent === _ctx.list.length - 1 && _ctx.mode === "subsection" && "u-subsection__bar--last"
  42353. ]]),
  42354. ref: "u-subsection__bar",
  42355. style: vue.normalizeStyle([$options.barStyle])
  42356. },
  42357. null,
  42358. 6
  42359. /* CLASS, STYLE */
  42360. ),
  42361. (vue.openBlock(true), vue.createElementBlock(
  42362. vue.Fragment,
  42363. null,
  42364. vue.renderList(_ctx.list, (item, index2) => {
  42365. return vue.openBlock(), vue.createElementBlock("view", {
  42366. class: vue.normalizeClass(["u-subsection__item cursor-pointer", [
  42367. `u-subsection__item--${index2}`,
  42368. index2 < _ctx.list.length - 1 && "u-subsection__item--no-border-right",
  42369. index2 === 0 && "u-subsection__item--first",
  42370. index2 === _ctx.list.length - 1 && "u-subsection__item--last",
  42371. $options.getTextViewDisableClass(index2)
  42372. ]]),
  42373. ref_for: true,
  42374. ref: `u-subsection__item--${index2}`,
  42375. style: vue.normalizeStyle([$options.itemStyle(index2)]),
  42376. onClick: ($event) => $options.clickHandler(index2),
  42377. key: index2
  42378. }, [
  42379. vue.createElementVNode(
  42380. "text",
  42381. {
  42382. class: vue.normalizeClass(["u-subsection__item__text", [_ctx.disabled ? "u-subsection--disabled" : ""]]),
  42383. style: vue.normalizeStyle([$options.textStyle(index2, item)])
  42384. },
  42385. vue.toDisplayString($options.getText(item)),
  42386. 7
  42387. /* TEXT, CLASS, STYLE */
  42388. )
  42389. ], 14, ["onClick"]);
  42390. }),
  42391. 128
  42392. /* KEYED_FRAGMENT */
  42393. ))
  42394. ],
  42395. 6
  42396. /* CLASS, STYLE */
  42397. );
  42398. }
  42399. const uSubsection = /* @__PURE__ */ _export_sfc(_sfc_main$y, [["render", _sfc_render$x], ["__scopeId", "data-v-b5ccb67e"], ["__file", "C:/Users/EDY/Desktop/项目/shuibei/uni_modules/uview-plus/components/u-subsection/u-subsection.vue"]]);
  42400. const __vite_glob_0_102 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
  42401. __proto__: null,
  42402. default: uSubsection
  42403. }, Symbol.toStringTag, { value: "Module" }));
  42404. const MIN_DISTANCE = 10;
  42405. function getDirection(x2, y2) {
  42406. if (x2 > y2 && x2 > MIN_DISTANCE) {
  42407. return "horizontal";
  42408. }
  42409. if (y2 > x2 && y2 > MIN_DISTANCE) {
  42410. return "vertical";
  42411. }
  42412. return "";
  42413. }
  42414. const touchMixin = defineMixin({
  42415. methods: {
  42416. getTouchPoint(e2) {
  42417. if (!e2) {
  42418. return {
  42419. x: 0,
  42420. y: 0
  42421. };
  42422. }
  42423. if (e2.touches && e2.touches[0]) {
  42424. return {
  42425. x: e2.touches[0].pageX,
  42426. y: e2.touches[0].pageY
  42427. };
  42428. }
  42429. if (e2.changedTouches && e2.changedTouches[0]) {
  42430. return {
  42431. x: e2.changedTouches[0].pageX,
  42432. y: e2.changedTouches[0].pageY
  42433. };
  42434. }
  42435. return {
  42436. x: e2.clientX || 0,
  42437. y: e2.clientY || 0
  42438. };
  42439. },
  42440. resetTouchStatus() {
  42441. this.direction = "";
  42442. this.deltaX = 0;
  42443. this.deltaY = 0;
  42444. this.offsetX = 0;
  42445. this.offsetY = 0;
  42446. },
  42447. touchStart(event) {
  42448. this.resetTouchStatus();
  42449. const touch = this.getTouchPoint(event);
  42450. this.startX = touch.x;
  42451. this.startY = touch.y;
  42452. },
  42453. touchMove(event) {
  42454. const touch = this.getTouchPoint(event);
  42455. this.deltaX = touch.x - this.startX;
  42456. this.deltaY = touch.y - this.startY;
  42457. this.offsetX = Math.abs(this.deltaX);
  42458. this.offsetY = Math.abs(this.deltaY);
  42459. this.direction = this.direction || getDirection(this.offsetX, this.offsetY);
  42460. }
  42461. }
  42462. });
  42463. const props$h = defineMixin({
  42464. props: {
  42465. // 控制打开或者关闭
  42466. show: {
  42467. type: Boolean,
  42468. default: () => props$1x.swipeActionItem.show
  42469. },
  42470. closeOnClick: {
  42471. type: Boolean,
  42472. default: () => props$1x.swipeActionItem.closeOnClick
  42473. },
  42474. // 标识符,如果是v-for,可用index索引值
  42475. name: {
  42476. type: [String, Number],
  42477. default: () => props$1x.swipeActionItem.name
  42478. },
  42479. // 是否禁用
  42480. disabled: {
  42481. type: Boolean,
  42482. default: () => props$1x.swipeActionItem.disabled
  42483. },
  42484. // 是否自动关闭其他swipe按钮组
  42485. autoClose: {
  42486. type: Boolean,
  42487. default: () => props$1x.swipeActionItem.autoClose
  42488. },
  42489. // 滑动距离阈值,只有大于此值,才被认为是要打开菜单
  42490. threshold: {
  42491. type: Number,
  42492. default: () => props$1x.swipeActionItem.threshold
  42493. },
  42494. // 右侧按钮内容
  42495. options: {
  42496. type: Array,
  42497. default() {
  42498. return props$1x.swipeActionItem.rightOptions;
  42499. }
  42500. },
  42501. // 动画过渡时间,单位ms
  42502. duration: {
  42503. type: [String, Number],
  42504. default: () => props$1x.swipeActionItem.duration
  42505. }
  42506. }
  42507. });
  42508. const wxs = {
  42509. methods: {
  42510. // 关闭时执行
  42511. closeHandler() {
  42512. this.status = "close";
  42513. },
  42514. setState(status) {
  42515. this.status = status;
  42516. },
  42517. closeOther() {
  42518. this.parent && this.parent.closeOther(this);
  42519. }
  42520. }
  42521. };
  42522. const block0 = (Comp) => {
  42523. (Comp.$wxs || (Comp.$wxs = [])).push("wxs");
  42524. (Comp.$wxsModules || (Comp.$wxsModules = {}))["wxs"] = "f1d6d7d8";
  42525. };
  42526. const _sfc_main$x = {
  42527. name: "u-swipe-action-item",
  42528. emits: ["click", "update:show"],
  42529. mixins: [
  42530. mpMixin,
  42531. mixin,
  42532. touchMixin,
  42533. wxs,
  42534. props$h
  42535. ],
  42536. data() {
  42537. return {
  42538. // 按钮的尺寸信息
  42539. size: {},
  42540. // 父组件u-swipe-action的参数
  42541. parentData: {
  42542. autoClose: true
  42543. },
  42544. // 当前状态,open-打开,close-关闭
  42545. status: "",
  42546. sliderStyle: {}
  42547. };
  42548. },
  42549. watch: {
  42550. // 由于wxs无法直接读取外部的值,需要在外部值变化时,重新执行赋值逻辑
  42551. wxsInit(newValue, oldValue) {
  42552. this.queryRect();
  42553. },
  42554. status(newValue) {
  42555. if (newValue === "open") {
  42556. this.$emit("update:show", true);
  42557. this.parent && this.parent.setOpendItem(this);
  42558. } else {
  42559. this.$emit("update:show", false);
  42560. }
  42561. },
  42562. show(newValue) {
  42563. if (newValue) {
  42564. this.status = "open";
  42565. } else {
  42566. this.status = "close";
  42567. }
  42568. }
  42569. },
  42570. computed: {
  42571. wxsInit() {
  42572. return [this.disabled, this.autoClose, this.threshold, this.options, this.duration];
  42573. }
  42574. },
  42575. mounted() {
  42576. this.init();
  42577. },
  42578. beforeUmount() {
  42579. this.closeHandler();
  42580. },
  42581. methods: {
  42582. addUnit,
  42583. getPx,
  42584. init() {
  42585. this.updateParentData();
  42586. sleep().then(() => {
  42587. this.queryRect();
  42588. });
  42589. },
  42590. updateParentData() {
  42591. this.getParentData("u-swipe-action");
  42592. },
  42593. // 查询节点
  42594. queryRect() {
  42595. this.$uGetRect(".u-swipe-action-item__right__button", true).then((buttons) => {
  42596. this.size = {
  42597. buttons,
  42598. show: this.show,
  42599. disabled: this.disabled,
  42600. threshold: this.threshold,
  42601. duration: this.duration
  42602. };
  42603. });
  42604. },
  42605. // 按钮被点击
  42606. buttonClickHandler(item, index2) {
  42607. this.$emit("click", {
  42608. index: index2,
  42609. name: this.name
  42610. }, () => {
  42611. });
  42612. if (this.closeOnClick) {
  42613. this.closeHandler();
  42614. }
  42615. }
  42616. }
  42617. };
  42618. function _sfc_render$w(_ctx, _cache, $props, $setup, $data, $options) {
  42619. const _component_up_icon = vue.resolveComponent("up-icon");
  42620. return vue.openBlock(), vue.createElementBlock(
  42621. "view",
  42622. {
  42623. class: "u-swipe-action-item",
  42624. ref: "u-swipe-action-item"
  42625. },
  42626. [
  42627. vue.createElementVNode("view", { class: "u-swipe-action-item__right" }, [
  42628. vue.renderSlot(_ctx.$slots, "button", {}, () => [
  42629. (vue.openBlock(true), vue.createElementBlock(
  42630. vue.Fragment,
  42631. null,
  42632. vue.renderList(_ctx.options, (item, index2) => {
  42633. return vue.openBlock(), vue.createElementBlock("view", {
  42634. key: index2,
  42635. class: "u-swipe-action-item__right__button",
  42636. ref_for: true,
  42637. ref: `u-swipe-action-item__right__button-${index2}`,
  42638. style: vue.normalizeStyle([{
  42639. alignItems: item.style && item.style.borderRadius ? "center" : "stretch"
  42640. }]),
  42641. onClick: ($event) => $options.buttonClickHandler(item, index2)
  42642. }, [
  42643. vue.createElementVNode(
  42644. "view",
  42645. {
  42646. class: "u-swipe-action-item__right__button__wrapper",
  42647. style: vue.normalizeStyle([{
  42648. backgroundColor: item.style && item.style.backgroundColor ? item.style.backgroundColor : "#C7C6CD",
  42649. borderRadius: item.style && item.style.borderRadius ? item.style.borderRadius : "0",
  42650. padding: item.style && item.style.borderRadius ? "0" : "0 15px"
  42651. }, item.style])
  42652. },
  42653. [
  42654. item.icon ? (vue.openBlock(), vue.createBlock(_component_up_icon, {
  42655. key: 0,
  42656. name: item.icon,
  42657. color: item.style && item.style.color ? item.style.color : "#ffffff",
  42658. size: item.iconSize ? $options.addUnit(item.iconSize) : item.style && item.style.fontSize ? $options.getPx(item.style.fontSize) * 1.2 : 17,
  42659. customStyle: {
  42660. marginRight: item.text ? "2px" : 0
  42661. }
  42662. }, null, 8, ["name", "color", "size", "customStyle"])) : vue.createCommentVNode("v-if", true),
  42663. item.text ? (vue.openBlock(), vue.createElementBlock(
  42664. "text",
  42665. {
  42666. key: 1,
  42667. class: "u-swipe-action-item__right__button__wrapper__text u-line-1",
  42668. style: vue.normalizeStyle([{
  42669. color: item.style && item.style.color ? item.style.color : "#ffffff",
  42670. fontSize: item.style && item.style.fontSize ? item.style.fontSize : "16px",
  42671. lineHeight: item.style && item.style.fontSize ? item.style.fontSize : "16px"
  42672. }])
  42673. },
  42674. vue.toDisplayString(item.text),
  42675. 5
  42676. /* TEXT, STYLE */
  42677. )) : vue.createCommentVNode("v-if", true)
  42678. ],
  42679. 4
  42680. /* STYLE */
  42681. )
  42682. ], 12, ["onClick"]);
  42683. }),
  42684. 128
  42685. /* KEYED_FRAGMENT */
  42686. ))
  42687. ], true)
  42688. ]),
  42689. vue.createElementVNode("view", {
  42690. class: "u-swipe-action-item__content",
  42691. onTouchstart: _cache[0] || (_cache[0] = (...args) => _ctx.wxs.touchstart && _ctx.wxs.touchstart(...args)),
  42692. onTouchmove: _cache[1] || (_cache[1] = (...args) => _ctx.wxs.touchmove && _ctx.wxs.touchmove(...args)),
  42693. onTouchend: _cache[2] || (_cache[2] = (...args) => _ctx.wxs.touchend && _ctx.wxs.touchend(...args)),
  42694. status: vue.wp($data.status),
  42695. "change:status": _ctx.wxs.statusChange,
  42696. size: vue.wp($data.size),
  42697. "change:size": _ctx.wxs.sizeChange
  42698. }, [
  42699. vue.renderSlot(_ctx.$slots, "default", {}, void 0, true)
  42700. ], 40, ["status", "change:status", "size", "change:size"])
  42701. ],
  42702. 512
  42703. /* NEED_PATCH */
  42704. );
  42705. }
  42706. if (typeof block0 === "function")
  42707. block0(_sfc_main$x);
  42708. const uSwipeActionItem = /* @__PURE__ */ _export_sfc(_sfc_main$x, [["render", _sfc_render$w], ["__scopeId", "data-v-ed3ce04a"], ["__file", "C:/Users/EDY/Desktop/项目/shuibei/uni_modules/uview-plus/components/u-swipe-action-item/u-swipe-action-item.vue"]]);
  42709. const __vite_glob_0_103 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
  42710. __proto__: null,
  42711. default: uSwipeActionItem
  42712. }, Symbol.toStringTag, { value: "Module" }));
  42713. const props$g = defineMixin({
  42714. props: {
  42715. // 是否自动关闭其他swipe按钮组
  42716. autoClose: {
  42717. type: Boolean,
  42718. default: () => props$1x.swipeAction.autoClose
  42719. },
  42720. // 是否存在打开的按钮组
  42721. opendItem: {
  42722. type: Boolean,
  42723. default: false
  42724. }
  42725. }
  42726. });
  42727. const _sfc_main$w = {
  42728. name: "u-swipe-action",
  42729. mixins: [mpMixin, mixin, props$g],
  42730. data() {
  42731. return {};
  42732. },
  42733. provide() {
  42734. return {
  42735. swipeAction: this
  42736. };
  42737. },
  42738. computed: {
  42739. // 这里computed的变量,都是子组件u-swipe-action-item需要用到的,由于头条小程序的兼容性差异,子组件无法实时监听父组件参数的变化
  42740. // 所以需要手动通知子组件,这里返回一个parentData变量,供watch监听,在其中去通知每一个子组件重新从父组件(u-swipe-action-item)
  42741. // 拉取父组件新的变化后的参数
  42742. parentData() {
  42743. return [this.autoClose];
  42744. }
  42745. },
  42746. emits: ["opendItem:update"],
  42747. watch: {
  42748. // 当父组件需要子组件需要共享的参数发生了变化,手动通知子组件
  42749. parentData() {
  42750. if (this.children.length) {
  42751. this.children.map((child) => {
  42752. typeof child.updateParentData === "function" && child.updateParentData();
  42753. });
  42754. }
  42755. },
  42756. opendItem(val) {
  42757. if (val == false) {
  42758. this.closeAll();
  42759. }
  42760. }
  42761. },
  42762. created() {
  42763. this.children = [];
  42764. },
  42765. methods: {
  42766. closeOther(child) {
  42767. if (this.autoClose) {
  42768. this.children.map((item, index2) => {
  42769. if (child !== item) {
  42770. item.closeHandler();
  42771. }
  42772. });
  42773. }
  42774. },
  42775. closeAll() {
  42776. this.children.map((item, index2) => {
  42777. item.closeHandler();
  42778. });
  42779. },
  42780. setOpendItem(ins) {
  42781. this.$emit("opendItem:update", true);
  42782. }
  42783. }
  42784. };
  42785. function _sfc_render$v(_ctx, _cache, $props, $setup, $data, $options) {
  42786. return vue.openBlock(), vue.createElementBlock("view", { class: "u-swipe-action" }, [
  42787. vue.renderSlot(_ctx.$slots, "default")
  42788. ]);
  42789. }
  42790. const uSwipeAction = /* @__PURE__ */ _export_sfc(_sfc_main$w, [["render", _sfc_render$v], ["__file", "C:/Users/EDY/Desktop/项目/shuibei/uni_modules/uview-plus/components/u-swipe-action/u-swipe-action.vue"]]);
  42791. const __vite_glob_0_104 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
  42792. __proto__: null,
  42793. default: uSwipeAction
  42794. }, Symbol.toStringTag, { value: "Module" }));
  42795. const props$f = defineMixin({
  42796. props: {
  42797. // 轮播的长度
  42798. length: {
  42799. type: [String, Number],
  42800. default: () => props$1x.swiperIndicator.length
  42801. },
  42802. // 当前处于活动状态的轮播的索引
  42803. current: {
  42804. type: [String, Number],
  42805. default: () => props$1x.swiperIndicator.current
  42806. },
  42807. // 指示器非激活颜色
  42808. indicatorActiveColor: {
  42809. type: String,
  42810. default: () => props$1x.swiperIndicator.indicatorActiveColor
  42811. },
  42812. // 指示器的激活颜色
  42813. indicatorInactiveColor: {
  42814. type: String,
  42815. default: () => props$1x.swiperIndicator.indicatorInactiveColor
  42816. },
  42817. // 指示器模式,line-线型,dot-点型
  42818. indicatorMode: {
  42819. type: String,
  42820. default: () => props$1x.swiperIndicator.indicatorMode
  42821. }
  42822. }
  42823. });
  42824. const _sfc_main$v = {
  42825. name: "u-swiper-indicator",
  42826. mixins: [mpMixin, mixin, props$f],
  42827. data() {
  42828. return {
  42829. lineWidth: 22
  42830. };
  42831. },
  42832. computed: {
  42833. // 指示器为线型的样式
  42834. lineStyle() {
  42835. let style = {};
  42836. style.width = addUnit(this.lineWidth);
  42837. style.transform = `translateX(${addUnit(this.current * this.lineWidth)})`;
  42838. style.backgroundColor = this.indicatorActiveColor;
  42839. return style;
  42840. },
  42841. // 指示器为点型的样式
  42842. dotStyle() {
  42843. return (index2) => {
  42844. let style = {};
  42845. style.backgroundColor = index2 === this.current ? this.indicatorActiveColor : this.indicatorInactiveColor;
  42846. return style;
  42847. };
  42848. }
  42849. },
  42850. methods: {
  42851. addUnit
  42852. }
  42853. };
  42854. function _sfc_render$u(_ctx, _cache, $props, $setup, $data, $options) {
  42855. return vue.openBlock(), vue.createElementBlock("view", { class: "u-swiper-indicator" }, [
  42856. _ctx.indicatorMode === "line" ? (vue.openBlock(), vue.createElementBlock(
  42857. "view",
  42858. {
  42859. key: 0,
  42860. class: vue.normalizeClass(["u-swiper-indicator__wrapper", [`u-swiper-indicator__wrapper--${_ctx.indicatorMode}`]]),
  42861. style: vue.normalizeStyle({
  42862. width: $options.addUnit($data.lineWidth * _ctx.length),
  42863. backgroundColor: _ctx.indicatorInactiveColor
  42864. })
  42865. },
  42866. [
  42867. vue.createElementVNode(
  42868. "view",
  42869. {
  42870. class: "u-swiper-indicator__wrapper--line__bar",
  42871. style: vue.normalizeStyle([$options.lineStyle])
  42872. },
  42873. null,
  42874. 4
  42875. /* STYLE */
  42876. )
  42877. ],
  42878. 6
  42879. /* CLASS, STYLE */
  42880. )) : vue.createCommentVNode("v-if", true),
  42881. _ctx.indicatorMode === "dot" ? (vue.openBlock(), vue.createElementBlock("view", {
  42882. key: 1,
  42883. class: "u-swiper-indicator__wrapper"
  42884. }, [
  42885. (vue.openBlock(true), vue.createElementBlock(
  42886. vue.Fragment,
  42887. null,
  42888. vue.renderList(_ctx.length, (item, index2) => {
  42889. return vue.openBlock(), vue.createElementBlock(
  42890. "view",
  42891. {
  42892. class: vue.normalizeClass(["u-swiper-indicator__wrapper__dot", [index2 === _ctx.current && "u-swiper-indicator__wrapper__dot--active"]]),
  42893. key: index2,
  42894. style: vue.normalizeStyle([$options.dotStyle(index2)])
  42895. },
  42896. null,
  42897. 6
  42898. /* CLASS, STYLE */
  42899. );
  42900. }),
  42901. 128
  42902. /* KEYED_FRAGMENT */
  42903. ))
  42904. ])) : vue.createCommentVNode("v-if", true)
  42905. ]);
  42906. }
  42907. const uSwiperIndicator = /* @__PURE__ */ _export_sfc(_sfc_main$v, [["render", _sfc_render$u], ["__scopeId", "data-v-7b7c7ea6"], ["__file", "C:/Users/EDY/Desktop/项目/shuibei/uni_modules/uview-plus/components/u-swiper-indicator/u-swiper-indicator.vue"]]);
  42908. const __vite_glob_0_105 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
  42909. __proto__: null,
  42910. default: uSwiperIndicator
  42911. }, Symbol.toStringTag, { value: "Module" }));
  42912. const props$e = defineMixin({
  42913. props: {
  42914. // 列表数组,元素可为字符串,如为对象可通过keyName指定目标属性名
  42915. list: {
  42916. type: Array,
  42917. default: () => props$1x.swiper.list
  42918. },
  42919. // 是否显示面板指示器
  42920. indicator: {
  42921. type: Boolean,
  42922. default: () => props$1x.swiper.indicator
  42923. },
  42924. // 指示器非激活颜色
  42925. indicatorActiveColor: {
  42926. type: String,
  42927. default: () => props$1x.swiper.indicatorActiveColor
  42928. },
  42929. // 指示器的激活颜色
  42930. indicatorInactiveColor: {
  42931. type: String,
  42932. default: () => props$1x.swiper.indicatorInactiveColor
  42933. },
  42934. // 指示器样式,可通过bottom,left,right进行定位
  42935. indicatorStyle: {
  42936. type: [String, Object],
  42937. default: () => props$1x.swiper.indicatorStyle
  42938. },
  42939. // 指示器模式,line-线型,dot-点型
  42940. indicatorMode: {
  42941. type: String,
  42942. default: () => props$1x.swiper.indicatorMode
  42943. },
  42944. // 是否自动切换
  42945. autoplay: {
  42946. type: Boolean,
  42947. default: () => props$1x.swiper.autoplay
  42948. },
  42949. // 当前所在滑块的 index
  42950. current: {
  42951. type: [String, Number],
  42952. default: () => props$1x.swiper.current
  42953. },
  42954. // 当前所在滑块的 item-id ,不能与 current 被同时指定
  42955. currentItemId: {
  42956. type: String,
  42957. default: () => props$1x.swiper.currentItemId
  42958. },
  42959. // 滑块自动切换时间间隔
  42960. interval: {
  42961. type: [String, Number],
  42962. default: () => props$1x.swiper.interval
  42963. },
  42964. // 滑块切换过程所需时间
  42965. duration: {
  42966. type: [String, Number],
  42967. default: () => props$1x.swiper.duration
  42968. },
  42969. // 播放到末尾后是否重新回到开头
  42970. circular: {
  42971. type: Boolean,
  42972. default: () => props$1x.swiper.circular
  42973. },
  42974. // 前边距,可用于露出前一项的一小部分,nvue和支付宝不支持
  42975. previousMargin: {
  42976. type: [String, Number],
  42977. default: () => props$1x.swiper.previousMargin
  42978. },
  42979. // 后边距,可用于露出后一项的一小部分,nvue和支付宝不支持
  42980. nextMargin: {
  42981. type: [String, Number],
  42982. default: () => props$1x.swiper.nextMargin
  42983. },
  42984. // 当开启时,会根据滑动速度,连续滑动多屏,支付宝不支持
  42985. acceleration: {
  42986. type: Boolean,
  42987. default: () => props$1x.swiper.acceleration
  42988. },
  42989. // 同时显示的滑块数量,nvue、支付宝小程序不支持
  42990. displayMultipleItems: {
  42991. type: Number,
  42992. default: () => props$1x.swiper.displayMultipleItems
  42993. },
  42994. // 指定swiper切换缓动动画类型,有效值:default、linear、easeInCubic、easeOutCubic、easeInOutCubic
  42995. // 只对微信小程序有效
  42996. easingFunction: {
  42997. type: String,
  42998. default: () => props$1x.swiper.easingFunction
  42999. },
  43000. // list数组中指定对象的目标属性名
  43001. keyName: {
  43002. type: String,
  43003. default: () => props$1x.swiper.keyName
  43004. },
  43005. // 图片的裁剪模式
  43006. imgMode: {
  43007. type: String,
  43008. default: () => props$1x.swiper.imgMode
  43009. },
  43010. // 组件高度
  43011. height: {
  43012. type: [String, Number],
  43013. default: () => props$1x.swiper.height
  43014. },
  43015. // 背景颜色
  43016. bgColor: {
  43017. type: String,
  43018. default: () => props$1x.swiper.bgColor
  43019. },
  43020. // 组件圆角,数值或带单位的字符串
  43021. radius: {
  43022. type: [String, Number],
  43023. default: () => props$1x.swiper.radius
  43024. },
  43025. // 是否加载中
  43026. loading: {
  43027. type: Boolean,
  43028. default: () => props$1x.swiper.loading
  43029. },
  43030. // 是否显示标题,要求数组对象中有title属性
  43031. showTitle: {
  43032. type: Boolean,
  43033. default: () => props$1x.swiper.showTitle
  43034. }
  43035. }
  43036. });
  43037. const _sfc_main$u = {
  43038. name: "u-swiper",
  43039. mixins: [mpMixin, mixin, props$e],
  43040. data() {
  43041. return {
  43042. currentIndex: 0
  43043. };
  43044. },
  43045. watch: {
  43046. current(val, preVal) {
  43047. if (val === preVal)
  43048. return;
  43049. this.currentIndex = val;
  43050. }
  43051. },
  43052. emits: ["click", "change", "update:current"],
  43053. computed: {
  43054. itemStyle() {
  43055. return (index2) => {
  43056. const style = {};
  43057. if (this.nextMargin && this.previousMargin) {
  43058. style.borderRadius = addUnit(this.radius);
  43059. if (index2 !== this.currentIndex)
  43060. style.transform = "scale(0.92)";
  43061. }
  43062. return style;
  43063. };
  43064. }
  43065. },
  43066. methods: {
  43067. addStyle,
  43068. addUnit,
  43069. testObject: test.object,
  43070. testImage: test.image,
  43071. getItemType(item) {
  43072. if (typeof item === "string")
  43073. return test.video(this.getSource(item)) ? "video" : "image";
  43074. if (typeof item === "object" && this.keyName) {
  43075. if (!item.type)
  43076. return test.video(this.getSource(item)) ? "video" : "image";
  43077. if (item.type === "image")
  43078. return "image";
  43079. if (item.type === "video")
  43080. return "video";
  43081. return "image";
  43082. }
  43083. },
  43084. // 获取目标路径,可能数组中为字符串,对象的形式,额外可指定对象的目标属性名keyName
  43085. getSource(item) {
  43086. if (typeof item === "string")
  43087. return item;
  43088. if (typeof item === "object" && this.keyName)
  43089. return item[this.keyName];
  43090. else
  43091. error("请按格式传递列表参数");
  43092. return "";
  43093. },
  43094. // 轮播切换事件
  43095. change(e2) {
  43096. const {
  43097. current
  43098. } = e2.detail;
  43099. this.pauseVideo(this.currentIndex);
  43100. this.currentIndex = current;
  43101. this.$emit("update:current", this.currentIndex);
  43102. this.$emit("change", e2.detail);
  43103. },
  43104. // 切换轮播时,暂停视频播放
  43105. pauseVideo(index2) {
  43106. const lastItem = this.getSource(this.list[index2]);
  43107. if (test.video(lastItem)) {
  43108. const video2 = uni.createVideoContext(`video-${index2}`, this);
  43109. video2.pause();
  43110. }
  43111. },
  43112. // 当一个轮播item为视频时,获取它的视频海报
  43113. getPoster(item) {
  43114. return typeof item === "object" && item.poster ? item.poster : "";
  43115. },
  43116. // 点击某个item
  43117. clickHandler(index2) {
  43118. this.$emit("click", index2);
  43119. }
  43120. }
  43121. };
  43122. function _sfc_render$t(_ctx, _cache, $props, $setup, $data, $options) {
  43123. const _component_up_loading_icon = vue.resolveComponent("up-loading-icon");
  43124. const _component_up_swiper_indicator = vue.resolveComponent("up-swiper-indicator");
  43125. return vue.openBlock(), vue.createElementBlock(
  43126. "view",
  43127. {
  43128. class: "u-swiper",
  43129. style: vue.normalizeStyle({
  43130. backgroundColor: _ctx.bgColor,
  43131. height: $options.addUnit(_ctx.height),
  43132. borderRadius: $options.addUnit(_ctx.radius)
  43133. })
  43134. },
  43135. [
  43136. _ctx.loading ? (vue.openBlock(), vue.createElementBlock("view", {
  43137. key: 0,
  43138. class: "u-swiper__loading"
  43139. }, [
  43140. vue.createVNode(_component_up_loading_icon, { mode: "circle" })
  43141. ])) : (vue.openBlock(), vue.createElementBlock("swiper", {
  43142. key: 1,
  43143. class: "u-swiper__wrapper",
  43144. style: vue.normalizeStyle({
  43145. flex: "1",
  43146. height: $options.addUnit(_ctx.height)
  43147. }),
  43148. onChange: _cache[0] || (_cache[0] = (...args) => $options.change && $options.change(...args)),
  43149. circular: _ctx.circular,
  43150. interval: _ctx.interval,
  43151. duration: _ctx.duration,
  43152. autoplay: _ctx.autoplay,
  43153. current: _ctx.current,
  43154. currentItemId: _ctx.currentItemId,
  43155. previousMargin: $options.addUnit(_ctx.previousMargin),
  43156. nextMargin: $options.addUnit(_ctx.nextMargin),
  43157. acceleration: _ctx.acceleration,
  43158. displayMultipleItems: _ctx.list.length > 0 ? _ctx.displayMultipleItems : 0,
  43159. easingFunction: _ctx.easingFunction
  43160. }, [
  43161. (vue.openBlock(true), vue.createElementBlock(
  43162. vue.Fragment,
  43163. null,
  43164. vue.renderList(_ctx.list, (item, index2) => {
  43165. return vue.openBlock(), vue.createElementBlock("swiper-item", {
  43166. class: "u-swiper__wrapper__item",
  43167. key: index2
  43168. }, [
  43169. vue.renderSlot(_ctx.$slots, "default", {
  43170. item,
  43171. index: index2
  43172. }, () => [
  43173. vue.createElementVNode(
  43174. "view",
  43175. {
  43176. class: "u-swiper__wrapper__item__wrapper",
  43177. style: vue.normalizeStyle([$options.itemStyle(index2)])
  43178. },
  43179. [
  43180. vue.createCommentVNode(" 在nvue中,image图片的宽度默认为屏幕宽度,需要通过flex:1撑开,另外必须设置高度才能显示图片 "),
  43181. $options.getItemType(item) === "image" ? (vue.openBlock(), vue.createElementBlock("image", {
  43182. key: 0,
  43183. class: "u-swiper__wrapper__item__wrapper__image",
  43184. src: $options.getSource(item),
  43185. mode: _ctx.imgMode,
  43186. onClick: ($event) => $options.clickHandler(index2),
  43187. style: vue.normalizeStyle({
  43188. height: $options.addUnit(_ctx.height),
  43189. borderRadius: $options.addUnit(_ctx.radius)
  43190. })
  43191. }, null, 12, ["src", "mode", "onClick"])) : vue.createCommentVNode("v-if", true),
  43192. $options.getItemType(item) === "video" ? (vue.openBlock(), vue.createElementBlock("video", {
  43193. key: 1,
  43194. class: "u-swiper__wrapper__item__wrapper__video",
  43195. id: `video-${index2}`,
  43196. "enable-progress-gesture": false,
  43197. src: $options.getSource(item),
  43198. poster: $options.getPoster(item),
  43199. title: _ctx.showTitle && $options.testObject(item) && item.title ? item.title : "",
  43200. style: vue.normalizeStyle({
  43201. height: $options.addUnit(_ctx.height)
  43202. }),
  43203. controls: "",
  43204. onClick: ($event) => $options.clickHandler(index2)
  43205. }, null, 12, ["id", "src", "poster", "title", "onClick"])) : vue.createCommentVNode("v-if", true),
  43206. _ctx.showTitle && $options.testObject(item) && item.title && $options.testImage($options.getSource(item)) ? (vue.openBlock(), vue.createElementBlock("view", {
  43207. key: 2,
  43208. class: "u-swiper__wrapper__item__wrapper__title"
  43209. }, [
  43210. vue.createElementVNode(
  43211. "text",
  43212. { class: "u-line-1" },
  43213. vue.toDisplayString(item.title),
  43214. 1
  43215. /* TEXT */
  43216. )
  43217. ])) : vue.createCommentVNode("v-if", true)
  43218. ],
  43219. 4
  43220. /* STYLE */
  43221. )
  43222. ], true)
  43223. ]);
  43224. }),
  43225. 128
  43226. /* KEYED_FRAGMENT */
  43227. ))
  43228. ], 44, ["circular", "interval", "duration", "autoplay", "current", "currentItemId", "previousMargin", "nextMargin", "acceleration", "displayMultipleItems", "easingFunction"])),
  43229. vue.createElementVNode(
  43230. "view",
  43231. {
  43232. class: "u-swiper__indicator",
  43233. style: vue.normalizeStyle([$options.addStyle(_ctx.indicatorStyle)])
  43234. },
  43235. [
  43236. vue.renderSlot(_ctx.$slots, "indicator", {}, () => [
  43237. !_ctx.loading && _ctx.indicator && !_ctx.showTitle ? (vue.openBlock(), vue.createBlock(_component_up_swiper_indicator, {
  43238. key: 0,
  43239. indicatorActiveColor: _ctx.indicatorActiveColor,
  43240. indicatorInactiveColor: _ctx.indicatorInactiveColor,
  43241. length: _ctx.list.length,
  43242. current: $data.currentIndex,
  43243. indicatorMode: _ctx.indicatorMode
  43244. }, null, 8, ["indicatorActiveColor", "indicatorInactiveColor", "length", "current", "indicatorMode"])) : vue.createCommentVNode("v-if", true)
  43245. ], true)
  43246. ],
  43247. 4
  43248. /* STYLE */
  43249. )
  43250. ],
  43251. 4
  43252. /* STYLE */
  43253. );
  43254. }
  43255. const uSwiper = /* @__PURE__ */ _export_sfc(_sfc_main$u, [["render", _sfc_render$t], ["__scopeId", "data-v-4e7d0c90"], ["__file", "C:/Users/EDY/Desktop/项目/shuibei/uni_modules/uview-plus/components/u-swiper/u-swiper.vue"]]);
  43256. const __vite_glob_0_106 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
  43257. __proto__: null,
  43258. default: uSwiper
  43259. }, Symbol.toStringTag, { value: "Module" }));
  43260. const props$d = defineMixin({
  43261. props: {
  43262. // 是否为加载中状态
  43263. loading: {
  43264. type: Boolean,
  43265. default: () => props$1x.switch.loading
  43266. },
  43267. // 是否为禁用装填
  43268. disabled: {
  43269. type: Boolean,
  43270. default: () => props$1x.switch.disabled
  43271. },
  43272. // 开关尺寸,单位px
  43273. size: {
  43274. type: [String, Number],
  43275. default: () => props$1x.switch.size
  43276. },
  43277. // 打开时的背景颜色
  43278. activeColor: {
  43279. type: String,
  43280. default: () => props$1x.switch.activeColor
  43281. },
  43282. // 关闭时的背景颜色
  43283. inactiveColor: {
  43284. type: String,
  43285. default: () => props$1x.switch.inactiveColor
  43286. },
  43287. // 通过v-model双向绑定的值
  43288. modelValue: {
  43289. type: [Boolean, String, Number],
  43290. default: () => props$1x.switch.value
  43291. },
  43292. // switch打开时的值
  43293. activeValue: {
  43294. type: [String, Number, Boolean],
  43295. default: () => props$1x.switch.activeValue
  43296. },
  43297. // switch关闭时的值
  43298. inactiveValue: {
  43299. type: [String, Number, Boolean],
  43300. default: () => props$1x.switch.inactiveValue
  43301. },
  43302. // 是否开启异步变更,开启后需要手动控制输入值
  43303. asyncChange: {
  43304. type: Boolean,
  43305. default: () => props$1x.switch.asyncChange
  43306. },
  43307. // 圆点与外边框的距离
  43308. space: {
  43309. type: [String, Number],
  43310. default: () => props$1x.switch.space
  43311. }
  43312. }
  43313. });
  43314. const _sfc_main$t = {
  43315. name: "u-switch",
  43316. mixins: [mpMixin, mixin, props$d],
  43317. watch: {
  43318. modelValue: {
  43319. immediate: true,
  43320. handler(n2) {
  43321. if (n2 !== this.inactiveValue && n2 !== this.activeValue) {
  43322. error("v-model绑定的值必须为inactiveValue、activeValue二者之一");
  43323. }
  43324. }
  43325. }
  43326. },
  43327. data() {
  43328. return {
  43329. bgColor: "#ffffff"
  43330. };
  43331. },
  43332. computed: {
  43333. isActive() {
  43334. return this.modelValue === this.activeValue;
  43335. },
  43336. switchStyle() {
  43337. let style = {};
  43338. style.width = addUnit(this.size * 2 + 2);
  43339. style.height = addUnit(Number(this.size) + 2);
  43340. if (this.customInactiveColor) {
  43341. style.borderColor = "rgba(0, 0, 0, 0)";
  43342. }
  43343. style.backgroundColor = this.isActive ? this.activeColor : this.inactiveColor;
  43344. return style;
  43345. },
  43346. nodeStyle() {
  43347. let style = {};
  43348. style.width = addUnit(this.size - this.space);
  43349. style.height = addUnit(this.size - this.space);
  43350. const translateX = this.isActive ? addUnit(this.space) : addUnit(this.size);
  43351. style.transform = `translateX(-${translateX})`;
  43352. return style;
  43353. },
  43354. bgStyle() {
  43355. let style = {};
  43356. style.width = addUnit(Number(this.size) * 2 - this.size / 2);
  43357. style.height = addUnit(this.size);
  43358. style.backgroundColor = this.inactiveColor;
  43359. style.transform = `scale(${this.isActive ? 0 : 1})`;
  43360. return style;
  43361. },
  43362. customInactiveColor() {
  43363. return this.inactiveColor !== "#fff" && this.inactiveColor !== "#ffffff";
  43364. }
  43365. },
  43366. emits: ["update:modelValue", "change"],
  43367. methods: {
  43368. addStyle,
  43369. clickHandler() {
  43370. if (!this.disabled && !this.loading) {
  43371. const oldValue = this.isActive ? this.inactiveValue : this.activeValue;
  43372. if (!this.asyncChange) {
  43373. this.$emit("update:modelValue", oldValue);
  43374. }
  43375. this.$nextTick(() => {
  43376. this.$emit("change", oldValue);
  43377. });
  43378. }
  43379. }
  43380. }
  43381. };
  43382. function _sfc_render$s(_ctx, _cache, $props, $setup, $data, $options) {
  43383. const _component_u_loading_icon = resolveEasycom(vue.resolveDynamicComponent("u-loading-icon"), __easycom_0$e);
  43384. return vue.openBlock(), vue.createElementBlock(
  43385. "view",
  43386. {
  43387. class: vue.normalizeClass(["u-switch cursor-pointer", [_ctx.disabled && "u-switch--disabled"]]),
  43388. style: vue.normalizeStyle([$options.switchStyle, $options.addStyle(_ctx.customStyle)]),
  43389. onClick: _cache[0] || (_cache[0] = (...args) => $options.clickHandler && $options.clickHandler(...args))
  43390. },
  43391. [
  43392. vue.createElementVNode(
  43393. "view",
  43394. {
  43395. class: "u-switch__bg",
  43396. style: vue.normalizeStyle([$options.bgStyle])
  43397. },
  43398. null,
  43399. 4
  43400. /* STYLE */
  43401. ),
  43402. vue.createElementVNode(
  43403. "view",
  43404. {
  43405. class: vue.normalizeClass(["u-switch__node", [_ctx.modelValue && "u-switch__node--on"]]),
  43406. style: vue.normalizeStyle([$options.nodeStyle]),
  43407. ref: "u-switch__node"
  43408. },
  43409. [
  43410. vue.createVNode(_component_u_loading_icon, {
  43411. show: _ctx.loading,
  43412. mode: "circle",
  43413. timingFunction: "linear",
  43414. color: _ctx.modelValue ? _ctx.activeColor : "#AAABAD",
  43415. size: _ctx.size * 0.6
  43416. }, null, 8, ["show", "color", "size"])
  43417. ],
  43418. 6
  43419. /* CLASS, STYLE */
  43420. )
  43421. ],
  43422. 6
  43423. /* CLASS, STYLE */
  43424. );
  43425. }
  43426. const uSwitch = /* @__PURE__ */ _export_sfc(_sfc_main$t, [["render", _sfc_render$s], ["__scopeId", "data-v-6ab257b3"], ["__file", "C:/Users/EDY/Desktop/项目/shuibei/uni_modules/uview-plus/components/u-switch/u-switch.vue"]]);
  43427. const __vite_glob_0_107 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
  43428. __proto__: null,
  43429. default: uSwitch
  43430. }, Symbol.toStringTag, { value: "Module" }));
  43431. const props$c = defineMixin({
  43432. props: {
  43433. // item标签的名称,作为与u-tabbar的value参数匹配的标识符
  43434. name: {
  43435. type: [String, Number, null],
  43436. default: () => props$1x.tabbarItem.name
  43437. },
  43438. // uview-plus内置图标或者绝对路径的图片
  43439. icon: {
  43440. icon: String,
  43441. default: () => props$1x.tabbarItem.icon
  43442. },
  43443. // 右上角的角标提示信息
  43444. badge: {
  43445. type: [String, Number, null],
  43446. default: () => props$1x.tabbarItem.badge
  43447. },
  43448. // 是否显示圆点,将会覆盖badge参数
  43449. dot: {
  43450. type: Boolean,
  43451. default: () => props$1x.tabbarItem.dot
  43452. },
  43453. // 描述文本
  43454. text: {
  43455. type: String,
  43456. default: () => props$1x.tabbarItem.text
  43457. },
  43458. // 控制徽标的位置,对象或者字符串形式,可以设置top和right属性
  43459. badgeStyle: {
  43460. type: [Object, String],
  43461. default: () => props$1x.tabbarItem.badgeStyle
  43462. },
  43463. // 模式,默认普通模式,midButton中间按钮模式
  43464. mode: {
  43465. type: String,
  43466. default: () => props$1x.tabbarItem.mode
  43467. }
  43468. }
  43469. });
  43470. const _sfc_main$s = {
  43471. name: "u-tabbar-item",
  43472. mixins: [mpMixin, mixin, props$c],
  43473. data() {
  43474. return {
  43475. isActive: false,
  43476. // 是否处于激活状态
  43477. parentData: {
  43478. value: null,
  43479. activeColor: "",
  43480. inactiveColor: ""
  43481. }
  43482. };
  43483. },
  43484. // 微信小程序中 options 选项
  43485. options: {
  43486. virtualHost: true
  43487. //将自定义节点设置成虚拟的,更加接近Vue组件的表现。我们不希望自定义组件的这个节点本身可以设置样式、响应 flex 布局等
  43488. },
  43489. computed: {
  43490. // 计算是否为中间按钮
  43491. isMidButton() {
  43492. return this.mode === "midButton";
  43493. }
  43494. },
  43495. created() {
  43496. this.init();
  43497. },
  43498. emits: ["click", "change"],
  43499. methods: {
  43500. addStyle,
  43501. init() {
  43502. this.updateParentData();
  43503. if (!this.parent) {
  43504. error("up-tabbar-item必须搭配up-tabbar组件使用");
  43505. }
  43506. const index2 = this.parent.children.indexOf(this);
  43507. this.isActive = (this.name || index2) === this.parentData.value;
  43508. },
  43509. updateParentData() {
  43510. this.getParentData("u-tabbar");
  43511. },
  43512. // 此方法将会被父组件u-tabbar调用
  43513. updateFromParent() {
  43514. this.init();
  43515. },
  43516. clickHandler() {
  43517. this.$nextTick(() => {
  43518. const index2 = this.parent.children.indexOf(this);
  43519. const name2 = this.name || index2;
  43520. if (name2 !== this.parent.value) {
  43521. this.parent.$emit("change", name2);
  43522. }
  43523. this.$emit("click", name2);
  43524. });
  43525. }
  43526. }
  43527. };
  43528. function _sfc_render$r(_ctx, _cache, $props, $setup, $data, $options) {
  43529. const _component_up_icon = vue.resolveComponent("up-icon");
  43530. const _component_u_badge = resolveEasycom(vue.resolveDynamicComponent("u-badge"), __easycom_0$9);
  43531. return vue.openBlock(), vue.createElementBlock(
  43532. "view",
  43533. {
  43534. class: vue.normalizeClass(["u-tabbar-item", [$options.isMidButton ? "u-tabbar-item--mid-button" : ""]]),
  43535. style: vue.normalizeStyle([$options.addStyle(_ctx.customStyle)]),
  43536. onClick: _cache[0] || (_cache[0] = (...args) => $options.clickHandler && $options.clickHandler(...args))
  43537. },
  43538. [
  43539. vue.createElementVNode(
  43540. "view",
  43541. {
  43542. class: vue.normalizeClass(["u-tabbar-item__icon", [$options.isMidButton ? "u-tabbar-item__icon--mid-button" : ""]])
  43543. },
  43544. [
  43545. $options.isMidButton ? (vue.openBlock(), vue.createElementBlock("view", {
  43546. key: 0,
  43547. class: "u-tabbar-item--mid-button-cover"
  43548. })) : vue.createCommentVNode("v-if", true),
  43549. _ctx.icon ? (vue.openBlock(), vue.createBlock(_component_up_icon, {
  43550. key: 1,
  43551. name: _ctx.icon,
  43552. color: $data.isActive ? $data.parentData.activeColor : $data.parentData.inactiveColor,
  43553. size: $options.isMidButton ? 26 : 20
  43554. }, null, 8, ["name", "color", "size"])) : (vue.openBlock(), vue.createElementBlock(
  43555. vue.Fragment,
  43556. { key: 2 },
  43557. [
  43558. $data.isActive ? vue.renderSlot(_ctx.$slots, "active-icon", { key: 0 }, void 0, true) : vue.renderSlot(_ctx.$slots, "inactive-icon", { key: 1 }, void 0, true)
  43559. ],
  43560. 64
  43561. /* STABLE_FRAGMENT */
  43562. )),
  43563. vue.createVNode(_component_u_badge, {
  43564. absolute: "",
  43565. offset: [0, _ctx.dot ? "34rpx" : _ctx.badge > 9 ? "14rpx" : "20rpx"],
  43566. customStyle: _ctx.badgeStyle,
  43567. isDot: _ctx.dot,
  43568. value: _ctx.badge || (_ctx.dot ? 1 : null),
  43569. show: _ctx.dot || _ctx.badge > 0
  43570. }, null, 8, ["offset", "customStyle", "isDot", "value", "show"])
  43571. ],
  43572. 2
  43573. /* CLASS */
  43574. ),
  43575. vue.renderSlot(_ctx.$slots, "text", {}, () => [
  43576. vue.createElementVNode(
  43577. "text",
  43578. {
  43579. class: "u-tabbar-item__text",
  43580. style: vue.normalizeStyle({
  43581. color: $data.isActive ? $data.parentData.activeColor : $data.parentData.inactiveColor
  43582. })
  43583. },
  43584. vue.toDisplayString(_ctx.text),
  43585. 5
  43586. /* TEXT, STYLE */
  43587. )
  43588. ], true)
  43589. ],
  43590. 6
  43591. /* CLASS, STYLE */
  43592. );
  43593. }
  43594. const uTabbarItem = /* @__PURE__ */ _export_sfc(_sfc_main$s, [["render", _sfc_render$r], ["__scopeId", "data-v-e01cdc2c"], ["__file", "C:/Users/EDY/Desktop/项目/shuibei/uni_modules/uview-plus/components/u-tabbar-item/u-tabbar-item.vue"]]);
  43595. const __vite_glob_0_108 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
  43596. __proto__: null,
  43597. default: uTabbarItem
  43598. }, Symbol.toStringTag, { value: "Module" }));
  43599. const props$b = defineMixin({
  43600. props: {
  43601. // 当前匹配项的name
  43602. value: {
  43603. type: [String, Number, null],
  43604. default: () => props$1x.tabbar.value
  43605. },
  43606. // 是否为iPhoneX留出底部安全距离
  43607. safeAreaInsetBottom: {
  43608. type: Boolean,
  43609. default: () => props$1x.tabbar.safeAreaInsetBottom
  43610. },
  43611. // 是否显示上方边框
  43612. border: {
  43613. type: Boolean,
  43614. default: () => props$1x.tabbar.border
  43615. },
  43616. // 上方边框颜色
  43617. borderColor: {
  43618. type: Boolean,
  43619. default: () => props$1x.tabbar.borderColor
  43620. },
  43621. // 元素层级z-index
  43622. zIndex: {
  43623. type: [String, Number],
  43624. default: () => props$1x.tabbar.zIndex
  43625. },
  43626. // 选中标签的颜色
  43627. activeColor: {
  43628. type: String,
  43629. default: () => props$1x.tabbar.activeColor
  43630. },
  43631. // 未选中标签的颜色
  43632. inactiveColor: {
  43633. type: String,
  43634. default: () => props$1x.tabbar.inactiveColor
  43635. },
  43636. // 是否固定在底部
  43637. fixed: {
  43638. type: Boolean,
  43639. default: () => props$1x.tabbar.fixed
  43640. },
  43641. // fixed定位固定在底部时,是否生成一个等高元素防止塌陷
  43642. placeholder: {
  43643. type: Boolean,
  43644. default: () => props$1x.tabbar.placeholder
  43645. },
  43646. // 背景色
  43647. backgroundColor: {
  43648. type: String,
  43649. default: () => props$1x.tabbar.backgroundColor
  43650. }
  43651. }
  43652. });
  43653. const _sfc_main$r = {
  43654. name: "u-tabbar",
  43655. mixins: [mpMixin, mixin, props$b],
  43656. data() {
  43657. return {
  43658. placeholderHeight: 0
  43659. };
  43660. },
  43661. computed: {
  43662. tabbarStyle() {
  43663. const style = {
  43664. zIndex: this.zIndex
  43665. };
  43666. if (this.borderColor) {
  43667. style.borderColor = this.borderColor;
  43668. }
  43669. if (this.backgroundColor) {
  43670. style.backgroundColor = this.backgroundColor;
  43671. }
  43672. return deepMerge$1(style, addStyle(this.customStyle));
  43673. },
  43674. // 监听多个参数的变化,通过在computed执行对应的操作
  43675. updateChild() {
  43676. return [this.value, this.activeColor, this.inactiveColor];
  43677. },
  43678. updatePlaceholder() {
  43679. return [this.fixed, this.placeholder];
  43680. }
  43681. },
  43682. watch: {
  43683. updateChild() {
  43684. this.updateChildren();
  43685. },
  43686. updatePlaceholder() {
  43687. this.setPlaceholderHeight();
  43688. }
  43689. },
  43690. created() {
  43691. this.children = [];
  43692. },
  43693. mounted() {
  43694. this.setPlaceholderHeight();
  43695. },
  43696. methods: {
  43697. updateChildren() {
  43698. this.children.length && this.children.map((child) => child.updateFromParent());
  43699. },
  43700. // 设置用于防止塌陷元素的高度
  43701. async setPlaceholderHeight() {
  43702. if (!this.fixed || !this.placeholder)
  43703. return;
  43704. await sleep(20);
  43705. this.$uGetRect(".u-tabbar__content").then(({ height = 50 }) => {
  43706. this.placeholderHeight = height;
  43707. });
  43708. }
  43709. }
  43710. };
  43711. function _sfc_render$q(_ctx, _cache, $props, $setup, $data, $options) {
  43712. const _component_u_safe_bottom = resolveEasycom(vue.resolveDynamicComponent("u-safe-bottom"), __easycom_0$b);
  43713. return vue.openBlock(), vue.createElementBlock("view", { class: "u-tabbar" }, [
  43714. vue.createElementVNode(
  43715. "view",
  43716. {
  43717. class: vue.normalizeClass(["u-tabbar__content", [_ctx.border && "u-border-top", _ctx.fixed && "u-tabbar--fixed"]]),
  43718. ref: "u-tabbar__content",
  43719. onTouchmove: _cache[0] || (_cache[0] = vue.withModifiers((...args) => _ctx.noop && _ctx.noop(...args), ["stop", "prevent"])),
  43720. style: vue.normalizeStyle([$options.tabbarStyle])
  43721. },
  43722. [
  43723. vue.createElementVNode("view", { class: "u-tabbar__content__item-wrapper" }, [
  43724. vue.renderSlot(_ctx.$slots, "default", {}, void 0, true)
  43725. ]),
  43726. _ctx.safeAreaInsetBottom ? (vue.openBlock(), vue.createBlock(_component_u_safe_bottom, { key: 0 })) : vue.createCommentVNode("v-if", true)
  43727. ],
  43728. 38
  43729. /* CLASS, STYLE, NEED_HYDRATION */
  43730. ),
  43731. _ctx.placeholder ? (vue.openBlock(), vue.createElementBlock(
  43732. "view",
  43733. {
  43734. key: 0,
  43735. class: "u-tabbar__placeholder",
  43736. style: vue.normalizeStyle({
  43737. height: $data.placeholderHeight + "px"
  43738. })
  43739. },
  43740. null,
  43741. 4
  43742. /* STYLE */
  43743. )) : vue.createCommentVNode("v-if", true)
  43744. ]);
  43745. }
  43746. const uTabbar = /* @__PURE__ */ _export_sfc(_sfc_main$r, [["render", _sfc_render$q], ["__scopeId", "data-v-b9276d10"], ["__file", "C:/Users/EDY/Desktop/项目/shuibei/uni_modules/uview-plus/components/u-tabbar/u-tabbar.vue"]]);
  43747. const __vite_glob_0_109 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
  43748. __proto__: null,
  43749. default: uTabbar
  43750. }, Symbol.toStringTag, { value: "Module" }));
  43751. const props$a = defineMixin({
  43752. props: {}
  43753. });
  43754. const _sfc_main$q = {
  43755. name: "u-table",
  43756. mixins: [mpMixin, mixin, props$a],
  43757. props: {
  43758. borderColor: {
  43759. type: String,
  43760. default: "#e4e7ed"
  43761. },
  43762. align: {
  43763. type: String,
  43764. default: "center"
  43765. },
  43766. // td的内边距
  43767. padding: {
  43768. type: String,
  43769. default: "5px 3px"
  43770. },
  43771. // 字体大小
  43772. fontSize: {
  43773. type: [String],
  43774. default: "14px"
  43775. },
  43776. // 字体颜色
  43777. color: {
  43778. type: String,
  43779. default: "#606266"
  43780. },
  43781. // th的自定义样式
  43782. thStyle: {
  43783. type: Object,
  43784. default() {
  43785. return {};
  43786. }
  43787. },
  43788. // table的背景颜色
  43789. bgColor: {
  43790. type: String,
  43791. default: "#ffffff"
  43792. }
  43793. },
  43794. data() {
  43795. return {
  43796. show: true
  43797. };
  43798. },
  43799. watch: {
  43800. align() {
  43801. this.change();
  43802. },
  43803. borderColor() {
  43804. this.change();
  43805. }
  43806. },
  43807. computed: {
  43808. tableStyle() {
  43809. let style = {};
  43810. style.borderLeft = `solid 1px ${this.borderColor}`;
  43811. style.borderTop = `solid 1px ${this.borderColor}`;
  43812. style.backgroundColor = this.bgColor;
  43813. return style;
  43814. }
  43815. },
  43816. methods: {
  43817. change() {
  43818. this.show = false;
  43819. this.$nextTick(() => {
  43820. this.show = true;
  43821. });
  43822. }
  43823. }
  43824. };
  43825. function _sfc_render$p(_ctx, _cache, $props, $setup, $data, $options) {
  43826. return vue.openBlock(), vue.createElementBlock(
  43827. "view",
  43828. {
  43829. class: "u-table",
  43830. style: vue.normalizeStyle([$options.tableStyle])
  43831. },
  43832. [
  43833. $data.show ? vue.renderSlot(_ctx.$slots, "default", { key: 0 }) : vue.createCommentVNode("v-if", true)
  43834. ],
  43835. 4
  43836. /* STYLE */
  43837. );
  43838. }
  43839. const uTable = /* @__PURE__ */ _export_sfc(_sfc_main$q, [["render", _sfc_render$p], ["__file", "C:/Users/EDY/Desktop/项目/shuibei/uni_modules/uview-plus/components/u-table/u-table.vue"]]);
  43840. const __vite_glob_0_110 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
  43841. __proto__: null,
  43842. default: uTable
  43843. }, Symbol.toStringTag, { value: "Module" }));
  43844. const _sfc_main$p = {
  43845. name: "tableRow",
  43846. props: {
  43847. row: {
  43848. type: Object,
  43849. required: true
  43850. },
  43851. rowIndex: {
  43852. type: Number,
  43853. required: true
  43854. },
  43855. parentRow: {
  43856. type: Object,
  43857. default: null
  43858. },
  43859. columns: {
  43860. type: Array,
  43861. required: true
  43862. },
  43863. treeProps: {
  43864. type: Object,
  43865. required: true
  43866. },
  43867. rowKey: {
  43868. type: String,
  43869. required: true
  43870. },
  43871. expandedKeys: {
  43872. type: Array,
  43873. required: true
  43874. },
  43875. cellStyleInner: {
  43876. type: Function,
  43877. required: true
  43878. },
  43879. isExpanded: {
  43880. type: Function,
  43881. required: true
  43882. },
  43883. rowClassName: {
  43884. type: Function,
  43885. default: null
  43886. },
  43887. stripe: {
  43888. type: Boolean,
  43889. default: false
  43890. },
  43891. cellClassName: {
  43892. type: Function,
  43893. default: null
  43894. },
  43895. getFixedClass: {
  43896. type: Function,
  43897. required: true
  43898. },
  43899. highlightCurrentRow: {
  43900. type: Boolean,
  43901. default: false
  43902. },
  43903. currentRow: {
  43904. type: Object,
  43905. default: null
  43906. },
  43907. handleRowClick: {
  43908. type: Function,
  43909. required: true
  43910. },
  43911. toggleExpand: {
  43912. type: Function,
  43913. required: true
  43914. },
  43915. level: {
  43916. type: Number,
  43917. required: true
  43918. },
  43919. // 添加computedMainCol属性
  43920. computedMainCol: {
  43921. type: String,
  43922. required: true
  43923. },
  43924. expandWidth: {
  43925. type: String,
  43926. required: true
  43927. },
  43928. hasTree: {
  43929. type: Boolean,
  43930. required: false
  43931. },
  43932. selectedRows: {
  43933. type: Array,
  43934. required: false
  43935. },
  43936. rowHeight: {
  43937. type: String,
  43938. required: true
  43939. }
  43940. },
  43941. emits: ["rowClick", "toggleExpand", "toggleSelect"],
  43942. methods: {
  43943. isSelected(row) {
  43944. return this.selectedRows.some((r2) => r2[this.rowKey] === row[this.rowKey]);
  43945. }
  43946. }
  43947. };
  43948. function _sfc_render$o(_ctx, _cache, $props, $setup, $data, $options) {
  43949. const _component_table_row = vue.resolveComponent("table-row", true);
  43950. return vue.openBlock(), vue.createElementBlock(
  43951. vue.Fragment,
  43952. null,
  43953. [
  43954. vue.createElementVNode(
  43955. "view",
  43956. {
  43957. class: vue.normalizeClass(["u-table-row u-table-row-child", [
  43958. $props.highlightCurrentRow && $props.currentRow === $props.row ? "u-table-row-highlight" : "",
  43959. $props.rowClassName ? $props.rowClassName($props.row, $props.rowIndex) : "",
  43960. $props.stripe && $props.rowIndex % 2 === 1 ? "u-table-row-zebra" : ""
  43961. ]]),
  43962. style: vue.normalizeStyle({ height: $props.rowHeight }),
  43963. onClick: _cache[2] || (_cache[2] = ($event) => $props.handleRowClick($props.row))
  43964. },
  43965. [
  43966. (vue.openBlock(true), vue.createElementBlock(
  43967. vue.Fragment,
  43968. null,
  43969. vue.renderList($props.columns, (col, colIndex) => {
  43970. return vue.openBlock(), vue.createElementBlock(
  43971. "view",
  43972. {
  43973. key: col.key,
  43974. class: vue.normalizeClass(["u-table-cell", [
  43975. col.align ? "u-text-" + col.align : "",
  43976. $props.cellClassName ? $props.cellClassName($props.row, col) : "",
  43977. $props.getFixedClass(col)
  43978. ]]),
  43979. style: vue.normalizeStyle($props.cellStyleInner({ row: $props.row, column: col, rowIndex: $props.rowIndex, columnIndex: colIndex, level: $props.level }))
  43980. },
  43981. [
  43982. vue.createCommentVNode(" 复选框列 "),
  43983. col.type === "selection" ? (vue.openBlock(), vue.createElementBlock("view", { key: 0 }, [
  43984. vue.createElementVNode("checkbox", {
  43985. checked: $options.isSelected($props.row),
  43986. onClick: _cache[0] || (_cache[0] = vue.withModifiers(($event) => _ctx.$emit("toggleSelect", $props.row), ["stop"]))
  43987. }, null, 8, ["checked"])
  43988. ])) : (vue.openBlock(), vue.createElementBlock(
  43989. vue.Fragment,
  43990. { key: 1 },
  43991. [
  43992. vue.createCommentVNode(" 在mainCol列显示展开图标 "),
  43993. col.key === $props.computedMainCol && $props.hasTree ? (vue.openBlock(), vue.createElementBlock(
  43994. "view",
  43995. {
  43996. key: 0,
  43997. onClick: _cache[1] || (_cache[1] = vue.withModifiers(($event) => $props.toggleExpand($props.row), ["stop"])),
  43998. style: vue.normalizeStyle({ width: $props.expandWidth })
  43999. },
  44000. [
  44001. $props.row.children && $props.row.children.length > 0 ? (vue.openBlock(), vue.createElementBlock(
  44002. "view",
  44003. { key: 0 },
  44004. vue.toDisplayString($props.isExpanded($props.row) ? "▼" : "▶"),
  44005. 1
  44006. /* TEXT */
  44007. )) : vue.createCommentVNode("v-if", true)
  44008. ],
  44009. 4
  44010. /* STYLE */
  44011. )) : vue.createCommentVNode("v-if", true),
  44012. vue.renderSlot(_ctx.$slots, "cellChild", {
  44013. row: $props.row,
  44014. column: col,
  44015. prow: $props.parentRow,
  44016. rowIndex: $props.rowIndex,
  44017. columnIndex: colIndex,
  44018. level: $props.level
  44019. }, () => [
  44020. vue.createElementVNode(
  44021. "view",
  44022. { class: "u-table-cell_content" },
  44023. vue.toDisplayString($props.row[col.key]),
  44024. 1
  44025. /* TEXT */
  44026. )
  44027. ], true)
  44028. ],
  44029. 64
  44030. /* STABLE_FRAGMENT */
  44031. ))
  44032. ],
  44033. 6
  44034. /* CLASS, STYLE */
  44035. );
  44036. }),
  44037. 128
  44038. /* KEYED_FRAGMENT */
  44039. ))
  44040. ],
  44041. 6
  44042. /* CLASS, STYLE */
  44043. ),
  44044. vue.createCommentVNode(" 递归渲染更深层的子级 "),
  44045. $props.isExpanded($props.row) && $props.row[$props.treeProps.children] && $props.row[$props.treeProps.children].length ? (vue.openBlock(true), vue.createElementBlock(
  44046. vue.Fragment,
  44047. { key: 0 },
  44048. vue.renderList($props.row[$props.treeProps.children], (rowChild, childIndex) => {
  44049. return vue.openBlock(), vue.createBlock(_component_table_row, {
  44050. key: rowChild[$props.rowKey] || childIndex,
  44051. row: rowChild,
  44052. rowIndex: childIndex,
  44053. "parent-row": $props.row,
  44054. columns: $props.columns,
  44055. "tree-props": $props.treeProps,
  44056. "row-key": $props.rowKey,
  44057. "expanded-keys": $props.expandedKeys,
  44058. "cell-style-inner": $props.cellStyleInner,
  44059. "is-expanded": $props.isExpanded,
  44060. "row-class-name": $props.rowClassName,
  44061. stripe: $props.stripe,
  44062. "cell-class-name": $props.cellClassName,
  44063. "get-fixed-class": $props.getFixedClass,
  44064. "highlight-current-row": $props.highlightCurrentRow,
  44065. "current-row": $props.currentRow,
  44066. "handle-row-click": $props.handleRowClick,
  44067. "toggle-expand": $props.toggleExpand,
  44068. level: $props.level + 1,
  44069. rowHeight: $props.rowHeight,
  44070. hasTree: $props.hasTree,
  44071. selectedRows: $props.selectedRows,
  44072. expandWidth: $props.expandWidth,
  44073. "computed-main-col": $props.computedMainCol,
  44074. onToggleSelect: _cache[3] || (_cache[3] = ($event) => _ctx.$emit("toggleSelect", $event)),
  44075. onRowClick: _cache[4] || (_cache[4] = ($event) => _ctx.$emit("rowClick", $event)),
  44076. onToggleExpand: _cache[5] || (_cache[5] = ($event) => _ctx.$emit("toggleExpand", $event))
  44077. }, {
  44078. cellChild: vue.withCtx((scope) => [
  44079. vue.renderSlot(_ctx.$slots, "cellChild", {
  44080. row: scope.row,
  44081. column: scope.column,
  44082. prow: scope.prow,
  44083. rowIndex: scope.rowIndex,
  44084. columnIndex: scope.columnIndex,
  44085. level: $props.level
  44086. }, void 0, true)
  44087. ]),
  44088. _: 2
  44089. /* DYNAMIC */
  44090. }, 1032, ["row", "rowIndex", "parent-row", "columns", "tree-props", "row-key", "expanded-keys", "cell-style-inner", "is-expanded", "row-class-name", "stripe", "cell-class-name", "get-fixed-class", "highlight-current-row", "current-row", "handle-row-click", "toggle-expand", "level", "rowHeight", "hasTree", "selectedRows", "expandWidth", "computed-main-col"]);
  44091. }),
  44092. 128
  44093. /* KEYED_FRAGMENT */
  44094. )) : vue.createCommentVNode("v-if", true)
  44095. ],
  44096. 64
  44097. /* STABLE_FRAGMENT */
  44098. );
  44099. }
  44100. const tableRow = /* @__PURE__ */ _export_sfc(_sfc_main$p, [["render", _sfc_render$o], ["__scopeId", "data-v-0ba90776"], ["__file", "C:/Users/EDY/Desktop/项目/shuibei/uni_modules/uview-plus/components/u-table2/tableRow.vue"]]);
  44101. const _sfc_main$o = {
  44102. name: "u-table2",
  44103. components: {
  44104. tableRow
  44105. // 注册递归组件
  44106. },
  44107. props: {
  44108. data: {
  44109. type: Array,
  44110. required: true,
  44111. default: () => {
  44112. return [];
  44113. }
  44114. },
  44115. columns: {
  44116. type: Array,
  44117. required: true,
  44118. default: () => {
  44119. return [];
  44120. },
  44121. validator: (cols) => cols.every(
  44122. (col) => ["default", "selection", "expand"].includes(col.type || "default")
  44123. )
  44124. },
  44125. stripe: {
  44126. type: Boolean,
  44127. default: false
  44128. },
  44129. border: {
  44130. type: Boolean,
  44131. default: false
  44132. },
  44133. height: {
  44134. type: [String, Number],
  44135. default: null
  44136. },
  44137. maxHeight: {
  44138. type: [String, Number],
  44139. default: null
  44140. },
  44141. showHeader: {
  44142. type: Boolean,
  44143. default: true
  44144. },
  44145. highlightCurrentRow: {
  44146. type: Boolean,
  44147. default: false
  44148. },
  44149. rowKey: {
  44150. type: String,
  44151. default: "id"
  44152. },
  44153. currentRowKey: {
  44154. type: [String, Number],
  44155. default: null
  44156. },
  44157. rowStyle: {
  44158. type: Object,
  44159. default: () => ({})
  44160. },
  44161. cellClassName: {
  44162. type: Function,
  44163. default: null
  44164. },
  44165. cellStyle: {
  44166. type: Function,
  44167. default: null
  44168. },
  44169. headerCellClassName: {
  44170. type: Function,
  44171. default: null
  44172. },
  44173. rowClassName: {
  44174. type: Function,
  44175. default: null
  44176. },
  44177. context: {
  44178. type: Object,
  44179. default: null
  44180. },
  44181. showOverflowTooltip: {
  44182. type: Boolean,
  44183. default: false
  44184. },
  44185. lazy: {
  44186. type: Boolean,
  44187. default: false
  44188. },
  44189. load: {
  44190. type: Function,
  44191. default: null
  44192. },
  44193. treeProps: {
  44194. type: Object,
  44195. default: () => ({
  44196. children: "children",
  44197. hasChildren: "hasChildren"
  44198. })
  44199. },
  44200. defaultExpandAll: {
  44201. type: Boolean,
  44202. default: false
  44203. },
  44204. expandRowKeys: {
  44205. type: Array,
  44206. default: () => []
  44207. },
  44208. sortOrders: {
  44209. type: Array,
  44210. default: () => ["ascending", "descending"]
  44211. },
  44212. sortable: {
  44213. type: [Boolean, String],
  44214. default: false
  44215. },
  44216. multiSort: {
  44217. type: Boolean,
  44218. default: false
  44219. },
  44220. sortBy: {
  44221. type: String,
  44222. default: null
  44223. },
  44224. sortMethod: {
  44225. type: Function,
  44226. default: null
  44227. },
  44228. filters: {
  44229. type: Object,
  44230. default: () => ({})
  44231. },
  44232. fixedHeader: {
  44233. type: Boolean,
  44234. default: true
  44235. },
  44236. emptyText: {
  44237. type: String,
  44238. default: "暂无数据"
  44239. },
  44240. // 添加mainCol属性,用于指定树形结构展开控制图标所在的列
  44241. mainCol: {
  44242. type: String,
  44243. default: ""
  44244. },
  44245. expandWidth: {
  44246. type: String,
  44247. default: "25px"
  44248. },
  44249. rowHeight: {
  44250. String,
  44251. default: "40px"
  44252. }
  44253. },
  44254. emits: [
  44255. "select",
  44256. "select-all",
  44257. "selection-change",
  44258. "cell-click",
  44259. "row-click",
  44260. "row-dblclick",
  44261. "header-click",
  44262. "sort-change",
  44263. "filter-change",
  44264. "current-change",
  44265. "expand-change"
  44266. ],
  44267. data() {
  44268. return {
  44269. scrollWidth: "auto",
  44270. // 将setup中的ref转换为data属性
  44271. expandedKeys: [...this.expandRowKeys],
  44272. selectedRows: [],
  44273. sortConditions: [],
  44274. currentRow: null,
  44275. scrollLeft: 0,
  44276. // 新增滚动位置数据
  44277. showFixedColumnShadow: false,
  44278. // 是否显示固定列阴影
  44279. fixedLeftColumns: [],
  44280. // 左侧固定列
  44281. tableHeight: "auto",
  44282. // 表格高度
  44283. headerHeight: "auto",
  44284. // 新增表头高度属性
  44285. hasTree: false
  44286. // 新增属性,用于判断是否存在树形结构
  44287. };
  44288. },
  44289. mounted() {
  44290. this.getComponentWidth();
  44291. if (this.currentRowKey !== null) {
  44292. const found = this.data.find((item) => item[this.rowKey] === this.currentRowKey);
  44293. if (found) {
  44294. this.currentRow = found;
  44295. }
  44296. }
  44297. this.fixedLeftColumns = this.columns.filter((col) => col.fixed === "left");
  44298. },
  44299. computed: {
  44300. // 将setup中的computed转换为computed属性
  44301. filteredData() {
  44302. return this.data.filter((row) => {
  44303. return Object.keys(this.filters).every((key) => {
  44304. var _a2;
  44305. const filter = this.filters[key];
  44306. if (!filter)
  44307. return true;
  44308. return (_a2 = row[key]) == null ? void 0 : _a2.toString().includes(filter.toString());
  44309. });
  44310. });
  44311. },
  44312. sortedData() {
  44313. if (!this.sortConditions.length)
  44314. return this.filteredData;
  44315. const data = [...this.filteredData];
  44316. return data.sort((a2, b2) => {
  44317. for (const condition of this.sortConditions) {
  44318. const { field, order } = condition;
  44319. let valA = a2[field];
  44320. let valB = b2[field];
  44321. if (this.sortMethod) {
  44322. const result = this.sortMethod(a2, b2, field);
  44323. if (result !== 0)
  44324. return result * (order === "ascending" ? 1 : -1);
  44325. }
  44326. if (valA < valB)
  44327. return order === "ascending" ? -1 : 1;
  44328. if (valA > valB)
  44329. return order === "ascending" ? 1 : -1;
  44330. }
  44331. return 0;
  44332. });
  44333. },
  44334. // 计算当前应该显示的固定左侧列
  44335. visibleFixedLeftColumns() {
  44336. if (this.scrollLeft <= 0) {
  44337. return [];
  44338. }
  44339. let totalWidth = 0;
  44340. let fixedWidth = 0;
  44341. const visibleColumns = [];
  44342. for (let i2 = 0; i2 < this.columns.length; i2++) {
  44343. const col = this.columns[i2];
  44344. const colWidth = col.width ? parseInt(col.width) : 100;
  44345. if (col.fixed === "left" && this.scrollLeft > totalWidth - fixedWidth) {
  44346. visibleColumns.push(col);
  44347. fixedWidth += colWidth;
  44348. }
  44349. totalWidth += colWidth;
  44350. }
  44351. return visibleColumns;
  44352. },
  44353. // 获取mainCol的值,如果未设置则默认为第一列的key
  44354. computedMainCol() {
  44355. if (this.mainCol) {
  44356. return this.mainCol;
  44357. }
  44358. const validColumns = this.columns.filter((col) => !col.type);
  44359. let mainCol = validColumns && validColumns.length > 0 ? validColumns[0].key : "";
  44360. return mainCol;
  44361. }
  44362. },
  44363. watch: {
  44364. // 将setup中的watch转换为watch属性
  44365. expandRowKeys: {
  44366. handler(newVal) {
  44367. this.expandedKeys = [...newVal];
  44368. },
  44369. immediate: true
  44370. },
  44371. currentRowKey: {
  44372. handler(newVal) {
  44373. const found = this.data.find((item) => item[this.rowKey] === newVal);
  44374. if (found) {
  44375. this.currentRow = found;
  44376. }
  44377. },
  44378. immediate: true
  44379. },
  44380. columns: {
  44381. handler() {
  44382. },
  44383. deep: true,
  44384. immediate: false
  44385. }
  44386. },
  44387. methods: {
  44388. addUnit,
  44389. onScroll(e2) {
  44390. this.scrollLeft = e2.detail.scrollLeft;
  44391. this.fixedLeftColumns = this.columns.filter((col) => col.fixed === "left");
  44392. if (this.fixedLeftColumns.length > 0) {
  44393. this.showFixedColumnShadow = this.scrollLeft > 0;
  44394. }
  44395. },
  44396. getFixedShadowStyle(col, index2) {
  44397. let style = {
  44398. width: col.width ? addUnit(col.width) : "auto"
  44399. };
  44400. if (col == null ? void 0 : col.style) {
  44401. style = { ...style, ...col == null ? void 0 : col.style };
  44402. }
  44403. return style;
  44404. },
  44405. getFixedClass(col) {
  44406. return "";
  44407. },
  44408. headerColStyle(col) {
  44409. let style = {
  44410. width: col.width ? addUnit(col.width) : "auto",
  44411. flex: col.width ? "none" : 1
  44412. };
  44413. if (col == null ? void 0 : col.style) {
  44414. style = { ...style, ...col == null ? void 0 : col.style };
  44415. }
  44416. return style;
  44417. },
  44418. setCellStyle(e2) {
  44419. this.cellStyle = e2;
  44420. },
  44421. cellStyleInner(scope) {
  44422. var _a2, _b;
  44423. let style = {
  44424. width: ((_a2 = scope.column) == null ? void 0 : _a2.width) ? addUnit(scope.column.width) : "auto",
  44425. flex: ((_b = scope.column) == null ? void 0 : _b.width) ? "none" : 1
  44426. };
  44427. if (scope.column.key == this.computedMainCol) {
  44428. style.paddingLeft = 16 * (scope.level - 1) + 2 + "px";
  44429. }
  44430. if (this.cellStyle != null) {
  44431. let styleCalc = this.cellStyle(scope);
  44432. if (styleCalc != null) {
  44433. style = { ...style, ...styleCalc };
  44434. }
  44435. }
  44436. return style;
  44437. },
  44438. // 获取组件的宽度
  44439. async getComponentWidth() {
  44440. await sleep(30);
  44441. this.$uGetRect(".u-table-row").then((size) => {
  44442. this.scrollWidth = size.width + "px";
  44443. });
  44444. this.$uGetRect(".u-table-header").then((size) => {
  44445. if (size.height) {
  44446. this.headerHeight = size.height + "px";
  44447. }
  44448. });
  44449. this.hasTree = this.sortedData.some((item) => {
  44450. return item[this.treeProps.children] && item[this.treeProps.children].length > 0;
  44451. });
  44452. },
  44453. // 将setup中的函数转换为methods
  44454. handleRowClick(row) {
  44455. if (this.highlightCurrentRow) {
  44456. const oldRow = this.currentRow;
  44457. this.currentRow = row;
  44458. this.$emit("current-change", row, oldRow);
  44459. }
  44460. this.$emit("row-click", row);
  44461. },
  44462. handleHeaderClick(column) {
  44463. if (!column.sortable)
  44464. return;
  44465. const index2 = this.sortConditions.findIndex((c2) => c2.field === column.key);
  44466. let newOrder = "ascending";
  44467. if (index2 >= 0) {
  44468. if (this.sortConditions[index2].order === "ascending") {
  44469. newOrder = "descending";
  44470. } else {
  44471. this.sortConditions.splice(index2, 1);
  44472. this.$emit("sort-change", this.sortConditions);
  44473. return;
  44474. }
  44475. }
  44476. if (!this.multiSort) {
  44477. this.sortConditions = [{ field: column.key, order: newOrder }];
  44478. } else {
  44479. if (index2 >= 0) {
  44480. this.sortConditions[index2].order = newOrder;
  44481. } else {
  44482. this.sortConditions.push({ field: column.key, order: newOrder });
  44483. }
  44484. }
  44485. this.$emit("sort-change", this.sortConditions);
  44486. },
  44487. getSortIcon(field) {
  44488. const cond = this.sortConditions.find((c2) => c2.field === field);
  44489. if (!cond)
  44490. return "";
  44491. return cond.order === "ascending" ? "↑" : "↓";
  44492. },
  44493. getSortValue(field) {
  44494. const cond = this.sortConditions.find((c2) => c2.field === field);
  44495. if (!cond)
  44496. return "";
  44497. return cond.order === "ascending";
  44498. },
  44499. toggleSelect(row) {
  44500. const index2 = this.selectedRows.findIndex((r2) => r2[this.rowKey] === row[this.rowKey]);
  44501. if (index2 >= 0) {
  44502. this.selectedRows.splice(index2, 1);
  44503. this.unselectChildren(row);
  44504. } else {
  44505. this.selectedRows.push(row);
  44506. this.selectChildren(row);
  44507. }
  44508. formatAppLog("log", "at uni_modules/uview-plus/components/u-table2/u-table2.vue:574", this.selectedRows);
  44509. this.$emit("selection-change", this.selectedRows);
  44510. this.$emit("select", row);
  44511. },
  44512. toggleExpand(row) {
  44513. const key = row[this.rowKey];
  44514. const index2 = this.expandedKeys.indexOf(key);
  44515. if (index2 === -1) {
  44516. this.expandedKeys.push(key);
  44517. } else {
  44518. this.expandedKeys.splice(index2, 1);
  44519. }
  44520. this.$emit("expand-change", this.expandedKeys);
  44521. },
  44522. isExpanded(row) {
  44523. if (!row) {
  44524. return false;
  44525. }
  44526. return this.expandedKeys.includes(row[this.rowKey]);
  44527. },
  44528. // 新增方法:递归选中所有子节点
  44529. selectChildren(row) {
  44530. const children = row[this.treeProps.children];
  44531. if (children && children.length > 0) {
  44532. children.forEach((child) => {
  44533. const childIndex = this.selectedRows.findIndex((r2) => r2[this.rowKey] === child[this.rowKey]);
  44534. if (childIndex === -1) {
  44535. this.selectedRows.push(child);
  44536. }
  44537. this.selectChildren(child);
  44538. });
  44539. }
  44540. },
  44541. // 新增方法:递归取消选中所有子节点
  44542. unselectChildren(row) {
  44543. const children = row[this.treeProps.children];
  44544. if (children && children.length > 0) {
  44545. children.forEach((child) => {
  44546. const childIndex = this.selectedRows.findIndex((r2) => r2[this.rowKey] === child[this.rowKey]);
  44547. if (childIndex >= 0) {
  44548. this.selectedRows.splice(childIndex, 1);
  44549. }
  44550. this.unselectChildren(child);
  44551. });
  44552. }
  44553. }
  44554. }
  44555. };
  44556. function _sfc_render$n(_ctx, _cache, $props, $setup, $data, $options) {
  44557. const _component_table_row = vue.resolveComponent("table-row");
  44558. return vue.openBlock(), vue.createElementBlock(
  44559. "view",
  44560. {
  44561. class: vue.normalizeClass(["u-table2", { "u-table-border": $props.border }])
  44562. },
  44563. [
  44564. vue.createElementVNode(
  44565. "scroll-view",
  44566. {
  44567. "scroll-x": "",
  44568. class: "u-table2-content",
  44569. style: vue.normalizeStyle({ height: $props.height ? $props.height + "px" : "auto" }),
  44570. onScroll: _cache[0] || (_cache[0] = (...args) => $options.onScroll && $options.onScroll(...args))
  44571. },
  44572. [
  44573. vue.createCommentVNode(" 表头 "),
  44574. $props.showHeader ? (vue.openBlock(), vue.createElementBlock(
  44575. "view",
  44576. {
  44577. key: 0,
  44578. class: vue.normalizeClass(["u-table-header", { "u-table-sticky": $props.fixedHeader }]),
  44579. style: vue.normalizeStyle({ minWidth: $data.scrollWidth })
  44580. },
  44581. [
  44582. vue.createElementVNode("view", { class: "u-table-row" }, [
  44583. (vue.openBlock(true), vue.createElementBlock(
  44584. vue.Fragment,
  44585. null,
  44586. vue.renderList($props.columns, (col, colIndex) => {
  44587. return vue.openBlock(), vue.createElementBlock("view", {
  44588. key: col.key,
  44589. class: vue.normalizeClass(["u-table-cell", [
  44590. col.align ? "u-text-" + col.align : "",
  44591. $props.headerCellClassName ? $props.headerCellClassName(col) : "",
  44592. $options.getFixedClass(col)
  44593. ]]),
  44594. style: vue.normalizeStyle($options.headerColStyle(col)),
  44595. onClick: ($event) => $options.handleHeaderClick(col)
  44596. }, [
  44597. vue.renderSlot(_ctx.$slots, "header", {
  44598. column: col,
  44599. columnIndex: colIndex,
  44600. level: 1
  44601. }, void 0, true),
  44602. !_ctx.$slots["header"] ? (vue.openBlock(), vue.createElementBlock(
  44603. "text",
  44604. { key: 0 },
  44605. vue.toDisplayString(col.title),
  44606. 1
  44607. /* TEXT */
  44608. )) : vue.createCommentVNode("v-if", true),
  44609. col.sortable ? (vue.openBlock(), vue.createElementBlock(
  44610. vue.Fragment,
  44611. { key: 1 },
  44612. [
  44613. vue.renderSlot(_ctx.$slots, "headerSort", {
  44614. sortStatus: $options.getSortValue(col.key),
  44615. column: col,
  44616. columnIndex: colIndex,
  44617. level: 1
  44618. }, void 0, true),
  44619. !_ctx.$slots["headerSort"] ? (vue.openBlock(), vue.createElementBlock(
  44620. "view",
  44621. { key: 0 },
  44622. vue.toDisplayString($options.getSortIcon(col.key)),
  44623. 1
  44624. /* TEXT */
  44625. )) : vue.createCommentVNode("v-if", true)
  44626. ],
  44627. 64
  44628. /* STABLE_FRAGMENT */
  44629. )) : vue.createCommentVNode("v-if", true)
  44630. ], 14, ["onClick"]);
  44631. }),
  44632. 128
  44633. /* KEYED_FRAGMENT */
  44634. ))
  44635. ])
  44636. ],
  44637. 6
  44638. /* CLASS, STYLE */
  44639. )) : vue.createCommentVNode("v-if", true),
  44640. vue.createCommentVNode(" 表体 "),
  44641. vue.createElementVNode(
  44642. "view",
  44643. {
  44644. class: "u-table-body",
  44645. style: vue.normalizeStyle({ minWidth: $data.scrollWidth, maxHeight: $props.maxHeight ? $props.maxHeight + "px" : "none" })
  44646. },
  44647. [
  44648. $props.data && $props.data.length > 0 ? (vue.openBlock(true), vue.createElementBlock(
  44649. vue.Fragment,
  44650. { key: 0 },
  44651. vue.renderList($options.sortedData, (row, rowIndex) => {
  44652. return vue.openBlock(), vue.createBlock(_component_table_row, {
  44653. key: row[$props.rowKey] || rowIndex,
  44654. row,
  44655. rowIndex,
  44656. "parent-row": null,
  44657. columns: $props.columns,
  44658. "tree-props": $props.treeProps,
  44659. "row-key": $props.rowKey,
  44660. "expanded-keys": $data.expandedKeys,
  44661. "cell-style-inner": $options.cellStyleInner,
  44662. "is-expanded": $options.isExpanded,
  44663. "row-class-name": $props.rowClassName,
  44664. stripe: $props.stripe,
  44665. "cell-class-name": $props.cellClassName,
  44666. "get-fixed-class": $options.getFixedClass,
  44667. "highlight-current-row": $props.highlightCurrentRow,
  44668. "current-row": $data.currentRow,
  44669. "handle-row-click": $options.handleRowClick,
  44670. "toggle-expand": $options.toggleExpand,
  44671. level: 1,
  44672. rowHeight: $props.rowHeight,
  44673. hasTree: $data.hasTree,
  44674. selectedRows: $data.selectedRows,
  44675. expandWidth: $props.expandWidth,
  44676. computedMainCol: $options.computedMainCol,
  44677. onToggleSelect: $options.toggleSelect,
  44678. onRowClick: $options.handleRowClick,
  44679. onToggleExpand: $options.toggleExpand
  44680. }, {
  44681. cellChild: vue.withCtx((scope) => [
  44682. vue.renderSlot(_ctx.$slots, "cell", {
  44683. row: scope.row,
  44684. column: scope.column,
  44685. prow: scope.prow,
  44686. rowIndex: scope.rowIndex,
  44687. columnIndex: scope.columnIndex,
  44688. level: scope.level
  44689. }, void 0, true)
  44690. ]),
  44691. _: 2
  44692. /* DYNAMIC */
  44693. }, 1032, ["row", "rowIndex", "columns", "tree-props", "row-key", "expanded-keys", "cell-style-inner", "is-expanded", "row-class-name", "stripe", "cell-class-name", "get-fixed-class", "highlight-current-row", "current-row", "handle-row-click", "toggle-expand", "rowHeight", "hasTree", "selectedRows", "expandWidth", "computedMainCol", "onToggleSelect", "onRowClick", "onToggleExpand"]);
  44694. }),
  44695. 128
  44696. /* KEYED_FRAGMENT */
  44697. )) : (vue.openBlock(), vue.createElementBlock(
  44698. vue.Fragment,
  44699. { key: 1 },
  44700. [
  44701. vue.renderSlot(_ctx.$slots, "empty", {}, void 0, true),
  44702. !_ctx.$slots["empty"] ? (vue.openBlock(), vue.createElementBlock(
  44703. "view",
  44704. {
  44705. key: 0,
  44706. class: "u-table-empty"
  44707. },
  44708. vue.toDisplayString($props.emptyText),
  44709. 1
  44710. /* TEXT */
  44711. )) : vue.createCommentVNode("v-if", true)
  44712. ],
  44713. 64
  44714. /* STABLE_FRAGMENT */
  44715. ))
  44716. ],
  44717. 4
  44718. /* STYLE */
  44719. )
  44720. ],
  44721. 36
  44722. /* STYLE, NEED_HYDRATION */
  44723. ),
  44724. vue.createCommentVNode(" 固定列浮动视图 "),
  44725. $data.showFixedColumnShadow ? (vue.openBlock(), vue.createElementBlock(
  44726. "view",
  44727. {
  44728. key: 0,
  44729. class: "u-table-fixed-shadow",
  44730. style: vue.normalizeStyle({ height: $data.tableHeight })
  44731. },
  44732. [
  44733. vue.createCommentVNode(" 表头 "),
  44734. $props.showHeader ? (vue.openBlock(), vue.createElementBlock(
  44735. "view",
  44736. {
  44737. key: 0,
  44738. class: vue.normalizeClass(["u-table-header", { "u-table-sticky": $props.fixedHeader }]),
  44739. style: vue.normalizeStyle({ minWidth: $data.scrollWidth })
  44740. },
  44741. [
  44742. vue.createElementVNode(
  44743. "view",
  44744. {
  44745. class: "u-table-row",
  44746. style: vue.normalizeStyle({ height: $data.headerHeight })
  44747. },
  44748. [
  44749. (vue.openBlock(true), vue.createElementBlock(
  44750. vue.Fragment,
  44751. null,
  44752. vue.renderList($options.visibleFixedLeftColumns, (col, colIndex) => {
  44753. return vue.openBlock(), vue.createElementBlock("view", {
  44754. key: col.key,
  44755. class: vue.normalizeClass(["u-table-cell", [
  44756. col.align ? "u-text-" + col.align : "",
  44757. $props.headerCellClassName ? $props.headerCellClassName(col) : "",
  44758. $options.getFixedClass(col)
  44759. ]]),
  44760. style: vue.normalizeStyle($options.headerColStyle(col)),
  44761. onClick: ($event) => $options.handleHeaderClick(col)
  44762. }, [
  44763. vue.renderSlot(_ctx.$slots, "header", {
  44764. column: col,
  44765. columnIndex: colIndex,
  44766. level: 1
  44767. }, void 0, true),
  44768. !_ctx.$slots["header"] ? (vue.openBlock(), vue.createElementBlock(
  44769. "text",
  44770. { key: 0 },
  44771. vue.toDisplayString(col.title),
  44772. 1
  44773. /* TEXT */
  44774. )) : vue.createCommentVNode("v-if", true),
  44775. col.sortable ? (vue.openBlock(), vue.createElementBlock(
  44776. vue.Fragment,
  44777. { key: 1 },
  44778. [
  44779. vue.renderSlot(_ctx.$slots, "headerSort", {
  44780. sortStatus: $options.getSortValue(col.key),
  44781. column: col,
  44782. columnIndex: colIndex,
  44783. level: 1
  44784. }, void 0, true),
  44785. !_ctx.$slots["headerSort"] ? (vue.openBlock(), vue.createElementBlock(
  44786. "view",
  44787. { key: 0 },
  44788. vue.toDisplayString($options.getSortIcon(col.key)),
  44789. 1
  44790. /* TEXT */
  44791. )) : vue.createCommentVNode("v-if", true)
  44792. ],
  44793. 64
  44794. /* STABLE_FRAGMENT */
  44795. )) : vue.createCommentVNode("v-if", true)
  44796. ], 14, ["onClick"]);
  44797. }),
  44798. 128
  44799. /* KEYED_FRAGMENT */
  44800. ))
  44801. ],
  44802. 4
  44803. /* STYLE */
  44804. )
  44805. ],
  44806. 6
  44807. /* CLASS, STYLE */
  44808. )) : vue.createCommentVNode("v-if", true),
  44809. vue.createCommentVNode(" 表体 "),
  44810. vue.createElementVNode(
  44811. "view",
  44812. {
  44813. class: "u-table-body",
  44814. style: vue.normalizeStyle({ minWidth: $data.scrollWidth, maxHeight: $props.maxHeight ? $props.maxHeight + "px" : "none" })
  44815. },
  44816. [
  44817. $props.data && $props.data.length > 0 ? (vue.openBlock(true), vue.createElementBlock(
  44818. vue.Fragment,
  44819. { key: 0 },
  44820. vue.renderList($options.sortedData, (row, rowIndex) => {
  44821. return vue.openBlock(), vue.createElementBlock(
  44822. vue.Fragment,
  44823. {
  44824. key: row[$props.rowKey] || rowIndex
  44825. },
  44826. [
  44827. vue.createCommentVNode(" 子级渲染 (递归组件) "),
  44828. vue.createVNode(_component_table_row, {
  44829. row,
  44830. rowIndex,
  44831. "parent-row": null,
  44832. columns: $options.visibleFixedLeftColumns,
  44833. "tree-props": $props.treeProps,
  44834. "row-key": $props.rowKey,
  44835. "expanded-keys": $data.expandedKeys,
  44836. "cell-style-inner": $options.cellStyleInner,
  44837. "is-expanded": $options.isExpanded,
  44838. "row-class-name": $props.rowClassName,
  44839. stripe: $props.stripe,
  44840. "cell-class-name": $props.cellClassName,
  44841. "get-fixed-class": $options.getFixedClass,
  44842. "highlight-current-row": $props.highlightCurrentRow,
  44843. "current-row": $data.currentRow,
  44844. "handle-row-click": $options.handleRowClick,
  44845. "toggle-expand": $options.toggleExpand,
  44846. level: 1,
  44847. rowHeight: $props.rowHeight,
  44848. hasTree: $data.hasTree,
  44849. selectedRows: $data.selectedRows,
  44850. expandWidth: $props.expandWidth,
  44851. computedMainCol: $options.computedMainCol,
  44852. onToggleSelect: $options.toggleSelect,
  44853. onRowClick: $options.handleRowClick,
  44854. onToggleExpand: $options.toggleExpand
  44855. }, {
  44856. cellChild: vue.withCtx((scope) => [
  44857. vue.renderSlot(_ctx.$slots, "cell", {
  44858. row: scope.row,
  44859. column: scope.column,
  44860. prow: scope.prow,
  44861. rowIndex: scope.rowIndex,
  44862. columnIndex: scope.columnIndex,
  44863. level: scope.level
  44864. }, void 0, true)
  44865. ]),
  44866. _: 2
  44867. /* DYNAMIC */
  44868. }, 1032, ["row", "rowIndex", "columns", "tree-props", "row-key", "expanded-keys", "cell-style-inner", "is-expanded", "row-class-name", "stripe", "cell-class-name", "get-fixed-class", "highlight-current-row", "current-row", "handle-row-click", "toggle-expand", "rowHeight", "hasTree", "selectedRows", "expandWidth", "computedMainCol", "onToggleSelect", "onRowClick", "onToggleExpand"])
  44869. ],
  44870. 64
  44871. /* STABLE_FRAGMENT */
  44872. );
  44873. }),
  44874. 128
  44875. /* KEYED_FRAGMENT */
  44876. )) : vue.createCommentVNode("v-if", true)
  44877. ],
  44878. 4
  44879. /* STYLE */
  44880. )
  44881. ],
  44882. 4
  44883. /* STYLE */
  44884. )) : vue.createCommentVNode("v-if", true)
  44885. ],
  44886. 2
  44887. /* CLASS */
  44888. );
  44889. }
  44890. const uTable2 = /* @__PURE__ */ _export_sfc(_sfc_main$o, [["render", _sfc_render$n], ["__scopeId", "data-v-ae8e3747"], ["__file", "C:/Users/EDY/Desktop/项目/shuibei/uni_modules/uview-plus/components/u-table2/u-table2.vue"]]);
  44891. const __vite_glob_0_111 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
  44892. __proto__: null,
  44893. default: uTable2
  44894. }, Symbol.toStringTag, { value: "Module" }));
  44895. const props$9 = defineMixin({
  44896. props: {}
  44897. });
  44898. const _sfc_main$n = {
  44899. name: "u-tabs-item",
  44900. mixins: [mpMixin, mixin, props$9],
  44901. data() {
  44902. return {};
  44903. }
  44904. };
  44905. function _sfc_render$m(_ctx, _cache, $props, $setup, $data, $options) {
  44906. return vue.openBlock(), vue.createElementBlock("swiper-item", null, [
  44907. vue.renderSlot(_ctx.$slots, "default")
  44908. ]);
  44909. }
  44910. const uTabsItem = /* @__PURE__ */ _export_sfc(_sfc_main$n, [["render", _sfc_render$m], ["__file", "C:/Users/EDY/Desktop/项目/shuibei/uni_modules/uview-plus/components/u-tabs-item/u-tabs-item.vue"]]);
  44911. const __vite_glob_0_112 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
  44912. __proto__: null,
  44913. default: uTabsItem
  44914. }, Symbol.toStringTag, { value: "Module" }));
  44915. const props$8 = defineMixin({
  44916. props: {
  44917. // 滑块的移动过渡时间,单位ms
  44918. duration: {
  44919. type: Number,
  44920. default: () => props$1x.tabs.duration
  44921. },
  44922. // tabs标签数组
  44923. list: {
  44924. type: Array,
  44925. default: () => props$1x.tabs.list
  44926. },
  44927. // 滑块颜色
  44928. lineColor: {
  44929. type: String,
  44930. default: () => props$1x.tabs.lineColor
  44931. },
  44932. // 菜单选择中时的样式
  44933. activeStyle: {
  44934. type: [String, Object],
  44935. default: () => props$1x.tabs.activeStyle
  44936. },
  44937. // 菜单非选中时的样式
  44938. inactiveStyle: {
  44939. type: [String, Object],
  44940. default: () => props$1x.tabs.inactiveStyle
  44941. },
  44942. // 滑块长度
  44943. lineWidth: {
  44944. type: [String, Number],
  44945. default: () => props$1x.tabs.lineWidth
  44946. },
  44947. // 滑块高度
  44948. lineHeight: {
  44949. type: [String, Number],
  44950. default: () => props$1x.tabs.lineHeight
  44951. },
  44952. // 滑块背景显示大小,当滑块背景设置为图片时使用
  44953. lineBgSize: {
  44954. type: String,
  44955. default: () => props$1x.tabs.lineBgSize
  44956. },
  44957. // 菜单item的样式
  44958. itemStyle: {
  44959. type: [String, Object],
  44960. default: () => props$1x.tabs.itemStyle
  44961. },
  44962. // 菜单是否可滚动
  44963. scrollable: {
  44964. type: Boolean,
  44965. default: () => props$1x.tabs.scrollable
  44966. },
  44967. // 当前选中标签的索引
  44968. current: {
  44969. type: [Number, String],
  44970. default: () => props$1x.tabs.current
  44971. },
  44972. // 默认读取的键名
  44973. keyName: {
  44974. type: String,
  44975. default: () => props$1x.tabs.keyName
  44976. },
  44977. // 左侧图标样式
  44978. iconStyle: {
  44979. type: [String, Object],
  44980. default: () => props$1x.tabs.iconStyle
  44981. }
  44982. }
  44983. });
  44984. const _sfc_main$m = {
  44985. name: "u-tabs",
  44986. mixins: [mpMixin, mixin, props$8],
  44987. data() {
  44988. return {
  44989. firstTime: true,
  44990. scrollLeft: 0,
  44991. scrollViewWidth: 0,
  44992. lineOffsetLeft: 0,
  44993. tabsRect: {
  44994. left: 0
  44995. },
  44996. innerCurrent: 0,
  44997. moving: false
  44998. };
  44999. },
  45000. watch: {
  45001. current: {
  45002. immediate: true,
  45003. handler(newValue, oldValue) {
  45004. if (newValue !== this.innerCurrent) {
  45005. if (typeof newValue == "string") {
  45006. this.innerCurrent = parseInt(newValue);
  45007. } else {
  45008. this.innerCurrent = newValue;
  45009. }
  45010. this.$nextTick(() => {
  45011. this.resize();
  45012. });
  45013. }
  45014. }
  45015. },
  45016. // list变化时,重新渲染list各项信息
  45017. list() {
  45018. this.$nextTick(() => {
  45019. this.resize();
  45020. });
  45021. }
  45022. },
  45023. computed: {
  45024. textStyle() {
  45025. return (index2) => {
  45026. const style = {};
  45027. const customeStyle = index2 == this.innerCurrent ? addStyle(this.activeStyle) : addStyle(this.inactiveStyle);
  45028. if (this.list[index2].disabled) {
  45029. style.color = "#c8c9cc";
  45030. }
  45031. return deepMerge$1(customeStyle, style);
  45032. };
  45033. },
  45034. propsBadge() {
  45035. return props$1x.badge;
  45036. }
  45037. },
  45038. async mounted() {
  45039. this.init();
  45040. this.windowResizeCallback = (res) => {
  45041. this.init();
  45042. };
  45043. uni.onWindowResize(this.windowResizeCallback);
  45044. },
  45045. beforeUnmount() {
  45046. uni.offWindowResize(this.windowResizeCallback);
  45047. },
  45048. emits: ["click", "longPress", "change", "update:current"],
  45049. methods: {
  45050. addStyle,
  45051. addUnit,
  45052. setLineLeft() {
  45053. const tabItem = this.list[this.innerCurrent];
  45054. if (!tabItem) {
  45055. return;
  45056. }
  45057. let lineOffsetLeft = this.list.slice(0, this.innerCurrent).reduce((total, curr) => total + curr.rect.width, 0);
  45058. const lineWidth = getPx(this.lineWidth);
  45059. this.lineOffsetLeft = lineOffsetLeft + (tabItem.rect.width - lineWidth) / 2;
  45060. if (this.firstTime) {
  45061. setTimeout(() => {
  45062. this.firstTime = false;
  45063. }, 10);
  45064. }
  45065. },
  45066. // nvue下设置滑块的位置
  45067. animation(x2, duration = 0) {
  45068. },
  45069. // 点击某一个标签
  45070. clickHandler(item, index2) {
  45071. this.$emit("click", {
  45072. ...item,
  45073. index: index2
  45074. }, index2);
  45075. if (item.disabled)
  45076. return;
  45077. if (this.innerCurrent == index2)
  45078. return;
  45079. this.innerCurrent = index2;
  45080. this.resize();
  45081. this.$emit("update:current", index2);
  45082. this.$emit("change", {
  45083. ...item,
  45084. index: index2
  45085. }, index2);
  45086. },
  45087. // 长按事件
  45088. longPressHandler(item, index2) {
  45089. this.$emit("longPress", {
  45090. ...item,
  45091. index: index2
  45092. });
  45093. },
  45094. init() {
  45095. sleep().then(() => {
  45096. this.resize();
  45097. });
  45098. },
  45099. setScrollLeft() {
  45100. if (this.innerCurrent < 0) {
  45101. this.innerCurrent = 0;
  45102. }
  45103. const tabRect = this.list[this.innerCurrent];
  45104. const offsetLeft = this.list.slice(0, this.innerCurrent).reduce((total, curr) => {
  45105. return total + curr.rect.width;
  45106. }, 0);
  45107. const windowWidth2 = getWindowInfo().windowWidth;
  45108. let scrollLeft = offsetLeft - (this.tabsRect.width - tabRect.rect.width) / 2 - (windowWidth2 - this.tabsRect.right) / 2 + this.tabsRect.left / 2;
  45109. scrollLeft = Math.min(scrollLeft, this.scrollViewWidth - this.tabsRect.width);
  45110. this.scrollLeft = Math.max(0, scrollLeft);
  45111. },
  45112. // 获取所有标签的尺寸
  45113. resize() {
  45114. if (this.list.length === 0) {
  45115. return;
  45116. }
  45117. Promise.all([this.getTabsRect(), this.getAllItemRect()]).then(([tabsRect, itemRect = []]) => {
  45118. if (tabsRect.left > tabsRect.width) {
  45119. tabsRect.right = tabsRect.right - Math.floor(tabsRect.left / tabsRect.width) * tabsRect.width;
  45120. tabsRect.left = tabsRect.left % tabsRect.width;
  45121. }
  45122. this.tabsRect = tabsRect;
  45123. this.scrollViewWidth = 0;
  45124. itemRect.map((item, index2) => {
  45125. this.scrollViewWidth += item.width;
  45126. this.list[index2].rect = item;
  45127. });
  45128. this.setLineLeft();
  45129. this.setScrollLeft();
  45130. });
  45131. },
  45132. // 获取导航菜单的尺寸
  45133. getTabsRect() {
  45134. return new Promise((resolve) => {
  45135. this.queryRect("u-tabs__wrapper__scroll-view").then((size) => resolve(size));
  45136. });
  45137. },
  45138. // 获取所有标签的尺寸
  45139. getAllItemRect() {
  45140. return new Promise((resolve) => {
  45141. const promiseAllArr = this.list.map((item, index2) => this.queryRect(
  45142. `u-tabs__wrapper__nav__item-${index2}`,
  45143. true
  45144. ));
  45145. Promise.all(promiseAllArr).then((sizes) => resolve(sizes));
  45146. });
  45147. },
  45148. // 获取各个标签的尺寸
  45149. queryRect(el, item) {
  45150. return new Promise((resolve) => {
  45151. this.$uGetRect(`.${el}`).then((size) => {
  45152. resolve(size);
  45153. });
  45154. });
  45155. }
  45156. }
  45157. };
  45158. function _sfc_render$l(_ctx, _cache, $props, $setup, $data, $options) {
  45159. const _component_up_icon = vue.resolveComponent("up-icon");
  45160. const _component_u_badge = resolveEasycom(vue.resolveDynamicComponent("u-badge"), __easycom_0$9);
  45161. return vue.openBlock(), vue.createElementBlock(
  45162. "view",
  45163. {
  45164. class: vue.normalizeClass(["u-tabs", [_ctx.customClass]])
  45165. },
  45166. [
  45167. vue.createElementVNode("view", { class: "u-tabs__wrapper" }, [
  45168. vue.renderSlot(_ctx.$slots, "left", {}, void 0, true),
  45169. vue.createElementVNode("view", { class: "u-tabs__wrapper__scroll-view-wrapper" }, [
  45170. vue.createElementVNode("scroll-view", {
  45171. "scroll-x": _ctx.scrollable,
  45172. "scroll-left": $data.scrollLeft,
  45173. "scroll-with-animation": "",
  45174. class: "u-tabs__wrapper__scroll-view",
  45175. "show-scrollbar": false,
  45176. ref: "u-tabs__wrapper__scroll-view"
  45177. }, [
  45178. vue.createElementVNode(
  45179. "view",
  45180. {
  45181. class: "u-tabs__wrapper__nav",
  45182. ref: "u-tabs__wrapper__nav"
  45183. },
  45184. [
  45185. (vue.openBlock(true), vue.createElementBlock(
  45186. vue.Fragment,
  45187. null,
  45188. vue.renderList(_ctx.list, (item, index2) => {
  45189. return vue.openBlock(), vue.createElementBlock("view", {
  45190. class: vue.normalizeClass(["u-tabs__wrapper__nav__item", [
  45191. `u-tabs__wrapper__nav__item-${index2}`,
  45192. item.disabled && "u-tabs__wrapper__nav__item--disabled",
  45193. $data.innerCurrent == index2 ? "u-tabs__wrapper__nav__item-active" : ""
  45194. ]]),
  45195. key: index2,
  45196. onClick: ($event) => $options.clickHandler(item, index2),
  45197. onLongpress: ($event) => $options.longPressHandler(item, index2),
  45198. ref_for: true,
  45199. ref: `u-tabs__wrapper__nav__item-${index2}`,
  45200. style: vue.normalizeStyle([$options.addStyle(_ctx.itemStyle), { flex: _ctx.scrollable ? "" : 1 }])
  45201. }, [
  45202. _ctx.$slots.icon ? vue.renderSlot(_ctx.$slots, "icon", {
  45203. key: 0,
  45204. item,
  45205. keyName: _ctx.keyName,
  45206. index: index2
  45207. }, void 0, true) : (vue.openBlock(), vue.createElementBlock(
  45208. vue.Fragment,
  45209. { key: 1 },
  45210. [
  45211. item.icon ? (vue.openBlock(), vue.createElementBlock("view", {
  45212. key: 0,
  45213. class: "u-tabs__wrapper__nav__item__prefix-icon"
  45214. }, [
  45215. vue.createVNode(_component_up_icon, {
  45216. name: item.icon,
  45217. customStyle: $options.addStyle(_ctx.iconStyle)
  45218. }, null, 8, ["name", "customStyle"])
  45219. ])) : vue.createCommentVNode("v-if", true)
  45220. ],
  45221. 64
  45222. /* STABLE_FRAGMENT */
  45223. )),
  45224. _ctx.$slots.content ? vue.renderSlot(_ctx.$slots, "content", {
  45225. key: 2,
  45226. item,
  45227. keyName: _ctx.keyName,
  45228. index: index2
  45229. }, void 0, true) : !_ctx.$slots.content && (_ctx.$slots.default || _ctx.$slots.$default) ? vue.renderSlot(_ctx.$slots, "default", {
  45230. key: 3,
  45231. item,
  45232. keyName: _ctx.keyName,
  45233. index: index2
  45234. }, void 0, true) : (vue.openBlock(), vue.createElementBlock(
  45235. "text",
  45236. {
  45237. key: 4,
  45238. class: vue.normalizeClass([[item.disabled && "u-tabs__wrapper__nav__item__text--disabled"], "u-tabs__wrapper__nav__item__text"]),
  45239. style: vue.normalizeStyle([$options.textStyle(index2)])
  45240. },
  45241. vue.toDisplayString(item[_ctx.keyName]),
  45242. 7
  45243. /* TEXT, CLASS, STYLE */
  45244. )),
  45245. vue.createVNode(_component_u_badge, {
  45246. show: !!(item.badge && (item.badge.show || item.badge.isDot || item.badge.value)),
  45247. isDot: item.badge && item.badge.isDot || $options.propsBadge.isDot,
  45248. value: item.badge && item.badge.value || $options.propsBadge.value,
  45249. max: item.badge && item.badge.max || $options.propsBadge.max,
  45250. type: item.badge && item.badge.type || $options.propsBadge.type,
  45251. showZero: item.badge && item.badge.showZero || $options.propsBadge.showZero,
  45252. bgColor: item.badge && item.badge.bgColor || $options.propsBadge.bgColor,
  45253. color: item.badge && item.badge.color || $options.propsBadge.color,
  45254. shape: item.badge && item.badge.shape || $options.propsBadge.shape,
  45255. numberType: item.badge && item.badge.numberType || $options.propsBadge.numberType,
  45256. inverted: item.badge && item.badge.inverted || $options.propsBadge.inverted,
  45257. customStyle: "margin-left: 4px;"
  45258. }, null, 8, ["show", "isDot", "value", "max", "type", "showZero", "bgColor", "color", "shape", "numberType", "inverted"])
  45259. ], 46, ["onClick", "onLongpress"]);
  45260. }),
  45261. 128
  45262. /* KEYED_FRAGMENT */
  45263. )),
  45264. vue.createElementVNode(
  45265. "view",
  45266. {
  45267. class: "u-tabs__wrapper__nav__line",
  45268. ref: "u-tabs__wrapper__nav__line",
  45269. style: vue.normalizeStyle([{
  45270. width: $options.addUnit(_ctx.lineWidth),
  45271. transform: `translate(${$data.lineOffsetLeft}px)`,
  45272. transitionDuration: `${$data.firstTime ? 0 : _ctx.duration}ms`,
  45273. height: $options.addUnit(_ctx.lineHeight),
  45274. background: _ctx.lineColor,
  45275. backgroundSize: _ctx.lineBgSize
  45276. }])
  45277. },
  45278. null,
  45279. 4
  45280. /* STYLE */
  45281. )
  45282. ],
  45283. 512
  45284. /* NEED_PATCH */
  45285. )
  45286. ], 8, ["scroll-x", "scroll-left"])
  45287. ]),
  45288. vue.renderSlot(_ctx.$slots, "right", {}, void 0, true)
  45289. ])
  45290. ],
  45291. 2
  45292. /* CLASS */
  45293. );
  45294. }
  45295. const uTabs = /* @__PURE__ */ _export_sfc(_sfc_main$m, [["render", _sfc_render$l], ["__scopeId", "data-v-02b0c54f"], ["__file", "C:/Users/EDY/Desktop/项目/shuibei/uni_modules/uview-plus/components/u-tabs/u-tabs.vue"]]);
  45296. const __vite_glob_0_113 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
  45297. __proto__: null,
  45298. default: uTabs
  45299. }, Symbol.toStringTag, { value: "Module" }));
  45300. const props$7 = defineMixin({
  45301. props: {
  45302. // 标签类型info、primary、success、warning、error
  45303. type: {
  45304. type: String,
  45305. default: () => props$1x.tag.type
  45306. },
  45307. // 不可用
  45308. disabled: {
  45309. type: [Boolean, String],
  45310. default: () => props$1x.tag.disabled
  45311. },
  45312. // 标签的大小,large,medium,mini
  45313. size: {
  45314. type: String,
  45315. default: () => props$1x.tag.size
  45316. },
  45317. // tag的形状,circle(两边半圆形), square(方形,带圆角)
  45318. shape: {
  45319. type: String,
  45320. default: () => props$1x.tag.shape
  45321. },
  45322. // 标签文字
  45323. text: {
  45324. type: [String, Number],
  45325. default: () => props$1x.tag.text
  45326. },
  45327. // 背景颜色,默认为空字符串,即不处理
  45328. bgColor: {
  45329. type: String,
  45330. default: () => props$1x.tag.bgColor
  45331. },
  45332. // 标签字体颜色,默认为空字符串,即不处理
  45333. color: {
  45334. type: String,
  45335. default: () => props$1x.tag.color
  45336. },
  45337. // 标签的边框颜色
  45338. borderColor: {
  45339. type: String,
  45340. default: () => props$1x.tag.borderColor
  45341. },
  45342. // 关闭按钮图标的颜色
  45343. closeColor: {
  45344. type: String,
  45345. default: () => props$1x.tag.closeColor
  45346. },
  45347. // 点击时返回的索引值,用于区分例遍的数组哪个元素被点击了
  45348. name: {
  45349. type: [String, Number],
  45350. default: () => props$1x.tag.name
  45351. },
  45352. // // 模式选择,dark|light|plain
  45353. // mode: {
  45354. // type: String,
  45355. // default: 'light'
  45356. // },
  45357. // 镂空时是否填充背景色
  45358. plainFill: {
  45359. type: Boolean,
  45360. default: () => props$1x.tag.plainFill
  45361. },
  45362. // 是否镂空
  45363. plain: {
  45364. type: Boolean,
  45365. default: () => props$1x.tag.plain
  45366. },
  45367. // 是否可关闭
  45368. closable: {
  45369. type: Boolean,
  45370. default: () => props$1x.tag.closable
  45371. },
  45372. // 是否显示
  45373. show: {
  45374. type: Boolean,
  45375. default: () => props$1x.tag.show
  45376. },
  45377. // 内置图标,或绝对路径的图片
  45378. icon: {
  45379. type: String,
  45380. default: () => props$1x.tag.icon
  45381. },
  45382. // 图标颜色
  45383. iconColor: {
  45384. type: String,
  45385. default: () => props$1x.tag.iconColor
  45386. },
  45387. // 自定义尺寸字体大小
  45388. textSize: {
  45389. type: String,
  45390. default: () => props$1x.tag.textSize
  45391. },
  45392. // 自定义尺寸高度
  45393. height: {
  45394. type: String,
  45395. default: () => props$1x.tag.height
  45396. },
  45397. // 自定义尺寸padding
  45398. padding: {
  45399. type: String,
  45400. default: () => props$1x.tag.padding
  45401. },
  45402. // 自定义尺寸
  45403. borderRadius: {
  45404. type: String,
  45405. default: () => props$1x.tag.borderRadius
  45406. },
  45407. // 自动计算背景色
  45408. autoBgColor: {
  45409. type: Number,
  45410. default: () => props$1x.tag.autoBgColor
  45411. }
  45412. }
  45413. });
  45414. const _sfc_main$l = {
  45415. name: "u-tag",
  45416. mixins: [mpMixin, mixin, props$7],
  45417. data() {
  45418. return {};
  45419. },
  45420. computed: {
  45421. style() {
  45422. const style = {};
  45423. if (this.bgColor) {
  45424. style.backgroundColor = this.bgColor;
  45425. }
  45426. if (this.color) {
  45427. style.color = this.color;
  45428. }
  45429. if (this.borderColor) {
  45430. style.borderColor = this.borderColor;
  45431. }
  45432. if (this.height) {
  45433. style.height = addUnit(this.height);
  45434. style.lineHeight = addUnit(this.height);
  45435. }
  45436. if (this.padding) {
  45437. style.padding = this.padding;
  45438. }
  45439. if (this.borderRadius) {
  45440. style.borderRadius = addUnit(this.borderRadius);
  45441. }
  45442. if (this.autoBgColor > 0 && this.color) {
  45443. style.backgroundColor = this.getBagColor(this.color);
  45444. }
  45445. return style;
  45446. },
  45447. // nvue下,文本颜色无法继承父元素
  45448. textColor() {
  45449. const style = {};
  45450. if (this.color) {
  45451. style.color = this.color;
  45452. }
  45453. if (this.textSize) {
  45454. style.textSize = addUnit(this.textSize);
  45455. }
  45456. return style;
  45457. },
  45458. imgStyle() {
  45459. const width = this.size === "large" ? "17px" : this.size === "medium" ? "15px" : "13px";
  45460. return {
  45461. width,
  45462. height: width
  45463. };
  45464. },
  45465. // 文本的样式
  45466. closeSize() {
  45467. const size = this.size === "large" ? 15 : this.size === "medium" ? 13 : 12;
  45468. return size;
  45469. },
  45470. // 图标大小
  45471. iconSize() {
  45472. const size = this.size === "large" ? 21 : this.size === "medium" ? 19 : 16;
  45473. return size;
  45474. },
  45475. // 图标颜色
  45476. elIconColor() {
  45477. return this.iconColor ? this.iconColor : this.plain ? this.type : "#ffffff";
  45478. }
  45479. },
  45480. emits: ["click", "close"],
  45481. methods: {
  45482. testImage: test.image,
  45483. // 点击关闭按钮
  45484. closeHandler() {
  45485. this.$emit("close", this.name);
  45486. },
  45487. // 点击标签
  45488. clickHandler() {
  45489. this.$emit("click", this.name);
  45490. },
  45491. // 根据颜色计算浅色作为背景
  45492. getBagColor(darkColor) {
  45493. return genLightColor(darkColor, this.autoBgColor);
  45494. }
  45495. }
  45496. };
  45497. function _sfc_render$k(_ctx, _cache, $props, $setup, $data, $options) {
  45498. const _component_up_icon = vue.resolveComponent("up-icon");
  45499. const _component_u_transition = resolveEasycom(vue.resolveDynamicComponent("u-transition"), __easycom_2$1);
  45500. return vue.openBlock(), vue.createBlock(_component_u_transition, {
  45501. mode: "fade",
  45502. show: _ctx.show,
  45503. style: { "display": "inline-flex" }
  45504. }, {
  45505. default: vue.withCtx(() => [
  45506. vue.createElementVNode("view", { class: "u-tag-wrapper cursor-pointer" }, [
  45507. vue.createElementVNode(
  45508. "view",
  45509. {
  45510. class: vue.normalizeClass(["u-tag", [`u-tag--${_ctx.shape}`, !_ctx.plain && `u-tag--${_ctx.type}`, _ctx.plain && `u-tag--${_ctx.type}--plain`, `u-tag--${_ctx.size}`, _ctx.plain && _ctx.plainFill && `u-tag--${_ctx.type}--plain--fill`]]),
  45511. onClick: _cache[0] || (_cache[0] = vue.withModifiers((...args) => $options.clickHandler && $options.clickHandler(...args), ["stop"])),
  45512. style: vue.normalizeStyle([{
  45513. marginRight: _ctx.closable ? "10px" : 0,
  45514. marginTop: _ctx.closable ? "10px" : 0
  45515. }, $options.style])
  45516. },
  45517. [
  45518. vue.renderSlot(_ctx.$slots, "icon", {}, () => [
  45519. _ctx.icon ? (vue.openBlock(), vue.createElementBlock("view", {
  45520. key: 0,
  45521. class: "u-tag__icon"
  45522. }, [
  45523. $options.testImage(_ctx.icon) ? (vue.openBlock(), vue.createElementBlock("image", {
  45524. key: 0,
  45525. src: _ctx.icon,
  45526. style: vue.normalizeStyle([$options.imgStyle])
  45527. }, null, 12, ["src"])) : (vue.openBlock(), vue.createBlock(_component_up_icon, {
  45528. key: 1,
  45529. color: $options.elIconColor,
  45530. name: _ctx.icon,
  45531. size: $options.iconSize
  45532. }, null, 8, ["color", "name", "size"]))
  45533. ])) : vue.createCommentVNode("v-if", true)
  45534. ], true),
  45535. vue.createElementVNode("view", { class: "u-tag__content" }, [
  45536. vue.renderSlot(_ctx.$slots, "content", {}, void 0, true),
  45537. !_ctx.$slots.content ? (vue.openBlock(), vue.createElementBlock(
  45538. vue.Fragment,
  45539. { key: 0 },
  45540. [
  45541. !_ctx.$slots.default && !_ctx.$slots.$default ? (vue.openBlock(), vue.createElementBlock(
  45542. "text",
  45543. {
  45544. key: 0,
  45545. class: vue.normalizeClass(["u-tag__text", [`u-tag__text--${_ctx.type}`, _ctx.plain && `u-tag__text--${_ctx.type}--plain`, `u-tag__text--${_ctx.size}`]]),
  45546. style: vue.normalizeStyle([$options.textColor])
  45547. },
  45548. vue.toDisplayString(_ctx.text),
  45549. 7
  45550. /* TEXT, CLASS, STYLE */
  45551. )) : (vue.openBlock(), vue.createElementBlock(
  45552. "text",
  45553. {
  45554. key: 1,
  45555. class: vue.normalizeClass(["u-tag__text", [`u-tag__text--${_ctx.type}`, _ctx.plain && `u-tag__text--${_ctx.type}--plain`, `u-tag__text--${_ctx.size}`]]),
  45556. style: vue.normalizeStyle([$options.textColor])
  45557. },
  45558. [
  45559. vue.renderSlot(_ctx.$slots, "default", {}, void 0, true)
  45560. ],
  45561. 6
  45562. /* CLASS, STYLE */
  45563. ))
  45564. ],
  45565. 64
  45566. /* STABLE_FRAGMENT */
  45567. )) : vue.createCommentVNode("v-if", true)
  45568. ])
  45569. ],
  45570. 6
  45571. /* CLASS, STYLE */
  45572. ),
  45573. _ctx.closable ? (vue.openBlock(), vue.createElementBlock(
  45574. "view",
  45575. {
  45576. key: 0,
  45577. class: vue.normalizeClass(["u-tag__close", [`u-tag__close--${_ctx.size}`]]),
  45578. onClick: _cache[1] || (_cache[1] = vue.withModifiers((...args) => $options.closeHandler && $options.closeHandler(...args), ["stop"])),
  45579. style: vue.normalizeStyle({ backgroundColor: _ctx.closeColor })
  45580. },
  45581. [
  45582. vue.createVNode(_component_up_icon, {
  45583. name: "close",
  45584. size: $options.closeSize,
  45585. color: "#ffffff"
  45586. }, null, 8, ["size"])
  45587. ],
  45588. 6
  45589. /* CLASS, STYLE */
  45590. )) : vue.createCommentVNode("v-if", true)
  45591. ])
  45592. ]),
  45593. _: 3
  45594. /* FORWARDED */
  45595. }, 8, ["show"]);
  45596. }
  45597. const uTag = /* @__PURE__ */ _export_sfc(_sfc_main$l, [["render", _sfc_render$k], ["__scopeId", "data-v-2fd891bb"], ["__file", "C:/Users/EDY/Desktop/项目/shuibei/uni_modules/uview-plus/components/u-tag/u-tag.vue"]]);
  45598. const __vite_glob_0_114 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
  45599. __proto__: null,
  45600. default: uTag
  45601. }, Symbol.toStringTag, { value: "Module" }));
  45602. const props$6 = defineMixin({
  45603. props: {}
  45604. });
  45605. const _sfc_main$k = {
  45606. name: "u-td",
  45607. mixins: [mpMixin, mixin, props$6],
  45608. props: {
  45609. // 宽度,百分比或者具体带单位的值,如30%, 200rpx等,一般使用百分比
  45610. width: {
  45611. type: [String],
  45612. default: "auto"
  45613. },
  45614. textAlign: {
  45615. type: String,
  45616. default: ""
  45617. },
  45618. fontSize: {
  45619. type: String,
  45620. default: ""
  45621. },
  45622. borderColor: {
  45623. type: String,
  45624. default: ""
  45625. },
  45626. color: {
  45627. type: String,
  45628. default: ""
  45629. }
  45630. },
  45631. data() {
  45632. return {
  45633. tdStyle: {}
  45634. };
  45635. },
  45636. created() {
  45637. this.parent = false;
  45638. },
  45639. mounted() {
  45640. this.parent = $parent.call(this, "u-table");
  45641. if (this.parent) {
  45642. let style = {};
  45643. if (this.width != "auto")
  45644. style.flex = `0 0 ${this.width}`;
  45645. style.textAlign = this.parent.align;
  45646. style.fontSize = addUnit(this.parent.fontSize);
  45647. style.padding = this.parent.padding;
  45648. style.borderBottom = `solid 1px ${this.parent.borderColor}`;
  45649. style.borderRight = `solid 1px ${this.parent.borderColor}`;
  45650. style.color = this.parent.color;
  45651. if (this.textAlign != "") {
  45652. style.textAlign = this.textAlign;
  45653. }
  45654. if (this.fontSize != "") {
  45655. style.fontSize = this.fontSize;
  45656. }
  45657. if (this.borderColor != "") {
  45658. style.borderColor = this.borderColor;
  45659. }
  45660. if (this.color != "") {
  45661. style.color = this.color;
  45662. }
  45663. this.tdStyle = style;
  45664. }
  45665. }
  45666. };
  45667. function _sfc_render$j(_ctx, _cache, $props, $setup, $data, $options) {
  45668. return vue.openBlock(), vue.createElementBlock(
  45669. "view",
  45670. {
  45671. class: "u-td",
  45672. style: vue.normalizeStyle([$data.tdStyle])
  45673. },
  45674. [
  45675. vue.renderSlot(_ctx.$slots, "default", {}, void 0, true)
  45676. ],
  45677. 4
  45678. /* STYLE */
  45679. );
  45680. }
  45681. const uTd = /* @__PURE__ */ _export_sfc(_sfc_main$k, [["render", _sfc_render$j], ["__scopeId", "data-v-0c19b389"], ["__file", "C:/Users/EDY/Desktop/项目/shuibei/uni_modules/uview-plus/components/u-td/u-td.vue"]]);
  45682. const __vite_glob_0_115 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
  45683. __proto__: null,
  45684. default: uTd
  45685. }, Symbol.toStringTag, { value: "Module" }));
  45686. const props$5 = defineMixin({
  45687. props: {
  45688. // 主题颜色
  45689. type: {
  45690. type: String,
  45691. default: () => props$1x.text.type
  45692. },
  45693. // 是否显示
  45694. show: {
  45695. type: Boolean,
  45696. default: () => props$1x.text.show
  45697. },
  45698. // 显示的值
  45699. text: {
  45700. type: [String, Number],
  45701. default: () => props$1x.text.text
  45702. },
  45703. // 前置图标
  45704. prefixIcon: {
  45705. type: String,
  45706. default: () => props$1x.text.prefixIcon
  45707. },
  45708. // 后置图标
  45709. suffixIcon: {
  45710. type: String,
  45711. default: () => props$1x.text.suffixIcon
  45712. },
  45713. // 文本处理的匹配模式
  45714. // text-普通文本,price-价格,phone-手机号,name-姓名,date-日期,link-超链接
  45715. mode: {
  45716. type: String,
  45717. default: () => props$1x.text.mode
  45718. },
  45719. // mode=link下,配置的链接
  45720. href: {
  45721. type: String,
  45722. default: () => props$1x.text.href
  45723. },
  45724. // 格式化规则
  45725. format: {
  45726. type: [String, Function],
  45727. default: () => props$1x.text.format
  45728. },
  45729. // mode=phone时,点击文本是否拨打电话
  45730. call: {
  45731. type: Boolean,
  45732. default: () => props$1x.text.call
  45733. },
  45734. // 小程序的打开方式
  45735. openType: {
  45736. type: String,
  45737. default: () => props$1x.text.openType
  45738. },
  45739. // 是否粗体,默认normal
  45740. bold: {
  45741. type: Boolean,
  45742. default: () => props$1x.text.bold
  45743. },
  45744. // 是否块状
  45745. block: {
  45746. type: Boolean,
  45747. default: () => props$1x.text.block
  45748. },
  45749. // 文本显示的行数,如果设置,超出此行数,将会显示省略号
  45750. lines: {
  45751. type: [String, Number],
  45752. default: () => props$1x.text.lines
  45753. },
  45754. // 文本颜色
  45755. color: {
  45756. type: String,
  45757. default: () => props$1x.text.color
  45758. },
  45759. // 字体大小
  45760. size: {
  45761. type: [String, Number],
  45762. default: () => props$1x.text.size
  45763. },
  45764. // 图标的样式
  45765. iconStyle: {
  45766. type: [Object, String],
  45767. default: () => props$1x.text.iconStyle
  45768. },
  45769. // 文字装饰,下划线,中划线等,可选值 none|underline|line-through
  45770. decoration: {
  45771. tepe: String,
  45772. default: () => props$1x.text.decoration
  45773. },
  45774. // 外边距,对象、字符串,数值形式均可
  45775. margin: {
  45776. type: [Object, String, Number],
  45777. default: () => props$1x.text.margin
  45778. },
  45779. // 文本行高
  45780. lineHeight: {
  45781. type: [String, Number],
  45782. default: () => props$1x.text.lineHeight
  45783. },
  45784. // 文本对齐方式,可选值left|center|right
  45785. align: {
  45786. type: String,
  45787. default: () => props$1x.text.align
  45788. },
  45789. // 文字换行,可选值break-word|normal|anywhere
  45790. wordWrap: {
  45791. type: String,
  45792. default: () => props$1x.text.wordWrap
  45793. },
  45794. // 占满剩余空间
  45795. flex1: {
  45796. type: Boolean,
  45797. default: () => props$1x.text.flex1
  45798. }
  45799. }
  45800. });
  45801. const value = {
  45802. computed: {
  45803. // 经处理后需要显示的值
  45804. value() {
  45805. const {
  45806. text,
  45807. mode,
  45808. format: format2,
  45809. href
  45810. } = this;
  45811. if (mode === "price") {
  45812. if (!/^\d+(\.\d+)?$/.test(text)) {
  45813. error("金额模式下,text参数需要为金额格式");
  45814. }
  45815. if (test.func(format2)) {
  45816. return format2(text);
  45817. }
  45818. return priceFormat(text, 2);
  45819. }
  45820. if (mode === "date") {
  45821. !test.date(text) && error("日期模式下,text参数需要为日期或时间戳格式");
  45822. if (test.func(format2)) {
  45823. return format2(text);
  45824. }
  45825. if (format2) {
  45826. return timeFormat(text, format2);
  45827. }
  45828. return timeFormat(text, "yyyy-mm-dd");
  45829. }
  45830. if (mode === "phone") {
  45831. if (test.func(format2)) {
  45832. return format2(text);
  45833. }
  45834. if (format2 === "encrypt") {
  45835. return `${text.substr(0, 3)}****${text.substr(7)}`;
  45836. }
  45837. return text;
  45838. }
  45839. if (mode === "name") {
  45840. !(typeof text === "string") && error("姓名模式下,text参数需要为字符串格式");
  45841. if (test.func(format2)) {
  45842. return format2(text);
  45843. }
  45844. if (format2 === "encrypt") {
  45845. return this.formatName(text);
  45846. }
  45847. return text;
  45848. }
  45849. if (mode === "link") {
  45850. !test.url(href) && error("超链接模式下,href参数需要为URL格式");
  45851. return text;
  45852. }
  45853. return text;
  45854. }
  45855. },
  45856. methods: {
  45857. // 默认的姓名脱敏规则
  45858. formatName(name2) {
  45859. let value2 = "";
  45860. if (name2.length === 2) {
  45861. value2 = name2.substr(0, 1) + "*";
  45862. } else if (name2.length > 2) {
  45863. let char = "";
  45864. for (let i2 = 0, len = name2.length - 2; i2 < len; i2++) {
  45865. char += "*";
  45866. }
  45867. value2 = name2.substr(0, 1) + char + name2.substr(-1, 1);
  45868. } else {
  45869. value2 = name2;
  45870. }
  45871. return value2;
  45872. }
  45873. }
  45874. };
  45875. const _sfc_main$j = {
  45876. name: "up-text",
  45877. mixins: [mpMixin, mixin, value, props$5],
  45878. emits: ["click"],
  45879. computed: {
  45880. wrapStyle() {
  45881. let style = {
  45882. margin: this.margin,
  45883. justifyContent: this.align === "left" ? "flex-start" : this.align === "center" ? "center" : "flex-end"
  45884. };
  45885. if (this.flex1) {
  45886. style.flex = 1;
  45887. style.width = "100%";
  45888. }
  45889. return style;
  45890. },
  45891. valueStyle() {
  45892. const style = {
  45893. textDecoration: this.decoration,
  45894. fontWeight: this.bold ? "bold" : "normal",
  45895. wordWrap: this.wordWrap,
  45896. fontSize: addUnit(this.size)
  45897. };
  45898. !this.type && (style.color = this.color);
  45899. this.isNvue && this.lines && (style.lines = this.lines);
  45900. this.lineHeight && (style.lineHeight = addUnit(this.lineHeight));
  45901. !this.isNvue && this.block && (style.display = "block");
  45902. return deepMerge$1(style, addStyle(this.customStyle));
  45903. },
  45904. isNvue() {
  45905. let nvue = false;
  45906. return nvue;
  45907. },
  45908. isMp() {
  45909. let mp = false;
  45910. return mp;
  45911. }
  45912. },
  45913. data() {
  45914. return {};
  45915. },
  45916. methods: {
  45917. addStyle,
  45918. clickHandler(e2) {
  45919. if (this.call && this.mode === "phone") {
  45920. uni.makePhoneCall({
  45921. phoneNumber: this.text
  45922. });
  45923. }
  45924. this.$emit("click", e2);
  45925. }
  45926. }
  45927. };
  45928. function _sfc_render$i(_ctx, _cache, $props, $setup, $data, $options) {
  45929. const _component_up_icon = vue.resolveComponent("up-icon");
  45930. const _component_u_link = resolveEasycom(vue.resolveDynamicComponent("u-link"), __easycom_0$2);
  45931. return _ctx.show ? (vue.openBlock(), vue.createElementBlock(
  45932. "view",
  45933. {
  45934. key: 0,
  45935. class: vue.normalizeClass(["u-text", [_ctx.customClass]]),
  45936. style: vue.normalizeStyle($options.wrapStyle),
  45937. onClick: _cache[6] || (_cache[6] = (...args) => $options.clickHandler && $options.clickHandler(...args))
  45938. },
  45939. [
  45940. _ctx.mode === "price" ? (vue.openBlock(), vue.createElementBlock(
  45941. "text",
  45942. {
  45943. key: 0,
  45944. class: vue.normalizeClass(["u-text__price", _ctx.type && `u-text__value--${_ctx.type}`]),
  45945. style: vue.normalizeStyle([$options.valueStyle])
  45946. },
  45947. "¥",
  45948. 6
  45949. /* CLASS, STYLE */
  45950. )) : vue.createCommentVNode("v-if", true),
  45951. _ctx.prefixIcon ? (vue.openBlock(), vue.createElementBlock("view", {
  45952. key: 1,
  45953. class: "u-text__prefix-icon"
  45954. }, [
  45955. vue.createVNode(_component_up_icon, {
  45956. name: _ctx.prefixIcon,
  45957. customStyle: $options.addStyle(_ctx.iconStyle)
  45958. }, null, 8, ["name", "customStyle"])
  45959. ])) : vue.createCommentVNode("v-if", true),
  45960. _ctx.mode === "link" ? (vue.openBlock(), vue.createBlock(_component_u_link, {
  45961. key: 2,
  45962. class: vue.normalizeClass(["u-text__value", [_ctx.type && `u-text__value--${_ctx.type}`, _ctx.lines && `u-line-${_ctx.lines}`]]),
  45963. style: vue.normalizeStyle({ fontWeight: $options.valueStyle.fontWeight, wordWrap: $options.valueStyle.wordWrap, fontSize: $options.valueStyle.fontSize }),
  45964. text: _ctx.value,
  45965. href: _ctx.href,
  45966. underLine: ""
  45967. }, null, 8, ["style", "class", "text", "href"])) : _ctx.openType && $options.isMp ? (vue.openBlock(), vue.createElementBlock("button", {
  45968. key: 3,
  45969. class: "u-reset-button u-text__value",
  45970. style: vue.normalizeStyle([$options.valueStyle]),
  45971. "data-index": _ctx.index,
  45972. openType: _ctx.openType,
  45973. onGetuserinfo: _cache[0] || (_cache[0] = (...args) => _ctx.onGetUserInfo && _ctx.onGetUserInfo(...args)),
  45974. onContact: _cache[1] || (_cache[1] = (...args) => _ctx.onContact && _ctx.onContact(...args)),
  45975. onGetphonenumber: _cache[2] || (_cache[2] = (...args) => _ctx.onGetPhoneNumber && _ctx.onGetPhoneNumber(...args)),
  45976. onError: _cache[3] || (_cache[3] = (...args) => _ctx.onError && _ctx.onError(...args)),
  45977. onLaunchapp: _cache[4] || (_cache[4] = (...args) => _ctx.onLaunchApp && _ctx.onLaunchApp(...args)),
  45978. onOpensetting: _cache[5] || (_cache[5] = (...args) => _ctx.onOpenSetting && _ctx.onOpenSetting(...args)),
  45979. lang: _ctx.lang,
  45980. "session-from": _ctx.sessionFrom,
  45981. "send-message-title": _ctx.sendMessageTitle,
  45982. "send-message-path": _ctx.sendMessagePath,
  45983. "send-message-img": _ctx.sendMessageImg,
  45984. "show-message-card": _ctx.showMessageCard,
  45985. "app-parameter": _ctx.appParameter
  45986. }, vue.toDisplayString(_ctx.value), 45, ["data-index", "openType", "lang", "session-from", "send-message-title", "send-message-path", "send-message-img", "show-message-card", "app-parameter"])) : (vue.openBlock(), vue.createElementBlock(
  45987. "text",
  45988. {
  45989. key: 4,
  45990. class: vue.normalizeClass(["u-text__value", [
  45991. _ctx.type && `u-text__value--${_ctx.type}`,
  45992. _ctx.lines && `u-line-${_ctx.lines}`
  45993. ]]),
  45994. style: vue.normalizeStyle([$options.valueStyle])
  45995. },
  45996. vue.toDisplayString(_ctx.value),
  45997. 7
  45998. /* TEXT, CLASS, STYLE */
  45999. )),
  46000. _ctx.suffixIcon ? (vue.openBlock(), vue.createElementBlock("view", {
  46001. key: 5,
  46002. class: "u-text__suffix-icon"
  46003. }, [
  46004. vue.createVNode(_component_up_icon, {
  46005. name: _ctx.suffixIcon,
  46006. customStyle: $options.addStyle(_ctx.iconStyle)
  46007. }, null, 8, ["name", "customStyle"])
  46008. ])) : vue.createCommentVNode("v-if", true)
  46009. ],
  46010. 6
  46011. /* CLASS, STYLE */
  46012. )) : vue.createCommentVNode("v-if", true);
  46013. }
  46014. const uText = /* @__PURE__ */ _export_sfc(_sfc_main$j, [["render", _sfc_render$i], ["__scopeId", "data-v-0a574502"], ["__file", "C:/Users/EDY/Desktop/项目/shuibei/uni_modules/uview-plus/components/u-text/u-text.vue"]]);
  46015. const __vite_glob_0_116 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
  46016. __proto__: null,
  46017. default: uText
  46018. }, Symbol.toStringTag, { value: "Module" }));
  46019. const props$4 = defineMixin({
  46020. props: {
  46021. // 输入框的内容
  46022. value: {
  46023. type: [String, Number],
  46024. default: () => props$1x.textarea.value
  46025. },
  46026. // 输入框的内容
  46027. modelValue: {
  46028. type: [String, Number],
  46029. default: () => props$1x.textarea.value
  46030. },
  46031. // 输入框为空时占位符
  46032. placeholder: {
  46033. type: [String, Number],
  46034. default: () => props$1x.textarea.placeholder
  46035. },
  46036. // 指定placeholder的样式类,注意页面或组件的style中写了scoped时,需要在类名前写/deep/
  46037. placeholderClass: {
  46038. type: String,
  46039. default: () => props$1x.input.placeholderClass
  46040. },
  46041. // 指定placeholder的样式
  46042. placeholderStyle: {
  46043. type: [String, Object],
  46044. default: () => props$1x.input.placeholderStyle
  46045. },
  46046. // 输入框高度
  46047. height: {
  46048. type: [String, Number],
  46049. default: () => props$1x.textarea.height
  46050. },
  46051. // 设置键盘右下角按钮的文字,仅微信小程序,App-vue和H5有效
  46052. confirmType: {
  46053. type: String,
  46054. default: () => props$1x.textarea.confirmType
  46055. },
  46056. // 是否禁用
  46057. disabled: {
  46058. type: Boolean,
  46059. default: () => props$1x.textarea.disabled
  46060. },
  46061. // 是否显示统计字数
  46062. count: {
  46063. type: Boolean,
  46064. default: () => props$1x.textarea.count
  46065. },
  46066. // 是否自动获取焦点,nvue不支持,H5取决于浏览器的实现
  46067. focus: {
  46068. type: Boolean,
  46069. default: () => props$1x.textarea.focus
  46070. },
  46071. // 是否自动增加高度
  46072. autoHeight: {
  46073. type: Boolean,
  46074. default: () => props$1x.textarea.autoHeight
  46075. },
  46076. // 如果textarea是在一个position:fixed的区域,需要显示指定属性fixed为true
  46077. fixed: {
  46078. type: Boolean,
  46079. default: () => props$1x.textarea.fixed
  46080. },
  46081. // 指定光标与键盘的距离
  46082. cursorSpacing: {
  46083. type: Number,
  46084. default: () => props$1x.textarea.cursorSpacing
  46085. },
  46086. // 指定focus时的光标位置
  46087. cursor: {
  46088. type: [String, Number],
  46089. default: () => props$1x.textarea.cursor
  46090. },
  46091. // 是否显示键盘上方带有”完成“按钮那一栏,
  46092. showConfirmBar: {
  46093. type: Boolean,
  46094. default: () => props$1x.textarea.showConfirmBar
  46095. },
  46096. // 光标起始位置,自动聚焦时有效,需与selection-end搭配使用
  46097. selectionStart: {
  46098. type: Number,
  46099. default: () => props$1x.textarea.selectionStart
  46100. },
  46101. // 光标结束位置,自动聚焦时有效,需与selection-start搭配使用
  46102. selectionEnd: {
  46103. type: Number,
  46104. default: () => props$1x.textarea.selectionEnd
  46105. },
  46106. // 键盘弹起时,是否自动上推页面
  46107. adjustPosition: {
  46108. type: Boolean,
  46109. default: () => props$1x.textarea.adjustPosition
  46110. },
  46111. // 是否去掉 iOS 下的默认内边距,只微信小程序有效
  46112. disableDefaultPadding: {
  46113. type: Boolean,
  46114. default: () => props$1x.textarea.disableDefaultPadding
  46115. },
  46116. // focus时,点击页面的时候不收起键盘,只微信小程序有效
  46117. holdKeyboard: {
  46118. type: Boolean,
  46119. default: () => props$1x.textarea.holdKeyboard
  46120. },
  46121. // 最大输入长度,设置为 -1 的时候不限制最大长度
  46122. maxlength: {
  46123. type: [String, Number],
  46124. default: () => props$1x.textarea.maxlength
  46125. },
  46126. // 边框类型,surround-四周边框,bottom-底部边框
  46127. border: {
  46128. type: String,
  46129. default: () => props$1x.textarea.border
  46130. },
  46131. // 用于处理或者过滤输入框内容的方法
  46132. formatter: {
  46133. type: [Function, null],
  46134. default: () => props$1x.textarea.formatter
  46135. },
  46136. // 是否忽略组件内对文本合成系统事件的处理
  46137. ignoreCompositionEvent: {
  46138. type: Boolean,
  46139. default: true
  46140. }
  46141. }
  46142. });
  46143. const _sfc_main$i = {
  46144. name: "u-textarea",
  46145. mixins: [mpMixin, mixin, props$4],
  46146. data() {
  46147. return {
  46148. // 输入框的值
  46149. innerValue: "",
  46150. // 是否处于获得焦点状态
  46151. focused: false,
  46152. // value是否第一次变化,在watch中,由于加入immediate属性,会在第一次触发,此时不应该认为value发生了变化
  46153. firstChange: true,
  46154. // value绑定值的变化是由内部还是外部引起的
  46155. changeFromInner: false,
  46156. // 过滤处理方法
  46157. innerFormatter: (value2) => value2
  46158. };
  46159. },
  46160. created() {
  46161. },
  46162. watch: {
  46163. modelValue: {
  46164. immediate: true,
  46165. handler(newVal, oldVal) {
  46166. this.innerValue = newVal;
  46167. this.firstChange = false;
  46168. this.changeFromInner = false;
  46169. }
  46170. }
  46171. },
  46172. computed: {
  46173. fieldStyle() {
  46174. let style = {};
  46175. style["height"] = addUnit(this.height);
  46176. if (this.autoHeight) {
  46177. style["height"] = "auto";
  46178. style["minHeight"] = addUnit(this.height);
  46179. }
  46180. return style;
  46181. },
  46182. // 组件的类名
  46183. textareaClass() {
  46184. let classes = [], { border, disabled } = this;
  46185. border === "surround" && (classes = classes.concat(["u-border", "u-textarea--radius"]));
  46186. border === "bottom" && (classes = classes.concat([
  46187. "u-border-bottom",
  46188. "u-textarea--no-radius"
  46189. ]));
  46190. disabled && classes.push("u-textarea--disabled");
  46191. return classes.join(" ");
  46192. },
  46193. // 组件的样式
  46194. textareaStyle() {
  46195. const style = {};
  46196. return deepMerge$1(style, addStyle(this.customStyle));
  46197. }
  46198. },
  46199. emits: ["update:modelValue", "linechange", "focus", "blur", "change", "confirm", "keyboardheightchange"],
  46200. methods: {
  46201. addStyle,
  46202. addUnit,
  46203. // 在微信小程序中,不支持将函数当做props参数,故只能通过ref形式调用
  46204. setFormatter(e2) {
  46205. this.innerFormatter = e2;
  46206. },
  46207. onFocus(e2) {
  46208. this.$emit("focus", e2);
  46209. },
  46210. onBlur(e2) {
  46211. this.$emit("blur", e2);
  46212. formValidate(this, "blur");
  46213. },
  46214. onLinechange(e2) {
  46215. this.$emit("linechange", e2);
  46216. },
  46217. onInput(e2) {
  46218. let { value: value2 = "" } = e2.detail || {};
  46219. const formatter = this.formatter || this.innerFormatter;
  46220. const formatValue = formatter(value2);
  46221. this.innerValue = value2;
  46222. this.$nextTick(() => {
  46223. this.innerValue = formatValue;
  46224. this.valueChange();
  46225. });
  46226. },
  46227. // 内容发生变化,进行处理
  46228. valueChange() {
  46229. const value2 = this.innerValue;
  46230. this.$nextTick(() => {
  46231. this.$emit("update:modelValue", value2);
  46232. this.changeFromInner = true;
  46233. this.$emit("change", value2);
  46234. formValidate(this, "change");
  46235. });
  46236. },
  46237. onConfirm(e2) {
  46238. this.$emit("confirm", e2);
  46239. },
  46240. onKeyboardheightchange(e2) {
  46241. this.$emit("keyboardheightchange", e2);
  46242. }
  46243. }
  46244. };
  46245. function _sfc_render$h(_ctx, _cache, $props, $setup, $data, $options) {
  46246. return vue.openBlock(), vue.createElementBlock(
  46247. "view",
  46248. {
  46249. class: vue.normalizeClass(["u-textarea", $options.textareaClass]),
  46250. style: vue.normalizeStyle([$options.textareaStyle])
  46251. },
  46252. [
  46253. vue.createElementVNode("textarea", {
  46254. class: "u-textarea__field",
  46255. value: $data.innerValue,
  46256. style: vue.normalizeStyle($options.fieldStyle),
  46257. placeholder: _ctx.placeholder,
  46258. "placeholder-style": $options.addStyle(_ctx.placeholderStyle, typeof _ctx.placeholderStyle === "string" ? "string" : "object"),
  46259. "placeholder-class": _ctx.placeholderClass,
  46260. disabled: _ctx.disabled,
  46261. focus: _ctx.focus,
  46262. autoHeight: _ctx.autoHeight,
  46263. fixed: _ctx.fixed,
  46264. cursorSpacing: _ctx.cursorSpacing,
  46265. cursor: _ctx.cursor,
  46266. showConfirmBar: _ctx.showConfirmBar,
  46267. selectionStart: _ctx.selectionStart,
  46268. selectionEnd: _ctx.selectionEnd,
  46269. adjustPosition: _ctx.adjustPosition,
  46270. disableDefaultPadding: _ctx.disableDefaultPadding,
  46271. holdKeyboard: _ctx.holdKeyboard,
  46272. maxlength: _ctx.maxlength,
  46273. "confirm-type": _ctx.confirmType,
  46274. ignoreCompositionEvent: _ctx.ignoreCompositionEvent,
  46275. onFocus: _cache[0] || (_cache[0] = (...args) => $options.onFocus && $options.onFocus(...args)),
  46276. onBlur: _cache[1] || (_cache[1] = (...args) => $options.onBlur && $options.onBlur(...args)),
  46277. onLinechange: _cache[2] || (_cache[2] = (...args) => $options.onLinechange && $options.onLinechange(...args)),
  46278. onInput: _cache[3] || (_cache[3] = (...args) => $options.onInput && $options.onInput(...args)),
  46279. onConfirm: _cache[4] || (_cache[4] = (...args) => $options.onConfirm && $options.onConfirm(...args)),
  46280. onKeyboardheightchange: _cache[5] || (_cache[5] = (...args) => $options.onKeyboardheightchange && $options.onKeyboardheightchange(...args))
  46281. }, null, 44, ["value", "placeholder", "placeholder-style", "placeholder-class", "disabled", "focus", "autoHeight", "fixed", "cursorSpacing", "cursor", "showConfirmBar", "selectionStart", "selectionEnd", "adjustPosition", "disableDefaultPadding", "holdKeyboard", "maxlength", "confirm-type", "ignoreCompositionEvent"]),
  46282. _ctx.count ? (vue.openBlock(), vue.createElementBlock(
  46283. "text",
  46284. {
  46285. key: 0,
  46286. class: "u-textarea__count",
  46287. style: vue.normalizeStyle({
  46288. "background-color": _ctx.disabled ? "transparent" : "#fff"
  46289. })
  46290. },
  46291. vue.toDisplayString($data.innerValue.length) + "/" + vue.toDisplayString(_ctx.maxlength),
  46292. 5
  46293. /* TEXT, STYLE */
  46294. )) : vue.createCommentVNode("v-if", true)
  46295. ],
  46296. 6
  46297. /* CLASS, STYLE */
  46298. );
  46299. }
  46300. const uTextarea = /* @__PURE__ */ _export_sfc(_sfc_main$i, [["render", _sfc_render$h], ["__scopeId", "data-v-b6c174a6"], ["__file", "C:/Users/EDY/Desktop/项目/shuibei/uni_modules/uview-plus/components/u-textarea/u-textarea.vue"]]);
  46301. const __vite_glob_0_117 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
  46302. __proto__: null,
  46303. default: uTextarea
  46304. }, Symbol.toStringTag, { value: "Module" }));
  46305. const props$3 = defineMixin({
  46306. props: {}
  46307. });
  46308. const _sfc_main$h = {
  46309. name: "u-th",
  46310. mixins: [mpMixin, mixin, props$3],
  46311. props: {
  46312. // 宽度,百分比或者具体带单位的值,如30%, 200rpx等,一般使用百分比
  46313. width: {
  46314. type: [String],
  46315. default: ""
  46316. }
  46317. },
  46318. data() {
  46319. return {
  46320. thStyle: {}
  46321. };
  46322. },
  46323. created() {
  46324. this.parent = false;
  46325. },
  46326. mounted() {
  46327. this.parent = $parent.call(this, "u-table");
  46328. if (this.parent) {
  46329. let style = {};
  46330. if (this.width)
  46331. style.flex = `0 0 ${this.width}`;
  46332. style.textAlign = this.parent.align;
  46333. style.padding = this.parent.padding;
  46334. style.borderBottom = `solid 1px ${this.parent.borderColor}`;
  46335. style.borderRight = `solid 1px ${this.parent.borderColor}`;
  46336. Object.assign(style, this.parent.thStyle);
  46337. this.thStyle = style;
  46338. }
  46339. }
  46340. };
  46341. function _sfc_render$g(_ctx, _cache, $props, $setup, $data, $options) {
  46342. return vue.openBlock(), vue.createElementBlock(
  46343. "view",
  46344. {
  46345. class: "u-th",
  46346. style: vue.normalizeStyle([$data.thStyle])
  46347. },
  46348. [
  46349. vue.renderSlot(_ctx.$slots, "default", {}, void 0, true)
  46350. ],
  46351. 4
  46352. /* STYLE */
  46353. );
  46354. }
  46355. const uTh = /* @__PURE__ */ _export_sfc(_sfc_main$h, [["render", _sfc_render$g], ["__scopeId", "data-v-67643fa0"], ["__file", "C:/Users/EDY/Desktop/项目/shuibei/uni_modules/uview-plus/components/u-th/u-th.vue"]]);
  46356. const __vite_glob_0_118 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
  46357. __proto__: null,
  46358. default: uTh
  46359. }, Symbol.toStringTag, { value: "Module" }));
  46360. const _sfc_main$g = {
  46361. name: "u-title",
  46362. props: {},
  46363. data() {
  46364. return {};
  46365. },
  46366. created: function() {
  46367. },
  46368. methods: {}
  46369. };
  46370. function _sfc_render$f(_ctx, _cache, $props, $setup, $data, $options) {
  46371. return vue.openBlock(), vue.createElementBlock("view", { class: "u-title u-flex-row u-flex-y-center" }, [
  46372. vue.renderSlot(_ctx.$slots, "prefix", {}, () => [
  46373. vue.createElementVNode("view", { class: "u-title-prefix" })
  46374. ], true),
  46375. vue.renderSlot(_ctx.$slots, "default", {}, void 0, true)
  46376. ]);
  46377. }
  46378. const uTitle = /* @__PURE__ */ _export_sfc(_sfc_main$g, [["render", _sfc_render$f], ["__scopeId", "data-v-018ff1f0"], ["__file", "C:/Users/EDY/Desktop/项目/shuibei/uni_modules/uview-plus/components/u-title/u-title.vue"]]);
  46379. const __vite_glob_0_119 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
  46380. __proto__: null,
  46381. default: uTitle
  46382. }, Symbol.toStringTag, { value: "Module" }));
  46383. const _sfc_main$f = {
  46384. name: "u-toast",
  46385. mixins: [mpMixin, mixin],
  46386. data() {
  46387. return {
  46388. isShow: false,
  46389. timer: null,
  46390. // 定时器
  46391. config: {
  46392. message: "",
  46393. // 显示文本
  46394. type: "",
  46395. // 主题类型,primary,success,error,warning,black
  46396. zIndex: 10090,
  46397. // 层级
  46398. duration: 2e3,
  46399. // 显示的时间,毫秒
  46400. icon: true,
  46401. // 显示的图标
  46402. position: "center",
  46403. // toast出现的位置
  46404. complete: null,
  46405. // 执行完后的回调函数
  46406. overlay: true,
  46407. // 是否防止触摸穿透
  46408. loading: false
  46409. // 是否加载中状态
  46410. },
  46411. tmpConfig: {}
  46412. // 将用户配置和内置配置合并后的临时配置变量
  46413. };
  46414. },
  46415. computed: {
  46416. iconName() {
  46417. if (!this.tmpConfig.icon || this.tmpConfig.icon == "none") {
  46418. return "";
  46419. }
  46420. if (this.tmpConfig.icon === true) {
  46421. if (["error", "warning", "success", "primary"].includes(this.tmpConfig.type)) {
  46422. return type2icon(this.tmpConfig.type);
  46423. } else {
  46424. return "";
  46425. }
  46426. } else {
  46427. return this.tmpConfig.icon;
  46428. }
  46429. },
  46430. overlayStyle() {
  46431. const style = {
  46432. justifyContent: "center",
  46433. alignItems: "center",
  46434. display: "flex"
  46435. };
  46436. style.backgroundColor = "rgba(0, 0, 0, 0)";
  46437. return style;
  46438. },
  46439. iconStyle() {
  46440. const style = {};
  46441. style.marginRight = "4px";
  46442. return style;
  46443. },
  46444. loadingIconColor() {
  46445. let colorTmp = "rgb(255, 255, 255)";
  46446. if (["error", "warning", "success", "primary"].includes(this.tmpConfig.type)) {
  46447. colorTmp = hexToRgb(color$3[this.tmpConfig.type]);
  46448. }
  46449. return colorTmp;
  46450. },
  46451. // 内容盒子的样式
  46452. contentStyle() {
  46453. const windowHeight = getWindowInfo().windowHeight, style = {};
  46454. let value2 = 0;
  46455. if (this.tmpConfig.position === "top") {
  46456. value2 = -windowHeight * 0.25;
  46457. } else if (this.tmpConfig.position === "bottom") {
  46458. value2 = windowHeight * 0.25;
  46459. }
  46460. style.transform = `translateY(${value2}px)`;
  46461. return style;
  46462. }
  46463. },
  46464. created() {
  46465. ["primary", "success", "error", "warning", "default", "loading"].map((item) => {
  46466. this[item] = (message) => this.show({
  46467. type: item,
  46468. message
  46469. });
  46470. });
  46471. },
  46472. methods: {
  46473. // 显示toast组件,由父组件通过this.$refs.xxx.show(options)形式调用
  46474. show(options2) {
  46475. this.tmpConfig = deepMerge$1(this.config, options2);
  46476. this.clearTimer();
  46477. this.isShow = true;
  46478. if (this.tmpConfig.duration !== -1) {
  46479. this.timer = setTimeout(() => {
  46480. this.clearTimer();
  46481. typeof this.tmpConfig.complete === "function" && this.tmpConfig.complete();
  46482. }, this.tmpConfig.duration);
  46483. }
  46484. },
  46485. // 隐藏toast组件,由父组件通过this.$refs.xxx.hide()形式调用
  46486. hide() {
  46487. this.clearTimer();
  46488. },
  46489. clearTimer() {
  46490. this.isShow = false;
  46491. clearTimeout(this.timer);
  46492. this.timer = null;
  46493. }
  46494. },
  46495. beforeUnmount() {
  46496. this.clearTimer();
  46497. }
  46498. };
  46499. function _sfc_render$e(_ctx, _cache, $props, $setup, $data, $options) {
  46500. const _component_u_loading_icon = resolveEasycom(vue.resolveDynamicComponent("u-loading-icon"), __easycom_0$e);
  46501. const _component_up_icon = vue.resolveComponent("up-icon");
  46502. const _component_u_gap = resolveEasycom(vue.resolveDynamicComponent("u-gap"), __easycom_1$3);
  46503. const _component_u_overlay = resolveEasycom(vue.resolveDynamicComponent("u-overlay"), __easycom_0$d);
  46504. return vue.openBlock(), vue.createElementBlock("view", { class: "u-toast" }, [
  46505. vue.createVNode(_component_u_overlay, {
  46506. show: $data.isShow,
  46507. zIndex: $data.tmpConfig.overlay ? $data.tmpConfig.zIndex : -1,
  46508. "custom-style": $options.overlayStyle
  46509. }, {
  46510. default: vue.withCtx(() => [
  46511. vue.createElementVNode(
  46512. "view",
  46513. {
  46514. class: vue.normalizeClass(["u-toast__content", ["u-type-" + $data.tmpConfig.type, $data.tmpConfig.type === "loading" || $data.tmpConfig.loading ? "u-toast__content--loading" : ""]]),
  46515. style: vue.normalizeStyle([$options.contentStyle])
  46516. },
  46517. [
  46518. $data.tmpConfig.type === "loading" ? (vue.openBlock(), vue.createBlock(_component_u_loading_icon, {
  46519. key: 0,
  46520. mode: "circle",
  46521. color: "rgb(255, 255, 255)",
  46522. inactiveColor: "rgb(120, 120, 120)",
  46523. size: "25"
  46524. })) : $data.tmpConfig.type !== "defalut" && $options.iconName ? (vue.openBlock(), vue.createBlock(_component_up_icon, {
  46525. key: 1,
  46526. name: $options.iconName,
  46527. size: "17",
  46528. color: $data.tmpConfig.type,
  46529. customStyle: $options.iconStyle
  46530. }, null, 8, ["name", "color", "customStyle"])) : vue.createCommentVNode("v-if", true),
  46531. $data.tmpConfig.type === "loading" || $data.tmpConfig.loading ? (vue.openBlock(), vue.createBlock(_component_u_gap, {
  46532. key: 2,
  46533. height: "12",
  46534. bgColor: "transparent"
  46535. })) : vue.createCommentVNode("v-if", true),
  46536. vue.createElementVNode(
  46537. "text",
  46538. {
  46539. class: vue.normalizeClass(["u-toast__content__text", ["u-toast__content__text--" + $data.tmpConfig.type]]),
  46540. style: { "max-width": "400rpx" }
  46541. },
  46542. vue.toDisplayString($data.tmpConfig.message),
  46543. 3
  46544. /* TEXT, CLASS */
  46545. )
  46546. ],
  46547. 6
  46548. /* CLASS, STYLE */
  46549. )
  46550. ]),
  46551. _: 1
  46552. /* STABLE */
  46553. }, 8, ["show", "zIndex", "custom-style"])
  46554. ]);
  46555. }
  46556. const uToast = /* @__PURE__ */ _export_sfc(_sfc_main$f, [["render", _sfc_render$e], ["__scopeId", "data-v-e61e8fb9"], ["__file", "C:/Users/EDY/Desktop/项目/shuibei/uni_modules/uview-plus/components/u-toast/u-toast.vue"]]);
  46557. const __vite_glob_0_120 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
  46558. __proto__: null,
  46559. default: uToast
  46560. }, Symbol.toStringTag, { value: "Module" }));
  46561. const props$2 = defineMixin({
  46562. props: {
  46563. // 需要显示的提示文字
  46564. text: {
  46565. type: [String, Number],
  46566. default: () => props$1x.tooltip.text
  46567. },
  46568. // 点击复制按钮时,复制的文本,为空则使用text值
  46569. copyText: {
  46570. type: [String, Number],
  46571. default: () => props$1x.tooltip.copyText
  46572. },
  46573. // 文本大小
  46574. size: {
  46575. type: [String, Number],
  46576. default: () => props$1x.tooltip.size
  46577. },
  46578. // 字体颜色
  46579. color: {
  46580. type: String,
  46581. default: () => props$1x.tooltip.color
  46582. },
  46583. // 弹出提示框时,文本的背景色
  46584. bgColor: {
  46585. type: String,
  46586. default: () => props$1x.tooltip.bgColor
  46587. },
  46588. // 弹出提示框的背景色
  46589. popupBgColor: {
  46590. type: String,
  46591. default: () => props$1x.tooltip.popupBgColor
  46592. },
  46593. // 弹出提示的方向,top-上方,bottom-下方,left-左方,right-右方
  46594. direction: {
  46595. type: String,
  46596. default: () => props$1x.tooltip.direction
  46597. },
  46598. // 弹出提示的z-index,nvue无效
  46599. zIndex: {
  46600. type: [String, Number],
  46601. default: () => props$1x.tooltip.zIndex
  46602. },
  46603. // 是否显示复制按钮
  46604. showCopy: {
  46605. type: Boolean,
  46606. default: () => props$1x.tooltip.showCopy
  46607. },
  46608. // 扩展的按钮组
  46609. buttons: {
  46610. type: Array,
  46611. default: () => props$1x.tooltip.buttons
  46612. },
  46613. // 是否显示透明遮罩以防止触摸穿透
  46614. overlay: {
  46615. type: Boolean,
  46616. default: () => props$1x.tooltip.overlay
  46617. },
  46618. // 是否显示复制成功或者失败的toast
  46619. showToast: {
  46620. type: Boolean,
  46621. default: () => props$1x.tooltip.showToast
  46622. },
  46623. // 触发方式,可选值:longpress/click
  46624. triggerMode: {
  46625. type: String,
  46626. default: () => props$1x.tooltip.triggerMode
  46627. }
  46628. }
  46629. });
  46630. const _sfc_main$e = {
  46631. name: "u-tooltip",
  46632. mixins: [mpMixin, mixin, props$2],
  46633. data() {
  46634. return {
  46635. // 是否展示气泡
  46636. showTooltip: true,
  46637. // 生成唯一id,防止一个页面多个组件,造成干扰
  46638. textId: guid(),
  46639. tooltipId: guid(),
  46640. // 初始时甚至为很大的值,让其移到屏幕外面,为了计算元素的尺寸
  46641. tooltipTop: -1e4,
  46642. // 气泡的位置信息
  46643. tooltipInfo: {
  46644. width: 0,
  46645. left: 0
  46646. },
  46647. // 文本的位置信息
  46648. textInfo: {
  46649. width: 0,
  46650. left: 0
  46651. },
  46652. // 三角形指示器的样式
  46653. indicatorStyle: {},
  46654. // 气泡在可能超出屏幕边沿范围时,重新定位后,距离屏幕边沿的距离
  46655. screenGap: 12,
  46656. // 三角形指示器的宽高,由于对元素进行了角度旋转,精确计算指示器位置时,需要用到其尺寸信息
  46657. indicatorWidth: 14,
  46658. tooltipStyle: {}
  46659. };
  46660. },
  46661. watch: {
  46662. async propsChange() {
  46663. await this.getElRect();
  46664. this.getTooltipStyle();
  46665. }
  46666. },
  46667. computed: {
  46668. // 特别处理H5的复制,因为H5浏览器是自带系统复制功能的,在H5环境
  46669. // 当一些依赖参数变化时,需要重新计算气泡和指示器的位置信息
  46670. propsChange() {
  46671. return [this.text, this.buttons];
  46672. }
  46673. },
  46674. mounted() {
  46675. this.init();
  46676. },
  46677. emits: ["click"],
  46678. methods: {
  46679. addStyle,
  46680. addUnit,
  46681. async init() {
  46682. await this.getElRect();
  46683. this.getTooltipStyle();
  46684. },
  46685. // 计算气泡和指示器的位置信息
  46686. getTooltipStyle() {
  46687. const style = {}, sysInfo = getWindowInfo();
  46688. if (this.direction === "left") {
  46689. style.transform = ``;
  46690. style.top = "-" + addUnit((this.tooltipInfo.height - this.indicatorWidth) / 2, "px");
  46691. style.right = addUnit(this.textInfo.width + this.indicatorWidth, "px");
  46692. this.indicatorStyle = {};
  46693. this.indicatorStyle.right = "-4px";
  46694. this.indicatorStyle.top = addUnit((this.tooltipInfo.height - this.indicatorWidth) / 2, "px");
  46695. } else if (this.direction === "right") {
  46696. style.transform = ``;
  46697. style.top = addUnit((this.textInfo.height - this.tooltipInfo.height) / 2, "px");
  46698. style.left = addUnit(this.textInfo.width + this.indicatorWidth, "px");
  46699. this.indicatorStyle = {};
  46700. this.indicatorStyle.left = "-4px";
  46701. this.indicatorStyle.top = addUnit((this.textInfo.height - this.indicatorWidth) / 2, "px");
  46702. } else if (this.direction === "top" || this.direction === "bottom") {
  46703. style.transform = `translateY(${this.direction === "top" ? "-100%" : "100%"})`;
  46704. if (this.tooltipInfo.width / 2 > this.textInfo.left + this.textInfo.width / 2 - this.screenGap) {
  46705. this.indicatorStyle = {};
  46706. style.left = `-${addUnit(this.textInfo.left - this.screenGap)}`;
  46707. this.indicatorStyle.left = addUnit(this.textInfo.width / 2 - getPx(style.left) - this.indicatorWidth / 2, "px");
  46708. } else if (this.tooltipInfo.width / 2 > sysInfo.windowWidth - this.textInfo.right + this.textInfo.width / 2 - this.screenGap) {
  46709. this.indicatorStyle = {};
  46710. style.right = `-${addUnit(sysInfo.windowWidth - this.textInfo.right - this.screenGap)}`;
  46711. this.indicatorStyle.right = addUnit(this.textInfo.width / 2 - getPx(style.right) - this.indicatorWidth / 2);
  46712. } else {
  46713. const left = Math.abs(this.textInfo.width / 2 - this.tooltipInfo.width / 2);
  46714. style.left = this.textInfo.width > this.tooltipInfo.width ? addUnit(left) : -addUnit(left);
  46715. this.indicatorStyle = {};
  46716. }
  46717. if (this.direction === "top") {
  46718. style.marginTop = "-10px";
  46719. this.indicatorStyle.bottom = "-4px";
  46720. } else {
  46721. style.marginBottom = "-10px";
  46722. this.indicatorStyle.top = "-4px";
  46723. }
  46724. }
  46725. this.tooltipStyle = style;
  46726. return style;
  46727. },
  46728. // 点击触发事件
  46729. async clickHander() {
  46730. if (this.triggerMode == "click") {
  46731. this.tooltipTop = 0;
  46732. this.showTooltip = true;
  46733. }
  46734. },
  46735. // 长按触发事件
  46736. async longpressHandler() {
  46737. if (this.triggerMode == "longpress") {
  46738. this.tooltipTop = 0;
  46739. this.showTooltip = true;
  46740. }
  46741. },
  46742. // 点击透明遮罩
  46743. overlayClickHandler() {
  46744. this.showTooltip = false;
  46745. },
  46746. // 点击弹出按钮
  46747. btnClickHandler(index2) {
  46748. this.showTooltip = false;
  46749. this.$emit("click", this.showCopy ? index2 + 1 : index2);
  46750. },
  46751. // 查询内容高度
  46752. queryRect(ref) {
  46753. return new Promise((resolve) => {
  46754. this.$uGetRect(`#${ref}`).then((size) => {
  46755. resolve(size);
  46756. });
  46757. });
  46758. },
  46759. // 元素尺寸
  46760. getElRect() {
  46761. return new Promise(async (resolve) => {
  46762. this.showTooltip = true;
  46763. this.tooltipTop = -1e4;
  46764. sleep(500).then(async () => {
  46765. this.tooltipInfo = await this.queryRect(this.tooltipId);
  46766. this.showTooltip = false;
  46767. this.textInfo = await this.queryRect(this.textId);
  46768. resolve();
  46769. });
  46770. });
  46771. },
  46772. // 复制文本到粘贴板
  46773. setClipboardData() {
  46774. this.showTooltip = false;
  46775. this.$emit("click", 0);
  46776. uni.setClipboardData({
  46777. // 优先使用copyText字段,如果没有,则默认使用text字段当做复制的内容
  46778. data: this.copyText || this.text,
  46779. success: () => {
  46780. this.showToast && toast("复制成功");
  46781. },
  46782. fail: () => {
  46783. this.showToast && toast("复制失败");
  46784. },
  46785. complete: () => {
  46786. this.showTooltip = false;
  46787. }
  46788. });
  46789. }
  46790. }
  46791. };
  46792. function _sfc_render$d(_ctx, _cache, $props, $setup, $data, $options) {
  46793. const _component_u_overlay = resolveEasycom(vue.resolveDynamicComponent("u-overlay"), __easycom_0$d);
  46794. const _component_u_line = resolveEasycom(vue.resolveDynamicComponent("u-line"), __easycom_1$4);
  46795. const _component_u_transition = resolveEasycom(vue.resolveDynamicComponent("u-transition"), __easycom_2$1);
  46796. return vue.openBlock(), vue.createElementBlock(
  46797. "view",
  46798. {
  46799. class: "u-tooltip",
  46800. style: vue.normalizeStyle([$options.addStyle(_ctx.customStyle)])
  46801. },
  46802. [
  46803. vue.createVNode(_component_u_overlay, {
  46804. show: $data.showTooltip && $data.tooltipTop !== -1e4 && _ctx.overlay,
  46805. customStyle: "backgroundColor: rgba(0, 0, 0, 0)",
  46806. onClick: $options.overlayClickHandler
  46807. }, null, 8, ["show", "onClick"]),
  46808. vue.createElementVNode("view", { class: "u-tooltip__wrapper" }, [
  46809. vue.createElementVNode("view", {
  46810. class: "u-tooltip__trigger",
  46811. id: $data.textId,
  46812. ref: $data.textId,
  46813. onClick: _cache[0] || (_cache[0] = vue.withModifiers((...args) => $options.clickHander && $options.clickHander(...args), ["stop"])),
  46814. onLongpress: _cache[1] || (_cache[1] = vue.withModifiers((...args) => $options.longpressHandler && $options.longpressHandler(...args), ["stop"]))
  46815. }, [
  46816. vue.renderSlot(_ctx.$slots, "trigger", {}, void 0, true),
  46817. !_ctx.$slots["trigger"] ? (vue.openBlock(), vue.createElementBlock(
  46818. "text",
  46819. {
  46820. key: 0,
  46821. class: "u-tooltip__wrapper__text",
  46822. userSelect: false,
  46823. selectable: false,
  46824. style: vue.normalizeStyle({
  46825. color: _ctx.color,
  46826. backgroundColor: _ctx.bgColor && $data.showTooltip && $data.tooltipTop !== -1e4 ? _ctx.bgColor : "transparent"
  46827. })
  46828. },
  46829. vue.toDisplayString(_ctx.text),
  46830. 5
  46831. /* TEXT, STYLE */
  46832. )) : vue.createCommentVNode("v-if", true)
  46833. ], 40, ["id"]),
  46834. vue.createVNode(_component_u_transition, {
  46835. mode: "fade",
  46836. show: $data.showTooltip,
  46837. duration: "300",
  46838. customStyle: {
  46839. position: "absolute",
  46840. top: $options.addUnit($data.tooltipTop),
  46841. zIndex: _ctx.zIndex,
  46842. ...$data.tooltipStyle
  46843. }
  46844. }, {
  46845. default: vue.withCtx(() => [
  46846. vue.createElementVNode("view", {
  46847. class: "u-tooltip__wrapper__popup",
  46848. id: $data.tooltipId,
  46849. ref: $data.tooltipId
  46850. }, [
  46851. _ctx.showCopy || _ctx.buttons.length ? (vue.openBlock(), vue.createElementBlock(
  46852. "view",
  46853. {
  46854. key: 0,
  46855. class: "u-tooltip__wrapper__popup__indicator",
  46856. "hover-class": "u-tooltip__wrapper__popup__indicator--hover",
  46857. style: vue.normalizeStyle([$data.indicatorStyle, {
  46858. width: $options.addUnit($data.indicatorWidth),
  46859. height: $options.addUnit($data.indicatorWidth),
  46860. backgroundColor: _ctx.popupBgColor
  46861. }])
  46862. },
  46863. [
  46864. vue.createCommentVNode(" 由于nvue不支持三角形绘制,这里就做一个四方形,再旋转45deg,得到露出的一个三角 ")
  46865. ],
  46866. 4
  46867. /* STYLE */
  46868. )) : vue.createCommentVNode("v-if", true),
  46869. vue.createElementVNode(
  46870. "view",
  46871. {
  46872. class: "u-tooltip__wrapper__popup__list",
  46873. style: vue.normalizeStyle({
  46874. backgroundColor: _ctx.popupBgColor,
  46875. color: _ctx.color
  46876. })
  46877. },
  46878. [
  46879. vue.renderSlot(_ctx.$slots, "content", {}, void 0, true),
  46880. !_ctx.$slots["content"] ? (vue.openBlock(), vue.createElementBlock(
  46881. vue.Fragment,
  46882. { key: 0 },
  46883. [
  46884. _ctx.showCopy ? (vue.openBlock(), vue.createElementBlock(
  46885. "view",
  46886. {
  46887. key: 0,
  46888. class: "u-tooltip__wrapper__popup__list__btn",
  46889. "hover-class": "u-tooltip__wrapper__popup__list__btn--hover",
  46890. style: vue.normalizeStyle({ backgroundColor: _ctx.popupBgColor }),
  46891. onClick: _cache[2] || (_cache[2] = (...args) => $options.setClipboardData && $options.setClipboardData(...args))
  46892. },
  46893. [
  46894. vue.createElementVNode("text", { class: "u-tooltip__wrapper__popup__list__btn__text" }, "复制")
  46895. ],
  46896. 4
  46897. /* STYLE */
  46898. )) : vue.createCommentVNode("v-if", true),
  46899. _ctx.showCopy && _ctx.buttons.length > 0 ? (vue.openBlock(), vue.createBlock(_component_u_line, {
  46900. key: 1,
  46901. direction: "column",
  46902. color: "#8d8e90",
  46903. length: "18"
  46904. })) : vue.createCommentVNode("v-if", true),
  46905. (vue.openBlock(true), vue.createElementBlock(
  46906. vue.Fragment,
  46907. null,
  46908. vue.renderList(_ctx.buttons, (item, index2) => {
  46909. return vue.openBlock(), vue.createElementBlock(
  46910. vue.Fragment,
  46911. { key: index2 },
  46912. [
  46913. vue.createElementVNode("view", {
  46914. class: "u-tooltip__wrapper__popup__list__btn",
  46915. "hover-class": "u-tooltip__wrapper__popup__list__btn--hover"
  46916. }, [
  46917. vue.createElementVNode("text", {
  46918. class: "u-tooltip__wrapper__popup__list__btn__text",
  46919. onClick: ($event) => $options.btnClickHandler(index2)
  46920. }, vue.toDisplayString(item), 9, ["onClick"])
  46921. ]),
  46922. index2 < _ctx.buttons.length - 1 ? (vue.openBlock(), vue.createBlock(_component_u_line, {
  46923. key: 0,
  46924. direction: "column",
  46925. color: "#8d8e90",
  46926. length: "18"
  46927. })) : vue.createCommentVNode("v-if", true)
  46928. ],
  46929. 64
  46930. /* STABLE_FRAGMENT */
  46931. );
  46932. }),
  46933. 128
  46934. /* KEYED_FRAGMENT */
  46935. ))
  46936. ],
  46937. 64
  46938. /* STABLE_FRAGMENT */
  46939. )) : vue.createCommentVNode("v-if", true)
  46940. ],
  46941. 4
  46942. /* STYLE */
  46943. )
  46944. ], 8, ["id"])
  46945. ]),
  46946. _: 3
  46947. /* FORWARDED */
  46948. }, 8, ["show", "customStyle"])
  46949. ])
  46950. ],
  46951. 4
  46952. /* STYLE */
  46953. );
  46954. }
  46955. const uTooltip = /* @__PURE__ */ _export_sfc(_sfc_main$e, [["render", _sfc_render$d], ["__scopeId", "data-v-92dedddb"], ["__file", "C:/Users/EDY/Desktop/项目/shuibei/uni_modules/uview-plus/components/u-tooltip/u-tooltip.vue"]]);
  46956. const __vite_glob_0_122 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
  46957. __proto__: null,
  46958. default: uTooltip
  46959. }, Symbol.toStringTag, { value: "Module" }));
  46960. const props$1 = defineMixin({
  46961. props: {}
  46962. });
  46963. const _sfc_main$d = {
  46964. name: "u-tr",
  46965. mixins: [mpMixin, mixin, props$1],
  46966. data() {
  46967. return {};
  46968. }
  46969. };
  46970. function _sfc_render$c(_ctx, _cache, $props, $setup, $data, $options) {
  46971. return vue.openBlock(), vue.createElementBlock("view", { class: "u-tr" }, [
  46972. vue.renderSlot(_ctx.$slots, "default", {}, void 0, true)
  46973. ]);
  46974. }
  46975. const uTr = /* @__PURE__ */ _export_sfc(_sfc_main$d, [["render", _sfc_render$c], ["__scopeId", "data-v-1c6ea6f9"], ["__file", "C:/Users/EDY/Desktop/项目/shuibei/uni_modules/uview-plus/components/u-tr/u-tr.vue"]]);
  46976. const __vite_glob_0_123 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
  46977. __proto__: null,
  46978. default: uTr
  46979. }, Symbol.toStringTag, { value: "Module" }));
  46980. const _sfc_main$c = {
  46981. name: "tree-node",
  46982. props: {
  46983. node: {
  46984. type: Object,
  46985. required: true
  46986. },
  46987. props: {
  46988. type: Object,
  46989. required: true
  46990. },
  46991. showCheckbox: {
  46992. type: Boolean,
  46993. default: false
  46994. },
  46995. checkStrictly: {
  46996. type: Boolean,
  46997. default: false
  46998. },
  46999. expandOnClickNode: {
  47000. type: Boolean,
  47001. default: true
  47002. },
  47003. depth: {
  47004. type: Number,
  47005. default: 0
  47006. }
  47007. },
  47008. computed: {
  47009. hasChildren() {
  47010. return this.node[this.props.children] && this.node[this.props.children].length > 0;
  47011. },
  47012. isExpanded() {
  47013. return this.node.expanded === void 0 ? false : this.node.expanded;
  47014. }
  47015. },
  47016. emits: ["node-click", "check-change"],
  47017. methods: {
  47018. toggle() {
  47019. if (this.expandOnClickNode && this.hasChildren) {
  47020. this.node.expanded = !this.node.expanded;
  47021. }
  47022. this.$emit("node-click", this.node);
  47023. },
  47024. toggleCheck(checked) {
  47025. this.node.checked = checked;
  47026. if (!this.checkStrictly) {
  47027. this.updateChildCheckStatus(this.node, checked);
  47028. this.updateParentCheckStatus(this.node);
  47029. }
  47030. this.$emit("check-change", this.node);
  47031. },
  47032. updateChildCheckStatus(node2, checked) {
  47033. if (node2[this.props.children]) {
  47034. node2[this.props.children].forEach((child) => {
  47035. child.checked = checked;
  47036. this.updateChildCheckStatus(child, checked);
  47037. });
  47038. }
  47039. },
  47040. updateParentCheckStatus(node2) {
  47041. let parent = this.$parent;
  47042. while (parent && parent.node) {
  47043. const allChecked = parent.node[this.props.children].every(
  47044. (child) => child.checked
  47045. );
  47046. parent.node.checked = allChecked;
  47047. parent = parent.$parent;
  47048. }
  47049. }
  47050. }
  47051. };
  47052. function _sfc_render$b(_ctx, _cache, $props, $setup, $data, $options) {
  47053. const _component_up_icon = vue.resolveComponent("up-icon");
  47054. const _component_up_checkbox = vue.resolveComponent("up-checkbox");
  47055. const _component_tree_node = vue.resolveComponent("tree-node", true);
  47056. return vue.openBlock(), vue.createElementBlock(
  47057. "view",
  47058. {
  47059. class: "u-tree-node",
  47060. style: vue.normalizeStyle({ paddingLeft: $props.depth * 20 + "px" })
  47061. },
  47062. [
  47063. vue.createElementVNode("view", {
  47064. class: "u-tree-node-content",
  47065. onClick: _cache[0] || (_cache[0] = (...args) => $options.toggle && $options.toggle(...args))
  47066. }, [
  47067. vue.createCommentVNode(` <text v-if="hasChildren" class="u-tree-node-toggle">
  47068. {{ node.expanded ? '▼' : '▶' }}
  47069. </text> `),
  47070. $options.hasChildren ? (vue.openBlock(), vue.createBlock(_component_up_icon, {
  47071. key: 0,
  47072. class: "u-tree-node-toggle",
  47073. name: $props.node.expanded ? "arrow-down-fill" : "play-right-fill",
  47074. size: "12"
  47075. }, null, 8, ["name"])) : vue.createCommentVNode("v-if", true),
  47076. $props.showCheckbox ? (vue.openBlock(), vue.createBlock(_component_up_checkbox, {
  47077. key: 1,
  47078. usedAlone: "",
  47079. size: 12,
  47080. checked: $props.node.checked,
  47081. onChange: $options.toggleCheck,
  47082. style: { "margin-right": "10px" }
  47083. }, null, 8, ["checked", "onChange"])) : vue.createCommentVNode("v-if", true),
  47084. vue.renderSlot(_ctx.$slots, "default", {
  47085. nodeData: $props.node,
  47086. level: $props.depth + 1
  47087. }, () => [
  47088. vue.createTextVNode(
  47089. vue.toDisplayString($props.node[$props.props.label]),
  47090. 1
  47091. /* TEXT */
  47092. )
  47093. ], true)
  47094. ]),
  47095. $options.hasChildren && ($props.node.expanded === void 0 ? true : $props.node.expanded) ? (vue.openBlock(), vue.createElementBlock(
  47096. "view",
  47097. {
  47098. key: 0,
  47099. class: "u-tree-node-children",
  47100. style: vue.normalizeStyle({ paddingLeft: ($props.depth + 1) * 20 + "px" })
  47101. },
  47102. [
  47103. (vue.openBlock(true), vue.createElementBlock(
  47104. vue.Fragment,
  47105. null,
  47106. vue.renderList($props.node[$props.props.children], (child) => {
  47107. return vue.openBlock(), vue.createBlock(_component_tree_node, {
  47108. key: child[$props.props.nodeKey],
  47109. node: child,
  47110. props: $props.props,
  47111. "show-checkbox": $props.showCheckbox,
  47112. "check-strictly": $props.checkStrictly,
  47113. "expand-on-click-node": $props.expandOnClickNode,
  47114. depth: $props.depth + 1,
  47115. onNodeClick: _cache[1] || (_cache[1] = ($event) => _ctx.$emit("node-click", $event)),
  47116. onCheckChange: _cache[2] || (_cache[2] = ($event) => _ctx.$emit("check-change", $event))
  47117. }, {
  47118. default: vue.withCtx(({ nodeData, level }) => [
  47119. vue.renderSlot(_ctx.$slots, "default", {
  47120. nodeData,
  47121. level
  47122. }, void 0, true)
  47123. ]),
  47124. _: 2
  47125. /* DYNAMIC */
  47126. }, 1032, ["node", "props", "show-checkbox", "check-strictly", "expand-on-click-node", "depth"]);
  47127. }),
  47128. 128
  47129. /* KEYED_FRAGMENT */
  47130. ))
  47131. ],
  47132. 4
  47133. /* STYLE */
  47134. )) : vue.createCommentVNode("v-if", true)
  47135. ],
  47136. 4
  47137. /* STYLE */
  47138. );
  47139. }
  47140. const TreeNode = /* @__PURE__ */ _export_sfc(_sfc_main$c, [["render", _sfc_render$b], ["__scopeId", "data-v-469fe828"], ["__file", "C:/Users/EDY/Desktop/项目/shuibei/uni_modules/uview-plus/components/u-tree/tree-node.vue"]]);
  47141. const _sfc_main$b = {
  47142. name: "u-tree",
  47143. components: { TreeNode },
  47144. props: {
  47145. data: {
  47146. type: Array,
  47147. required: true
  47148. },
  47149. props: {
  47150. type: Object,
  47151. default: () => ({
  47152. label: "label",
  47153. children: "children",
  47154. nodeKey: "id"
  47155. })
  47156. },
  47157. showCheckbox: {
  47158. type: Boolean,
  47159. default: false
  47160. },
  47161. defaultExpandAll: {
  47162. type: Boolean,
  47163. default: false
  47164. },
  47165. expandOnClickNode: {
  47166. type: Boolean,
  47167. default: true
  47168. },
  47169. checkStrictly: {
  47170. type: Boolean,
  47171. default: false
  47172. }
  47173. },
  47174. data() {
  47175. return {
  47176. treeData: []
  47177. };
  47178. },
  47179. created() {
  47180. this.initTree();
  47181. },
  47182. watch: {
  47183. data: {
  47184. handler(newVal) {
  47185. this.treeData = JSON.parse(JSON.stringify(newVal));
  47186. this.initExpandedState(this.treeData, this.defaultExpandAll);
  47187. },
  47188. deep: true,
  47189. immediate: true
  47190. }
  47191. },
  47192. emits: ["node-click", "check-change"],
  47193. methods: {
  47194. initTree() {
  47195. this.treeData = JSON.parse(JSON.stringify(this.data));
  47196. this.initExpandedState(this.treeData, this.defaultExpandAll);
  47197. },
  47198. initExpandedState(nodes, expanded) {
  47199. nodes.forEach((node2) => {
  47200. node2.expanded = expanded;
  47201. if (node2[this.props.children]) {
  47202. this.initExpandedState(node2[this.props.children], expanded);
  47203. }
  47204. });
  47205. },
  47206. handleNodeClick(node2) {
  47207. this.$emit("node-click", node2);
  47208. },
  47209. /**
  47210. * 直接递归 treeData 获取所有 checked 的节点
  47211. */
  47212. getCheckedNodes() {
  47213. const traverse = (nodes) => {
  47214. let result = [];
  47215. nodes.forEach((node2) => {
  47216. if (node2.checked) {
  47217. result.push(node2);
  47218. }
  47219. if (node2[this.props.children] && node2[this.props.children].length > 0) {
  47220. result = result.concat(traverse(node2[this.props.children]));
  47221. }
  47222. });
  47223. return result;
  47224. };
  47225. return traverse(this.treeData);
  47226. }
  47227. }
  47228. };
  47229. function _sfc_render$a(_ctx, _cache, $props, $setup, $data, $options) {
  47230. const _component_tree_node = vue.resolveComponent("tree-node");
  47231. return vue.openBlock(), vue.createElementBlock("view", { class: "u-tree" }, [
  47232. (vue.openBlock(true), vue.createElementBlock(
  47233. vue.Fragment,
  47234. null,
  47235. vue.renderList($data.treeData, (node2) => {
  47236. return vue.openBlock(), vue.createBlock(_component_tree_node, {
  47237. key: node2[$props.props.nodeKey],
  47238. node: node2,
  47239. props: $props.props,
  47240. "show-checkbox": $props.showCheckbox,
  47241. "check-strictly": $props.checkStrictly,
  47242. "expand-on-click-node": $props.expandOnClickNode,
  47243. onNodeClick: $options.handleNodeClick,
  47244. onCheckChange: _cache[0] || (_cache[0] = ($event) => _ctx.$emit("check-change", $event))
  47245. }, {
  47246. default: vue.withCtx(({ nodeData, level }) => [
  47247. vue.renderSlot(_ctx.$slots, "default", {
  47248. node: nodeData,
  47249. level
  47250. }, void 0, true)
  47251. ]),
  47252. _: 2
  47253. /* DYNAMIC */
  47254. }, 1032, ["node", "props", "show-checkbox", "check-strictly", "expand-on-click-node", "onNodeClick"]);
  47255. }),
  47256. 128
  47257. /* KEYED_FRAGMENT */
  47258. ))
  47259. ]);
  47260. }
  47261. const uTree = /* @__PURE__ */ _export_sfc(_sfc_main$b, [["render", _sfc_render$a], ["__scopeId", "data-v-35158cdb"], ["__file", "C:/Users/EDY/Desktop/项目/shuibei/uni_modules/uview-plus/components/u-tree/u-tree.vue"]]);
  47262. const __vite_glob_0_125 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
  47263. __proto__: null,
  47264. default: uTree
  47265. }, Symbol.toStringTag, { value: "Module" }));
  47266. function pickExclude(obj, keys) {
  47267. if (!["[object Object]", "[object File]"].includes(Object.prototype.toString.call(obj))) {
  47268. return {};
  47269. }
  47270. return Object.keys(obj).reduce((prev, key) => {
  47271. if (!keys.includes(key)) {
  47272. prev[key] = obj[key];
  47273. }
  47274. return prev;
  47275. }, {});
  47276. }
  47277. function formatImage(res) {
  47278. return res.tempFiles.map((item) => ({
  47279. ...pickExclude(item, ["path"]),
  47280. type: "image",
  47281. url: item.path,
  47282. thumb: item.path,
  47283. size: item.size,
  47284. name: item.path.split("/").pop() + ".png"
  47285. }));
  47286. }
  47287. function formatVideo(res) {
  47288. return [
  47289. {
  47290. ...pickExclude(res, ["tempFilePath", "thumbTempFilePath", "errMsg"]),
  47291. type: "video",
  47292. url: res.tempFilePath,
  47293. thumb: res.thumbTempFilePath,
  47294. size: res.size,
  47295. width: res.width || 0,
  47296. // APP 2.1.0+、H5、微信小程序、京东小程序
  47297. height: res.height || 0,
  47298. // APP 2.1.0+、H5、微信小程序、京东小程序
  47299. name: res.tempFilePath.split("/").pop() + ".mp4"
  47300. }
  47301. ];
  47302. }
  47303. function chooseFile({
  47304. accept,
  47305. multiple,
  47306. capture,
  47307. compressed,
  47308. maxDuration,
  47309. sizeType,
  47310. camera,
  47311. maxCount,
  47312. extension
  47313. }) {
  47314. try {
  47315. capture = test.array(capture) ? capture : capture.split(",");
  47316. } catch (e2) {
  47317. capture = [];
  47318. }
  47319. return new Promise((resolve, reject) => {
  47320. switch (accept) {
  47321. case "image":
  47322. uni.chooseImage({
  47323. count: multiple ? Math.min(maxCount, 9) : 1,
  47324. sourceType: capture,
  47325. sizeType,
  47326. success: (res) => resolve(formatImage(res)),
  47327. fail: reject
  47328. });
  47329. break;
  47330. case "video":
  47331. uni.chooseVideo({
  47332. sourceType: capture,
  47333. compressed,
  47334. maxDuration,
  47335. camera,
  47336. success: (res) => resolve(formatVideo(res)),
  47337. fail: reject
  47338. });
  47339. break;
  47340. }
  47341. });
  47342. }
  47343. const mixinUpload = {
  47344. watch: {
  47345. // 监听accept的变化,判断是否符合个平台要求
  47346. // 只有微信小程序才支持选择媒体,文件类型,所以这里做一个判断提示
  47347. accept: {
  47348. immediate: true,
  47349. handler(val) {
  47350. if (val === "all" || val === "media") {
  47351. error("只有微信小程序才支持把accept配置为all、media之一");
  47352. }
  47353. if (val === "file") {
  47354. error("只有微信小程序和H5(HX2.9.9)才支持把accept配置为file");
  47355. }
  47356. }
  47357. }
  47358. }
  47359. };
  47360. const props = defineMixin({
  47361. props: {
  47362. // 接受的文件类型, 可选值为all media image file video
  47363. accept: {
  47364. type: String,
  47365. default: () => props$1x.upload.accept
  47366. },
  47367. extension: {
  47368. type: Array,
  47369. default: () => props$1x.upload.extension
  47370. },
  47371. // 图片或视频拾取模式,当accept为image类型时设置capture可选额外camera可以直接调起摄像头
  47372. capture: {
  47373. type: [String, Array],
  47374. default: () => props$1x.upload.capture
  47375. },
  47376. // 当accept为video时生效,是否压缩视频,默认为true
  47377. compressed: {
  47378. type: Boolean,
  47379. default: () => props$1x.upload.compressed
  47380. },
  47381. // 当accept为video时生效,可选值为back或front
  47382. camera: {
  47383. type: String,
  47384. default: () => props$1x.upload.camera
  47385. },
  47386. // 当accept为video时生效,拍摄视频最长拍摄时间,单位秒
  47387. maxDuration: {
  47388. type: Number,
  47389. default: () => props$1x.upload.maxDuration
  47390. },
  47391. // 上传区域的图标,只能内置图标
  47392. uploadIcon: {
  47393. type: String,
  47394. default: () => props$1x.upload.uploadIcon
  47395. },
  47396. // 上传区域的图标的颜色,默认
  47397. uploadIconColor: {
  47398. type: String,
  47399. default: () => props$1x.upload.uploadIconColor
  47400. },
  47401. // 是否开启文件读取前事件
  47402. useBeforeRead: {
  47403. type: Boolean,
  47404. default: () => props$1x.upload.useBeforeRead
  47405. },
  47406. // 读取后的处理函数
  47407. afterRead: {
  47408. type: Function,
  47409. default: null
  47410. },
  47411. // 读取前的处理函数
  47412. beforeRead: {
  47413. type: Function,
  47414. default: null
  47415. },
  47416. // 是否显示组件自带的图片&视频预览功能
  47417. previewFullImage: {
  47418. type: Boolean,
  47419. default: () => props$1x.upload.previewFullImage
  47420. },
  47421. // 最大上传数量
  47422. maxCount: {
  47423. type: [String, Number],
  47424. default: () => props$1x.upload.maxCount
  47425. },
  47426. // 是否启用
  47427. disabled: {
  47428. type: Boolean,
  47429. default: () => props$1x.upload.disabled
  47430. },
  47431. // 预览上传的图片时的裁剪模式,和image组件mode属性一致
  47432. imageMode: {
  47433. type: String,
  47434. default: () => props$1x.upload.imageMode
  47435. },
  47436. // 标识符,可以在回调函数的第二项参数中获取
  47437. name: {
  47438. type: String,
  47439. default: () => props$1x.upload.name
  47440. },
  47441. // 所选的图片的尺寸, 可选值为original compressed
  47442. sizeType: {
  47443. type: Array,
  47444. default: () => props$1x.upload.sizeType
  47445. },
  47446. // 是否开启图片多选,部分安卓机型不支持
  47447. multiple: {
  47448. type: Boolean,
  47449. default: () => props$1x.upload.multiple
  47450. },
  47451. // 是否展示删除按钮
  47452. deletable: {
  47453. type: Boolean,
  47454. default: () => props$1x.upload.deletable
  47455. },
  47456. // 文件大小限制,单位为byte
  47457. maxSize: {
  47458. type: [String, Number],
  47459. default: () => props$1x.upload.maxSize
  47460. },
  47461. // 显示已上传的文件列表
  47462. fileList: {
  47463. type: Array,
  47464. default: () => props$1x.upload.fileList
  47465. },
  47466. // 上传区域的提示文字
  47467. uploadText: {
  47468. type: String,
  47469. default: () => props$1x.upload.uploadText
  47470. },
  47471. // 内部预览图片区域和选择图片按钮的区域宽度
  47472. width: {
  47473. type: [String, Number],
  47474. default: () => props$1x.upload.width
  47475. },
  47476. // 内部预览图片区域和选择图片按钮的区域高度
  47477. height: {
  47478. type: [String, Number],
  47479. default: () => props$1x.upload.height
  47480. },
  47481. // 是否在上传完成后展示预览图
  47482. previewImage: {
  47483. type: Boolean,
  47484. default: () => props$1x.upload.previewImage
  47485. },
  47486. // 是否自动删除
  47487. autoDelete: {
  47488. type: Boolean,
  47489. default: () => props$1x.upload.autoDelete
  47490. },
  47491. // 是否自动上传需要传递action指定地址
  47492. autoUpload: {
  47493. type: Boolean,
  47494. default: () => props$1x.upload.autoUpload
  47495. },
  47496. // 自动上传接口地址
  47497. autoUploadApi: {
  47498. type: String,
  47499. default: () => props$1x.upload.autoUploadApi
  47500. },
  47501. // 自动上传驱动,local/oss/cos/kodo
  47502. autoUploadDriver: {
  47503. type: String,
  47504. default: () => props$1x.upload.autoUploadDriver
  47505. },
  47506. // 自动上传授权接口,比如oss的签名接口。
  47507. autoUploadAuthUrl: {
  47508. type: String,
  47509. default: () => props$1x.upload.autoUploadAuthUrl
  47510. },
  47511. // 自动上传携带的header
  47512. autoUploadHeader: {
  47513. type: Object,
  47514. default: () => {
  47515. return props$1x.upload.autoUploadHeader;
  47516. }
  47517. },
  47518. // 本地计算视频封面
  47519. getVideoThumb: {
  47520. type: Boolean,
  47521. default: () => props$1x.upload.getVideoThumb
  47522. },
  47523. // 自定义自动上传后处理
  47524. customAfterAutoUpload: {
  47525. type: Boolean,
  47526. default: () => props$1x.upload.customAfterAutoUpload
  47527. },
  47528. videoPreviewObjectFit: {
  47529. type: String,
  47530. default: () => props$1x.upload.videoPreviewObjectFit
  47531. }
  47532. }
  47533. });
  47534. const _sfc_main$a = {
  47535. name: "u-upload",
  47536. mixins: [mpMixin, mixin, mixinUpload, props],
  47537. data() {
  47538. return {
  47539. lists: [],
  47540. isInCount: true,
  47541. popupShow: false,
  47542. currentItemIndex: -1
  47543. };
  47544. },
  47545. watch: {
  47546. // 监听文件列表的变化,重新整理内部数据
  47547. fileList: {
  47548. handler() {
  47549. this.formatFileList();
  47550. },
  47551. immediate: true,
  47552. deep: true
  47553. },
  47554. deletable(newVal) {
  47555. this.formatFileList();
  47556. },
  47557. maxCount(newVal) {
  47558. this.formatFileList();
  47559. },
  47560. accept(newVal) {
  47561. this.formatFileList();
  47562. },
  47563. popupShow(newVal) {
  47564. if (!newVal) {
  47565. this.currentItemIndex = -1;
  47566. }
  47567. }
  47568. },
  47569. emits: ["error", "beforeRead", "oversize", "afterRead", "delete", "clickPreview", "update:fileList", "afterAutoUpload"],
  47570. methods: {
  47571. t: t$1,
  47572. addUnit,
  47573. addStyle,
  47574. videoErrorCallback() {
  47575. },
  47576. loadedVideoMetadata(e2) {
  47577. if (this.currentItemIndex < 0) {
  47578. return;
  47579. }
  47580. if (this.autoUploadDriver != "local") {
  47581. return;
  47582. }
  47583. if (!this.getVideoThumb) {
  47584. return;
  47585. }
  47586. let w2 = this.lists[this.currentItemIndex].width;
  47587. let h2 = this.lists[this.currentItemIndex].height;
  47588. const dpr = uni.getSystemInfoSync().pixelRatio;
  47589. uni.createSelectorQuery().select("#myVideo").context((res) => {
  47590. formatAppLog("log", "at uni_modules/uview-plus/components/u-upload/u-upload.vue:293", "select video", res);
  47591. const myVideo = res.context;
  47592. uni.createSelectorQuery().select("#myCanvas").fields({ node: true, size: true }).exec(([res2]) => {
  47593. formatAppLog("log", "at uni_modules/uview-plus/components/u-upload/u-upload.vue:299", "select canvas", res2);
  47594. const ctx1 = res2[0].node.getContext("2d");
  47595. res2[0].node.width = w2 * dpr;
  47596. res2[0].node.height = h2 * dpr;
  47597. setTimeout(() => {
  47598. captureFirstFrame();
  47599. }, 500);
  47600. const captureFirstFrame = () => {
  47601. ctx1.drawImage(myVideo, 0, 0, w2 * dpr, h2 * dpr);
  47602. wx.canvasToTempFilePath({
  47603. canvas: res2[0].node,
  47604. success: (result) => {
  47605. formatAppLog("log", "at uni_modules/uview-plus/components/u-upload/u-upload.vue:314", "First frame image path:", result.tempFilePath);
  47606. this.fileList["currentItemIndex"].thumb = result.tempFilePath;
  47607. },
  47608. fail: (err) => {
  47609. formatAppLog("error", "at uni_modules/uview-plus/components/u-upload/u-upload.vue:320", "Failed to export image:", err);
  47610. }
  47611. });
  47612. };
  47613. setInterval(() => {
  47614. ctx1.drawImage(myVideo, 0, 0, w2 * dpr, h2 * dpr);
  47615. }, 1e3 / 24);
  47616. }).exec();
  47617. }).exec();
  47618. },
  47619. formatFileList() {
  47620. const {
  47621. fileList = [],
  47622. maxCount
  47623. } = this;
  47624. const lists = fileList.map((item) => {
  47625. const name2 = item.name || item.url || item.thumb;
  47626. return Object.assign(Object.assign({}, item), {
  47627. // 如果item.url为本地选择的blob文件的话,无法判断其为video还是image,此处优先通过accept做判断处理
  47628. isImage: item.name ? test.image(item.name) : this.accept === "image" || test.image(name2),
  47629. isVideo: item.name ? test.video(item.name) : this.accept === "video" || test.video(name2),
  47630. deletable: typeof item.deletable === "boolean" ? item.deletable : this.deletable
  47631. });
  47632. });
  47633. this.lists = lists;
  47634. this.isInCount = lists.length < maxCount;
  47635. },
  47636. chooseFile(params2) {
  47637. const {
  47638. maxCount,
  47639. multiple,
  47640. lists,
  47641. disabled
  47642. } = this;
  47643. if (disabled)
  47644. return Promise.reject();
  47645. const chooseParams = Object.assign({
  47646. accept: this.accept,
  47647. extension: this.extension,
  47648. multiple: this.multiple,
  47649. capture: this.capture,
  47650. compressed: this.compressed,
  47651. maxDuration: this.maxDuration,
  47652. sizeType: this.sizeType,
  47653. camera: this.camera
  47654. }, {
  47655. maxCount: maxCount - lists.length,
  47656. ...params2
  47657. });
  47658. return chooseFile(chooseParams).then((res) => {
  47659. const result = chooseParams.multiple ? res : res[0];
  47660. this.onBeforeRead(result);
  47661. return result;
  47662. }).catch((error2) => {
  47663. this.$emit("error", error2);
  47664. });
  47665. },
  47666. // 文件读取之前
  47667. onBeforeRead(file) {
  47668. const {
  47669. beforeRead,
  47670. useBeforeRead
  47671. } = this;
  47672. let res = file;
  47673. if (test.func(beforeRead)) {
  47674. res = beforeRead(file, this.getDetail());
  47675. }
  47676. if (useBeforeRead) {
  47677. res = new Promise((resolve, reject) => {
  47678. this.$emit(
  47679. "beforeRead",
  47680. Object.assign(Object.assign({
  47681. file
  47682. }, this.getDetail()), {
  47683. callback: (ok) => {
  47684. ok ? resolve() : reject();
  47685. }
  47686. })
  47687. );
  47688. });
  47689. }
  47690. if (test.promise(res)) {
  47691. res.then((data) => this.onAfterRead(data || file));
  47692. } else {
  47693. this.onAfterRead(res || file);
  47694. }
  47695. },
  47696. getDetail(index2) {
  47697. return {
  47698. name: this.name,
  47699. index: index2 == null ? this.fileList.length : index2
  47700. };
  47701. },
  47702. async onAfterRead(file) {
  47703. const {
  47704. maxSize,
  47705. afterRead
  47706. } = this;
  47707. const oversize = Array.isArray(file) ? file.some((item) => item.size > maxSize) : file.size > maxSize;
  47708. if (oversize) {
  47709. uni.showToast({
  47710. title: t$1("up.upload.sizeExceed")
  47711. });
  47712. this.$emit("oversize", Object.assign({
  47713. file
  47714. }, this.getDetail()));
  47715. return;
  47716. }
  47717. let len = this.fileList.length;
  47718. if (this.autoUpload) {
  47719. let lists = [].concat(file);
  47720. this.fileList.length;
  47721. lists.map((item) => {
  47722. this.fileList.push({
  47723. ...item,
  47724. status: "uploading",
  47725. message: t$1("up.upload.uploading"),
  47726. progress: 0
  47727. });
  47728. });
  47729. let that2 = this;
  47730. this.$emit("update:fileList", this.fileList);
  47731. for (let i2 = 0; i2 < lists.length; i2++) {
  47732. let j2 = i2;
  47733. let result = "";
  47734. switch (this.autoUploadDriver) {
  47735. case "cos":
  47736. break;
  47737. case "kodo":
  47738. break;
  47739. case "oss":
  47740. case "upload_oss":
  47741. console.log();
  47742. let formData = {};
  47743. let ret = await uni.request({
  47744. url: this.autoUploadAuthUrl,
  47745. method: "get",
  47746. header: this.autoUploadHeader,
  47747. data: {
  47748. filename: lists[j2].name
  47749. }
  47750. });
  47751. let res0 = ret.data;
  47752. if (res0.code == 200) {
  47753. formData = res0.data.params;
  47754. } else {
  47755. uni.showToast({
  47756. title: res0.msg,
  47757. duration: 1500
  47758. });
  47759. return;
  47760. }
  47761. var uploadTask = uni.uploadFile({
  47762. url: res0.data.params.host,
  47763. filePath: lists[j2].url,
  47764. name: "file",
  47765. // fileType: 'video', // 仅支付宝小程序,且必填。
  47766. // header: header,
  47767. formData,
  47768. success: (uploadFileRes) => {
  47769. let thumb = "";
  47770. let afterPromise = "";
  47771. if (that2.customAfterAutoUpload) {
  47772. afterPromise = new Promise((resolve, reject) => {
  47773. that2.$emit(
  47774. "afterAutoUpload",
  47775. Object.assign(res0, {
  47776. callback: (r2) => {
  47777. r2.url ? resolve(r2) : reject();
  47778. }
  47779. })
  47780. );
  47781. });
  47782. }
  47783. if (test.promise(afterPromise)) {
  47784. afterPromise.then((data) => that2.succcessUpload(len + j2, data.url, data.thumb));
  47785. } else {
  47786. result = res0.data.params.host + "/" + res0.data.params.key;
  47787. if (that2.accept === "video" || test.video(result)) {
  47788. thumb = result + "?x-oss-process=video/snapshot,t_10000,m_fast";
  47789. }
  47790. that2.succcessUpload(len + j2, result, thumb);
  47791. }
  47792. }
  47793. });
  47794. uploadTask.onProgressUpdate((res) => {
  47795. that2.updateUpload(len + j2, {
  47796. progress: res.progress
  47797. });
  47798. });
  47799. break;
  47800. case "local":
  47801. default:
  47802. var uploadTask = uni.uploadFile({
  47803. url: this.autoUploadApi,
  47804. filePath: lists[j2].url,
  47805. name: "file",
  47806. // fileType: 'video', // 仅支付宝小程序,且必填。
  47807. header: this.autoUploadHeader,
  47808. success: (uploadFileRes) => {
  47809. let res02 = uploadFileRes.data;
  47810. let afterPromise = "";
  47811. if (that2.customAfterAutoUpload) {
  47812. afterPromise = new Promise((resolve, reject) => {
  47813. that2.$emit(
  47814. "afterAutoUpload",
  47815. Object.assign(res02, {
  47816. callback: (r2) => {
  47817. r2.url ? resolve(r2) : reject();
  47818. }
  47819. })
  47820. );
  47821. });
  47822. }
  47823. if (test.promise(afterPromise)) {
  47824. afterPromise.then((data) => that2.succcessUpload(len + j2, data.url));
  47825. } else {
  47826. if (res02.code != 200) {
  47827. uni.showToast({
  47828. title: res02.msg
  47829. });
  47830. } else {
  47831. result = res02.data.url;
  47832. that2.succcessUpload(len + j2, result);
  47833. }
  47834. }
  47835. }
  47836. });
  47837. uploadTask.onProgressUpdate((res) => {
  47838. that2.updateUpload(len + j2, {
  47839. progress: res.progress
  47840. });
  47841. });
  47842. break;
  47843. }
  47844. }
  47845. } else {
  47846. if (typeof afterRead === "function") {
  47847. afterRead(file, this.getDetail());
  47848. }
  47849. this.$emit("afterRead", Object.assign({
  47850. file
  47851. }, this.getDetail()));
  47852. }
  47853. },
  47854. updateUpload(index2, param) {
  47855. let item = this.fileList[index2];
  47856. this.fileList.splice(index2, 1, {
  47857. ...item,
  47858. // 注意这里不判断会出现succcessUpload先执行又被覆盖的问题
  47859. status: param.progress == 100 ? "success" : "uploading",
  47860. message: "",
  47861. progress: param.progress
  47862. });
  47863. this.$emit("update:fileList", this.fileList);
  47864. },
  47865. succcessUpload(index2, url2, thumb = "") {
  47866. let item = this.fileList[index2];
  47867. this.fileList.splice(index2, 1, {
  47868. ...item,
  47869. status: "success",
  47870. message: "",
  47871. url: url2,
  47872. progress: 100,
  47873. thumb
  47874. });
  47875. this.$emit("update:fileList", this.fileList);
  47876. },
  47877. deleteItem(index2) {
  47878. if (this.autoDelete) {
  47879. this.fileList.splice(index2, 1);
  47880. this.$emit("update:fileList", this.fileList);
  47881. } else {
  47882. this.$emit(
  47883. "delete",
  47884. Object.assign(Object.assign({}, this.getDetail(index2)), {
  47885. file: this.fileList[index2]
  47886. })
  47887. );
  47888. }
  47889. },
  47890. // 预览图片
  47891. onPreviewImage(previewItem, index2) {
  47892. if (!previewItem.isImage || !this.previewFullImage)
  47893. return;
  47894. let current = 0;
  47895. const urls = [];
  47896. let imageIndex = 0;
  47897. for (var i2 = 0; i2 < this.lists.length; i2++) {
  47898. const item = this.lists[i2];
  47899. if (item.isImage || item.type && item.type === "image") {
  47900. urls.push(item.url || item.thumb);
  47901. if (i2 === index2) {
  47902. current = imageIndex;
  47903. }
  47904. imageIndex += 1;
  47905. }
  47906. }
  47907. if (urls.length < 1) {
  47908. return;
  47909. }
  47910. uni.previewImage({
  47911. urls,
  47912. current,
  47913. fail() {
  47914. toast(t$1("up.upload.previewImageFail"));
  47915. }
  47916. });
  47917. },
  47918. onPreviewVideo(previewItem, index2) {
  47919. if (!this.previewFullImage)
  47920. return;
  47921. const sources = [];
  47922. for (var i2 = 0; i2 < this.lists.length; i2++) {
  47923. const item = this.lists[i2];
  47924. if (item.isVideo || item.type && item.type === "video") {
  47925. sources.push(Object.assign(Object.assign({}, item), {
  47926. type: "video"
  47927. }));
  47928. }
  47929. }
  47930. if (sources.length < 1) {
  47931. return;
  47932. }
  47933. this.popupShow = true;
  47934. this.currentItemIndex = index2;
  47935. formatAppLog("log", "at uni_modules/uview-plus/components/u-upload/u-upload.vue:671", this.lists[this.currentItemIndex]);
  47936. },
  47937. onClickPreview(item, index2) {
  47938. if (this.previewFullImage) {
  47939. switch (item.type) {
  47940. case "image":
  47941. this.onPreviewImage(item, index2);
  47942. break;
  47943. case "video":
  47944. this.onPreviewVideo(item, index2);
  47945. break;
  47946. }
  47947. }
  47948. this.$emit(
  47949. "clickPreview",
  47950. Object.assign(Object.assign({}, item), this.getDetail(index2))
  47951. );
  47952. }
  47953. }
  47954. };
  47955. function _sfc_render$9(_ctx, _cache, $props, $setup, $data, $options) {
  47956. const _component_up_icon = vue.resolveComponent("up-icon");
  47957. const _component_u_loading_icon = resolveEasycom(vue.resolveDynamicComponent("u-loading-icon"), __easycom_0$e);
  47958. const _component_up_gap = vue.resolveComponent("up-gap");
  47959. const _component_up_popup = vue.resolveComponent("up-popup");
  47960. return vue.openBlock(), vue.createElementBlock(
  47961. "view",
  47962. {
  47963. class: "u-upload",
  47964. style: vue.normalizeStyle([$options.addStyle(_ctx.customStyle)])
  47965. },
  47966. [
  47967. vue.createElementVNode("view", { class: "u-upload__wrap" }, [
  47968. _ctx.previewImage ? (vue.openBlock(true), vue.createElementBlock(
  47969. vue.Fragment,
  47970. { key: 0 },
  47971. vue.renderList($data.lists, (item, index2) => {
  47972. return vue.openBlock(), vue.createElementBlock("view", {
  47973. class: "u-upload__wrap__preview",
  47974. key: index2
  47975. }, [
  47976. item.isImage || item.type && item.type === "image" ? (vue.openBlock(), vue.createElementBlock("image", {
  47977. key: 0,
  47978. src: item.thumb || item.url,
  47979. mode: _ctx.imageMode,
  47980. class: "u-upload__wrap__preview__image",
  47981. onClick: ($event) => $options.onClickPreview(item, index2),
  47982. style: vue.normalizeStyle([{
  47983. width: $options.addUnit(_ctx.width),
  47984. height: $options.addUnit(_ctx.height)
  47985. }])
  47986. }, null, 12, ["src", "mode", "onClick"])) : (item.isVideo || item.type && item.type === "video") && _ctx.getVideoThumb ? (vue.openBlock(), vue.createElementBlock(
  47987. "view",
  47988. {
  47989. key: 1,
  47990. class: "u-upload__wrap__preview__video",
  47991. style: vue.normalizeStyle({
  47992. width: $options.addUnit(_ctx.width),
  47993. height: $options.addUnit(_ctx.height)
  47994. })
  47995. },
  47996. [
  47997. item.thumb ? (vue.openBlock(), vue.createElementBlock("image", {
  47998. key: 0,
  47999. src: item.thumb,
  48000. mode: _ctx.imageMode,
  48001. class: "u-upload__wrap__preview__image",
  48002. onClick: ($event) => $options.onClickPreview(item, index2),
  48003. style: vue.normalizeStyle([{
  48004. width: $options.addUnit(_ctx.width),
  48005. height: $options.addUnit(_ctx.height)
  48006. }])
  48007. }, null, 12, ["src", "mode", "onClick"])) : (vue.openBlock(), vue.createBlock(_component_up_icon, {
  48008. key: 1,
  48009. color: "#80CBF9",
  48010. size: "26",
  48011. name: item.isVideo || item.type && item.type === "video" ? "movie" : "file-text"
  48012. }, null, 8, ["name"])),
  48013. item.status === "success" ? (vue.openBlock(), vue.createElementBlock("view", {
  48014. key: 2,
  48015. class: "u-upload__wrap__play",
  48016. onClick: ($event) => $options.onClickPreview(item, index2)
  48017. }, [
  48018. vue.renderSlot(_ctx.$slots, "playIcon", {}, void 0, true),
  48019. !_ctx.$slots["playIcon"] ? (vue.openBlock(), vue.createBlock(_component_up_icon, {
  48020. key: 0,
  48021. class: "u-upload__wrap__play__icon",
  48022. name: "play-right",
  48023. size: "22px"
  48024. })) : vue.createCommentVNode("v-if", true)
  48025. ], 8, ["onClick"])) : vue.createCommentVNode("v-if", true)
  48026. ],
  48027. 4
  48028. /* STYLE */
  48029. )) : (vue.openBlock(), vue.createElementBlock("view", {
  48030. key: 2,
  48031. class: "u-upload__wrap__preview__other",
  48032. onClick: ($event) => $options.onClickPreview(item, index2),
  48033. style: vue.normalizeStyle([{
  48034. width: $options.addUnit(_ctx.width),
  48035. height: $options.addUnit(_ctx.height)
  48036. }])
  48037. }, [
  48038. vue.createVNode(_component_up_icon, {
  48039. color: "#80CBF9",
  48040. size: "26",
  48041. name: item.isVideo || item.type && item.type === "video" ? "movie" : "folder"
  48042. }, null, 8, ["name"]),
  48043. vue.createElementVNode(
  48044. "text",
  48045. { class: "u-upload__wrap__preview__other__text" },
  48046. vue.toDisplayString(item.isVideo || item.type && item.type === "video" ? item.name || $options.t("up.common.video") : item.name || $options.t("up.common.file")),
  48047. 1
  48048. /* TEXT */
  48049. )
  48050. ], 12, ["onClick"])),
  48051. item.status === "uploading" || item.status === "failed" ? (vue.openBlock(), vue.createElementBlock("view", {
  48052. key: 3,
  48053. class: "u-upload__status"
  48054. }, [
  48055. vue.createElementVNode("view", { class: "u-upload__status__icon" }, [
  48056. item.status === "failed" ? (vue.openBlock(), vue.createBlock(_component_up_icon, {
  48057. key: 0,
  48058. name: "close-circle",
  48059. color: "#ffffff",
  48060. size: "25"
  48061. })) : (vue.openBlock(), vue.createBlock(_component_u_loading_icon, {
  48062. key: 1,
  48063. size: "22",
  48064. mode: "circle"
  48065. }))
  48066. ]),
  48067. item.message ? (vue.openBlock(), vue.createElementBlock(
  48068. "text",
  48069. {
  48070. key: 0,
  48071. class: "u-upload__status__message"
  48072. },
  48073. vue.toDisplayString(item.message),
  48074. 1
  48075. /* TEXT */
  48076. )) : vue.createCommentVNode("v-if", true),
  48077. vue.createVNode(_component_up_gap, {
  48078. class: "u-upload__progress",
  48079. height: "3px",
  48080. style: vue.normalizeStyle({ width: item.progress + "%" })
  48081. }, null, 8, ["style"])
  48082. ])) : vue.createCommentVNode("v-if", true),
  48083. item.status !== "uploading" && (_ctx.deletable || item.deletable) ? (vue.openBlock(), vue.createElementBlock("view", {
  48084. key: 4,
  48085. class: "u-upload__deletable",
  48086. onClick: vue.withModifiers(($event) => $options.deleteItem(index2), ["stop"])
  48087. }, [
  48088. vue.createElementVNode("view", { class: "u-upload__deletable__icon" }, [
  48089. vue.createVNode(_component_up_icon, {
  48090. name: "close",
  48091. color: "#ffffff",
  48092. size: "10"
  48093. })
  48094. ])
  48095. ], 8, ["onClick"])) : vue.createCommentVNode("v-if", true),
  48096. vue.renderSlot(_ctx.$slots, "success", {}, () => [
  48097. item.status === "success" ? (vue.openBlock(), vue.createElementBlock("view", {
  48098. key: 0,
  48099. class: "u-upload__success"
  48100. }, [
  48101. vue.createElementVNode("view", { class: "u-upload__success__icon" }, [
  48102. vue.createVNode(_component_up_icon, {
  48103. name: "checkmark",
  48104. color: "#ffffff",
  48105. size: "12"
  48106. })
  48107. ])
  48108. ])) : vue.createCommentVNode("v-if", true)
  48109. ], true)
  48110. ]);
  48111. }),
  48112. 128
  48113. /* KEYED_FRAGMENT */
  48114. )) : vue.createCommentVNode("v-if", true),
  48115. vue.createElementVNode("canvas", {
  48116. id: "myCanvas",
  48117. type: "2d",
  48118. style: { "width": "100px", "height": "150px", "display": "none" }
  48119. }),
  48120. $data.isInCount ? (vue.openBlock(), vue.createElementBlock(
  48121. vue.Fragment,
  48122. { key: 1 },
  48123. [
  48124. _ctx.$slots.trigger ? (vue.openBlock(), vue.createElementBlock("view", {
  48125. key: 0,
  48126. onClick: _cache[0] || (_cache[0] = (...args) => $options.chooseFile && $options.chooseFile(...args))
  48127. }, [
  48128. vue.renderSlot(_ctx.$slots, "trigger", {}, void 0, true)
  48129. ])) : !_ctx.$slots.trigger && (_ctx.$slots.default || _ctx.$slots.$default) ? (vue.openBlock(), vue.createElementBlock("view", {
  48130. key: 1,
  48131. onClick: _cache[1] || (_cache[1] = (...args) => $options.chooseFile && $options.chooseFile(...args))
  48132. }, [
  48133. vue.renderSlot(_ctx.$slots, "default", {}, void 0, true)
  48134. ])) : (vue.openBlock(), vue.createElementBlock("view", {
  48135. key: 2,
  48136. class: vue.normalizeClass(["u-upload__button", [_ctx.disabled && "u-upload__button--disabled"]]),
  48137. "hover-class": !_ctx.disabled ? "u-upload__button--hover" : "",
  48138. "hover-stay-time": "150",
  48139. onClick: _cache[2] || (_cache[2] = (...args) => $options.chooseFile && $options.chooseFile(...args)),
  48140. style: vue.normalizeStyle([{
  48141. width: $options.addUnit(_ctx.width),
  48142. height: $options.addUnit(_ctx.height)
  48143. }])
  48144. }, [
  48145. vue.createVNode(_component_up_icon, {
  48146. name: _ctx.uploadIcon,
  48147. size: "26",
  48148. color: _ctx.uploadIconColor
  48149. }, null, 8, ["name", "color"]),
  48150. _ctx.uploadText ? (vue.openBlock(), vue.createElementBlock(
  48151. "text",
  48152. {
  48153. key: 0,
  48154. class: "u-upload__button__text"
  48155. },
  48156. vue.toDisplayString(_ctx.uploadText),
  48157. 1
  48158. /* TEXT */
  48159. )) : vue.createCommentVNode("v-if", true)
  48160. ], 14, ["hover-class"]))
  48161. ],
  48162. 64
  48163. /* STABLE_FRAGMENT */
  48164. )) : vue.createCommentVNode("v-if", true)
  48165. ]),
  48166. vue.createVNode(_component_up_popup, {
  48167. mode: "center",
  48168. show: $data.popupShow,
  48169. "onUpdate:show": _cache[5] || (_cache[5] = ($event) => $data.popupShow = $event)
  48170. }, {
  48171. default: vue.withCtx(() => [
  48172. $data.popupShow ? (vue.openBlock(), vue.createElementBlock("video", {
  48173. key: 0,
  48174. id: "myVideo",
  48175. src: $data.currentItemIndex >= 0 ? $data.lists[$data.currentItemIndex].url : "",
  48176. onError: _cache[3] || (_cache[3] = (...args) => $options.videoErrorCallback && $options.videoErrorCallback(...args)),
  48177. "show-center-play-btn": "",
  48178. "object-fit": _ctx.videoPreviewObjectFit,
  48179. "show-fullscreen-btn": "true",
  48180. "enable-play-gesture": "",
  48181. controls: "",
  48182. autoplay: true,
  48183. "auto-pause-if-open-native": "",
  48184. onLoadedmetadata: _cache[4] || (_cache[4] = (...args) => $options.loadedVideoMetadata && $options.loadedVideoMetadata(...args)),
  48185. "initial-time": 0.1
  48186. }, null, 40, ["src", "object-fit"])) : vue.createCommentVNode("v-if", true)
  48187. ]),
  48188. _: 1
  48189. /* STABLE */
  48190. }, 8, ["show"])
  48191. ],
  48192. 4
  48193. /* STYLE */
  48194. );
  48195. }
  48196. const uUpload = /* @__PURE__ */ _export_sfc(_sfc_main$a, [["render", _sfc_render$9], ["__scopeId", "data-v-c8491d64"], ["__file", "C:/Users/EDY/Desktop/项目/shuibei/uni_modules/uview-plus/components/u-upload/u-upload.vue"]]);
  48197. const __vite_glob_0_126 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
  48198. __proto__: null,
  48199. default: uUpload
  48200. }, Symbol.toStringTag, { value: "Module" }));
  48201. const _sfc_main$9 = {
  48202. name: "up-view",
  48203. mixins: [mpMixin, mixin],
  48204. emits: ["click"],
  48205. computed: {
  48206. valueStyle() {
  48207. }
  48208. },
  48209. props: {
  48210. backgroundColor: "",
  48211. color: "",
  48212. flexDirection: "",
  48213. justifyContent: "",
  48214. alignItems: "",
  48215. flex1: "",
  48216. width: "",
  48217. height: "",
  48218. padding: "",
  48219. margin: "",
  48220. borderColor: ""
  48221. },
  48222. data() {
  48223. return {};
  48224. },
  48225. methods: {
  48226. addStyle,
  48227. clickHandler() {
  48228. this.$emit("click");
  48229. }
  48230. }
  48231. };
  48232. function _sfc_render$8(_ctx, _cache, $props, $setup, $data, $options) {
  48233. return vue.openBlock(), vue.createElementBlock(
  48234. "view",
  48235. {
  48236. class: vue.normalizeClass(["u-view", _ctx.class]),
  48237. style: vue.normalizeStyle({
  48238. backgroundColor: $props.backgroundColor,
  48239. color: $props.color,
  48240. flexDirection: $props.flexDirection,
  48241. justifyContent: $props.justifyContent,
  48242. alignItems: $props.alignItems,
  48243. flex1: $props.flex1,
  48244. width: $props.width,
  48245. height: $props.height,
  48246. padding: $props.padding,
  48247. margin: $props.margin,
  48248. borderColor: $props.borderColor
  48249. })
  48250. },
  48251. null,
  48252. 6
  48253. /* CLASS, STYLE */
  48254. );
  48255. }
  48256. const uView = /* @__PURE__ */ _export_sfc(_sfc_main$9, [["render", _sfc_render$8], ["__scopeId", "data-v-02d480a7"], ["__file", "C:/Users/EDY/Desktop/项目/shuibei/uni_modules/uview-plus/components/u-view/u-view.vue"]]);
  48257. const __vite_glob_0_127 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
  48258. __proto__: null,
  48259. default: uView
  48260. }, Symbol.toStringTag, { value: "Module" }));
  48261. const _sfc_main$8 = {
  48262. name: "u-waterfall",
  48263. props: {
  48264. modelValue: {
  48265. // 瀑布流数据
  48266. type: Array,
  48267. required: true,
  48268. default: function() {
  48269. return [];
  48270. }
  48271. },
  48272. // 每次向结构插入数据的时间间隔,单位ms
  48273. // 单位ms
  48274. addTime: {
  48275. type: [Number, String],
  48276. default: 200
  48277. },
  48278. // id值,用于清除某一条数据时,根据此idKey名称找到并移除,如数据为{idx: 22, name: 'lisa'}
  48279. // 那么该把idKey设置为idx
  48280. idKey: {
  48281. type: String,
  48282. default: "id"
  48283. },
  48284. // 瀑布流列数
  48285. columns: {
  48286. type: [Number, String],
  48287. default: 2
  48288. },
  48289. // 瀑布流最小列数
  48290. columnsMin: {
  48291. type: [Number, String],
  48292. default: 2
  48293. },
  48294. // 最小列宽
  48295. minColumnWidth: {
  48296. type: Number,
  48297. default: 230
  48298. }
  48299. },
  48300. mixins: [mpMixin, mixin],
  48301. data() {
  48302. return {
  48303. columnList: [[]],
  48304. // 存储每列的数据
  48305. children: [],
  48306. // 用于标记是否已经初始化
  48307. initialized: false,
  48308. windowWidth: 375,
  48309. windowHeight: 0
  48310. };
  48311. },
  48312. watch: {
  48313. copyFlowList: {
  48314. handler(nVal, oVal) {
  48315. if (!nVal || nVal.length == 0) {
  48316. this.clear(false);
  48317. } else {
  48318. if (this.columnList.length == 1) {
  48319. this.initColumnList();
  48320. }
  48321. let startIndex = Array.isArray(oVal) && oVal.length > 0 ? oVal.length : 0;
  48322. this.handleData(nVal.slice(startIndex));
  48323. }
  48324. },
  48325. immediate: true
  48326. },
  48327. columns: {
  48328. handler() {
  48329. this.initColumnList();
  48330. if (this.copyFlowList.length > 0) {
  48331. this.redistributeData();
  48332. }
  48333. },
  48334. immediate: false
  48335. }
  48336. },
  48337. created() {
  48338. this.initColumnList();
  48339. },
  48340. mounted() {
  48341. this.initialized = true;
  48342. },
  48343. // 添加beforeUnmount生命周期清理事件监听
  48344. beforeUnmount() {
  48345. },
  48346. computed: {
  48347. // 破坏flowList变量的引用,否则watch的结果新旧值是一样的
  48348. copyFlowList() {
  48349. if (!this.modelValue || this.modelValue.length == 0) {
  48350. return [];
  48351. } else {
  48352. return this.cloneData(this.modelValue);
  48353. }
  48354. }
  48355. },
  48356. emits: ["update:modelValue"],
  48357. methods: {
  48358. // 初始化列数据数组
  48359. initColumnList() {
  48360. this.windowWidth = uni.getSystemInfoSync().windowWidth;
  48361. const cols = this.getColumnsCount();
  48362. this.columnList = Array.from({ length: cols }, () => []);
  48363. },
  48364. // 获取列数,支持auto模式
  48365. getColumnsCount() {
  48366. if (this.columns === "auto") {
  48367. const columnGap = 7;
  48368. let columnCount = Math.max(1, Math.floor(this.windowWidth / (this.minColumnWidth + columnGap)));
  48369. if (columnCount < this.columnsMin) {
  48370. columnCount = this.columnsMin;
  48371. }
  48372. return columnCount;
  48373. }
  48374. return parseInt(this.columns) || 2;
  48375. },
  48376. // 窗口大小变化处理函数
  48377. handleWindowResize(res) {
  48378. this.windowWidth = res.size.windowWidth;
  48379. this.windowHeight = res.size.windowHeight;
  48380. if (this.resizeTimer) {
  48381. clearTimeout(this.resizeTimer);
  48382. }
  48383. this.resizeTimer = setTimeout(() => {
  48384. const newColumnsCount = this.getColumnsCount();
  48385. const oldColumnsCount = this.columnList.length;
  48386. if (newColumnsCount !== oldColumnsCount) {
  48387. this.redistributeData();
  48388. }
  48389. }, 300);
  48390. },
  48391. // 重新分配所有数据
  48392. async redistributeData() {
  48393. this.initColumnList();
  48394. const allData = this.cloneData(this.copyFlowList);
  48395. this.handleData(allData);
  48396. },
  48397. // 处理新增数据
  48398. async handleData(newData) {
  48399. if (!newData || newData.length === 0)
  48400. return;
  48401. const columnHeights = new Array(this.columnList.length).fill(0);
  48402. for (let i2 = 0; i2 < this.columnList.length; i2++) {
  48403. try {
  48404. const rect = await this.$uGetRect(`#u-column-${i2}`);
  48405. columnHeights[i2] = rect.height || 0;
  48406. } catch (e2) {
  48407. columnHeights[i2] = 0;
  48408. }
  48409. }
  48410. for (let item of newData) {
  48411. const minHeightIndex = columnHeights.indexOf(Math.min(...columnHeights));
  48412. this.columnList[minHeightIndex].push(item);
  48413. await sleep(30);
  48414. this.$nextTick(async () => {
  48415. try {
  48416. const rect = await this.$uGetRect(`#u-column-${minHeightIndex}`);
  48417. if (rect.height) {
  48418. columnHeights[minHeightIndex] = rect.height;
  48419. }
  48420. } catch (e2) {
  48421. }
  48422. });
  48423. }
  48424. },
  48425. // 复制而不是引用对象和数组
  48426. cloneData(data) {
  48427. return JSON.parse(JSON.stringify(data));
  48428. },
  48429. // 清空数据列表
  48430. clear(bak = true) {
  48431. this.initColumnList();
  48432. if (bak) {
  48433. this.$emit("update:modelValue", []);
  48434. }
  48435. },
  48436. // 清除某一条指定的数据,根据id实现
  48437. remove(id) {
  48438. for (let i2 = 0; i2 < this.columnList.length; i2++) {
  48439. const index2 = this.columnList[i2].findIndex((val) => val[this.idKey] == id);
  48440. if (index2 !== -1) {
  48441. this.columnList[i2].splice(index2, 1);
  48442. break;
  48443. }
  48444. }
  48445. const modelValueIndex = this.modelValue.findIndex((val) => val[this.idKey] == id);
  48446. if (modelValueIndex !== -1) {
  48447. const newModelValue = this.cloneData(this.modelValue);
  48448. newModelValue.splice(modelValueIndex, 1);
  48449. this.$emit("update:modelValue", newModelValue);
  48450. }
  48451. },
  48452. // 修改某条数据的某个属性
  48453. modify(id, key, value2) {
  48454. let found = false;
  48455. let targetItem = null;
  48456. for (let i2 = 0; i2 < this.columnList.length; i2++) {
  48457. const index2 = this.columnList[i2].findIndex((val) => val[this.idKey] == id);
  48458. if (index2 !== -1) {
  48459. this.columnList[i2][index2][key] = value2;
  48460. targetItem = this.columnList[i2][index2];
  48461. found = true;
  48462. break;
  48463. }
  48464. }
  48465. if (found && targetItem) {
  48466. const modelValueIndex = this.modelValue.findIndex((val) => val[this.idKey] == id);
  48467. if (modelValueIndex !== -1) {
  48468. let data = this.cloneData(this.modelValue);
  48469. data[modelValueIndex][key] = value2;
  48470. this.$emit("update:modelValue", data);
  48471. }
  48472. }
  48473. }
  48474. }
  48475. };
  48476. function _sfc_render$7(_ctx, _cache, $props, $setup, $data, $options) {
  48477. return vue.openBlock(), vue.createElementBlock("view", { class: "u-waterfall" }, [
  48478. vue.createCommentVNode(" 新增支持多列布局 "),
  48479. (vue.openBlock(true), vue.createElementBlock(
  48480. vue.Fragment,
  48481. null,
  48482. vue.renderList($data.columnList, (column, index2) => {
  48483. return vue.openBlock(), vue.createElementBlock("view", {
  48484. key: index2,
  48485. ref_for: true,
  48486. ref: `u-column-${index2}`,
  48487. id: `u-column-${index2}`,
  48488. class: "u-column"
  48489. }, [
  48490. vue.renderSlot(_ctx.$slots, "column", {
  48491. colIndex: index2,
  48492. colList: column
  48493. }, void 0, true),
  48494. vue.renderSlot(_ctx.$slots, "left", {
  48495. colIndex: index2,
  48496. leftList: column
  48497. }, void 0, true),
  48498. !_ctx.$slots["left"] && !_ctx.$slots["column"] ? (vue.openBlock(true), vue.createElementBlock(
  48499. vue.Fragment,
  48500. { key: 0 },
  48501. vue.renderList(column, (item, itemIndex) => {
  48502. return vue.renderSlot(_ctx.$slots, "default", {
  48503. key: itemIndex,
  48504. item,
  48505. itemIndex
  48506. }, void 0, true);
  48507. }),
  48508. 128
  48509. /* KEYED_FRAGMENT */
  48510. )) : vue.createCommentVNode("v-if", true)
  48511. ], 8, ["id"]);
  48512. }),
  48513. 128
  48514. /* KEYED_FRAGMENT */
  48515. ))
  48516. ]);
  48517. }
  48518. const uWaterfall = /* @__PURE__ */ _export_sfc(_sfc_main$8, [["render", _sfc_render$7], ["__scopeId", "data-v-366bbda3"], ["__file", "C:/Users/EDY/Desktop/项目/shuibei/uni_modules/uview-plus/components/u-waterfall/u-waterfall.vue"]]);
  48519. const __vite_glob_0_129 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
  48520. __proto__: null,
  48521. default: uWaterfall
  48522. }, Symbol.toStringTag, { value: "Module" }));
  48523. function add(arg1, arg2) {
  48524. var r1, r2, m2;
  48525. try {
  48526. r1 = arg1.toString().split(".")[1].length;
  48527. } catch (e2) {
  48528. r1 = 0;
  48529. }
  48530. try {
  48531. r2 = arg2.toString().split(".")[1].length;
  48532. } catch (e2) {
  48533. r2 = 0;
  48534. }
  48535. m2 = Math.pow(10, Math.max(r1, r2));
  48536. return (arg1 * m2 + arg2 * m2) / m2;
  48537. }
  48538. function sub(arg1, arg2) {
  48539. var r1, r2, m2, n2;
  48540. try {
  48541. r1 = arg1.toString().split(".")[1].length;
  48542. } catch (e2) {
  48543. r1 = 0;
  48544. }
  48545. try {
  48546. r2 = arg2.toString().split(".")[1].length;
  48547. } catch (e2) {
  48548. r2 = 0;
  48549. }
  48550. m2 = Math.pow(10, Math.max(r1, r2));
  48551. n2 = r1 >= r2 ? r1 : r2;
  48552. return Math.abs(((arg1 * m2 - arg2 * m2) / m2).toFixed(n2));
  48553. }
  48554. function mul(a2, b2) {
  48555. var c2 = 0, d2 = a2.toString(), e2 = b2.toString();
  48556. try {
  48557. c2 += d2.split(".")[1].length;
  48558. } catch (f2) {
  48559. }
  48560. try {
  48561. c2 += e2.split(".")[1].length;
  48562. } catch (f2) {
  48563. }
  48564. return Number(d2.replace(".", "")) * Number(e2.replace(".", "")) / Math.pow(10, c2);
  48565. }
  48566. function div(a2, b2) {
  48567. var c2, d2, e2 = 0, f2 = 0;
  48568. try {
  48569. e2 = a2.toString().split(".")[1].length;
  48570. } catch (g2) {
  48571. }
  48572. try {
  48573. f2 = b2.toString().split(".")[1].length;
  48574. } catch (g2) {
  48575. }
  48576. return c2 = Number(a2.toString().replace(".", "")), d2 = Number(b2.toString().replace(".", "")), xyutil.mul(c2 / d2, Math.pow(10, f2 - e2));
  48577. }
  48578. const calc = {
  48579. add,
  48580. sub,
  48581. mul,
  48582. div
  48583. };
  48584. let platform = "none";
  48585. platform = "vue3";
  48586. platform = "plus";
  48587. const platform$1 = platform;
  48588. let themeType = ["primary", "success", "error", "warning", "info"];
  48589. function setConfig(configs) {
  48590. index.shallowMerge(config$1, configs.config || {});
  48591. index.shallowMerge(props$1x, configs.props || {});
  48592. index.shallowMerge(color$3, configs.color || {});
  48593. index.shallowMerge(zIndex, configs.zIndex || {});
  48594. }
  48595. index.setConfig = setConfig;
  48596. const $u = {
  48597. route,
  48598. date: index.timeFormat,
  48599. // 另名date
  48600. colorGradient: colorGradient$1.colorGradient,
  48601. hexToRgb: colorGradient$1.hexToRgb,
  48602. rgbToHex: colorGradient$1.rgbToHex,
  48603. colorToRgba: colorGradient$1.colorToRgba,
  48604. test,
  48605. type: themeType,
  48606. http,
  48607. config: config$1,
  48608. // uview-plus配置信息相关,比如版本号
  48609. zIndex,
  48610. debounce,
  48611. throttle,
  48612. calc,
  48613. mixin,
  48614. mpMixin,
  48615. // props,
  48616. ...index,
  48617. color: color$3,
  48618. platform: platform$1
  48619. };
  48620. const importFn = /* @__PURE__ */ Object.assign({ "./components/u-action-sheet-data/u-action-sheet-data.vue": __vite_glob_0_0, "./components/u-action-sheet/u-action-sheet.vue": __vite_glob_0_1, "./components/u-agreement/u-agreement.vue": __vite_glob_0_2, "./components/u-album/u-album.vue": __vite_glob_0_3, "./components/u-alert/u-alert.vue": __vite_glob_0_4, "./components/u-avatar-group/u-avatar-group.vue": __vite_glob_0_5, "./components/u-avatar/u-avatar.vue": __vite_glob_0_6, "./components/u-back-top/u-back-top.vue": __vite_glob_0_7, "./components/u-badge/u-badge.vue": __vite_glob_0_8, "./components/u-barcode/u-barcode.vue": __vite_glob_0_9, "./components/u-box/u-box.vue": __vite_glob_0_10, "./components/u-button/u-button.vue": __vite_glob_0_11, "./components/u-calendar/u-calendar.vue": __vite_glob_0_12, "./components/u-car-keyboard/u-car-keyboard.vue": __vite_glob_0_13, "./components/u-card/u-card.vue": __vite_glob_0_14, "./components/u-cate-tab/u-cate-tab.vue": __vite_glob_0_15, "./components/u-cell-group/u-cell-group.vue": __vite_glob_0_16, "./components/u-cell/u-cell.vue": __vite_glob_0_17, "./components/u-checkbox-group/u-checkbox-group.vue": __vite_glob_0_18, "./components/u-checkbox/u-checkbox.vue": __vite_glob_0_19, "./components/u-circle-progress/u-circle-progress.vue": __vite_glob_0_20, "./components/u-city-locate/u-city-locate.vue": __vite_glob_0_21, "./components/u-code-input/u-code-input.vue": __vite_glob_0_22, "./components/u-code/u-code.vue": __vite_glob_0_23, "./components/u-col/u-col.vue": __vite_glob_0_24, "./components/u-collapse-item/u-collapse-item.vue": __vite_glob_0_25, "./components/u-collapse/u-collapse.vue": __vite_glob_0_26, "./components/u-color-picker/u-color-picker.vue": __vite_glob_0_27, "./components/u-column-notice/u-column-notice.vue": __vite_glob_0_28, "./components/u-copy/u-copy.vue": __vite_glob_0_29, "./components/u-count-down/u-count-down.vue": __vite_glob_0_30, "./components/u-count-to/u-count-to.vue": __vite_glob_0_31, "./components/u-coupon/u-coupon.vue": __vite_glob_0_32, "./components/u-cropper/u-cropper.vue": __vite_glob_0_33, "./components/u-datetime-picker/u-datetime-picker.vue": __vite_glob_0_34, "./components/u-divider/u-divider.vue": __vite_glob_0_35, "./components/u-dragsort/u-dragsort.vue": __vite_glob_0_36, "./components/u-dropdown-item/u-dropdown-item.vue": __vite_glob_0_37, "./components/u-dropdown/u-dropdown.vue": __vite_glob_0_38, "./components/u-empty/u-empty.vue": __vite_glob_0_39, "./components/u-float-button/u-float-button.vue": __vite_glob_0_40, "./components/u-form-item/u-form-item.vue": __vite_glob_0_41, "./components/u-form/u-form.vue": __vite_glob_0_42, "./components/u-gap/u-gap.vue": __vite_glob_0_43, "./components/u-grid-item/u-grid-item.vue": __vite_glob_0_44, "./components/u-grid/u-grid.vue": __vite_glob_0_45, "./components/u-icon/u-icon.vue": __vite_glob_0_46, "./components/u-image/u-image.vue": __vite_glob_0_47, "./components/u-index-anchor/u-index-anchor.vue": __vite_glob_0_48, "./components/u-index-item/u-index-item.vue": __vite_glob_0_49, "./components/u-index-list/u-index-list.vue": __vite_glob_0_50, "./components/u-input/u-input.vue": __vite_glob_0_51, "./components/u-keyboard/u-keyboard.vue": __vite_glob_0_52, "./components/u-lazy-load/u-lazy-load.vue": __vite_glob_0_53, "./components/u-line-progress/u-line-progress.vue": __vite_glob_0_54, "./components/u-line/u-line.vue": __vite_glob_0_55, "./components/u-link/u-link.vue": __vite_glob_0_56, "./components/u-list-item/u-list-item.vue": __vite_glob_0_57, "./components/u-list/u-list.vue": __vite_glob_0_58, "./components/u-loading-icon/u-loading-icon.vue": __vite_glob_0_59, "./components/u-loading-page/u-loading-page.vue": __vite_glob_0_60, "./components/u-loadmore/u-loadmore.vue": __vite_glob_0_61, "./components/u-markdown/u-markdown.vue": __vite_glob_0_62, "./components/u-message-input/u-message-input.vue": __vite_glob_0_63, "./components/u-modal/u-modal.vue": __vite_glob_0_64, "./components/u-navbar-mini/u-navbar-mini.vue": __vite_glob_0_65, "./components/u-navbar/u-navbar.vue": __vite_glob_0_66, "./components/u-no-network/u-no-network.vue": __vite_glob_0_67, "./components/u-notice-bar/u-notice-bar.vue": __vite_glob_0_68, "./components/u-notify/u-notify.vue": __vite_glob_0_69, "./components/u-number-box/u-number-box.vue": __vite_glob_0_70, "./components/u-number-keyboard/u-number-keyboard.vue": __vite_glob_0_71, "./components/u-overlay/u-overlay.vue": __vite_glob_0_72, "./components/u-pagination/u-pagination.vue": __vite_glob_0_73, "./components/u-parse/u-parse.vue": __vite_glob_0_74, "./components/u-pdf-reader/u-pdf-reader.vue": __vite_glob_0_75, "./components/u-picker-column/u-picker-column.vue": __vite_glob_0_76, "./components/u-picker-data/u-picker-data.vue": __vite_glob_0_77, "./components/u-picker/u-picker.vue": __vite_glob_0_78, "./components/u-popup/u-popup.vue": __vite_glob_0_79, "./components/u-poster/u-poster.vue": __vite_glob_0_80, "./components/u-pull-refresh/u-pull-refresh.vue": __vite_glob_0_81, "./components/u-qrcode/u-qrcode.vue": __vite_glob_0_82, "./components/u-radio-group/u-radio-group.vue": __vite_glob_0_83, "./components/u-radio/u-radio.vue": __vite_glob_0_84, "./components/u-rate/u-rate.vue": __vite_glob_0_85, "./components/u-read-more/u-read-more.vue": __vite_glob_0_86, "./components/u-refresh-virtual-list/u-refresh-virtual-list.vue": __vite_glob_0_87, "./components/u-row-notice/u-row-notice.vue": __vite_glob_0_88, "./components/u-row/u-row.vue": __vite_glob_0_89, "./components/u-safe-bottom/u-safe-bottom.vue": __vite_glob_0_90, "./components/u-scroll-list/u-scroll-list.vue": __vite_glob_0_91, "./components/u-search/u-search.vue": __vite_glob_0_92, "./components/u-select/u-select.vue": __vite_glob_0_93, "./components/u-short-video/u-short-video.vue": __vite_glob_0_94, "./components/u-signature/u-signature.vue": __vite_glob_0_95, "./components/u-skeleton/u-skeleton.vue": __vite_glob_0_96, "./components/u-slider/u-slider.vue": __vite_glob_0_97, "./components/u-status-bar/u-status-bar.vue": __vite_glob_0_98, "./components/u-steps-item/u-steps-item.vue": __vite_glob_0_99, "./components/u-steps/u-steps.vue": __vite_glob_0_100, "./components/u-sticky/u-sticky.vue": __vite_glob_0_101, "./components/u-subsection/u-subsection.vue": __vite_glob_0_102, "./components/u-swipe-action-item/u-swipe-action-item.vue": __vite_glob_0_103, "./components/u-swipe-action/u-swipe-action.vue": __vite_glob_0_104, "./components/u-swiper-indicator/u-swiper-indicator.vue": __vite_glob_0_105, "./components/u-swiper/u-swiper.vue": __vite_glob_0_106, "./components/u-switch/u-switch.vue": __vite_glob_0_107, "./components/u-tabbar-item/u-tabbar-item.vue": __vite_glob_0_108, "./components/u-tabbar/u-tabbar.vue": __vite_glob_0_109, "./components/u-table/u-table.vue": __vite_glob_0_110, "./components/u-table2/u-table2.vue": __vite_glob_0_111, "./components/u-tabs-item/u-tabs-item.vue": __vite_glob_0_112, "./components/u-tabs/u-tabs.vue": __vite_glob_0_113, "./components/u-tag/u-tag.vue": __vite_glob_0_114, "./components/u-td/u-td.vue": __vite_glob_0_115, "./components/u-text/u-text.vue": __vite_glob_0_116, "./components/u-textarea/u-textarea.vue": __vite_glob_0_117, "./components/u-th/u-th.vue": __vite_glob_0_118, "./components/u-title/u-title.vue": __vite_glob_0_119, "./components/u-toast/u-toast.vue": __vite_glob_0_120, "./components/u-toolbar/u-toolbar.vue": __vite_glob_0_121, "./components/u-tooltip/u-tooltip.vue": __vite_glob_0_122, "./components/u-tr/u-tr.vue": __vite_glob_0_123, "./components/u-transition/u-transition.vue": __vite_glob_0_124, "./components/u-tree/u-tree.vue": __vite_glob_0_125, "./components/u-upload/u-upload.vue": __vite_glob_0_126, "./components/u-view/u-view.vue": __vite_glob_0_127, "./components/u-virtual-list/u-virtual-list.vue": __vite_glob_0_128, "./components/u-waterfall/u-waterfall.vue": __vite_glob_0_129 });
  48621. let components = [];
  48622. for (const key in importFn) {
  48623. let component = importFn[key].default;
  48624. if (component.name && component.name.indexOf("u--") !== 0) {
  48625. component.install = function(Vue2) {
  48626. Vue2.component(name, component);
  48627. };
  48628. components.push(component);
  48629. }
  48630. }
  48631. const install = (Vue2, upuiParams = "") => {
  48632. components.forEach(function(component) {
  48633. const name2 = component.name.replace(/u-([a-zA-Z0-9-_]+)/g, "up-$1");
  48634. if (name2 != component.name) {
  48635. Vue2.component(component.name, component);
  48636. }
  48637. Vue2.component(name2, component);
  48638. });
  48639. if (upuiParams) {
  48640. uni.upuiParams = upuiParams;
  48641. let temp = upuiParams();
  48642. if (temp.httpIns) {
  48643. temp.httpIns(http);
  48644. }
  48645. if (temp.options) {
  48646. setConfig(temp.options);
  48647. }
  48648. }
  48649. uni.$u = $u;
  48650. Vue2.config.globalProperties.$u = $u;
  48651. Vue2.mixin(mixin);
  48652. };
  48653. const uviewPlus = {
  48654. install
  48655. };
  48656. const _sfc_main$7 = {
  48657. __name: "index",
  48658. props: {
  48659. /**
  48660. * @param add 新增评论
  48661. * @param reply 回复评论
  48662. */
  48663. commentType: {
  48664. type: String,
  48665. default: "add"
  48666. }
  48667. },
  48668. emits: ["clickComment", "moveMessageTop", "inputDone"],
  48669. setup(__props, { expose: __expose, emit: __emit }) {
  48670. __expose();
  48671. const { Toast: Toast2 } = useToast();
  48672. const emit = __emit;
  48673. const props2 = __props;
  48674. const showActionSheet = vue.ref(false);
  48675. function closeActionSheet() {
  48676. showActionSheet.value = false;
  48677. }
  48678. function clickActionSheet(item) {
  48679. if (item.value === 0) {
  48680. handleDeleteComment();
  48681. } else if (item.value === 1) {
  48682. let comment = null;
  48683. if (pressTwoLevelId.value !== 0) {
  48684. const result = findCommentById(pressTwoLevelId.value, "two");
  48685. if (result && result.twoItem) {
  48686. comment = result.twoItem;
  48687. }
  48688. } else if (pressOneLevelId.value !== 0) {
  48689. comment = findCommentById(pressOneLevelId.value, "one");
  48690. }
  48691. if (comment) {
  48692. handleClickComment(comment);
  48693. }
  48694. }
  48695. showActionSheet.value = false;
  48696. }
  48697. async function handleDeleteComment() {
  48698. try {
  48699. await deleteComment(deleteId.value);
  48700. Toast2({ title: "删除成功" });
  48701. removeItemComment();
  48702. } catch (error2) {
  48703. formatAppLog("error", "at components/comment/index.vue:236", "deleteComment", error2);
  48704. } finally {
  48705. pressOneLevelId.value = pressTwoLevelId.value = deleteId.value = 0;
  48706. }
  48707. }
  48708. function removeItemComment() {
  48709. if (pressOneLevelId.value !== 0 && pressTwoLevelId.value === 0) {
  48710. const oneItem = findCommentById(pressOneLevelId.value, "one");
  48711. if (oneItem) {
  48712. const itemIndex = oneCommentList.value.findIndex(
  48713. (v2) => v2.id === oneItem.id
  48714. );
  48715. if (itemIndex !== -1) {
  48716. oneCommentList.value.splice(itemIndex, 1);
  48717. }
  48718. }
  48719. } else if (pressTwoLevelId.value !== 0) {
  48720. const result = findCommentById(pressTwoLevelId.value, "two");
  48721. if (result && result.oneItem && result.twoItem) {
  48722. const twoIndex = result.oneItem.replyList.findIndex(
  48723. (two) => two.id === result.twoItem.id
  48724. );
  48725. if (twoIndex !== -1) {
  48726. result.oneItem.replyList.splice(twoIndex, 1);
  48727. }
  48728. }
  48729. }
  48730. }
  48731. function findCommentById(id, type2 = "one") {
  48732. if (type2 === "one") {
  48733. return oneCommentList.value.find((item) => item.id === id) || null;
  48734. } else if (type2 === "two") {
  48735. for (const oneItem of oneCommentList.value) {
  48736. if (Array.isArray(oneItem.replyList)) {
  48737. const twoItem = oneItem.replyList.find((two) => two.id === id);
  48738. if (twoItem) {
  48739. return { oneItem, twoItem };
  48740. }
  48741. }
  48742. }
  48743. return null;
  48744. }
  48745. return null;
  48746. }
  48747. const deleteId = vue.ref(0);
  48748. const pressOneLevelId = vue.ref(0);
  48749. const pressTwoLevelId = vue.ref(0);
  48750. function longpress(event) {
  48751. var _a2, _b, _c;
  48752. if ((_a2 = event.currentTarget.dataset) == null ? void 0 : _a2.twoLevelId) {
  48753. deleteId.value = pressTwoLevelId.value = event.currentTarget.dataset.twoLevelId;
  48754. } else if ((_b = event.currentTarget.dataset) == null ? void 0 : _b.oneLevelId) {
  48755. deleteId.value = pressOneLevelId.value = (_c = event.currentTarget.dataset) == null ? void 0 : _c.oneLevelId;
  48756. }
  48757. showActionSheet.value = true;
  48758. }
  48759. const actionList = vue.computed(() => {
  48760. return [
  48761. { name: "删除", value: 0 },
  48762. { name: "回复", value: 1 }
  48763. ];
  48764. });
  48765. const articleId = vue.ref("");
  48766. onLoad((options2) => {
  48767. if (!options2.id)
  48768. return;
  48769. articleId.value = options2.id;
  48770. });
  48771. const oneCommentList = vue.ref([]);
  48772. const parentId = vue.ref(0);
  48773. const currentReplyId = vue.ref(0);
  48774. const replyId = vue.ref(0);
  48775. const oneLevelId = vue.ref(0);
  48776. function handleClickComment(comment) {
  48777. if (comment.parentId === 0) {
  48778. currentReplyId.value = comment.id;
  48779. parentId.value = comment.id;
  48780. oneLevelId.value = comment.id;
  48781. } else {
  48782. currentReplyId.value = comment.id;
  48783. parentId.value = comment.parentId;
  48784. oneLevelId.value = comment.oneLevelId;
  48785. }
  48786. replyId.value = comment.userId;
  48787. emit("clickComment", comment);
  48788. }
  48789. function closeF2() {
  48790. }
  48791. const paging = vue.ref(null);
  48792. useZPaging(paging);
  48793. function queryList(page2, pageSize) {
  48794. }
  48795. const likeLoading = vue.ref(false);
  48796. const likeAnimationIds = vue.ref([]);
  48797. function toUserPage(id) {
  48798. uni.navigateTo({ url: `/pages/user/personal?id=${id}` });
  48799. }
  48800. const __returned__ = { Toast: Toast2, emit, props: props2, showActionSheet, closeActionSheet, clickActionSheet, handleDeleteComment, removeItemComment, findCommentById, deleteId, pressOneLevelId, pressTwoLevelId, longpress, actionList, articleId, oneCommentList, parentId, currentReplyId, replyId, oneLevelId, handleClickComment, closeF2, paging, queryList, likeLoading, likeAnimationIds, toUserPage, ref: vue.ref, computed: vue.computed, get useZPaging() {
  48801. return useZPaging;
  48802. }, get onLoad() {
  48803. return onLoad;
  48804. }, get timeFormat() {
  48805. return timeFormat;
  48806. }, get useToast() {
  48807. return useToast;
  48808. } };
  48809. Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
  48810. return __returned__;
  48811. }
  48812. };
  48813. function _sfc_render$6(_ctx, _cache, $props, $setup, $data, $options) {
  48814. const _component_up_avatar = vue.resolveComponent("up-avatar");
  48815. const _component_uni_icons = resolveEasycom(vue.resolveDynamicComponent("uni-icons"), __easycom_0$g);
  48816. const _component_z_paging = resolveEasycom(vue.resolveDynamicComponent("z-paging"), __easycom_1$5);
  48817. const _component_up_action_sheet = vue.resolveComponent("up-action-sheet");
  48818. return vue.openBlock(), vue.createElementBlock(
  48819. vue.Fragment,
  48820. null,
  48821. [
  48822. vue.createVNode(_component_z_paging, {
  48823. ref: "paging",
  48824. "use-page-scroll": "",
  48825. onCloseF2: $setup.closeF2,
  48826. modelValue: $setup.oneCommentList,
  48827. "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => $setup.oneCommentList = $event),
  48828. onQuery: $setup.queryList,
  48829. class: "comment-paging"
  48830. }, {
  48831. default: vue.withCtx(() => [
  48832. (vue.openBlock(true), vue.createElementBlock(
  48833. vue.Fragment,
  48834. null,
  48835. vue.renderList($setup.oneCommentList, (oneItem) => {
  48836. return vue.openBlock(), vue.createElementBlock("view", {
  48837. class: "comment-box",
  48838. key: oneItem.id
  48839. }, [
  48840. vue.createCommentVNode(" 一级评论 "),
  48841. vue.createElementVNode(
  48842. "view",
  48843. {
  48844. class: vue.normalizeClass([
  48845. "item-comment",
  48846. oneItem.replyList && oneItem.replyList.length > 0 ? "child" : ""
  48847. ])
  48848. },
  48849. [
  48850. vue.createElementVNode("view", { class: "avatar" }, [
  48851. vue.createVNode(_component_up_avatar, {
  48852. onClick: ($event) => $setup.toUserPage(oneItem.userId),
  48853. shape: "circle",
  48854. src: oneItem.usePicture
  48855. }, null, 8, ["onClick", "src"])
  48856. ]),
  48857. vue.createElementVNode("view", { class: "content" }, [
  48858. vue.createElementVNode("view", {
  48859. class: "user-box",
  48860. onClick: ($event) => $setup.toUserPage(oneItem.userId)
  48861. }, [
  48862. vue.createElementVNode(
  48863. "text",
  48864. { class: "username" },
  48865. vue.toDisplayString(oneItem.userName),
  48866. 1
  48867. /* TEXT */
  48868. ),
  48869. oneItem.authorMark ? (vue.openBlock(), vue.createElementBlock("text", {
  48870. key: 0,
  48871. class: "author-tag"
  48872. }, "作者")) : vue.createCommentVNode("v-if", true)
  48873. ], 8, ["onClick"]),
  48874. vue.createElementVNode("view", {
  48875. onLongpress: $setup.longpress,
  48876. "data-one-level-id": oneItem.id,
  48877. class: "reply-box",
  48878. onClick: ($event) => $setup.handleClickComment(oneItem)
  48879. }, [
  48880. vue.createElementVNode(
  48881. "text",
  48882. { class: "text" },
  48883. vue.toDisplayString(oneItem.content),
  48884. 1
  48885. /* TEXT */
  48886. ),
  48887. vue.createElementVNode(
  48888. "text",
  48889. { class: "time" },
  48890. vue.toDisplayString($setup.timeFormat(oneItem.createTime, "yyyy-mm-dd")),
  48891. 1
  48892. /* TEXT */
  48893. ),
  48894. vue.createElementVNode("text", { class: "reply-tip" }, "回复")
  48895. ], 40, ["data-one-level-id", "onClick"])
  48896. ]),
  48897. vue.createElementVNode("view", { class: "right-box" }, [
  48898. vue.withDirectives(vue.createVNode(_component_uni_icons, {
  48899. customPrefix: "iconfont",
  48900. size: "18",
  48901. color: "#2E2E2E",
  48902. class: vue.normalizeClass(["icon-state icon-dianzan", {
  48903. animated: $setup.likeAnimationIds.includes(oneItem.id),
  48904. heartBeat: $setup.likeAnimationIds.includes(oneItem.id)
  48905. }])
  48906. }, null, 8, ["class"]), [
  48907. [vue.vShow, !oneItem.likeMark]
  48908. ]),
  48909. vue.withDirectives(vue.createVNode(_component_uni_icons, {
  48910. customPrefix: "iconfont",
  48911. size: "18",
  48912. color: "#FF2442",
  48913. class: vue.normalizeClass(["icon-state icon-dianzanxuanzhong", {
  48914. animated: $setup.likeAnimationIds.includes(oneItem.id),
  48915. heartBeat: $setup.likeAnimationIds.includes(oneItem.id)
  48916. }])
  48917. }, null, 8, ["class"]), [
  48918. [vue.vShow, oneItem.likeMark]
  48919. ]),
  48920. vue.createElementVNode(
  48921. "text",
  48922. { class: "count" },
  48923. vue.toDisplayString(oneItem.likeCount),
  48924. 1
  48925. /* TEXT */
  48926. )
  48927. ])
  48928. ],
  48929. 2
  48930. /* CLASS */
  48931. ),
  48932. vue.createCommentVNode(" 二级评论 "),
  48933. oneItem.replyList && oneItem.replyList.length > 0 ? (vue.openBlock(), vue.createElementBlock("div", {
  48934. key: 0,
  48935. class: "child-comment-box"
  48936. }, [
  48937. (vue.openBlock(true), vue.createElementBlock(
  48938. vue.Fragment,
  48939. null,
  48940. vue.renderList(oneItem.replyList, (twoItem, idx) => {
  48941. return vue.openBlock(), vue.createElementBlock("view", {
  48942. class: "item-comment sub-comment",
  48943. key: idx
  48944. }, [
  48945. vue.createElementVNode("view", { class: "avatar" }, [
  48946. vue.createVNode(_component_up_avatar, {
  48947. class: "sub-avatar",
  48948. shape: "circle",
  48949. size: "25",
  48950. src: twoItem.usePicture
  48951. }, null, 8, ["src"])
  48952. ]),
  48953. vue.createElementVNode("view", { class: "content" }, [
  48954. vue.createElementVNode("view", { class: "user-box" }, [
  48955. vue.createElementVNode(
  48956. "text",
  48957. { class: "username" },
  48958. vue.toDisplayString(twoItem.userName),
  48959. 1
  48960. /* TEXT */
  48961. ),
  48962. twoItem.authorMark ? (vue.openBlock(), vue.createElementBlock("text", {
  48963. key: 0,
  48964. class: "author-tag"
  48965. }, "作者")) : vue.createCommentVNode("v-if", true)
  48966. ]),
  48967. vue.createElementVNode("view", {
  48968. onLongpress: $setup.longpress,
  48969. "data-one-level-id": oneItem.id,
  48970. "data-two-level-id": twoItem.id,
  48971. class: "reply-box"
  48972. }, [
  48973. twoItem.replyMark ? (vue.openBlock(), vue.createElementBlock("text", {
  48974. key: 0,
  48975. class: "text"
  48976. }, [
  48977. vue.createTextVNode("回复"),
  48978. vue.createElementVNode(
  48979. "text",
  48980. null,
  48981. vue.toDisplayString(twoItem.replyName) + ": ",
  48982. 1
  48983. /* TEXT */
  48984. ),
  48985. vue.createTextVNode(
  48986. vue.toDisplayString(twoItem.content),
  48987. 1
  48988. /* TEXT */
  48989. )
  48990. ])) : (vue.openBlock(), vue.createElementBlock(
  48991. "text",
  48992. {
  48993. key: 1,
  48994. class: "text"
  48995. },
  48996. vue.toDisplayString(twoItem.content),
  48997. 1
  48998. /* TEXT */
  48999. )),
  49000. vue.createElementVNode(
  49001. "text",
  49002. { class: "time" },
  49003. vue.toDisplayString($setup.timeFormat(twoItem.createTime, "yyyy-mm-dd")),
  49004. 1
  49005. /* TEXT */
  49006. ),
  49007. vue.createElementVNode("text", { class: "reply-tip" }, "回复")
  49008. ], 40, ["data-one-level-id", "data-two-level-id"])
  49009. ]),
  49010. vue.createElementVNode("view", { class: "right-box" }, [
  49011. vue.withDirectives(vue.createVNode(_component_uni_icons, {
  49012. customPrefix: "iconfont",
  49013. size: "18",
  49014. color: "#2E2E2E",
  49015. class: vue.normalizeClass(["icon-state icon-dianzan", {
  49016. animated: $setup.likeAnimationIds.includes(twoItem.id),
  49017. heartBeat: $setup.likeAnimationIds.includes(twoItem.id)
  49018. }])
  49019. }, null, 8, ["class"]), [
  49020. [vue.vShow, !twoItem.likeMark]
  49021. ]),
  49022. vue.withDirectives(vue.createVNode(_component_uni_icons, {
  49023. customPrefix: "iconfont",
  49024. size: "18",
  49025. color: "#FF2442",
  49026. class: vue.normalizeClass(["icon-state icon-dianzanxuanzhong", {
  49027. animated: $setup.likeAnimationIds.includes(twoItem.id),
  49028. heartBeat: $setup.likeAnimationIds.includes(twoItem.id)
  49029. }])
  49030. }, null, 8, ["class"]), [
  49031. [vue.vShow, twoItem.likeMark]
  49032. ]),
  49033. vue.createElementVNode(
  49034. "text",
  49035. { class: "count" },
  49036. vue.toDisplayString(twoItem.likeCount),
  49037. 1
  49038. /* TEXT */
  49039. )
  49040. ])
  49041. ]);
  49042. }),
  49043. 128
  49044. /* KEYED_FRAGMENT */
  49045. )),
  49046. oneItem.replyList && oneItem.replyList.length > 0 && oneItem.replyPage.hasMore && oneItem.replyCount > 1 ? (vue.openBlock(), vue.createElementBlock("view", {
  49047. key: 0,
  49048. class: "load-more"
  49049. }, [
  49050. vue.createCommentVNode(" <text>展示{{ twoItem.allReply }}条回复</text> "),
  49051. vue.createElementVNode("text", null, "展开更多回复")
  49052. ])) : vue.createCommentVNode("v-if", true)
  49053. ])) : vue.createCommentVNode("v-if", true)
  49054. ]);
  49055. }),
  49056. 128
  49057. /* KEYED_FRAGMENT */
  49058. ))
  49059. ]),
  49060. _: 1
  49061. /* STABLE */
  49062. }, 8, ["modelValue"]),
  49063. vue.createVNode(_component_up_action_sheet, {
  49064. actions: $setup.actionList,
  49065. closeOnClickOverlay: true,
  49066. cancelText: "取消",
  49067. show: $setup.showActionSheet,
  49068. onClose: $setup.closeActionSheet,
  49069. onSelect: $setup.clickActionSheet
  49070. }, null, 8, ["actions", "show"])
  49071. ],
  49072. 64
  49073. /* STABLE_FRAGMENT */
  49074. );
  49075. }
  49076. const Comment = /* @__PURE__ */ _export_sfc(_sfc_main$7, [["render", _sfc_render$6], ["__scopeId", "data-v-05fcfa07"], ["__file", "C:/Users/EDY/Desktop/项目/shuibei/components/comment/index.vue"]]);
  49077. const _sfc_main$6 = {
  49078. __name: "index",
  49079. props: {
  49080. // 是否已关注
  49081. followed: {
  49082. type: Boolean,
  49083. default: false
  49084. },
  49085. // 被关注用户ID
  49086. followedId: {
  49087. type: [String, Number],
  49088. required: true
  49089. },
  49090. textType: {
  49091. type: String,
  49092. default: "default"
  49093. // 可选值 fans
  49094. },
  49095. showBtn: {
  49096. type: Boolean,
  49097. default: true
  49098. },
  49099. activeStyle: {
  49100. type: Object,
  49101. default: () => ({})
  49102. },
  49103. inactiveStyle: {
  49104. type: Object,
  49105. default: () => ({})
  49106. }
  49107. },
  49108. emits: ["update:followed", "follow-change"],
  49109. setup(__props, { expose: __expose, emit: __emit }) {
  49110. __expose();
  49111. const defaultActiveStyle = {
  49112. border: "1px solid #999",
  49113. color: "#333"
  49114. };
  49115. const defaultInactiveStyle = {
  49116. border: "1px solid #ff2442",
  49117. color: "#ff2442"
  49118. };
  49119. const { Toast: Toast2 } = useToast();
  49120. const props2 = __props;
  49121. const isOwner = vue.computed(() => {
  49122. });
  49123. const currentStyle = vue.computed(() => {
  49124. if (isFollowed.value) {
  49125. return { ...defaultActiveStyle, ...props2.activeStyle || {} };
  49126. } else {
  49127. return { ...defaultInactiveStyle, ...props2.inactiveStyle || {} };
  49128. }
  49129. });
  49130. const emit = __emit;
  49131. const isFollowed = vue.ref(props2.followed);
  49132. const showFollowModal = vue.ref(false);
  49133. const followLoading = vue.ref(false);
  49134. vue.watch(
  49135. () => props2.followed,
  49136. (newVal) => {
  49137. isFollowed.value = newVal;
  49138. }
  49139. );
  49140. async function handleFollow() {
  49141. formatAppLog("log", "at components/followBtn/index.vue:114", "点击关注按钮");
  49142. if (isFollowed.value) {
  49143. showFollowModal.value = true;
  49144. }
  49145. }
  49146. function confirmFollowModal() {
  49147. showFollowModal.value = false;
  49148. }
  49149. function cancelFollowModal() {
  49150. showFollowModal.value = false;
  49151. }
  49152. const __returned__ = { defaultActiveStyle, defaultInactiveStyle, Toast: Toast2, props: props2, isOwner, currentStyle, emit, isFollowed, showFollowModal, followLoading, handleFollow, confirmFollowModal, cancelFollowModal, ref: vue.ref, watch: vue.watch, computed: vue.computed, onMounted: vue.onMounted, get useToast() {
  49153. return useToast;
  49154. } };
  49155. Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
  49156. return __returned__;
  49157. }
  49158. };
  49159. function _sfc_render$5(_ctx, _cache, $props, $setup, $data, $options) {
  49160. const _component_up_modal = vue.resolveComponent("up-modal");
  49161. return vue.withDirectives((vue.openBlock(), vue.createElementBlock(
  49162. "view",
  49163. { class: "follow-container" },
  49164. [
  49165. vue.createCommentVNode(" 关注按钮 "),
  49166. vue.createElementVNode(
  49167. "view",
  49168. {
  49169. onClick: $setup.handleFollow,
  49170. class: vue.normalizeClass(["follow-box", $setup.isFollowed ? "follow" : "", $setup.currentStyle]),
  49171. style: vue.normalizeStyle($setup.currentStyle)
  49172. },
  49173. [
  49174. vue.createElementVNode("text", null, [
  49175. $props.textType === "default" ? (vue.openBlock(), vue.createElementBlock(
  49176. vue.Fragment,
  49177. { key: 0 },
  49178. [
  49179. vue.createTextVNode(
  49180. vue.toDisplayString($setup.isFollowed ? "已关注" : "关注"),
  49181. 1
  49182. /* TEXT */
  49183. )
  49184. ],
  49185. 64
  49186. /* STABLE_FRAGMENT */
  49187. )) : (vue.openBlock(), vue.createElementBlock(
  49188. vue.Fragment,
  49189. { key: 1 },
  49190. [
  49191. vue.createCommentVNode(" 粉丝列表展示文案不一样 "),
  49192. $setup.isFollowed ? (vue.openBlock(), vue.createElementBlock(
  49193. vue.Fragment,
  49194. { key: 0 },
  49195. [
  49196. vue.createTextVNode("互相关注")
  49197. ],
  49198. 64
  49199. /* STABLE_FRAGMENT */
  49200. )) : (vue.openBlock(), vue.createElementBlock(
  49201. vue.Fragment,
  49202. { key: 1 },
  49203. [
  49204. vue.createTextVNode("回关")
  49205. ],
  49206. 64
  49207. /* STABLE_FRAGMENT */
  49208. ))
  49209. ],
  49210. 64
  49211. /* STABLE_FRAGMENT */
  49212. ))
  49213. ])
  49214. ],
  49215. 6
  49216. /* CLASS, STYLE */
  49217. ),
  49218. vue.createCommentVNode(" 取关确认弹窗 "),
  49219. vue.createVNode(_component_up_modal, {
  49220. showCancelButton: true,
  49221. confirmText: "不再关注",
  49222. cancelText: "取消",
  49223. onConfirm: $setup.confirmFollowModal,
  49224. onCancel: $setup.cancelFollowModal,
  49225. show: $setup.showFollowModal,
  49226. title: "不再关注该作者?"
  49227. }, null, 8, ["show"])
  49228. ],
  49229. 512
  49230. /* NEED_PATCH */
  49231. )), [
  49232. [vue.vShow, !$setup.isOwner]
  49233. ]);
  49234. }
  49235. const FollowBtn = /* @__PURE__ */ _export_sfc(_sfc_main$6, [["render", _sfc_render$5], ["__scopeId", "data-v-ca095d49"], ["__file", "C:/Users/EDY/Desktop/项目/shuibei/components/followBtn/index.vue"]]);
  49236. const _sfc_main$5 = {
  49237. __name: "index",
  49238. setup(__props, { expose: __expose }) {
  49239. __expose();
  49240. const {
  49241. Toast: Toast2
  49242. } = useToast();
  49243. const goShuiBei = () => {
  49244. {
  49245. window.location.href = "weixin://dl/business/?t=HZ2gBmGKRzp";
  49246. }
  49247. };
  49248. const instance = vue.getCurrentInstance();
  49249. const articleId = vue.ref("");
  49250. const detail = vue.ref(null);
  49251. const isOwner = vue.computed(() => {
  49252. });
  49253. onLoad((options2) => {
  49254. articleId.value = options2.id || "101";
  49255. fetchArticleDetail();
  49256. });
  49257. onReady(() => {
  49258. uni.onKeyboardHeightChange && uni.onKeyboardHeightChange(listenerKeybord);
  49259. });
  49260. onShow(() => {
  49261. uni.$on("followStateChanged", handleFollowStateChanged);
  49262. });
  49263. onHide(() => {
  49264. uni.offKeyboardHeightChange && uni.offKeyboardHeightChange(listenerKeybord);
  49265. uni.$off("followStateChanged", handleFollowStateChanged);
  49266. });
  49267. function clickSwiper(index2) {
  49268. var _a2;
  49269. formatAppLog("log", "at pages/article_details/index.vue:225", "index", index2);
  49270. uni.previewImage({
  49271. current: index2,
  49272. urls: ((_a2 = detail.value) == null ? void 0 : _a2.imageUrlList) || []
  49273. });
  49274. }
  49275. function listenerKeybord(res) {
  49276. if (res.height === 0) {
  49277. keybordHeight.value = 0;
  49278. } else {
  49279. uni.getSystemInfo({
  49280. success(systemRes) {
  49281. const screenHeight = systemRes.screenHeight;
  49282. const windowHeight = systemRes.windowHeight;
  49283. const disHeight = screenHeight - windowHeight;
  49284. keybordHeight.value = res.height - disHeight;
  49285. }
  49286. });
  49287. }
  49288. }
  49289. async function fetchArticleDetail() {
  49290. try {
  49291. uni.showLoading({
  49292. title: "加载中",
  49293. mask: true
  49294. });
  49295. const {
  49296. data
  49297. } = await getGoodDetailId(articleId.value);
  49298. detail.value = data;
  49299. uni.hideLoading();
  49300. } catch (error2) {
  49301. formatAppLog("error", "at pages/article_details/index.vue:261", "fetchArticleDetail", error2);
  49302. uni.hideLoading();
  49303. }
  49304. }
  49305. const commentText = vue.ref("");
  49306. function rightClick() {
  49307. }
  49308. const goBack = () => {
  49309. const pages2 = getCurrentPages();
  49310. if (pages2.length > 1) {
  49311. uni.navigateBack();
  49312. } else {
  49313. uni.switchTab({
  49314. url: "/pages/index/index"
  49315. });
  49316. }
  49317. };
  49318. const showActionPopup = vue.ref(false);
  49319. function handleActions() {
  49320. showActionPopup.value = true;
  49321. }
  49322. function handleDelete() {
  49323. showActionPopup.value = false;
  49324. uni.showModal({
  49325. title: "提示",
  49326. content: "确认删除?",
  49327. success: async function(res) {
  49328. if (res.confirm)
  49329. ;
  49330. }
  49331. });
  49332. }
  49333. function toUserPage() {
  49334. uni.navigateTo({
  49335. url: `/pages/user/personal?id=${detail.value.userId}`
  49336. });
  49337. }
  49338. const commentType = vue.ref("add");
  49339. const commentInputPl = vue.ref("说点什么...");
  49340. function clickComment(comment) {
  49341. const username = comment.userName;
  49342. commentType.value = "reply";
  49343. commentInputPl.value = `回复 @${username}`;
  49344. keybordFocus.value = true;
  49345. }
  49346. const confirmHold = vue.ref(true);
  49347. const commentRef = vue.ref();
  49348. function handleInputConfirm(event) {
  49349. var _a2;
  49350. if (((_a2 = commentText.value) == null ? void 0 : _a2.trim()) === "") {
  49351. confirmHold.value = true;
  49352. return Toast2({
  49353. title: "有内容才能发送哦"
  49354. });
  49355. }
  49356. confirmHold.value = false;
  49357. commentRef.value.handleAddComment(commentText.value);
  49358. }
  49359. function inputDone() {
  49360. commentText.value = "";
  49361. }
  49362. const commentSection = vue.ref();
  49363. const commentOffsetTop = vue.ref(0);
  49364. vue.watch(
  49365. () => detail.value,
  49366. async (val, oldVal) => {
  49367. if (val && !oldVal) {
  49368. await vue.nextTick();
  49369. const query = uni.createSelectorQuery().in(instance.proxy);
  49370. query.select(".comment-section").boundingClientRect((data) => {
  49371. if (data.top) {
  49372. commentOffsetTop.value = data.top - 60;
  49373. }
  49374. }).exec();
  49375. }
  49376. }
  49377. );
  49378. function clickMessageIcon() {
  49379. uni.pageScrollTo({
  49380. scrollTop: commentOffsetTop.value,
  49381. // selector: ".fixed-view",
  49382. success() {
  49383. formatAppLog("log", "at pages/article_details/index.vue:374", "success");
  49384. },
  49385. fail(e2) {
  49386. formatAppLog("error", "at pages/article_details/index.vue:377", `scrollTo error ${e2}`);
  49387. }
  49388. });
  49389. }
  49390. const collectionLoading = vue.ref(false);
  49391. async function handleCollection() {
  49392. try {
  49393. if (collectionLoading.value)
  49394. return;
  49395. collectionLoading.value = true;
  49396. await setUserState({
  49397. type: 1,
  49398. bookId: detail.value.id
  49399. });
  49400. detail.value.collectMark = !detail.value.collectMark;
  49401. if (detail.value.collectMark) {
  49402. detail.value.collectCount += 1;
  49403. } else {
  49404. detail.value.collectCount -= 1;
  49405. }
  49406. collectionLoading.value = false;
  49407. } catch (error2) {
  49408. formatAppLog("error", "at pages/article_details/index.vue:402", "collection error", error2);
  49409. collectionLoading.value = false;
  49410. }
  49411. }
  49412. const likeLoading = vue.ref(false);
  49413. const likeAnimation = vue.ref(false);
  49414. async function handleLike() {
  49415. try {
  49416. if (likeLoading.value)
  49417. return;
  49418. likeLoading.value = true;
  49419. await setUserState({
  49420. type: 0,
  49421. bookId: detail.value.id
  49422. });
  49423. detail.value.likeMark = !detail.value.likeMark;
  49424. if (detail.value.likeMark) {
  49425. likeAnimation.value = true;
  49426. detail.value.likeCount += 1;
  49427. } else {
  49428. likeAnimation.value = false;
  49429. detail.value.likeCount -= 1;
  49430. }
  49431. likeLoading.value = false;
  49432. } catch (error2) {
  49433. likeLoading.value = false;
  49434. Toast2({
  49435. title: "点赞失败"
  49436. });
  49437. formatAppLog("error", "at pages/article_details/index.vue:435", "handleLike", error2);
  49438. }
  49439. }
  49440. const keybordHeight = vue.ref(0);
  49441. const keybordOverlay = vue.ref(true);
  49442. const keybordFocus = vue.ref(false);
  49443. function commentInputFocus(event) {
  49444. }
  49445. function commentInputBlur() {
  49446. keybordHeight.value = 0;
  49447. keybordFocus.value = false;
  49448. }
  49449. function clickFooterInput() {
  49450. formatAppLog("log", "at pages/article_details/index.vue:463", "点击了底部Input");
  49451. commentInputPl.value = "说点什么...";
  49452. commentType.value = "add";
  49453. keybordFocus.value = true;
  49454. }
  49455. function handleFollowStateChanged(data) {
  49456. var _a2;
  49457. if (Number(data.userId) === Number((_a2 = detail.value) == null ? void 0 : _a2.userId)) {
  49458. detail.value.followMark = data.followMark;
  49459. }
  49460. }
  49461. const __returned__ = { Toast: Toast2, goShuiBei, instance, articleId, detail, isOwner, clickSwiper, listenerKeybord, fetchArticleDetail, commentText, rightClick, goBack, showActionPopup, handleActions, handleDelete, toUserPage, commentType, commentInputPl, clickComment, confirmHold, commentRef, handleInputConfirm, inputDone, commentSection, commentOffsetTop, clickMessageIcon, collectionLoading, handleCollection, likeLoading, likeAnimation, handleLike, keybordHeight, keybordOverlay, keybordFocus, commentInputFocus, commentInputBlur, clickFooterInput, handleFollowStateChanged, ref: vue.ref, watch: vue.watch, getCurrentInstance: vue.getCurrentInstance, nextTick: vue.nextTick, computed: vue.computed, get onLoad() {
  49462. return onLoad;
  49463. }, get onReady() {
  49464. return onReady;
  49465. }, get onHide() {
  49466. return onHide;
  49467. }, get onShow() {
  49468. return onShow;
  49469. }, get useToast() {
  49470. return useToast;
  49471. }, get getArticleDetailId() {
  49472. return getArticleDetailId;
  49473. }, get getGoodDetailId() {
  49474. return getGoodDetailId;
  49475. }, get Comment() {
  49476. return Comment;
  49477. }, get FollowBtn() {
  49478. return FollowBtn;
  49479. } };
  49480. Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
  49481. return __returned__;
  49482. }
  49483. };
  49484. function _sfc_render$4(_ctx, _cache, $props, $setup, $data, $options) {
  49485. const _component_up_overlay = vue.resolveComponent("up-overlay");
  49486. const _component_uni_icons = resolveEasycom(vue.resolveDynamicComponent("uni-icons"), __easycom_0$g);
  49487. const _component_up_tabbar = vue.resolveComponent("up-tabbar");
  49488. const _component_up_popup = vue.resolveComponent("up-popup");
  49489. return $setup.detail ? (vue.openBlock(), vue.createElementBlock("view", {
  49490. key: 0,
  49491. class: "page-container"
  49492. }, [
  49493. vue.createCommentVNode(" 自定义导航栏 "),
  49494. vue.createCommentVNode(` <up-navbar height="60px" class="nav-bar" @rightClick="rightClick">\r
  49495. <template #left>\r
  49496. <uni-icons @click="goBack" type="left" size="26"></uni-icons>\r
  49497. <view class="user-box" @click="toUserPage">\r
  49498. <up-avatar\r
  49499. class="user-avatar"\r
  49500. :src="detail.usePicture || ''"\r
  49501. shape="circle"\r
  49502. ></up-avatar>\r
  49503. <text class="username">{{ detail.userName }}</text>\r
  49504. </view>\r
  49505. </template>\r
  49506. <template #center> </template>\r
  49507. <template #right>\r
  49508. <FollowBtn\r
  49509. :followed="detail.followMark"\r
  49510. :followedId="detail.userId"\r
  49511. @update:followed="(val) => (detail.followMark = val)"\r
  49512. />\r
  49513. <view @click="handleActions" class="actions" v-if="isOwner">\r
  49514. <uni-icons size="24" type="more-filled"></uni-icons>\r
  49515. </view>\r
  49516. </template>\r
  49517. </up-navbar> `),
  49518. vue.createCommentVNode(" 内容区域 "),
  49519. vue.createElementVNode("view", { class: "content-box" }, [
  49520. vue.createElementVNode("view", { class: "content-container" }, [
  49521. vue.createCommentVNode(" 主体内容 "),
  49522. vue.createElementVNode("view", { class: "post-content" }, [
  49523. vue.createElementVNode("view", { class: "post-image" }, [
  49524. vue.createElementVNode("view", { class: "image-list-box" }, [
  49525. vue.createElementVNode("image", {
  49526. src: $setup.detail.coverImage,
  49527. mode: "",
  49528. class: "coverImage"
  49529. }, null, 8, ["src"]),
  49530. vue.createCommentVNode(' <up-swiper\r\n \r\n indicatorMode="dot"\r\n bgColor="#fff"\r\n imgMode="widthFix"\r\n :autoplay="false"\r\n @click="clickSwiper"\r\n height="540"\r\n :list="[detail.coverImage]"\r\n ></up-swiper> ')
  49531. ]),
  49532. vue.createCommentVNode(' <view v-else class="image-box">\r\n <image :src="detail.imageUrlList[0]" mode="widthFix" />\r\n </view> ')
  49533. ]),
  49534. vue.createElementVNode("view", { class: "post-box" }, [
  49535. vue.createElementVNode("view", { class: "post-title" }, [
  49536. vue.createElementVNode(
  49537. "text",
  49538. null,
  49539. vue.toDisplayString($setup.detail.title),
  49540. 1
  49541. /* TEXT */
  49542. )
  49543. ]),
  49544. vue.createElementVNode("view", { class: "post-text" }, [
  49545. vue.createElementVNode(
  49546. "text",
  49547. null,
  49548. vue.toDisplayString($setup.detail.content),
  49549. 1
  49550. /* TEXT */
  49551. )
  49552. ]),
  49553. vue.createElementVNode("view", { class: "post-info" }, [
  49554. vue.createElementVNode(
  49555. "text",
  49556. { class: "post-time" },
  49557. vue.toDisplayString($setup.detail.publishTime),
  49558. 1
  49559. /* TEXT */
  49560. ),
  49561. vue.createCommentVNode(' <text class="post-views">共{{ detail.commentCount }}条评论</text> ')
  49562. ])
  49563. ])
  49564. ]),
  49565. vue.createElementVNode("view", { class: "fixed-view" }),
  49566. vue.createCommentVNode(" 评论区 "),
  49567. vue.createElementVNode(
  49568. "view",
  49569. {
  49570. class: "comment-section",
  49571. ref: "commentSection"
  49572. },
  49573. [
  49574. vue.createElementVNode("view", { class: "comment-title" }, [
  49575. vue.createElementVNode(
  49576. "text",
  49577. null,
  49578. "全部评论 (" + vue.toDisplayString($setup.detail.commentCount) + ")",
  49579. 1
  49580. /* TEXT */
  49581. )
  49582. ]),
  49583. vue.createCommentVNode(" 评论列表 "),
  49584. vue.createVNode($setup["Comment"], {
  49585. commentType: $setup.commentType,
  49586. ref: "commentRef",
  49587. onClickComment: $setup.clickComment,
  49588. onMoveMessageTop: $setup.clickMessageIcon,
  49589. onInputDone: $setup.inputDone
  49590. }, null, 8, ["commentType"])
  49591. ],
  49592. 512
  49593. /* NEED_PATCH */
  49594. )
  49595. ])
  49596. ]),
  49597. vue.createCommentVNode(" 这里是底部input聚焦弹窗键盘时,真实输入框 "),
  49598. vue.createElementVNode(
  49599. "view",
  49600. {
  49601. class: vue.normalizeClass(["keybord-input-box", $setup.keybordHeight > 0 ? "keybord-fixed" : ""])
  49602. },
  49603. [
  49604. vue.createVNode(_component_up_overlay, {
  49605. show: $setup.keybordOverlay,
  49606. onClick: _cache[1] || (_cache[1] = ($event) => $setup.keybordHeight = 0)
  49607. }, {
  49608. default: vue.withCtx(() => [
  49609. vue.createElementVNode(
  49610. "view",
  49611. {
  49612. class: "overlay-input-box",
  49613. style: vue.normalizeStyle(
  49614. $setup.keybordHeight > 0 ? "--tabbar-bottom:" + $setup.keybordHeight + "px" : ""
  49615. )
  49616. },
  49617. [
  49618. vue.createElementVNode("view", { class: "comment-input-container" }, [
  49619. vue.withDirectives(vue.createElementVNode("input", {
  49620. focus: $setup.keybordFocus,
  49621. border: "none",
  49622. adjustPosition: false,
  49623. class: "comment-input",
  49624. type: "text",
  49625. "confirm-type": "send",
  49626. "auto-blur": true,
  49627. "confirm-hold": $setup.confirmHold,
  49628. "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => $setup.commentText = $event),
  49629. placeholder: $setup.commentInputPl,
  49630. onFocus: $setup.commentInputFocus,
  49631. onBlur: $setup.commentInputBlur,
  49632. onConfirm: $setup.handleInputConfirm
  49633. }, null, 40, ["focus", "confirm-hold", "placeholder"]), [
  49634. [vue.vModelText, $setup.commentText]
  49635. ])
  49636. ]),
  49637. vue.createElementVNode("view", {
  49638. class: "right-box",
  49639. onClick: $setup.handleInputConfirm
  49640. }, [
  49641. vue.createElementVNode("button", { type: "default" }, "发送")
  49642. ])
  49643. ],
  49644. 4
  49645. /* STYLE */
  49646. )
  49647. ]),
  49648. _: 1
  49649. /* STABLE */
  49650. }, 8, ["show"])
  49651. ],
  49652. 2
  49653. /* CLASS */
  49654. ),
  49655. vue.createCommentVNode(" 底部互动栏 "),
  49656. vue.createVNode(_component_up_tabbar, { class: "u-bottom-tabbar" }, {
  49657. default: vue.withCtx(() => [
  49658. vue.createElementVNode("view", { class: "toAPP" }, [
  49659. vue.createElementVNode("button", {
  49660. type: "default",
  49661. class: "storeAPP",
  49662. onClick: $setup.goShuiBei
  49663. }, "打开水贝商城")
  49664. ]),
  49665. vue.createElementVNode("view", { class: "bottom-bar" }, [
  49666. vue.createElementVNode("view", {
  49667. onClick: vue.withModifiers($setup.clickFooterInput, ["stop"]),
  49668. class: "comment-input-container"
  49669. }, [
  49670. vue.createElementVNode("input", {
  49671. border: "none",
  49672. adjustPosition: false,
  49673. class: "comment-input",
  49674. type: "text",
  49675. readonly: true,
  49676. disabled: true,
  49677. "confirm-type": "发送",
  49678. "auto-blur": true,
  49679. placeholder: "说点什么..."
  49680. })
  49681. ]),
  49682. vue.createElementVNode("view", { class: "right-box" }, [
  49683. vue.createElementVNode("view", {
  49684. class: "item",
  49685. onClick: $setup.handleLike
  49686. }, [
  49687. vue.createVNode(_component_uni_icons, {
  49688. type: "heart",
  49689. size: "24"
  49690. }),
  49691. vue.createElementVNode(
  49692. "text",
  49693. null,
  49694. vue.toDisplayString($setup.detail.likeCount),
  49695. 1
  49696. /* TEXT */
  49697. )
  49698. ]),
  49699. vue.createElementVNode("view", {
  49700. class: "item",
  49701. onClick: $setup.handleCollection
  49702. }, [
  49703. vue.createVNode(_component_uni_icons, {
  49704. type: "star",
  49705. size: "24"
  49706. }),
  49707. vue.createElementVNode(
  49708. "text",
  49709. null,
  49710. vue.toDisplayString($setup.detail.collectCount),
  49711. 1
  49712. /* TEXT */
  49713. )
  49714. ]),
  49715. vue.createElementVNode("view", {
  49716. class: "item",
  49717. onClick: $setup.clickMessageIcon
  49718. }, [
  49719. vue.createVNode(_component_uni_icons, {
  49720. type: "chat",
  49721. size: "24"
  49722. }),
  49723. vue.createElementVNode(
  49724. "text",
  49725. null,
  49726. vue.toDisplayString($setup.detail.commentCount),
  49727. 1
  49728. /* TEXT */
  49729. )
  49730. ])
  49731. ])
  49732. ])
  49733. ]),
  49734. _: 1
  49735. /* STABLE */
  49736. }),
  49737. vue.createCommentVNode(" 右上角操作popup "),
  49738. vue.createVNode(_component_up_popup, {
  49739. show: $setup.showActionPopup,
  49740. onClose: _cache[3] || (_cache[3] = ($event) => $setup.showActionPopup = false)
  49741. }, {
  49742. default: vue.withCtx(() => [
  49743. vue.createElementVNode("view", { class: "popup-box" }, [
  49744. vue.createElementVNode("view", {
  49745. class: "close-box",
  49746. onClick: _cache[2] || (_cache[2] = ($event) => $setup.showActionPopup = false)
  49747. }, [
  49748. vue.createVNode(_component_uni_icons, {
  49749. type: "closeempty",
  49750. size: "28"
  49751. })
  49752. ]),
  49753. vue.createElementVNode("view", { class: "header" }, [
  49754. vue.createElementVNode("view", { class: "title" }, "更多操作")
  49755. ]),
  49756. vue.createElementVNode("view", { class: "actions-menu" }, [
  49757. vue.createElementVNode("view", {
  49758. onClick: $setup.handleDelete,
  49759. class: "item-action"
  49760. }, [
  49761. vue.createElementVNode("view", { class: "icon-box" }, [
  49762. vue.createVNode(_component_uni_icons, {
  49763. type: "trash",
  49764. size: "28"
  49765. })
  49766. ]),
  49767. vue.createElementVNode("view", { class: "icon-name" }, "删除")
  49768. ])
  49769. ])
  49770. ])
  49771. ]),
  49772. _: 1
  49773. /* STABLE */
  49774. }, 8, ["show"])
  49775. ])) : vue.createCommentVNode("v-if", true);
  49776. }
  49777. const PagesArticleDetailsIndex = /* @__PURE__ */ _export_sfc(_sfc_main$5, [["render", _sfc_render$4], ["__scopeId", "data-v-04f1b7e6"], ["__file", "C:/Users/EDY/Desktop/项目/shuibei/pages/article_details/index.vue"]]);
  49778. const wechat = {};
  49779. const _imports_0$1 = "/static/images/stop.png";
  49780. const _sfc_main$4 = {
  49781. __name: "index",
  49782. props: {
  49783. imgUrls: {
  49784. type: Array,
  49785. default: () => []
  49786. },
  49787. videoline: {
  49788. type: String,
  49789. default: ""
  49790. }
  49791. },
  49792. setup(__props, { expose: __expose }) {
  49793. __expose();
  49794. const props2 = __props;
  49795. const indicatorDots = vue.ref(true);
  49796. const circular = vue.ref(true);
  49797. const autoplay = vue.ref(true);
  49798. const interval = vue.ref(3e3);
  49799. const duration = vue.ref(500);
  49800. const currents = vue.ref("1");
  49801. const controls = vue.ref(true);
  49802. const isPlay = vue.ref(true);
  49803. const videoContext = vue.ref("");
  49804. vue.onMounted(() => {
  49805. if (props2.videoline) {
  49806. props2.imgUrls.shift();
  49807. }
  49808. });
  49809. const bindPause = () => {
  49810. videoContext.value.play();
  49811. controls.value = false;
  49812. autoplay.value = false;
  49813. };
  49814. const change = (e2) => {
  49815. currents.value = e2.detail.current + 1;
  49816. };
  49817. const videoPause = (e2) => {
  49818. };
  49819. const __returned__ = { props: props2, indicatorDots, circular, autoplay, interval, duration, currents, controls, isPlay, videoContext, bindPause, change, videoPause, ref: vue.ref, onMounted: vue.onMounted };
  49820. Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
  49821. return __returned__;
  49822. }
  49823. };
  49824. function _sfc_render$3(_ctx, _cache, $props, $setup, $data, $options) {
  49825. return vue.openBlock(), vue.createElementBlock("view", { class: "product-bg" }, [
  49826. vue.createElementVNode("swiper", {
  49827. "indicator-dots": $setup.indicatorDots,
  49828. "indicator-active-color": "#e93323",
  49829. autoplay: $setup.autoplay,
  49830. circular: $setup.circular,
  49831. interval: $setup.interval,
  49832. duration: $setup.duration,
  49833. onChange: $setup.change
  49834. }, [
  49835. $props.videoline ? (vue.openBlock(), vue.createElementBlock("swiper-item", { key: 0 }, [
  49836. vue.createElementVNode("view", { class: "item" }, [
  49837. vue.withDirectives(vue.createElementVNode(
  49838. "view",
  49839. { style: { "width": "100%", "height": "100%" } },
  49840. [
  49841. vue.createElementVNode("video", {
  49842. id: "myVideo",
  49843. src: $props.videoline,
  49844. objectFit: "cover",
  49845. controls: "",
  49846. style: { "width": "100%", "height": "100%" },
  49847. "show-center-play-btn": "",
  49848. "show-mute-btn": "true",
  49849. "auto-pause-if-navigate": "",
  49850. "custom-cache": false,
  49851. "enable-progress-gesture": false,
  49852. poster: $props.imgUrls[0],
  49853. onPause: $setup.videoPause
  49854. }, null, 40, ["src", "poster"])
  49855. ],
  49856. 512
  49857. /* NEED_PATCH */
  49858. ), [
  49859. [vue.vShow, !$setup.controls]
  49860. ]),
  49861. vue.withDirectives(vue.createElementVNode(
  49862. "view",
  49863. { class: "poster" },
  49864. [
  49865. vue.createElementVNode("image", {
  49866. class: "image",
  49867. src: $props.imgUrls[0]
  49868. }, null, 8, ["src"])
  49869. ],
  49870. 512
  49871. /* NEED_PATCH */
  49872. ), [
  49873. [vue.vShow, $setup.controls]
  49874. ]),
  49875. vue.withDirectives(vue.createElementVNode(
  49876. "view",
  49877. {
  49878. class: "stop",
  49879. onClick: $setup.bindPause
  49880. },
  49881. [
  49882. vue.createElementVNode("image", {
  49883. class: "image",
  49884. src: _imports_0$1
  49885. })
  49886. ],
  49887. 512
  49888. /* NEED_PATCH */
  49889. ), [
  49890. [vue.vShow, $setup.controls]
  49891. ])
  49892. ])
  49893. ])) : vue.createCommentVNode("v-if", true),
  49894. (vue.openBlock(true), vue.createElementBlock(
  49895. vue.Fragment,
  49896. null,
  49897. vue.renderList($props.imgUrls, (item, index2) => {
  49898. return vue.openBlock(), vue.createElementBlock("swiper-item", { key: index2 }, [
  49899. vue.createElementVNode("image", {
  49900. src: item,
  49901. class: "slide-image"
  49902. }, null, 8, ["src"])
  49903. ]);
  49904. }),
  49905. 128
  49906. /* KEYED_FRAGMENT */
  49907. ))
  49908. ], 40, ["indicator-dots", "autoplay", "circular", "interval", "duration"])
  49909. ]);
  49910. }
  49911. const productConSwiper = /* @__PURE__ */ _export_sfc(_sfc_main$4, [["render", _sfc_render$3], ["__scopeId", "data-v-afea8b02"], ["__file", "C:/Users/EDY/Desktop/项目/shuibei/components/productConSwiper/index.vue"]]);
  49912. const _imports_0 = "/static/images/noCoupon.png";
  49913. const _sfc_main$3 = {
  49914. __name: "index",
  49915. props: {
  49916. showPopup: {
  49917. type: Boolean,
  49918. default: false
  49919. },
  49920. openType: {
  49921. type: Number,
  49922. default: 0
  49923. },
  49924. coupon: {
  49925. type: Object,
  49926. default: () => ({})
  49927. },
  49928. orderShow: {
  49929. type: String,
  49930. default: ""
  49931. }
  49932. },
  49933. emits: [
  49934. "close",
  49935. "ChangCouponsUseState",
  49936. "ChangCoupons",
  49937. "tabCouponType"
  49938. ],
  49939. setup(__props, { expose: __expose, emit: __emit }) {
  49940. __expose();
  49941. const props2 = __props;
  49942. const { Toast: Toast2 } = useToast();
  49943. const emit = __emit;
  49944. const type2 = vue.ref(1);
  49945. function close() {
  49946. type2.value = 1;
  49947. emit("close");
  49948. }
  49949. function setType(val) {
  49950. type2.value = val;
  49951. emit("tabCouponType", val);
  49952. }
  49953. const __returned__ = { props: props2, Toast: Toast2, emit, type: type2, close, setType, ref: vue.ref, get useToast() {
  49954. return useToast;
  49955. } };
  49956. Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
  49957. return __returned__;
  49958. }
  49959. };
  49960. function _sfc_render$2(_ctx, _cache, $props, $setup, $data, $options) {
  49961. const _component_up_popup = vue.resolveComponent("up-popup");
  49962. return vue.openBlock(), vue.createBlock(_component_up_popup, {
  49963. show: $props.showPopup,
  49964. closeOnClickOverlay: true,
  49965. onClose: $setup.close
  49966. }, {
  49967. default: vue.withCtx(() => [
  49968. vue.createElementVNode("view", { class: "coupon-list-window" }, [
  49969. !$props.orderShow ? (vue.openBlock(), vue.createElementBlock("view", {
  49970. key: 0,
  49971. class: "nav acea-row row-around"
  49972. }, [
  49973. vue.createElementVNode(
  49974. "view",
  49975. {
  49976. class: vue.normalizeClass(["acea-row", "row-middle", $setup.type === 1 ? "on" : ""]),
  49977. onClick: _cache[0] || (_cache[0] = ($event) => $setup.setType(1))
  49978. },
  49979. "通用券",
  49980. 2
  49981. /* CLASS */
  49982. ),
  49983. vue.createCommentVNode(` <view\r
  49984. :class="['acea-row', 'row-middle', type === 2 ? 'on' : '']"\r
  49985. @click="setType(2)"\r
  49986. >商品券</view\r
  49987. >\r
  49988. <view\r
  49989. :class="['acea-row', 'row-middle', type === 3 ? 'on' : '']"\r
  49990. @click="setType(3)"\r
  49991. >品类券</view\r
  49992. > `)
  49993. ])) : vue.createCommentVNode("v-if", true),
  49994. vue.createElementVNode("view", { class: "coupon-box" }, [
  49995. vue.createElementVNode(
  49996. "view",
  49997. {
  49998. class: "coupon-list",
  49999. style: vue.normalizeStyle({ "margin-top": !$props.orderShow ? "0" : "50rpx" })
  50000. },
  50001. [
  50002. $props.coupon.list.length ? (vue.openBlock(), vue.createElementBlock("scroll-view", {
  50003. key: 0,
  50004. class: "scroll-box",
  50005. "scroll-y": "true"
  50006. }, [
  50007. $props.coupon.list.length ? (vue.openBlock(), vue.createElementBlock(
  50008. vue.Fragment,
  50009. { key: 0 },
  50010. [
  50011. vue.createCommentVNode(` <view class='item acea-row row-center-wrapper' v-for="(item,index) in coupon.list" :key='index'> `),
  50012. (vue.openBlock(true), vue.createElementBlock(
  50013. vue.Fragment,
  50014. null,
  50015. vue.renderList($props.coupon.list, (item, index2) => {
  50016. return vue.openBlock(), vue.createElementBlock("view", {
  50017. class: "item acea-row row-center-wrapper",
  50018. key: index2
  50019. }, [
  50020. vue.createElementVNode(
  50021. "view",
  50022. {
  50023. class: vue.normalizeClass(["money acea-row row-column row-center-wrapper", item.isUse ? "moneyGray" : ""])
  50024. },
  50025. [
  50026. vue.createElementVNode("view", null, [
  50027. vue.createTextVNode("¥"),
  50028. vue.createElementVNode(
  50029. "text",
  50030. { class: "num" },
  50031. vue.toDisplayString(item.money ? Number(item.money) : ""),
  50032. 1
  50033. /* TEXT */
  50034. )
  50035. ]),
  50036. vue.createElementVNode(
  50037. "view",
  50038. { class: "pic-num" },
  50039. "满" + vue.toDisplayString(item.minPrice) + "元可用",
  50040. 1
  50041. /* TEXT */
  50042. )
  50043. ],
  50044. 2
  50045. /* CLASS */
  50046. ),
  50047. vue.createElementVNode("view", { class: "text" }, [
  50048. vue.createElementVNode("view", { class: "condition line2" }, [
  50049. item.useType === 1 ? (vue.openBlock(), vue.createElementBlock(
  50050. "span",
  50051. {
  50052. key: 0,
  50053. class: vue.normalizeClass(["line-title", item.isUse ? "gray" : ""])
  50054. },
  50055. "通用",
  50056. 2
  50057. /* CLASS */
  50058. )) : item.useType === 3 ? (vue.openBlock(), vue.createElementBlock(
  50059. "span",
  50060. {
  50061. key: 1,
  50062. class: vue.normalizeClass(["line-title", item.isUse ? "gray" : ""])
  50063. },
  50064. "品类",
  50065. 2
  50066. /* CLASS */
  50067. )) : (vue.openBlock(), vue.createElementBlock(
  50068. "span",
  50069. {
  50070. key: 2,
  50071. class: vue.normalizeClass(["line-title", item.isUse ? "gray" : ""])
  50072. },
  50073. "商品",
  50074. 2
  50075. /* CLASS */
  50076. )),
  50077. vue.createElementVNode(
  50078. "span",
  50079. null,
  50080. vue.toDisplayString(item.name),
  50081. 1
  50082. /* TEXT */
  50083. )
  50084. ]),
  50085. vue.createElementVNode("view", { class: "tip-row" }, "注: 工费一次性抵扣"),
  50086. vue.createElementVNode("view", { class: "data acea-row row-between-wrapper" }, [
  50087. item.day > 0 ? (vue.openBlock(), vue.createElementBlock(
  50088. "view",
  50089. { key: 0 },
  50090. "领取后" + vue.toDisplayString(item.day) + "天内可用",
  50091. 1
  50092. /* TEXT */
  50093. )) : (vue.openBlock(), vue.createElementBlock(
  50094. "view",
  50095. { key: 1 },
  50096. vue.toDisplayString(item.useStartTimeStr && item.useEndTimeStr ? item.useStartTimeStr + " - " + item.useEndTimeStr : ""),
  50097. 1
  50098. /* TEXT */
  50099. )),
  50100. item.isUse ? (vue.openBlock(), vue.createElementBlock(
  50101. "view",
  50102. {
  50103. key: 2,
  50104. class: "bnt gray"
  50105. },
  50106. vue.toDisplayString(item.use_title || "已领取"),
  50107. 1
  50108. /* TEXT */
  50109. )) : (vue.openBlock(), vue.createElementBlock(
  50110. "view",
  50111. {
  50112. key: 3,
  50113. class: "bnt bg-color"
  50114. },
  50115. vue.toDisplayString($props.coupon.statusTile || "立即领取"),
  50116. 1
  50117. /* TEXT */
  50118. ))
  50119. ])
  50120. ])
  50121. ]);
  50122. }),
  50123. 128
  50124. /* KEYED_FRAGMENT */
  50125. ))
  50126. ],
  50127. 64
  50128. /* STABLE_FRAGMENT */
  50129. )) : vue.createCommentVNode("v-if", true)
  50130. ])) : (vue.openBlock(), vue.createElementBlock(
  50131. vue.Fragment,
  50132. { key: 1 },
  50133. [
  50134. vue.createCommentVNode(" 无优惠券 "),
  50135. vue.createElementVNode("view", { class: "pictrue" }, [
  50136. vue.createElementVNode("image", { src: _imports_0 })
  50137. ])
  50138. ],
  50139. 2112
  50140. /* STABLE_FRAGMENT, DEV_ROOT_FRAGMENT */
  50141. ))
  50142. ],
  50143. 4
  50144. /* STYLE */
  50145. )
  50146. ])
  50147. ])
  50148. ]),
  50149. _: 1
  50150. /* STABLE */
  50151. }, 8, ["show"]);
  50152. }
  50153. const couponListWindow = /* @__PURE__ */ _export_sfc(_sfc_main$3, [["render", _sfc_render$2], ["__scopeId", "data-v-915a5452"], ["__file", "C:/Users/EDY/Desktop/项目/shuibei/components/couponListWindow/index.vue"]]);
  50154. const _sfc_main$2 = {
  50155. __name: "index",
  50156. props: {
  50157. attr: {
  50158. type: Object,
  50159. default: () => ({})
  50160. },
  50161. showPopup: {
  50162. type: Boolean,
  50163. default: false
  50164. },
  50165. limitNum: {
  50166. type: Number,
  50167. default: 0
  50168. },
  50169. isShow: {
  50170. type: Number,
  50171. default: 0
  50172. },
  50173. iSbnt: {
  50174. type: Number,
  50175. default: 0
  50176. },
  50177. iSplus: {
  50178. type: Number,
  50179. default: 0
  50180. },
  50181. iScart: {
  50182. type: Number,
  50183. default: 0
  50184. }
  50185. },
  50186. emits: [
  50187. "goCat",
  50188. "iptCartNum",
  50189. "myevent",
  50190. "ChangeCartNum",
  50191. "attrVal",
  50192. "ChangeAttr",
  50193. "submit",
  50194. "closePopup"
  50195. ],
  50196. setup(__props, { expose: __expose, emit: __emit }) {
  50197. __expose();
  50198. const props2 = __props;
  50199. const emit = __emit;
  50200. const calcNumPrice = vue.computed(() => {
  50201. var _a2;
  50202. if (!((_a2 = props2.attr) == null ? void 0 : _a2.productSelect)) {
  50203. return "0.00";
  50204. }
  50205. const { storePrice, cart_num } = props2.attr.productSelect;
  50206. if (!storePrice || !cart_num) {
  50207. return "0.00";
  50208. }
  50209. const price = Number(storePrice);
  50210. const quantity = Number(cart_num);
  50211. if (isNaN(price) || isNaN(quantity)) {
  50212. return "0.00";
  50213. }
  50214. if (price < 0 || quantity < 0) {
  50215. return "0.00";
  50216. }
  50217. const total = price * quantity;
  50218. return total.toFixed(2);
  50219. });
  50220. function goCat() {
  50221. emit("goCat");
  50222. }
  50223. function bindCode() {
  50224. emit("iptCartNum", props2.attr.productSelect.cart_num);
  50225. }
  50226. function close() {
  50227. emit("closePopup");
  50228. }
  50229. function submit() {
  50230. emit("submit");
  50231. }
  50232. function CartNumDes() {
  50233. emit("ChangeCartNum", false);
  50234. }
  50235. function CartNumAdd() {
  50236. emit("ChangeCartNum", true);
  50237. }
  50238. function tapAttr(indexw, indexn) {
  50239. emit("attrVal", { indexw, indexn });
  50240. if (props2.attr.productAttr && props2.attr.productAttr[indexw]) {
  50241. props2.attr.productAttr[indexw].index = props2.attr.productAttr[indexw].attrValues[indexn];
  50242. }
  50243. const value2 = getCheckedValue().join(",");
  50244. emit("ChangeAttr", value2);
  50245. }
  50246. function getCheckedValue() {
  50247. const productAttr = props2.attr.productAttr || [];
  50248. const value2 = [];
  50249. for (let i2 = 0; i2 < productAttr.length; i2++) {
  50250. for (let j2 = 0; j2 < productAttr[i2].attrValues.length; j2++) {
  50251. if (productAttr[i2].index === productAttr[i2].attrValues[j2]) {
  50252. value2.push(productAttr[i2].attrValues[j2]);
  50253. }
  50254. }
  50255. }
  50256. return value2;
  50257. }
  50258. const __returned__ = { props: props2, emit, calcNumPrice, goCat, bindCode, close, submit, CartNumDes, CartNumAdd, tapAttr, getCheckedValue, computed: vue.computed };
  50259. Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
  50260. return __returned__;
  50261. }
  50262. };
  50263. function _sfc_render$1(_ctx, _cache, $props, $setup, $data, $options) {
  50264. const _component_up_button = vue.resolveComponent("up-button");
  50265. const _component_up_popup = vue.resolveComponent("up-popup");
  50266. return vue.openBlock(), vue.createBlock(_component_up_popup, {
  50267. show: $props.showPopup,
  50268. closeOnClickOverlay: true,
  50269. onClose: $setup.close
  50270. }, {
  50271. default: vue.withCtx(() => [
  50272. vue.createElementVNode(
  50273. "view",
  50274. {
  50275. class: vue.normalizeClass(["product-window", ($props.iSbnt ? "join" : "") + " " + ($props.iScart ? "joinCart" : "")])
  50276. },
  50277. [
  50278. vue.createElementVNode("view", { class: "textpic acea-row row-between-wrapper" }, [
  50279. vue.createElementVNode("view", { class: "pictrue" }, [
  50280. vue.createElementVNode("image", {
  50281. src: $props.attr.productSelect.image
  50282. }, null, 8, ["src"])
  50283. ]),
  50284. vue.createElementVNode("view", { class: "text" }, [
  50285. vue.createElementVNode(
  50286. "view",
  50287. { class: "line1" },
  50288. vue.toDisplayString($props.attr.productSelect.storeName),
  50289. 1
  50290. /* TEXT */
  50291. ),
  50292. vue.createElementVNode("view", { class: "money font-color" }, [
  50293. vue.createTextVNode(" ¥"),
  50294. vue.createElementVNode(
  50295. "text",
  50296. { class: "num" },
  50297. vue.toDisplayString($setup.calcNumPrice),
  50298. 1
  50299. /* TEXT */
  50300. ),
  50301. $props.isShow ? (vue.openBlock(), vue.createElementBlock(
  50302. "text",
  50303. {
  50304. key: 0,
  50305. class: "stock"
  50306. },
  50307. "库存: " + vue.toDisplayString($props.attr.productSelect.stock),
  50308. 1
  50309. /* TEXT */
  50310. )) : vue.createCommentVNode("v-if", true),
  50311. $props.limitNum ? (vue.openBlock(), vue.createElementBlock(
  50312. "text",
  50313. {
  50314. key: 1,
  50315. class: "stock"
  50316. },
  50317. "限量: " + vue.toDisplayString($props.attr.productSelect.quota),
  50318. 1
  50319. /* TEXT */
  50320. )) : vue.createCommentVNode("v-if", true)
  50321. ])
  50322. ]),
  50323. vue.createElementVNode("view", {
  50324. class: "iconfont icon-guanbi",
  50325. onClick: $setup.close
  50326. })
  50327. ]),
  50328. vue.createElementVNode("view", { class: "rollTop" }, [
  50329. vue.createElementVNode("view", { class: "productWinList" }, [
  50330. (vue.openBlock(true), vue.createElementBlock(
  50331. vue.Fragment,
  50332. null,
  50333. vue.renderList($props.attr.productAttr, (item, indexw) => {
  50334. return vue.openBlock(), vue.createElementBlock("view", {
  50335. class: "item",
  50336. key: indexw
  50337. }, [
  50338. vue.createElementVNode(
  50339. "view",
  50340. { class: "title" },
  50341. vue.toDisplayString(item.attrName),
  50342. 1
  50343. /* TEXT */
  50344. ),
  50345. vue.createElementVNode("view", { class: "listn acea-row row-middle" }, [
  50346. (vue.openBlock(true), vue.createElementBlock(
  50347. vue.Fragment,
  50348. null,
  50349. vue.renderList(item.attrValues, (itemn, indexn) => {
  50350. return vue.openBlock(), vue.createElementBlock("view", {
  50351. class: vue.normalizeClass(["itemn", item.index === itemn ? "on" : ""]),
  50352. onClick: ($event) => $setup.tapAttr(indexw, indexn),
  50353. key: indexn
  50354. }, vue.toDisplayString(itemn), 11, ["onClick"]);
  50355. }),
  50356. 128
  50357. /* KEYED_FRAGMENT */
  50358. ))
  50359. ])
  50360. ]);
  50361. }),
  50362. 128
  50363. /* KEYED_FRAGMENT */
  50364. ))
  50365. ]),
  50366. vue.createElementVNode("view", { class: "cart acea-row row-between-wrapper" }, [
  50367. vue.createElementVNode("view", { class: "title" }, "数量"),
  50368. vue.createElementVNode("view", { class: "carnum acea-row row-left" }, [
  50369. vue.createElementVNode(
  50370. "view",
  50371. {
  50372. class: vue.normalizeClass(["item reduce", $props.attr.productSelect.cart_num <= 1 ? "on" : ""]),
  50373. onClick: $setup.CartNumDes
  50374. },
  50375. " - ",
  50376. 2
  50377. /* CLASS */
  50378. ),
  50379. vue.createElementVNode("view", { class: "item num" }, [
  50380. vue.withDirectives(vue.createElementVNode(
  50381. "input",
  50382. {
  50383. type: "number",
  50384. "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => $props.attr.productSelect.cart_num = $event),
  50385. "data-name": "productSelect.cart_num",
  50386. onInput: _cache[1] || (_cache[1] = ($event) => $setup.bindCode($props.attr.productSelect.cart_num))
  50387. },
  50388. null,
  50389. 544
  50390. /* NEED_HYDRATION, NEED_PATCH */
  50391. ), [
  50392. [vue.vModelText, $props.attr.productSelect.cart_num]
  50393. ])
  50394. ]),
  50395. $props.iSplus ? (vue.openBlock(), vue.createElementBlock(
  50396. "view",
  50397. {
  50398. key: 0,
  50399. class: vue.normalizeClass([
  50400. "item plus",
  50401. $props.attr.productSelect.cart_num >= $props.attr.productSelect.stock ? "on" : ""
  50402. ]),
  50403. onClick: $setup.CartNumAdd
  50404. },
  50405. " + ",
  50406. 2
  50407. /* CLASS */
  50408. )) : (vue.openBlock(), vue.createElementBlock(
  50409. "view",
  50410. {
  50411. key: 1,
  50412. class: vue.normalizeClass([
  50413. "item plus",
  50414. $props.attr.productSelect.cart_num >= $props.attr.productSelect.quota || $props.attr.productSelect.cart_num >= $props.attr.productSelect.stock || $props.attr.productSelect.cart_num >= $props.attr.productSelect.num ? "on" : ""
  50415. ]),
  50416. onClick: $setup.CartNumAdd
  50417. },
  50418. "+",
  50419. 2
  50420. /* CLASS */
  50421. ))
  50422. ])
  50423. ])
  50424. ]),
  50425. vue.createElementVNode("view", { class: "footer-box" }, [
  50426. $props.attr.productSelect.stock > 0 ? (vue.openBlock(), vue.createBlock(_component_up_button, {
  50427. key: 0,
  50428. class: "confirm-btn",
  50429. onClick: $setup.submit,
  50430. type: "primary",
  50431. text: "确定"
  50432. })) : (vue.openBlock(), vue.createBlock(_component_up_button, {
  50433. key: 1,
  50434. class: "confirm-btn",
  50435. onClick: $setup.submit,
  50436. type: "primary",
  50437. text: "已售罄"
  50438. }))
  50439. ])
  50440. ],
  50441. 2
  50442. /* CLASS */
  50443. )
  50444. ]),
  50445. _: 1
  50446. /* STABLE */
  50447. }, 8, ["show"]);
  50448. }
  50449. const productWindow = /* @__PURE__ */ _export_sfc(_sfc_main$2, [["render", _sfc_render$1], ["__scopeId", "data-v-2914200c"], ["__file", "C:/Users/EDY/Desktop/项目/shuibei/components/productWindow/index.vue"]]);
  50450. const _sfc_main$1 = {
  50451. __name: "index",
  50452. setup(__props, { expose: __expose }) {
  50453. __expose();
  50454. const {
  50455. Toast: Toast2
  50456. } = useToast();
  50457. const instance = vue.getCurrentInstance();
  50458. const coupon = vue.ref({
  50459. coupon: false,
  50460. type: 1,
  50461. list: [],
  50462. count: []
  50463. });
  50464. const attrTxt = vue.ref("请选择");
  50465. const attrValue = vue.ref("");
  50466. const animated = vue.ref(false);
  50467. const id = vue.ref(0);
  50468. const productInfo = vue.ref({});
  50469. const productValue = vue.ref([]);
  50470. const couponList = vue.ref([]);
  50471. const cart_num = vue.ref(1);
  50472. const isOpen = vue.ref(false);
  50473. const storeImage = vue.ref("");
  50474. const PromotionCode = vue.ref("");
  50475. const posterbackgd = vue.ref("/static/images/posterbackgd.png");
  50476. const sharePacket = vue.ref({
  50477. isState: true
  50478. });
  50479. const clientHeight = vue.ref("");
  50480. const good_list = vue.ref([]);
  50481. const CartCount = vue.ref(0);
  50482. const posters = vue.ref(false);
  50483. const attr = vue.ref({
  50484. cartAttr: false,
  50485. productAttr: [],
  50486. productSelect: {}
  50487. });
  50488. const description = vue.ref("");
  50489. const navActive = vue.ref(0);
  50490. const activityH5 = vue.ref([]);
  50491. const retunTop = vue.ref(true);
  50492. const navH = vue.ref("");
  50493. const opacity = vue.ref(0);
  50494. const scrollY = vue.ref(0);
  50495. const topArr = vue.ref([]);
  50496. const height = vue.ref(0);
  50497. const heightArr = vue.ref([]);
  50498. const lock = vue.ref(false);
  50499. const scrollTop = vue.ref(0);
  50500. const sliderImage = vue.ref([]);
  50501. const canvasStatus = vue.ref(false);
  50502. const imagePath = vue.ref("");
  50503. const imgTop = vue.ref("");
  50504. const errT = vue.ref("");
  50505. const homeTop = vue.ref(20);
  50506. const userCollect = vue.ref(false);
  50507. const returnShow = vue.ref(true);
  50508. const type2 = vue.ref("");
  50509. const showProductPopup = vue.ref(false);
  50510. const showCouponPopup = vue.ref(false);
  50511. const handleBtnTpe = vue.ref("");
  50512. onLoad((options2) => {
  50513. const pages2 = getCurrentPages();
  50514. returnShow.value = pages2.length > 1;
  50515. retunTop.value = pages2.length > 1;
  50516. setTimeout(() => {
  50517. if (options2.spread) {
  50518. spread(options2.spread).catch(() => {
  50519. });
  50520. }
  50521. }, 2e3);
  50522. uni.getSystemInfo({
  50523. success(res) {
  50524. height.value = res.windowHeight;
  50525. }
  50526. });
  50527. if (options2.id || options2.scene) {
  50528. if (options2.scene) {
  50529. const qrCodeValue = $util.getUrlParams(decodeURIComponent(options2.scene));
  50530. const mapeMpQrCodeValue = $util.formatMpQrCodeData(qrCodeValue);
  50531. id.value = mapeMpQrCodeValue.id;
  50532. setTimeout(() => {
  50533. spread(mapeMpQrCodeValue.spread).catch(() => {
  50534. });
  50535. }, 2e3);
  50536. } else {
  50537. id.value = options2.id;
  50538. }
  50539. type2.value = options2.type ?? "normal";
  50540. }
  50541. getGoodsDetails();
  50542. });
  50543. onShow(() => {
  50544. getCartCount();
  50545. });
  50546. onReady(() => {
  50547. });
  50548. const iptCartNum = (e2) => {
  50549. attr.value.productSelect.cart_num = e2 || 1;
  50550. };
  50551. const handleScroll = (e2) => {
  50552. const scrollYVal = e2.detail.scrollTop;
  50553. const opacityVal = scrollYVal / 350 > 1 ? 1 : scrollYVal / 350;
  50554. opacity.value = opacityVal;
  50555. scrollY.value = scrollYVal;
  50556. if (lock.value) {
  50557. lock.value = false;
  50558. return;
  50559. }
  50560. };
  50561. const closeCouponPopup = () => {
  50562. showCouponPopup.value = false;
  50563. };
  50564. const ChangeCartNum = (changeValue) => {
  50565. formatAppLog("log", "at pages/goods_details/index.vue:379", "changeValue", changeValue);
  50566. let productSelect = productValue.value[attrValue.value] || (attr.value.productAttr.length ? void 0 : attr.value.productSelect);
  50567. if (!productSelect)
  50568. return;
  50569. const stock = productSelect.stock || 0;
  50570. let num = attr.value.productSelect;
  50571. num.cart_num = changeValue ? Math.min(num.cart_num + 1, stock) : Math.max(num.cart_num - 1, 1);
  50572. attr.value.productSelect.cart_num = num.cart_num;
  50573. cart_num.value = num.cart_num;
  50574. };
  50575. const attrVal = (val) => {
  50576. attr.value.productAttr[val.indexw].index = attr.value.productAttr[val.indexw].attrValues[val.indexn];
  50577. };
  50578. const ChangeAttr = (res) => {
  50579. const productSelect = productValue.value[res];
  50580. if (productSelect) {
  50581. attr.value.productSelect = {
  50582. ...attr.value.productSelect,
  50583. image: productSelect.image,
  50584. sales: productSelect.sales,
  50585. weight: productSelect.weight,
  50586. price: productSelect.price,
  50587. storePrice: productSelect.storePrice,
  50588. stock: productSelect.stock,
  50589. unique: productSelect.id,
  50590. cart_num: 1
  50591. };
  50592. attrValue.value = res;
  50593. attrTxt.value = "已选择";
  50594. } else {
  50595. attr.value.productSelect = {
  50596. ...attr.value.productSelect,
  50597. image: productInfo.value.image,
  50598. weight: productSelect.weight,
  50599. price: productInfo.value.price,
  50600. storePrice: productSelect.storePrice,
  50601. stock: 0,
  50602. unique: productInfo.value.id,
  50603. cart_num: 1
  50604. };
  50605. attrValue.value = "";
  50606. attrTxt.value = "请选择";
  50607. }
  50608. };
  50609. const ChangCoupons = (coupon2) => {
  50610. couponList.value = couponList.value.filter((item) => item.id !== coupon2.id);
  50611. getCouponList();
  50612. };
  50613. const setClientHeight = () => {
  50614. if (!good_list.value.length)
  50615. return;
  50616. const query = uni.createSelectorQuery().in(instance.proxy);
  50617. query.select("#list0").fields({
  50618. size: true
  50619. }, (data) => {
  50620. clientHeight.value = data.height + 20;
  50621. }).exec();
  50622. };
  50623. const getGoodsDetails = async () => {
  50624. try {
  50625. const res = await getArticleDetailId("34");
  50626. const product = res.data.productInfo;
  50627. sliderImage.value = [product.image];
  50628. formatAppLog("log", "at pages/goods_details/index.vue:453", "sliderImage.value", sliderImage.value);
  50629. productInfo.value = product;
  50630. formatAppLog("log", "at pages/goods_details/index.vue:455", "productInfo.value", productInfo.value);
  50631. description.value = product.content;
  50632. formatAppLog("log", "at pages/goods_details/index.vue:457", "description.value", description.value);
  50633. userCollect.value = res.data.userCollect;
  50634. attr.value.productAttr = res.data.productAttr;
  50635. formatAppLog("log", "at pages/goods_details/index.vue:460", "res.data.productValue", res.data);
  50636. productValue.value = res.data.productValue;
  50637. sharePacket.value.priceName = res.data.priceName;
  50638. sharePacket.value.isState = Math.floor(res.data.priceName) !== 0;
  50639. activityH5.value = res.data.activityAllH5 || [];
  50640. uni.setNavigationBarTitle({
  50641. title: product.storeName.substring(0, 7) + "..."
  50642. });
  50643. attr.value.productAttr = attr.value.productAttr.map((item) => ({
  50644. attrName: item.attrName,
  50645. attrValues: item.attrValues.split(","),
  50646. id: item.id,
  50647. isDel: item.isDel,
  50648. productId: item.productId,
  50649. type: item.type
  50650. }));
  50651. downloadFilestoreImage();
  50652. DefaultSelect();
  50653. } catch (err) {
  50654. Toast2({
  50655. title: err.toString(),
  50656. icon: "none"
  50657. });
  50658. }
  50659. };
  50660. const DefaultSelect = () => {
  50661. let value2 = [];
  50662. formatAppLog("log", "at pages/goods_details/index.vue:523", "productValue.value", vue.toRaw(productValue.value));
  50663. const keys = Object.keys(productValue.value);
  50664. formatAppLog("log", "at pages/goods_details/index.vue:525", "keys", keys);
  50665. for (let i2 = 0; i2 < keys.length; i2++) {
  50666. const key = keys[i2];
  50667. formatAppLog("log", "at pages/goods_details/index.vue:528", "key", key);
  50668. value2 = attr.value.productAttr.length ? key.split(",") : [];
  50669. }
  50670. formatAppLog("log", "at pages/goods_details/index.vue:534", "value", value2);
  50671. attr.value.productAttr.forEach((item, i2) => {
  50672. item.index = value2[i2];
  50673. });
  50674. const productSelect = productValue.value[value2.join(",")];
  50675. formatAppLog("log", "at pages/goods_details/index.vue:539", {
  50676. productSelect
  50677. });
  50678. formatAppLog("log", "at pages/goods_details/index.vue:542", {
  50679. attr
  50680. });
  50681. if (productSelect && attr.value.productAttr.length) {
  50682. attr.value.productSelect = {
  50683. ...attr.value.productSelect,
  50684. storeName: productInfo.value.storeName,
  50685. image: productSelect.image,
  50686. sales: productSelect.sales,
  50687. weight: productSelect.weight,
  50688. price: productSelect.price,
  50689. storePrice: productSelect.storePrice,
  50690. stock: productSelect.stock,
  50691. unique: productSelect.id,
  50692. cart_num: 1
  50693. };
  50694. attrValue.value = value2.join(",");
  50695. attrTxt.value = "已选择";
  50696. } else if (!productSelect && attr.value.productAttr.length) {
  50697. attr.value.productSelect = {
  50698. ...attr.value.productSelect,
  50699. storeName: productInfo.value.storeName,
  50700. image: productInfo.value.image,
  50701. sales: productSelect.sales,
  50702. weight: productSelect.weight,
  50703. price: productInfo.value.price,
  50704. storePrice: productSelect.storePrice,
  50705. stock: 0,
  50706. unique: productInfo.value.id,
  50707. cart_num: 1
  50708. };
  50709. attrValue.value = "";
  50710. attrTxt.value = "请选择";
  50711. } else if (!productSelect && !attr.value.productAttr.length) {
  50712. attr.value.productSelect = {
  50713. ...attr.value.productSelect,
  50714. storeName: productInfo.value.storeName,
  50715. image: productInfo.value.image,
  50716. sales: productSelect.sales,
  50717. weight: productSelect.weight,
  50718. price: productInfo.value.price,
  50719. storePrice: productSelect.storePrice,
  50720. stock: productInfo.value.stock,
  50721. unique: productInfo.value.id || "",
  50722. cart_num: 1
  50723. };
  50724. attrValue.value = "";
  50725. attrTxt.value = "请选择";
  50726. }
  50727. };
  50728. const getCouponList = async (type3 = "") => {
  50729. try {
  50730. const obj = {
  50731. page: 1,
  50732. limit: 20,
  50733. productId: id.value,
  50734. type: type3
  50735. };
  50736. const {
  50737. data
  50738. } = await getCoupons(obj);
  50739. coupon.value.list = data;
  50740. } catch (err) {
  50741. formatAppLog("error", "at pages/goods_details/index.vue:606", "getCouponList", err);
  50742. }
  50743. };
  50744. const tabCouponType = (type3) => {
  50745. coupon.value.type = type3;
  50746. getCouponList(type3);
  50747. };
  50748. const ChangCouponsUseState = (index2) => {
  50749. coupon.value.list[index2].isUse = true;
  50750. coupon.value.coupon = false;
  50751. };
  50752. const selecAttr = () => {
  50753. showProductPopup.value = true;
  50754. handleBtnTpe.value = "buy";
  50755. };
  50756. const handleSubmit = async () => {
  50757. var _a2;
  50758. const productSelect = productValue.value[attrValue.value];
  50759. if (attr.value.productAttr.length && (productSelect == null ? void 0 : productSelect.stock) === 0 && isOpen.value) {
  50760. return Toast2({
  50761. title: "产品库存不足,请选择其它",
  50762. icon: "none"
  50763. });
  50764. }
  50765. if (handleBtnTpe.value === "buy") {
  50766. showProductPopup.value = false;
  50767. getPreOrderFn();
  50768. } else if (handleBtnTpe.value === "cart") {
  50769. try {
  50770. const params2 = {
  50771. productId: parseFloat(id.value),
  50772. cartNum: parseFloat(attr.value.productSelect.cart_num),
  50773. isNew: false,
  50774. productAttrUnique: ((_a2 = attr.value.productSelect) == null ? void 0 : _a2.unique) ?? productInfo.value.id
  50775. };
  50776. Toast2({
  50777. title: "添加购物车成功",
  50778. icon: "success",
  50779. success: () => getCartCount(true)
  50780. });
  50781. showProductPopup.value = false;
  50782. } catch (res) {
  50783. showProductPopup.value = false;
  50784. Toast2({
  50785. title: res.message,
  50786. icon: "none"
  50787. });
  50788. }
  50789. }
  50790. };
  50791. const handleCoupon = () => {
  50792. };
  50793. const onMyEvent = () => {
  50794. attr.value.cartAttr = false;
  50795. isOpen.value = false;
  50796. };
  50797. const closeProductPopup = () => {
  50798. showProductPopup.value = false;
  50799. attr.value.cartAttr = false;
  50800. isOpen.value = false;
  50801. };
  50802. const goBuy = () => {
  50803. };
  50804. const joinCart = (e2) => {
  50805. };
  50806. const toShopCart = () => {
  50807. };
  50808. const getCartCount = async (isAnima = false) => {
  50809. };
  50810. const getPreOrderFn = () => {
  50811. ({
  50812. mallType: 0,
  50813. preOrderType: type2.value === "normal" ? "buyNow" : "video",
  50814. orderDetails: [{
  50815. attrValueId: parseFloat(attr.value.productSelect.unique),
  50816. productId: parseFloat(id.value),
  50817. productNum: parseFloat(attr.value.productSelect.cart_num)
  50818. }]
  50819. });
  50820. };
  50821. const closePosters = () => {
  50822. posters.value = false;
  50823. };
  50824. const posterImageClose = () => {
  50825. canvasStatus.value = false;
  50826. };
  50827. const setDomain = (url2) => {
  50828. url2 = url2 ? url2.toString() : "";
  50829. return url2.includes("https://") ? url2 : url2.replace("http://", "https://");
  50830. };
  50831. const downloadFilestoreImage = async () => {
  50832. try {
  50833. const res = await uni.downloadFile({
  50834. url: setDomain(productInfo.value.image)
  50835. });
  50836. storeImage.value = res.tempFilePath;
  50837. } catch {
  50838. storeImage.value = "";
  50839. }
  50840. };
  50841. const goFriend = () => {
  50842. posters.value = false;
  50843. };
  50844. const getQrcodeFn = async () => {
  50845. };
  50846. const getImageBase64 = async (images) => {
  50847. try {
  50848. const res = await imageBase64({
  50849. url: images
  50850. });
  50851. imgTop.value = res.data.code;
  50852. } catch (err) {
  50853. formatAppLog("error", "at pages/goods_details/index.vue:842", err);
  50854. }
  50855. };
  50856. const goPoster = async () => {
  50857. uni.showLoading({
  50858. title: "海报生成中",
  50859. mask: true
  50860. });
  50861. posters.value = false;
  50862. if (!PromotionCode.value) {
  50863. uni.hideLoading();
  50864. Toast2({
  50865. title: errT.value,
  50866. icon: "none"
  50867. });
  50868. return;
  50869. }
  50870. setTimeout(() => {
  50871. if (!imgTop.value) {
  50872. uni.hideLoading();
  50873. Toast2({
  50874. title: "无法生成商品海报!",
  50875. icon: "none"
  50876. });
  50877. return;
  50878. }
  50879. }, 1e3);
  50880. try {
  50881. const res = await uni.downloadFile({
  50882. url: imgTop.value
  50883. });
  50884. const arrImages = [
  50885. posterbackgd.value,
  50886. res.tempFilePath,
  50887. PromotionCode.value
  50888. ];
  50889. const storeName = productInfo.value.storeName;
  50890. const price = productInfo.value.storePrice;
  50891. setTimeout(() => {
  50892. $util.PosterCanvas(
  50893. arrImages,
  50894. storeName,
  50895. price,
  50896. productInfo.value.otPrice,
  50897. (tempFilePath) => {
  50898. imagePath.value = tempFilePath;
  50899. canvasStatus.value = true;
  50900. uni.hideLoading();
  50901. }
  50902. );
  50903. }, 500);
  50904. } catch {
  50905. uni.hideLoading();
  50906. }
  50907. };
  50908. const ShareInfo = async () => {
  50909. };
  50910. const goBack = () => {
  50911. const pages2 = getCurrentPages();
  50912. if (pages2.length > 1) {
  50913. uni.navigateBack();
  50914. } else {
  50915. uni.switchTab({
  50916. url: "/pages/mall/index"
  50917. });
  50918. }
  50919. };
  50920. const goHome = () => {
  50921. uni.switchTab({
  50922. url: "/pages/index/index"
  50923. });
  50924. };
  50925. function toMessagePage() {
  50926. uni.navigateTo({
  50927. url: "/pages/message_create/message_create"
  50928. });
  50929. }
  50930. const __returned__ = { Toast: Toast2, instance, coupon, attrTxt, attrValue, animated, id, productInfo, productValue, couponList, cart_num, isOpen, storeImage, PromotionCode, posterbackgd, sharePacket, clientHeight, good_list, CartCount, posters, attr, description, navActive, activityH5, retunTop, navH, opacity, scrollY, topArr, height, heightArr, lock, scrollTop, sliderImage, canvasStatus, imagePath, imgTop, errT, homeTop, userCollect, returnShow, type: type2, showProductPopup, showCouponPopup, handleBtnTpe, iptCartNum, handleScroll, closeCouponPopup, ChangeCartNum, attrVal, ChangeAttr, ChangCoupons, setClientHeight, getGoodsDetails, DefaultSelect, getCouponList, tabCouponType, ChangCouponsUseState, selecAttr, handleSubmit, handleCoupon, onMyEvent, closeProductPopup, goBuy, joinCart, toShopCart, getCartCount, getPreOrderFn, closePosters, posterImageClose, setDomain, downloadFilestoreImage, goFriend, getQrcodeFn, getImageBase64, goPoster, ShareInfo, goBack, goHome, toMessagePage, get onReady() {
  50931. return onReady;
  50932. }, get onLoad() {
  50933. return onLoad;
  50934. }, get onShow() {
  50935. return onShow;
  50936. }, ref: vue.ref, computed: vue.computed, watch: vue.watch, getCurrentInstance: vue.getCurrentInstance, toRaw: vue.toRaw, get useToast() {
  50937. return useToast;
  50938. }, get wechat() {
  50939. return wechat;
  50940. }, get productConSwiper() {
  50941. return productConSwiper;
  50942. }, get couponListWindow() {
  50943. return couponListWindow;
  50944. }, get productWindow() {
  50945. return productWindow;
  50946. }, get getArticleDetailId() {
  50947. return getArticleDetailId;
  50948. }, get getGoodDetailId() {
  50949. return getGoodDetailId;
  50950. } };
  50951. Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
  50952. return __returned__;
  50953. }
  50954. };
  50955. function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
  50956. var _a2;
  50957. const _component_uni_icons = resolveEasycom(vue.resolveDynamicComponent("uni-icons"), __easycom_0$g);
  50958. const _component_up_line = vue.resolveComponent("up-line");
  50959. return vue.openBlock(), vue.createElementBlock("view", { class: "product-con" }, [
  50960. vue.createCommentVNode(' <up-navbar\r\n class="goods-nav-bar"\r\n :bgColor="`rgba(255, 255, 255, ${opacity})`"\r\n >\r\n <template #left>\r\n <view class="nav-slot">\r\n <up-icon @click="goBack" name="arrow-left" size="19"></up-icon>\r\n <up-line\r\n direction="column"\r\n :hairline="false"\r\n length="16"\r\n margin="0 8px"\r\n ></up-line>\r\n <up-icon @click="goHome" name="home" size="20"></up-icon>\r\n </view>\r\n </template>\r\n </up-navbar> '),
  50961. vue.createCommentVNode(` <view class='iconfont icon-xiangzuo' :style="'top:'+navH/2+'rpx'" @tap='returns'></view> `),
  50962. vue.createElementVNode("view", null, [
  50963. vue.createElementVNode("scroll-view", {
  50964. "scroll-top": $setup.scrollTop,
  50965. "scroll-y": "true",
  50966. "scroll-with-animation": "true",
  50967. style: vue.normalizeStyle("height:" + $setup.height + "px;"),
  50968. onScroll: $setup.handleScroll
  50969. }, [
  50970. vue.createElementVNode("view", { id: "past0" }, [
  50971. vue.createVNode($setup["productConSwiper"], {
  50972. "indicator-dots": false,
  50973. imgUrls: $setup.sliderImage
  50974. }, null, 8, ["imgUrls"]),
  50975. vue.createCommentVNode(' <image :src="sliderImage" class="goodImg"></image> '),
  50976. vue.createElementVNode("view", { class: "pad30" }, [
  50977. vue.createElementVNode("view", { class: "wrapper mb30 borRadius14" }, [
  50978. vue.createElementVNode(
  50979. "view",
  50980. { class: "introduce" },
  50981. vue.toDisplayString($setup.productInfo.storeName),
  50982. 1
  50983. /* TEXT */
  50984. ),
  50985. vue.createElementVNode("view", { class: "label acea-row row-between-wrapper" }, [
  50986. vue.createElementVNode(
  50987. "view",
  50988. null,
  50989. "工费: " + vue.toDisplayString($setup.attr.productSelect.price || 0) + "元/克",
  50990. 1
  50991. /* TEXT */
  50992. ),
  50993. vue.createElementVNode(
  50994. "view",
  50995. null,
  50996. "重量: " + vue.toDisplayString($setup.attr.productSelect.weight) + "克",
  50997. 1
  50998. /* TEXT */
  50999. ),
  51000. vue.createElementVNode(
  51001. "view",
  51002. null,
  51003. " 销量:" + vue.toDisplayString(Number(((_a2 = $setup.attr.productSelect) == null ? void 0 : _a2.sales) || 0)) + vue.toDisplayString($setup.productInfo.unitName || ""),
  51004. 1
  51005. /* TEXT */
  51006. )
  51007. ]),
  51008. vue.createElementVNode("view", { class: "share acea-row row-between row-bottom" }, [
  51009. vue.createElementVNode("view", { class: "money font-color" }, [
  51010. vue.createTextVNode(" ¥ "),
  51011. vue.createElementVNode(
  51012. "text",
  51013. { class: "num" },
  51014. vue.toDisplayString($setup.attr.productSelect.storePrice),
  51015. 1
  51016. /* TEXT */
  51017. ),
  51018. vue.createCommentVNode(' <text\r\n class="vip-money"\r\n v-if="productInfo.vipPrice && productInfo.vipPrice > 0"\r\n >¥{{ productInfo.vipPrice }}</text\r\n > '),
  51019. vue.createCommentVNode(' <image\r\n v-if="productInfo.vipPrice && productInfo.vipPrice > 0"\r\n src="/static/images/vip.png"\r\n ></image> ')
  51020. ])
  51021. ]),
  51022. vue.createCommentVNode(` <view class='coupon acea-row row-between-wrapper' v-if="productInfo.give_integral > 0">\r
  51023. <view class='hide line1 acea-row'>\r
  51024. 赠积分:\r
  51025. <view class='activity'>赠送 {{productInfo.give_integral}} 积分</view>\r
  51026. </view>\r
  51027. </view> `),
  51028. $setup.coupon.list.length > 0 ? (vue.openBlock(), vue.createElementBlock("view", {
  51029. key: 0,
  51030. class: "coupon acea-row row-between-wrapper",
  51031. onClick: $setup.handleCoupon
  51032. }, [
  51033. vue.createElementVNode("view", { class: "hide line1 acea-row" }, [
  51034. vue.createTextVNode(" 优惠券: "),
  51035. vue.createElementVNode(
  51036. "view",
  51037. { class: "activity" },
  51038. " 满" + vue.toDisplayString($setup.coupon.list[0].minPrice) + "减" + vue.toDisplayString($setup.coupon.list[0].money),
  51039. 1
  51040. /* TEXT */
  51041. )
  51042. ]),
  51043. vue.createElementVNode("view", { class: "iconfont icon-jiantou" })
  51044. ])) : vue.createCommentVNode("v-if", true)
  51045. ]),
  51046. vue.createElementVNode("view", {
  51047. class: "attribute acea-row row-between-wrapper mb30 borRadius14",
  51048. onClick: $setup.selecAttr
  51049. }, [
  51050. vue.createElementVNode("view", { class: "line1" }, [
  51051. vue.createTextVNode(
  51052. vue.toDisplayString($setup.attrTxt) + ": ",
  51053. 1
  51054. /* TEXT */
  51055. ),
  51056. vue.createElementVNode(
  51057. "text",
  51058. { class: "atterTxt" },
  51059. vue.toDisplayString($setup.attrValue),
  51060. 1
  51061. /* TEXT */
  51062. )
  51063. ]),
  51064. vue.createElementVNode("view", { class: "iconfont icon-jiantou" })
  51065. ]),
  51066. vue.createElementVNode("view", { class: "row-block mb30 borRadius14" }, [
  51067. vue.createElementVNode("view", { class: "row-express" }, [
  51068. vue.createElementVNode("view", { class: "left-box" }, [
  51069. vue.createVNode(_component_uni_icons, {
  51070. class: "icon",
  51071. type: "cart",
  51072. size: "24"
  51073. }),
  51074. vue.createElementVNode("text", { class: "text" }, "48小时送达")
  51075. ]),
  51076. vue.createElementVNode("view", { class: "express-price" }, [
  51077. vue.createElementVNode("text", { class: "express-place" }, "广东深圳"),
  51078. vue.createCommentVNode(' <up-line\r\n color="#ccc"\r\n direction="column"\r\n :hairline="false"\r\n length="14px"\r\n margin="0 8px"\r\n ></up-line> '),
  51079. vue.createCommentVNode(' <text class="express-place">快递费:8元</text> ')
  51080. ])
  51081. ]),
  51082. vue.createVNode(_component_up_line, {
  51083. color: "#ccc",
  51084. length: "100%",
  51085. margin: "10px 0"
  51086. }),
  51087. vue.createElementVNode("view", { class: "tip-text" }, [
  51088. vue.createVNode(_component_uni_icons, {
  51089. size: "24",
  51090. type: "hand-up"
  51091. }),
  51092. vue.createElementVNode("view", { class: "text" }, [
  51093. vue.createElementVNode("text", { class: "t1" }, "买的放心,用的称心"),
  51094. vue.createElementVNode("text", { class: "t2" }, "平台有保障")
  51095. ])
  51096. ])
  51097. ])
  51098. ])
  51099. ])
  51100. ], 44, ["scroll-top"])
  51101. ]),
  51102. vue.createElementVNode("view", { class: "footer acea-row row-between-wrapper" }, [
  51103. vue.createElementVNode("view", { class: "toAPP" }, [
  51104. vue.createElementVNode("button", {
  51105. type: "default",
  51106. class: "storeAPP"
  51107. }, "打开水贝商城")
  51108. ]),
  51109. vue.createElementVNode("navigator", {
  51110. "open-type": "switchTab",
  51111. class: "animated item bounceIn",
  51112. "hover-class": "none"
  51113. }, [
  51114. vue.createVNode(_component_uni_icons, {
  51115. size: "22",
  51116. color: "#666",
  51117. customPrefix: "iconfont",
  51118. type: "icon-shouye"
  51119. }),
  51120. vue.createElementVNode("view", null, "首页")
  51121. ]),
  51122. vue.createElementVNode("button", {
  51123. onClick: $setup.toMessagePage,
  51124. "open-type": "contact",
  51125. "hover-class": "none",
  51126. class: "item"
  51127. }, [
  51128. vue.createVNode(_component_uni_icons, {
  51129. size: "22",
  51130. color: "#666",
  51131. customPrefix: "iconfont",
  51132. type: "icon-kefu1"
  51133. }),
  51134. vue.createElementVNode("view", null, "客服")
  51135. ]),
  51136. vue.createElementVNode("view", {
  51137. class: "animated item bounceIn",
  51138. "hover-class": "none",
  51139. onClick: $setup.toShopCart
  51140. }, [
  51141. vue.createVNode(_component_uni_icons, {
  51142. size: "22",
  51143. color: "#666",
  51144. customPrefix: "iconfont",
  51145. type: "icon-gouwuche",
  51146. class: "icon-item"
  51147. }),
  51148. vue.createCommentVNode(' <view class="iconfont icon-gouwuche1">\r\n <text v-if="Math.floor(CartCount) > 0" class="num bg-color">{{\r\n CartCount\r\n }}</text>\r\n </view> '),
  51149. vue.createElementVNode("view", null, "购物车")
  51150. ]),
  51151. vue.createElementVNode("view", { class: "bnt acea-row" }, [
  51152. vue.createElementVNode("form", { "report-submit": "true" }, [
  51153. vue.createElementVNode("button", {
  51154. class: "joinCart bnts",
  51155. "form-type": "submit"
  51156. }, "加入购物车")
  51157. ]),
  51158. vue.createElementVNode("form", { "report-submit": "true" }, [
  51159. vue.createElementVNode("button", {
  51160. class: "buy bnts",
  51161. "form-type": "submit"
  51162. }, "立即购买")
  51163. ])
  51164. ]),
  51165. vue.createCommentVNode(` <view\r
  51166. class="bnt bntVideo acea-row"\r
  51167. v-if="attr.productSelect.stock <= 0 && type === 'video'"\r
  51168. >\r
  51169. <form report-submit="true">\r
  51170. <button class="buy bnts bg-color-hui" form-type="submit">\r
  51171. 已售罄\r
  51172. </button>\r
  51173. </form>\r
  51174. </view>\r
  51175. <view\r
  51176. class="bnt bntVideo acea-row"\r
  51177. v-if="attr.productSelect.stock > 0 && type === 'video'"\r
  51178. >\r
  51179. <form @submit="goBuy" report-submit="true">\r
  51180. <button class="buy bnts" form-type="submit">立即购买</button>\r
  51181. </form>\r
  51182. </view> `)
  51183. ]),
  51184. vue.createCommentVNode(" 组件 "),
  51185. vue.createVNode($setup["productWindow"], {
  51186. attr: $setup.attr,
  51187. isShow: 1,
  51188. iSplus: 1,
  51189. showPopup: $setup.showProductPopup,
  51190. id: "product-window"
  51191. }, null, 8, ["attr", "showPopup"]),
  51192. vue.createVNode($setup["couponListWindow"], {
  51193. coupon: $setup.coupon,
  51194. showPopup: $setup.showCouponPopup
  51195. }, null, 8, ["coupon", "showPopup"])
  51196. ]);
  51197. }
  51198. const PagesGoodsDetailsIndex = /* @__PURE__ */ _export_sfc(_sfc_main$1, [["render", _sfc_render], ["__scopeId", "data-v-c5c6bbf1"], ["__file", "C:/Users/EDY/Desktop/项目/shuibei/pages/goods_details/index.vue"]]);
  51199. __definePage("pages/index/index", PagesIndexIndex);
  51200. __definePage("pages/article_details/index", PagesArticleDetailsIndex);
  51201. __definePage("pages/goods_details/index", PagesGoodsDetailsIndex);
  51202. const _sfc_main = {
  51203. onLaunch: function() {
  51204. formatAppLog("log", "at App.vue:4", "App Launch");
  51205. },
  51206. onShow: function() {
  51207. formatAppLog("log", "at App.vue:7", "App Show");
  51208. },
  51209. onHide: function() {
  51210. formatAppLog("log", "at App.vue:10", "App Hide");
  51211. }
  51212. };
  51213. const App = /* @__PURE__ */ _export_sfc(_sfc_main, [["__file", "C:/Users/EDY/Desktop/项目/shuibei/App.vue"]]);
  51214. function createApp() {
  51215. const app = vue.createVueApp(App);
  51216. app.use(uviewPlus, () => {
  51217. return {
  51218. options: {
  51219. // 修改$u.config对象的属性
  51220. config: {
  51221. // 修改默认单位为rpx,相当于执行 uni.$u.config.unit = 'rpx'
  51222. unit: "rpx"
  51223. // customIcon: {
  51224. // family: 'iconfont',
  51225. // url: '//at.alicdn.com/t/c/font_4946742_e8oa3t01rkk.css'
  51226. // }
  51227. }
  51228. }
  51229. };
  51230. });
  51231. return {
  51232. app
  51233. };
  51234. }
  51235. const { app: __app__, Vuex: __Vuex__, Pinia: __Pinia__ } = createApp();
  51236. uni.Vuex = __Vuex__;
  51237. uni.Pinia = __Pinia__;
  51238. __app__.provide("__globalStyles", __uniConfig.styles);
  51239. __app__._component.mpType = "app";
  51240. __app__._component.render = () => {
  51241. };
  51242. __app__.mount("#app");
  51243. })(Vue);