1 Star 0 Fork 0

kaiking/zawu

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
整合.html 271.44 KB
一键复制 编辑 原始数据 按行查看 历史
kaiking-1228 提交于 2024-07-23 17:38 . 添加threejs-miniprogram
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217221822192220222122222223222422252226222722282229223022312232223322342235223622372238223922402241224222432244224522462247224822492250225122522253225422552256225722582259226022612262226322642265226622672268226922702271227222732274227522762277227822792280228122822283228422852286228722882289229022912292229322942295229622972298229923002301230223032304230523062307230823092310231123122313231423152316231723182319232023212322232323242325232623272328232923302331233223332334233523362337233823392340234123422343234423452346234723482349235023512352235323542355235623572358235923602361236223632364236523662367236823692370237123722373237423752376237723782379238023812382238323842385238623872388238923902391239223932394239523962397239823992400240124022403240424052406240724082409241024112412241324142415241624172418241924202421242224232424242524262427242824292430243124322433243424352436243724382439244024412442244324442445244624472448244924502451245224532454245524562457245824592460246124622463246424652466246724682469247024712472247324742475247624772478247924802481248224832484248524862487248824892490249124922493249424952496249724982499250025012502250325042505250625072508250925102511251225132514251525162517251825192520252125222523252425252526252725282529253025312532253325342535253625372538253925402541254225432544254525462547254825492550255125522553255425552556255725582559256025612562256325642565256625672568256925702571257225732574257525762577257825792580258125822583258425852586258725882589259025912592259325942595259625972598259926002601260226032604260526062607260826092610261126122613261426152616261726182619262026212622262326242625262626272628262926302631263226332634263526362637263826392640264126422643264426452646264726482649265026512652265326542655265626572658265926602661266226632664266526662667266826692670267126722673267426752676267726782679268026812682268326842685268626872688268926902691269226932694269526962697269826992700270127022703270427052706270727082709271027112712271327142715271627172718271927202721272227232724272527262727272827292730273127322733273427352736273727382739274027412742274327442745274627472748274927502751275227532754275527562757275827592760276127622763276427652766276727682769277027712772277327742775277627772778277927802781278227832784278527862787278827892790279127922793279427952796279727982799280028012802280328042805280628072808280928102811281228132814281528162817281828192820282128222823282428252826282728282829283028312832283328342835283628372838283928402841284228432844284528462847284828492850285128522853285428552856285728582859286028612862286328642865286628672868286928702871287228732874287528762877287828792880288128822883288428852886288728882889289028912892289328942895289628972898289929002901290229032904290529062907290829092910291129122913291429152916291729182919292029212922292329242925292629272928292929302931293229332934293529362937293829392940294129422943294429452946294729482949295029512952295329542955295629572958295929602961296229632964296529662967296829692970297129722973297429752976297729782979298029812982298329842985298629872988298929902991299229932994299529962997299829993000300130023003300430053006300730083009301030113012301330143015301630173018301930203021302230233024302530263027302830293030303130323033303430353036303730383039304030413042304330443045304630473048304930503051305230533054305530563057305830593060306130623063306430653066306730683069307030713072307330743075307630773078307930803081308230833084308530863087308830893090309130923093309430953096309730983099310031013102310331043105310631073108310931103111311231133114311531163117311831193120312131223123312431253126312731283129313031313132313331343135313631373138313931403141314231433144314531463147314831493150315131523153315431553156315731583159316031613162316331643165316631673168316931703171317231733174317531763177317831793180318131823183318431853186318731883189319031913192319331943195319631973198319932003201320232033204320532063207320832093210321132123213321432153216321732183219322032213222322332243225322632273228322932303231323232333234323532363237323832393240324132423243324432453246324732483249325032513252325332543255325632573258325932603261326232633264326532663267326832693270327132723273327432753276327732783279328032813282328332843285328632873288328932903291329232933294329532963297329832993300330133023303330433053306330733083309331033113312331333143315331633173318331933203321332233233324332533263327332833293330333133323333333433353336333733383339334033413342334333443345334633473348334933503351335233533354335533563357335833593360336133623363336433653366336733683369337033713372337333743375337633773378337933803381338233833384338533863387338833893390339133923393339433953396339733983399340034013402340334043405340634073408340934103411341234133414341534163417341834193420342134223423342434253426342734283429343034313432343334343435343634373438343934403441344234433444344534463447344834493450345134523453345434553456345734583459346034613462346334643465346634673468346934703471347234733474347534763477347834793480348134823483348434853486348734883489349034913492349334943495349634973498349935003501350235033504350535063507350835093510351135123513351435153516351735183519352035213522352335243525352635273528352935303531353235333534353535363537353835393540354135423543354435453546354735483549355035513552355335543555355635573558355935603561356235633564356535663567356835693570357135723573357435753576357735783579358035813582358335843585358635873588358935903591359235933594359535963597359835993600360136023603360436053606360736083609361036113612361336143615361636173618361936203621362236233624362536263627362836293630363136323633363436353636363736383639364036413642364336443645364636473648364936503651365236533654365536563657365836593660366136623663366436653666366736683669367036713672367336743675367636773678367936803681368236833684368536863687368836893690369136923693369436953696369736983699370037013702370337043705370637073708370937103711371237133714371537163717371837193720372137223723372437253726372737283729373037313732373337343735373637373738373937403741374237433744374537463747374837493750375137523753375437553756375737583759376037613762376337643765376637673768376937703771377237733774377537763777377837793780378137823783378437853786378737883789379037913792379337943795379637973798379938003801380238033804380538063807380838093810381138123813381438153816381738183819382038213822382338243825382638273828382938303831383238333834383538363837383838393840384138423843384438453846384738483849385038513852385338543855385638573858385938603861386238633864386538663867386838693870387138723873387438753876387738783879388038813882388338843885388638873888388938903891389238933894389538963897389838993900390139023903390439053906390739083909391039113912391339143915391639173918391939203921392239233924392539263927392839293930393139323933393439353936393739383939394039413942394339443945394639473948394939503951395239533954395539563957395839593960396139623963396439653966396739683969397039713972397339743975397639773978397939803981398239833984398539863987398839893990399139923993399439953996399739983999400040014002400340044005400640074008400940104011401240134014401540164017401840194020402140224023402440254026402740284029403040314032403340344035403640374038403940404041404240434044404540464047404840494050405140524053405440554056405740584059406040614062406340644065406640674068406940704071407240734074407540764077407840794080408140824083408440854086408740884089409040914092409340944095409640974098409941004101410241034104410541064107410841094110411141124113411441154116411741184119412041214122412341244125412641274128412941304131413241334134413541364137413841394140414141424143414441454146414741484149415041514152415341544155415641574158415941604161416241634164416541664167416841694170417141724173417441754176417741784179418041814182418341844185418641874188418941904191419241934194419541964197419841994200420142024203420442054206420742084209421042114212421342144215421642174218421942204221422242234224422542264227422842294230423142324233423442354236423742384239424042414242424342444245424642474248424942504251425242534254425542564257425842594260426142624263426442654266426742684269427042714272427342744275427642774278427942804281428242834284428542864287428842894290429142924293429442954296429742984299430043014302430343044305430643074308430943104311431243134314431543164317431843194320432143224323432443254326432743284329433043314332433343344335433643374338433943404341434243434344434543464347434843494350435143524353435443554356435743584359436043614362436343644365436643674368436943704371437243734374437543764377437843794380438143824383438443854386438743884389439043914392439343944395439643974398439944004401440244034404440544064407440844094410441144124413441444154416441744184419442044214422442344244425442644274428442944304431443244334434443544364437443844394440444144424443444444454446444744484449445044514452445344544455445644574458445944604461446244634464446544664467446844694470447144724473447444754476447744784479448044814482448344844485448644874488448944904491449244934494449544964497449844994500450145024503450445054506450745084509451045114512451345144515451645174518451945204521452245234524452545264527452845294530453145324533453445354536453745384539454045414542454345444545454645474548454945504551455245534554455545564557455845594560456145624563456445654566456745684569457045714572457345744575457645774578457945804581458245834584458545864587458845894590459145924593459445954596459745984599460046014602460346044605460646074608460946104611461246134614461546164617461846194620462146224623462446254626462746284629463046314632463346344635463646374638463946404641464246434644464546464647464846494650465146524653465446554656465746584659466046614662466346644665466646674668466946704671467246734674467546764677467846794680468146824683468446854686468746884689469046914692469346944695469646974698469947004701470247034704470547064707470847094710471147124713471447154716471747184719472047214722472347244725472647274728472947304731473247334734473547364737473847394740474147424743474447454746474747484749475047514752475347544755475647574758475947604761476247634764476547664767476847694770477147724773477447754776477747784779478047814782478347844785478647874788478947904791479247934794479547964797479847994800480148024803480448054806480748084809481048114812481348144815481648174818481948204821482248234824482548264827482848294830483148324833483448354836483748384839484048414842484348444845484648474848484948504851485248534854485548564857485848594860486148624863486448654866486748684869487048714872487348744875487648774878487948804881488248834884488548864887488848894890489148924893489448954896489748984899490049014902490349044905490649074908490949104911491249134914491549164917491849194920492149224923492449254926492749284929493049314932493349344935493649374938493949404941494249434944494549464947494849494950495149524953495449554956495749584959496049614962496349644965496649674968496949704971497249734974497549764977497849794980498149824983498449854986498749884989499049914992499349944995499649974998499950005001500250035004500550065007500850095010501150125013501450155016501750185019502050215022502350245025502650275028502950305031503250335034503550365037503850395040504150425043504450455046504750485049505050515052505350545055505650575058505950605061506250635064506550665067506850695070507150725073507450755076507750785079508050815082508350845085508650875088508950905091509250935094509550965097509850995100510151025103510451055106510751085109511051115112511351145115511651175118511951205121512251235124512551265127512851295130513151325133513451355136513751385139514051415142514351445145514651475148514951505151515251535154515551565157515851595160516151625163516451655166516751685169517051715172517351745175517651775178517951805181518251835184518551865187518851895190519151925193519451955196519751985199520052015202520352045205520652075208520952105211521252135214521552165217521852195220522152225223522452255226522752285229523052315232523352345235523652375238523952405241524252435244524552465247524852495250525152525253525452555256525752585259526052615262526352645265526652675268526952705271527252735274527552765277527852795280528152825283528452855286528752885289529052915292529352945295529652975298529953005301530253035304530553065307530853095310531153125313531453155316531753185319532053215322532353245325532653275328532953305331533253335334533553365337533853395340534153425343534453455346534753485349535053515352535353545355535653575358535953605361536253635364536553665367536853695370537153725373537453755376537753785379538053815382538353845385538653875388
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>&#x7f51;&#x7ad9;</title>
<style>
/* From extension vscode.github */
/*---------------------------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/
.vscode-dark img[src$=\#gh-light-mode-only],
.vscode-light img[src$=\#gh-dark-mode-only] {
display: none;
}
/* From extension bierner.markdown-preview-github-styles */
html,
body,
.github-markdown-body {
padding: 0 !important;
max-width: auto !important;
}
.github-markdown-body {
background-color: var(--color-canvas-default);
color: var(--color-fg-default);
}
.github-markdown-body {
border: 1px solid transparent;
box-sizing: border-box;
margin: 0 auto;
width: 100% !important;
}
.github-markdown-content {
padding: 32px !important;
max-width: 980px;
min-width: 200px;
margin: 0 auto;
}
.vscode-body.scrollBeyondLastLine {
margin-bottom: 0;
}
.vscode-body.scrollBeyondLastLine .github-markdown-body {
padding-bottom: calc(100vh + 10px) !important;
}
.github-markdown-body blockquote {
background-color: initial;
}
.github-markdown-body pre {
color: initial;
border: none;
}
.github-markdown-body code {
color: inherit;
}
.github-markdown-body pre code {
color: initial;
}
.github-markdown-body code > div {
background: none
}
.github-markdown-body.showEditorSelection .code-line .code-line:hover:before {
border-left: none;
}
.github-markdown-body p,
.github-markdown-body blockquote,
.github-markdown-body ul,
.github-markdown-body ol,
.github-markdown-body dl,
.github-markdown-body table,
.github-markdown-body pre {
margin-top: 16px;
margin-bottom: 16px;
}
.vscode-dark.showEditorSelection .code-line:hover:before {
border-left: 3px solid var(--color-fg-default);
}
.github-markdown-body {
-ms-text-size-adjust: 100%;
-webkit-text-size-adjust: 100%;
margin: 0;
color: var(--color-fg-default);
background-color: var(--color-canvas-default);
font-family: -apple-system,BlinkMacSystemFont,"Segoe UI","Noto Sans",Helvetica,Arial,sans-serif,"Apple Color Emoji","Segoe UI Emoji";
font-size: 16px;
line-height: 1.5;
word-wrap: break-word;
}
.github-markdown-body .octicon {
display: inline-block;
fill: currentColor;
vertical-align: text-bottom;
}
.github-markdown-body h1:hover .anchor .octicon-link:before,
.github-markdown-body h2:hover .anchor .octicon-link:before,
.github-markdown-body h3:hover .anchor .octicon-link:before,
.github-markdown-body h4:hover .anchor .octicon-link:before,
.github-markdown-body h5:hover .anchor .octicon-link:before,
.github-markdown-body h6:hover .anchor .octicon-link:before {
width: 16px;
height: 16px;
content: ' ';
display: inline-block;
background-color: currentColor;
-webkit-mask-image: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' version='1.1' aria-hidden='true'><path fill-rule='evenodd' d='M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z'></path></svg>");
mask-image: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' version='1.1' aria-hidden='true'><path fill-rule='evenodd' d='M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z'></path></svg>");
}
.github-markdown-body details,
.github-markdown-body figcaption,
.github-markdown-body figure {
display: block;
}
.github-markdown-body summary {
display: list-item;
}
.github-markdown-body [hidden] {
display: none !important;
}
.github-markdown-body a {
background-color: transparent;
color: var(--color-accent-fg);
text-decoration: none;
}
.github-markdown-body abbr[title] {
border-bottom: none;
-webkit-text-decoration: underline dotted;
text-decoration: underline dotted;
}
.github-markdown-body b,
.github-markdown-body strong {
font-weight: var(--base-text-weight-semibold, 600);
}
.github-markdown-body dfn {
font-style: italic;
}
.github-markdown-body h1 {
margin: .67em 0;
font-weight: var(--base-text-weight-semibold, 600);
padding-bottom: .3em;
font-size: 2em;
border-bottom: 1px solid var(--color-border-muted);
}
.github-markdown-body mark {
background-color: var(--color-attention-subtle);
color: var(--color-fg-default);
}
.github-markdown-body small {
font-size: 90%;
}
.github-markdown-body sub,
.github-markdown-body sup {
font-size: 75%;
line-height: 0;
position: relative;
vertical-align: baseline;
}
.github-markdown-body sub {
bottom: -0.25em;
}
.github-markdown-body sup {
top: -0.5em;
}
.github-markdown-body img {
border-style: none;
max-width: 100%;
box-sizing: content-box;
background-color: var(--color-canvas-default);
}
.github-markdown-body code,
.github-markdown-body kbd,
.github-markdown-body pre,
.github-markdown-body samp {
font-family: monospace;
font-size: 1em;
}
.github-markdown-body figure {
margin: 1em 40px;
}
.github-markdown-body hr {
box-sizing: content-box;
overflow: hidden;
background: transparent;
border-bottom: 1px solid var(--color-border-muted);
height: .25em;
padding: 0;
margin: 24px 0;
background-color: var(--color-border-default);
border: 0;
}
.github-markdown-body input {
font: inherit;
margin: 0;
overflow: visible;
font-family: inherit;
font-size: inherit;
line-height: inherit;
}
.github-markdown-body [type=button],
.github-markdown-body [type=reset],
.github-markdown-body [type=submit] {
-webkit-appearance: button;
appearance: button;
}
.github-markdown-body [type=checkbox],
.github-markdown-body [type=radio] {
box-sizing: border-box;
padding: 0;
}
.github-markdown-body [type=number]::-webkit-inner-spin-button,
.github-markdown-body [type=number]::-webkit-outer-spin-button {
height: auto;
}
.github-markdown-body [type=search]::-webkit-search-cancel-button,
.github-markdown-body [type=search]::-webkit-search-decoration {
-webkit-appearance: none;
appearance: none;
}
.github-markdown-body ::-webkit-input-placeholder {
color: inherit;
opacity: .54;
}
.github-markdown-body ::-webkit-file-upload-button {
-webkit-appearance: button;
appearance: button;
font: inherit;
}
.github-markdown-body a:hover {
text-decoration: underline;
}
.github-markdown-body ::placeholder {
color: var(--color-fg-subtle);
opacity: 1;
}
.github-markdown-body hr::before {
display: table;
content: "";
}
.github-markdown-body hr::after {
display: table;
clear: both;
content: "";
}
.github-markdown-body table {
border-spacing: 0;
border-collapse: collapse;
display: block;
width: max-content;
max-width: 100%;
overflow: auto;
}
.github-markdown-body td,
.github-markdown-body th {
padding: 0;
}
.github-markdown-body details summary {
cursor: pointer;
}
.github-markdown-body details:not([open])>*:not(summary) {
display: none !important;
}
.github-markdown-body a:focus,
.github-markdown-body [role=button]:focus,
.github-markdown-body input[type=radio]:focus,
.github-markdown-body input[type=checkbox]:focus {
outline: 2px solid var(--color-accent-fg);
outline-offset: -2px;
box-shadow: none;
}
.github-markdown-body a:focus:not(:focus-visible),
.github-markdown-body [role=button]:focus:not(:focus-visible),
.github-markdown-body input[type=radio]:focus:not(:focus-visible),
.github-markdown-body input[type=checkbox]:focus:not(:focus-visible) {
outline: solid 1px transparent;
}
.github-markdown-body a:focus-visible,
.github-markdown-body [role=button]:focus-visible,
.github-markdown-body input[type=radio]:focus-visible,
.github-markdown-body input[type=checkbox]:focus-visible {
outline: 2px solid var(--color-accent-fg);
outline-offset: -2px;
box-shadow: none;
}
.github-markdown-body a:not([class]):focus,
.github-markdown-body a:not([class]):focus-visible,
.github-markdown-body input[type=radio]:focus,
.github-markdown-body input[type=radio]:focus-visible,
.github-markdown-body input[type=checkbox]:focus,
.github-markdown-body input[type=checkbox]:focus-visible {
outline-offset: 0;
}
.github-markdown-body kbd {
display: inline-block;
padding: 3px 5px;
font: 11px ui-monospace,SFMono-Regular,SF Mono,Menlo,Consolas,Liberation Mono,monospace;
line-height: 10px;
color: var(--color-fg-default);
vertical-align: middle;
background-color: var(--color-canvas-subtle);
border: solid 1px var(--color-neutral-muted);
border-bottom-color: var(--color-neutral-muted);
border-radius: 6px;
box-shadow: inset 0 -1px 0 var(--color-neutral-muted);
}
.github-markdown-body h1,
.github-markdown-body h2,
.github-markdown-body h3,
.github-markdown-body h4,
.github-markdown-body h5,
.github-markdown-body h6 {
margin-top: 24px;
margin-bottom: 16px;
font-weight: var(--base-text-weight-semibold, 600);
line-height: 1.25;
}
.github-markdown-body h2 {
font-weight: var(--base-text-weight-semibold, 600);
padding-bottom: .3em;
font-size: 1.5em;
border-bottom: 1px solid var(--color-border-muted);
}
.github-markdown-body h3 {
font-weight: var(--base-text-weight-semibold, 600);
font-size: 1.25em;
}
.github-markdown-body h4 {
font-weight: var(--base-text-weight-semibold, 600);
font-size: 1em;
}
.github-markdown-body h5 {
font-weight: var(--base-text-weight-semibold, 600);
font-size: .875em;
}
.github-markdown-body h6 {
font-weight: var(--base-text-weight-semibold, 600);
font-size: .85em;
color: var(--color-fg-muted);
}
.github-markdown-body p {
margin-top: 0;
margin-bottom: 10px;
}
.github-markdown-body blockquote {
margin: 0;
padding: 0 1em;
color: var(--color-fg-muted);
border-left: .25em solid var(--color-border-default);
}
.github-markdown-body ul,
.github-markdown-body ol {
margin-top: 0;
margin-bottom: 0;
padding-left: 2em;
}
.github-markdown-body ol ol,
.github-markdown-body ul ol {
list-style-type: lower-roman;
}
.github-markdown-body ul ul ol,
.github-markdown-body ul ol ol,
.github-markdown-body ol ul ol,
.github-markdown-body ol ol ol {
list-style-type: lower-alpha;
}
.github-markdown-body dd {
margin-left: 0;
}
.github-markdown-body tt,
.github-markdown-body code,
.github-markdown-body samp {
font-family: ui-monospace,SFMono-Regular,SF Mono,Menlo,Consolas,Liberation Mono,monospace;
font-size: 12px;
}
.github-markdown-body pre {
margin-top: 0;
margin-bottom: 0;
font-family: ui-monospace,SFMono-Regular,SF Mono,Menlo,Consolas,Liberation Mono,monospace;
font-size: 12px;
word-wrap: normal;
}
.github-markdown-body .octicon {
display: inline-block;
overflow: visible !important;
vertical-align: text-bottom;
fill: currentColor;
}
.github-markdown-body input::-webkit-outer-spin-button,
.github-markdown-body input::-webkit-inner-spin-button {
margin: 0;
-webkit-appearance: none;
appearance: none;
}
.github-markdown-body .mr-2 {
margin-right: var(--base-size-8, 8px) !important;
}
.github-markdown-body::before {
display: table;
content: "";
}
.github-markdown-body::after {
display: table;
clear: both;
content: "";
}
.github-markdown-body>*:first-child {
margin-top: 0 !important;
}
.github-markdown-body>*:last-child {
margin-bottom: 0 !important;
}
.github-markdown-body a:not([href]) {
color: inherit;
text-decoration: none;
}
.github-markdown-body .absent {
color: var(--color-danger-fg);
}
.github-markdown-body .anchor {
float: left;
padding-right: 4px;
margin-left: -20px;
line-height: 1;
}
.github-markdown-body .anchor:focus {
outline: none;
}
.github-markdown-body p,
.github-markdown-body blockquote,
.github-markdown-body ul,
.github-markdown-body ol,
.github-markdown-body dl,
.github-markdown-body table,
.github-markdown-body pre,
.github-markdown-body details {
margin-top: 0;
margin-bottom: 16px;
}
.github-markdown-body blockquote>:first-child {
margin-top: 0;
}
.github-markdown-body blockquote>:last-child {
margin-bottom: 0;
}
.github-markdown-body h1 .octicon-link,
.github-markdown-body h2 .octicon-link,
.github-markdown-body h3 .octicon-link,
.github-markdown-body h4 .octicon-link,
.github-markdown-body h5 .octicon-link,
.github-markdown-body h6 .octicon-link {
color: var(--color-fg-default);
vertical-align: middle;
visibility: hidden;
}
.github-markdown-body h1:hover .anchor,
.github-markdown-body h2:hover .anchor,
.github-markdown-body h3:hover .anchor,
.github-markdown-body h4:hover .anchor,
.github-markdown-body h5:hover .anchor,
.github-markdown-body h6:hover .anchor {
text-decoration: none;
}
.github-markdown-body h1:hover .anchor .octicon-link,
.github-markdown-body h2:hover .anchor .octicon-link,
.github-markdown-body h3:hover .anchor .octicon-link,
.github-markdown-body h4:hover .anchor .octicon-link,
.github-markdown-body h5:hover .anchor .octicon-link,
.github-markdown-body h6:hover .anchor .octicon-link {
visibility: visible;
}
.github-markdown-body h1 tt,
.github-markdown-body h1 code,
.github-markdown-body h2 tt,
.github-markdown-body h2 code,
.github-markdown-body h3 tt,
.github-markdown-body h3 code,
.github-markdown-body h4 tt,
.github-markdown-body h4 code,
.github-markdown-body h5 tt,
.github-markdown-body h5 code,
.github-markdown-body h6 tt,
.github-markdown-body h6 code {
padding: 0 .2em;
font-size: inherit;
}
.github-markdown-body summary h1,
.github-markdown-body summary h2,
.github-markdown-body summary h3,
.github-markdown-body summary h4,
.github-markdown-body summary h5,
.github-markdown-body summary h6 {
display: inline-block;
}
.github-markdown-body summary h1 .anchor,
.github-markdown-body summary h2 .anchor,
.github-markdown-body summary h3 .anchor,
.github-markdown-body summary h4 .anchor,
.github-markdown-body summary h5 .anchor,
.github-markdown-body summary h6 .anchor {
margin-left: -40px;
}
.github-markdown-body summary h1,
.github-markdown-body summary h2 {
padding-bottom: 0;
border-bottom: 0;
}
.github-markdown-body ul.no-list,
.github-markdown-body ol.no-list {
padding: 0;
list-style-type: none;
}
.github-markdown-body ol[type="a s"] {
list-style-type: lower-alpha;
}
.github-markdown-body ol[type="A s"] {
list-style-type: upper-alpha;
}
.github-markdown-body ol[type="i s"] {
list-style-type: lower-roman;
}
.github-markdown-body ol[type="I s"] {
list-style-type: upper-roman;
}
.github-markdown-body ol[type="1"] {
list-style-type: decimal;
}
.github-markdown-body div>ol:not([type]) {
list-style-type: decimal;
}
.github-markdown-body ul ul,
.github-markdown-body ul ol,
.github-markdown-body ol ol,
.github-markdown-body ol ul {
margin-top: 0;
margin-bottom: 0;
}
.github-markdown-body li>p {
margin-top: 16px;
}
.github-markdown-body li+li {
margin-top: .25em;
}
.github-markdown-body dl {
padding: 0;
}
.github-markdown-body dl dt {
padding: 0;
margin-top: 16px;
font-size: 1em;
font-style: italic;
font-weight: var(--base-text-weight-semibold, 600);
}
.github-markdown-body dl dd {
padding: 0 16px;
margin-bottom: 16px;
}
.github-markdown-body table th {
font-weight: var(--base-text-weight-semibold, 600);
}
.github-markdown-body table th,
.github-markdown-body table td {
padding: 6px 13px;
border: 1px solid var(--color-border-default);
}
.github-markdown-body table td>:last-child {
margin-bottom: 0;
}
.github-markdown-body table tr {
background-color: var(--color-canvas-default);
border-top: 1px solid var(--color-border-muted);
}
.github-markdown-body table tr:nth-child(2n) {
background-color: var(--color-canvas-subtle);
}
.github-markdown-body table img {
background-color: transparent;
}
.github-markdown-body img[align=right] {
padding-left: 20px;
}
.github-markdown-body img[align=left] {
padding-right: 20px;
}
.github-markdown-body .emoji {
max-width: none;
vertical-align: text-top;
background-color: transparent;
}
.github-markdown-body span.frame {
display: block;
overflow: hidden;
}
.github-markdown-body span.frame>span {
display: block;
float: left;
width: auto;
padding: 7px;
margin: 13px 0 0;
overflow: hidden;
border: 1px solid var(--color-border-default);
}
.github-markdown-body span.frame span img {
display: block;
float: left;
}
.github-markdown-body span.frame span span {
display: block;
padding: 5px 0 0;
clear: both;
color: var(--color-fg-default);
}
.github-markdown-body span.align-center {
display: block;
overflow: hidden;
clear: both;
}
.github-markdown-body span.align-center>span {
display: block;
margin: 13px auto 0;
overflow: hidden;
text-align: center;
}
.github-markdown-body span.align-center span img {
margin: 0 auto;
text-align: center;
}
.github-markdown-body span.align-right {
display: block;
overflow: hidden;
clear: both;
}
.github-markdown-body span.align-right>span {
display: block;
margin: 13px 0 0;
overflow: hidden;
text-align: right;
}
.github-markdown-body span.align-right span img {
margin: 0;
text-align: right;
}
.github-markdown-body span.float-left {
display: block;
float: left;
margin-right: 13px;
overflow: hidden;
}
.github-markdown-body span.float-left span {
margin: 13px 0 0;
}
.github-markdown-body span.float-right {
display: block;
float: right;
margin-left: 13px;
overflow: hidden;
}
.github-markdown-body span.float-right>span {
display: block;
margin: 13px auto 0;
overflow: hidden;
text-align: right;
}
.github-markdown-body code,
.github-markdown-body tt {
padding: .2em .4em;
margin: 0;
font-size: 85%;
white-space: break-spaces;
background-color: var(--color-neutral-muted);
border-radius: 6px;
}
.github-markdown-body code br,
.github-markdown-body tt br {
display: none;
}
.github-markdown-body del code {
text-decoration: inherit;
}
.github-markdown-body samp {
font-size: 85%;
}
.github-markdown-body pre code {
font-size: 100%;
}
.github-markdown-body pre>code {
padding: 0;
margin: 0;
word-break: normal;
white-space: pre;
background: transparent;
border: 0;
}
.github-markdown-body .highlight {
margin-bottom: 16px;
}
.github-markdown-body .highlight pre {
margin-bottom: 0;
word-break: normal;
}
.github-markdown-body .highlight pre,
.github-markdown-body pre {
padding: 16px;
overflow: auto;
font-size: 85%;
line-height: 1.45;
color: var(--color-fg-default);
background-color: var(--color-canvas-subtle);
border-radius: 6px;
}
.github-markdown-body pre code,
.github-markdown-body pre tt {
display: inline;
max-width: auto;
padding: 0;
margin: 0;
overflow: visible;
line-height: inherit;
word-wrap: normal;
background-color: transparent;
border: 0;
}
.github-markdown-body .csv-data td,
.github-markdown-body .csv-data th {
padding: 5px;
overflow: hidden;
font-size: 12px;
line-height: 1;
text-align: left;
white-space: nowrap;
}
.github-markdown-body .csv-data .blob-num {
padding: 10px 8px 9px;
text-align: right;
background: var(--color-canvas-default);
border: 0;
}
.github-markdown-body .csv-data tr {
border-top: 0;
}
.github-markdown-body .csv-data th {
font-weight: var(--base-text-weight-semibold, 600);
background: var(--color-canvas-subtle);
border-top: 0;
}
.github-markdown-body [data-footnote-ref]::before {
content: "[";
}
.github-markdown-body [data-footnote-ref]::after {
content: "]";
}
.github-markdown-body .footnotes {
font-size: 12px;
color: var(--color-fg-muted);
border-top: 1px solid var(--color-border-default);
}
.github-markdown-body .footnotes ol {
padding-left: 16px;
}
.github-markdown-body .footnotes ol ul {
display: inline-block;
padding-left: 16px;
margin-top: 16px;
}
.github-markdown-body .footnotes li {
position: relative;
}
.github-markdown-body .footnotes li:target::before {
position: absolute;
top: -8px;
right: -8px;
bottom: -8px;
left: -24px;
pointer-events: none;
content: "";
border: 2px solid var(--color-accent-emphasis);
border-radius: 6px;
}
.github-markdown-body .footnotes li:target {
color: var(--color-fg-default);
}
.github-markdown-body .footnotes .data-footnote-backref g-emoji {
font-family: monospace;
}
.github-markdown-body .pl-c {
color: var(--color-prettylights-syntax-comment);
}
.github-markdown-body .pl-c1,
.github-markdown-body .pl-s .pl-v {
color: var(--color-prettylights-syntax-constant);
}
.github-markdown-body .pl-e,
.github-markdown-body .pl-en {
color: var(--color-prettylights-syntax-entity);
}
.github-markdown-body .pl-smi,
.github-markdown-body .pl-s .pl-s1 {
color: var(--color-prettylights-syntax-storage-modifier-import);
}
.github-markdown-body .pl-ent {
color: var(--color-prettylights-syntax-entity-tag);
}
.github-markdown-body .pl-k {
color: var(--color-prettylights-syntax-keyword);
}
.github-markdown-body .pl-s,
.github-markdown-body .pl-pds,
.github-markdown-body .pl-s .pl-pse .pl-s1,
.github-markdown-body .pl-sr,
.github-markdown-body .pl-sr .pl-cce,
.github-markdown-body .pl-sr .pl-sre,
.github-markdown-body .pl-sr .pl-sra {
color: var(--color-prettylights-syntax-string);
}
.github-markdown-body .pl-v,
.github-markdown-body .pl-smw {
color: var(--color-prettylights-syntax-variable);
}
.github-markdown-body .pl-bu {
color: var(--color-prettylights-syntax-brackethighlighter-unmatched);
}
.github-markdown-body .pl-ii {
color: var(--color-prettylights-syntax-invalid-illegal-text);
background-color: var(--color-prettylights-syntax-invalid-illegal-bg);
}
.github-markdown-body .pl-c2 {
color: var(--color-prettylights-syntax-carriage-return-text);
background-color: var(--color-prettylights-syntax-carriage-return-bg);
}
.github-markdown-body .pl-sr .pl-cce {
font-weight: bold;
color: var(--color-prettylights-syntax-string-regexp);
}
.github-markdown-body .pl-ml {
color: var(--color-prettylights-syntax-markup-list);
}
.github-markdown-body .pl-mh,
.github-markdown-body .pl-mh .pl-en,
.github-markdown-body .pl-ms {
font-weight: bold;
color: var(--color-prettylights-syntax-markup-heading);
}
.github-markdown-body .pl-mi {
font-style: italic;
color: var(--color-prettylights-syntax-markup-italic);
}
.github-markdown-body .pl-mb {
font-weight: bold;
color: var(--color-prettylights-syntax-markup-bold);
}
.github-markdown-body .pl-md {
color: var(--color-prettylights-syntax-markup-deleted-text);
background-color: var(--color-prettylights-syntax-markup-deleted-bg);
}
.github-markdown-body .pl-mi1 {
color: var(--color-prettylights-syntax-markup-inserted-text);
background-color: var(--color-prettylights-syntax-markup-inserted-bg);
}
.github-markdown-body .pl-mc {
color: var(--color-prettylights-syntax-markup-changed-text);
background-color: var(--color-prettylights-syntax-markup-changed-bg);
}
.github-markdown-body .pl-mi2 {
color: var(--color-prettylights-syntax-markup-ignored-text);
background-color: var(--color-prettylights-syntax-markup-ignored-bg);
}
.github-markdown-body .pl-mdr {
font-weight: bold;
color: var(--color-prettylights-syntax-meta-diff-range);
}
.github-markdown-body .pl-ba {
color: var(--color-prettylights-syntax-brackethighlighter-angle);
}
.github-markdown-body .pl-sg {
color: var(--color-prettylights-syntax-sublimelinter-gutter-mark);
}
.github-markdown-body .pl-corl {
text-decoration: underline;
color: var(--color-prettylights-syntax-constant-other-reference-link);
}
.github-markdown-body g-emoji {
display: inline-block;
min-width: 1ch;
font-family: "Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol";
font-size: 1em;
font-style: normal !important;
font-weight: var(--base-text-weight-normal, 400);
line-height: 1;
vertical-align: -0.075em;
}
.github-markdown-body g-emoji img {
width: 1em;
height: 1em;
}
.github-markdown-body .task-list-item {
list-style-type: none;
}
.github-markdown-body .task-list-item label {
font-weight: var(--base-text-weight-normal, 400);
}
.github-markdown-body .task-list-item.enabled label {
cursor: pointer;
}
.github-markdown-body .task-list-item+.task-list-item {
margin-top: 4px;
}
.github-markdown-body .task-list-item .handle {
display: none;
}
.github-markdown-body .task-list-item-checkbox {
margin: 0 .2em .25em -1.4em;
vertical-align: middle;
}
.github-markdown-body .contains-task-list:dir(rtl) .task-list-item-checkbox {
margin: 0 -1.6em .25em .2em;
}
.github-markdown-body .contains-task-list {
position: relative;
}
.github-markdown-body .contains-task-list:hover .task-list-item-convert-container,
.github-markdown-body .contains-task-list:focus-within .task-list-item-convert-container {
display: block;
width: auto;
height: 24px;
overflow: visible;
clip: auto;
}
.github-markdown-body ::-webkit-calendar-picker-indicator {
filter: invert(50%);
}
.github-markdown-body .markdown-alert {
padding: var(--base-size-8) var(--base-size-16);
margin-bottom: 16px;
color: inherit;
border-left: .25em solid var(--color-border-default);
}
.github-markdown-body .markdown-alert>:first-child {
margin-top: 0;
}
.github-markdown-body .markdown-alert>:last-child {
margin-bottom: 0;
}
.github-markdown-body .markdown-alert .markdown-alert-title {
display: flex;
font-weight: var(--base-text-weight-medium, 500);
align-items: center;
line-height: 1;
}
.github-markdown-body .markdown-alert.markdown-alert-note {
border-left-color: var(--color-accent-emphasis);
}
.github-markdown-body .markdown-alert.markdown-alert-note .markdown-alert-title {
color: var(--color-accent-fg);
}
.github-markdown-body .markdown-alert.markdown-alert-important {
border-left-color: var(--color-done-emphasis);
}
.github-markdown-body .markdown-alert.markdown-alert-important .markdown-alert-title {
color: var(--color-done-fg);
}
.github-markdown-body .markdown-alert.markdown-alert-warning {
border-left-color: var(--color-attention-emphasis);
}
.github-markdown-body .markdown-alert.markdown-alert-warning .markdown-alert-title {
color: var(--color-attention-fg);
}
.github-markdown-body .markdown-alert.markdown-alert-tip {
border-left-color: var(--color-success-emphasis);
}
.github-markdown-body .markdown-alert.markdown-alert-tip .markdown-alert-title {
color: var(--color-success-fg);
}
.github-markdown-body .markdown-alert.markdown-alert-caution {
border-left-color: var(--color-danger-emphasis);
}
.github-markdown-body .markdown-alert.markdown-alert-caution .markdown-alert-title {
color: var(--color-danger-fg);
}
.github-markdown-body>*:first-child>.heading-element:first-child {
margin-top: 0 !important;
}
[data-color-mode=light][data-light-theme=light],
[data-color-mode=dark][data-dark-theme=light],
.vscode-body.vscode-light [data-color-mode=auto][data-light-theme=light],
.vscode-body.vscode-dark [data-color-mode=auto][data-dark-theme=light] {
/*light*/
color-scheme: light;
--color-prettylights-syntax-comment: #57606a;
--color-prettylights-syntax-constant: #0550ae;
--color-prettylights-syntax-entity: #6639ba;
--color-prettylights-syntax-storage-modifier-import: #24292f;
--color-prettylights-syntax-entity-tag: #116329;
--color-prettylights-syntax-keyword: #cf222e;
--color-prettylights-syntax-string: #0a3069;
--color-prettylights-syntax-variable: #953800;
--color-prettylights-syntax-brackethighlighter-unmatched: #82071e;
--color-prettylights-syntax-invalid-illegal-text: #f6f8fa;
--color-prettylights-syntax-invalid-illegal-bg: #82071e;
--color-prettylights-syntax-carriage-return-text: #f6f8fa;
--color-prettylights-syntax-carriage-return-bg: #cf222e;
--color-prettylights-syntax-string-regexp: #116329;
--color-prettylights-syntax-markup-list: #3b2300;
--color-prettylights-syntax-markup-heading: #0550ae;
--color-prettylights-syntax-markup-italic: #24292f;
--color-prettylights-syntax-markup-bold: #24292f;
--color-prettylights-syntax-markup-deleted-text: #82071e;
--color-prettylights-syntax-markup-deleted-bg: #ffebe9;
--color-prettylights-syntax-markup-inserted-text: #116329;
--color-prettylights-syntax-markup-inserted-bg: #dafbe1;
--color-prettylights-syntax-markup-changed-text: #953800;
--color-prettylights-syntax-markup-changed-bg: #ffd8b5;
--color-prettylights-syntax-markup-ignored-text: #eaeef2;
--color-prettylights-syntax-markup-ignored-bg: #0550ae;
--color-prettylights-syntax-meta-diff-range: #8250df;
--color-prettylights-syntax-brackethighlighter-angle: #57606a;
--color-prettylights-syntax-sublimelinter-gutter-mark: #8c959f;
--color-prettylights-syntax-constant-other-reference-link: #0a3069;
--color-fg-default: #1F2328;
--color-fg-muted: #656d76;
--color-fg-subtle: #6e7781;
--color-canvas-default: #ffffff;
--color-canvas-subtle: #f6f8fa;
--color-border-default: #d0d7de;
--color-border-muted: hsla(210,18%,87%,1);
--color-neutral-muted: rgba(175,184,193,0.2);
--color-accent-fg: #0969da;
--color-accent-emphasis: #0969da;
--color-success-fg: #1a7f37;
--color-success-emphasis: #1f883d;
--color-attention-fg: #9a6700;
--color-attention-emphasis: #9a6700;
--color-attention-subtle: #fff8c5;
--color-danger-fg: #d1242f;
--color-danger-emphasis: #cf222e;
--color-done-fg: #8250df;
--color-done-emphasis: #8250df;
}
@media (prefers-color-scheme: light) {
[data-color-mode='system'][data-light-theme=light] {
/*light*/
color-scheme: light;
--color-prettylights-syntax-comment: #57606a;
--color-prettylights-syntax-constant: #0550ae;
--color-prettylights-syntax-entity: #6639ba;
--color-prettylights-syntax-storage-modifier-import: #24292f;
--color-prettylights-syntax-entity-tag: #116329;
--color-prettylights-syntax-keyword: #cf222e;
--color-prettylights-syntax-string: #0a3069;
--color-prettylights-syntax-variable: #953800;
--color-prettylights-syntax-brackethighlighter-unmatched: #82071e;
--color-prettylights-syntax-invalid-illegal-text: #f6f8fa;
--color-prettylights-syntax-invalid-illegal-bg: #82071e;
--color-prettylights-syntax-carriage-return-text: #f6f8fa;
--color-prettylights-syntax-carriage-return-bg: #cf222e;
--color-prettylights-syntax-string-regexp: #116329;
--color-prettylights-syntax-markup-list: #3b2300;
--color-prettylights-syntax-markup-heading: #0550ae;
--color-prettylights-syntax-markup-italic: #24292f;
--color-prettylights-syntax-markup-bold: #24292f;
--color-prettylights-syntax-markup-deleted-text: #82071e;
--color-prettylights-syntax-markup-deleted-bg: #ffebe9;
--color-prettylights-syntax-markup-inserted-text: #116329;
--color-prettylights-syntax-markup-inserted-bg: #dafbe1;
--color-prettylights-syntax-markup-changed-text: #953800;
--color-prettylights-syntax-markup-changed-bg: #ffd8b5;
--color-prettylights-syntax-markup-ignored-text: #eaeef2;
--color-prettylights-syntax-markup-ignored-bg: #0550ae;
--color-prettylights-syntax-meta-diff-range: #8250df;
--color-prettylights-syntax-brackethighlighter-angle: #57606a;
--color-prettylights-syntax-sublimelinter-gutter-mark: #8c959f;
--color-prettylights-syntax-constant-other-reference-link: #0a3069;
--color-fg-default: #1F2328;
--color-fg-muted: #656d76;
--color-fg-subtle: #6e7781;
--color-canvas-default: #ffffff;
--color-canvas-subtle: #f6f8fa;
--color-border-default: #d0d7de;
--color-border-muted: hsla(210,18%,87%,1);
--color-neutral-muted: rgba(175,184,193,0.2);
--color-accent-fg: #0969da;
--color-accent-emphasis: #0969da;
--color-success-fg: #1a7f37;
--color-success-emphasis: #1f883d;
--color-attention-fg: #9a6700;
--color-attention-emphasis: #9a6700;
--color-attention-subtle: #fff8c5;
--color-danger-fg: #d1242f;
--color-danger-emphasis: #cf222e;
--color-done-fg: #8250df;
--color-done-emphasis: #8250df;
}
}
@media (prefers-color-scheme: dark) {
[data-color-mode='system'][data-dark-theme=light] {
/*light*/
color-scheme: light;
--color-prettylights-syntax-comment: #57606a;
--color-prettylights-syntax-constant: #0550ae;
--color-prettylights-syntax-entity: #6639ba;
--color-prettylights-syntax-storage-modifier-import: #24292f;
--color-prettylights-syntax-entity-tag: #116329;
--color-prettylights-syntax-keyword: #cf222e;
--color-prettylights-syntax-string: #0a3069;
--color-prettylights-syntax-variable: #953800;
--color-prettylights-syntax-brackethighlighter-unmatched: #82071e;
--color-prettylights-syntax-invalid-illegal-text: #f6f8fa;
--color-prettylights-syntax-invalid-illegal-bg: #82071e;
--color-prettylights-syntax-carriage-return-text: #f6f8fa;
--color-prettylights-syntax-carriage-return-bg: #cf222e;
--color-prettylights-syntax-string-regexp: #116329;
--color-prettylights-syntax-markup-list: #3b2300;
--color-prettylights-syntax-markup-heading: #0550ae;
--color-prettylights-syntax-markup-italic: #24292f;
--color-prettylights-syntax-markup-bold: #24292f;
--color-prettylights-syntax-markup-deleted-text: #82071e;
--color-prettylights-syntax-markup-deleted-bg: #ffebe9;
--color-prettylights-syntax-markup-inserted-text: #116329;
--color-prettylights-syntax-markup-inserted-bg: #dafbe1;
--color-prettylights-syntax-markup-changed-text: #953800;
--color-prettylights-syntax-markup-changed-bg: #ffd8b5;
--color-prettylights-syntax-markup-ignored-text: #eaeef2;
--color-prettylights-syntax-markup-ignored-bg: #0550ae;
--color-prettylights-syntax-meta-diff-range: #8250df;
--color-prettylights-syntax-brackethighlighter-angle: #57606a;
--color-prettylights-syntax-sublimelinter-gutter-mark: #8c959f;
--color-prettylights-syntax-constant-other-reference-link: #0a3069;
--color-fg-default: #1F2328;
--color-fg-muted: #656d76;
--color-fg-subtle: #6e7781;
--color-canvas-default: #ffffff;
--color-canvas-subtle: #f6f8fa;
--color-border-default: #d0d7de;
--color-border-muted: hsla(210,18%,87%,1);
--color-neutral-muted: rgba(175,184,193,0.2);
--color-accent-fg: #0969da;
--color-accent-emphasis: #0969da;
--color-success-fg: #1a7f37;
--color-success-emphasis: #1f883d;
--color-attention-fg: #9a6700;
--color-attention-emphasis: #9a6700;
--color-attention-subtle: #fff8c5;
--color-danger-fg: #d1242f;
--color-danger-emphasis: #cf222e;
--color-done-fg: #8250df;
--color-done-emphasis: #8250df;
}
}
[data-color-mode=light][data-light-theme=light_colorblind],
[data-color-mode=dark][data-dark-theme=light_colorblind],
.vscode-body.vscode-light [data-color-mode=auto][data-light-theme=light_colorblind],
.vscode-body.vscode-dark [data-color-mode=auto][data-dark-theme=light_colorblind] {
/*light_colorblind*/
color-scheme: light;
--color-prettylights-syntax-comment: #57606a;
--color-prettylights-syntax-constant: #0550ae;
--color-prettylights-syntax-entity: #6639ba;
--color-prettylights-syntax-storage-modifier-import: #24292f;
--color-prettylights-syntax-entity-tag: #0550ae;
--color-prettylights-syntax-keyword: #b35900;
--color-prettylights-syntax-string: #0a3069;
--color-prettylights-syntax-variable: #8a4600;
--color-prettylights-syntax-brackethighlighter-unmatched: #6f3800;
--color-prettylights-syntax-invalid-illegal-text: #f6f8fa;
--color-prettylights-syntax-invalid-illegal-bg: #6f3800;
--color-prettylights-syntax-carriage-return-text: #f6f8fa;
--color-prettylights-syntax-carriage-return-bg: #b35900;
--color-prettylights-syntax-string-regexp: #0550ae;
--color-prettylights-syntax-markup-list: #3b2300;
--color-prettylights-syntax-markup-heading: #0550ae;
--color-prettylights-syntax-markup-italic: #24292f;
--color-prettylights-syntax-markup-bold: #24292f;
--color-prettylights-syntax-markup-deleted-text: #6f3800;
--color-prettylights-syntax-markup-deleted-bg: #fff5e8;
--color-prettylights-syntax-markup-inserted-text: #0550ae;
--color-prettylights-syntax-markup-inserted-bg: #ddf4ff;
--color-prettylights-syntax-markup-changed-text: #8a4600;
--color-prettylights-syntax-markup-changed-bg: #ffddb0;
--color-prettylights-syntax-markup-ignored-text: #eaeef2;
--color-prettylights-syntax-markup-ignored-bg: #0550ae;
--color-prettylights-syntax-meta-diff-range: #8250df;
--color-prettylights-syntax-brackethighlighter-angle: #57606a;
--color-prettylights-syntax-sublimelinter-gutter-mark: #8c959f;
--color-prettylights-syntax-constant-other-reference-link: #0a3069;
--color-fg-default: #24292f;
--color-fg-muted: #57606a;
--color-fg-subtle: #6e7781;
--color-canvas-default: #ffffff;
--color-canvas-subtle: #f6f8fa;
--color-border-default: #d0d7de;
--color-border-muted: hsla(210,18%,87%,1);
--color-neutral-muted: rgba(175,184,193,0.2);
--color-accent-fg: #0969da;
--color-accent-emphasis: #0969da;
--color-success-fg: #0969da;
--color-success-emphasis: #0969da;
--color-attention-fg: #9a6700;
--color-attention-emphasis: #9a6700;
--color-attention-subtle: #fff8c5;
--color-danger-fg: #b35900;
--color-danger-emphasis: #b35900;
--color-done-fg: #8250df;
--color-done-emphasis: #8250df;
}
@media (prefers-color-scheme: light) {
[data-color-mode='system'][data-light-theme=light_colorblind] {
/*light_colorblind*/
color-scheme: light;
--color-prettylights-syntax-comment: #57606a;
--color-prettylights-syntax-constant: #0550ae;
--color-prettylights-syntax-entity: #6639ba;
--color-prettylights-syntax-storage-modifier-import: #24292f;
--color-prettylights-syntax-entity-tag: #0550ae;
--color-prettylights-syntax-keyword: #b35900;
--color-prettylights-syntax-string: #0a3069;
--color-prettylights-syntax-variable: #8a4600;
--color-prettylights-syntax-brackethighlighter-unmatched: #6f3800;
--color-prettylights-syntax-invalid-illegal-text: #f6f8fa;
--color-prettylights-syntax-invalid-illegal-bg: #6f3800;
--color-prettylights-syntax-carriage-return-text: #f6f8fa;
--color-prettylights-syntax-carriage-return-bg: #b35900;
--color-prettylights-syntax-string-regexp: #0550ae;
--color-prettylights-syntax-markup-list: #3b2300;
--color-prettylights-syntax-markup-heading: #0550ae;
--color-prettylights-syntax-markup-italic: #24292f;
--color-prettylights-syntax-markup-bold: #24292f;
--color-prettylights-syntax-markup-deleted-text: #6f3800;
--color-prettylights-syntax-markup-deleted-bg: #fff5e8;
--color-prettylights-syntax-markup-inserted-text: #0550ae;
--color-prettylights-syntax-markup-inserted-bg: #ddf4ff;
--color-prettylights-syntax-markup-changed-text: #8a4600;
--color-prettylights-syntax-markup-changed-bg: #ffddb0;
--color-prettylights-syntax-markup-ignored-text: #eaeef2;
--color-prettylights-syntax-markup-ignored-bg: #0550ae;
--color-prettylights-syntax-meta-diff-range: #8250df;
--color-prettylights-syntax-brackethighlighter-angle: #57606a;
--color-prettylights-syntax-sublimelinter-gutter-mark: #8c959f;
--color-prettylights-syntax-constant-other-reference-link: #0a3069;
--color-fg-default: #24292f;
--color-fg-muted: #57606a;
--color-fg-subtle: #6e7781;
--color-canvas-default: #ffffff;
--color-canvas-subtle: #f6f8fa;
--color-border-default: #d0d7de;
--color-border-muted: hsla(210,18%,87%,1);
--color-neutral-muted: rgba(175,184,193,0.2);
--color-accent-fg: #0969da;
--color-accent-emphasis: #0969da;
--color-success-fg: #0969da;
--color-success-emphasis: #0969da;
--color-attention-fg: #9a6700;
--color-attention-emphasis: #9a6700;
--color-attention-subtle: #fff8c5;
--color-danger-fg: #b35900;
--color-danger-emphasis: #b35900;
--color-done-fg: #8250df;
--color-done-emphasis: #8250df;
}
}
@media (prefers-color-scheme: dark) {
[data-color-mode='system'][data-dark-theme=light_colorblind] {
/*light_colorblind*/
color-scheme: light;
--color-prettylights-syntax-comment: #57606a;
--color-prettylights-syntax-constant: #0550ae;
--color-prettylights-syntax-entity: #6639ba;
--color-prettylights-syntax-storage-modifier-import: #24292f;
--color-prettylights-syntax-entity-tag: #0550ae;
--color-prettylights-syntax-keyword: #b35900;
--color-prettylights-syntax-string: #0a3069;
--color-prettylights-syntax-variable: #8a4600;
--color-prettylights-syntax-brackethighlighter-unmatched: #6f3800;
--color-prettylights-syntax-invalid-illegal-text: #f6f8fa;
--color-prettylights-syntax-invalid-illegal-bg: #6f3800;
--color-prettylights-syntax-carriage-return-text: #f6f8fa;
--color-prettylights-syntax-carriage-return-bg: #b35900;
--color-prettylights-syntax-string-regexp: #0550ae;
--color-prettylights-syntax-markup-list: #3b2300;
--color-prettylights-syntax-markup-heading: #0550ae;
--color-prettylights-syntax-markup-italic: #24292f;
--color-prettylights-syntax-markup-bold: #24292f;
--color-prettylights-syntax-markup-deleted-text: #6f3800;
--color-prettylights-syntax-markup-deleted-bg: #fff5e8;
--color-prettylights-syntax-markup-inserted-text: #0550ae;
--color-prettylights-syntax-markup-inserted-bg: #ddf4ff;
--color-prettylights-syntax-markup-changed-text: #8a4600;
--color-prettylights-syntax-markup-changed-bg: #ffddb0;
--color-prettylights-syntax-markup-ignored-text: #eaeef2;
--color-prettylights-syntax-markup-ignored-bg: #0550ae;
--color-prettylights-syntax-meta-diff-range: #8250df;
--color-prettylights-syntax-brackethighlighter-angle: #57606a;
--color-prettylights-syntax-sublimelinter-gutter-mark: #8c959f;
--color-prettylights-syntax-constant-other-reference-link: #0a3069;
--color-fg-default: #24292f;
--color-fg-muted: #57606a;
--color-fg-subtle: #6e7781;
--color-canvas-default: #ffffff;
--color-canvas-subtle: #f6f8fa;
--color-border-default: #d0d7de;
--color-border-muted: hsla(210,18%,87%,1);
--color-neutral-muted: rgba(175,184,193,0.2);
--color-accent-fg: #0969da;
--color-accent-emphasis: #0969da;
--color-success-fg: #0969da;
--color-success-emphasis: #0969da;
--color-attention-fg: #9a6700;
--color-attention-emphasis: #9a6700;
--color-attention-subtle: #fff8c5;
--color-danger-fg: #b35900;
--color-danger-emphasis: #b35900;
--color-done-fg: #8250df;
--color-done-emphasis: #8250df;
}
}
[data-color-mode=light][data-light-theme=light_tritanopia],
[data-color-mode=dark][data-dark-theme=light_tritanopia],
.vscode-body.vscode-light [data-color-mode=auto][data-light-theme=light_tritanopia],
.vscode-body.vscode-dark [data-color-mode=auto][data-dark-theme=light_tritanopia] {
/*light_tritanopia*/
color-scheme: light;
--color-prettylights-syntax-comment: #57606a;
--color-prettylights-syntax-constant: #0550ae;
--color-prettylights-syntax-entity: #6639ba;
--color-prettylights-syntax-storage-modifier-import: #24292f;
--color-prettylights-syntax-entity-tag: #0550ae;
--color-prettylights-syntax-keyword: #cf222e;
--color-prettylights-syntax-string: #0a3069;
--color-prettylights-syntax-variable: #a40e26;
--color-prettylights-syntax-brackethighlighter-unmatched: #82071e;
--color-prettylights-syntax-invalid-illegal-text: #f6f8fa;
--color-prettylights-syntax-invalid-illegal-bg: #82071e;
--color-prettylights-syntax-carriage-return-text: #f6f8fa;
--color-prettylights-syntax-carriage-return-bg: #cf222e;
--color-prettylights-syntax-string-regexp: #0550ae;
--color-prettylights-syntax-markup-list: #3b2300;
--color-prettylights-syntax-markup-heading: #0550ae;
--color-prettylights-syntax-markup-italic: #24292f;
--color-prettylights-syntax-markup-bold: #24292f;
--color-prettylights-syntax-markup-deleted-text: #82071e;
--color-prettylights-syntax-markup-deleted-bg: #ffebe9;
--color-prettylights-syntax-markup-inserted-text: #0550ae;
--color-prettylights-syntax-markup-inserted-bg: #ddf4ff;
--color-prettylights-syntax-markup-changed-text: #a40e26;
--color-prettylights-syntax-markup-changed-bg: #ffcecb;
--color-prettylights-syntax-markup-ignored-text: #eaeef2;
--color-prettylights-syntax-markup-ignored-bg: #0550ae;
--color-prettylights-syntax-meta-diff-range: #8250df;
--color-prettylights-syntax-brackethighlighter-angle: #57606a;
--color-prettylights-syntax-sublimelinter-gutter-mark: #8c959f;
--color-prettylights-syntax-constant-other-reference-link: #0a3069;
--color-fg-default: #24292f;
--color-fg-muted: #57606a;
--color-fg-subtle: #6e7781;
--color-canvas-default: #ffffff;
--color-canvas-subtle: #f6f8fa;
--color-border-default: #d0d7de;
--color-border-muted: hsla(210,18%,87%,1);
--color-neutral-muted: rgba(175,184,193,0.2);
--color-accent-fg: #0969da;
--color-accent-emphasis: #0969da;
--color-success-fg: #0969da;
--color-success-emphasis: #0969da;
--color-attention-fg: #9a6700;
--color-attention-emphasis: #9a6700;
--color-attention-subtle: #fff8c5;
--color-danger-fg: #cf222e;
--color-danger-emphasis: #cf222e;
--color-done-fg: #8250df;
--color-done-emphasis: #8250df;
}
@media (prefers-color-scheme: light) {
[data-color-mode='system'][data-light-theme=light_tritanopia] {
/*light_tritanopia*/
color-scheme: light;
--color-prettylights-syntax-comment: #57606a;
--color-prettylights-syntax-constant: #0550ae;
--color-prettylights-syntax-entity: #6639ba;
--color-prettylights-syntax-storage-modifier-import: #24292f;
--color-prettylights-syntax-entity-tag: #0550ae;
--color-prettylights-syntax-keyword: #cf222e;
--color-prettylights-syntax-string: #0a3069;
--color-prettylights-syntax-variable: #a40e26;
--color-prettylights-syntax-brackethighlighter-unmatched: #82071e;
--color-prettylights-syntax-invalid-illegal-text: #f6f8fa;
--color-prettylights-syntax-invalid-illegal-bg: #82071e;
--color-prettylights-syntax-carriage-return-text: #f6f8fa;
--color-prettylights-syntax-carriage-return-bg: #cf222e;
--color-prettylights-syntax-string-regexp: #0550ae;
--color-prettylights-syntax-markup-list: #3b2300;
--color-prettylights-syntax-markup-heading: #0550ae;
--color-prettylights-syntax-markup-italic: #24292f;
--color-prettylights-syntax-markup-bold: #24292f;
--color-prettylights-syntax-markup-deleted-text: #82071e;
--color-prettylights-syntax-markup-deleted-bg: #ffebe9;
--color-prettylights-syntax-markup-inserted-text: #0550ae;
--color-prettylights-syntax-markup-inserted-bg: #ddf4ff;
--color-prettylights-syntax-markup-changed-text: #a40e26;
--color-prettylights-syntax-markup-changed-bg: #ffcecb;
--color-prettylights-syntax-markup-ignored-text: #eaeef2;
--color-prettylights-syntax-markup-ignored-bg: #0550ae;
--color-prettylights-syntax-meta-diff-range: #8250df;
--color-prettylights-syntax-brackethighlighter-angle: #57606a;
--color-prettylights-syntax-sublimelinter-gutter-mark: #8c959f;
--color-prettylights-syntax-constant-other-reference-link: #0a3069;
--color-fg-default: #24292f;
--color-fg-muted: #57606a;
--color-fg-subtle: #6e7781;
--color-canvas-default: #ffffff;
--color-canvas-subtle: #f6f8fa;
--color-border-default: #d0d7de;
--color-border-muted: hsla(210,18%,87%,1);
--color-neutral-muted: rgba(175,184,193,0.2);
--color-accent-fg: #0969da;
--color-accent-emphasis: #0969da;
--color-success-fg: #0969da;
--color-success-emphasis: #0969da;
--color-attention-fg: #9a6700;
--color-attention-emphasis: #9a6700;
--color-attention-subtle: #fff8c5;
--color-danger-fg: #cf222e;
--color-danger-emphasis: #cf222e;
--color-done-fg: #8250df;
--color-done-emphasis: #8250df;
}
}
@media (prefers-color-scheme: dark) {
[data-color-mode='system'][data-dark-theme=light_tritanopia] {
/*light_tritanopia*/
color-scheme: light;
--color-prettylights-syntax-comment: #57606a;
--color-prettylights-syntax-constant: #0550ae;
--color-prettylights-syntax-entity: #6639ba;
--color-prettylights-syntax-storage-modifier-import: #24292f;
--color-prettylights-syntax-entity-tag: #0550ae;
--color-prettylights-syntax-keyword: #cf222e;
--color-prettylights-syntax-string: #0a3069;
--color-prettylights-syntax-variable: #a40e26;
--color-prettylights-syntax-brackethighlighter-unmatched: #82071e;
--color-prettylights-syntax-invalid-illegal-text: #f6f8fa;
--color-prettylights-syntax-invalid-illegal-bg: #82071e;
--color-prettylights-syntax-carriage-return-text: #f6f8fa;
--color-prettylights-syntax-carriage-return-bg: #cf222e;
--color-prettylights-syntax-string-regexp: #0550ae;
--color-prettylights-syntax-markup-list: #3b2300;
--color-prettylights-syntax-markup-heading: #0550ae;
--color-prettylights-syntax-markup-italic: #24292f;
--color-prettylights-syntax-markup-bold: #24292f;
--color-prettylights-syntax-markup-deleted-text: #82071e;
--color-prettylights-syntax-markup-deleted-bg: #ffebe9;
--color-prettylights-syntax-markup-inserted-text: #0550ae;
--color-prettylights-syntax-markup-inserted-bg: #ddf4ff;
--color-prettylights-syntax-markup-changed-text: #a40e26;
--color-prettylights-syntax-markup-changed-bg: #ffcecb;
--color-prettylights-syntax-markup-ignored-text: #eaeef2;
--color-prettylights-syntax-markup-ignored-bg: #0550ae;
--color-prettylights-syntax-meta-diff-range: #8250df;
--color-prettylights-syntax-brackethighlighter-angle: #57606a;
--color-prettylights-syntax-sublimelinter-gutter-mark: #8c959f;
--color-prettylights-syntax-constant-other-reference-link: #0a3069;
--color-fg-default: #24292f;
--color-fg-muted: #57606a;
--color-fg-subtle: #6e7781;
--color-canvas-default: #ffffff;
--color-canvas-subtle: #f6f8fa;
--color-border-default: #d0d7de;
--color-border-muted: hsla(210,18%,87%,1);
--color-neutral-muted: rgba(175,184,193,0.2);
--color-accent-fg: #0969da;
--color-accent-emphasis: #0969da;
--color-success-fg: #0969da;
--color-success-emphasis: #0969da;
--color-attention-fg: #9a6700;
--color-attention-emphasis: #9a6700;
--color-attention-subtle: #fff8c5;
--color-danger-fg: #cf222e;
--color-danger-emphasis: #cf222e;
--color-done-fg: #8250df;
--color-done-emphasis: #8250df;
}
}
[data-color-mode=light][data-light-theme=light_high_contrast],
[data-color-mode=dark][data-dark-theme=light_high_contrast],
.vscode-body.vscode-light [data-color-mode=auto][data-light-theme=light_high_contrast],
.vscode-body.vscode-dark [data-color-mode=auto][data-dark-theme=light_high_contrast] {
/*light_high_contrast*/
color-scheme: light;
--color-prettylights-syntax-comment: #4b535d;
--color-prettylights-syntax-constant: #023b95;
--color-prettylights-syntax-entity: #512598;
--color-prettylights-syntax-storage-modifier-import: #0e1116;
--color-prettylights-syntax-entity-tag: #024c1a;
--color-prettylights-syntax-keyword: #a0111f;
--color-prettylights-syntax-string: #032563;
--color-prettylights-syntax-variable: #702c00;
--color-prettylights-syntax-brackethighlighter-unmatched: #6e011a;
--color-prettylights-syntax-invalid-illegal-text: #ffffff;
--color-prettylights-syntax-invalid-illegal-bg: #6e011a;
--color-prettylights-syntax-carriage-return-text: #ffffff;
--color-prettylights-syntax-carriage-return-bg: #a0111f;
--color-prettylights-syntax-string-regexp: #024c1a;
--color-prettylights-syntax-markup-list: #2e1800;
--color-prettylights-syntax-markup-heading: #023b95;
--color-prettylights-syntax-markup-italic: #0e1116;
--color-prettylights-syntax-markup-bold: #0e1116;
--color-prettylights-syntax-markup-deleted-text: #6e011a;
--color-prettylights-syntax-markup-deleted-bg: #fff0ee;
--color-prettylights-syntax-markup-inserted-text: #024c1a;
--color-prettylights-syntax-markup-inserted-bg: #d2fedb;
--color-prettylights-syntax-markup-changed-text: #702c00;
--color-prettylights-syntax-markup-changed-bg: #ffc67b;
--color-prettylights-syntax-markup-ignored-text: #e7ecf0;
--color-prettylights-syntax-markup-ignored-bg: #023b95;
--color-prettylights-syntax-meta-diff-range: #622cbc;
--color-prettylights-syntax-brackethighlighter-angle: #4b535d;
--color-prettylights-syntax-sublimelinter-gutter-mark: #88929d;
--color-prettylights-syntax-constant-other-reference-link: #032563;
--color-fg-default: #0e1116;
--color-fg-muted: #0e1116;
--color-fg-subtle: #66707b;
--color-canvas-default: #ffffff;
--color-canvas-subtle: #e7ecf0;
--color-border-default: #20252c;
--color-border-muted: #88929d;
--color-neutral-muted: rgba(172,182,192,0.2);
--color-accent-fg: #0349b4;
--color-accent-emphasis: #0349b4;
--color-success-fg: #055d20;
--color-success-emphasis: #055d20;
--color-attention-fg: #744500;
--color-attention-emphasis: #744500;
--color-attention-subtle: #fcf7be;
--color-danger-fg: #d1242f;
--color-danger-emphasis: #a0111f;
--color-done-fg: #622cbc;
--color-done-emphasis: #622cbc;
}
@media (prefers-color-scheme: light) {
[data-color-mode='system'][data-light-theme=light_high_contrast] {
/*light_high_contrast*/
color-scheme: light;
--color-prettylights-syntax-comment: #4b535d;
--color-prettylights-syntax-constant: #023b95;
--color-prettylights-syntax-entity: #512598;
--color-prettylights-syntax-storage-modifier-import: #0e1116;
--color-prettylights-syntax-entity-tag: #024c1a;
--color-prettylights-syntax-keyword: #a0111f;
--color-prettylights-syntax-string: #032563;
--color-prettylights-syntax-variable: #702c00;
--color-prettylights-syntax-brackethighlighter-unmatched: #6e011a;
--color-prettylights-syntax-invalid-illegal-text: #ffffff;
--color-prettylights-syntax-invalid-illegal-bg: #6e011a;
--color-prettylights-syntax-carriage-return-text: #ffffff;
--color-prettylights-syntax-carriage-return-bg: #a0111f;
--color-prettylights-syntax-string-regexp: #024c1a;
--color-prettylights-syntax-markup-list: #2e1800;
--color-prettylights-syntax-markup-heading: #023b95;
--color-prettylights-syntax-markup-italic: #0e1116;
--color-prettylights-syntax-markup-bold: #0e1116;
--color-prettylights-syntax-markup-deleted-text: #6e011a;
--color-prettylights-syntax-markup-deleted-bg: #fff0ee;
--color-prettylights-syntax-markup-inserted-text: #024c1a;
--color-prettylights-syntax-markup-inserted-bg: #d2fedb;
--color-prettylights-syntax-markup-changed-text: #702c00;
--color-prettylights-syntax-markup-changed-bg: #ffc67b;
--color-prettylights-syntax-markup-ignored-text: #e7ecf0;
--color-prettylights-syntax-markup-ignored-bg: #023b95;
--color-prettylights-syntax-meta-diff-range: #622cbc;
--color-prettylights-syntax-brackethighlighter-angle: #4b535d;
--color-prettylights-syntax-sublimelinter-gutter-mark: #88929d;
--color-prettylights-syntax-constant-other-reference-link: #032563;
--color-fg-default: #0e1116;
--color-fg-muted: #0e1116;
--color-fg-subtle: #66707b;
--color-canvas-default: #ffffff;
--color-canvas-subtle: #e7ecf0;
--color-border-default: #20252c;
--color-border-muted: #88929d;
--color-neutral-muted: rgba(172,182,192,0.2);
--color-accent-fg: #0349b4;
--color-accent-emphasis: #0349b4;
--color-success-fg: #055d20;
--color-success-emphasis: #055d20;
--color-attention-fg: #744500;
--color-attention-emphasis: #744500;
--color-attention-subtle: #fcf7be;
--color-danger-fg: #d1242f;
--color-danger-emphasis: #a0111f;
--color-done-fg: #622cbc;
--color-done-emphasis: #622cbc;
}
}
@media (prefers-color-scheme: dark) {
[data-color-mode='system'][data-dark-theme=light_high_contrast] {
/*light_high_contrast*/
color-scheme: light;
--color-prettylights-syntax-comment: #4b535d;
--color-prettylights-syntax-constant: #023b95;
--color-prettylights-syntax-entity: #512598;
--color-prettylights-syntax-storage-modifier-import: #0e1116;
--color-prettylights-syntax-entity-tag: #024c1a;
--color-prettylights-syntax-keyword: #a0111f;
--color-prettylights-syntax-string: #032563;
--color-prettylights-syntax-variable: #702c00;
--color-prettylights-syntax-brackethighlighter-unmatched: #6e011a;
--color-prettylights-syntax-invalid-illegal-text: #ffffff;
--color-prettylights-syntax-invalid-illegal-bg: #6e011a;
--color-prettylights-syntax-carriage-return-text: #ffffff;
--color-prettylights-syntax-carriage-return-bg: #a0111f;
--color-prettylights-syntax-string-regexp: #024c1a;
--color-prettylights-syntax-markup-list: #2e1800;
--color-prettylights-syntax-markup-heading: #023b95;
--color-prettylights-syntax-markup-italic: #0e1116;
--color-prettylights-syntax-markup-bold: #0e1116;
--color-prettylights-syntax-markup-deleted-text: #6e011a;
--color-prettylights-syntax-markup-deleted-bg: #fff0ee;
--color-prettylights-syntax-markup-inserted-text: #024c1a;
--color-prettylights-syntax-markup-inserted-bg: #d2fedb;
--color-prettylights-syntax-markup-changed-text: #702c00;
--color-prettylights-syntax-markup-changed-bg: #ffc67b;
--color-prettylights-syntax-markup-ignored-text: #e7ecf0;
--color-prettylights-syntax-markup-ignored-bg: #023b95;
--color-prettylights-syntax-meta-diff-range: #622cbc;
--color-prettylights-syntax-brackethighlighter-angle: #4b535d;
--color-prettylights-syntax-sublimelinter-gutter-mark: #88929d;
--color-prettylights-syntax-constant-other-reference-link: #032563;
--color-fg-default: #0e1116;
--color-fg-muted: #0e1116;
--color-fg-subtle: #66707b;
--color-canvas-default: #ffffff;
--color-canvas-subtle: #e7ecf0;
--color-border-default: #20252c;
--color-border-muted: #88929d;
--color-neutral-muted: rgba(172,182,192,0.2);
--color-accent-fg: #0349b4;
--color-accent-emphasis: #0349b4;
--color-success-fg: #055d20;
--color-success-emphasis: #055d20;
--color-attention-fg: #744500;
--color-attention-emphasis: #744500;
--color-attention-subtle: #fcf7be;
--color-danger-fg: #d1242f;
--color-danger-emphasis: #a0111f;
--color-done-fg: #622cbc;
--color-done-emphasis: #622cbc;
}
}
[data-color-mode=light][data-light-theme=dark],
[data-color-mode=dark][data-dark-theme=dark],
.vscode-body.vscode-light [data-color-mode=auto][data-light-theme=dark],
.vscode-body.vscode-dark [data-color-mode=auto][data-dark-theme=dark] {
/*dark*/
color-scheme: dark;
--color-prettylights-syntax-comment: #8b949e;
--color-prettylights-syntax-constant: #79c0ff;
--color-prettylights-syntax-entity: #d2a8ff;
--color-prettylights-syntax-storage-modifier-import: #c9d1d9;
--color-prettylights-syntax-entity-tag: #7ee787;
--color-prettylights-syntax-keyword: #ff7b72;
--color-prettylights-syntax-string: #a5d6ff;
--color-prettylights-syntax-variable: #ffa657;
--color-prettylights-syntax-brackethighlighter-unmatched: #f85149;
--color-prettylights-syntax-invalid-illegal-text: #f0f6fc;
--color-prettylights-syntax-invalid-illegal-bg: #8e1519;
--color-prettylights-syntax-carriage-return-text: #f0f6fc;
--color-prettylights-syntax-carriage-return-bg: #b62324;
--color-prettylights-syntax-string-regexp: #7ee787;
--color-prettylights-syntax-markup-list: #f2cc60;
--color-prettylights-syntax-markup-heading: #1f6feb;
--color-prettylights-syntax-markup-italic: #c9d1d9;
--color-prettylights-syntax-markup-bold: #c9d1d9;
--color-prettylights-syntax-markup-deleted-text: #ffdcd7;
--color-prettylights-syntax-markup-deleted-bg: #67060c;
--color-prettylights-syntax-markup-inserted-text: #aff5b4;
--color-prettylights-syntax-markup-inserted-bg: #033a16;
--color-prettylights-syntax-markup-changed-text: #ffdfb6;
--color-prettylights-syntax-markup-changed-bg: #5a1e02;
--color-prettylights-syntax-markup-ignored-text: #c9d1d9;
--color-prettylights-syntax-markup-ignored-bg: #1158c7;
--color-prettylights-syntax-meta-diff-range: #d2a8ff;
--color-prettylights-syntax-brackethighlighter-angle: #8b949e;
--color-prettylights-syntax-sublimelinter-gutter-mark: #484f58;
--color-prettylights-syntax-constant-other-reference-link: #a5d6ff;
--color-fg-default: #e6edf3;
--color-fg-muted: #848d97;
--color-fg-subtle: #6e7681;
--color-canvas-default: #0d1117;
--color-canvas-subtle: #161b22;
--color-border-default: #30363d;
--color-border-muted: #21262d;
--color-neutral-muted: rgba(110,118,129,0.4);
--color-accent-fg: #2f81f7;
--color-accent-emphasis: #1f6feb;
--color-success-fg: #3fb950;
--color-success-emphasis: #238636;
--color-attention-fg: #d29922;
--color-attention-emphasis: #9e6a03;
--color-attention-subtle: rgba(187,128,9,0.15);
--color-danger-fg: #f85149;
--color-danger-emphasis: #da3633;
--color-done-fg: #a371f7;
--color-done-emphasis: #8957e5;
}
@media (prefers-color-scheme: light) {
[data-color-mode='system'][data-light-theme=dark] {
/*dark*/
color-scheme: dark;
--color-prettylights-syntax-comment: #8b949e;
--color-prettylights-syntax-constant: #79c0ff;
--color-prettylights-syntax-entity: #d2a8ff;
--color-prettylights-syntax-storage-modifier-import: #c9d1d9;
--color-prettylights-syntax-entity-tag: #7ee787;
--color-prettylights-syntax-keyword: #ff7b72;
--color-prettylights-syntax-string: #a5d6ff;
--color-prettylights-syntax-variable: #ffa657;
--color-prettylights-syntax-brackethighlighter-unmatched: #f85149;
--color-prettylights-syntax-invalid-illegal-text: #f0f6fc;
--color-prettylights-syntax-invalid-illegal-bg: #8e1519;
--color-prettylights-syntax-carriage-return-text: #f0f6fc;
--color-prettylights-syntax-carriage-return-bg: #b62324;
--color-prettylights-syntax-string-regexp: #7ee787;
--color-prettylights-syntax-markup-list: #f2cc60;
--color-prettylights-syntax-markup-heading: #1f6feb;
--color-prettylights-syntax-markup-italic: #c9d1d9;
--color-prettylights-syntax-markup-bold: #c9d1d9;
--color-prettylights-syntax-markup-deleted-text: #ffdcd7;
--color-prettylights-syntax-markup-deleted-bg: #67060c;
--color-prettylights-syntax-markup-inserted-text: #aff5b4;
--color-prettylights-syntax-markup-inserted-bg: #033a16;
--color-prettylights-syntax-markup-changed-text: #ffdfb6;
--color-prettylights-syntax-markup-changed-bg: #5a1e02;
--color-prettylights-syntax-markup-ignored-text: #c9d1d9;
--color-prettylights-syntax-markup-ignored-bg: #1158c7;
--color-prettylights-syntax-meta-diff-range: #d2a8ff;
--color-prettylights-syntax-brackethighlighter-angle: #8b949e;
--color-prettylights-syntax-sublimelinter-gutter-mark: #484f58;
--color-prettylights-syntax-constant-other-reference-link: #a5d6ff;
--color-fg-default: #e6edf3;
--color-fg-muted: #848d97;
--color-fg-subtle: #6e7681;
--color-canvas-default: #0d1117;
--color-canvas-subtle: #161b22;
--color-border-default: #30363d;
--color-border-muted: #21262d;
--color-neutral-muted: rgba(110,118,129,0.4);
--color-accent-fg: #2f81f7;
--color-accent-emphasis: #1f6feb;
--color-success-fg: #3fb950;
--color-success-emphasis: #238636;
--color-attention-fg: #d29922;
--color-attention-emphasis: #9e6a03;
--color-attention-subtle: rgba(187,128,9,0.15);
--color-danger-fg: #f85149;
--color-danger-emphasis: #da3633;
--color-done-fg: #a371f7;
--color-done-emphasis: #8957e5;
}
}
@media (prefers-color-scheme: dark) {
[data-color-mode='system'][data-dark-theme=dark] {
/*dark*/
color-scheme: dark;
--color-prettylights-syntax-comment: #8b949e;
--color-prettylights-syntax-constant: #79c0ff;
--color-prettylights-syntax-entity: #d2a8ff;
--color-prettylights-syntax-storage-modifier-import: #c9d1d9;
--color-prettylights-syntax-entity-tag: #7ee787;
--color-prettylights-syntax-keyword: #ff7b72;
--color-prettylights-syntax-string: #a5d6ff;
--color-prettylights-syntax-variable: #ffa657;
--color-prettylights-syntax-brackethighlighter-unmatched: #f85149;
--color-prettylights-syntax-invalid-illegal-text: #f0f6fc;
--color-prettylights-syntax-invalid-illegal-bg: #8e1519;
--color-prettylights-syntax-carriage-return-text: #f0f6fc;
--color-prettylights-syntax-carriage-return-bg: #b62324;
--color-prettylights-syntax-string-regexp: #7ee787;
--color-prettylights-syntax-markup-list: #f2cc60;
--color-prettylights-syntax-markup-heading: #1f6feb;
--color-prettylights-syntax-markup-italic: #c9d1d9;
--color-prettylights-syntax-markup-bold: #c9d1d9;
--color-prettylights-syntax-markup-deleted-text: #ffdcd7;
--color-prettylights-syntax-markup-deleted-bg: #67060c;
--color-prettylights-syntax-markup-inserted-text: #aff5b4;
--color-prettylights-syntax-markup-inserted-bg: #033a16;
--color-prettylights-syntax-markup-changed-text: #ffdfb6;
--color-prettylights-syntax-markup-changed-bg: #5a1e02;
--color-prettylights-syntax-markup-ignored-text: #c9d1d9;
--color-prettylights-syntax-markup-ignored-bg: #1158c7;
--color-prettylights-syntax-meta-diff-range: #d2a8ff;
--color-prettylights-syntax-brackethighlighter-angle: #8b949e;
--color-prettylights-syntax-sublimelinter-gutter-mark: #484f58;
--color-prettylights-syntax-constant-other-reference-link: #a5d6ff;
--color-fg-default: #e6edf3;
--color-fg-muted: #848d97;
--color-fg-subtle: #6e7681;
--color-canvas-default: #0d1117;
--color-canvas-subtle: #161b22;
--color-border-default: #30363d;
--color-border-muted: #21262d;
--color-neutral-muted: rgba(110,118,129,0.4);
--color-accent-fg: #2f81f7;
--color-accent-emphasis: #1f6feb;
--color-success-fg: #3fb950;
--color-success-emphasis: #238636;
--color-attention-fg: #d29922;
--color-attention-emphasis: #9e6a03;
--color-attention-subtle: rgba(187,128,9,0.15);
--color-danger-fg: #f85149;
--color-danger-emphasis: #da3633;
--color-done-fg: #a371f7;
--color-done-emphasis: #8957e5;
}
}
[data-color-mode=light][data-light-theme=dark_dimmed],
[data-color-mode=dark][data-dark-theme=dark_dimmed],
.vscode-body.vscode-light [data-color-mode=auto][data-light-theme=dark_dimmed],
.vscode-body.vscode-dark [data-color-mode=auto][data-dark-theme=dark_dimmed] {
/*dark_dimmed*/
color-scheme: dark;
--color-prettylights-syntax-comment: #768390;
--color-prettylights-syntax-constant: #6cb6ff;
--color-prettylights-syntax-entity: #dcbdfb;
--color-prettylights-syntax-storage-modifier-import: #adbac7;
--color-prettylights-syntax-entity-tag: #8ddb8c;
--color-prettylights-syntax-keyword: #f47067;
--color-prettylights-syntax-string: #96d0ff;
--color-prettylights-syntax-variable: #f69d50;
--color-prettylights-syntax-brackethighlighter-unmatched: #e5534b;
--color-prettylights-syntax-invalid-illegal-text: #cdd9e5;
--color-prettylights-syntax-invalid-illegal-bg: #922323;
--color-prettylights-syntax-carriage-return-text: #cdd9e5;
--color-prettylights-syntax-carriage-return-bg: #ad2e2c;
--color-prettylights-syntax-string-regexp: #8ddb8c;
--color-prettylights-syntax-markup-list: #eac55f;
--color-prettylights-syntax-markup-heading: #316dca;
--color-prettylights-syntax-markup-italic: #adbac7;
--color-prettylights-syntax-markup-bold: #adbac7;
--color-prettylights-syntax-markup-deleted-text: #ffd8d3;
--color-prettylights-syntax-markup-deleted-bg: #78191b;
--color-prettylights-syntax-markup-inserted-text: #b4f1b4;
--color-prettylights-syntax-markup-inserted-bg: #1b4721;
--color-prettylights-syntax-markup-changed-text: #ffddb0;
--color-prettylights-syntax-markup-changed-bg: #682d0f;
--color-prettylights-syntax-markup-ignored-text: #adbac7;
--color-prettylights-syntax-markup-ignored-bg: #255ab2;
--color-prettylights-syntax-meta-diff-range: #dcbdfb;
--color-prettylights-syntax-brackethighlighter-angle: #768390;
--color-prettylights-syntax-sublimelinter-gutter-mark: #545d68;
--color-prettylights-syntax-constant-other-reference-link: #96d0ff;
--color-fg-default: #adbac7;
--color-fg-muted: #768390;
--color-fg-subtle: #636e7b;
--color-canvas-default: #22272e;
--color-canvas-subtle: #2d333b;
--color-border-default: #444c56;
--color-border-muted: #373e47;
--color-neutral-muted: rgba(99,110,123,0.4);
--color-accent-fg: #539bf5;
--color-accent-emphasis: #316dca;
--color-success-fg: #57ab5a;
--color-success-emphasis: #347d39;
--color-attention-fg: #c69026;
--color-attention-emphasis: #966600;
--color-attention-subtle: rgba(174,124,20,0.15);
--color-danger-fg: #e5534b;
--color-danger-emphasis: #c93c37;
--color-done-fg: #986ee2;
--color-done-emphasis: #8256d0;
}
@media (prefers-color-scheme: light) {
[data-color-mode='system'][data-light-theme=dark_dimmed] {
/*dark_dimmed*/
color-scheme: dark;
--color-prettylights-syntax-comment: #768390;
--color-prettylights-syntax-constant: #6cb6ff;
--color-prettylights-syntax-entity: #dcbdfb;
--color-prettylights-syntax-storage-modifier-import: #adbac7;
--color-prettylights-syntax-entity-tag: #8ddb8c;
--color-prettylights-syntax-keyword: #f47067;
--color-prettylights-syntax-string: #96d0ff;
--color-prettylights-syntax-variable: #f69d50;
--color-prettylights-syntax-brackethighlighter-unmatched: #e5534b;
--color-prettylights-syntax-invalid-illegal-text: #cdd9e5;
--color-prettylights-syntax-invalid-illegal-bg: #922323;
--color-prettylights-syntax-carriage-return-text: #cdd9e5;
--color-prettylights-syntax-carriage-return-bg: #ad2e2c;
--color-prettylights-syntax-string-regexp: #8ddb8c;
--color-prettylights-syntax-markup-list: #eac55f;
--color-prettylights-syntax-markup-heading: #316dca;
--color-prettylights-syntax-markup-italic: #adbac7;
--color-prettylights-syntax-markup-bold: #adbac7;
--color-prettylights-syntax-markup-deleted-text: #ffd8d3;
--color-prettylights-syntax-markup-deleted-bg: #78191b;
--color-prettylights-syntax-markup-inserted-text: #b4f1b4;
--color-prettylights-syntax-markup-inserted-bg: #1b4721;
--color-prettylights-syntax-markup-changed-text: #ffddb0;
--color-prettylights-syntax-markup-changed-bg: #682d0f;
--color-prettylights-syntax-markup-ignored-text: #adbac7;
--color-prettylights-syntax-markup-ignored-bg: #255ab2;
--color-prettylights-syntax-meta-diff-range: #dcbdfb;
--color-prettylights-syntax-brackethighlighter-angle: #768390;
--color-prettylights-syntax-sublimelinter-gutter-mark: #545d68;
--color-prettylights-syntax-constant-other-reference-link: #96d0ff;
--color-fg-default: #adbac7;
--color-fg-muted: #768390;
--color-fg-subtle: #636e7b;
--color-canvas-default: #22272e;
--color-canvas-subtle: #2d333b;
--color-border-default: #444c56;
--color-border-muted: #373e47;
--color-neutral-muted: rgba(99,110,123,0.4);
--color-accent-fg: #539bf5;
--color-accent-emphasis: #316dca;
--color-success-fg: #57ab5a;
--color-success-emphasis: #347d39;
--color-attention-fg: #c69026;
--color-attention-emphasis: #966600;
--color-attention-subtle: rgba(174,124,20,0.15);
--color-danger-fg: #e5534b;
--color-danger-emphasis: #c93c37;
--color-done-fg: #986ee2;
--color-done-emphasis: #8256d0;
}
}
@media (prefers-color-scheme: dark) {
[data-color-mode='system'][data-dark-theme=dark_dimmed] {
/*dark_dimmed*/
color-scheme: dark;
--color-prettylights-syntax-comment: #768390;
--color-prettylights-syntax-constant: #6cb6ff;
--color-prettylights-syntax-entity: #dcbdfb;
--color-prettylights-syntax-storage-modifier-import: #adbac7;
--color-prettylights-syntax-entity-tag: #8ddb8c;
--color-prettylights-syntax-keyword: #f47067;
--color-prettylights-syntax-string: #96d0ff;
--color-prettylights-syntax-variable: #f69d50;
--color-prettylights-syntax-brackethighlighter-unmatched: #e5534b;
--color-prettylights-syntax-invalid-illegal-text: #cdd9e5;
--color-prettylights-syntax-invalid-illegal-bg: #922323;
--color-prettylights-syntax-carriage-return-text: #cdd9e5;
--color-prettylights-syntax-carriage-return-bg: #ad2e2c;
--color-prettylights-syntax-string-regexp: #8ddb8c;
--color-prettylights-syntax-markup-list: #eac55f;
--color-prettylights-syntax-markup-heading: #316dca;
--color-prettylights-syntax-markup-italic: #adbac7;
--color-prettylights-syntax-markup-bold: #adbac7;
--color-prettylights-syntax-markup-deleted-text: #ffd8d3;
--color-prettylights-syntax-markup-deleted-bg: #78191b;
--color-prettylights-syntax-markup-inserted-text: #b4f1b4;
--color-prettylights-syntax-markup-inserted-bg: #1b4721;
--color-prettylights-syntax-markup-changed-text: #ffddb0;
--color-prettylights-syntax-markup-changed-bg: #682d0f;
--color-prettylights-syntax-markup-ignored-text: #adbac7;
--color-prettylights-syntax-markup-ignored-bg: #255ab2;
--color-prettylights-syntax-meta-diff-range: #dcbdfb;
--color-prettylights-syntax-brackethighlighter-angle: #768390;
--color-prettylights-syntax-sublimelinter-gutter-mark: #545d68;
--color-prettylights-syntax-constant-other-reference-link: #96d0ff;
--color-fg-default: #adbac7;
--color-fg-muted: #768390;
--color-fg-subtle: #636e7b;
--color-canvas-default: #22272e;
--color-canvas-subtle: #2d333b;
--color-border-default: #444c56;
--color-border-muted: #373e47;
--color-neutral-muted: rgba(99,110,123,0.4);
--color-accent-fg: #539bf5;
--color-accent-emphasis: #316dca;
--color-success-fg: #57ab5a;
--color-success-emphasis: #347d39;
--color-attention-fg: #c69026;
--color-attention-emphasis: #966600;
--color-attention-subtle: rgba(174,124,20,0.15);
--color-danger-fg: #e5534b;
--color-danger-emphasis: #c93c37;
--color-done-fg: #986ee2;
--color-done-emphasis: #8256d0;
}
}
[data-color-mode=light][data-light-theme=dark_colorblind],
[data-color-mode=dark][data-dark-theme=dark_colorblind],
.vscode-body.vscode-light [data-color-mode=auto][data-light-theme=dark_colorblind],
.vscode-body.vscode-dark [data-color-mode=auto][data-dark-theme=dark_colorblind] {
/*dark_colorblind*/
color-scheme: dark;
--color-prettylights-syntax-comment: #8b949e;
--color-prettylights-syntax-constant: #79c0ff;
--color-prettylights-syntax-entity: #d2a8ff;
--color-prettylights-syntax-storage-modifier-import: #c9d1d9;
--color-prettylights-syntax-entity-tag: #a5d6ff;
--color-prettylights-syntax-keyword: #ec8e2c;
--color-prettylights-syntax-string: #a5d6ff;
--color-prettylights-syntax-variable: #fdac54;
--color-prettylights-syntax-brackethighlighter-unmatched: #d47616;
--color-prettylights-syntax-invalid-illegal-text: #f0f6fc;
--color-prettylights-syntax-invalid-illegal-bg: #6c3906;
--color-prettylights-syntax-carriage-return-text: #f0f6fc;
--color-prettylights-syntax-carriage-return-bg: #914d04;
--color-prettylights-syntax-string-regexp: #a5d6ff;
--color-prettylights-syntax-markup-list: #f2cc60;
--color-prettylights-syntax-markup-heading: #1f6feb;
--color-prettylights-syntax-markup-italic: #c9d1d9;
--color-prettylights-syntax-markup-bold: #c9d1d9;
--color-prettylights-syntax-markup-deleted-text: #ffe2bb;
--color-prettylights-syntax-markup-deleted-bg: #4e2906;
--color-prettylights-syntax-markup-inserted-text: #cae8ff;
--color-prettylights-syntax-markup-inserted-bg: #0c2d6b;
--color-prettylights-syntax-markup-changed-text: #ffe2bb;
--color-prettylights-syntax-markup-changed-bg: #4e2906;
--color-prettylights-syntax-markup-ignored-text: #c9d1d9;
--color-prettylights-syntax-markup-ignored-bg: #1158c7;
--color-prettylights-syntax-meta-diff-range: #d2a8ff;
--color-prettylights-syntax-brackethighlighter-angle: #8b949e;
--color-prettylights-syntax-sublimelinter-gutter-mark: #484f58;
--color-prettylights-syntax-constant-other-reference-link: #a5d6ff;
--color-fg-default: #c9d1d9;
--color-fg-muted: #8b949e;
--color-fg-subtle: #6e7681;
--color-canvas-default: #0d1117;
--color-canvas-subtle: #161b22;
--color-border-default: #30363d;
--color-border-muted: #21262d;
--color-neutral-muted: rgba(110,118,129,0.4);
--color-accent-fg: #58a6ff;
--color-accent-emphasis: #1f6feb;
--color-success-fg: #58a6ff;
--color-success-emphasis: #1f6feb;
--color-attention-fg: #d29922;
--color-attention-emphasis: #9e6a03;
--color-attention-subtle: rgba(187,128,9,0.15);
--color-danger-fg: #d47616;
--color-danger-emphasis: #b76100;
--color-done-fg: #a371f7;
--color-done-emphasis: #8957e5;
}
@media (prefers-color-scheme: light) {
[data-color-mode='system'][data-light-theme=dark_colorblind] {
/*dark_colorblind*/
color-scheme: dark;
--color-prettylights-syntax-comment: #8b949e;
--color-prettylights-syntax-constant: #79c0ff;
--color-prettylights-syntax-entity: #d2a8ff;
--color-prettylights-syntax-storage-modifier-import: #c9d1d9;
--color-prettylights-syntax-entity-tag: #a5d6ff;
--color-prettylights-syntax-keyword: #ec8e2c;
--color-prettylights-syntax-string: #a5d6ff;
--color-prettylights-syntax-variable: #fdac54;
--color-prettylights-syntax-brackethighlighter-unmatched: #d47616;
--color-prettylights-syntax-invalid-illegal-text: #f0f6fc;
--color-prettylights-syntax-invalid-illegal-bg: #6c3906;
--color-prettylights-syntax-carriage-return-text: #f0f6fc;
--color-prettylights-syntax-carriage-return-bg: #914d04;
--color-prettylights-syntax-string-regexp: #a5d6ff;
--color-prettylights-syntax-markup-list: #f2cc60;
--color-prettylights-syntax-markup-heading: #1f6feb;
--color-prettylights-syntax-markup-italic: #c9d1d9;
--color-prettylights-syntax-markup-bold: #c9d1d9;
--color-prettylights-syntax-markup-deleted-text: #ffe2bb;
--color-prettylights-syntax-markup-deleted-bg: #4e2906;
--color-prettylights-syntax-markup-inserted-text: #cae8ff;
--color-prettylights-syntax-markup-inserted-bg: #0c2d6b;
--color-prettylights-syntax-markup-changed-text: #ffe2bb;
--color-prettylights-syntax-markup-changed-bg: #4e2906;
--color-prettylights-syntax-markup-ignored-text: #c9d1d9;
--color-prettylights-syntax-markup-ignored-bg: #1158c7;
--color-prettylights-syntax-meta-diff-range: #d2a8ff;
--color-prettylights-syntax-brackethighlighter-angle: #8b949e;
--color-prettylights-syntax-sublimelinter-gutter-mark: #484f58;
--color-prettylights-syntax-constant-other-reference-link: #a5d6ff;
--color-fg-default: #c9d1d9;
--color-fg-muted: #8b949e;
--color-fg-subtle: #6e7681;
--color-canvas-default: #0d1117;
--color-canvas-subtle: #161b22;
--color-border-default: #30363d;
--color-border-muted: #21262d;
--color-neutral-muted: rgba(110,118,129,0.4);
--color-accent-fg: #58a6ff;
--color-accent-emphasis: #1f6feb;
--color-success-fg: #58a6ff;
--color-success-emphasis: #1f6feb;
--color-attention-fg: #d29922;
--color-attention-emphasis: #9e6a03;
--color-attention-subtle: rgba(187,128,9,0.15);
--color-danger-fg: #d47616;
--color-danger-emphasis: #b76100;
--color-done-fg: #a371f7;
--color-done-emphasis: #8957e5;
}
}
@media (prefers-color-scheme: dark) {
[data-color-mode='system'][data-dark-theme=dark_colorblind] {
/*dark_colorblind*/
color-scheme: dark;
--color-prettylights-syntax-comment: #8b949e;
--color-prettylights-syntax-constant: #79c0ff;
--color-prettylights-syntax-entity: #d2a8ff;
--color-prettylights-syntax-storage-modifier-import: #c9d1d9;
--color-prettylights-syntax-entity-tag: #a5d6ff;
--color-prettylights-syntax-keyword: #ec8e2c;
--color-prettylights-syntax-string: #a5d6ff;
--color-prettylights-syntax-variable: #fdac54;
--color-prettylights-syntax-brackethighlighter-unmatched: #d47616;
--color-prettylights-syntax-invalid-illegal-text: #f0f6fc;
--color-prettylights-syntax-invalid-illegal-bg: #6c3906;
--color-prettylights-syntax-carriage-return-text: #f0f6fc;
--color-prettylights-syntax-carriage-return-bg: #914d04;
--color-prettylights-syntax-string-regexp: #a5d6ff;
--color-prettylights-syntax-markup-list: #f2cc60;
--color-prettylights-syntax-markup-heading: #1f6feb;
--color-prettylights-syntax-markup-italic: #c9d1d9;
--color-prettylights-syntax-markup-bold: #c9d1d9;
--color-prettylights-syntax-markup-deleted-text: #ffe2bb;
--color-prettylights-syntax-markup-deleted-bg: #4e2906;
--color-prettylights-syntax-markup-inserted-text: #cae8ff;
--color-prettylights-syntax-markup-inserted-bg: #0c2d6b;
--color-prettylights-syntax-markup-changed-text: #ffe2bb;
--color-prettylights-syntax-markup-changed-bg: #4e2906;
--color-prettylights-syntax-markup-ignored-text: #c9d1d9;
--color-prettylights-syntax-markup-ignored-bg: #1158c7;
--color-prettylights-syntax-meta-diff-range: #d2a8ff;
--color-prettylights-syntax-brackethighlighter-angle: #8b949e;
--color-prettylights-syntax-sublimelinter-gutter-mark: #484f58;
--color-prettylights-syntax-constant-other-reference-link: #a5d6ff;
--color-fg-default: #c9d1d9;
--color-fg-muted: #8b949e;
--color-fg-subtle: #6e7681;
--color-canvas-default: #0d1117;
--color-canvas-subtle: #161b22;
--color-border-default: #30363d;
--color-border-muted: #21262d;
--color-neutral-muted: rgba(110,118,129,0.4);
--color-accent-fg: #58a6ff;
--color-accent-emphasis: #1f6feb;
--color-success-fg: #58a6ff;
--color-success-emphasis: #1f6feb;
--color-attention-fg: #d29922;
--color-attention-emphasis: #9e6a03;
--color-attention-subtle: rgba(187,128,9,0.15);
--color-danger-fg: #d47616;
--color-danger-emphasis: #b76100;
--color-done-fg: #a371f7;
--color-done-emphasis: #8957e5;
}
}
[data-color-mode=light][data-light-theme=dark_tritanopia],
[data-color-mode=dark][data-dark-theme=dark_tritanopia],
.vscode-body.vscode-light [data-color-mode=auto][data-light-theme=dark_tritanopia],
.vscode-body.vscode-dark [data-color-mode=auto][data-dark-theme=dark_tritanopia] {
/*dark_tritanopia*/
color-scheme: dark;
--color-prettylights-syntax-comment: #8b949e;
--color-prettylights-syntax-constant: #79c0ff;
--color-prettylights-syntax-entity: #d2a8ff;
--color-prettylights-syntax-storage-modifier-import: #c9d1d9;
--color-prettylights-syntax-entity-tag: #a5d6ff;
--color-prettylights-syntax-keyword: #ff7b72;
--color-prettylights-syntax-string: #a5d6ff;
--color-prettylights-syntax-variable: #ffa198;
--color-prettylights-syntax-brackethighlighter-unmatched: #f85149;
--color-prettylights-syntax-invalid-illegal-text: #f0f6fc;
--color-prettylights-syntax-invalid-illegal-bg: #8e1519;
--color-prettylights-syntax-carriage-return-text: #f0f6fc;
--color-prettylights-syntax-carriage-return-bg: #b62324;
--color-prettylights-syntax-string-regexp: #a5d6ff;
--color-prettylights-syntax-markup-list: #f2cc60;
--color-prettylights-syntax-markup-heading: #1f6feb;
--color-prettylights-syntax-markup-italic: #c9d1d9;
--color-prettylights-syntax-markup-bold: #c9d1d9;
--color-prettylights-syntax-markup-deleted-text: #ffdcd7;
--color-prettylights-syntax-markup-deleted-bg: #67060c;
--color-prettylights-syntax-markup-inserted-text: #cae8ff;
--color-prettylights-syntax-markup-inserted-bg: #0c2d6b;
--color-prettylights-syntax-markup-changed-text: #ffdcd7;
--color-prettylights-syntax-markup-changed-bg: #67060c;
--color-prettylights-syntax-markup-ignored-text: #c9d1d9;
--color-prettylights-syntax-markup-ignored-bg: #1158c7;
--color-prettylights-syntax-meta-diff-range: #d2a8ff;
--color-prettylights-syntax-brackethighlighter-angle: #8b949e;
--color-prettylights-syntax-sublimelinter-gutter-mark: #484f58;
--color-prettylights-syntax-constant-other-reference-link: #a5d6ff;
--color-fg-default: #c9d1d9;
--color-fg-muted: #8b949e;
--color-fg-subtle: #6e7681;
--color-canvas-default: #0d1117;
--color-canvas-subtle: #161b22;
--color-border-default: #30363d;
--color-border-muted: #21262d;
--color-neutral-muted: rgba(110,118,129,0.4);
--color-accent-fg: #58a6ff;
--color-accent-emphasis: #1f6feb;
--color-success-fg: #58a6ff;
--color-success-emphasis: #1f6feb;
--color-attention-fg: #d29922;
--color-attention-emphasis: #9e6a03;
--color-attention-subtle: rgba(187,128,9,0.15);
--color-danger-fg: #f85149;
--color-danger-emphasis: #da3633;
--color-done-fg: #a371f7;
--color-done-emphasis: #8957e5;
}
@media (prefers-color-scheme: light) {
[data-color-mode='system'][data-light-theme=dark_tritanopia] {
/*dark_tritanopia*/
color-scheme: dark;
--color-prettylights-syntax-comment: #8b949e;
--color-prettylights-syntax-constant: #79c0ff;
--color-prettylights-syntax-entity: #d2a8ff;
--color-prettylights-syntax-storage-modifier-import: #c9d1d9;
--color-prettylights-syntax-entity-tag: #a5d6ff;
--color-prettylights-syntax-keyword: #ff7b72;
--color-prettylights-syntax-string: #a5d6ff;
--color-prettylights-syntax-variable: #ffa198;
--color-prettylights-syntax-brackethighlighter-unmatched: #f85149;
--color-prettylights-syntax-invalid-illegal-text: #f0f6fc;
--color-prettylights-syntax-invalid-illegal-bg: #8e1519;
--color-prettylights-syntax-carriage-return-text: #f0f6fc;
--color-prettylights-syntax-carriage-return-bg: #b62324;
--color-prettylights-syntax-string-regexp: #a5d6ff;
--color-prettylights-syntax-markup-list: #f2cc60;
--color-prettylights-syntax-markup-heading: #1f6feb;
--color-prettylights-syntax-markup-italic: #c9d1d9;
--color-prettylights-syntax-markup-bold: #c9d1d9;
--color-prettylights-syntax-markup-deleted-text: #ffdcd7;
--color-prettylights-syntax-markup-deleted-bg: #67060c;
--color-prettylights-syntax-markup-inserted-text: #cae8ff;
--color-prettylights-syntax-markup-inserted-bg: #0c2d6b;
--color-prettylights-syntax-markup-changed-text: #ffdcd7;
--color-prettylights-syntax-markup-changed-bg: #67060c;
--color-prettylights-syntax-markup-ignored-text: #c9d1d9;
--color-prettylights-syntax-markup-ignored-bg: #1158c7;
--color-prettylights-syntax-meta-diff-range: #d2a8ff;
--color-prettylights-syntax-brackethighlighter-angle: #8b949e;
--color-prettylights-syntax-sublimelinter-gutter-mark: #484f58;
--color-prettylights-syntax-constant-other-reference-link: #a5d6ff;
--color-fg-default: #c9d1d9;
--color-fg-muted: #8b949e;
--color-fg-subtle: #6e7681;
--color-canvas-default: #0d1117;
--color-canvas-subtle: #161b22;
--color-border-default: #30363d;
--color-border-muted: #21262d;
--color-neutral-muted: rgba(110,118,129,0.4);
--color-accent-fg: #58a6ff;
--color-accent-emphasis: #1f6feb;
--color-success-fg: #58a6ff;
--color-success-emphasis: #1f6feb;
--color-attention-fg: #d29922;
--color-attention-emphasis: #9e6a03;
--color-attention-subtle: rgba(187,128,9,0.15);
--color-danger-fg: #f85149;
--color-danger-emphasis: #da3633;
--color-done-fg: #a371f7;
--color-done-emphasis: #8957e5;
}
}
@media (prefers-color-scheme: dark) {
[data-color-mode='system'][data-dark-theme=dark_tritanopia] {
/*dark_tritanopia*/
color-scheme: dark;
--color-prettylights-syntax-comment: #8b949e;
--color-prettylights-syntax-constant: #79c0ff;
--color-prettylights-syntax-entity: #d2a8ff;
--color-prettylights-syntax-storage-modifier-import: #c9d1d9;
--color-prettylights-syntax-entity-tag: #a5d6ff;
--color-prettylights-syntax-keyword: #ff7b72;
--color-prettylights-syntax-string: #a5d6ff;
--color-prettylights-syntax-variable: #ffa198;
--color-prettylights-syntax-brackethighlighter-unmatched: #f85149;
--color-prettylights-syntax-invalid-illegal-text: #f0f6fc;
--color-prettylights-syntax-invalid-illegal-bg: #8e1519;
--color-prettylights-syntax-carriage-return-text: #f0f6fc;
--color-prettylights-syntax-carriage-return-bg: #b62324;
--color-prettylights-syntax-string-regexp: #a5d6ff;
--color-prettylights-syntax-markup-list: #f2cc60;
--color-prettylights-syntax-markup-heading: #1f6feb;
--color-prettylights-syntax-markup-italic: #c9d1d9;
--color-prettylights-syntax-markup-bold: #c9d1d9;
--color-prettylights-syntax-markup-deleted-text: #ffdcd7;
--color-prettylights-syntax-markup-deleted-bg: #67060c;
--color-prettylights-syntax-markup-inserted-text: #cae8ff;
--color-prettylights-syntax-markup-inserted-bg: #0c2d6b;
--color-prettylights-syntax-markup-changed-text: #ffdcd7;
--color-prettylights-syntax-markup-changed-bg: #67060c;
--color-prettylights-syntax-markup-ignored-text: #c9d1d9;
--color-prettylights-syntax-markup-ignored-bg: #1158c7;
--color-prettylights-syntax-meta-diff-range: #d2a8ff;
--color-prettylights-syntax-brackethighlighter-angle: #8b949e;
--color-prettylights-syntax-sublimelinter-gutter-mark: #484f58;
--color-prettylights-syntax-constant-other-reference-link: #a5d6ff;
--color-fg-default: #c9d1d9;
--color-fg-muted: #8b949e;
--color-fg-subtle: #6e7681;
--color-canvas-default: #0d1117;
--color-canvas-subtle: #161b22;
--color-border-default: #30363d;
--color-border-muted: #21262d;
--color-neutral-muted: rgba(110,118,129,0.4);
--color-accent-fg: #58a6ff;
--color-accent-emphasis: #1f6feb;
--color-success-fg: #58a6ff;
--color-success-emphasis: #1f6feb;
--color-attention-fg: #d29922;
--color-attention-emphasis: #9e6a03;
--color-attention-subtle: rgba(187,128,9,0.15);
--color-danger-fg: #f85149;
--color-danger-emphasis: #da3633;
--color-done-fg: #a371f7;
--color-done-emphasis: #8957e5;
}
}
[data-color-mode=light][data-light-theme=dark_high_contrast],
[data-color-mode=dark][data-dark-theme=dark_high_contrast],
.vscode-body.vscode-light [data-color-mode=auto][data-light-theme=dark_high_contrast],
.vscode-body.vscode-dark [data-color-mode=auto][data-dark-theme=dark_high_contrast] {
/*dark_high_contrast*/
color-scheme: dark;
--color-prettylights-syntax-comment: #bdc4cc;
--color-prettylights-syntax-constant: #91cbff;
--color-prettylights-syntax-entity: #dbb7ff;
--color-prettylights-syntax-storage-modifier-import: #f0f3f6;
--color-prettylights-syntax-entity-tag: #72f088;
--color-prettylights-syntax-keyword: #ff9492;
--color-prettylights-syntax-string: #addcff;
--color-prettylights-syntax-variable: #ffb757;
--color-prettylights-syntax-brackethighlighter-unmatched: #ff6a69;
--color-prettylights-syntax-invalid-illegal-text: #ffffff;
--color-prettylights-syntax-invalid-illegal-bg: #e82a2f;
--color-prettylights-syntax-carriage-return-text: #ffffff;
--color-prettylights-syntax-carriage-return-bg: #ff4445;
--color-prettylights-syntax-string-regexp: #72f088;
--color-prettylights-syntax-markup-list: #fbd669;
--color-prettylights-syntax-markup-heading: #409eff;
--color-prettylights-syntax-markup-italic: #f0f3f6;
--color-prettylights-syntax-markup-bold: #f0f3f6;
--color-prettylights-syntax-markup-deleted-text: #ffdedb;
--color-prettylights-syntax-markup-deleted-bg: #cc1421;
--color-prettylights-syntax-markup-inserted-text: #acf7b6;
--color-prettylights-syntax-markup-inserted-bg: #007728;
--color-prettylights-syntax-markup-changed-text: #ffe1b4;
--color-prettylights-syntax-markup-changed-bg: #a74c00;
--color-prettylights-syntax-markup-ignored-text: #f0f3f6;
--color-prettylights-syntax-markup-ignored-bg: #318bf8;
--color-prettylights-syntax-meta-diff-range: #dbb7ff;
--color-prettylights-syntax-brackethighlighter-angle: #bdc4cc;
--color-prettylights-syntax-sublimelinter-gutter-mark: #7a828e;
--color-prettylights-syntax-constant-other-reference-link: #addcff;
--color-fg-default: #f0f3f6;
--color-fg-muted: #f0f3f6;
--color-fg-subtle: #9ea7b3;
--color-canvas-default: #0a0c10;
--color-canvas-subtle: #272b33;
--color-border-default: #7a828e;
--color-border-muted: #7a828e;
--color-neutral-muted: rgba(158,167,179,0.4);
--color-accent-fg: #71b7ff;
--color-accent-emphasis: #409eff;
--color-success-fg: #26cd4d;
--color-success-emphasis: #09b43a;
--color-attention-fg: #f0b72f;
--color-attention-emphasis: #e09b13;
--color-attention-subtle: rgba(224,155,19,0.15);
--color-danger-fg: #ff6a69;
--color-danger-emphasis: #ff6a69;
--color-done-fg: #b780ff;
--color-done-emphasis: #b87fff;
}
@media (prefers-color-scheme: light) {
[data-color-mode='system'][data-light-theme=dark_high_contrast] {
/*dark_high_contrast*/
color-scheme: dark;
--color-prettylights-syntax-comment: #bdc4cc;
--color-prettylights-syntax-constant: #91cbff;
--color-prettylights-syntax-entity: #dbb7ff;
--color-prettylights-syntax-storage-modifier-import: #f0f3f6;
--color-prettylights-syntax-entity-tag: #72f088;
--color-prettylights-syntax-keyword: #ff9492;
--color-prettylights-syntax-string: #addcff;
--color-prettylights-syntax-variable: #ffb757;
--color-prettylights-syntax-brackethighlighter-unmatched: #ff6a69;
--color-prettylights-syntax-invalid-illegal-text: #ffffff;
--color-prettylights-syntax-invalid-illegal-bg: #e82a2f;
--color-prettylights-syntax-carriage-return-text: #ffffff;
--color-prettylights-syntax-carriage-return-bg: #ff4445;
--color-prettylights-syntax-string-regexp: #72f088;
--color-prettylights-syntax-markup-list: #fbd669;
--color-prettylights-syntax-markup-heading: #409eff;
--color-prettylights-syntax-markup-italic: #f0f3f6;
--color-prettylights-syntax-markup-bold: #f0f3f6;
--color-prettylights-syntax-markup-deleted-text: #ffdedb;
--color-prettylights-syntax-markup-deleted-bg: #cc1421;
--color-prettylights-syntax-markup-inserted-text: #acf7b6;
--color-prettylights-syntax-markup-inserted-bg: #007728;
--color-prettylights-syntax-markup-changed-text: #ffe1b4;
--color-prettylights-syntax-markup-changed-bg: #a74c00;
--color-prettylights-syntax-markup-ignored-text: #f0f3f6;
--color-prettylights-syntax-markup-ignored-bg: #318bf8;
--color-prettylights-syntax-meta-diff-range: #dbb7ff;
--color-prettylights-syntax-brackethighlighter-angle: #bdc4cc;
--color-prettylights-syntax-sublimelinter-gutter-mark: #7a828e;
--color-prettylights-syntax-constant-other-reference-link: #addcff;
--color-fg-default: #f0f3f6;
--color-fg-muted: #f0f3f6;
--color-fg-subtle: #9ea7b3;
--color-canvas-default: #0a0c10;
--color-canvas-subtle: #272b33;
--color-border-default: #7a828e;
--color-border-muted: #7a828e;
--color-neutral-muted: rgba(158,167,179,0.4);
--color-accent-fg: #71b7ff;
--color-accent-emphasis: #409eff;
--color-success-fg: #26cd4d;
--color-success-emphasis: #09b43a;
--color-attention-fg: #f0b72f;
--color-attention-emphasis: #e09b13;
--color-attention-subtle: rgba(224,155,19,0.15);
--color-danger-fg: #ff6a69;
--color-danger-emphasis: #ff6a69;
--color-done-fg: #b780ff;
--color-done-emphasis: #b87fff;
}
}
@media (prefers-color-scheme: dark) {
[data-color-mode='system'][data-dark-theme=dark_high_contrast] {
/*dark_high_contrast*/
color-scheme: dark;
--color-prettylights-syntax-comment: #bdc4cc;
--color-prettylights-syntax-constant: #91cbff;
--color-prettylights-syntax-entity: #dbb7ff;
--color-prettylights-syntax-storage-modifier-import: #f0f3f6;
--color-prettylights-syntax-entity-tag: #72f088;
--color-prettylights-syntax-keyword: #ff9492;
--color-prettylights-syntax-string: #addcff;
--color-prettylights-syntax-variable: #ffb757;
--color-prettylights-syntax-brackethighlighter-unmatched: #ff6a69;
--color-prettylights-syntax-invalid-illegal-text: #ffffff;
--color-prettylights-syntax-invalid-illegal-bg: #e82a2f;
--color-prettylights-syntax-carriage-return-text: #ffffff;
--color-prettylights-syntax-carriage-return-bg: #ff4445;
--color-prettylights-syntax-string-regexp: #72f088;
--color-prettylights-syntax-markup-list: #fbd669;
--color-prettylights-syntax-markup-heading: #409eff;
--color-prettylights-syntax-markup-italic: #f0f3f6;
--color-prettylights-syntax-markup-bold: #f0f3f6;
--color-prettylights-syntax-markup-deleted-text: #ffdedb;
--color-prettylights-syntax-markup-deleted-bg: #cc1421;
--color-prettylights-syntax-markup-inserted-text: #acf7b6;
--color-prettylights-syntax-markup-inserted-bg: #007728;
--color-prettylights-syntax-markup-changed-text: #ffe1b4;
--color-prettylights-syntax-markup-changed-bg: #a74c00;
--color-prettylights-syntax-markup-ignored-text: #f0f3f6;
--color-prettylights-syntax-markup-ignored-bg: #318bf8;
--color-prettylights-syntax-meta-diff-range: #dbb7ff;
--color-prettylights-syntax-brackethighlighter-angle: #bdc4cc;
--color-prettylights-syntax-sublimelinter-gutter-mark: #7a828e;
--color-prettylights-syntax-constant-other-reference-link: #addcff;
--color-fg-default: #f0f3f6;
--color-fg-muted: #f0f3f6;
--color-fg-subtle: #9ea7b3;
--color-canvas-default: #0a0c10;
--color-canvas-subtle: #272b33;
--color-border-default: #7a828e;
--color-border-muted: #7a828e;
--color-neutral-muted: rgba(158,167,179,0.4);
--color-accent-fg: #71b7ff;
--color-accent-emphasis: #409eff;
--color-success-fg: #26cd4d;
--color-success-emphasis: #09b43a;
--color-attention-fg: #f0b72f;
--color-attention-emphasis: #e09b13;
--color-attention-subtle: rgba(224,155,19,0.15);
--color-danger-fg: #ff6a69;
--color-danger-emphasis: #ff6a69;
--color-done-fg: #b780ff;
--color-done-emphasis: #b87fff;
}
}
/*!
Theme: GitHub
Description: Highlight-js port of github.com theme
Author: github.com
Maintainer: @SNDST00M, @mjbvz
Updated: 2021-12-08
*/
.markdown-body pre code.hljs {
display: block;
overflow-x: auto;
padding: 16px;
}
.markdown-body code.hljs {
padding: 3px 5px;
}
/*!
Theme: GitHub
Description: Theme as seen on github.com
Author: github.com
Maintainer: @Hirse
Updated: 2021-05-15
Outdated base version: https://github.com/primer/github-syntax-dark
Current colors taken from GitHub's CSS
*/
.markdown-body .hljs,
.markdown-body pre > code {
color: var(--color-fg-default);
background: var(--color-canvas-subtle);
}
.markdown-body .hljs-function,
.markdown-body .hljs-params {
color: var(--color-fg-default);
}
.markdown-body .hljs-doctag,
.markdown-body .hljs-keyword,
.markdown-body .hljs-meta .hljs-keyword,
.markdown-body .hljs-template-tag,
.markdown-body .hljs-template-variable,
.markdown-body .hljs-type,
.markdown-body .hljs-variable.language_ {
color: var(--color-prettylights-syntax-keyword);
}
.markdown-body .hljs-title,
.markdown-body .hljs-title.class_,
.markdown-body .hljs-title.class_.inherited__,
.markdown-body .hljs-title.function_ {
color: var(--color-prettylights-syntax-entity);
}
.markdown-body .hljs-attr,
.markdown-body .hljs-attribute,
.markdown-body .hljs-literal,
.markdown-body .hljs-meta,
.markdown-body .hljs-number,
.markdown-body .hljs-operator,
.markdown-body .hljs-selector-attr,
.markdown-body .hljs-selector-class,
.markdown-body .hljs-selector-id,
.markdown-body .hljs-variable {
color: var(--color-prettylights-syntax-constant);
}
.markdown-body .hljs-meta .hljs-string,
.markdown-body .hljs-regexp,
.markdown-body .hljs-string {
color: var(--color-prettylights-syntax-string);
}
.markdown-body .hljs-built_in,
.markdown-body .hljs-symbol {
color: var(--color-prettylights-syntax-variable);
}
.markdown-body .hljs-code,
.markdown-body .hljs-comment,
.markdown-body .hljs-formula {
color: var(--color-prettylights-syntax-comment);
}
.markdown-body .hljs-name,
.markdown-body .hljs-quote,
.markdown-body .hljs-selector-pseudo,
.markdown-body .hljs-selector-tag {
color: var(--color-prettylights-syntax-entity-tag);
}
.markdown-body .hljs-subst {
color: var(--color-prettylights-syntax-constant);
}
.markdown-body .hljs-section {
color: var(--color-prettylights-syntax-markup-heading);
font-weight: bold;
}
.markdown-body .hljs-bullet {
color: var(--color-prettylights-syntax-markup-list);
}
.markdown-body .hljs-emphasis {
color: var(--color-prettylights-syntax-constant);
font-style: italic;
}
.markdown-body .hljs-strong {
color: var(--color-prettylights-syntax-constant);
font-weight: bold;
}
.markdown-body .hljs-addition {
color: var(--color-prettylights-syntax-markup-inserted-text);
background-color: var(--color-prettylights-syntax-markup-inserted-bg);
}
.markdown-body .hljs-deletion {
color: var(--color-prettylights-syntax-markup-deleted-text);
background-color: var(--color-prettylights-syntax-markup-deleted-bg);
}
</style>
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/katex/dist/katex.min.css">
<link href="https://cdn.jsdelivr.net/npm/katex-copytex@latest/dist/katex-copytex.min.css" rel="stylesheet" type="text/css">
<link rel="stylesheet" href="https://cdn.jsdelivr.net/gh/Microsoft/vscode/extensions/markdown-language-features/media/markdown.css">
<link rel="stylesheet" href="https://cdn.jsdelivr.net/gh/Microsoft/vscode/extensions/markdown-language-features/media/highlight.css">
<style>
body {
font-family: -apple-system, BlinkMacSystemFont, 'Segoe WPC', 'Segoe UI', system-ui, 'Ubuntu', 'Droid Sans', sans-serif;
font-size: 14px;
line-height: 1.6;
}
</style>
<style>
.task-list-item {
list-style-type: none;
}
.task-list-item-checkbox {
margin-left: -20px;
vertical-align: middle;
pointer-events: none;
}
</style>
<style>
:root {
--color-note: #0969da;
--color-tip: #1a7f37;
--color-warning: #9a6700;
--color-severe: #bc4c00;
--color-caution: #d1242f;
--color-important: #8250df;
}
</style>
<style>
@media (prefers-color-scheme: dark) {
:root {
--color-note: #2f81f7;
--color-tip: #3fb950;
--color-warning: #d29922;
--color-severe: #db6d28;
--color-caution: #f85149;
--color-important: #a371f7;
}
}
</style>
<style>
.markdown-alert {
padding: 0.5rem 1rem;
margin-bottom: 16px;
color: inherit;
border-left: .25em solid #888;
}
.markdown-alert>:first-child {
margin-top: 0
}
.markdown-alert>:last-child {
margin-bottom: 0
}
.markdown-alert .markdown-alert-title {
display: flex;
font-weight: 500;
align-items: center;
line-height: 1
}
.markdown-alert .markdown-alert-title .octicon {
margin-right: 0.5rem;
display: inline-block;
overflow: visible !important;
vertical-align: text-bottom;
fill: currentColor;
}
.markdown-alert.markdown-alert-note {
border-left-color: var(--color-note);
}
.markdown-alert.markdown-alert-note .markdown-alert-title {
color: var(--color-note);
}
.markdown-alert.markdown-alert-important {
border-left-color: var(--color-important);
}
.markdown-alert.markdown-alert-important .markdown-alert-title {
color: var(--color-important);
}
.markdown-alert.markdown-alert-warning {
border-left-color: var(--color-warning);
}
.markdown-alert.markdown-alert-warning .markdown-alert-title {
color: var(--color-warning);
}
.markdown-alert.markdown-alert-tip {
border-left-color: var(--color-tip);
}
.markdown-alert.markdown-alert-tip .markdown-alert-title {
color: var(--color-tip);
}
.markdown-alert.markdown-alert-caution {
border-left-color: var(--color-caution);
}
.markdown-alert.markdown-alert-caution .markdown-alert-title {
color: var(--color-caution);
}
</style>
</head>
<body class="vscode-body vscode-light">
<div
class="github-markdown-body"
data-color-mode="auto"
data-light-theme="light"
data-dark-theme="dark"
>
<div class="github-markdown-content"><h2 id="网站">网站</h2>
<ol>
<li></li>
<li></li>
<li></li>
<li></li>
<li></li>
<li></li>
<li></li>
<li></li>
<li></li>
<li></li>
<li></li>
<li></li>
<li></li>
<li></li>
<li></li>
<li></li>
<li></li>
<li></li>
<li></li>
<li></li>
</ol>
<h2 id="阅读清单">阅读清单</h2>
<ol>
<li>
<p>前端安全篇 <a href="https://zhuanlan.zhihu.com/p/450187731">https://zhuanlan.zhihu.com/p/450187731</a></p>
</li>
<li>
<p>css处理 <a href="https://zhuanlan.zhihu.com/p/443798174">https://zhuanlan.zhihu.com/p/443798174</a></p>
</li>
<li>
<p>五大算法 -- 分治算法 <a href="https://www.cnblogs.com/steven_oyj/archive/2010/05/22/1741370.html">https://www.cnblogs.com/steven_oyj/archive/2010/05/22/1741370.html</a></p>
</li>
<li>
<p>五大算法 -- 贪心算法 <a href="https://blog.csdn.net/qq_37763204/article/details/79289532">https://blog.csdn.net/qq_37763204/article/details/79289532</a></p>
</li>
<li>
<p>五大算法 -- 常用笔记 <a href="https://blog.csdn.net/shijinghan1126/article/details/87951372">https://blog.csdn.net/shijinghan1126/article/details/87951372</a></p>
</li>
<li>
<p>vue移动端路由切换效果 <a href="https://zhuanlan.zhihu.com/p/437774496">https://zhuanlan.zhihu.com/p/437774496</a></p>
</li>
<li>
<p><strong>vue计算属性和侦听器</strong> <a href="https://cn.vuejs.org/v2/guide/computed.html">https://cn.vuejs.org/v2/guide/computed.html</a></p>
</li>
<li>
<p>网页跳转丝滑 <a href="https://zhuanlan.zhihu.com/p/66398148">https://zhuanlan.zhihu.com/p/66398148</a></p>
</li>
<li>
<p>算法学习 <a href="https://www.zhihu.com/question/25693637">https://www.zhihu.com/question/25693637</a></p>
</li>
<li>
<p>时间复杂度/空间复杂度 <a href="https://zhuanlan.zhihu.com/p/50479555">https://zhuanlan.zhihu.com/p/50479555</a></p>
</li>
<li>
<p><strong>前端手写功能</strong> <a href="https://zhuanlan.zhihu.com/p/434776450">https://zhuanlan.zhihu.com/p/434776450</a></p>
</li>
<li>
<p><strong>手写题</strong> <a href="https://zhuanlan.zhihu.com/p/455448100">https://zhuanlan.zhihu.com/p/455448100</a></p>
</li>
<li>
<p>ts学习 <a href="https://juejin.cn/post/7031787942691471396">https://juejin.cn/post/7031787942691471396</a></p>
</li>
<li>
<p>网站整合 <a href="https://www.zhihu.com/question/28478379/answer/2193361955">https://www.zhihu.com/question/28478379/answer/2193361955</a></p>
</li>
<li>
<p>js小技巧 <a href="https://zhuanlan.zhihu.com/p/407376862">https://zhuanlan.zhihu.com/p/407376862</a></p>
</li>
<li>
<p>前端实现pdf下载 <a href="https://juejin.cn/post/7034308378759430180#heading-2">https://juejin.cn/post/7034308378759430180#heading-2</a></p>
</li>
<li>
<p><strong>vue计算属性的使用</strong> <a href="https://zhuanlan.zhihu.com/p/439851349">https://zhuanlan.zhihu.com/p/439851349</a></p>
</li>
<li>
<p>react的相关问题 <a href="https://zhuanlan.zhihu.com/p/304213203">https://zhuanlan.zhihu.com/p/304213203</a></p>
</li>
<li>
<p>uniapp的深浅拷贝 <a href="https://blog.csdn.net/by_side_with_sun/article/details/102748651">https://blog.csdn.net/by_side_with_sun/article/details/102748651</a></p>
</li>
<li>
<p>uniapp内嵌h5 js文件 <a href="https://gitee.com/haodadan/h5-nested-files/blob/master/uni.webview.1.5.2.js">https://gitee.com/haodadan/h5-nested-files/blob/master/uni.webview.1.5.2.js</a></p>
</li>
<li>
<p><strong>小程序包括uniapp针对安全区域env(safe-area-inset-*)兼容</strong> <a href="https://ask.dcloud.net.cn/article/36494">https://ask.dcloud.net.cn/article/36494</a></p>
</li>
<li>
<p>vue常见bug <a href="https://zhuanlan.zhihu.com/p/458630425">https://zhuanlan.zhihu.com/p/458630425</a></p>
</li>
<li>
<p><strong>网络流程</strong> <a href="https://mp.weixin.qq.com/s/jiPMUk6zUdOY6eKxAjNDbQ">https://mp.weixin.qq.com/s/jiPMUk6zUdOY6eKxAjNDbQ</a></p>
</li>
<li>
<p>格式化时间 <a href="https://www.cnblogs.com/isdom/p/webclips017.html">https://www.cnblogs.com/isdom/p/webclips017.html</a></p>
</li>
<li>
<p><strong>js库</strong> <a href="https://www.zhihu.com/question/429436558/answer/2313656813">https://www.zhihu.com/question/429436558/answer/2313656813</a></p>
</li>
<li>
<p>前端打包工具 <a href="https://www.zhihu.com/question/58081014/answer/2305299053">https://www.zhihu.com/question/58081014/answer/2305299053</a></p>
</li>
<li>
<p><strong>移动端的适配</strong> <a href="https://www.zhihu.com/question/507570055/answer/2280695438">https://www.zhihu.com/question/507570055/answer/2280695438</a></p>
</li>
<li>
<p><strong>js的setTimeout实现机理</strong> <a href="https://www.zhihu.com/question/463446982/answer/1927686503">https://www.zhihu.com/question/463446982/answer/1927686503</a></p>
</li>
<li>
<p><strong>Vue和React的优点和区别</strong> <a href="https://www.zhihu.com/question/301860721/answer/724759264">https://www.zhihu.com/question/301860721/answer/724759264</a></p>
</li>
<li>
<p>前端性能优化,如何提高首屏加载速度 <a href="https://juejin.cn/post/7064477926720274468">https://juejin.cn/post/7064477926720274468</a></p>
</li>
<li>
<p>纯js请求接口post方法 <a href="https://www.cnblogs.com/CinderellaStory/p/11091055.html">https://www.cnblogs.com/CinderellaStory/p/11091055.html</a></p>
</li>
<li>
<p>移动端开发viewport <a href="https://www.cnblogs.com/2050/p/3877280.html">https://www.cnblogs.com/2050/p/3877280.html</a></p>
</li>
<li>
<p><strong>8个常用的vue自定义指令</strong> <a href="https://juejin.cn/post/7067051410671534116">https://juejin.cn/post/7067051410671534116</a></p>
</li>
<li>
<p>nodejs中的npm全局安装和局部安装 配置环境变量 <a href="https://blog.csdn.net/jiang7701037/article/details/80706920">https://blog.csdn.net/jiang7701037/article/details/80706920</a></p>
</li>
<li>
<p>如何用 Proxy 处理异常 <a href="https://juejin.cn/post/7070120806214271012">https://juejin.cn/post/7070120806214271012</a></p>
</li>
<li>
<p>vue优化方案 首屏加载慢 <a href="https://juejin.cn/post/7067033205798354981">https://juejin.cn/post/7067033205798354981</a></p>
</li>
<li>
<p>Pinia相比Vuex、哪个更好用? <a href="https://www.zhihu.com/question/521159639/answer/2406621200">https://www.zhihu.com/question/521159639/answer/2406621200</a></p>
</li>
<li>
<p>是js的加载阻塞了页面的渲染还是js的执行阻塞了页面的渲染? <a href="https://www.zhihu.com/question/61309490/answer/2391044776">https://www.zhihu.com/question/61309490/answer/2391044776</a></p>
</li>
<li>
<p><strong>八股文</strong> <a href="https://juejin.cn/post/7016593221815910408">https://juejin.cn/post/7016593221815910408</a></p>
</li>
<li>
<p><strong>vue3的双向数据绑定原理</strong> <a href="https://juejin.cn/post/7059728632289165325">https://juejin.cn/post/7059728632289165325</a></p>
</li>
<li>
<p><strong>修改组件库源码来封装符合自己需求的组件</strong> <a href="https://zhuanlan.zhihu.com/p/439925699">https://zhuanlan.zhihu.com/p/439925699</a></p>
</li>
<li>
<p>正则表达式 <a href="https://zhuanlan.zhihu.com/p/462603239">https://zhuanlan.zhihu.com/p/462603239</a></p>
</li>
<li>
<p><strong>vuex</strong> <a href="https://juejin.cn/post/7072737800105394213">https://juejin.cn/post/7072737800105394213</a></p>
</li>
<li>
<p>原型链和继承方法 <a href="https://blog.csdn.net/qq_60619943/article/details/122517540">https://blog.csdn.net/qq_60619943/article/details/122517540</a></p>
</li>
<li>
<p>为什么JS/TS里都会有&quot;use strict&quot; (严格模式) <a href="https://zhuanlan.zhihu.com/p/496391644">https://zhuanlan.zhihu.com/p/496391644</a></p>
</li>
<li>
<p>八大经典排序算法讲解 <a href="https://zhuanlan.zhihu.com/p/335048580">https://zhuanlan.zhihu.com/p/335048580</a></p>
</li>
<li>
<p>js算法讲解 <a href="https://juejin.cn/post/6844903444365443080">https://juejin.cn/post/6844903444365443080</a></p>
</li>
<li>
<p>vue和react的区别 <a href="https://juejin.cn/post/7012797091135094814">https://juejin.cn/post/7012797091135094814</a></p>
</li>
<li>
<p>js思维导图 <a href="https://zhuanlan.zhihu.com/p/60003120">https://zhuanlan.zhihu.com/p/60003120</a></p>
</li>
<li>
<p>async/await原理 <a href="https://juejin.cn/post/7007031572238958629">https://juejin.cn/post/7007031572238958629</a></p>
</li>
<li>
<p>Ajax和axios的使用和方法 <a href="https://www.jianshu.com/p/d16100e71b01">https://www.jianshu.com/p/d16100e71b01</a></p>
</li>
<li>
<p>项目开发步骤 <a href="https://juejin.cn/post/7080032725477883917">https://juejin.cn/post/7080032725477883917</a></p>
</li>
<li>
<p>代码规范 <a href="https://blog.csdn.net/qq_37954086/article/details/105364652">https://blog.csdn.net/qq_37954086/article/details/105364652</a></p>
</li>
<li>
<p>可视化js循环 <a href="https://zhuanlan.zhihu.com/p/464511608">https://zhuanlan.zhihu.com/p/464511608</a></p>
</li>
<li>
<p>promise内部实现 <a href="https://www.zhihu.com/question/518340676/answer/2364550343">https://www.zhihu.com/question/518340676/answer/2364550343</a></p>
</li>
<li>
<p>react脑图 <a href="https://juejin.cn/post/7085145274200358949">https://juejin.cn/post/7085145274200358949</a></p>
</li>
<li>
<p><strong>ts教程</strong> <a href="https://juejin.cn/post/7092415149809598500">https://juejin.cn/post/7092415149809598500</a></p>
</li>
<li>
<p>vue框架的面试题 <a href="https://www.zhihu.com/question/277800597/answer/2483684491">https://www.zhihu.com/question/277800597/answer/2483684491</a></p>
</li>
<li>
<p>promise队列和setTimeout队列有何关联 <a href="https://www.zhihu.com/question/36972010/answer/2384754582">https://www.zhihu.com/question/36972010/answer/2384754582</a></p>
</li>
<li>
<p>前端路由是什么 <a href="https://www.zhihu.com/question/53064386/answer/2299930962">https://www.zhihu.com/question/53064386/answer/2299930962</a></p>
</li>
<li>
<p>为什么let和const不存在变量提升 <a href="https://www.zhihu.com/question/535442142/answer/2510328090">https://www.zhihu.com/question/535442142/answer/2510328090</a></p>
</li>
<li>
<p>vue3拒绝写return,用setup语法糖 <a href="https://juejin.cn/post/7078865301856583717">https://juejin.cn/post/7078865301856583717</a></p>
</li>
<li>
<p>防抖和节流 <a href="https://juejin.cn/post/6844903651278848014">https://juejin.cn/post/6844903651278848014</a></p>
</li>
<li>
<p>图形拖拽解析 <a href="https://forum.juejin.cn/youthcamp/post/7034040937927933988?from=3">https://forum.juejin.cn/youthcamp/post/7034040937927933988?from=3</a></p>
</li>
<li>
<p>关于flex布局中flex-shrink的计算问题: <a href="https://www.zhihu.com/question/550047167/answer/2646350023">https://www.zhihu.com/question/550047167/answer/2646350023</a></p>
</li>
<li>
<p>uniapp的消息推送</p>
<ol>
<li><a href="https://blog.csdn.net/m0_67401660/article/details/123432037">https://blog.csdn.net/m0_67401660/article/details/123432037</a></li>
<li><a href="https://blog.csdn.net/longmenyizu/article/details/123004160?spm=1001.2101.3001.6661.1&amp;utm_medium=distribute.pc_relevant_t0.none-task-blog-2%7Edefault%7ECTRLIST%7ERate-1-123004160-blog-123432037.t0_searchtargeting_v1&amp;depth_1-utm_source=distribute.pc_relevant_t0.none-task-blog-2%7Edefault%7ECTRLIST%7ERate-1-123004160-blog-123432037.t0_searchtargeting_v1&amp;utm_relevant_index=1">https://blog.csdn.net/longmenyizu/article/details/123004160?spm=1001.2101.3001.6661.1&amp;utm_medium=distribute.pc_relevant_t0.none-task-blog-2~default~CTRLIST~Rate-1-123004160-blog-123432037.t0_searchtargeting_v1&amp;depth_1-utm_source=distribute.pc_relevant_t0.none-task-blog-2~default~CTRLIST~Rate-1-123004160-blog-123432037.t0_searchtargeting_v1&amp;utm_relevant_index=1</a></li>
</ol>
</li>
<li>
<p>uniapp选中地图</p>
<ol>
<li>uniapp h5 小程序高德定位 <a href="https://juejin.cn/post/6844904195183624205">https://juejin.cn/post/6844904195183624205</a></li>
<li>选择地图并返回经纬度 <a href="https://blog.csdn.net/asdfadafd/article/details/123442250">https://blog.csdn.net/asdfadafd/article/details/123442250</a></li>
</ol>
</li>
<li>
<p>uniapp公众号登录</p>
<ol>
<li>获取code <a href="https://blog.csdn.net/qq_43024468/article/details/111217792">https://blog.csdn.net/qq_43024468/article/details/111217792</a></li>
<li>公众号登录流程 <a href="https://www.jianshu.com/p/203c9af4c3bf?u_atoken=980848ba-9b8c-441e-9a47-767555d6b013&amp;u_asession=01MGFZYgDq99tdlhTtpVNiKvYUnRir2LkkSy5bUPmvVAoxWSjrjXcaGl96lMb62P2jX0KNBwm7Lovlpxjd_P_q4JsKWYrT3W_NKPr8w6oU7K9QD1TJQfBgqLVMqN7uix0ACvvWHyhA8I9G3hxoTho1LGBkFo3NEHBv0PZUm6pbxQU&amp;u_asig=05g5fiDRmk0XVWHlOyz_DbmKgMwA4GMMSjXFODPIXgeOZXq6L218bo_-yZezNz0CPxatOr6A4MbIAu7ejyGwPky1b-uOGzB6n5-TiXGfIWmzdHYLI7WRhQISHWqsSl5Th6mCXhUXyuR_yh3Oif9j9tU-gHzqsGV4EIin4VyWvwgyv9JS7q8ZD7Xtz2Ly-b0kmuyAKRFSVJkkdwVUnyHAIJzfPrDBMYiphLnW2qSiAONhbjs8DO2zHNlKpsJPoZROnOChTz2MQxpCmDDGYlh3aZze3h9VXwMyh6PgyDIVSG1W9rQk41CE8OvLav2RN9_h21MCiaxWNGs0SKRybKdVaVoRn9QDFNCiMFvvOavIsZIqjbNkVur5VemgSjErfubDCFmWspDxyAEEo4kbsryBKb9Q&amp;u_aref=cqogLnvnRyEQQXu5JH5JtcP1dRA%3D">https://www.jianshu.com/p/203c9af4c3bf?u_atoken=980848ba-9b8c-441e-9a47-767555d6b013&amp;u_asession=01MGFZYgDq99tdlhTtpVNiKvYUnRir2LkkSy5bUPmvVAoxWSjrjXcaGl96lMb62P2jX0KNBwm7Lovlpxjd_P_q4JsKWYrT3W_NKPr8w6oU7K9QD1TJQfBgqLVMqN7uix0ACvvWHyhA8I9G3hxoTho1LGBkFo3NEHBv0PZUm6pbxQU&amp;u_asig=05g5fiDRmk0XVWHlOyz_DbmKgMwA4GMMSjXFODPIXgeOZXq6L218bo_-yZezNz0CPxatOr6A4MbIAu7ejyGwPky1b-uOGzB6n5-TiXGfIWmzdHYLI7WRhQISHWqsSl5Th6mCXhUXyuR_yh3Oif9j9tU-gHzqsGV4EIin4VyWvwgyv9JS7q8ZD7Xtz2Ly-b0kmuyAKRFSVJkkdwVUnyHAIJzfPrDBMYiphLnW2qSiAONhbjs8DO2zHNlKpsJPoZROnOChTz2MQxpCmDDGYlh3aZze3h9VXwMyh6PgyDIVSG1W9rQk41CE8OvLav2RN9_h21MCiaxWNGs0SKRybKdVaVoRn9QDFNCiMFvvOavIsZIqjbNkVur5VemgSjErfubDCFmWspDxyAEEo4kbsryBKb9Q&amp;u_aref=cqogLnvnRyEQQXu5JH5JtcP1dRA%3D</a></li>
<li>app实现微信登录流程 <a href="https://blog.csdn.net/weixin_39706415/article/details/111588710">https://blog.csdn.net/weixin_39706415/article/details/111588710</a></li>
<li>公众号微信登录 <a href="https://www.jb51.net/article/251286.htm">https://www.jb51.net/article/251286.htm</a></li>
</ol>
</li>
<li>
<p>图片过大加载慢的问题 <a href="https://www.zhihu.com/question/23655692/answer/2616349903">https://www.zhihu.com/question/23655692/answer/2616349903</a></p>
</li>
<li>
<p>淘宝搜索的逻辑 <a href="https://www.zhihu.com/question/432852375/answer/2420015318">https://www.zhihu.com/question/432852375/answer/2420015318</a></p>
</li>
<li>
<p>前端的异常监控 <a href="https://www.zhihu.com/question/29953354/answer/2616282551">https://www.zhihu.com/question/29953354/answer/2616282551</a></p>
</li>
<li>
<p>常见的十大排序算法 <a href="https://www.zhihu.com/question/485302654/answer/2782343402">https://www.zhihu.com/question/485302654/answer/2782343402</a></p>
</li>
<li>
<p>前端实现活体人脸检测 <a href="https://juejin.cn/post/7145732134630588447">https://juejin.cn/post/7145732134630588447</a></p>
</li>
<li>
<p>前端图形组件 - (滑动验证码的实现) <a href="https://www.zhihu.com/question/456508193/answer/2788663145">https://www.zhihu.com/question/456508193/answer/2788663145</a></p>
</li>
<li>
<p>如何封装组件(JavaScript)<a href="https://www.zhihu.com/question/26832065/answer/2787263274">https://www.zhihu.com/question/26832065/answer/2787263274</a></p>
</li>
<li>
<p>使用echart绘制街道、镇级地图 <a href="https://juejin.cn/post/7186944817639718973">https://juejin.cn/post/7186944817639718973</a></p>
</li>
<li>
<p>tressjs打造漫天飞舞孔明灯 <a href="https://juejin.cn/post/7194649121704116280">https://juejin.cn/post/7194649121704116280</a></p>
</li>
<li>
<p>TS学习 <a href="https://juejin.cn/post/7211358106629750841">https://juejin.cn/post/7211358106629750841</a></p>
</li>
<li>
<p>js实现对视频按帧缓存 <a href="https://juejin.cn/post/7176928557481295929">https://juejin.cn/post/7176928557481295929</a></p>
</li>
<li>
<p>在高德地图上实现城市扫光效果 <a href="https://juejin.cn/post/7227013497040306235">https://juejin.cn/post/7227013497040306235</a></p>
</li>
<li>
<p>vue阻止重复请求 vue阻止重复请求 <a href="https://juejin.cn/post/7189231050806001719">https://juejin.cn/post/7189231050806001719</a></p>
</li>
<li>
<p>使用console.log打印视频 <a href="https://juejin.cn/post/7238195267286138939">https://juejin.cn/post/7238195267286138939</a></p>
</li>
<li>
<p>简单的数字滚动效果的实现 <a href="https://juejin.cn/post/7226971906653929527">https://juejin.cn/post/7226971906653929527</a></p>
</li>
<li>
<p>50多个快捷网站、工具、书籍 <a href="https://juejin.cn/post/7079447275755274254#heading-42">https://juejin.cn/post/7079447275755274254#heading-42</a></p>
</li>
</ol>
<h2 id="案例demo">案例demo</h2>
<ol>
<li>手绘风格白板库 <a href="https://juejin.cn/post/7004625492955365389">https://juejin.cn/post/7004625492955365389</a></li>
<li>前端飞线图 <a href="https://juejin.cn/post/7026206904531550244">https://juejin.cn/post/7026206904531550244</a></li>
<li>基于百度地图汇出物流起始路线图 <a href="https://blog.csdn.net/qq_44538331/article/details/91356304">https://blog.csdn.net/qq_44538331/article/details/91356304</a></li>
<li>PC端网站实现扫码登录功能 (一) <a href="https://blog.csdn.net/qq_35771266/article/details/119794098">https://blog.csdn.net/qq_35771266/article/details/119794098</a></li>
<li>PC端网站实现扫码登录功能 (二) <a href="https://blog.csdn.net/qq_35771266/article/details/119794542">https://blog.csdn.net/qq_35771266/article/details/119794542</a></li>
<li>前端实现在线预览文档 <a href="https://blog.csdn.net/songxueing/article/details/90755358?ops_request_misc=%257B%2522request%255Fid%2522%253A%2522161537054016780357269024%2522%252C%2522scm%2522%253A%252220140713.130102334..%2522%257D&amp;request_id=161537054016780357269024&amp;biz_id=0&amp;utm_medium=distribute.pc_search_result.none-task-blog-2~all~baidu_landing_v2~default-1-90755358.first_rank_v2_pc_rank_v29&amp;utm_term=js%E6%96%87%E6%A1%A3%E9%A2%84%E8%A7%88">https://blog.csdn.net/songxueing/article/details/90755358?ops_request_misc=%257B%2522request%255Fid%2522%253A%2522161537054016780357269024%2522%252C%2522scm%2522%253A%252220140713.130102334..%2522%257D&amp;request_id=161537054016780357269024&amp;biz_id=0&amp;utm_medium=distribute.pc_search_result.none-task-blog-2~all~baidu_landing_v2~default-1-90755358.first_rank_v2_pc_rank_v29&amp;utm_term=js文档预览</a></li>
<li>小程序读取excel表格数据,并存储到云数据库 <a href="https://blog.csdn.net/qiushi_1990/article/details/103032681">https://blog.csdn.net/qiushi_1990/article/details/103032681</a></li>
<li><strong>VUE项目国际化</strong> i18n <a href="https://zhuanlan.zhihu.com/p/451228507">https://zhuanlan.zhihu.com/p/451228507</a></li>
<li>滚动条更改样式 <a href="https://zhuanlan.zhihu.com/p/451280260">https://zhuanlan.zhihu.com/p/451280260</a></li>
<li>小程序内实现环形进度条 <a href="https://developers.weixin.qq.com/community/develop/article/doc/000e4e66d4c210ae234a10a855ac13">https://developers.weixin.qq.com/community/develop/article/doc/000e4e66d4c210ae234a10a855ac13</a></li>
<li>前端大文件上传怎么处理 <a href="https://juejin.cn/post/7053658552472174605">https://juejin.cn/post/7053658552472174605</a></li>
<li>超炫粒子光 <a href="https://juejin.cn/post/7063282795174428679">https://juejin.cn/post/7063282795174428679</a></li>
<li>vue的v-if多个判断条件 <a href="https://www.jianshu.com/p/f932af4272aa">https://www.jianshu.com/p/f932af4272aa</a></li>
<li>小程序弧线效果实现 <a href="https://zhuanlan.zhihu.com/p/35725526">https://zhuanlan.zhihu.com/p/35725526</a></li>
<li>vue图片懒加载插件 <a href="https://juejin.cn/post/7071640823833559048">https://juejin.cn/post/7071640823833559048</a></li>
<li>微信小程序tab栏切换,可滑动切换,导航栏跟随滚动 <a href="https://www.cnblogs.com/till-the-end/p/8935152.html">https://www.cnblogs.com/till-the-end/p/8935152.html</a></li>
<li>jQuery上划加载下拉刷新 <a href="https://blog.csdn.net/qq_42690547/article/details/90240960">https://blog.csdn.net/qq_42690547/article/details/90240960</a></li>
<li>使用canvas画一个边框渐变的圆角方形 <a href="https://jsbin.com/haxeqamilo/edit?js,output">https://jsbin.com/haxeqamilo/edit?js,output</a></li>
<li>react hooks + Redux 入门级项目实战 <a href="https://juejin.cn/post/7063088278576037901">https://juejin.cn/post/7063088278576037901</a></li>
<li>《视搭》视频可视化搭建项目 <a href="https://juejin.cn/post/7057842459182628895">https://juejin.cn/post/7057842459182628895</a>
<ol>
<li>GitHub项目地址 <a href="https://github.com/tnfe/shida">https://github.com/tnfe/shida</a></li>
<li>团队项目地址 <a href="https://github.com/tnfe">https://github.com/tnfe</a></li>
</ol>
</li>
<li>微信小程序之圆形进度条 <a href="https://www.cnblogs.com/fps2tao/p/11102444.html">https://www.cnblogs.com/fps2tao/p/11102444.html</a>
<ol>
<li>GitHub地址 <a href="https://github.com/lucaszhu2zgf/mp-progress">https://github.com/lucaszhu2zgf/mp-progress</a></li>
</ol>
</li>
<li>echarts案例总结 <a href="https://juejin.cn/post/7078834647005822983">https://juejin.cn/post/7078834647005822983</a></li>
<li>前端js实现弹幕功能 <a href="https://www.zhihu.com/question/370464345/answer/1021530502">https://www.zhihu.com/question/370464345/answer/1021530502</a></li>
<li>vue3+pixijs复刻游戏 -- 猎鸭季节 <a href="https://juejin.cn/post/7079944397575421965">https://juejin.cn/post/7079944397575421965</a></li>
<li>vue项目权限管理 <a href="https://juejin.cn/post/7073119858107351048">https://juejin.cn/post/7073119858107351048</a></li>
<li>vue日志管理功能 <a href="https://juejin.cn/post/7077818958807564318">https://juejin.cn/post/7077818958807564318</a></li>
<li>腾讯地图API:车辆轨迹回放 <a href="https://juejin.cn/post/7078504240326377508">https://juejin.cn/post/7078504240326377508</a></li>
<li>页面css效果 <a href="https://www.zhihu.com/question/39907342/answer/2490806892">https://www.zhihu.com/question/39907342/answer/2490806892</a></li>
<li>10个css小技巧 <a href="https://juejin.cn/post/7089997204252786702">https://juejin.cn/post/7089997204252786702</a></li>
<li><strong>虚拟列表</strong> <a href="https://juejin.cn/post/7085941958228574215">https://juejin.cn/post/7085941958228574215</a></li>
<li>千万条弹幕数据的循环怎么优化 <a href="https://juejin.cn/post/7087804464912039944">https://juejin.cn/post/7087804464912039944</a></li>
<li>vue实现图形化积木式编程(三) <a href="https://www.jianshu.com/p/b646876c73e1">https://www.jianshu.com/p/b646876c73e1</a></li>
<li>vue3实现左键拖拽画矩形框框选功能 <a href="https://blog.csdn.net/qq_37656005/article/details/123656240">https://blog.csdn.net/qq_37656005/article/details/123656240</a></li>
<li>vue实现ps效果,鼠标拖拽指令、十字辅助线等 <a href="https://blog.csdn.net/m0_47135993/article/details/121767789">https://blog.csdn.net/m0_47135993/article/details/121767789</a></li>
<li>vue实现图片标注功能 <a href="https://blog.csdn.net/Cinderellahh92/article/details/121202549">https://blog.csdn.net/Cinderellahh92/article/details/121202549</a></li>
<li>vue实现图片标注功能 + 放大缩小 <a href="https://blog.csdn.net/w791275692/article/details/109530768?spm=1001.2101.3001.6650.1&amp;utm_medium=distribute.pc_relevant.none-task-blog-2%7Edefault%7ECTRLIST%7ERate-1-109530768-blog-121202549.pc_relevant_antiscanv2&amp;depth_1-utm_source=distribute.pc_relevant.none-task-blog-2%7Edefault%7ECTRLIST%7ERate-1-109530768-blog-121202549.pc_relevant_antiscanv2&amp;utm_relevant_index=2">https://blog.csdn.net/w791275692/article/details/109530768?spm=1001.2101.3001.6650.1&amp;utm_medium=distribute.pc_relevant.none-task-blog-2~default~CTRLIST~Rate-1-109530768-blog-121202549.pc_relevant_antiscanv2&amp;depth_1-utm_source=distribute.pc_relevant.none-task-blog-2~default~CTRLIST~Rate-1-109530768-blog-121202549.pc_relevant_antiscanv2&amp;utm_relevant_index=2</a></li>
<li>阻止右键默认事件 <a href="https://blog.csdn.net/qq_54357054/article/details/125004227">https://blog.csdn.net/qq_54357054/article/details/125004227</a></li>
<li>vue实现左右菜单联动实现 <a href="https://juejin.cn/post/6844903655108280328">https://juejin.cn/post/6844903655108280328</a>
<ol>
<li>vue仿bilibili左右联动导航 <a href="https://juejin.cn/post/6921589186537455630">https://juejin.cn/post/6921589186537455630</a></li>
<li>仿某幸咖啡小程序的左右菜单栏 <a href="https://juejin.cn/post/6865315626517594119">https://juejin.cn/post/6865315626517594119</a></li>
<li>uview版本 <a href="https://juejin.cn/post/6844903808896598030">https://juejin.cn/post/6844903808896598030</a></li>
</ol>
</li>
<li>水波纹效果及解析 <a href="https://www.jianshu.com/p/de127bdbed04">https://www.jianshu.com/p/de127bdbed04</a></li>
<li>实现带圆角的渐变边框 <a href="https://developer.aliyun.com/article/936693">https://developer.aliyun.com/article/936693</a></li>
<li>前端大文件上传如何做到刷新续传 <a href="https://www.zhihu.com/question/383701827/answer/2598221504">https://www.zhihu.com/question/383701827/answer/2598221504</a></li>
<li>前端实现人脸图片选择 <a href="https://juejin.cn/post/7160950934812983303">https://juejin.cn/post/7160950934812983303</a></li>
<li>AirPods Pro官网耳机动效 <a href="https://juejin.cn/post/7143902768535699492">https://juejin.cn/post/7143902768535699492</a></li>
</ol>
<h2 id="视频案例">视频案例</h2>
<p>​</p>
<ol>
<li>奇巧曲线弧度的魔法导航菜单栏 <a href="https://www.zhihu.com/zvideo/1450759789067923456">https://www.zhihu.com/zvideo/1450759789067923456</a></li>
<li>极具创意的div边框形状 <a href="https://www.zhihu.com/zvideo/1452643991326552064">https://www.zhihu.com/zvideo/1452643991326552064</a></li>
<li>vue后台管理权限:路由拦截 <a href="https://www.zhihu.com/zvideo/1490310161454002176">https://www.zhihu.com/zvideo/1490310161454002176</a></li>
</ol>
<h2 id="扩展">扩展</h2>
<ol>
<li>
<p>电商最小存货单位SKU <a href="https://juejin.cn/post/7078500226905931806">https://juejin.cn/post/7078500226905931806</a></p>
</li>
<li>
<blockquote>
<p>耦合:耦合就是两个东西通过某种作用连接在了一起。对应到不同学科就是,比如,化学上的键,物理上的场,编程上的数据</p>
</blockquote>
</li>
<li>
<blockquote>
<p>BFC布局:BFC就是页面上的一个隔离的独立容器,容器里面的子元素不会影响到外面的元素。反之也如此。 <a href="https://zhuanlan.zhihu.com/p/25321647">https://zhuanlan.zhihu.com/p/25321647</a> <a href="https://zhuanlan.zhihu.com/p/25321647">https://zhuanlan.zhihu.com/p/25321647</a></p>
</blockquote>
</li>
<li>
<p>JPEG图片压缩算法 <a href="https://juejin.cn/post/7081107327960481806">https://juejin.cn/post/7081107327960481806</a></p>
</li>
<li>
<p>LeetCode刷题 <a href="https://www.zhihu.com/question/271330075/answer/2429626883">https://www.zhihu.com/question/271330075/answer/2429626883</a></p>
</li>
<li>
<p>js库 <a href="https://www.zhihu.com/question/429436558/answer/1594467061">https://www.zhihu.com/question/429436558/answer/1594467061</a></p>
</li>
<li>
<p>vue3 <a href="https://juejin.cn/post/7057325585705467918">https://juejin.cn/post/7057325585705467918</a></p>
<ol>
<li>官方文档 <a href="https://v3.cn.vuejs.org/guide/migration/introduction.html#%E6%A6%82%E8%A7%88">https://v3.cn.vuejs.org/guide/migration/introduction.html#概览</a></li>
<li>学习视频 <a href="https://juejin.cn/book/7051153166443741188?scrollMenuIndex=1">https://juejin.cn/book/7051153166443741188?scrollMenuIndex=1</a></li>
</ol>
</li>
<li>
<p>技术周报 <a href="https://zhuanlan.zhihu.com/p/491784376">https://zhuanlan.zhihu.com/p/491784376</a></p>
</li>
<li>
<p>网络层概念总结 <a href="https://zhuanlan.zhihu.com/p/489428345">https://zhuanlan.zhihu.com/p/489428345</a></p>
</li>
<li>
<p>八股文 <a href="https://www.zhihu.com/question/440812545/answer/2379426038">https://www.zhihu.com/question/440812545/answer/2379426038</a></p>
</li>
<li>
<p>GitHub访问慢,没有梯子的解决 <a href="https://juejin.cn/post/7090190514028937230">https://juejin.cn/post/7090190514028937230</a></p>
</li>
<li>
<p>前端学习阅读文章集合 <a href="https://juejin.cn/post/6844903896637259784#heading-8">https://juejin.cn/post/6844903896637259784#heading-8</a></p>
</li>
<li>
<p>vue的57个技术分享 <a href="https://juejin.cn/post/7087747188817657892">https://juejin.cn/post/7087747188817657892</a></p>
</li>
<li>
<p>uniapp打包IPA文件,上架iOS Store流程指南 <a href="https://blog.csdn.net/qq_37656005/article/details/123656240">https://blog.csdn.net/qq_37656005/article/details/123656240</a> <a href="https://zhuanlan.zhihu.com/p/66575901">https://zhuanlan.zhihu.com/p/66575901</a></p>
</li>
<li>
<p>前端webpack <a href="https://www.zhihu.com/question/472006458/answer/2426201032">https://www.zhihu.com/question/472006458/answer/2426201032</a></p>
</li>
<li>
<p>GitHub上的游戏源码 <a href="https://www.zhihu.com/question/276168633/answer/2281198693">https://www.zhihu.com/question/276168633/answer/2281198693</a></p>
</li>
<li>
<p>提高js编辑能力 <a href="https://www.zhihu.com/question/29933334/answer/2522388351">https://www.zhihu.com/question/29933334/answer/2522388351</a></p>
</li>
<li>
<p>短小精悍的js <a href="https://www.zhihu.com/question/46943112/answer/2520536211">https://www.zhihu.com/question/46943112/answer/2520536211</a></p>
</li>
<li>
<p>http:// 中的双斜杠有什么用 <a href="https://www.zhihu.com/question/535687086/answer/2517168133">https://www.zhihu.com/question/535687086/answer/2517168133</a></p>
</li>
<li>
<p>前端开发,浏览器渲染原理 与 框架源码,哪个更加重要一些 <a href="https://www.zhihu.com/question/483473179/answer/2461929964">https://www.zhihu.com/question/483473179/answer/2461929964</a></p>
</li>
<li>
<p>浏览器同源政策及其规避方法 <a href="http://www.ruanyifeng.com/blog/2016/04/same-origin-policy.html">http://www.ruanyifeng.com/blog/2016/04/same-origin-policy.html</a></p>
</li>
<li>
<p>GitHub文档</p>
<ol>
<li>后台管理系统 - <a href="https://github.com/xxn123456/wangque-admin">https://github.com/xxn123456/wangque-admin</a></li>
<li>后台+前端的交友app <a href="https://github.com/378526425/21ke">https://github.com/378526425/21ke</a></li>
<li>开源项目集合 <a href="https://www.zhihu.com/question/263903216/answer/2601858744">https://www.zhihu.com/question/263903216/answer/2601858744</a></li>
</ol>
</li>
<li>
<p><strong>开源vue关系图谱组件:relation-graph</strong></p>
<ol>
<li>案例demo:<a href="http://relation-graph.com/#/demo/simple">http://relation-graph.com/#/demo/simple</a></li>
<li>api配置:<a href="http://relation-graph.com/#/docs/start">http://relation-graph.com/#/docs/start</a></li>
<li>项目地址:<a href="https://github.com/seeksdream/relation-graph">https://github.com/seeksdream/relation-graph</a></li>
</ol>
</li>
</ol>
<h2 id="题目">题目</h2>
<ol>
<li>01 <a href="https://zhuanlan.zhihu.com/p/486687101">https://zhuanlan.zhihu.com/p/486687101</a></li>
<li>手写bind函数 <a href="https://juejin.cn/post/7063385389234421791">https://juejin.cn/post/7063385389234421791</a></li>
<li>vue框架的面试题 <a href="https://www.zhihu.com/question/277800597/answer/2483684491">https://www.zhihu.com/question/277800597/answer/2483684491</a></li>
<li>webpack的题目 <a href="https://www.zhihu.com/question/266788138/answer/2615289231">https://www.zhihu.com/question/266788138/answer/2615289231</a></li>
</ol>
<h2 id="问题解决方法">问题解决方法</h2>
<ol>
<li>原生js post请求回调两次问题 <a href="https://blog.csdn.net/weixin_37254196/article/details/121974304">https://blog.csdn.net/weixin_37254196/article/details/121974304</a></li>
<li>小程序扫码成功后带着参数跳转到指定页面 <a href="https://cloud.tencent.com/developer/article/1378305">https://cloud.tencent.com/developer/article/1378305</a></li>
<li>vue实现添加标签组件 <a href="https://blog.csdn.net/weixin_42565137/article/details/101286700">https://blog.csdn.net/weixin_42565137/article/details/101286700</a>
<ol>
<li>解决问题: input需要根据内容自适应宽度</li>
</ol>
</li>
<li>题目 <a href="https://juejin.cn/post/7036581158670303240">https://juejin.cn/post/7036581158670303240</a></li>
<li>题目2: <a href="https://juejin.cn/post/6987549240436195364">https://juejin.cn/post/6987549240436195364</a></li>
<li>iview中的form+select选择后校验失效:
<ol>
<li>解决:select的model必须是字符串,不能是数字,需要使用toString()转格式</li>
</ol>
</li>
<li>前端解决video视频标签在Android系统中的层级问题 <a href="https://blog.csdn.net/qappleh/article/details/102715408">https://blog.csdn.net/qappleh/article/details/102715408</a></li>
<li>面试题
<ol>
<li>面试 <a href="https://www.zhihu.com/question/447569549/answer/2477918073">https://www.zhihu.com/question/447569549/answer/2477918073</a></li>
<li>简历 <a href="https://www.zhihu.com/question/21520021/answer/1298873088">https://www.zhihu.com/question/21520021/answer/1298873088</a></li>
<li>面试 <a href="https://www.zhihu.com/question/282090823/answer/2414762492">https://www.zhihu.com/question/282090823/answer/2414762492</a></li>
</ol>
</li>
<li>不同源页面跳转并传递参数
<ol>
<li>浏览器同源政策及其规避方法 <a href="http://www.ruanyifeng.com/blog/2016/04/same-origin-policy.html">http://www.ruanyifeng.com/blog/2016/04/same-origin-policy.html</a></li>
<li>用windows.open() 打开新页面并传值 <a href="https://blog.csdn.net/qq_40830369/article/details/120656040">https://blog.csdn.net/qq_40830369/article/details/120656040</a></li>
<li>打开新页面并传值 <a href="https://segmentfault.com/a/1190000040099541">https://segmentfault.com/a/1190000040099541</a></li>
</ol>
</li>
<li>uniapp使用腾讯地图 h5端跨域解决方法 jsonp <a href="https://blog.csdn.net/qq_44622894/article/details/118944193">https://blog.csdn.net/qq_44622894/article/details/118944193</a></li>
</ol>
<h2 id="小tips">小tips</h2>
<ol>
<li>
<h5 id="小程序端的热更新">小程序端的热更新</h5>
<pre><code class="language-js"><span class="hljs-comment">// 热更新</span>
<span class="hljs-keyword">if</span> (uni.<span class="hljs-title function_">canIUse</span>(<span class="hljs-string">&#x27;getUpdateManager&#x27;</span>)) {
<span class="hljs-keyword">const</span> updateManager = uni.<span class="hljs-title function_">getUpdateManager</span>()
<span class="hljs-comment">//检查是否有新版本</span>
updateManager.<span class="hljs-title function_">onCheckForUpdate</span>(<span class="hljs-keyword">function</span>(<span class="hljs-params">res</span>) {
<span class="hljs-comment">// 如果有新版本</span>
<span class="hljs-keyword">if</span> (res.<span class="hljs-property">hasUpdate</span>) {
<span class="hljs-comment">// 手机支持热更新时</span>
updateManager.<span class="hljs-title function_">onUpdateReady</span>(<span class="hljs-keyword">function</span>(<span class="hljs-params"></span>) {
uni.<span class="hljs-title function_">showModal</span>({
<span class="hljs-attr">title</span>: <span class="hljs-string">&#x27;更新提示&#x27;</span>,
<span class="hljs-attr">content</span>: <span class="hljs-string">&#x27;新版本已经准备好,是否重启应用?&#x27;</span>,
<span class="hljs-attr">success</span>: <span class="hljs-keyword">function</span>(<span class="hljs-params">res</span>) {
<span class="hljs-keyword">if</span> (res.<span class="hljs-property">confirm</span>) {
updateManager.<span class="hljs-title function_">applyUpdate</span>()
}
}
})
})
<span class="hljs-comment">// 手机不支持热更新时</span>
updateManager.<span class="hljs-title function_">onUpdateFailed</span>(<span class="hljs-keyword">function</span>(<span class="hljs-params"></span>) {
uni.<span class="hljs-title function_">showModal</span>({
<span class="hljs-attr">title</span>: <span class="hljs-string">&#x27;已经有新版本了哟~&#x27;</span>,
<span class="hljs-attr">content</span>: <span class="hljs-string">&#x27;新版本已经上线啦~,请您删除当前小程序,重新搜索打开哟~&#x27;</span>
})
})
}
})
} <span class="hljs-keyword">else</span> {
}
</code></pre>
</li>
<li>
<h5 id="判断iphonex下的横线">判断iPhoneX下的横线</h5>
<pre><code class="language-js">app.<span class="hljs-property">js</span> / <span class="hljs-variable constant_">APP</span>.<span class="hljs-property">vue</span>文件内
<span class="hljs-comment">// 获取用户手机型号</span>
<span class="hljs-keyword">let</span> that = <span class="hljs-variable language_">this</span>;
uni.<span class="hljs-title function_">getSystemInfo</span>({
<span class="hljs-attr">success</span>: <span class="hljs-keyword">function</span> (<span class="hljs-params">res</span>) {
<span class="hljs-keyword">if</span> (res.<span class="hljs-property">model</span> == <span class="hljs-string">&quot;iPhone X&quot;</span>) {
that.<span class="hljs-property">globalData</span>.<span class="hljs-property">isIphoneX</span> = <span class="hljs-literal">true</span>
}
}
})
</code></pre>
<pre><code class="language-js">使用:
&lt;script&gt;
<span class="hljs-keyword">let</span> app = <span class="hljs-title function_">getApp</span>()
<span class="hljs-keyword">export</span> <span class="hljs-keyword">default</span>{
<span class="hljs-title function_">data</span>(<span class="hljs-params"></span>){
<span class="hljs-keyword">return</span> {
<span class="hljs-attr">isIphoneX</span>: <span class="hljs-literal">false</span>, <span class="hljs-comment">// iphoneX手机</span>
}
},
<span class="hljs-title function_">onLoad</span>(<span class="hljs-params">operation</span>) {
<span class="hljs-variable language_">this</span>.<span class="hljs-property">isIphoneX</span> = app.<span class="hljs-property">globalData</span>.<span class="hljs-property">isIphoneX</span>;
},
<span class="hljs-attr">methods</span>:{
},
}
&lt;/script&gt;
</code></pre>
</li>
<li>
<h5 id="页面滚动事件----小程序">页面滚动事件 -- 小程序</h5>
<pre><code class="language-js"><span class="hljs-title function_">onPageScroll</span>(<span class="hljs-params">res</span>) {
<span class="hljs-comment">//获取距离顶部距离</span>
<span class="hljs-keyword">const</span> scrollTop = res.<span class="hljs-property">scrollTop</span>;
<span class="hljs-comment">// 获取屏幕宽高</span>
<span class="hljs-keyword">const</span> { windowWidth, windowHeight,statusBarHeight } = uni.<span class="hljs-title function_">getSystemInfoSync</span>();
<span class="hljs-keyword">if</span>(scrollTop &gt;= <span class="hljs-number">300</span>){
<span class="hljs-variable language_">this</span>.<span class="hljs-property">showGoTop</span> = <span class="hljs-literal">true</span>
}<span class="hljs-keyword">else</span>{
<span class="hljs-variable language_">this</span>.<span class="hljs-property">showGoTop</span> = <span class="hljs-literal">false</span>
}
},
</code></pre>
</li>
<li>
<h5 id="获取页面高度">获取页面高度</h5>
<pre><code class="language-js"><span class="hljs-keyword">const</span> query = uni.<span class="hljs-title function_">createSelectorQuery</span>().<span class="hljs-title function_">in</span>(<span class="hljs-variable language_">this</span>);
query.<span class="hljs-title function_">select</span>(<span class="hljs-string">&#x27;#goodsInfo&#x27;</span>).<span class="hljs-title function_">boundingClientRect</span>(<span class="hljs-function"><span class="hljs-params">data</span> =&gt;</span> {
<span class="hljs-variable language_">console</span>.<span class="hljs-title function_">log</span>(<span class="hljs-string">&quot;得到布局位置信息&quot;</span> + <span class="hljs-title class_">JSON</span>.<span class="hljs-title function_">stringify</span>(data));
<span class="hljs-variable language_">console</span>.<span class="hljs-title function_">log</span>(<span class="hljs-string">&quot;节点离页面顶部的距离为&quot;</span> + data.<span class="hljs-property">top</span>);
}).<span class="hljs-title function_">exec</span>();
</code></pre>
</li>
<li>
<h5 id="文字溢出隐藏">文字溢出隐藏</h5>
<p>单行溢出</p>
<pre><code class="language-css"><span class="hljs-selector-class">.box</span>{
// 单行文本溢出隐藏, 需设置宽 高
<span class="hljs-attribute">text-overflow</span>: ellipsis;
<span class="hljs-attribute">overflow</span>: hidden;
<span class="hljs-attribute">white-space</span>: nowrap;
}
</code></pre>
<p>多行溢出</p>
<pre><code class="language-css"><span class="hljs-selector-class">.box</span>{
<span class="hljs-attribute">display</span>: -webkit-box;
-webkit-box-orient: vertical;
-webkit-line-clamp: <span class="hljs-number">2</span>;
<span class="hljs-attribute">overflow</span>: hidden;
<span class="hljs-attribute">text-overflow</span>: ellipsis;
}
</code></pre>
</li>
<li>
<p><strong>ios手机容器滚动条滑动不流畅</strong></p>
<pre><code class="language-css"><span class="hljs-selector-class">.screen</span>{
<span class="hljs-attribute">overflow</span>: auto;
-webkit-<span class="hljs-attribute">overflow</span>-scrolling: touch;
}
</code></pre>
</li>
<li>
<p>隐藏滚动条样式</p>
<pre><code class="language-css"><span class="hljs-selector-tag">div</span>::-webkit-scrollbar {
<span class="hljs-attribute">display</span>: none;
}
</code></pre>
<ul>
<li><code>div::-webkit-scrollbar</code> 滚动条整体部分</li>
<li><code>div::-webkit-scrollbar-thumb</code> 滚动条里面的小方块,能向上向下移动(或往左往右移动,取决于是垂直滚动条还是水平滚动条</li>
<li><code>div::-webkit-scrollbar-track</code> 滚动条的轨道(里面装有 <code>Thumb</code></li>
<li><code>div::-webkit-scrollbar-button</code> 滚动条的轨道的两端按钮,允许通过点击微调小方块的位置</li>
<li><code>div::-webkit-scrollbar-track-piece</code> 内层轨道,滚动条中间部分(除去</li>
<li><code>div::-webkit-scrollbar-corner</code> 边角,即两个滚动条的交汇处</li>
<li><code>div::-webkit-resizer</code> 两个滚动条的交汇处上用于通过拖动调整元素大小的小控件注意此方案有兼容性问题,一般需要隐藏滚动条时我都是用一个色块通过定位盖上去,或者将子级元素调大,父级元素使用 <code>overflow-hidden</code> 截掉滚动条部分。暴力且直接。</li>
</ul>
</li>
<li>
<p>使用css画三角形</p>
<pre><code class="language-css"><span class="hljs-selector-tag">div</span> {
<span class="hljs-attribute">width</span>: <span class="hljs-number">0</span>;
<span class="hljs-attribute">height</span>: <span class="hljs-number">0</span>;
<span class="hljs-attribute">border</span>: <span class="hljs-number">5px</span> solid #transparent;
<span class="hljs-attribute">border-top-color</span>: red;
}
</code></pre>
</li>
<li>
<p>解决ios audio无法自动播放、循环播放的问题</p>
<pre><code class="language-js"><span class="hljs-comment">// 解决ios audio无法自动播放、循环播放的问题</span>
<span class="hljs-keyword">var</span> music = <span class="hljs-variable language_">document</span>.<span class="hljs-title function_">getElementById</span>( video );
<span class="hljs-keyword">var</span> state = <span class="hljs-number">0</span>;
<span class="hljs-variable language_">document</span>.<span class="hljs-title function_">addEventListener</span>( touchstart , <span class="hljs-keyword">function</span>(<span class="hljs-params"></span>){
<span class="hljs-keyword">if</span>(state==<span class="hljs-number">0</span>){
music.<span class="hljs-title function_">play</span>();
state=<span class="hljs-number">1</span>;
}
}, <span class="hljs-literal">false</span>);
<span class="hljs-variable language_">document</span>.<span class="hljs-title function_">addEventListener</span>(<span class="hljs-string">&quot;WeixinJSBridgeReady&quot;</span>, <span class="hljs-keyword">function</span> (<span class="hljs-params"></span>) {
music.<span class="hljs-title function_">play</span>();
}, <span class="hljs-literal">false</span>);
<span class="hljs-comment">//循环播放</span>
music.<span class="hljs-property">onended</span> = <span class="hljs-keyword">function</span> (<span class="hljs-params"></span>) {
music.<span class="hljs-title function_">load</span>();
music.<span class="hljs-title function_">play</span>();
}
</code></pre>
</li>
<li>
<p><strong>contenteditable</strong>\</p>
</li>
<li>
<p><code>html</code> 中大部分标签都是不可以编辑的,但是添加了 <code>contenteditable</code> 属性之后,标签会变成可编辑状态。</p>
</li>
</ol>
<pre><code class="language-html"><span class="hljs-tag">&lt;<span class="hljs-name">div</span> <span class="hljs-attr">contenteditable</span>=<span class="hljs-string">&quot;true&quot;</span>&gt;</span><span class="hljs-tag">&lt;/<span class="hljs-name">div</span>&gt;</span>
</code></pre>
<p>不过通过这个属性把标签变为可编辑状态后只有 <code>input</code> 事件,没有 <code>change</code> 事件。也不能像表单一样通过 <code>maxlength</code> 控制最大长度。</p>
<ol start="11">
<li>
<p>解析get参数</p>
<ol>
<li>
<p>通过 <code>replace</code> 方法获取 <code>url</code> 中的参数键值对,可以快速解析 <code>get</code> 参数。</p>
<pre><code class="language-js"><span class="hljs-keyword">const</span> q = {};
location.<span class="hljs-property">search</span>.<span class="hljs-title function_">replace</span>(<span class="hljs-regexp">/([^?&amp;=]+)=([^&amp;]+)/g</span>,<span class="hljs-function">(<span class="hljs-params">_,k,v</span>)=&gt;</span>q[k]=v);
<span class="hljs-variable language_">console</span>.<span class="hljs-title function_">log</span>(q);
</code></pre>
</li>
</ol>
</li>
<li>
<p>解析连接url</p>
<ol>
<li>
<p>可以通过创建 <code>a</code> 标签,给 <code>a</code> 标签赋值 <code>href</code> 属性的方式,获取到协议,<code>pathname</code>,<code>origin</code> 等 <code>location</code> 对象上的属性。</p>
<pre><code class="language-js"><span class="hljs-comment">// 创建a标签</span>
<span class="hljs-keyword">const</span> aEle = <span class="hljs-variable language_">document</span>.<span class="hljs-title function_">createElement</span>( a );
<span class="hljs-comment">// 给a标签赋值href路径</span>
aEle.<span class="hljs-property">href</span> = /test.<span class="hljs-property">html</span> ;
<span class="hljs-comment">// 访问aEle中的属性</span>
aEle.<span class="hljs-property">protocol</span>; <span class="hljs-comment">// 获取协议</span>
aEle.<span class="hljs-property">pathname</span>; <span class="hljs-comment">// 获取path</span>
aEle.<span class="hljs-property">origin</span>;
aEle.<span class="hljs-property">host</span>;
aEle.<span class="hljs-property">search</span>;
</code></pre>
</li>
</ol>
</li>
<li>
<p><strong>Reflect</strong></p>
<ol>
<li>
<p>他是 <code>ES2015</code> 新增的对象,纯静态对象也就是不能被实例画,只能通过静态方法的方式调用,和 <code>Math</code> 对象类似,只能类似 <code>Math.random</code> 的方式调用。</p>
<p><code>Reflect</code> 内部封装了一系列对对象的底层操作,一共 14 个,其中 1 个被废弃,还剩下 13 个。</p>
<p><code>Reflect</code> 的静态方法和 <code>Proxy</code> 描述中的方法完全一致。也就是说 <code>Reflect</code> 成员方法就是 <code>Proxy</code> 处理对象的默认实现。</p>
<p><code>Proxy</code> 对象默认的方法就是调用了 <code>Reflect</code> 内部的处理逻辑,也就是如果我们调用 <code>get</code> 方法,那么在内部,<code>proxy</code> 就是将 <code>get</code> 原封不动的交给了 <code>Reflect</code>,如下。</p>
<pre><code class="language-js"><span class="hljs-keyword">const</span> proxy = <span class="hljs-keyword">new</span> <span class="hljs-title class_">Proxy</span>(obj, {
<span class="hljs-title function_">get</span>(<span class="hljs-params">target, property</span>) {
<span class="hljs-keyword">return</span> <span class="hljs-title class_">Reflect</span>.<span class="hljs-title function_">get</span>(target, property);
}
})
</code></pre>
</li>
<li>
<p><code>Reflect</code> 和 <code>Proxy</code> 没有绝对的关系,我们一般将他们两个放在一起讲是为了方便对二者的理解。</p>
</li>
<li>
<p>那为什么会有 <code>Reflect</code> 对象呢,其实他最大的用处就是提供了一套统一操作 <code>Object</code> 的 <code>API</code>。</p>
<ol>
<li>判断对象是否存在某一个属性,可以使用 <code>in</code> 操作符,但是不够优雅,还可以使用<code>Reflect.has(obj, name)</code>;</li>
<li>删除一个属性可以使用 <code>delete</code>,也可以使用 <code>Reflect.deleteProperty(obj, name)</code>;</li>
<li>获取所有属性名可以使用 <code>Object.keys</code>, 也可以使用 <code>Reflect.ownKeys(obj)</code>;</li>
<li>我们更推荐使用 <code>Reflect</code> 的 <code>API</code> 来操作对象,因为他才是未来。</li>
</ol>
</li>
</ol>
</li>
<li>
<p><strong>Proxy 和 Object.defineProperty 区别</strong></p>
<ol>
<li>
<p><code>Proxy</code> 的意思是代理,我一般教他拦截器,可以拦截对象上的一个操作。用法如下,通过 <code>new</code> 的方式创建对象,第一个参数是被拦截的对象,第二个参数是对象操作的描述。实例化后返回一个新的对象,当我们对这个新的对象进行操作时就会调用我们描述中对应的方法。</p>
<pre><code class="language-js"><span class="hljs-keyword">new</span> <span class="hljs-title class_">Proxy</span>(target, {
<span class="hljs-title function_">get</span>(<span class="hljs-params">target, property</span>) {
},
<span class="hljs-title function_">set</span>(<span class="hljs-params">target, property</span>) {
},
<span class="hljs-title function_">deleteProperty</span>(<span class="hljs-params">target, property</span>) {
}
})
</code></pre>
</li>
<li>
<p><code>Proxy</code> 区别于 <code>Object.definedProperty</code>。</p>
</li>
<li>
<p><code>Object.defineProperty</code> 只能监听到属性的读写,而 <code>Proxy</code> 除读写外还可以监听属性的删除,方法的调用等。</p>
</li>
<li>
<p>通常情况下我们想要监视数组的变化,基本要依靠重写数组方法的方式实现,这也是 Vue 的实现方式,而 <code>Proxy</code> 可以直接监视数组的变化。</p>
<pre><code class="language-js"><span class="hljs-keyword">const</span> list = [<span class="hljs-number">1</span>, <span class="hljs-number">2</span>, <span class="hljs-number">3</span>];
<span class="hljs-keyword">const</span> listproxy = <span class="hljs-keyword">new</span> <span class="hljs-title class_">Proxy</span>(list, {
<span class="hljs-title function_">set</span>(<span class="hljs-params">target, property, value</span>) {
target[property] = value;
<span class="hljs-keyword">return</span> <span class="hljs-literal">true</span>; <span class="hljs-comment">// 标识设置成功</span>
}
});
list.<span class="hljs-title function_">push</span>(<span class="hljs-number">4</span>);
</code></pre>
</li>
<li>
<p><code>Proxy</code> 是以非入侵的方式监管了对象的读写,而 <code>defineProperty</code> 需要按特定的方式定义对象的属性。</p>
</li>
</ol>
</li>
<li>
<h5 id="打开地图选择位置"><strong>打开地图选择位置</strong></h5>
<pre><code class="language-js"><span class="hljs-title function_">goMap</span>(<span class="hljs-params"></span>) {
<span class="hljs-keyword">let</span> that = <span class="hljs-variable language_">this</span>;
uni.<span class="hljs-title function_">authorize</span>({
<span class="hljs-attr">scope</span>: <span class="hljs-string">&#x27;scope.userLocation&#x27;</span>,
<span class="hljs-title function_">success</span>(<span class="hljs-params">res</span>) {
uni.<span class="hljs-title function_">chooseLocation</span>({
<span class="hljs-attr">success</span>: <span class="hljs-keyword">function</span> (<span class="hljs-params">res</span>) {
<span class="hljs-variable language_">console</span>.<span class="hljs-title function_">log</span>(<span class="hljs-string">&#x27;位置名称:&#x27;</span> + res.<span class="hljs-property">name</span>);
<span class="hljs-variable language_">console</span>.<span class="hljs-title function_">log</span>(<span class="hljs-string">&#x27;详细地址:&#x27;</span> + res.<span class="hljs-property">address</span>);
<span class="hljs-variable language_">console</span>.<span class="hljs-title function_">log</span>(<span class="hljs-string">&#x27;纬度:&#x27;</span> + res.<span class="hljs-property">latitude</span>);
<span class="hljs-variable language_">console</span>.<span class="hljs-title function_">log</span>(<span class="hljs-string">&#x27;经度:&#x27;</span> + res.<span class="hljs-property">longitude</span>);
that.<span class="hljs-property">address</span> = res.<span class="hljs-property">address</span>
}
});
},
<span class="hljs-title function_">fail</span>(<span class="hljs-params">err</span>) {
}
})
},
</code></pre>
</li>
<li>
<h5 id="打开地图选择位置--小程序">打开地图选择位置 小程序</h5>
<pre><code class="language-js"><span class="hljs-title function_">goMap</span>(<span class="hljs-params"></span>){
<span class="hljs-keyword">var</span> that=<span class="hljs-variable language_">this</span>;
wx.<span class="hljs-title function_">getLocation</span>({
<span class="hljs-attr">type</span>: <span class="hljs-string">&quot;wgs84&quot;</span>,
<span class="hljs-title function_">success</span>(<span class="hljs-params">res</span>) {
<span class="hljs-comment">//如果首次授权成功则执行地图定位操作,具体实现代码与此文无关,就不贴出</span>
wx.<span class="hljs-title function_">chooseLocation</span>({
<span class="hljs-attr">success</span>:<span class="hljs-function">(<span class="hljs-params">res</span>)=&gt;</span>{
<span class="hljs-variable language_">console</span>.<span class="hljs-title function_">log</span>(res);
<span class="hljs-keyword">if</span>(res.<span class="hljs-property">name</span>==<span class="hljs-string">&#x27;&#x27;</span>){
wx.<span class="hljs-title function_">showToast</span>({
<span class="hljs-attr">title</span>: <span class="hljs-string">&#x27;请选择定位地址&#x27;</span>,
<span class="hljs-attr">icon</span>:<span class="hljs-string">&#x27;none&#x27;</span>
})
}<span class="hljs-keyword">else</span>{
<span class="hljs-keyword">var</span> latitude=res.<span class="hljs-property">latitude</span>;
<span class="hljs-keyword">var</span> longitude=res.<span class="hljs-property">longitude</span>;
<span class="hljs-keyword">var</span> address=res.<span class="hljs-property">address</span>+res.<span class="hljs-property">name</span>;
that.<span class="hljs-title function_">setData</span>({
<span class="hljs-attr">latitude</span>:<span class="hljs-title class_">Number</span>(latitude),
<span class="hljs-attr">longitude</span>:<span class="hljs-title class_">Number</span>(longitude),
address,address
})
}
}
})
},
<span class="hljs-attr">fail</span>: <span class="hljs-keyword">function</span>(<span class="hljs-params">res</span>) {
<span class="hljs-comment">//授权失败</span>
wx.<span class="hljs-title function_">getSetting</span>({
<span class="hljs-comment">//获取用户的当前设置,返回值中只会出现小程序已经向用户请求过的权限</span>
<span class="hljs-attr">success</span>: <span class="hljs-keyword">function</span>(<span class="hljs-params">res</span>) {
<span class="hljs-comment">//成功调用授权窗口</span>
<span class="hljs-keyword">var</span> statu = res.<span class="hljs-property">authSetting</span>;
<span class="hljs-keyword">if</span> (!statu[<span class="hljs-string">&quot;scope.userLocation&quot;</span>]) {
<span class="hljs-comment">//如果设置中没有位置权限</span>
wx.<span class="hljs-title function_">showModal</span>({
<span class="hljs-comment">//弹窗提示</span>
<span class="hljs-attr">title</span>: <span class="hljs-string">&quot;是否授权当前位置&quot;</span>,
<span class="hljs-attr">content</span>:
<span class="hljs-string">&quot;需要获取您的地理位置,请确认授权,否则地图功能将无法使用&quot;</span>,
<span class="hljs-attr">success</span>: <span class="hljs-keyword">function</span>(<span class="hljs-params">tip</span>) {
<span class="hljs-keyword">if</span> (tip.<span class="hljs-property">confirm</span>) {
wx.<span class="hljs-title function_">openSetting</span>({
<span class="hljs-comment">//点击确定则调其用户设置</span>
<span class="hljs-attr">success</span>: <span class="hljs-keyword">function</span>(<span class="hljs-params">data</span>) {
<span class="hljs-keyword">if</span> (data.<span class="hljs-property">authSetting</span>[<span class="hljs-string">&quot;scope.userLocation&quot;</span>] === <span class="hljs-literal">true</span>) {
<span class="hljs-comment">//如果设置成功</span>
wx.<span class="hljs-title function_">showToast</span>({
<span class="hljs-comment">//弹窗提示</span>
<span class="hljs-attr">title</span>: <span class="hljs-string">&quot;授权成功&quot;</span>,
<span class="hljs-attr">icon</span>: <span class="hljs-string">&quot;success&quot;</span>,
<span class="hljs-attr">duration</span>: <span class="hljs-number">1000</span>
});
wx.<span class="hljs-title function_">getLocation</span>({
<span class="hljs-comment">//通过getLocation方法获取数据</span>
<span class="hljs-attr">type</span>: <span class="hljs-string">&quot;wgs84&quot;</span>,
<span class="hljs-title function_">success</span>(<span class="hljs-params">res</span>) {
<span class="hljs-comment">//成功的执行方法</span>
wx.<span class="hljs-title function_">chooseLocation</span>({
<span class="hljs-attr">success</span>:<span class="hljs-function">(<span class="hljs-params">res</span>)=&gt;</span>{
<span class="hljs-variable language_">console</span>.<span class="hljs-title function_">log</span>(res);
<span class="hljs-keyword">if</span>(res.<span class="hljs-property">name</span>==<span class="hljs-string">&#x27;&#x27;</span>){
wx.<span class="hljs-title function_">showToast</span>({
<span class="hljs-attr">title</span>: <span class="hljs-string">&#x27;请选择定位地址&#x27;</span>,
<span class="hljs-attr">icon</span>:<span class="hljs-string">&#x27;none&#x27;</span>
})
}<span class="hljs-keyword">else</span>{
<span class="hljs-keyword">var</span> latitude=res.<span class="hljs-property">latitude</span>;
<span class="hljs-keyword">var</span> longitude=res.<span class="hljs-property">longitude</span>;
<span class="hljs-keyword">var</span> address=res.<span class="hljs-property">address</span>+res.<span class="hljs-property">name</span>;
that.<span class="hljs-title function_">setData</span>({
<span class="hljs-attr">latitude</span>:<span class="hljs-title class_">Number</span>(latitude),
<span class="hljs-attr">longitude</span>:<span class="hljs-title class_">Number</span>(longitude),
address,address
})
}
}
})
}
});
}
}
});
} <span class="hljs-keyword">else</span> {
<span class="hljs-comment">//点击取消按钮,则刷新当前页面</span>
<span class="hljs-comment">// wx.redirectTo({</span>
<span class="hljs-comment">// //销毁当前页面,并跳转到当前页面</span>
<span class="hljs-comment">// url: &quot;/pages/addAddress/addAddress&quot; //此处按照自己的需求更改</span>
<span class="hljs-comment">// });</span>
}
}
});
}
},
<span class="hljs-attr">fail</span>: <span class="hljs-keyword">function</span>(<span class="hljs-params">res</span>) {
wx.<span class="hljs-title function_">showToast</span>({
<span class="hljs-attr">title</span>: <span class="hljs-string">&quot;调用授权窗口失败&quot;</span>,
<span class="hljs-attr">icon</span>: <span class="hljs-string">&quot;success&quot;</span>,
<span class="hljs-attr">duration</span>: <span class="hljs-number">1000</span>
});
}
});
}
});
}
</code></pre>
</li>
<li>
<h5 id="拨打电话">拨打电话</h5>
<pre><code class="language-js">callNum = ‘<span class="hljs-number">800</span>-<span class="hljs-number">820</span>-<span class="hljs-number">8820</span>’
<span class="hljs-title function_">callTel</span>(<span class="hljs-params"></span>){
uni.<span class="hljs-title function_">makePhoneCall</span>({
<span class="hljs-attr">phoneNumber</span>: <span class="hljs-variable language_">this</span>.<span class="hljs-property">callNum</span>,
<span class="hljs-title function_">success</span>(<span class="hljs-params">res</span>) {
<span class="hljs-variable language_">console</span>.<span class="hljs-title function_">log</span>(res, <span class="hljs-string">&#x27;拨打电话&#x27;</span>);
},
<span class="hljs-title function_">fail</span>(<span class="hljs-params">err</span>) {
<span class="hljs-variable language_">console</span>.<span class="hljs-title function_">log</span>(err);
}
})
},
</code></pre>
</li>
<li>
<h5 id="生成二维码">生成二维码</h5>
<pre><code class="language-js"><span class="hljs-keyword">var</span> <span class="hljs-title class_">QRCode</span> = <span class="hljs-built_in">require</span>(<span class="hljs-string">&#x27;../../utils/weapp-qrcode.js&#x27;</span>)
<span class="hljs-keyword">var</span> qrcode;
<span class="hljs-title function_">reateQrcode</span>(<span class="hljs-params">url</span>) {
<span class="hljs-variable language_">console</span>.<span class="hljs-title function_">log</span>(<span class="hljs-number">4566</span>);
<span class="hljs-keyword">var</span> that = <span class="hljs-variable language_">this</span>;
uni.<span class="hljs-title function_">showLoading</span>({
<span class="hljs-attr">title</span>: <span class="hljs-string">&#x27;加载中&#x27;</span>,
})
<span class="hljs-keyword">new</span> <span class="hljs-title class_">QRCode</span>(<span class="hljs-string">&#x27;myQrcode&#x27;</span>, {
<span class="hljs-attr">text</span>: url,
<span class="hljs-attr">width</span>: <span class="hljs-number">200</span>,
<span class="hljs-attr">height</span>: <span class="hljs-number">200</span>,
<span class="hljs-attr">colorDark</span>: <span class="hljs-string">&quot;#333333&quot;</span>,
<span class="hljs-attr">colorLight</span>: <span class="hljs-string">&quot;white&quot;</span>,
<span class="hljs-attr">correctLevel</span>: <span class="hljs-title class_">QRCode</span>.<span class="hljs-property">CorrectLevel</span>.<span class="hljs-property">H</span>,
<span class="hljs-attr">callback</span>: <span class="hljs-function">(<span class="hljs-params">res</span>) =&gt;</span> {
uni.<span class="hljs-title function_">hideLoading</span>()
<span class="hljs-variable language_">console</span>.<span class="hljs-title function_">log</span>(res);
<span class="hljs-comment">// 接下来就可以直接调用微信小程序的api保存到本地或者将这张二维码直接画在海报上面去,看各自需求</span>
that.<span class="hljs-property">qrcodePath</span> = res.<span class="hljs-property">path</span>;
}
})
},
</code></pre>
</li>
<li>
<h5 id="复制数字">复制数字</h5>
</li>
</ol>
<pre><code class="language-js"><span class="hljs-attr">code</span>: <span class="hljs-string">&#x27;888888&#x27;</span>, <span class="hljs-comment">// 提货码</span>
<span class="hljs-title function_">copyCode</span>(<span class="hljs-params"></span>) {
uni.<span class="hljs-title function_">setClipboardData</span>({
<span class="hljs-comment">//准备复制的数据</span>
<span class="hljs-attr">data</span>: <span class="hljs-variable language_">this</span>.<span class="hljs-property">code</span>,
<span class="hljs-attr">success</span>: <span class="hljs-keyword">function</span> (<span class="hljs-params">res</span>) {
<span class="hljs-variable language_">console</span>.<span class="hljs-title function_">log</span>(res, <span class="hljs-string">&#x27;拷贝&#x27;</span>);
uni.<span class="hljs-title function_">showToast</span>({
<span class="hljs-attr">title</span>: <span class="hljs-string">&#x27;复制成功&#x27;</span>,
});
}
});
},
</code></pre>
<ol start="11">
<li>
<h5 id="左滑删除">左滑删除</h5>
<pre><code class="language-js">&lt;script&gt;
<span class="hljs-keyword">export</span> <span class="hljs-keyword">default</span> {
<span class="hljs-title function_">data</span>(<span class="hljs-params"></span>) {
<span class="hljs-keyword">return</span> {
<span class="hljs-attr">dataList</span>: [{
<span class="hljs-attr">type</span>: <span class="hljs-number">0</span>,
<span class="hljs-attr">price</span>: <span class="hljs-number">18.8</span>,
<span class="hljs-attr">animationLate</span>: {}
},{
<span class="hljs-attr">type</span>: <span class="hljs-number">0</span>,
<span class="hljs-attr">price</span>: <span class="hljs-number">28.8</span>,
<span class="hljs-attr">animationLate</span>: {}
},{
<span class="hljs-attr">type</span>: <span class="hljs-number">1</span>,
<span class="hljs-attr">price</span>: <span class="hljs-number">38.8</span>,
<span class="hljs-attr">animationLate</span>: {}
},], <span class="hljs-comment">// 我的收藏</span>
<span class="hljs-attr">dragTargetX</span>: <span class="hljs-number">0</span>, <span class="hljs-comment">// 起始X坐标</span>
<span class="hljs-attr">activeItem</span>: <span class="hljs-literal">null</span>,
<span class="hljs-attr">threshold</span>: <span class="hljs-number">50</span>, <span class="hljs-comment">// 默认滑多长可以显示</span>
<span class="hljs-attr">touchStart</span>: <span class="hljs-number">0</span>, <span class="hljs-comment">// 滑动起始</span>
<span class="hljs-attr">animationLate</span>: {}, <span class="hljs-comment">// 动画 显示更多</span>
}
},
<span class="hljs-attr">methods</span>: {
<span class="hljs-title function_">touchstart</span>(<span class="hljs-params">e</span>) {
<span class="hljs-variable language_">this</span>.<span class="hljs-property">dragTargetX</span> = e.<span class="hljs-property">touches</span>[<span class="hljs-number">0</span>].<span class="hljs-property">pageX</span>;
<span class="hljs-variable language_">this</span>.<span class="hljs-property">touchStart</span> = e.<span class="hljs-property">touches</span>[<span class="hljs-number">0</span>].<span class="hljs-property">pageX</span>;
},
<span class="hljs-title function_">touchmove</span>(<span class="hljs-params">index,e</span>) {
<span class="hljs-keyword">let</span> newX = e.<span class="hljs-property">touches</span>[<span class="hljs-number">0</span>].<span class="hljs-property">pageX</span>;
<span class="hljs-variable language_">this</span>.<span class="hljs-property">activeItem</span> = index
<span class="hljs-variable language_">this</span>.<span class="hljs-property">dragTargetX</span> = newX;
},
<span class="hljs-title function_">touchend</span>(<span class="hljs-params">goodsType,type</span>) {
<span class="hljs-keyword">let</span> touchdistance = <span class="hljs-built_in">parseInt</span>(<span class="hljs-variable language_">this</span>.<span class="hljs-property">dragTargetX</span>) - <span class="hljs-built_in">parseInt</span>(<span class="hljs-variable language_">this</span>.<span class="hljs-property">touchStart</span>)
<span class="hljs-variable language_">console</span>.<span class="hljs-title function_">log</span>(touchdistance,<span class="hljs-string">&#x27;滑动的距离&#x27;</span>,<span class="hljs-variable language_">this</span>.<span class="hljs-property">activeItem</span>,<span class="hljs-string">&#x27;滑动的商品&#x27;</span>);
<span class="hljs-keyword">if</span>(touchdistance &gt; <span class="hljs-number">0</span>){
<span class="hljs-keyword">if</span>(<span class="hljs-title class_">Math</span>.<span class="hljs-title function_">abs</span>(touchdistance) &gt;= <span class="hljs-variable language_">this</span>.<span class="hljs-property">threshold</span>){
<span class="hljs-variable language_">console</span>.<span class="hljs-title function_">log</span>(<span class="hljs-string">&#x27;右滑距离大于50&#x27;</span>);
<span class="hljs-keyword">var</span> animation = uni.<span class="hljs-title function_">createAnimation</span>({
<span class="hljs-attr">duration</span>: <span class="hljs-number">400</span>,
<span class="hljs-attr">timingFunction</span>: <span class="hljs-string">&#x27;ease&#x27;</span>,
})
<span class="hljs-variable language_">this</span>.<span class="hljs-property">dataList</span>.<span class="hljs-title function_">forEach</span>(<span class="hljs-function">(<span class="hljs-params">item,index</span>) =&gt;</span> {
<span class="hljs-keyword">if</span>(<span class="hljs-variable language_">this</span>.<span class="hljs-property">activeItem</span> != <span class="hljs-literal">null</span> &amp;&amp; <span class="hljs-variable language_">this</span>.<span class="hljs-property">activeItem</span> == index){
item.<span class="hljs-property">animationLate</span> = animation.<span class="hljs-title function_">translateX</span>(<span class="hljs-number">0</span>).<span class="hljs-title function_">step</span>().<span class="hljs-title function_">export</span>()
}
})
}<span class="hljs-keyword">else</span>{
<span class="hljs-variable language_">console</span>.<span class="hljs-title function_">log</span>(<span class="hljs-string">&#x27;右滑距离小于50&#x27;</span>);
}
}<span class="hljs-keyword">else</span> <span class="hljs-keyword">if</span>(touchdistance &lt; <span class="hljs-number">0</span>){
<span class="hljs-keyword">if</span>(<span class="hljs-title class_">Math</span>.<span class="hljs-title function_">abs</span>(touchdistance) &gt;= <span class="hljs-variable language_">this</span>.<span class="hljs-property">threshold</span>){
<span class="hljs-variable language_">console</span>.<span class="hljs-title function_">log</span>(<span class="hljs-string">&#x27;左滑距离大于50&#x27;</span>);
<span class="hljs-keyword">var</span> animation = uni.<span class="hljs-title function_">createAnimation</span>({
<span class="hljs-attr">duration</span>: <span class="hljs-number">400</span>,
<span class="hljs-attr">timingFunction</span>: <span class="hljs-string">&#x27;ease&#x27;</span>,
})
<span class="hljs-variable language_">this</span>.<span class="hljs-property">dataList</span>.<span class="hljs-title function_">forEach</span>(<span class="hljs-function">(<span class="hljs-params">item,index</span>) =&gt;</span> {
<span class="hljs-keyword">if</span>(<span class="hljs-variable language_">this</span>.<span class="hljs-property">activeItem</span> != <span class="hljs-literal">null</span> &amp;&amp; <span class="hljs-variable language_">this</span>.<span class="hljs-property">activeItem</span> == index){
item.<span class="hljs-property">animationLate</span> = animation.<span class="hljs-title function_">translateX</span>(<span class="hljs-string">&#x27;-240rpx&#x27;</span>).<span class="hljs-title function_">step</span>().<span class="hljs-title function_">export</span>()
}<span class="hljs-keyword">else</span>{
item.<span class="hljs-property">animationLate</span> = animation.<span class="hljs-title function_">translateX</span>(<span class="hljs-number">0</span>).<span class="hljs-title function_">step</span>().<span class="hljs-title function_">export</span>()
}
})
}<span class="hljs-keyword">else</span>{
<span class="hljs-variable language_">console</span>.<span class="hljs-title function_">log</span>(<span class="hljs-string">&#x27;左滑距离小于50&#x27;</span>);
}
}<span class="hljs-keyword">else</span>{
<span class="hljs-variable language_">console</span>.<span class="hljs-title function_">log</span>(<span class="hljs-string">&#x27;点击&#x27;</span>);
}
},
}
}
&lt;/script&gt;
</code></pre>
</li>
<li>
<h5 id="扫码">扫码</h5>
<p>微信小程序为例</p>
<pre><code class="language-js"> wx.<span class="hljs-title function_">scanCode</span>({
<span class="hljs-attr">onlyFromCamera</span>: <span class="hljs-literal">false</span>,
<span class="hljs-title function_">success</span>(<span class="hljs-params">res</span>) {
<span class="hljs-variable language_">console</span>.<span class="hljs-title function_">log</span>(res, <span class="hljs-string">&#x27;扫码成功&#x27;</span>);
wx.<span class="hljs-title function_">showToast</span>({
<span class="hljs-attr">title</span>: <span class="hljs-string">&#x27;二维码错误,请重新尝试&#x27;</span>,
<span class="hljs-attr">icon</span>: <span class="hljs-string">&#x27;none&#x27;</span>,
<span class="hljs-attr">duration</span>: <span class="hljs-number">2000</span>
})
},
<span class="hljs-title function_">fail</span>(<span class="hljs-params">err</span>) {
<span class="hljs-variable language_">console</span>.<span class="hljs-title function_">log</span>(err, <span class="hljs-string">&#x27;扫码失败&#x27;</span>);
wx.<span class="hljs-title function_">showToast</span>({
<span class="hljs-attr">title</span>: <span class="hljs-string">&#x27;扫描失败&#x27;</span>,
<span class="hljs-attr">icon</span>: <span class="hljs-string">&#x27;error&#x27;</span>,
<span class="hljs-attr">duration</span>: <span class="hljs-number">2000</span>
})
}
})
</code></pre>
</li>
<li>
<h5 id="地图点击移动到自身位置">地图点击移动到自身位置</h5>
<pre><code class="language-js"><span class="hljs-title function_">selfLocation</span>(<span class="hljs-params"></span>) {
<span class="hljs-keyword">let</span> that = <span class="hljs-variable language_">this</span>;
<span class="hljs-keyword">let</span> selfLocation = wx.<span class="hljs-title function_">getStorageSync</span>(<span class="hljs-string">&#x27;selfLocation&#x27;</span>);
<span class="hljs-keyword">let</span> <span class="hljs-title class_">MapContext</span> = wx.<span class="hljs-title function_">createMapContext</span>(<span class="hljs-string">&#x27;myMap&#x27;</span>)
<span class="hljs-keyword">if</span> (selfLocation) {
<span class="hljs-variable language_">console</span>.<span class="hljs-title function_">log</span>(selfLocation, <span class="hljs-string">&#x27;用户已经授权,返回自身位置&#x27;</span>);
<span class="hljs-title class_">MapContext</span>.<span class="hljs-title function_">moveToLocation</span>({
<span class="hljs-title function_">success</span>(<span class="hljs-params">res</span>) {
<span class="hljs-variable language_">console</span>.<span class="hljs-title function_">log</span>(res, <span class="hljs-string">&#x27;移动到自身位置&#x27;</span>);
},
<span class="hljs-title function_">fail</span>(<span class="hljs-params">err</span>) {
<span class="hljs-variable language_">console</span>.<span class="hljs-title function_">log</span>(err, <span class="hljs-string">&#x27;移动错误&#x27;</span>);
}
})
} <span class="hljs-keyword">else</span> {
<span class="hljs-variable language_">console</span>.<span class="hljs-title function_">log</span>(selfLocation, <span class="hljs-string">&#x27;用户未授权,提醒授权&#x27;</span>);
wx.<span class="hljs-title function_">setStorageSync</span>(<span class="hljs-string">&#x27;selfLocation&#x27;</span>, <span class="hljs-literal">false</span>)
<span class="hljs-keyword">let</span> selfLocation = <span class="hljs-literal">false</span>;
<span class="hljs-comment">// 获取用户位置</span>
wx.<span class="hljs-title function_">getSetting</span>({
<span class="hljs-attr">success</span>: <span class="hljs-keyword">function</span> (<span class="hljs-params">res</span>) {
<span class="hljs-variable language_">console</span>.<span class="hljs-title function_">log</span>(res, <span class="hljs-string">&#x27;huoquyonghuweizhi&#x27;</span>);
<span class="hljs-keyword">var</span> statu = res.<span class="hljs-property">authSetting</span>
<span class="hljs-keyword">if</span> (!statu[<span class="hljs-string">&#x27;scope.userLocation&#x27;</span>]) {
wx.<span class="hljs-title function_">showModal</span>({
<span class="hljs-attr">title</span>: <span class="hljs-string">&#x27;是否授权当前位置&#x27;</span>,
<span class="hljs-attr">content</span>: <span class="hljs-string">&#x27;需要获取您的地理位置,请确认授权,否则选择位置功能将无法使用&#x27;</span>,
<span class="hljs-attr">success</span>: <span class="hljs-keyword">function</span> (<span class="hljs-params">tip</span>) {
<span class="hljs-keyword">if</span> (tip.<span class="hljs-property">confirm</span>) {
wx.<span class="hljs-title function_">openSetting</span>({
<span class="hljs-attr">success</span>: <span class="hljs-keyword">function</span> (<span class="hljs-params">data</span>) {
<span class="hljs-variable language_">console</span>.<span class="hljs-title function_">log</span>(data, <span class="hljs-string">&#x27;用户未授权也没开定位&#x27;</span>);
<span class="hljs-keyword">if</span> (data.<span class="hljs-property">authSetting</span>[<span class="hljs-string">&#x27;scope.userLocation&#x27;</span>] === <span class="hljs-literal">true</span>) {
wx.<span class="hljs-title function_">showToast</span>({
<span class="hljs-attr">title</span>: <span class="hljs-string">&#x27;授权成功&#x27;</span>,
<span class="hljs-attr">icon</span>: <span class="hljs-string">&#x27;success&#x27;</span>,
<span class="hljs-attr">duration</span>: <span class="hljs-number">1000</span>
})
<span class="hljs-comment">//授权成功之后,再调用chooseLocation选择地方</span>
wx.<span class="hljs-title function_">getLocation</span>({
<span class="hljs-title function_">success</span>(<span class="hljs-params">res</span>) {
<span class="hljs-variable language_">console</span>.<span class="hljs-title function_">log</span>(res)
wx.<span class="hljs-title function_">setStorageSync</span>(<span class="hljs-string">&#x27;latitude&#x27;</span>, res.<span class="hljs-property">latitude</span>);
wx.<span class="hljs-title function_">setStorageSync</span>(<span class="hljs-string">&#x27;longitude&#x27;</span>, res.<span class="hljs-property">longitude</span>);
wx.<span class="hljs-title function_">setStorageSync</span>(<span class="hljs-string">&#x27;selfLocation&#x27;</span>, <span class="hljs-literal">true</span>);
that.<span class="hljs-title function_">selfLocation</span>()
}
})
} <span class="hljs-keyword">else</span> {
wx.<span class="hljs-title function_">showToast</span>({
<span class="hljs-attr">title</span>: <span class="hljs-string">&#x27;授权失败&#x27;</span>,
<span class="hljs-attr">icon</span>: <span class="hljs-string">&#x27;error&#x27;</span>,
<span class="hljs-attr">duration</span>: <span class="hljs-number">1000</span>
})
}
}
})
}
}
})
} <span class="hljs-keyword">else</span> {
wx.<span class="hljs-title function_">getLocation</span>({
<span class="hljs-attr">type</span>: <span class="hljs-string">&#x27;gcj02&#x27;</span>,
<span class="hljs-attr">isHighAccuracy</span>: <span class="hljs-literal">true</span>,
<span class="hljs-title function_">success</span>(<span class="hljs-params">res</span>) {
<span class="hljs-variable language_">console</span>.<span class="hljs-title function_">log</span>(res, <span class="hljs-string">&#x27;用户已经授权,返回自身位置&#x27;</span>);
wx.<span class="hljs-title function_">setStorageSync</span>(<span class="hljs-string">&#x27;latitude&#x27;</span>, res.<span class="hljs-property">latitude</span>)
wx.<span class="hljs-title function_">setStorageSync</span>(<span class="hljs-string">&#x27;longitude&#x27;</span>, res.<span class="hljs-property">longitude</span>)
that.<span class="hljs-title function_">setData</span>({
<span class="hljs-attr">self_lat</span>: res.<span class="hljs-property">latitude</span>,
<span class="hljs-attr">self_long</span>: res.<span class="hljs-property">longitude</span>
})
},
<span class="hljs-title function_">fail</span>(<span class="hljs-params">err</span>) {
<span class="hljs-variable language_">console</span>.<span class="hljs-title function_">log</span>(err, <span class="hljs-string">&#x27;用户已经授权,返回自身位置失败&#x27;</span>);
}
})
<span class="hljs-title class_">MapContext</span>.<span class="hljs-title function_">moveToLocation</span>({
<span class="hljs-title function_">success</span>(<span class="hljs-params">res</span>) {
<span class="hljs-variable language_">console</span>.<span class="hljs-title function_">log</span>(res, <span class="hljs-string">&#x27;移动到自身位置&#x27;</span>);
},
<span class="hljs-title function_">fail</span>(<span class="hljs-params">err</span>) {
<span class="hljs-variable language_">console</span>.<span class="hljs-title function_">log</span>(err, <span class="hljs-string">&#x27;移动错误&#x27;</span>);
}
})
}
},
<span class="hljs-attr">fail</span>: <span class="hljs-keyword">function</span> (<span class="hljs-params">res</span>) {
wx.<span class="hljs-title function_">showToast</span>({
<span class="hljs-attr">title</span>: <span class="hljs-string">&#x27;调用授权窗口失败&#x27;</span>,
<span class="hljs-attr">icon</span>: <span class="hljs-string">&#x27;error&#x27;</span>,
<span class="hljs-attr">duration</span>: <span class="hljs-number">1000</span>
})
}
})
}
},
</code></pre>
</li>
<li>
<h5 id="地图上查看附近公共设施">地图上查看附近公共设施</h5>
<pre><code class="language-js"><span class="hljs-attr">activeName</span>: <span class="hljs-string">&#x27;便利店&#x27;</span>, <span class="hljs-comment">// 筛选的名称</span>
<span class="hljs-attr">activeIdx</span>: <span class="hljs-number">0</span>, <span class="hljs-comment">// 筛选的索引</span>
qqmapsdk = <span class="hljs-keyword">new</span> <span class="hljs-title class_">QQMapWX</span>({
<span class="hljs-attr">key</span>: <span class="hljs-string">&#x27;NKIBZ-QBYR3-MMC3P-3VYBO-2WY2Z-4WBE7&#x27;</span> <span class="hljs-comment">//你腾讯位置服务的key</span>
});
<span class="hljs-title function_">getNearby</span>(<span class="hljs-params"></span>) {
<span class="hljs-keyword">let</span> that = <span class="hljs-variable language_">this</span>;
<span class="hljs-keyword">let</span> { activeIdx, activeName } = <span class="hljs-variable language_">this</span>.<span class="hljs-property">data</span>;
<span class="hljs-comment">// 调用接口</span>
qqmapsdk.<span class="hljs-title function_">search</span>({
<span class="hljs-attr">keyword</span>: activeName,
<span class="hljs-attr">success</span>: <span class="hljs-keyword">function</span> (<span class="hljs-params">res</span>) {
<span class="hljs-variable language_">console</span>.<span class="hljs-title function_">log</span>(res, <span class="hljs-string">&#x27;成功的回调&#x27;</span>);
<span class="hljs-keyword">let</span> markers = that.<span class="hljs-property">data</span>.<span class="hljs-property">markers</span>;
<span class="hljs-keyword">let</span> changeMapList = that.<span class="hljs-property">data</span>.<span class="hljs-property">changeMapList</span>;
markers = [];
<span class="hljs-comment">// 将数据在地图上显示</span>
res.<span class="hljs-property">data</span>.<span class="hljs-title function_">map</span>(<span class="hljs-function">(<span class="hljs-params">item, index</span>) =&gt;</span> {
<span class="hljs-keyword">let</span> latitude = item.<span class="hljs-property">location</span>.<span class="hljs-property">lat</span>;
<span class="hljs-keyword">let</span> longitude = item.<span class="hljs-property">location</span>.<span class="hljs-property">lng</span>;
<span class="hljs-keyword">let</span> obj = {
<span class="hljs-attr">id</span>: index + (activeIdx + <span class="hljs-number">1</span>) * <span class="hljs-number">1000</span>,
<span class="hljs-attr">latitude</span>: latitude,
<span class="hljs-attr">longitude</span>: longitude,
<span class="hljs-attr">iconPath</span>: <span class="hljs-string">&#x27;../../images/marker_icon&#x27;</span> + activeIdx + <span class="hljs-string">&#x27;.png&#x27;</span>,
<span class="hljs-attr">width</span>: <span class="hljs-number">42</span>,
<span class="hljs-attr">height</span>: <span class="hljs-number">42</span>,
<span class="hljs-attr">callout</span>: {
<span class="hljs-attr">content</span>: item.<span class="hljs-property">title</span>,
<span class="hljs-attr">padding</span>: <span class="hljs-number">10</span>,
<span class="hljs-attr">display</span>: <span class="hljs-string">&#x27;BYCLICK&#x27;</span>,
<span class="hljs-attr">textAlign</span>: <span class="hljs-string">&#x27;center&#x27;</span>
},
<span class="hljs-attr">joinCluster</span>: <span class="hljs-literal">true</span>
}
<span class="hljs-keyword">return</span> markers.<span class="hljs-title function_">push</span>(obj)
})
markers.<span class="hljs-title function_">push</span>(...changeMapList)
that.<span class="hljs-title function_">setData</span>({
<span class="hljs-attr">markers</span>: markers
})
<span class="hljs-variable language_">console</span>.<span class="hljs-title function_">log</span>(that.<span class="hljs-property">data</span>.<span class="hljs-property">markers</span>);
},
<span class="hljs-attr">fail</span>: <span class="hljs-keyword">function</span> (<span class="hljs-params">res</span>) {
<span class="hljs-variable language_">console</span>.<span class="hljs-title function_">log</span>(res, <span class="hljs-string">&#x27;失败的回调&#x27;</span>);
},
<span class="hljs-attr">complete</span>: <span class="hljs-keyword">function</span> (<span class="hljs-params">res</span>) {
<span class="hljs-variable language_">console</span>.<span class="hljs-title function_">log</span>(res, <span class="hljs-string">&#x27;调用接口的回调&#x27;</span>);
}
});
},
</code></pre>
</li>
<li>
<h5 id="时间格式化">时间格式化</h5>
<pre><code class="language-js"> <span class="hljs-comment">// 格式化时间</span>
<span class="hljs-title function_">format</span>(<span class="hljs-params">shijianchuo</span>) {
<span class="hljs-comment">//shijianchuo是整数,否则要parseInt转换</span>
<span class="hljs-keyword">var</span> time = <span class="hljs-keyword">new</span> <span class="hljs-title class_">Date</span>(shijianchuo);
<span class="hljs-keyword">var</span> y = time.<span class="hljs-title function_">getFullYear</span>();
<span class="hljs-keyword">var</span> m = time.<span class="hljs-title function_">getMonth</span>() + <span class="hljs-number">1</span>;
<span class="hljs-keyword">var</span> d = time.<span class="hljs-title function_">getDate</span>();
<span class="hljs-keyword">var</span> h = time.<span class="hljs-title function_">getHours</span>();
<span class="hljs-keyword">var</span> mm = time.<span class="hljs-title function_">getMinutes</span>();
<span class="hljs-keyword">var</span> s = time.<span class="hljs-title function_">getSeconds</span>();
<span class="hljs-keyword">return</span> y + <span class="hljs-string">&#x27;-&#x27;</span> + <span class="hljs-variable language_">this</span>.<span class="hljs-title function_">add0</span>(m) + <span class="hljs-string">&#x27;-&#x27;</span> + <span class="hljs-variable language_">this</span>.<span class="hljs-title function_">add0</span>(d);
},
<span class="hljs-title function_">add0</span>(<span class="hljs-params">m</span>) { <span class="hljs-keyword">return</span> m &lt; <span class="hljs-number">10</span> ? <span class="hljs-string">&#x27;0&#x27;</span> + m : m },
</code></pre>
<pre><code class="language-js"><span class="hljs-comment">// 秒数转化为时分秒</span>
<span class="hljs-title function_">formatSeconds</span>(<span class="hljs-params">value</span>) {
<span class="hljs-comment">// 秒</span>
<span class="hljs-keyword">let</span> second = <span class="hljs-built_in">parseInt</span>(value)
<span class="hljs-comment">// 分</span>
<span class="hljs-keyword">let</span> minute = <span class="hljs-number">0</span>
<span class="hljs-comment">// 小时</span>
<span class="hljs-keyword">let</span> hour = <span class="hljs-number">0</span>
<span class="hljs-comment">// 天</span>
<span class="hljs-comment">// let day = 0</span>
<span class="hljs-comment">// 如果秒数大于60,将秒数转换成整数</span>
<span class="hljs-keyword">if</span> (second &gt; <span class="hljs-number">60</span>) {
<span class="hljs-comment">// 获取分钟,除以60取整数,得到整数分钟</span>
minute = <span class="hljs-built_in">parseInt</span>(second / <span class="hljs-number">60</span>)
<span class="hljs-comment">// 获取秒数,秒数取佘,得到整数秒数</span>
second = <span class="hljs-built_in">parseInt</span>(second % <span class="hljs-number">60</span>)
<span class="hljs-comment">// 如果分钟大于60,将分钟转换成小时</span>
<span class="hljs-keyword">if</span> (minute &gt; <span class="hljs-number">60</span>) {
<span class="hljs-comment">// 获取小时,获取分钟除以60,得到整数小时</span>
hour = <span class="hljs-built_in">parseInt</span>(minute / <span class="hljs-number">60</span>)
<span class="hljs-comment">// 获取小时后取佘的分,获取分钟除以60取佘的分</span>
minute = <span class="hljs-built_in">parseInt</span>(minute % <span class="hljs-number">60</span>)
<span class="hljs-comment">// 如果小时大于24,将小时转换成天</span>
<span class="hljs-comment">// if (hour &gt; 23) {</span>
<span class="hljs-comment">// // 获取天数,获取小时除以24,得到整天数</span>
<span class="hljs-comment">// day = parseInt(hour / 24)</span>
<span class="hljs-comment">// // 获取天数后取余的小时,获取小时除以24取余的小时</span>
<span class="hljs-comment">// hour = parseInt(hour % 24)</span>
<span class="hljs-comment">// }</span>
}
}<span class="hljs-keyword">else</span> <span class="hljs-keyword">if</span>(second == <span class="hljs-number">0</span>){
<span class="hljs-variable language_">this</span>.<span class="hljs-property">testHour</span> = <span class="hljs-number">0</span>;
<span class="hljs-variable language_">this</span>.<span class="hljs-property">testMinute</span> = <span class="hljs-number">0</span>;
<span class="hljs-variable language_">this</span>.<span class="hljs-property">testSecond</span> = <span class="hljs-number">0</span>;
<span class="hljs-variable language_">this</span>.<span class="hljs-property">completeOrder</span> = <span class="hljs-literal">true</span>;
<span class="hljs-variable language_">this</span>.<span class="hljs-property">process</span> = <span class="hljs-number">5</span>;
<span class="hljs-keyword">return</span>
}
<span class="hljs-comment">// second = second &gt; 10 ? second : &#x27;0&#x27; + second;</span>
<span class="hljs-comment">// if (minute &gt; 0) {</span>
<span class="hljs-comment">// minute = minute &gt; 10 ? minute : &#x27;0&#x27; + minute;</span>
<span class="hljs-comment">// }</span>
<span class="hljs-comment">// if (hour &gt; 0) {</span>
<span class="hljs-comment">// hour = hour &gt; 10 ? hour : &#x27;0&#x27; + hour;</span>
<span class="hljs-comment">// }</span>
<span class="hljs-keyword">let</span> datas = {
second,
minute,
hour
}
<span class="hljs-variable language_">this</span>.<span class="hljs-property">testHour</span> = <span class="hljs-title class_">Number</span>(hour);
<span class="hljs-variable language_">this</span>.<span class="hljs-property">testMinute</span> = <span class="hljs-title class_">Number</span>(minute);
<span class="hljs-variable language_">this</span>.<span class="hljs-property">testSecond</span> = <span class="hljs-title class_">Number</span>(second);
<span class="hljs-keyword">return</span> datas
},
</code></pre>
<pre><code class="language-js"><span class="hljs-comment">// 获取当前时间</span>
<span class="hljs-title function_">getNowTime</span>(<span class="hljs-params"></span>){
<span class="hljs-keyword">var</span> a = <span class="hljs-keyword">new</span> <span class="hljs-title class_">Date</span>()
<span class="hljs-keyword">var</span> year = a.<span class="hljs-title function_">getFullYear</span>()
<span class="hljs-keyword">var</span> month = a.<span class="hljs-title function_">getMonth</span>() + <span class="hljs-number">1</span>
<span class="hljs-keyword">var</span> days = a.<span class="hljs-title function_">getDate</span>()
<span class="hljs-keyword">var</span> week = a.<span class="hljs-title function_">getDay</span>()
<span class="hljs-keyword">var</span> hours = a.<span class="hljs-title function_">getHours</span>()
<span class="hljs-keyword">var</span> minutes = a.<span class="hljs-title function_">getMinutes</span>()
<span class="hljs-keyword">var</span> seconds = a.<span class="hljs-title function_">getSeconds</span>()
<span class="hljs-keyword">var</span> arr = [<span class="hljs-string">&#x27;星期日&#x27;</span>, <span class="hljs-string">&#x27;星期一&#x27;</span>, <span class="hljs-string">&#x27;星期二&#x27;</span>, <span class="hljs-string">&#x27;星期三&#x27;</span>, <span class="hljs-string">&#x27;星期四&#x27;</span>, <span class="hljs-string">&#x27;星期五&#x27;</span>, <span class="hljs-string">&#x27;星期六&#x27;</span>];
seconds = seconds &gt; <span class="hljs-number">10</span> ? seconds : <span class="hljs-string">&#x27;0&#x27;</span> + seconds;
minutes = minutes &gt; <span class="hljs-number">10</span> ? minutes : <span class="hljs-string">&#x27;0&#x27;</span> + minutes;
hours = hours &gt; <span class="hljs-number">10</span> ? hours : <span class="hljs-string">&#x27;0&#x27;</span> + hours;
month = month &gt; <span class="hljs-number">10</span> ? month : <span class="hljs-string">&#x27;0&#x27;</span> + month;
days = days &gt; <span class="hljs-number">10</span> ? days : <span class="hljs-string">&#x27;0&#x27;</span> + days;
<span class="hljs-variable language_">console</span>.<span class="hljs-title function_">log</span>(<span class="hljs-string">`<span class="hljs-subst">${year}</span>-<span class="hljs-subst">${month}</span>-<span class="hljs-subst">${days}</span> <span class="hljs-subst">${hours}</span>:<span class="hljs-subst">${minutes}</span>:<span class="hljs-subst">${seconds}</span>`</span>);
},
</code></pre>
</li>
<li>
<h5 id="转成base64">转成base64</h5>
<pre><code class="language-js"> <span class="hljs-comment">// 转换为base64</span>
<span class="hljs-title function_">base64</span>(<span class="hljs-params">{ url, type }</span>) {
<span class="hljs-keyword">return</span> <span class="hljs-keyword">new</span> <span class="hljs-title class_">Promise</span>(<span class="hljs-function">(<span class="hljs-params">resolve, reject</span>) =&gt;</span> {
wx.<span class="hljs-title function_">getFileSystemManager</span>().<span class="hljs-title function_">readFile</span>({
<span class="hljs-attr">filePath</span>: url, <span class="hljs-comment">//选择图片返回的相对路径</span>
<span class="hljs-attr">encoding</span>: <span class="hljs-string">&#x27;base64&#x27;</span>, <span class="hljs-comment">//编码格式</span>
<span class="hljs-attr">success</span>: <span class="hljs-function"><span class="hljs-params">res</span> =&gt;</span> {
<span class="hljs-title function_">resolve</span>(<span class="hljs-string">&#x27;data:image/&#x27;</span> + type.<span class="hljs-title function_">toLocaleLowerCase</span>() + <span class="hljs-string">&#x27;;base64,&#x27;</span> + res.<span class="hljs-property">data</span>)
},
<span class="hljs-attr">fail</span>: <span class="hljs-function"><span class="hljs-params">res</span> =&gt;</span> <span class="hljs-title function_">reject</span>(res.<span class="hljs-property">errMsg</span>)
})
})
},
</code></pre>
</li>
<li>
<h5 id="vue代理跨域">vue代理跨域</h5>
<pre><code class="language-js"><span class="hljs-attr">devServer</span>:{
<span class="hljs-attr">port</span>: <span class="hljs-number">80</span>,
<span class="hljs-attr">proxy</span>:
{
<span class="hljs-string">&quot;/api&quot;</span>: {
<span class="hljs-attr">target</span>: <span class="hljs-string">`xxx`</span>,<span class="hljs-comment">// 需要代理到的地址 </span>
<span class="hljs-attr">changeOrigin</span>:
<span class="hljs-literal">true</span>,
<span class="hljs-attr">ws</span>:
<span class="hljs-literal">true</span>,
<span class="hljs-attr">pathRewrite</span>:
{
<span class="hljs-string">&#x27;^/api&#x27;</span>:
<span class="hljs-string">&#x27;/api&#x27;</span>
}
}
}
,
<span class="hljs-attr">disableHostCheck</span>: <span class="hljs-literal">true</span>,
}
</code></pre>
</li>
<li>
<h5 id="小程序组件之间-的参数传递">小程序组件之间 的参数传递</h5>
<pre><code class="language-js"><span class="hljs-comment">// index.wxml</span>
&lt;linkAddress maskVisual=<span class="hljs-string">&quot;{{popupAddr}}&quot;</span> <span class="hljs-attr">bind</span>:areaSelectedStr=<span class="hljs-string">&quot;areaSelected&quot;</span>&gt;&lt;/linkAddress&gt;
<span class="hljs-comment">// components</span>
<span class="hljs-comment">// 接收</span>
<span class="hljs-attr">properties</span>: {
<span class="hljs-attr">maskVisual</span>: {
<span class="hljs-attr">type</span>: <span class="hljs-title class_">String</span>,
<span class="hljs-attr">value</span>: <span class="hljs-string">&#x27;hidden&#x27;</span>
},
},
<span class="hljs-comment">// 传递</span>
<span class="hljs-variable language_">this</span>.<span class="hljs-title function_">triggerEvent</span>(<span class="hljs-string">&#x27;areaSelectedStr&#x27;</span>, areaSelectedStr)
</code></pre>
</li>
<li>
<h5 id="小程序组件">小程序组件</h5>
<ol>
<li>
<p><strong>组件也有它的生命周期(<strong>lifetimes</strong>)</strong></p>
<p>自小程序基础版本2.2.3起,组件的<a href="https://so.csdn.net/so/search?q=%E7%94%9F%E5%91%BD%E5%91%A8%E6%9C%9F">生命周期</a>可以在lifetimes字段中声明(这是推荐的方式,优先级最高)</p>
<pre><code class="language-js"> <span class="hljs-attr">lifetimes</span>: {
<span class="hljs-attr">created</span>: <span class="hljs-keyword">function</span> (<span class="hljs-params"></span>) {
<span class="hljs-comment">// 组件实例化,但节点树还未导入,因此这时不能用setData</span>
},
<span class="hljs-attr">attached</span>: <span class="hljs-keyword">function</span> (<span class="hljs-params"></span>) {
<span class="hljs-comment">// 在组件实例进入页面节点树时执行 </span>
<span class="hljs-comment">// 节点树完成,可以用setData渲染节点,但无法操作节点</span>
},
<span class="hljs-attr">ready</span>: <span class="hljs-keyword">function</span> (<span class="hljs-params"></span>) {
<span class="hljs-comment">// 组件布局完成,这时可以获取节点信息,也可以操作节点</span>
},
<span class="hljs-attr">move</span>: <span class="hljs-keyword">function</span> (<span class="hljs-params"></span>) {
<span class="hljs-comment">// 组件实例被移动到树的另一个位置</span>
},
<span class="hljs-attr">detached</span>: <span class="hljs-keyword">function</span> (<span class="hljs-params"></span>) {
<span class="hljs-comment">// 在组件实例被从页面节点树移除时执行</span>
},
},
</code></pre>
</li>
<li>
<p><strong>组件内使用父页面定义的样式(externalClasses)</strong></p>
<p>组件js内先引用:</p>
<pre><code class="language-js"><span class="hljs-attr">externalClasses</span>: [<span class="hljs-string">&#x27;out_class&#x27;</span>], <span class="hljs-comment">// 引用父页面定义的class名</span>
</code></pre>
<p>组件html中使用:</p>
<pre><code class="language-html"><span class="hljs-tag">&lt;<span class="hljs-name">view</span> <span class="hljs-attr">class</span>=<span class="hljs-string">&quot;out_class&quot;</span>&gt;</span>{{item.txt}}<span class="hljs-tag">&lt;/<span class="hljs-name">view</span>&gt;</span>
</code></pre>
<p>父页面中:</p>
<pre><code class="language-html"><span class="hljs-tag">&lt;<span class="hljs-name">nav</span> <span class="hljs-attr">nav</span>=<span class="hljs-string">&quot;{{navData}}&quot;</span> <span class="hljs-attr">out_class</span>=<span class="hljs-string">&quot;txtColor&quot;</span>&gt;</span><span class="hljs-tag">&lt;/<span class="hljs-name">nav</span>&gt;</span>
.txtColor{
color: purple;
}
</code></pre>
</li>
<li>
<p><strong>组件中数据监听(observers)</strong></p>
<ol>
<li>
<p><strong>监听传过来数据</strong></p>
<pre><code class="language-js"> <span class="hljs-attr">properties</span>: {
<span class="hljs-attr">testData</span>: {
<span class="hljs-attr">type</span>: <span class="hljs-title class_">String</span>,
<span class="hljs-attr">observer</span>: <span class="hljs-keyword">function</span>(<span class="hljs-params">a, b</span>){
<span class="hljs-variable language_">console</span>.<span class="hljs-title function_">log</span>(<span class="hljs-string">&#x27;数据1:&#x27;</span>, b)
<span class="hljs-variable language_">console</span>.<span class="hljs-title function_">log</span>(<span class="hljs-string">&#x27;数据2:&#x27;</span>, a)
}
}
},
</code></pre>
</li>
<li>
<p><strong>监听data中的数据</strong></p>
<pre><code class="language-js"> <span class="hljs-attr">observers</span>: {
<span class="hljs-string">&#x27;oberser_data&#x27;</span>(data){
<span class="hljs-variable language_">console</span>.<span class="hljs-title function_">log</span>(<span class="hljs-string">&#x27;数据发生了变化&#x27;</span>, data)
},
<span class="hljs-string">&#x27;oberser_data.newVal&#x27;</span>(data) { <span class="hljs-comment">// 无用,监听不到</span>
<span class="hljs-variable language_">console</span>.<span class="hljs-title function_">log</span>(<span class="hljs-string">&#x27;第二个数据发生了变化&#x27;</span>, data)
}
},
<span class="hljs-comment">/**
* 组件的初始数据
*/</span>
<span class="hljs-attr">data</span>: {
<span class="hljs-attr">oberser_data</span>: <span class="hljs-string">&#x27;初始数据&#x27;</span>,
<span class="hljs-attr">oberser_data2</span>: {
<span class="hljs-string">&#x27;newVal&#x27;</span>: <span class="hljs-string">&#x27;深度数据&#x27;</span>
}
},
<span class="hljs-attr">methods</span>: {
<span class="hljs-title function_">onNav</span>(<span class="hljs-params">e</span>) {
<span class="hljs-variable language_">this</span>.<span class="hljs-title function_">setData</span>({
<span class="hljs-attr">oberser_data</span>: <span class="hljs-string">&#x27;改变的数据&#x27;</span>,
[<span class="hljs-string">&quot;oberser_data2.newVal&quot;</span>]: <span class="hljs-string">&#x27;第二个改变的数据&#x27;</span>
})
}
}
</code></pre>
</li>
</ol>
</li>
<li>
<p><strong>父子组件通信</strong></p>
<pre><code class="language-js">父组件:&lt;getCode name=”{{name}}” bindmyEvent=”onTest”&gt;&lt;/getCode&gt;
子组件在properties中接收name:properties:{<span class="hljs-attr">name</span>: {<span class="hljs-attr">type</span>:<span class="hljs-title class_">String</span>,<span class="hljs-attr">value</span>:’’}}
然后子组件通过<span class="hljs-variable language_">this</span>.<span class="hljs-property">data</span>.<span class="hljs-property">name</span>就可以使用了
子组件中:<span class="hljs-attr">click</span>: <span class="hljs-keyword">function</span>(<span class="hljs-params">e</span>) {
<span class="hljs-keyword">var</span> val = e.<span class="hljs-property">detail</span>.<span class="hljs-property">value</span>
<span class="hljs-keyword">var</span> myEventData = {<span class="hljs-attr">val</span>: val}
<span class="hljs-variable language_">this</span>.<span class="hljs-title function_">triggerEvent</span>(‘myEvent’,myEventData )
}
父组件中:<span class="hljs-attr">onTest</span>: <span class="hljs-keyword">function</span>(<span class="hljs-params">e</span>) {
<span class="hljs-variable language_">this</span>.<span class="hljs-title function_">setData</span>({<span class="hljs-attr">value</span>: e.<span class="hljs-property">detail</span>.<span class="hljs-property">val</span>})
}
</code></pre>
</li>
<li>
<p><strong>获取组件实例对象</strong></p>
<p>获取到了组件实例对象this.selectComponent(“#id)</p>
<p>调用组件实例中的方法this.selectComponent(“#id).fun()</p>
</li>
</ol>
</li>
<li>
<h5 id="手机号正则验证">手机号正则验证</h5>
<pre><code class="language-js"><span class="hljs-keyword">let</span> reg_tel = <span class="hljs-regexp">/^(13[0-9]|14[01456879]|15[0-35-9]|16[2567]|17[0-8]|18[0-9]|19[0-35-9])\d{8}$/</span>;
reg_tel.<span class="hljs-title function_">test</span>(<span class="hljs-variable language_">this</span>.<span class="hljs-property">phone</span>)
</code></pre>
</li>
<li>
<h5 id="上传图片--uploadfile形式不转base64">上传图片 uploadFile形式,不转base64</h5>
<pre><code class="language-js"><span class="hljs-keyword">const</span> tempFilePaths = res.<span class="hljs-property">tempFilePaths</span>;
<span class="hljs-keyword">const</span> uploadTask = uni.<span class="hljs-title function_">uploadFile</span>({
<span class="hljs-attr">url</span>: ‘xxx<span class="hljs-string">&#x27;, //仅为示例,非真实的接口地址
filePath: tempFilePaths[0],
name: &#x27;</span>file<span class="hljs-string">&#x27;,
formData: {
&#x27;</span>user<span class="hljs-string">&#x27;: &#x27;</span>test<span class="hljs-string">&#x27;
},
success: (uploadFileRes) =&gt; {
console.log(uploadFileRes.data);
},
fail:(err) =&gt; {
console.log(err, &#x27;</span>errerrerr<span class="hljs-string">&#x27;)
}
});
uploadTask.onProgressUpdate((res) =&gt; {
// console.log(&#x27;</span>上传进度<span class="hljs-string">&#x27; + res.progress);
// console.log(&#x27;</span>已经上传的数据长度<span class="hljs-string">&#x27; + res.totalBytesSent);
// console.log(&#x27;</span>预期需要上传的数据总长度<span class="hljs-string">&#x27; + res.totalBytesExpectedToSend);
// 测试条件,取消上传任务。
// if (res.progress &gt; 50) {
// uploadTask.abort();
// }
});
</span></code></pre>
</li>
<li>
<p>uniapp保存base64图片</p>
<ol>
<li>
<p>微信小程序</p>
<pre><code class="language-js"><span class="hljs-comment">// 微信 保存二维码</span>
<span class="hljs-title function_">saveBase64ImgWX</span>(<span class="hljs-params"></span>) {
<span class="hljs-keyword">let</span> base64 = <span class="hljs-variable language_">this</span>.<span class="hljs-property">qrcode</span>.<span class="hljs-title function_">replace</span>(<span class="hljs-regexp">/^data:image\/\w+;base64,/</span>, <span class="hljs-string">&quot;&quot;</span>); <span class="hljs-comment">//去掉data:image/png;base64,</span>
<span class="hljs-keyword">let</span> filePath = wx.<span class="hljs-property">env</span>.<span class="hljs-property">USER_DATA_PATH</span> + <span class="hljs-string">&#x27;/invitation_qrcode.png&#x27;</span>;
<span class="hljs-keyword">var</span> save = uni.<span class="hljs-title function_">getFileSystemManager</span>();
<span class="hljs-keyword">var</span> number = <span class="hljs-title class_">Math</span>.<span class="hljs-title function_">random</span>();
save.<span class="hljs-title function_">writeFile</span>({
<span class="hljs-attr">filePath</span>: filePath,
<span class="hljs-attr">data</span>: base64,
<span class="hljs-attr">encoding</span>: <span class="hljs-string">&#x27;base64&#x27;</span>,
<span class="hljs-attr">success</span>: <span class="hljs-function"><span class="hljs-params">res</span> =&gt;</span> {
<span class="hljs-variable language_">console</span>.<span class="hljs-title function_">log</span>(<span class="hljs-number">669699</span>, res)
uni.<span class="hljs-title function_">saveImageToPhotosAlbum</span>({
<span class="hljs-attr">filePath</span>: filePath,
<span class="hljs-attr">success</span>: <span class="hljs-keyword">function</span>(<span class="hljs-params">res</span>) {
uni.<span class="hljs-title function_">showToast</span>({
<span class="hljs-attr">title</span>: <span class="hljs-string">&#x27;保存成功&#x27;</span>,
<span class="hljs-attr">icon</span>: <span class="hljs-string">&quot;success&quot;</span>,
<span class="hljs-attr">duration</span>: <span class="hljs-number">1000</span>
})
},
<span class="hljs-attr">fail</span>: <span class="hljs-keyword">function</span>(<span class="hljs-params">err</span>) {
uni.<span class="hljs-title function_">showToast</span>({
<span class="hljs-attr">title</span>: <span class="hljs-string">&#x27;保存失败&#x27;</span>,
<span class="hljs-attr">icon</span>: <span class="hljs-string">&quot;success&quot;</span>,
<span class="hljs-attr">duration</span>: <span class="hljs-number">1000</span>
})
<span class="hljs-variable language_">console</span>.<span class="hljs-title function_">log</span>(err)
}
})
<span class="hljs-variable language_">console</span>.<span class="hljs-title function_">log</span>(res)
},
<span class="hljs-attr">fail</span>: <span class="hljs-function"><span class="hljs-params">err</span> =&gt;</span> {
<span class="hljs-variable language_">console</span>.<span class="hljs-title function_">log</span>(err)
}
})
},
</code></pre>
</li>
<li>
<p>app</p>
<pre><code class="language-js"><span class="hljs-comment">// app 保存二维码</span>
<span class="hljs-title function_">saveBase64ImgApp</span>(<span class="hljs-params">base64</span>) {
<span class="hljs-keyword">const</span> bitmap = <span class="hljs-keyword">new</span> plus.<span class="hljs-property">nativeObj</span>.<span class="hljs-title class_">Bitmap</span>(<span class="hljs-string">&#x27;test&#x27;</span>);
bitmap.<span class="hljs-title function_">loadBase64Data</span>(
base64,
<span class="hljs-keyword">function</span>(<span class="hljs-params"></span>) {
<span class="hljs-keyword">const</span> url = <span class="hljs-string">&#x27;_doc/&#x27;</span> + <span class="hljs-keyword">new</span> <span class="hljs-title class_">Date</span>() + <span class="hljs-string">&#x27;.png&#x27;</span>; <span class="hljs-comment">// url建议用时间戳命名方式</span>
<span class="hljs-variable language_">console</span>.<span class="hljs-title function_">log</span>(<span class="hljs-string">&#x27;url:&#x27;</span>, url);
bitmap.<span class="hljs-title function_">save</span>(
url, {
<span class="hljs-attr">overwrite</span>: <span class="hljs-literal">true</span> <span class="hljs-comment">// 是否覆盖</span>
<span class="hljs-comment">// quality: &#x27;quality&#x27; // 图片清晰度</span>
},
<span class="hljs-function"><span class="hljs-params">i</span> =&gt;</span> {
uni.<span class="hljs-title function_">saveImageToPhotosAlbum</span>({
<span class="hljs-attr">filePath</span>: url,
<span class="hljs-attr">success</span>: <span class="hljs-keyword">function</span>(<span class="hljs-params"></span>) {
uni.<span class="hljs-title function_">showToast</span>({
<span class="hljs-attr">title</span>: <span class="hljs-string">&#x27;保存成功&#x27;</span>,
<span class="hljs-attr">icon</span>: <span class="hljs-string">&#x27;none&#x27;</span>
})
bitmap.<span class="hljs-title function_">clear</span>();
}
});
},
<span class="hljs-function"><span class="hljs-params">e</span> =&gt;</span> {
uni.<span class="hljs-title function_">showToast</span>({
<span class="hljs-attr">title</span>: <span class="hljs-string">&#x27;保存失败&#x27;</span>,
<span class="hljs-attr">icon</span>: <span class="hljs-string">&#x27;none&#x27;</span>
})
<span class="hljs-variable language_">console</span>.<span class="hljs-title function_">log</span>(e);
bitmap.<span class="hljs-title function_">clear</span>();
}
);
},
<span class="hljs-function"><span class="hljs-params">e</span> =&gt;</span> {
<span class="hljs-variable language_">console</span>.<span class="hljs-title function_">log</span>(<span class="hljs-string">&#x27;保存失败&#x27;</span>, e);
bitmap.<span class="hljs-title function_">clear</span>();
}
);
},
</code></pre>
</li>
<li>
<p>h5</p>
<pre><code class="language-js"><span class="hljs-comment">// h5 保存二维码</span>
<span class="hljs-title function_">saveImgH5</span>(<span class="hljs-params">url</span>) {
<span class="hljs-keyword">var</span> oA = <span class="hljs-variable language_">document</span>.<span class="hljs-title function_">createElement</span>(<span class="hljs-string">&quot;a&quot;</span>);
oA.<span class="hljs-property">download</span> = <span class="hljs-string">&#x27;invitationCode&#x27;</span>; <span class="hljs-comment">// 设置下载的文件名,默认是&#x27;下载&#x27;</span>
oA.<span class="hljs-property">href</span> = url;
<span class="hljs-variable language_">console</span>.<span class="hljs-title function_">log</span>(oA);
<span class="hljs-variable language_">document</span>.<span class="hljs-property">body</span>.<span class="hljs-title function_">appendChild</span>(oA);
oA.<span class="hljs-title function_">click</span>();
oA.<span class="hljs-title function_">remove</span>(); <span class="hljs-comment">// 下载之后把创建的元素删除</span>
},
</code></pre>
</li>
</ol>
</li>
<li>
<h5 id="计算两个时间段的时间差">计算两个时间段的时间差</h5>
<pre><code class="language-js"> <span class="hljs-comment">// 获取倒计时时分秒</span>
<span class="hljs-title function_">computingTime</span>(<span class="hljs-params"></span>) {
<span class="hljs-keyword">let</span> startTime = <span class="hljs-keyword">new</span> <span class="hljs-title class_">Date</span>(); <span class="hljs-comment">// 开始时间</span>
<span class="hljs-keyword">let</span> endTime = <span class="hljs-keyword">new</span> <span class="hljs-title class_">Date</span>(<span class="hljs-string">&#x27;2018-12-12&#x27;</span>); <span class="hljs-comment">// 结束时间</span>
<span class="hljs-keyword">let</span> usedTime = endTime - startTime; <span class="hljs-comment">// 相差的毫秒数</span>
<span class="hljs-keyword">let</span> days = <span class="hljs-title class_">Math</span>.<span class="hljs-title function_">floor</span>(usedTime / (<span class="hljs-number">24</span> * <span class="hljs-number">3600</span> * <span class="hljs-number">1000</span>)); <span class="hljs-comment">// 计算出天数</span>
<span class="hljs-keyword">let</span> leavel = usedTime % (<span class="hljs-number">24</span> * <span class="hljs-number">3600</span> * <span class="hljs-number">1000</span>); <span class="hljs-comment">// 计算天数后剩余的时间</span>
<span class="hljs-keyword">let</span> hours = <span class="hljs-title class_">Math</span>.<span class="hljs-title function_">floor</span>(leavel / (<span class="hljs-number">3600</span> * <span class="hljs-number">1000</span>)); <span class="hljs-comment">// 计算剩余的小时数</span>
<span class="hljs-keyword">let</span> leavel2 = leavel % (<span class="hljs-number">3600</span> * <span class="hljs-number">1000</span>); <span class="hljs-comment">// 计算剩余小时后剩余的毫秒数</span>
<span class="hljs-keyword">let</span> minutes = <span class="hljs-title class_">Math</span>.<span class="hljs-title function_">floor</span>(leavel2 / (<span class="hljs-number">60</span> * <span class="hljs-number">1000</span>)); <span class="hljs-comment">// 计算剩余的分钟数</span>
<span class="hljs-keyword">let</span> leavel3 = leavel2 % (<span class="hljs-number">60</span> * <span class="hljs-number">1000</span>);
<span class="hljs-keyword">let</span> seconds = <span class="hljs-title class_">Math</span>.<span class="hljs-title function_">floor</span>(leavel3 / <span class="hljs-number">1000</span>);
<span class="hljs-variable language_">console</span>.<span class="hljs-title function_">log</span>(usedTime,<span class="hljs-string">&#x27;usedTime&#x27;</span>,leavel,<span class="hljs-string">&#x27;leavel&#x27;</span>,leavel2,<span class="hljs-string">&#x27;leavel2&#x27;</span>,leavel3,<span class="hljs-string">&#x27;leavel3&#x27;</span>);
<span class="hljs-variable language_">console</span>.<span class="hljs-title function_">log</span>(<span class="hljs-string">&#x27;-------------&#x27;</span>);
<span class="hljs-variable language_">console</span>.<span class="hljs-title function_">log</span>(days + <span class="hljs-string">&#x27;天&#x27;</span> + hours + <span class="hljs-string">&#x27;时&#x27;</span> + minutes + <span class="hljs-string">&#x27;分&#x27;</span> + seconds + <span class="hljs-string">&#x27;秒&#x27;</span>);
},
</code></pre>
</li>
<li>
<p>倒计时清除误差</p>
<pre><code class="language-js"><span class="hljs-comment">/**
* 倒计时工具
* <span class="hljs-doctag">@param</span> {<span class="hljs-type">object</span>} <span class="hljs-variable">option</span> - 配置项
* <span class="hljs-doctag">@param</span> {<span class="hljs-type">number</span>} option.timeStemp - 时间戳,毫秒
* <span class="hljs-doctag">@param</span> {<span class="hljs-type">number</span>} [option.interval=1000] - 间隔时间, 默认1000毫秒
* <span class="hljs-doctag">@param</span> {<span class="hljs-type">Function</span>} [option.callback] - 回调
* <span class="hljs-doctag">@returns</span> {<span class="hljs-type">Function</span>} cancel 停止计时器
* 注(一定注意):不管是使用此工具还是自己写,回调的整体执行时间都不应该超过interval
*/</span>
<span class="hljs-keyword">const</span> countdownTool = <span class="hljs-keyword">function</span> (<span class="hljs-params">{
timeStemp, interval: originalInterval = <span class="hljs-number">1000</span>, callback = (resetTime) =&gt; <span class="hljs-keyword">void</span> <span class="hljs-number">0</span>,
}</span>) {
<span class="hljs-keyword">if</span> (!timeStemp || timeStemp &lt;= <span class="hljs-number">0</span> || timeStemp &lt; originalInterval) <span class="hljs-keyword">return</span> <span class="hljs-title function_">callback</span>(<span class="hljs-number">0</span>)
<span class="hljs-keyword">let</span> stop = <span class="hljs-literal">false</span>
<span class="hljs-keyword">const</span> <span class="hljs-title function_">cancel</span> = (<span class="hljs-params"></span>) =&gt; {
stop = <span class="hljs-literal">true</span>
}
<span class="hljs-keyword">let</span> curIdx = <span class="hljs-number">1</span>
<span class="hljs-keyword">let</span> interval = originalInterval
<span class="hljs-keyword">let</span> ct = <span class="hljs-title class_">Date</span>.<span class="hljs-title function_">now</span>()
<span class="hljs-title function_">countdown</span>(interval)
<span class="hljs-keyword">function</span> <span class="hljs-title function_">countdown</span> (interval) {
<span class="hljs-keyword">if</span> (stop) <span class="hljs-keyword">return</span>
<span class="hljs-keyword">let</span> timer = <span class="hljs-built_in">setTimeout</span>(<span class="hljs-keyword">function</span> (<span class="hljs-params"></span>) {
<span class="hljs-built_in">clearTimeout</span>(timer)
<span class="hljs-keyword">let</span> resetTime = timeStemp - originalInterval * curIdx
<span class="hljs-keyword">if</span> (resetTime &lt; <span class="hljs-number">0</span>) resetTime = <span class="hljs-number">0</span>
<span class="hljs-title function_">callback</span>(resetTime)
<span class="hljs-keyword">if</span> (!resetTime) <span class="hljs-keyword">return</span>
curIdx++
<span class="hljs-keyword">let</span> ct2 = <span class="hljs-title class_">Date</span>.<span class="hljs-title function_">now</span>()
<span class="hljs-keyword">let</span> deviation = ct2 - interval - ct
<span class="hljs-keyword">if</span> (deviation &gt;= originalInterval || deviation &lt;= <span class="hljs-number">0</span>) deviation = <span class="hljs-number">5</span> <span class="hljs-comment">// 防止恶意更改本地时间</span>
ct = <span class="hljs-title class_">Date</span>.<span class="hljs-title function_">now</span>()
<span class="hljs-title function_">countdown</span>(originalInterval - deviation - (ct - ct2))
}, interval)
}
<span class="hljs-keyword">return</span> cancel
}
</code></pre>
</li>
<li>
<h5 id="iphonex-底部安全区">iphoneX 底部安全区</h5>
<pre><code class="language-css"><span class="hljs-attribute">height</span>: <span class="hljs-built_in">calc</span>(<span class="hljs-number">98</span>rpx + <span class="hljs-built_in">env</span>(safe-area-inset-bottom));
// env(safe-area-inset-<span class="hljs-attribute">bottom</span>) 放在css内 可自动计算出iPhone底部安全区高度
</code></pre>
</li>
<li>
<p>Vue 数组和对象更新,但是页面没有刷新的解决方式</p>
<pre><code class="language-js"><span class="hljs-comment">// 1. 使用全局得set方法。</span>
<span class="hljs-variable language_">this</span>.$set(<span class="hljs-variable language_">this</span>.<span class="hljs-property">todos</span>,<span class="hljs-number">0</span>,{<span class="hljs-attr">name</span>: <span class="hljs-string">&#x27;zhangsan&#x27;</span>,<span class="hljs-attr">age</span>: <span class="hljs-number">15</span>});
或者对象<span class="hljs-variable language_">this</span>.$set(<span class="hljs-variable language_">this</span>.<span class="hljs-property">obj</span>,<span class="hljs-string">&#x27;key&#x27;</span>,value);
<span class="hljs-comment">// 2. 强制更新</span>
<span class="hljs-variable language_">this</span>.$forceUpdate()
</code></pre>
</li>
<li>
<p>js原生请求 XMLHTTP请求方式</p>
<ol>
<li>
<p>get请求</p>
<pre><code class="language-js">
<span class="hljs-keyword">var</span> xhr = <span class="hljs-keyword">new</span> <span class="hljs-title class_">XMLHttpRequest</span>();
xhr.<span class="hljs-title function_">open</span>(<span class="hljs-string">&#x27;GET&#x27;</span>, <span class="hljs-string">&quot;http://ipinfo.io/json&quot;</span>, <span class="hljs-literal">true</span>);
xhr.<span class="hljs-title function_">send</span>();
xhr.<span class="hljs-property">onreadystatechange</span> = processRequest;
<span class="hljs-keyword">function</span> <span class="hljs-title function_">processRequest</span>(<span class="hljs-params">e</span>) {
<span class="hljs-keyword">if</span> (xhr.<span class="hljs-property">readyState</span> == <span class="hljs-number">4</span> &amp;&amp; xhr.<span class="hljs-property">status</span> == <span class="hljs-number">200</span>) {
<span class="hljs-keyword">var</span> response = <span class="hljs-title class_">JSON</span>.<span class="hljs-title function_">parse</span>(xhr.<span class="hljs-property">responseText</span>);
<span class="hljs-title function_">alert</span>(response.<span class="hljs-property">ip</span>);
}
</code></pre>
</li>
<li>
<p>post请求</p>
<pre><code>// (1) 获取 XMLHttpRequest对象
xmlHttp = new XMLHttpRequest();
// (2) 连接服务器
// 接口 https://shanghu.zhongyigames.com/api/order/getDeliveryMap
// 参数 order_no: O2022012214482073058 token: api utoken: f4a02406970c9b11c7dcd6478f69fe70
let data = {
order_no: 'O2022012214482073058',
token: 'api',
utoken: 'f4a02406970c9b11c7dcd6478f69fe70'
}
// post
xmlHttp.open(&quot;post&quot;,&quot;https://shanghu.zhongyigames.com/api/order/getDeliveryMap&quot;);
// 设置请求头的Content-Type
var ele_csrf=document.getElementsByName(&quot;csrfmiddlewaretoken&quot;)[0];
xmlHttp.setRequestHeader(&quot;Content-Type&quot;,&quot;application/json&quot;);
// (3) 发送数据
xmlHttp.send(JSON.stringify(data)) ; // 请求体数据
var response;
// (4) 回调函数 success
xmlHttp.onreadystatechange = function() {
if(xmlHttp.readyState == 4 &amp;&amp; this.status==200){
let responseText = this.responseText;
}
};
</code></pre>
<pre><code class="language-js"> <span class="hljs-keyword">var</span> xhr = <span class="hljs-keyword">new</span> <span class="hljs-title class_">XMLHttpRequest</span>();
xhr.<span class="hljs-property">onreadystatechange</span> = <span class="hljs-keyword">function</span> (<span class="hljs-params"></span>) {
<span class="hljs-keyword">if</span> (xhr.<span class="hljs-property">readyState</span> == <span class="hljs-number">4</span> &amp;&amp; xhr.<span class="hljs-property">status</span> == <span class="hljs-number">200</span>) {
<span class="hljs-variable language_">console</span>.<span class="hljs-title function_">log</span>(xhr.<span class="hljs-property">responseText</span>);
}
};
xhr.<span class="hljs-title function_">open</span>(<span class="hljs-string">&#x27;post&#x27;</span>, gDatagridUrl, <span class="hljs-literal">true</span>);
xhr.<span class="hljs-title function_">setRequestHeader</span>(<span class="hljs-string">&quot;Authorization&quot;</span>, sessionStorage.<span class="hljs-title function_">getItem</span>(<span class="hljs-string">&quot;token&quot;</span>));
xhr.<span class="hljs-title function_">setRequestHeader</span>(<span class="hljs-string">&quot;Content-Type&quot;</span>, <span class="hljs-string">&quot;application/json&quot;</span>);
xhr.<span class="hljs-title function_">setRequestHeader</span>(<span class="hljs-string">&quot;Accept&quot;</span>, <span class="hljs-string">&quot;application/json&quot;</span>);
<span class="hljs-comment">// xhr.onload = function () {</span>
<span class="hljs-comment">// if (this.status == 200) {</span>
<span class="hljs-comment">// var res = this.response;</span>
<span class="hljs-comment">// console.log(res)</span>
<span class="hljs-comment">// }</span>
<span class="hljs-comment">// };</span>
xhr.<span class="hljs-title function_">send</span>();
</code></pre>
</li>
</ol>
</li>
<li>
<p>原生JS实现Ajax请求 <a href="https://zhuanlan.zhihu.com/p/64167474">https://zhuanlan.zhihu.com/p/64167474</a></p>
<ol>
<li>
<p><strong>利用jQuery实现ajax方法</strong></p>
<pre><code class="language-js">$.<span class="hljs-title function_">ajax</span>({
<span class="hljs-attr">url</span>: ,
<span class="hljs-attr">type</span>: <span class="hljs-string">&#x27;&#x27;</span>,
<span class="hljs-attr">dataType</span>: <span class="hljs-string">&#x27;&#x27;</span>,
<span class="hljs-attr">data</span>: {
},
<span class="hljs-attr">success</span>: <span class="hljs-keyword">function</span>(<span class="hljs-params"></span>){
},
<span class="hljs-attr">error</span>: <span class="hljs-keyword">function</span>(<span class="hljs-params"></span>){
}
})
</code></pre>
</li>
<li>
<p>利用原生JavaScript实现ajax请求</p>
<pre><code class="language-js"><span class="hljs-keyword">var</span> <span class="hljs-title class_">Ajax</span>={
<span class="hljs-attr">get</span>: <span class="hljs-keyword">function</span>(<span class="hljs-params">url, fn</span>) {
<span class="hljs-comment">// XMLHttpRequest对象用于在后台与服务器交换数据 </span>
<span class="hljs-keyword">var</span> xhr = <span class="hljs-keyword">new</span> <span class="hljs-title class_">XMLHttpRequest</span>();
xhr.<span class="hljs-title function_">open</span>(<span class="hljs-string">&#x27;GET&#x27;</span>, url, <span class="hljs-literal">true</span>);
xhr.<span class="hljs-property">onreadystatechange</span> = <span class="hljs-keyword">function</span>(<span class="hljs-params"></span>) {
<span class="hljs-comment">// readyState == 4说明请求已完成</span>
<span class="hljs-keyword">if</span> (xhr.<span class="hljs-property">readyState</span> == <span class="hljs-number">4</span> &amp;&amp; xhr.<span class="hljs-property">status</span> == <span class="hljs-number">200</span> || xhr.<span class="hljs-property">status</span> == <span class="hljs-number">304</span>) {
<span class="hljs-comment">// 从服务器获得数据 </span>
fn.<span class="hljs-title function_">call</span>(<span class="hljs-variable language_">this</span>, xhr.<span class="hljs-property">responseText</span>);
}
};
xhr.<span class="hljs-title function_">send</span>();
},
<span class="hljs-comment">// datat应为&#x27;a=a1&amp;b=b1&#x27;这种字符串格式,在jq里如果data为对象会自动将对象转成这种字符串格式</span>
<span class="hljs-attr">post</span>: <span class="hljs-keyword">function</span> (<span class="hljs-params">url, data, fn</span>) {
<span class="hljs-keyword">var</span> xhr = <span class="hljs-keyword">new</span> <span class="hljs-title class_">XMLHttpRequest</span>();
xhr.<span class="hljs-title function_">open</span>(<span class="hljs-string">&quot;POST&quot;</span>, url, <span class="hljs-literal">true</span>);
<span class="hljs-comment">// 添加http头,发送信息至服务器时内容编码类型</span>
xhr.<span class="hljs-title function_">setRequestHeader</span>(<span class="hljs-string">&quot;Content-Type&quot;</span>, <span class="hljs-string">&quot;application/x-www-form-urlencoded&quot;</span>);
xhr.<span class="hljs-property">onreadystatechange</span> = <span class="hljs-keyword">function</span>(<span class="hljs-params"></span>) {
<span class="hljs-keyword">if</span> (xhr.<span class="hljs-property">readyState</span> == <span class="hljs-number">4</span> &amp;&amp; (xhr.<span class="hljs-property">status</span> == <span class="hljs-number">200</span> || xhr.<span class="hljs-property">status</span> == <span class="hljs-number">304</span>)) {
fn.<span class="hljs-title function_">call</span>(<span class="hljs-variable language_">this</span>, xhr.<span class="hljs-property">responseText</span>);
}
};
xhr.<span class="hljs-title function_">send</span>(data);
}
}
</code></pre>
<ol>
<li>
<p><strong>open(method, url, async) 方法需要三个参数:</strong></p>
<p>method:发送请求所使用的方法(GET或POST);与POST相比,GET更简单也更快,并且在大部分情况下都能用;然而,在以下情况中,请使用POST请求:</p>
<ul>
<li>
<p>无法使用缓存文件(更新服务器上的文件或数据库)</p>
</li>
<li>
<p>向服务器发送大量数据(POST 没有数据量限制)</p>
</li>
<li>
<p>发送包含未知字符的用户输入时,POST 比 GET 更稳定也更可靠</p>
</li>
</ul>
<p>url:规定服务器端脚本的 URL(该文件可以是任何类型的文件,比如 .txt 和 .xml,或者服务器脚本文件,比如 .asp 和 .php (在传回响应之前,能够在服务器上执行任务));</p>
<p>async:规定应当对请求进行异步(true)或同步(false)处理;true是在等待服务器响应时执行其他脚本,当响应就绪后对响应进行处理;false是等待服务器响应再执行。</p>
</li>
<li>
<p><strong>send() 方法可将请求送往服务器。</strong></p>
</li>
<li>
<p><strong>onreadystatechange:存有处理服务器响应的函数,每当 readyState 改变时,onreadystatechange 函数就会被执行。</strong></p>
</li>
<li>
<p><strong>readyState:存有服务器响应的状态信息。(更加具体的状态码信息可自行百度)</strong></p>
<ul>
<li>0: 请求未初始化(代理被创建,但尚未调用 open() 方法)</li>
<li>1: 服务器连接已建立(<code>open</code>方法已经被调用)</li>
<li>2: 请求已接收(<code>send</code>方法已经被调用,并且头部和状态已经可获得)</li>
<li>3: 请求处理中(下载中,<code>responseText</code> 属性已经包含部分数据)</li>
<li>4: 请求已完成,且响应已就绪(下载操作已完成)</li>
</ul>
</li>
<li>
<p><strong>responseText:获得字符串形式的响应数据</strong></p>
</li>
<li>
<p><strong>setRequestHeader():POST传数据时,用来添加 HTTP 头,然后send(data),注意data格式;GET发送信息时直接加参数到url上就可以,比如url?a=a1&amp;b=b1</strong></p>
</li>
</ol>
</li>
</ol>
</li>
<li>
<p>js原生复制方法</p>
<pre><code class="language-js"><span class="hljs-keyword">let</span> copy = <span class="hljs-variable language_">document</span>.<span class="hljs-title function_">querySelector</span>(<span class="hljs-string">&#x27;.copyCode&#x27;</span>);
copy.<span class="hljs-property">onclick</span> = <span class="hljs-keyword">function</span>(<span class="hljs-params"></span>){
<span class="hljs-variable language_">console</span>.<span class="hljs-title function_">log</span>(<span class="hljs-string">&#x27;点击复制&#x27;</span>);
<span class="hljs-keyword">var</span> copyTest = <span class="hljs-variable language_">document</span>.<span class="hljs-title function_">getElementById</span>(<span class="hljs-string">&quot;expressCode&quot;</span>).<span class="hljs-property">innerText</span>;
<span class="hljs-keyword">var</span> inputTest = <span class="hljs-variable language_">document</span>.<span class="hljs-title function_">createElement</span>(<span class="hljs-string">&#x27;input&#x27;</span>);
inputTest.<span class="hljs-property">value</span> = copyTest;
<span class="hljs-variable language_">document</span>.<span class="hljs-property">body</span>.<span class="hljs-title function_">appendChild</span>(inputTest);
inputTest.<span class="hljs-title function_">select</span>();
<span class="hljs-variable language_">document</span>.<span class="hljs-title function_">execCommand</span>(<span class="hljs-string">&quot;Copy&quot;</span>);
inputTest.<span class="hljs-title function_">setAttribute</span>(<span class="hljs-string">&#x27;readonly&#x27;</span>, <span class="hljs-string">&#x27;readonly&#x27;</span>);
inputTest.<span class="hljs-property">style</span>.<span class="hljs-property">display</span> = <span class="hljs-string">&#x27;none&#x27;</span>;
<span class="hljs-title function_">alert</span>(<span class="hljs-string">&#x27;复制成功&#x27;</span>);
};
</code></pre>
</li>
<li>
<p>uniapp获取用户授权的权限</p>
<pre><code class="language-js"><span class="hljs-comment">// 监听用户是否确认了授权登录</span>
<span class="hljs-title function_">addEventAuth</span>(<span class="hljs-params"></span>){
<span class="hljs-keyword">let</span> that = <span class="hljs-variable language_">this</span>;
<span class="hljs-built_in">setTimeout</span>(<span class="hljs-keyword">function</span>(<span class="hljs-params"></span>){
<span class="hljs-comment">/** 获取权限
* res.authSetting[&#x27;scope.userLocation&#x27;] == undefined 表示 初始化进入该页面
res.authSetting[&#x27;scope.userLocation&#x27;] == false 表示 非初始化进入该页面,且未授权
res.authSetting[&#x27;scope.userLocation&#x27;] == true 表示 地理位置授权*/</span>
uni.<span class="hljs-title function_">getSetting</span>({
<span class="hljs-attr">success</span>: <span class="hljs-function">(<span class="hljs-params">res</span>) =&gt;</span> {
<span class="hljs-variable language_">console</span>.<span class="hljs-title function_">log</span>(res,<span class="hljs-title class_">JSON</span>.<span class="hljs-title function_">stringify</span>(res,<span class="hljs-string">&#x27;getSetting&#x27;</span>))
<span class="hljs-keyword">if</span> (res.<span class="hljs-property">authSetting</span>[<span class="hljs-string">&#x27;scope.userLocation&#x27;</span>] != <span class="hljs-literal">undefined</span> &amp;&amp; res.<span class="hljs-property">authSetting</span>[<span class="hljs-string">&#x27;scope.userLocation&#x27;</span>] != <span class="hljs-literal">true</span>) {
uni.<span class="hljs-title function_">showModal</span>({
<span class="hljs-attr">title</span>: <span class="hljs-string">&#x27;请求授权当前位置&#x27;</span>,
<span class="hljs-attr">content</span>: <span class="hljs-string">&#x27;需要获取您的地理位置,请确认授权&#x27;</span>,
<span class="hljs-attr">success</span>: <span class="hljs-keyword">function</span> (<span class="hljs-params">res</span>) {
<span class="hljs-keyword">if</span> (res.<span class="hljs-property">cancel</span>) {
uni.<span class="hljs-title function_">showToast</span>({<span class="hljs-attr">title</span>: <span class="hljs-string">&#x27;拒绝授权&#x27;</span>,<span class="hljs-attr">icon</span>: <span class="hljs-string">&#x27;none&#x27;</span>})
} <span class="hljs-keyword">else</span> <span class="hljs-keyword">if</span> (res.<span class="hljs-property">confirm</span>) {
uni.<span class="hljs-title function_">openSetting</span>({
<span class="hljs-attr">success</span>: <span class="hljs-keyword">function</span> (<span class="hljs-params">dataAu</span>) {
<span class="hljs-variable language_">console</span>.<span class="hljs-title function_">log</span>(dataAu,<span class="hljs-string">&#x27;openSetting&#x27;</span>)
<span class="hljs-keyword">if</span> (dataAu.<span class="hljs-property">authSetting</span>[<span class="hljs-string">&quot;scope.userLocation&quot;</span>] == <span class="hljs-literal">true</span>) {
uni.<span class="hljs-title function_">showToast</span>({<span class="hljs-attr">title</span>: <span class="hljs-string">&#x27;授权成功&#x27;</span>,<span class="hljs-attr">icon</span>: <span class="hljs-string">&#x27;none&#x27;</span>})
that.<span class="hljs-title function_">onshowFunction</span>()
<span class="hljs-comment">//再次授权,调用wx.getLocation的API</span>
<span class="hljs-comment">// vm.getLocation();</span>
} <span class="hljs-keyword">else</span> {
uni.<span class="hljs-title function_">showToast</span>({<span class="hljs-attr">title</span>: <span class="hljs-string">&#x27;授权失败&#x27;</span>,<span class="hljs-attr">icon</span>: <span class="hljs-string">&#x27;none&#x27;</span>,})
}
}
})
}
}
})
} <span class="hljs-keyword">else</span> <span class="hljs-keyword">if</span> (res.<span class="hljs-property">authSetting</span>[<span class="hljs-string">&#x27;scope.userLocation&#x27;</span>] == <span class="hljs-literal">undefined</span>) {
<span class="hljs-comment">//调用wx.getLocation的API</span>
<span class="hljs-variable language_">console</span>.<span class="hljs-title function_">log</span>(<span class="hljs-string">&#x27;首次授权&#x27;</span>);
that.<span class="hljs-title function_">addEventAuth</span>(); <span class="hljs-comment">// 重新调用onShow中的方法</span>
}<span class="hljs-keyword">else</span> {
<span class="hljs-comment">//调用wx.getLocation的API</span>
<span class="hljs-variable language_">console</span>.<span class="hljs-title function_">log</span>(<span class="hljs-string">&#x27;调用wx.getLocation的API&#x27;</span>)
that.<span class="hljs-title function_">onshowFunction</span>()
}
},
<span class="hljs-title function_">complete</span>(<span class="hljs-params"></span>) {
<span class="hljs-variable language_">console</span>.<span class="hljs-title function_">log</span>(<span class="hljs-string">&#x27;getSetting&#x27;</span>)
}
})
},<span class="hljs-number">2000</span>)
},
</code></pre>
</li>
<li>
<p>css3渐变</p>
<ol>
<li>
<p>背景渐变</p>
<pre><code class="language-css"><span class="hljs-selector-class">.box</span>{
<span class="hljs-attribute">width</span>: <span class="hljs-number">200px</span>;
<span class="hljs-attribute">height</span>: <span class="hljs-number">200px</span>;
<span class="hljs-attribute">background-image</span>: <span class="hljs-built_in">linear-gradient</span>(to right, red, blue);
}
</code></pre>
</li>
<li>
<p>边框渐变</p>
<pre><code class="language-css"><span class="hljs-selector-class">.box</span>{
<span class="hljs-attribute">width</span>: <span class="hljs-number">100px</span>;
<span class="hljs-attribute">height</span>: <span class="hljs-number">100px</span>;
<span class="hljs-attribute">border</span>:<span class="hljs-number">10px</span> solid <span class="hljs-number">#ddd</span>;
<span class="hljs-attribute">border-image</span>: <span class="hljs-built_in">-webkit-linear-gradient</span>(<span class="hljs-number">#F80</span>, <span class="hljs-number">#2ED</span>) <span class="hljs-number">20</span> <span class="hljs-number">20</span>;
<span class="hljs-attribute">border-image</span>: <span class="hljs-built_in">-moz-linear-gradient</span>(<span class="hljs-number">#F80</span>, <span class="hljs-number">#2ED</span>) <span class="hljs-number">20</span> <span class="hljs-number">20</span>;
<span class="hljs-attribute">border-image</span>: <span class="hljs-built_in">-o-linear-gradient</span>(<span class="hljs-number">#F80</span>, <span class="hljs-number">#2ED</span>) <span class="hljs-number">20</span> <span class="hljs-number">20</span>;
<span class="hljs-attribute">border-image</span>: <span class="hljs-built_in">linear-gradient</span>(<span class="hljs-number">#F80</span>, <span class="hljs-number">#2ED</span>) <span class="hljs-number">20</span> <span class="hljs-number">20</span>;
}
</code></pre>
</li>
<li>
<p>文字渐变</p>
<pre><code class="language-html"><span class="hljs-tag">&lt;<span class="hljs-name">div</span> <span class="hljs-attr">class</span>=<span class="hljs-string">&quot;gradient1&quot;</span>&gt;</span>
<span class="hljs-tag">&lt;<span class="hljs-name">span</span>&gt;</span>渐变1 - 菜鸟工具<span class="hljs-tag">&lt;/<span class="hljs-name">span</span>&gt;</span>
<span class="hljs-tag">&lt;/<span class="hljs-name">div</span>&gt;</span>
<span class="hljs-tag">&lt;<span class="hljs-name">h2</span> <span class="hljs-attr">class</span>=<span class="hljs-string">&quot;text-gradient&quot;</span> <span class="hljs-attr">data-text</span>=<span class="hljs-string">&quot;渐变2 - 菜鸟工具&quot;</span>&gt;</span>渐变2 - 菜鸟工具<span class="hljs-tag">&lt;/<span class="hljs-name">h2</span>&gt;</span>
</code></pre>
<pre><code class="language-css"><span class="hljs-selector-class">.gradient1</span> <span class="hljs-selector-tag">span</span> {
<span class="hljs-attribute">background</span>: <span class="hljs-built_in">linear-gradient</span>(to right, red, blue);
-webkit-<span class="hljs-attribute">background-clip</span>: text;
<span class="hljs-attribute">color</span>: transparent;
}
<span class="hljs-selector-class">.text-gradient</span> {
<span class="hljs-attribute">display</span>: inline-block;
<span class="hljs-attribute">font-family</span>: <span class="hljs-string">&#x27;微软雅黑&#x27;</span>;
<span class="hljs-attribute">font-size</span>: <span class="hljs-number">2em</span>;
<span class="hljs-attribute">position</span>: relative;
}
<span class="hljs-selector-class">.text-gradient</span><span class="hljs-selector-attr">[data-text]</span><span class="hljs-selector-pseudo">::after</span> {
<span class="hljs-attribute">content</span>: <span class="hljs-built_in">attr</span>(data-text);
<span class="hljs-attribute">color</span>: green;
<span class="hljs-attribute">position</span>: absolute;
<span class="hljs-attribute">left</span>: <span class="hljs-number">0</span>;
<span class="hljs-attribute">z-index</span>: <span class="hljs-number">2</span>;
-webkit-<span class="hljs-attribute">mask-image</span>: <span class="hljs-built_in">-webkit-gradient</span>(linear, <span class="hljs-number">0</span> <span class="hljs-number">0</span>, <span class="hljs-number">0</span> bottom, <span class="hljs-built_in">from</span>(<span class="hljs-number">#ff0000</span>), <span class="hljs-built_in">to</span>(<span class="hljs-built_in">rgba</span>(<span class="hljs-number">0</span>, <span class="hljs-number">0</span>, <span class="hljs-number">255</span>, <span class="hljs-number">0</span>)));
}
</code></pre>
</li>
</ol>
</li>
<li>
<p>小程序/uniapp返回上一页携带参数</p>
<ol>
<li>
<p>方法一:</p>
<pre><code class="language-js"><span class="hljs-comment">// pages/pre/pre.vue</span>
<span class="hljs-title function_">onShow</span>(<span class="hljs-params"></span>) {
<span class="hljs-keyword">let</span> that = <span class="hljs-variable language_">this</span>
uni.$on(<span class="hljs-string">&#x27;updateData&#x27;</span>,<span class="hljs-keyword">function</span>(<span class="hljs-params">data</span>){
that.<span class="hljs-property">testdata</span> = data
<span class="hljs-keyword">const</span> params = <span class="hljs-string">&#x27;id:&#x27;</span>+data.<span class="hljs-property">id</span>+<span class="hljs-string">&#x27;, name:&#x27;</span>+data.<span class="hljs-property">name</span>;
<span class="hljs-variable language_">console</span>.<span class="hljs-title function_">log</span>(<span class="hljs-string">&#x27;监听到事件来自 updateData ,携带参数为:&#x27;</span> + params);
})
},
<span class="hljs-comment">// pages/next/next.vue</span>
<span class="hljs-title function_">data</span>(<span class="hljs-params"></span>) {
<span class="hljs-keyword">return</span> {
<span class="hljs-attr">mydata</span>: {
<span class="hljs-attr">id</span>: <span class="hljs-number">1</span>,
<span class="hljs-attr">name</span>: <span class="hljs-string">&#x27;test&#x27;</span>
}
}
},
<span class="hljs-attr">methods</span>: {
<span class="hljs-title function_">goBack</span>(<span class="hljs-params"></span>) {
uni.$emit(<span class="hljs-string">&#x27;updateData&#x27;</span>, <span class="hljs-variable language_">this</span>.<span class="hljs-property">mydata</span>)
uni.<span class="hljs-title function_">navigateBack</span>({
<span class="hljs-attr">delta</span>: <span class="hljs-number">1</span>
})
}
}
</code></pre>
</li>
<li>
<p>方法二:</p>
<pre><code class="language-js"><span class="hljs-comment">// pages/pre/pre.vue</span>
<span class="hljs-title function_">onShow</span>(<span class="hljs-params"></span>) {
<span class="hljs-keyword">let</span> pages = <span class="hljs-title function_">getCurrentPages</span>();
<span class="hljs-keyword">let</span> currPage = pages[pages.<span class="hljs-property">length</span> - <span class="hljs-number">1</span>]; <span class="hljs-comment">//当前页面</span>
<span class="hljs-keyword">let</span> json = currPage.<span class="hljs-property">data</span>.<span class="hljs-property">testdata</span>;
<span class="hljs-variable language_">this</span>.<span class="hljs-property">testdata</span> = json;
}
<span class="hljs-comment">// pages/next/next.vue</span>
<span class="hljs-title function_">data</span>(<span class="hljs-params"></span>) {
<span class="hljs-keyword">return</span> {
<span class="hljs-attr">mydata</span>: {
<span class="hljs-attr">id</span>: <span class="hljs-number">1</span>,
<span class="hljs-attr">name</span>: <span class="hljs-string">&#x27;test&#x27;</span>
}
}
},
<span class="hljs-attr">methods</span>: {
<span class="hljs-title function_">goBack</span>(<span class="hljs-params"></span>) {
<span class="hljs-keyword">var</span> pages = <span class="hljs-title function_">getCurrentPages</span>();
<span class="hljs-keyword">var</span> prevPage = pages[pages.<span class="hljs-property">length</span> - <span class="hljs-number">2</span>];
<span class="hljs-comment">// #ifdef H5</span>
prevPage.<span class="hljs-property">$vm</span>.<span class="hljs-property">testdata</span> = <span class="hljs-variable language_">this</span>.<span class="hljs-property">mydata</span>;
<span class="hljs-comment">// #endif</span>
<span class="hljs-comment">// #ifdef MP-WEIXIN</span>
prevPage.<span class="hljs-title function_">setData</span>(<span class="hljs-variable language_">this</span>.<span class="hljs-property">mydata</span>);
<span class="hljs-comment">// #endif</span>
uni.<span class="hljs-title function_">navigateBack</span>({<span class="hljs-comment">//返回</span>
<span class="hljs-attr">delta</span>: <span class="hljs-number">1</span>
})
}
}
</code></pre>
</li>
</ol>
</li>
<li>
<p>arrayBuffer转16进制字符串数组</p>
<pre><code class="language-js"><span class="hljs-keyword">const</span> <span class="hljs-title function_">ab2hex</span> = (<span class="hljs-params">buffer</span>) =&gt; {
<span class="hljs-keyword">return</span> <span class="hljs-title class_">Array</span>.<span class="hljs-property"><span class="hljs-keyword">prototype</span></span>.<span class="hljs-property">map</span>.<span class="hljs-title function_">call</span>(<span class="hljs-keyword">new</span> <span class="hljs-title class_">Uint8Array</span>(buffer), <span class="hljs-function"><span class="hljs-params">x</span> =&gt;</span> (<span class="hljs-string">&#x27;00&#x27;</span> + x.<span class="hljs-title function_">toString</span>(<span class="hljs-number">16</span>)).<span class="hljs-title function_">slice</span>(-<span class="hljs-number">2</span>))
}
<span class="hljs-comment">// ArrayBuffer转16进度字符串示例</span>
<span class="hljs-keyword">function</span> <span class="hljs-title function_">ab2hex</span>(<span class="hljs-params">buffer</span>) {
<span class="hljs-keyword">const</span> hexArr = <span class="hljs-title class_">Array</span>.<span class="hljs-property"><span class="hljs-keyword">prototype</span></span>.<span class="hljs-property">map</span>.<span class="hljs-title function_">call</span>(
<span class="hljs-keyword">new</span> <span class="hljs-title class_">Uint8Array</span>(buffer),
<span class="hljs-keyword">function</span> (<span class="hljs-params">bit</span>) {
<span class="hljs-keyword">return</span> (<span class="hljs-string">&#x27;00&#x27;</span> + bit.<span class="hljs-title function_">toString</span>(<span class="hljs-number">16</span>)).<span class="hljs-title function_">slice</span>(-<span class="hljs-number">2</span>)
}
)
<span class="hljs-keyword">return</span> hexArr.<span class="hljs-title function_">join</span>(<span class="hljs-string">&#x27;&#x27;</span>)
}
</code></pre>
</li>
<li>
<p>hex to bytes</p>
<pre><code class="language-js"><span class="hljs-keyword">const</span> <span class="hljs-title function_">hex2Bytes</span> = (<span class="hljs-params">arr</span>) =&gt; {
<span class="hljs-keyword">return</span> arr.<span class="hljs-title function_">map</span>(<span class="hljs-function">(<span class="hljs-params">item</span>) =&gt;</span> {
<span class="hljs-keyword">return</span> <span class="hljs-built_in">parseInt</span>(item, <span class="hljs-number">16</span>)
})
}
</code></pre>
</li>
<li>
<p>对象与数组的互转</p>
<ol>
<li>
<p>对象转数组</p>
<p><strong>1.Object.keys(obj)</strong></p>
<pre><code class="language-js"><span class="hljs-keyword">let</span> str = {
name : <span class="hljs-string">&quot;张三&quot;</span>,
age : <span class="hljs-string">&quot;18&quot;</span>,
gender : <span class="hljs-string">&quot;女&quot;</span>
}
<span class="hljs-title class_">Object</span>.<span class="hljs-title function_">keys</span>(str) <span class="hljs-comment">//返回成 [&quot;name&quot;,&quot;age&quot;,&quot;gender&quot;]</span>
</code></pre>
<p><strong>2.Object.values(obj)</strong></p>
<pre><code class="language-js"><span class="hljs-keyword">let</span> str = {
name : <span class="hljs-string">&quot;张三&quot;</span>,
age : <span class="hljs-string">&quot;18&quot;</span>,
gender : <span class="hljs-string">&quot;女&quot;</span>
}
<span class="hljs-title class_">Object</span>.<span class="hljs-title function_">values</span>(str) <span class="hljs-comment">//返回成 [&quot;张三&quot;,&quot;18&quot;,&quot;女&quot;]</span>
</code></pre>
<p><strong>3.Object.entries(obj)</strong></p>
<pre><code class="language-js"><span class="hljs-keyword">let</span> str = {
name : <span class="hljs-string">&quot;张三&quot;</span>,
age : <span class="hljs-string">&quot;18&quot;</span>,
gender : <span class="hljs-string">&quot;女&quot;</span>
}
<span class="hljs-title class_">Object</span>.<span class="hljs-title function_">entries</span>(str) <span class="hljs-comment">//返回成 [[&quot;name&quot;,&quot;张三&quot;],[&quot;age&quot;,&quot;18&quot;],[&quot;gender&quot;,&quot;女&quot;]]</span>
</code></pre>
</li>
<li>
<p>数组转对象</p>
<ol>
<li>
<pre><code class="language-js"> <span class="hljs-comment">//数组转对象</span>
<span class="hljs-keyword">const</span> arr = [<span class="hljs-string">&#x27;a&#x27;</span>, <span class="hljs-string">&#x27;b&#x27;</span>, <span class="hljs-string">&#x27;c&#x27;</span>]
<span class="hljs-keyword">const</span> arrObj = { ...arr }
<span class="hljs-variable language_">console</span>.<span class="hljs-title function_">log</span>(arrObj) <span class="hljs-comment">//{0:&#x27;a&#x27;, 1:&#x27;b&#x27;, 2:&#x27;c&#x27;}</span>
</code></pre>
</li>
</ol>
</li>
</ol>
</li>
<li>
<p>使用Git从gitee仓库中,只下载其中的某单个的文件夹</p>
<ol>
<li>
<p>初始化命令</p>
<pre><code>git init
</code></pre>
</li>
<li>
<p>设置允许克隆子目录</p>
<pre><code>git config core.sparsecheckout true
</code></pre>
</li>
<li>
<p>设置要克隆仓库的子目录路径</p>
<pre><code>echo 'other*' &gt;&gt; .git/info/sparse-checkout
注意:空格不能漏 ,'other' 替换成自己要下载的文件名
*代表所有
</code></pre>
</li>
<li>
<p>换成要克隆项目和目标仓库的地址</p>
<pre><code>git remote add bird 仓库地址
</code></pre>
</li>
<li>
<p>下载</p>
<pre><code>git pull bird master
</code></pre>
</li>
<li>
<p>流程路</p>
<p><img src="file:///d:\Desktop\demo\杂物\C:%5CUsers%5CGSTORM%5CAppData%5CRoaming%5CTypora%5Ctypora-user-images%5Cimage-20220728145356908.png" alt="image-20220728145356908"></p>
</li>
</ol>
</li>
<li>
<p>rich-text富文本显示的图片宽度过宽问题</p>
<pre><code class="language-css"><span class="hljs-selector-attr">[alt]</span>{
<span class="hljs-attribute">max-width</span>:<span class="hljs-number">100%</span>;
}
文档链接: https://blog.csdn.net/weixin_40548203/article/details/<span class="hljs-number">125328639</span>
</code></pre>
</li>
<li>
<p>页面防抖操作 vue版</p>
<ol>
<li>
<p>在根目录下创建common文件并新建common.js,</p>
<pre><code class="language-js"> <span class="hljs-comment">// 防止处理多次点击</span>
<span class="hljs-keyword">function</span> <span class="hljs-title function_">noMultipleClicks</span>(<span class="hljs-params">methods, info</span>) {
<span class="hljs-comment">// methods是需要点击后需要执行的函数, info是点击需要传的参数</span>
<span class="hljs-keyword">let</span> that = <span class="hljs-variable language_">this</span>;
<span class="hljs-keyword">if</span> (that.<span class="hljs-property">noClick</span>) {
<span class="hljs-comment">// 第一次点击</span>
that.<span class="hljs-property">noClick</span>= <span class="hljs-literal">false</span>;
<span class="hljs-keyword">if</span>(info &amp;&amp; info !== <span class="hljs-string">&#x27;&#x27;</span>) {
<span class="hljs-comment">// info是执行函数需要传的参数</span>
<span class="hljs-title function_">methods</span>(info);
} <span class="hljs-keyword">else</span> {
<span class="hljs-title function_">methods</span>();
}
<span class="hljs-built_in">setTimeout</span>(<span class="hljs-function">()=&gt;</span> {
that.<span class="hljs-property">noClick</span>= <span class="hljs-literal">true</span>;
}, <span class="hljs-number">2000</span>)
} <span class="hljs-keyword">else</span> {
<span class="hljs-comment">// 这里是重复点击的判断</span>
}
}
<span class="hljs-comment">//导出</span>
<span class="hljs-keyword">export</span> <span class="hljs-keyword">default</span> {
noMultipleClicks,<span class="hljs-comment">//禁止多次点击</span>
}
</code></pre>
</li>
<li>
<p>main.js内导入</p>
<pre><code class="language-js"> <span class="hljs-comment">//配置公共方法</span>
<span class="hljs-keyword">import</span> common <span class="hljs-keyword">from</span> <span class="hljs-string">&#x27;./common/common.js&#x27;</span>
<span class="hljs-title class_">Vue</span>.<span class="hljs-property"><span class="hljs-keyword">prototype</span></span>.<span class="hljs-property">$noMultipleClicks</span> = common.<span class="hljs-property">noMultipleClicks</span>;
</code></pre>
</li>
<li>
<p>页面中引用</p>
<ol>
<li>
<p>不携带参数</p>
<pre><code class="language-js"> <span class="hljs-comment">//记得在data中挂载 noClick:true</span>
<span class="hljs-title function_">data</span>(<span class="hljs-params"></span>) {
<span class="hljs-keyword">return</span> {
<span class="hljs-attr">noClick</span>:<span class="hljs-literal">true</span>,
}
},
<span class="language-xml"><span class="hljs-tag">&lt;<span class="hljs-name">view</span> <span class="hljs-attr">class</span>=<span class="hljs-string">&quot;bottom-btn-box&quot;</span>&gt;</span>
<span class="hljs-tag">&lt;<span class="hljs-name">view</span> <span class="hljs-attr">class</span>=<span class="hljs-string">&quot;submit-btn&quot;</span> @<span class="hljs-attr">click</span>=<span class="hljs-string">&quot;$noMultipleClicks(commitWork)&quot;</span>&gt;</span>提交<span class="hljs-tag">&lt;/<span class="hljs-name">view</span>&gt;</span>
<span class="hljs-tag">&lt;/<span class="hljs-name">view</span>&gt;</span></span>
<span class="hljs-attr">methods</span>:{
<span class="hljs-title function_">commitWork</span>(<span class="hljs-params"></span>){
<span class="hljs-comment">//balabala</span>
}
}
</code></pre>
</li>
<li>
<p>携带参数</p>
<pre><code class="language-js"> <span class="hljs-comment">//记得在data中挂载 noClick:true</span>
<span class="hljs-title function_">data</span>(<span class="hljs-params"></span>) {
<span class="hljs-keyword">return</span> {
<span class="hljs-attr">noClick</span>:<span class="hljs-literal">true</span>,
}
},
<span class="language-xml"><span class="hljs-tag">&lt;<span class="hljs-name">view</span> <span class="hljs-attr">class</span>=<span class="hljs-string">&quot;bottom-btn-box&quot;</span>&gt;</span>
<span class="hljs-tag">&lt;<span class="hljs-name">view</span> <span class="hljs-attr">class</span>=<span class="hljs-string">&quot;pay&quot;</span> @<span class="hljs-attr">click.stop</span>=<span class="hljs-string">&quot;$noMultipleClicks(goPay, item)&quot;</span> &gt;</span>支付<span class="hljs-tag">&lt;/<span class="hljs-name">view</span>&gt;</span>
<span class="hljs-tag">&lt;/<span class="hljs-name">view</span>&gt;</span></span>
<span class="hljs-attr">methods</span>:{
<span class="hljs-title function_">goPay</span>(<span class="hljs-params">item</span>){
<span class="hljs-comment">//balabala</span>
}
}
</code></pre>
</li>
</ol>
</li>
<li>
<p>原文链接 <a href="http://t.zoukankan.com/ly1368489670-p-14293963.html">http://t.zoukankan.com/ly1368489670-p-14293963.html</a></p>
</li>
</ol>
</li>
<li>
<p><strong>vue3全局挂载实例方法</strong></p>
<ol>
<li>
<p>main.js 全局引用</p>
<pre><code class="language-js"><span class="hljs-keyword">import</span> <span class="hljs-title class_">App</span> <span class="hljs-keyword">from</span> <span class="hljs-string">&#x27;./App&#x27;</span>
<span class="hljs-keyword">import</span> <span class="hljs-title class_">Common</span> <span class="hljs-keyword">from</span> <span class="hljs-string">&quot;./utils/common.js&quot;</span>
<span class="hljs-keyword">import</span> { createApp } <span class="hljs-keyword">from</span> <span class="hljs-string">&#x27;vue&#x27;</span>
<span class="hljs-keyword">const</span> app = <span class="hljs-title function_">createApp</span>(<span class="hljs-title class_">App</span>)
<span class="hljs-comment">// 引用</span>
app.<span class="hljs-property">config</span>.<span class="hljs-property">globalProperties</span>.<span class="hljs-property">$common</span> = <span class="hljs-title class_">Common</span>;
app.<span class="hljs-title function_">mount</span>(<span class="hljs-string">&#x27;#app&#x27;</span>)
</code></pre>
</li>
<li>
<p>页面使用</p>
<pre><code class="language-js"><span class="hljs-comment">// 方法一:</span>
<span class="hljs-keyword">import</span> { getCurrentInstance } <span class="hljs-keyword">from</span> <span class="hljs-string">&quot;vue&quot;</span> <span class="hljs-comment">// 引用 getCurrentInstance</span>
<span class="hljs-comment">// getCurrentInstance().appContext.config.globalProperties 获取全局上下文,可以解构得到 我们前面绑定的数据方法</span>
<span class="hljs-keyword">const</span> { $xxx } = <span class="hljs-title function_">getCurrentInstance</span>().<span class="hljs-property">appContext</span>.<span class="hljs-property">config</span>.<span class="hljs-property">globalProperties</span>
$xxx() <span class="hljs-comment">//直接调用方法本身</span>
<span class="hljs-comment">// 方法二:</span>
<span class="hljs-keyword">import</span> { ref, getCurrentInstance } <span class="hljs-keyword">from</span> <span class="hljs-string">&quot;vue&quot;</span>;
<span class="hljs-keyword">const</span> { proxy } = <span class="hljs-title function_">getCurrentInstance</span>();
proxy.<span class="hljs-property">$common</span>.<span class="hljs-title function_">xxx</span>();
</code></pre>
</li>
<li>
<p>使用中的问题</p>
<ol>
<li>
<p><code>proxy.$common.toast(msg);</code> 会提示错误:Property '$common' does not exist on type 'ComponentPublicInstance&gt;'</p>
</li>
<li>
<p>解决方法</p>
<ol>
<li>在sec下创建一个shims-core.d.ts文件</li>
</ol>
<pre><code class="language-js"><span class="hljs-keyword">import</span> { <span class="hljs-title class_">ComponentCustomProperties</span> } <span class="hljs-keyword">from</span> <span class="hljs-string">&quot;vue&quot;</span>;
declare <span class="hljs-variable language_">module</span> <span class="hljs-string">&quot;@vue/runtime-core&quot;</span> {
interface <span class="hljs-title class_">ComponentCustomProperties</span> {
<span class="hljs-attr">$common</span>: any,
}
}
</code></pre>
</li>
</ol>
</li>
</ol>
<p>​</p>
</li>
</ol>
<h2 id="杂记">杂记</h2>
<pre><code>1. 电影网站 https://www.zhihu.com/question/364400001
1. 电影蜜蜂
2. BT4K影院
3. 电影天堂
4. 美剧天堂
5. 红标影院
6. 美剧鸟
7. 在线之家
8. 南瓜电影
9. 片库PIANKU
10. 麻花影视
11. 5060网
12. 电影盒子
13. 小小影视
14. 奈菲影视
15. http://www.yhdmh.com/
15. http://www.yhdm8.co/
2. https://zhuanlan.zhihu.com/p/444983729
3. 网站 https://www.zhihu.com/question/385804728/answer/2406116498
4. https://www.zhihu.com/question/461131918/answer/2325111374
5. 壁纸系列
6. 必应 https://www.bingimg.cn/
7. 极简 https://bz.zzzmh.cn/index
8. 手机 https://www.3gbizhi.com/
9. 4K https://pic.netbian.com/
10. 练习网站 https://www.zhihu.com/question/392328321/answer/2404695551
11. GitHub仓库 https://zhuanlan.zhihu.com/p/465197334
12. 阿里播放器 https://gitcode.net/mirrors/slacrey/vue-aliplayer?utm_source=csdn_github_accelerator
9. vue3课程 https://juejin.cn/book/7051153166443741188?scrollMenuIndex=1
优惠券码:Fd1jtsYd 截止:2022-04-23
14. https://www.zhihu.com/question/294752032/answer/2138128900
15. 项目网站 https://juejin.cn/post/7082182576034545701
16. 整理网站 https://juejin.cn/post/7079447275755274254
17. 学习 https://www.zhihu.com/question/525349050/answer/2418172511
18. 单机手游 https://www.zhihu.com/question/25984324/answer/1681458186
19. 我也不知道是啥东西系列
20. 比对两个文件的差异性 Beyond Compare 4 (软件名称)
1. https://www.kaolamedia.com/#%E5%9C%A8%E7%BA%BF%E5%81%9A%E5%9B%BE
2. https://www.zhihu.com/question/328520841/answer/2518673780
3. https://www.zhihu.com/question/316844185/answer/762831508
4. https://www.zhihu.com/question/536858399/answer/2522946397
5. https://www.zhihu.com/question/420683278/answer/2418165995
6. https://www.zhihu.com/question/41476832/answer/2165243588
7.https://www.zhihu.com/question/534342601/answer/2501148229
油猴 https://www.baiduyun.wiki/zh-cn/windows.html#_3-4-%E6%AF%94%E7%89%B9%E5%BD%97%E6%98%9F
</code></pre>
</div>
</div>
<script async src="https://cdn.jsdelivr.net/npm/katex-copytex@latest/dist/katex-copytex.min.js"></script>
</body>
</html>
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/kaiking-1228/zawu.git
git@gitee.com:kaiking-1228/zawu.git
kaiking-1228
zawu
zawu
master

搜索帮助

0d507c66 1850385 C8b1a773 1850385