1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221622172218221922202221222222232224222522262227222822292230223122322233223422352236223722382239224022412242224322442245224622472248224922502251225222532254225522562257225822592260226122622263226422652266226722682269227022712272227322742275227622772278227922802281228222832284228522862287228822892290229122922293229422952296229722982299230023012302230323042305230623072308230923102311231223132314231523162317231823192320232123222323232423252326232723282329233023312332233323342335233623372338233923402341234223432344234523462347234823492350235123522353235423552356235723582359236023612362236323642365236623672368236923702371237223732374237523762377237823792380238123822383238423852386238723882389239023912392239323942395239623972398239924002401240224032404240524062407240824092410241124122413241424152416241724182419242024212422242324242425242624272428242924302431243224332434243524362437243824392440244124422443244424452446244724482449245024512452245324542455245624572458245924602461246224632464246524662467246824692470247124722473247424752476247724782479248024812482248324842485248624872488248924902491249224932494249524962497249824992500250125022503250425052506250725082509251025112512251325142515251625172518251925202521252225232524252525262527252825292530253125322533253425352536253725382539254025412542254325442545254625472548254925502551255225532554255525562557255825592560256125622563256425652566256725682569257025712572257325742575257625772578257925802581258225832584258525862587258825892590259125922593259425952596259725982599260026012602260326042605260626072608260926102611261226132614261526162617261826192620262126222623262426252626262726282629263026312632263326342635263626372638263926402641264226432644264526462647264826492650265126522653265426552656265726582659266026612662266326642665266626672668266926702671267226732674267526762677267826792680268126822683268426852686268726882689269026912692269326942695269626972698269927002701270227032704270527062707270827092710271127122713271427152716271727182719272027212722272327242725272627272728272927302731273227332734273527362737273827392740274127422743274427452746274727482749275027512752275327542755275627572758275927602761276227632764276527662767276827692770277127722773277427752776277727782779278027812782278327842785278627872788278927902791279227932794279527962797279827992800280128022803280428052806280728082809281028112812281328142815281628172818281928202821282228232824282528262827282828292830283128322833283428352836283728382839284028412842284328442845284628472848284928502851285228532854285528562857285828592860286128622863286428652866286728682869287028712872287328742875287628772878287928802881288228832884288528862887288828892890289128922893289428952896289728982899290029012902290329042905290629072908290929102911291229132914291529162917291829192920292129222923292429252926292729282929293029312932293329342935293629372938293929402941294229432944294529462947294829492950295129522953295429552956295729582959296029612962296329642965296629672968296929702971297229732974297529762977297829792980298129822983298429852986298729882989299029912992299329942995299629972998299930003001300230033004300530063007300830093010301130123013301430153016301730183019302030213022302330243025302630273028302930303031303230333034303530363037303830393040304130423043304430453046304730483049305030513052305330543055305630573058305930603061306230633064306530663067306830693070307130723073307430753076307730783079308030813082308330843085308630873088308930903091309230933094309530963097309830993100310131023103310431053106310731083109311031113112311331143115311631173118311931203121312231233124312531263127312831293130313131323133313431353136313731383139314031413142314331443145314631473148314931503151315231533154315531563157315831593160316131623163316431653166316731683169317031713172317331743175317631773178317931803181318231833184318531863187318831893190319131923193319431953196319731983199320032013202320332043205320632073208320932103211321232133214321532163217321832193220322132223223322432253226322732283229323032313232323332343235323632373238323932403241324232433244324532463247324832493250325132523253325432553256325732583259326032613262326332643265326632673268326932703271327232733274327532763277327832793280328132823283328432853286328732883289329032913292329332943295329632973298329933003301330233033304330533063307330833093310331133123313331433153316331733183319332033213322332333243325332633273328332933303331333233333334333533363337333833393340334133423343334433453346334733483349335033513352335333543355335633573358335933603361336233633364336533663367336833693370337133723373337433753376337733783379338033813382338333843385338633873388338933903391339233933394339533963397339833993400340134023403340434053406340734083409341034113412341334143415341634173418341934203421342234233424342534263427342834293430343134323433343434353436343734383439344034413442344334443445344634473448344934503451345234533454345534563457345834593460346134623463346434653466346734683469347034713472347334743475347634773478347934803481348234833484348534863487348834893490349134923493349434953496349734983499350035013502350335043505350635073508350935103511351235133514351535163517351835193520352135223523352435253526352735283529353035313532353335343535353635373538353935403541354235433544354535463547354835493550355135523553355435553556355735583559356035613562356335643565356635673568356935703571357235733574357535763577357835793580358135823583358435853586358735883589359035913592359335943595359635973598359936003601360236033604360536063607360836093610361136123613361436153616361736183619362036213622362336243625362636273628362936303631363236333634363536363637363836393640364136423643364436453646364736483649365036513652365336543655365636573658365936603661366236633664366536663667366836693670367136723673367436753676367736783679368036813682368336843685368636873688368936903691369236933694369536963697369836993700370137023703370437053706370737083709371037113712371337143715371637173718371937203721372237233724372537263727372837293730373137323733373437353736373737383739374037413742374337443745374637473748374937503751375237533754375537563757375837593760376137623763376437653766376737683769377037713772377337743775377637773778377937803781378237833784378537863787378837893790379137923793379437953796379737983799380038013802380338043805380638073808380938103811381238133814381538163817381838193820382138223823382438253826382738283829383038313832383338343835383638373838383938403841384238433844384538463847384838493850385138523853385438553856385738583859386038613862386338643865386638673868386938703871387238733874387538763877387838793880388138823883388438853886388738883889389038913892389338943895 |
- {
- "key": "TDesign",
- "label": "Tdesign",
- "components": {
- "t-action-sheet": {
- "key": "t-action-sheet",
- "label": "动作面板",
- "icon": "https://tdesign.gtimg.com/site/miniprogram-doc/doc-actionsheet.png",
- "properties": [
- {
- "key": "cancelText",
- "type": ["String"],
- "desc": "设置取消按钮的文本",
- "label": ""
- },
- {
- "key": "count",
- "type": ["Number"],
- "desc": "设置每页展示菜单的数量,仅当 type=grid 时有效",
- "label": ""
- },
- {
- "key": "items",
- "type": ["Array"],
- "desc": "菜单项",
- "label": ""
- },
- {
- "key": "showCancel",
- "type": ["Boolean"],
- "desc": "是否显示取消按钮",
- "label": ""
- },
- {
- "key": "theme",
- "type": ["String"],
- "desc": "展示类型,列表和表格形式展示",
- "label": ""
- },
- {
- "key": "visible",
- "type": ["Boolean"],
- "desc": "显示与隐藏",
- "label": ""
- }
- ],
- "events": [
- {
- "key": "bind:cancel",
- "desc": "点击取消按钮时触发",
- "label": ""
- },
- {
- "key": "bind:close",
- "desc": "关闭时触发",
- "label": ""
- },
- {
- "key": "bind:selected",
- "desc": "选择菜单项时触发",
- "label": ""
- }
- ],
- "tpl": "<t-action-sheet id=\"t-action-sheet-imperative\" visible=\"{{false}}\"></t-action-sheet>",
- "path": "./action-sheet/action-sheet"
- },
- "t-avatar-group": {
- "key": "t-avatar-group",
- "label": "头像组",
- "icon": "https://tdesign.gtimg.com/site/miniprogram-doc/doc-avatar.png",
- "properties": [
- {
- "key": "cascading",
- "type": ["String"],
- "desc": "图片之间的层叠关系,可选值:左侧图片在上和右侧图片在上",
- "label": ""
- },
- {
- "key": "collapseAvatar",
- "type": ["String"],
- "desc": "头像数量超出时,会出现一个头像折叠元素。该元素内容可自定义。默认为 `+N`。示例:`+5`,`...`, `更多`",
- "label": ""
- },
- {
- "key": "max",
- "type": ["Number"],
- "desc": "能够同时显示的最多头像数量",
- "label": ""
- },
- {
- "key": "size",
- "type": ["String"],
- "desc": "尺寸,示例值:small/medium/large/24px/38px 等。优先级低于 Avatar.size",
- "label": ""
- }
- ],
- "externalClasses": ["t-class", "t-class-image", "t-class-content"],
- "tpl": "<t-avatar-group max=\"2\" collapseAvatar=\"+5\"><t-avatar wx:for=\"{{['https://cdn-we-retail.ym.tencent.com/retail-ui/components-exp/avatar/avatar-v2/1.png','https://cdn-we-retail.ym.tencent.com/retail-ui/components-exp/avatar/avatar-v2/2.png','https://cdn-we-retail.ym.tencent.com/retail-ui/components-exp/avatar/avatar-v2/3.png']}}\" wx:key=\"index\" image=\"{{item}}\" style=\"margin-right: -16rpx\" /></t-avatar-group>",
- "require": {
- "t-avatar": "./avatar/avatar"
- },
- "path": "./avatar/avatar-group"
- },
- "t-avatar": {
- "key": "t-avatar",
- "label": "头像",
- "icon": "https://tdesign.gtimg.com/site/miniprogram-doc/doc-avatar.png",
- "properties": [
- {
- "key": "alt",
- "type": ["String"],
- "desc": "头像替换文本,仅当图片加载失败时有效",
- "label": ""
- },
- {
- "key": "badgeProps",
- "type": ["Object"],
- "desc": "头像右上角提示信息,继承 Badge 组件的全部特性。如:小红点,或者数字",
- "label": ""
- },
- {
- "key": "hideOnLoadFailed",
- "type": ["Boolean"],
- "desc": "加载失败时隐藏图片",
- "label": ""
- },
- {
- "key": "icon",
- "type": ["String"],
- "desc": "图标",
- "label": ""
- },
- {
- "key": "image",
- "type": ["String"],
- "desc": "图片地址",
- "label": ""
- },
- {
- "key": "shape",
- "type": ["String"],
- "desc": "形状",
- "label": ""
- },
- {
- "key": "size",
- "type": ["String"],
- "desc": "尺寸,示例值:small/medium/large/24px/38px 等,默认为 large",
- "label": ""
- }
- ],
- "externalClasses": ["t-class"],
- "events": [
- {
- "key": "bind:error",
- "desc": "图片加载失败时触发",
- "label": ""
- }
- ],
- "tpl": "<t-avatar icon=\"user\" alt=\"avatar\"/>",
- "path": "./avatar/avatar"
- },
- "t-back-top": {
- "key": "t-back-top",
- "label": "回到顶部",
- "icon": "https://tdesign.gtimg.com/site/miniprogram-doc/doc-backtop.png",
- "properties": [
- {
- "key": "fixed",
- "type": ["Boolean"],
- "desc": "是否绝对定位固定到屏幕右下方",
- "label": ""
- },
- {
- "key": "icon",
- "type": ["String"],
- "desc": "图标",
- "label": ""
- },
- {
- "key": "text",
- "type": ["String"],
- "desc": "文案",
- "label": ""
- },
- {
- "key": "theme",
- "type": ["String"],
- "desc": "预设的样式类型",
- "label": ""
- }
- ],
- "externalClasses": ["t-class", "t-class-icon", "t-class-text"],
- "events": [
- {
- "key": "bind:to-top",
- "desc": "点击触发",
- "label": ""
- }
- ],
- "tpl": "<t-back-top />",
- "path": "./back-top/back-top"
- },
- "t-badge": {
- "key": "t-badge",
- "label": "徽标数",
- "icon": "https://tdesign.gtimg.com/site/miniprogram-doc/doc-badge.png",
- "properties": [
- {
- "key": "color",
- "type": ["String"],
- "desc": "颜色",
- "label": ""
- },
- {
- "key": "content",
- "type": ["String"],
- "desc": "徽标内容,示例:`content='自定义内容'`。也可以使用默认插槽定义",
- "label": ""
- },
- {
- "key": "count",
- "type": ["String", "Number"],
- "desc": "徽标右上角内容。可以是数字,也可以是文字。如:'new'/3/99+。特殊:值为空表示使用插槽渲染",
- "label": ""
- },
- {
- "key": "dot",
- "type": ["Boolean"],
- "desc": "是否为红点",
- "label": ""
- },
- {
- "key": "maxCount",
- "type": ["Number"],
- "desc": "封顶的数字值",
- "label": ""
- },
- {
- "key": "offset",
- "type": ["Array"],
- "desc": "设置状态点的位置偏移,示例:[-10, 20] 或 ['10em', '8rem']",
- "label": ""
- },
- {
- "key": "shape",
- "type": ["String"],
- "desc": "形状",
- "label": ""
- },
- {
- "key": "showZero",
- "type": ["Boolean"],
- "desc": "当数值为 0 时,是否展示徽标",
- "label": ""
- },
- {
- "key": "size",
- "type": ["String"],
- "desc": "尺寸",
- "label": ""
- }
- ],
- "externalClasses": ["t-class", "t-class-content", "t-class-count"],
- "tpl": "<t-badge content=\"消息\" dot />",
- "path": "./badge/badge"
- },
- "t-button": {
- "key": "t-button",
- "label": "按钮",
- "icon": "https://tdesign.gtimg.com/site/miniprogram-doc/doc-button.png",
- "properties": [
- {
- "key": "block",
- "type": ["Boolean"],
- "desc": "是否为块级元素",
- "label": ""
- },
- {
- "key": "content",
- "type": ["String"],
- "desc": "按钮内容",
- "label": ""
- },
- {
- "key": "customDataset",
- "type": ["Object"],
- "desc": "自定义 dataset,可通过 event.currentTarget.dataset.custom 获取",
- "label": ""
- },
- {
- "key": "disabled",
- "type": ["Boolean"],
- "desc": "是否禁用按钮",
- "label": ""
- },
- {
- "key": "ghost",
- "type": ["Boolean"],
- "desc": "是否为幽灵按钮(镂空按钮)",
- "label": ""
- },
- {
- "key": "icon",
- "type": ["String"],
- "desc": "图标名称",
- "label": ""
- },
- {
- "key": "loading",
- "type": ["Boolean"],
- "desc": "是否显示为加载状态",
- "label": ""
- },
- {
- "key": "shape",
- "type": ["String"],
- "desc": "按钮形状,有 4 种:长方形、正方形、圆角长方形、圆形",
- "label": ""
- },
- {
- "key": "size",
- "type": ["String"],
- "desc": "组件尺寸",
- "label": ""
- },
- {
- "key": "theme",
- "type": ["String"],
- "desc": "组件风格,依次为品牌色、危险色",
- "label": ""
- },
- {
- "key": "type",
- "type": ["String"],
- "desc": "同小程序的 formType",
- "label": ""
- },
- {
- "key": "variant",
- "type": ["String"],
- "desc": "按钮形式,基础、线框、文字",
- "label": ""
- }
- ],
- "externalClasses": ["t-class", "t-class-icon"],
- "events": [
- {
- "key": "bind:click",
- "desc": "点击时触发",
- "label": ""
- }
- ],
- "tpl": "<t-button theme=\"primary\" block content=\"强按钮\"></t-button>",
- "path": "./button/button"
- },
- "t-cell-group": {
- "key": "t-cell-group",
- "label": "单元格组",
- "icon": "https://tdesign.gtimg.com/site/miniprogram-doc/doc-cell.png",
- "properties": [
- {
- "key": "bordered",
- "type": ["Boolean"],
- "desc": "是否显示组边框",
- "label": ""
- },
- {
- "key": "title",
- "type": ["String"],
- "desc": "单元格组标题",
- "label": ""
- }
- ],
- "externalClasses": ["t-class"],
- "tpl": "<t-cell-group title=\"01 基础用法\"><t-cell title=\"单行标题\" required /><t-cell title=\"单行标题\" hover note=\"辅助信息\" /><t-cell title=\"单行标题\" hover arrow /><t-cell title=\"单行标题\" hover note=\"辅助信息\" arrow /></t-cell-group>",
- "require": {
- "t-cell": "./cell/cell"
- },
- "path": "./cell-group/cell-group"
- },
- "t-cell": {
- "key": "t-cell",
- "label": "单元格",
- "icon": "https://tdesign.gtimg.com/site/miniprogram-doc/doc-cell.png",
- "properties": [
- {
- "key": "align",
- "type": ["String"],
- "desc": "内容的对齐方式,默认居中对齐",
- "label": ""
- },
- {
- "key": "arrow",
- "type": ["Boolean"],
- "desc": "是否显示右侧箭头",
- "label": ""
- },
- {
- "key": "bordered",
- "type": ["Boolean"],
- "desc": "是否显示下边框",
- "label": ""
- },
- {
- "key": "description",
- "type": ["String"],
- "desc": "下方内容描述",
- "label": ""
- },
- {
- "key": "hover",
- "type": ["Boolean"],
- "desc": "是否开启点击反馈",
- "label": ""
- },
- {
- "key": "image",
- "type": ["String"],
- "desc": "主图",
- "label": ""
- },
- {
- "key": "jumpType",
- "type": ["String"],
- "desc": "链接跳转类型",
- "label": ""
- },
- {
- "key": "leftIcon",
- "type": ["String"],
- "desc": "左侧图标,出现在单元格标题的左侧",
- "label": ""
- },
- {
- "key": "note",
- "type": ["String"],
- "desc": "和标题同行的说明文字",
- "label": ""
- },
- {
- "key": "required",
- "type": ["Boolean"],
- "desc": "是否显示表单必填星号",
- "label": ""
- },
- {
- "key": "rightIcon",
- "type": ["String"],
- "desc": "最右侧图标",
- "label": ""
- },
- {
- "key": "title",
- "type": ["String"],
- "desc": "标题",
- "label": ""
- },
- {
- "key": "url",
- "type": ["String"],
- "desc": "点击后跳转链接地址。如果值为空,则表示不需要跳转",
- "label": ""
- }
- ],
- "externalClasses": [
- "t-class",
- "t-class-title",
- "t-class-note",
- "t-class-description",
- "t-class-thumb",
- "t-class-hover",
- "t-class-left",
- "t-class-right"
- ],
- "events": [
- {
- "key": "bind:click",
- "desc": "右侧内容",
- "label": ""
- }
- ],
- "tpl": "<t-cell title=\"单行标题\" hover />",
- "path": "./cell/cell"
- },
- "t-check-tag": {
- "key": "t-check-tag",
- "label": "可选标签",
- "icon": "",
- "properties": [
- {
- "key": "checked",
- "type": ["Boolean"],
- "desc": "标签选中的状态,默认风格(theme=default)才有选中态",
- "label": ""
- },
- {
- "key": "closable",
- "type": ["Boolean"],
- "desc": "标签是否可关闭",
- "label": ""
- },
- {
- "key": "content",
- "type": ["String", "Number"],
- "desc": "组件子元素",
- "label": ""
- },
- {
- "key": "disabled",
- "type": ["Boolean"],
- "desc": "标签禁用态,失效标签不能触发事件。默认风格(theme=default)才有禁用态",
- "label": ""
- },
- {
- "key": "icon",
- "type": ["String"],
- "desc": "标签中的图标,可自定义图标呈现",
- "label": ""
- },
- {
- "key": "shape",
- "type": ["String"],
- "desc": "标签类型,有三种:方形、圆角方形、标记型",
- "label": ""
- },
- {
- "key": "size",
- "type": ["String"],
- "desc": "标签尺寸",
- "label": ""
- }
- ],
- "events": [
- {
- "key": "bind:change",
- "desc": "组件子元素",
- "label": ""
- },
- {
- "key": "bind:click",
- "desc": "点击标签时触发",
- "label": ""
- }
- ],
- "tpl": "<t-check-tag>check tag</t-check-tag>",
- "path": "./tag/check-tag"
- },
- "t-checkbox-group": {
- "key": "t-checkbox-group",
- "label": "多选框组",
- "icon": "https://tdesign.gtimg.com/site/miniprogram-doc/doc-checkbox.png",
- "properties": [
- {
- "key": "disabled",
- "type": ["Boolean"],
- "desc": "是否禁用组件",
- "label": ""
- },
- {
- "key": "max",
- "type": ["Number"],
- "desc": "支持最多选中的数量",
- "label": ""
- },
- {
- "key": "name",
- "type": ["String"],
- "desc": "统一设置内部复选框 HTML 属性",
- "label": ""
- },
- {
- "key": "options",
- "type": ["Array"],
- "desc": "以配置形式设置子元素。示例1:`['北京', '上海']` ,示例2: `[{ label: '全选', checkAll: true }, { label: '上海', value: 'shanghai' }]`。checkAll 值为 true 表示当前选项为「全选选项」",
- "label": ""
- },
- {
- "key": "value",
- "type": ["Array"],
- "desc": "选中值",
- "label": ""
- }
- ],
- "events": [
- {
- "key": "bind:change",
- "desc": "值变化时触发。`context.current` 表示当前变化的数据项,如果是全选则为空;`context.type` 表示引起选中数据变化的是选中或是取消选中,`context.option` 表示当前变化的数据项",
- "label": ""
- }
- ],
- "tpl": "<t-checkbox-group value=\"{{['checkbox1']}}\"><t-checkbox value=\"checkbox1\" label=\"多选\" /><t-checkbox value=\"checkbox2\" label=\"多选\" /><t-checkbox value=\"checkbox3\" label=\"多选\" /></t-checkbox-group>",
- "require": {
- "t-checkbox": "./checkbox/checkbox"
- },
- "path": "./checkbox-group/checkbox-group"
- },
- "t-checkbox": {
- "key": "t-checkbox",
- "label": "多选框",
- "icon": "https://tdesign.gtimg.com/site/miniprogram-doc/doc-checkbox.png",
- "properties": [
- {
- "key": "align",
- "type": ["String"],
- "desc": "多选框和内容相对位置",
- "label": ""
- },
- {
- "key": "checkAll",
- "type": ["Boolean"],
- "desc": "用于标识是否为「全选选项」。单独使用无效,需在 CheckboxGroup 中使用",
- "label": ""
- },
- {
- "key": "checked",
- "type": ["Boolean"],
- "desc": "是否选中",
- "label": ""
- },
- {
- "key": "color",
- "type": ["String"],
- "desc": "多选框颜色",
- "label": ""
- },
- {
- "key": "content",
- "type": ["String"],
- "desc": "多选框内容",
- "label": ""
- },
- {
- "key": "contentDisabled",
- "type": ["Boolean"],
- "desc": "是否禁用组件内容(content)触发选中",
- "label": ""
- },
- {
- "key": "disabled",
- "type": ["Boolean"],
- "desc": "是否禁用组件",
- "label": ""
- },
- {
- "key": "icon",
- "type": ["Array"],
- "desc": "自定义选中图标和非选中图标。示例:[选中态图标地址,非选中态图标地址]",
- "label": ""
- },
- {
- "key": "indeterminate",
- "type": ["Boolean"],
- "desc": "是否为半选",
- "label": ""
- },
- {
- "key": "label",
- "type": ["String"],
- "desc": "主文案",
- "label": ""
- },
- {
- "key": "maxContentRow",
- "type": ["Number"],
- "desc": "内容最大行数限制",
- "label": ""
- },
- {
- "key": "maxLabelRow",
- "type": ["Number"],
- "desc": "主文案最大行数限制",
- "label": ""
- },
- {
- "key": "name",
- "type": ["String"],
- "desc": "HTML 元素原生属性",
- "label": ""
- },
- {
- "key": "readonly",
- "type": ["Boolean"],
- "desc": "只读状态",
- "label": ""
- },
- {
- "key": "value",
- "type": ["String", "Number"],
- "desc": "多选框的值",
- "label": ""
- }
- ],
- "externalClasses": ["t-class", "t-class-icon", "t-class-label", "t-class-content", "t-class-border"],
- "events": [
- {
- "key": "bind:change",
- "desc": "值变化时触发",
- "label": ""
- }
- ],
- "tpl": "<t-checkbox label=\"多选框\" checked=\"{{true}}\"></t-checkbox>",
- "path": "./checkbox/checkbox"
- },
- "t-collapse-panel": {
- "key": "t-collapse-panel",
- "label": "折叠面板",
- "icon": "",
- "properties": [
- {
- "key": "content",
- "type": ["String"],
- "desc": "折叠面板内容",
- "label": ""
- },
- {
- "key": "disabled",
- "type": ["Boolean"],
- "desc": "禁止当前面板展开,优先级大于 Collapse 的同名属性",
- "label": ""
- },
- {
- "key": "expandIcon",
- "type": ["Boolean"],
- "desc": "当前折叠面板展开图标,优先级大于 Collapse 的同名属性",
- "label": ""
- },
- {
- "key": "header",
- "type": ["String"],
- "desc": "面板头内容",
- "label": ""
- },
- {
- "key": "headerRightContent",
- "type": ["String"],
- "desc": "面板头的右侧区域,一般用于呈现面板操作",
- "label": ""
- },
- {
- "key": "value",
- "type": ["String", "Number"],
- "desc": "当前面板唯一标识,如果值为空则取当前面下标兜底作为唯一标识",
- "label": ""
- }
- ],
- "tpl": "<t-collapse-panel header=\"折叠面板标题\" value=\"{{0}}\">此处可自定义内容</t-collapse-panel>",
- "path": "./collapse/collapse-panel"
- },
- "t-collapse": {
- "key": "t-collapse",
- "label": "折叠",
- "icon": "https://tdesign.gtimg.com/site/miniprogram-doc/doc-collapse.png",
- "properties": [
- {
- "key": "defaultExpandAll",
- "type": ["Boolean"],
- "desc": "默认是否展开全部",
- "label": ""
- },
- {
- "key": "disabled",
- "type": ["Boolean"],
- "desc": "是否禁用面板展开/收起操作",
- "label": ""
- },
- {
- "key": "expandIcon",
- "type": ["Boolean"],
- "desc": "展开图标。值为 undefined 或 false 则不显示展开图标;值为 true 显示默认图标;值类型为函数,则表示完全自定义展开图标",
- "label": ""
- },
- {
- "key": "expandMutex",
- "type": ["Boolean"],
- "desc": "每个面板互斥展开,每次只展开一个面板",
- "label": ""
- },
- {
- "key": "value",
- "type": ["Array"],
- "desc": "展开的面板集合",
- "label": ""
- }
- ],
- "events": [
- {
- "key": "bind:change",
- "desc": "切换面板时触发,返回变化的值",
- "label": ""
- }
- ],
- "tpl": "<t-collapse value=\"{{[0]}}\"><t-collapse-panel header=\"折叠面板标题\" value=\"{{0}}\">此处可自定义内容</t-collapse-panel></t-collapse>",
- "require": {
- "t-collapse-panel": "./collapse/collapse-panel"
- },
- "path": "./collapse/collapse"
- },
- "t-date-time-picker": {
- "key": "t-date-time-picker",
- "label": "日期时间选择器",
- "icon": "https://tdesign.gtimg.com/site/miniprogram-doc/doc-datetimepicker.png",
- "properties": [
- {
- "key": "cancelBtn",
- "type": ["String"],
- "desc": "取消按钮文字",
- "label": ""
- },
- {
- "key": "confirmBtn",
- "type": ["String"],
- "desc": "确定按钮文字",
- "label": ""
- },
- {
- "key": "end",
- "type": ["String", "Number"],
- "desc": "选择器的结束时间",
- "label": ""
- },
- {
- "key": "footer",
- "type": ["String"],
- "desc": "底部内容",
- "label": ""
- },
- {
- "key": "format",
- "type": ["String"],
- "desc": "用于格式化日期,[详细文档](https://day.js.org/docs/en/display/format)",
- "label": ""
- },
- {
- "key": "header",
- "type": ["Boolean"],
- "desc": "头部内容。值为 true 显示空白头部,值为 false 不显示任何内容,值类型为 TNode 表示自定义头部内容",
- "label": ""
- },
- {
- "key": "mode",
- "type": ["String", "Array"],
- "desc": "选择器模式,用于表示可以选择到哪一个层级。【示例一】year 或者 ['year'] 表示纯日期选择器,只能选择到年份,只显示年份。【示例二】'hour' 或 ['hour'] 表示纯时间选择器,只能选择到小时维度。【示例三】['year', 'month', 'date', 'hour', 'minute'] 表示,日期和时间 混合选择器,可以选择到具体哪一分钟,显示全部时间:年/月/日/时/分",
- "label": ""
- },
- {
- "key": "showWeek",
- "type": ["Boolean"],
- "desc": "【开发中】是否在日期旁边显示周几(如周一,周二,周日等)",
- "label": ""
- },
- {
- "key": "start",
- "type": ["String", "Number"],
- "desc": "选择器的开始时间",
- "label": ""
- },
- {
- "key": "title",
- "type": ["String"],
- "desc": "标题",
- "label": ""
- },
- {
- "key": "value",
- "type": ["String", "Number"],
- "desc": "选中值",
- "label": ""
- },
- {
- "key": "visible",
- "type": ["Boolean"],
- "desc": "是否显示",
- "label": ""
- }
- ],
- "externalClasses": ["t-class", "t-class-confirm", "t-class-cancel", "t-class-title"],
- "events": [
- {
- "key": "bind:cancel",
- "desc": "取消按钮点击时触发",
- "label": ""
- },
- {
- "key": "bind:change",
- "desc": "选中值发生变化时触发",
- "label": ""
- },
- {
- "key": "bind:column-change",
- "desc": "每一列选中数据变化时触发",
- "label": ""
- },
- {
- "key": "bind:confirm",
- "desc": "确认按钮点击时触发",
- "label": ""
- }
- ],
- "tpl": "<t-date-time-picker title=\"选择日期\" visible=\"{{true}}\" mode=\"{{['date']}}\" format=\"YYYY-MM-DD\"></t-date-time-picker>",
- "path": "./date-time-picker/date-time-picker"
- },
- "t-dialog": {
- "key": "t-dialog",
- "label": "对话框",
- "icon": "https://tdesign.gtimg.com/site/miniprogram-doc/doc-dialog.png",
- "properties": [
- {
- "key": "actions",
- "type": ["Array"],
- "desc": "操作栏",
- "label": ""
- },
- {
- "key": "buttonLayout",
- "type": ["String"],
- "desc": "多按钮排列方式",
- "label": ""
- },
- {
- "key": "cancelBtn",
- "type": ["String", "Object"],
- "desc": "取消按钮,可自定义。值为 null 则不显示取消按钮。值类型为字符串,则表示自定义按钮文本,值类型为 Object 则表示透传 Button 组件属性。使用 TNode 自定义按钮时,需自行控制取消事件",
- "label": ""
- },
- {
- "key": "closeOnOverlayClick",
- "type": ["Boolean"],
- "desc": "点击蒙层时是否触发关闭事件",
- "label": ""
- },
- {
- "key": "confirmBtn",
- "type": ["String", "Object"],
- "desc": "确认按钮。值为 null 则不显示确认按钮。值类型为字符串,则表示自定义按钮文本,值类型为 Object 则表示透传 Button 组件属性。使用 TNode 自定义按钮时,需自行控制确认事件",
- "label": ""
- },
- {
- "key": "content",
- "type": ["String"],
- "desc": "内容",
- "label": ""
- },
- {
- "key": "preventScrollThrough",
- "type": ["Boolean"],
- "desc": "防止滚动穿透",
- "label": ""
- },
- {
- "key": "showInAttachedElement",
- "type": ["Boolean"],
- "desc": "【开发中】仅在挂载元素中显示抽屉,默认在浏览器可视区域显示。父元素需要有定位属性,如:position: relative",
- "label": ""
- },
- {
- "key": "showOverlay",
- "type": ["Boolean"],
- "desc": "是否显示遮罩层",
- "label": ""
- },
- {
- "key": "title",
- "type": ["String"],
- "desc": "标题",
- "label": ""
- },
- {
- "key": "visible",
- "type": ["Boolean"],
- "desc": "控制对话框是否显示",
- "label": ""
- },
- {
- "key": "zIndex",
- "type": ["Number"],
- "desc": "对话框层级,Web 侧样式默认为 2500,移动端和小程序样式默认为 1500",
- "label": ""
- }
- ],
- "externalClasses": ["t-class", "t-class-content", "t-class-confirm", "t-class-cancel"],
- "events": [
- {
- "key": "bind:cancel",
- "desc": "如果“取消”按钮存在,则点击“取消”按钮时触发,同时触发关闭事件",
- "label": ""
- },
- {
- "key": "bind:close",
- "desc": "关闭事件,点击 取消按钮 或 点击蒙层 时触发",
- "label": ""
- },
- {
- "key": "bind:overlay-click",
- "desc": "如果蒙层存在,点击蒙层时触发",
- "label": ""
- }
- ],
- "tpl": "<t-dialog visible=\"{{true}}\" title=\"对话框标题\" content=\"告知当前状态、信息和解决方法,等内容。描述文案尽可能控制在三行内\" confirm-btn=\"我知道了\" />",
- "path": "./dialog/dialog"
- },
- "t-divider": {
- "key": "t-divider",
- "label": "分割线",
- "icon": "https://tdesign.gtimg.com/site/miniprogram-doc/doc-divider.png",
- "properties": [
- {
- "key": "align",
- "type": ["String"],
- "desc": "文本位置(仅在水平分割线有效)",
- "label": ""
- },
- {
- "key": "content",
- "type": ["String"],
- "desc": "子元素",
- "label": ""
- },
- {
- "key": "dashed",
- "type": ["Boolean"],
- "desc": "是否虚线(仅在水平分割线有效)",
- "label": ""
- },
- {
- "key": "layout",
- "type": ["String"],
- "desc": "分隔线类型有两种:水平和垂直",
- "label": ""
- },
- {
- "key": "lineColor",
- "type": ["String"],
- "desc": "分隔线颜色",
- "label": ""
- }
- ],
- "externalClasses": ["t-class", "t-class-line", "t-class-content"],
- "tpl": "<t-divider />",
- "path": "./divider/divider"
- },
- "t-drawer": {
- "key": "t-drawer",
- "label": "模态抽屉",
- "icon": "https://tdesign.gtimg.com/site/miniprogram-doc/doc-drawer.png",
- "properties": [
- {
- "key": "closeOnOverlayClick",
- "type": ["Boolean"],
- "desc": "点击蒙层时是否触发抽屉关闭事件",
- "label": ""
- },
- {
- "key": "destroyOnClose",
- "type": ["Boolean"],
- "desc": "抽屉关闭时是否销毁节点",
- "label": ""
- },
- {
- "key": "items",
- "type": ["Array"],
- "desc": "抽屉里的列表项",
- "label": ""
- },
- {
- "key": "placement",
- "type": ["String"],
- "desc": "抽屉方向",
- "label": ""
- },
- {
- "key": "showOverlay",
- "type": ["Boolean"],
- "desc": "是否显示遮罩层",
- "label": ""
- },
- {
- "key": "visible",
- "type": ["Boolean"],
- "desc": "组件是否可见",
- "label": ""
- },
- {
- "key": "zIndex",
- "type": ["Number"],
- "desc": "抽屉层级,样式默认为 1500",
- "label": ""
- }
- ],
- "events": [
- {
- "key": "bind:close",
- "desc": "关闭事件,取消按钮点击时、关闭按钮点击时、点击蒙层时均会触发",
- "label": ""
- },
- {
- "key": "bind:item-click",
- "desc": "点击抽屉里的列表项",
- "label": ""
- },
- {
- "key": "bind:overlay-click",
- "desc": "如果蒙层存在,点击蒙层时触发",
- "label": ""
- }
- ],
- "tpl": "<t-drawer visible=\"{{true}}\" placement=\"left\" items=\"{{[{title: '菜单一'},{title: '菜单二'}]}}\"></t-drawer>",
- "path": "./drawer/drawer"
- },
- "t-dropdown-item": {
- "key": "t-dropdown-item",
- "label": "下拉菜单子项",
- "icon": "https://tdesign.gtimg.com/site/miniprogram-doc/doc-dropdownmenu.png",
- "properties": [
- {
- "key": "disabled",
- "type": ["Boolean"],
- "desc": "是否禁用",
- "label": ""
- },
- {
- "key": "label",
- "type": ["String"],
- "desc": "标题",
- "label": ""
- },
- {
- "key": "multiple",
- "type": ["Boolean"],
- "desc": "是否多选",
- "label": ""
- },
- {
- "key": "options",
- "type": ["Array"],
- "desc": "选项数据",
- "label": ""
- }
- ],
- "tpl": "<t-dropdown-item label=\"菜单\" options=\"{{[{label:'选项一',value:'option_1',disabled:false},{label:'选项二',value:'option_2',disabled:false},{label:'选项三',value:'option_3',disabled:false}]}}\" defaultValue=\"option_3\" /><t-dropdown-item label=\"菜单\" options=\"{{[{label:'选项一',value:'option_1',disabled:false},{label:'选项二',value:'option_2',disabled:false},{label:'选项三',value:'option_3',disabled:false}]}}\" defaultValue=\"option_3\" />",
- "path": "./dropdown-menu/dropdown-item"
- },
- "t-dropdown-menu": {
- "key": "t-dropdown-menu",
- "label": "下拉菜单",
- "icon": "https://tdesign.gtimg.com/site/miniprogram-doc/doc-dropdownmenu.png",
- "properties": [
- {
- "key": "activeColor",
- "type": ["String"],
- "desc": "【讨论中】菜单标题和选项的选中态颜色",
- "label": ""
- },
- {
- "key": "closeOnClickOverlay",
- "type": ["Boolean"],
- "desc": "是否在点击遮罩层后关闭菜单",
- "label": ""
- },
- {
- "key": "duration",
- "type": ["String", "Number"],
- "desc": "动画时长",
- "label": ""
- },
- {
- "key": "showOverlay",
- "type": ["Boolean"],
- "desc": "是否显示遮罩层",
- "label": ""
- },
- {
- "key": "zIndex",
- "type": ["Number"],
- "desc": "菜单栏 z-index 层级",
- "label": ""
- }
- ],
- "tpl": "<t-dropdown-menu><t-dropdown-item label=\"菜单\" options=\"{{[{label:'选项一',value:'option_1',disabled:false},{label:'选项二',value:'option_2',disabled:false},{label:'选项三',value:'option_3',disabled:false}]}}\" defaultValue=\"option_3\" /><t-dropdown-item label=\"菜单\" options=\"{{[{label:'选项一',value:'option_1',disabled:false},{label:'选项二',value:'option_2',disabled:false},{label:'选项三',value:'option_3',disabled:false}]}}\" defaultValue=\"option_3\" /></t-dropdown-menu>",
- "require": {
- "t-dropdown-item": "./dropdown-menu/dropdown-item"
- },
- "path": "./dropdown-menu/dropdown-menu"
- },
- "t-empty": {
- "key": "t-empty",
- "label": "空状态",
- "icon": "https://tdesign.gtimg.com/site/miniprogram-doc/doc-empty.png",
- "properties": [
- {
- "key": "action",
- "type": ["String"],
- "desc": "操作按钮",
- "label": ""
- },
- {
- "key": "description",
- "type": ["String"],
- "desc": "描述文字",
- "label": ""
- },
- {
- "key": "icon",
- "type": ["String"],
- "desc": "图标名称",
- "label": ""
- },
- {
- "key": "image",
- "type": ["String"],
- "desc": "图片地址",
- "label": ""
- }
- ],
- "externalClasses": ["t-class", "t-class-description", "t-class-image", "t-class-actions"],
- "tpl": "<t-empty icon=\"info-circle-filled\" />",
- "path": "./empty/empty"
- },
- "t-fab": {
- "key": "t-fab",
- "label": "悬浮按钮",
- "icon": "https://tdesign.gtimg.com/site/miniprogram-doc/doc-fab.png",
- "properties": [
- {
- "key": "buttonProps",
- "type": ["Object"],
- "desc": "透传至 Button 组件",
- "label": ""
- },
- {
- "key": "icon",
- "type": ["String"],
- "desc": "图标",
- "label": ""
- },
- {
- "key": "style",
- "type": ["String"],
- "desc": "悬浮按钮的样式,常用于调整位置",
- "label": ""
- },
- {
- "key": "text",
- "type": ["String"],
- "desc": "文本内容",
- "label": ""
- }
- ],
- "events": [
- {
- "key": "bind:click",
- "desc": "悬浮按钮点击事件",
- "label": ""
- }
- ],
- "tpl": "<t-fab icon=\"add\" />",
- "path": "./fab/fab"
- },
- "t-footer": {
- "key": "t-footer",
- "label": "布局-底部内容",
- "icon": "https://tdesign.gtimg.com/site/miniprogram-doc/doc-footer.png",
- "properties": [
- {
- "key": "copyright",
- "type": ["String"],
- "desc": "版权信息,type 为`text`生效",
- "label": ""
- },
- {
- "key": "logo",
- "type": ["Object"],
- "desc": "图标配置,type 为`logo`生效。`logo.icon` 表示图标链接地址,`logo.title` 表示标题文本,`logo.url` 表示链接跳转地址",
- "label": ""
- },
- {
- "key": "textLinkList",
- "type": ["Array"],
- "desc": "链接列表,type 为`text`生效。name 表示链接名称, url 表示链接 page 路径,目前只支持小程序内部跳转,openType 表示跳转方式",
- "label": ""
- },
- {
- "key": "theme",
- "type": ["String"],
- "desc": "页脚展示类型",
- "label": ""
- }
- ],
- "tpl": "<t-footer theme=\"text\" copyright=\"Copyright © 2021-2031 TD.All Rights Reserved.\" />",
- "path": "./footer/footer"
- },
- "t-grid-item": {
- "key": "t-grid-item",
- "label": "宫格子项",
- "icon": "https://tdesign.gtimg.com/site/miniprogram-doc/doc-grid.png",
- "properties": [
- {
- "key": "badgeProps",
- "type": ["Object"],
- "desc": "头像右上角提示信息,继承 Badge 组件的全部特性。如:小红点,或者数字",
- "label": ""
- },
- {
- "key": "description",
- "type": ["String"],
- "desc": "文本以外的更多描述,辅助信息。可以通过 Props 传入文本,也可以自定义标题节点",
- "label": ""
- },
- {
- "key": "image",
- "type": ["String"],
- "desc": "图片,可以是图片地址,也可以自定义图片节点",
- "label": ""
- },
- {
- "key": "jumpType",
- "type": ["String"],
- "desc": "链接跳转类型",
- "label": ""
- },
- {
- "key": "layout",
- "type": ["String"],
- "desc": "内容布局方式",
- "label": ""
- },
- {
- "key": "text",
- "type": ["String"],
- "desc": "文本,可以通过 Props 传入文本,也可以自定义标题节点",
- "label": ""
- },
- {
- "key": "url",
- "type": ["String"],
- "desc": "点击后的跳转链接",
- "label": ""
- }
- ],
- "externalClasses": ["t-class", "t-class-image", "t-class-text", "t-class-description"],
- "tpl": "<t-grid-item text=\"标题文字\"><image style=\"width: 96rpx; height: 96rpx\" src=\"https://tdesign.gtimg.com/mobile/%E5%9B%BE%E7%89%87.png\" slot=\"image\" /></t-grid-item>",
- "path": "./grid/grid-item"
- },
- "t-grid": {
- "key": "t-grid",
- "label": "栅格",
- "icon": "https://tdesign.gtimg.com/site/miniprogram-doc/doc-grid.png",
- "properties": [
- {
- "key": "align",
- "type": ["String"],
- "desc": "内容对齐方式",
- "label": ""
- },
- {
- "key": "border",
- "type": ["Boolean", "Object"],
- "desc": "边框,默认不显示。值为 true 则显示默认边框,值类型为 object 则表示自定义边框样式",
- "label": ""
- },
- {
- "key": "column",
- "type": ["Number"],
- "desc": "每一行的列数量",
- "label": ""
- },
- {
- "key": "gutter",
- "type": ["Number"],
- "desc": "间隔大小",
- "label": ""
- },
- {
- "key": "hover",
- "type": ["Boolean"],
- "desc": "是否开启点击反馈",
- "label": ""
- }
- ],
- "externalClasses": ["t-class"],
- "tpl": "<t-grid column=\"{{2}}\"><t-grid-item text=\"标题文字\"><image style=\"width: 96rpx; height: 96rpx\" src=\"https://tdesign.gtimg.com/mobile/%E5%9B%BE%E7%89%87.png\" slot=\"image\" /></t-grid-item><t-grid-item text=\"标题文字\"><image style=\"width: 96rpx; height: 96rpx\" src=\"https://tdesign.gtimg.com/mobile/%E5%9B%BE%E7%89%87.png\" slot=\"image\" /></t-grid-item></t-grid>",
- "require": {
- "t-grid-item": "./grid/grid-item"
- },
- "path": "./grid/grid"
- },
- "t-icon": {
- "key": "t-icon",
- "label": "图标",
- "icon": "https://tdesign.gtimg.com/site/miniprogram-doc/doc-icon.png",
- "properties": [
- {
- "key": "classPrefix",
- "type": ["String"],
- "desc": "自定义icon前缀",
- "label": ""
- },
- {
- "key": "color",
- "type": ["String"],
- "desc": "图标颜色",
- "label": ""
- },
- {
- "key": "customStyle",
- "type": ["String"],
- "desc": "自定义样式",
- "label": ""
- },
- {
- "key": "name",
- "type": ["String"],
- "desc": "图标名称",
- "label": ""
- },
- {
- "key": "size",
- "type": ["String", "Number"],
- "desc": "图标名称",
- "label": ""
- }
- ],
- "tpl": "<t-icon name=\"add-circle\" />",
- "path": "./icon/icon"
- },
- "t-image": {
- "key": "t-image",
- "label": "图片",
- "icon": "https://tdesign.gtimg.com/site/miniprogram-doc/doc-image.png",
- "properties": [
- {
- "key": "error",
- "type": ["String"],
- "desc": "加载失败时显示的内容。值为 `default` 则表示使用默认加载失败风格;值为空或者 `slot` 表示使用插槽渲染,插槽名称为 `error`;值为其他则表示普通文本内容,如“加载失败”",
- "label": ""
- },
- {
- "key": "lazy",
- "type": ["Boolean"],
- "desc": "是否开启图片懒加载",
- "label": ""
- },
- {
- "key": "loading",
- "type": ["String"],
- "desc": "加载态内容。值为 `default` 则表示使用默认加载中风格;值为空或者 `slot` 表示使用插槽渲染,插槽名称为 `loading`;值为其他则表示普通文本内容,如“加载中”",
- "label": ""
- },
- {
- "key": "shape",
- "type": ["String"],
- "desc": "图片圆角类型",
- "label": ""
- },
- {
- "key": "src",
- "type": ["String"],
- "desc": "图片链接",
- "label": ""
- }
- ],
- "externalClasses": ["t-class", "t-class-load"],
- "events": [
- {
- "key": "bind:error",
- "desc": "图片加载失败时触发",
- "label": ""
- },
- {
- "key": "bind:load",
- "desc": "图片加载完成时触发",
- "label": ""
- }
- ],
- "tpl": "<t-image src=\"https://tdesign.gtimg.com/mobile/%E5%9B%BE%E7%89%87.png\" mode=\"aspectFill\"></t-image>",
- "path": "./image/image"
- },
- "t-indexes": {
- "key": "t-indexes",
- "label": "索引",
- "icon": "https://tdesign.gtimg.com/site/miniprogram-doc/doc-indexes.png",
- "properties": [
- {
- "key": "height",
- "type": ["Number"],
- "desc": "列表高度,未设置默认占满设备高度",
- "label": ""
- },
- {
- "key": "list",
- "type": ["Array"],
- "desc": "索引列表的列表数据。每个元素包含三个子元素,index(string):索引值,例如1,2,3,...或A,B,C等;title(string): 索引标题,可不填将默认设为索引值;children(Array<{title: string}>): 子元素列表,title为子元素的展示文案。",
- "label": ""
- },
- {
- "key": "sticky",
- "type": ["Boolean"],
- "desc": "索引是否吸顶,默认为true",
- "label": ""
- }
- ],
- "events": [
- {
- "key": "bind:select",
- "desc": "点击行元素时触发事件",
- "label": ""
- }
- ],
- "tpl": "<t-indexes id=\"bar\" list=\"{{ [{ title: 'A开头', index: 'A', children: [{ title: '阿坝' }]},{ title: 'B开头', index: 'B', children: [{ title: '北京' }]}] }}\" />",
- "path": "./indexes/indexes"
- },
- "t-input": {
- "key": "t-input",
- "label": "输入框",
- "icon": "https://tdesign.gtimg.com/site/miniprogram-doc/doc-input.png",
- "properties": [
- {
- "key": "align",
- "type": ["String"],
- "desc": "文本内容位置,居左/居中/居右",
- "label": ""
- },
- {
- "key": "borderless",
- "type": ["Boolean"],
- "desc": "【讨论中】是否开启无边框模式",
- "label": ""
- },
- {
- "key": "clearable",
- "type": ["Boolean"],
- "desc": "是否可清空",
- "label": ""
- },
- {
- "key": "disabled",
- "type": ["Boolean"],
- "desc": "是否禁用输入框",
- "label": ""
- },
- {
- "key": "errorMessage",
- "type": ["String"],
- "desc": "错误提示文本,值为空不显示(废弃属性,如果需要,请更为使用 status 和 tips)",
- "label": ""
- },
- {
- "key": "format",
- "type": ["String"],
- "desc": "【开发中】指定输入框展示值的格式",
- "label": ""
- },
- {
- "key": "label",
- "type": ["String"],
- "desc": "左侧文本",
- "label": ""
- },
- {
- "key": "maxcharacter",
- "type": ["Number"],
- "desc": "用户最多可以输入的字符个数,一个中文汉字表示两个字符长度。`maxcharacter` 和 `maxlength` 二选一使用",
- "label": ""
- },
- {
- "key": "maxlength",
- "type": ["Number"],
- "desc": "用户最多可以输入的文本长度,一个中文等于一个计数长度。值小于等于 0 的时候,则表示不限制输入长度。`maxcharacter` 和 `maxlength` 二选一使用",
- "label": ""
- },
- {
- "key": "placeholder",
- "type": ["String"],
- "desc": "占位符",
- "label": ""
- },
- {
- "key": "prefixIcon",
- "type": ["String"],
- "desc": "组件前置图标,值为字符串则表示图标名称",
- "label": ""
- },
- {
- "key": "readonly",
- "type": ["Boolean"],
- "desc": "只读状态",
- "label": ""
- },
- {
- "key": "size",
- "type": ["String"],
- "desc": "输入框尺寸",
- "label": ""
- },
- {
- "key": "status",
- "type": ["String"],
- "desc": "输入框状态",
- "label": ""
- },
- {
- "key": "suffix",
- "type": ["String"],
- "desc": "后置图标前的后置内容",
- "label": ""
- },
- {
- "key": "suffixIcon",
- "type": ["String"],
- "desc": "后置文本内容,值为字符串则表示图标名称",
- "label": ""
- },
- {
- "key": "tips",
- "type": ["String"],
- "desc": "输入框下方提示文本,会根据不同的 `status` 呈现不同的样式",
- "label": ""
- },
- {
- "key": "value",
- "type": ["String", "Number"],
- "desc": "输入框的值",
- "label": ""
- }
- ],
- "externalClasses": ["t-class", "t-class-input", "t-class-placeholder", "t-class-error-msg"],
- "events": [
- {
- "key": "bind:blur",
- "desc": "失去焦点时触发",
- "label": ""
- },
- {
- "key": "bind:change",
- "desc": "输入框值发生变化时触发",
- "label": ""
- },
- {
- "key": "bind:clear",
- "desc": "清空按钮点击时触发",
- "label": ""
- },
- {
- "key": "bind:enter",
- "desc": "回车键按下时触发",
- "label": ""
- },
- {
- "key": "bind:focus",
- "desc": "获得焦点时触发",
- "label": ""
- }
- ],
- "tpl": "<t-input placeholder=\"请输入文字\" />",
- "path": "./input/input"
- },
- "t-loading": {
- "key": "t-loading",
- "label": "加载中",
- "icon": "https://tdesign.gtimg.com/site/miniprogram-doc/doc-loading.png",
- "properties": [
- {
- "key": "delay",
- "type": ["Number"],
- "desc": "延迟显示加载效果的时间,用于防止请求速度过快引起的加载闪烁,单位:毫秒",
- "label": ""
- },
- {
- "key": "duration",
- "type": ["Number"],
- "desc": "加载动画执行完成一次的时间,单位:毫秒",
- "label": ""
- },
- {
- "key": "indicator",
- "type": ["Boolean"],
- "desc": "是否显示加载指示符",
- "label": ""
- },
- {
- "key": "inheritColor",
- "type": ["Boolean"],
- "desc": "是否继承父元素颜色",
- "label": ""
- },
- {
- "key": "layout",
- "type": ["String"],
- "desc": "对齐方式",
- "label": ""
- },
- {
- "key": "loading",
- "type": ["Boolean"],
- "desc": "是否处于加载状态",
- "label": ""
- },
- {
- "key": "pause",
- "type": ["Boolean"],
- "desc": "是否暂停动画",
- "label": ""
- },
- {
- "key": "progress",
- "type": ["Number"],
- "desc": "加载进度",
- "label": ""
- },
- {
- "key": "reverse",
- "type": ["Boolean"],
- "desc": "加载动画是否反向",
- "label": ""
- },
- {
- "key": "size",
- "type": ["String"],
- "desc": "尺寸,示例:40rpx/20px",
- "label": ""
- },
- {
- "key": "text",
- "type": ["String"],
- "desc": "加载提示文案",
- "label": ""
- },
- {
- "key": "theme",
- "type": ["String"],
- "desc": "加载组件类型",
- "label": ""
- }
- ],
- "externalClasses": ["t-class", "t-class-text", "t-class-indicator"],
- "tpl": "<t-loading theme=\"circular\" size=\"40rpx\"></t-loading>",
- "path": "./loading/loading"
- },
- "t-message": {
- "key": "t-message",
- "label": "全局提醒",
- "icon": "https://tdesign.gtimg.com/site/miniprogram-doc/doc-message.png",
- "properties": [
- {
- "key": "action",
- "type": ["String"],
- "desc": "操作",
- "label": ""
- },
- {
- "key": "align",
- "type": ["String"],
- "desc": "文本对齐方式",
- "label": ""
- },
- {
- "key": "closeBtn",
- "type": ["String", "Boolean"],
- "desc": "关闭按钮,可以自定义。值为 true 显示默认关闭按钮,值为 false 不显示关闭按钮。值类型为 string 则直接显示值,如:“关闭”。也可以完全自定义按钮",
- "label": ""
- },
- {
- "key": "content",
- "type": ["String"],
- "desc": "用于自定义消息弹出内容",
- "label": ""
- },
- {
- "key": "duration",
- "type": ["Number"],
- "desc": "消息内置计时器,计时到达时会触发 duration-end 事件。单位:毫秒。值为 0 则表示没有计时器。",
- "label": ""
- },
- {
- "key": "icon",
- "type": ["String", "Boolean"],
- "desc": "消息提醒前面的图标。值为 true 则根据 theme 显示对应的图标,值为 false 则不显示图标。值为 'info' 或 'bell' 则显示组件内置图标。也可以完全自定义图标节点",
- "label": ""
- },
- {
- "key": "marquee",
- "type": ["Boolean", "Object"],
- "desc": "跑马灯效果。speed 指速度控制;loop 指循环播放次数,值为 -1 表示循环播放,值为 0 表示不循环播放;delay 表示延迟多久开始播放",
- "label": ""
- },
- {
- "key": "offset",
- "type": ["Array"],
- "desc": "相对于 placement 的偏移量,示例:[-10, 20] 或 ['10rpx', '8rpx']",
- "label": ""
- },
- {
- "key": "theme",
- "type": ["String"],
- "desc": "消息组件风格",
- "label": ""
- },
- {
- "key": "visible",
- "type": ["Boolean"],
- "desc": "是否显示,隐藏时默认销毁组件",
- "label": ""
- },
- {
- "key": "zIndex",
- "type": ["Number"],
- "desc": "元素层级,样式默认为 5000",
- "label": ""
- }
- ],
- "externalClasses": ["t-class", "t-class-content", "t-class-icon", "t-class-action", "t-class-close-btn"],
- "events": [
- {
- "key": "bind:action-btn-click",
- "desc": "当操作按钮存在时,用户点击操作按钮时触发",
- "label": ""
- },
- {
- "key": "bind:close-btn-click",
- "desc": "当关闭按钮存在时,用户点击关闭按钮触发",
- "label": ""
- },
- {
- "key": "bind:duration-end",
- "desc": "计时结束后触发",
- "label": ""
- }
- ],
- "tpl": "<t-message id=\"t-message\" />",
- "path": "./message/message"
- },
- "t-navbar": {
- "key": "t-navbar",
- "label": "导航条",
- "icon": "https://tdesign.gtimg.com/site/miniprogram-doc/doc-navbar.png",
- "properties": [
- {
- "key": "animation",
- "type": ["Boolean"],
- "desc": "是否添加动画效果",
- "label": ""
- },
- {
- "key": "background",
- "type": ["String"],
- "desc": "背景",
- "label": ""
- },
- {
- "key": "delta",
- "type": ["Number"],
- "desc": "后退按钮后退层数,含义参考 [wx.navigateBack](https://developers.weixin.qq.com/miniprogram/dev/api/route/wx.navigateBack.html),特殊的,传入 0 不会发生执行 wx.navigateBack,只会触发一个 goback 事件供自行处理。",
- "label": ""
- },
- {
- "key": "fixed",
- "type": ["Boolean"],
- "desc": "是否固定在顶部",
- "label": ""
- },
- {
- "key": "homeIcon",
- "type": ["String"],
- "desc": "首页图标地址。值为 '' 或者 undefiend 则表示不显示返回图标,值为 'circle' 表示显示默认图标,值为 'slot' 表示使用插槽渲染,值为其他则表示图标地址",
- "label": ""
- },
- {
- "key": "leftIcon",
- "type": ["String"],
- "desc": "左侧图标地址,值为 '' 或者 undefiend 则表示不显示返回图标,值为 'arrow-left' 表示显示返回图标,值为 'slot' 表示使用插槽渲染,值为其他则表示图标地址",
- "label": ""
- },
- {
- "key": "title",
- "type": ["String"],
- "desc": "页面标题",
- "label": ""
- },
- {
- "key": "titleMaxLength",
- "type": ["Number"],
- "desc": "标题文字最大长度,超出的范围使用 `...` 表示",
- "label": ""
- },
- {
- "key": "visible",
- "type": ["Boolean"],
- "desc": "是否显示",
- "label": ""
- }
- ],
- "externalClasses": ["t-class", "t-class-title", "t-class-left-icon", "t-class-home-icon", "t-class-capsule"],
- "events": [
- {
- "key": "bind:complete",
- "desc": "navigateBack 执行完成后触发(失败或成功均会触发)",
- "label": ""
- },
- {
- "key": "bind:fail",
- "desc": "navigateBack 执行失败后触发",
- "label": ""
- },
- {
- "key": "bind:go-back",
- "desc": "delta 值为 0 时,点击返回,触发该事件",
- "label": ""
- },
- {
- "key": "bind:go-home",
- "desc": "点击 Home 触发",
- "label": ""
- },
- {
- "key": "bind:success",
- "desc": "navigateBack 执行成功后触发",
- "label": ""
- }
- ],
- "tpl": "<t-navbar title=\"标题\" />",
- "path": "./navbar/navbar"
- },
- "t-picker-item": {
- "key": "t-picker-item",
- "label": "选择器子项",
- "icon": "https://tdesign.gtimg.com/site/miniprogram-doc/doc-picker.png",
- "properties": [
- {
- "key": "format",
- "type": ["String"],
- "desc": "格式化标签",
- "label": ""
- },
- {
- "key": "options",
- "type": ["Array"],
- "desc": "数据源",
- "label": ""
- }
- ],
- "tpl": "<t-picker-item options=\"{{[{ label: '上海', value: '上海' },{ label: '广州', value: '广州' },{ label: '深圳', value: '深圳' }]}}\" value=\"广州\"></t-picker-item>",
- "path": "./picker/picker-item"
- },
- "t-picker": {
- "key": "t-picker",
- "label": "选择器",
- "icon": "https://tdesign.gtimg.com/site/miniprogram-doc/doc-picker.png",
- "properties": [
- {
- "key": "cancelBtn",
- "type": ["String", "Object"],
- "desc": "取消按钮文字",
- "label": ""
- },
- {
- "key": "confirmBtn",
- "type": ["String", "Object"],
- "desc": "确定按钮文字",
- "label": ""
- },
- {
- "key": "footer",
- "type": ["String"],
- "desc": "底部内容",
- "label": ""
- },
- {
- "key": "header",
- "type": ["Boolean"],
- "desc": "头部内容。值为 true 显示空白头部,值为 false 不显示任何内容,值类型为 TNode 表示自定义头部内容",
- "label": ""
- },
- {
- "key": "title",
- "type": ["String"],
- "desc": "标题",
- "label": ""
- },
- {
- "key": "value",
- "type": ["Array"],
- "desc": "选中值",
- "label": ""
- },
- {
- "key": "visible",
- "type": ["Boolean"],
- "desc": "是否显示",
- "label": ""
- }
- ],
- "events": [
- {
- "key": "bind:cancel",
- "desc": "点击取消按钮时触发",
- "label": ""
- },
- {
- "key": "bind:change",
- "desc": "选中变化时候触发",
- "label": ""
- },
- {
- "key": "bind:pick",
- "desc": "任何一列选中都会触发,不同的列参数不同。`context.column` 表示第几列变化,`context.index` 表示变化那一列的选中项下标",
- "label": ""
- }
- ],
- "tpl": "<t-picker visible=\"{{true}}\" cancelBtn=\"取消\" confirmBtn=\"确认\"><t-picker-item options=\"{{[{ label: '上海', value: '上海' },{ label: '广州', value: '广州' },{ label: '深圳', value: '深圳' }]}}\" value=\"广州\"></t-picker-item></t-picker>",
- "require": {
- "t-picker-item": "./picker/picker-item"
- },
- "path": "./picker/picker"
- },
- "t-popup": {
- "key": "t-popup",
- "label": "气泡框",
- "icon": "https://tdesign.gtimg.com/site/miniprogram-doc/doc-popup.png",
- "properties": [
- {
- "key": "closeBtn",
- "type": ["Boolean"],
- "desc": "关闭按钮,值类型为 Boolean 时表示是否显示关闭按钮。也可以自定义关闭按钮",
- "label": ""
- },
- {
- "key": "closeOnOverlayClick",
- "type": ["Boolean"],
- "desc": "点击遮罩层是否关闭",
- "label": ""
- },
- {
- "key": "content",
- "type": ["String"],
- "desc": "浮层里面的内容",
- "label": ""
- },
- {
- "key": "placement",
- "type": ["String"],
- "desc": "浮层出现位置",
- "label": ""
- },
- {
- "key": "preventScrollThrough",
- "type": ["Boolean"],
- "desc": "防止滚动穿透",
- "label": ""
- },
- {
- "key": "showOverlay",
- "type": ["Boolean"],
- "desc": "是否显示遮罩层",
- "label": ""
- },
- {
- "key": "transitionProps",
- "type": ["Object"],
- "desc": "动画效果定义",
- "label": ""
- },
- {
- "key": "visible",
- "type": ["Boolean"],
- "desc": "是否显示浮层",
- "label": ""
- },
- {
- "key": "zIndex",
- "type": ["Number"],
- "desc": "组件层级,Web 侧样式默认为 5500,移动端和小程序样式默认为 1500",
- "label": ""
- }
- ],
- "externalClasses": ["t-class", "t-class-overlay", "t-class-content"],
- "events": [
- {
- "key": "bind:visible-change",
- "desc": "当浮层隐藏或显示时触发",
- "label": ""
- }
- ],
- "tpl": "<t-popup visible=\"{{true}}\" placement=\"top\"><view style=\"width: 100vw; height: 35vh; background: #fff\" /></t-popup>",
- "path": "./popup/popup"
- },
- "t-progress": {
- "key": "t-progress",
- "label": "进度条",
- "icon": "https://tdesign.gtimg.com/site/miniprogram-doc/doc-progress.png",
- "properties": [
- {
- "key": "color",
- "type": ["String", "Object", "Array"],
- "desc": "进度条颜色。示例:'#ED7B2F' 或 'orange' 或 `['#f00', '#0ff', '#f0f']` 或 `{ '0%': '#f00', '100%': '#0ff' }` 或 `{ from: '#000', to: '#000' }` 等",
- "label": ""
- },
- {
- "key": "label",
- "type": ["String", "Boolean"],
- "desc": "进度百分比,可自定义",
- "label": ""
- },
- {
- "key": "percentage",
- "type": ["Number"],
- "desc": "进度条百分比",
- "label": ""
- },
- {
- "key": "size",
- "type": ["String", "Number"],
- "desc": "进度条尺寸,示例:small/medium/large/240。small 值为 72; medium 值为 112;large 值为 160",
- "label": ""
- },
- {
- "key": "status",
- "type": ["String"],
- "desc": "进度条状态",
- "label": ""
- },
- {
- "key": "strokeWidth",
- "type": ["String", "Number"],
- "desc": "进度条线宽。宽度数值不能超过 size 的一半,否则不能输出环形进度",
- "label": ""
- },
- {
- "key": "theme",
- "type": ["String"],
- "desc": "进度条风格。值为 line,标签(label)显示在进度条右侧;值为 plump,标签(label)显示在进度条里面;值为 circle,标签(label)显示在进度条正中间",
- "label": ""
- },
- {
- "key": "trackColor",
- "type": ["String"],
- "desc": "进度条未完成部分颜色",
- "label": ""
- }
- ],
- "tpl": "<t-progress></t-progress>",
- "path": "./progress/progress"
- },
- "t-pull-down-refresh": {
- "key": "t-pull-down-refresh",
- "label": "下拉刷新",
- "icon": "https://tdesign.gtimg.com/site/miniprogram-doc/doc-pulldownrefresh.png",
- "properties": [
- {
- "key": "loadingBarHeight",
- "type": ["String", "Number"],
- "desc": "加载中下拉高度,如果值为数字则单位是:'px'",
- "label": ""
- },
- {
- "key": "loadingProps",
- "type": ["Object"],
- "desc": "加载loading样式",
- "label": ""
- },
- {
- "key": "loadingTexts",
- "type": ["Array"],
- "desc": "提示语,组件内部默认值为 ['下拉刷新', '松手刷新', '正在刷新', '刷新完成']",
- "label": ""
- },
- {
- "key": "maxBarHeight",
- "type": ["String", "Number"],
- "desc": "最大下拉高度,如果值为数字则单位是:'px'",
- "label": ""
- },
- {
- "key": "refreshTimeout",
- "type": ["Number"],
- "desc": "刷新超时时间",
- "label": ""
- },
- {
- "key": "value",
- "type": ["Boolean"],
- "desc": "组件状态,值为 `true` 表示下拉状态,值为 `false` 表示收起状态",
- "label": ""
- }
- ],
- "externalClasses": ["t-class", "t-class-loading", "t-class-text", "t-class-indicator"],
- "events": [
- {
- "key": "bind:change",
- "desc": "下拉或收起时触发,用户手势往下滑动触发下拉状态,手势松开触发收起状态",
- "label": ""
- },
- {
- "key": "bind:refresh",
- "desc": "结束下拉时触发",
- "label": ""
- },
- {
- "key": "bind:timeout",
- "desc": "刷新超时触发",
- "label": ""
- }
- ],
- "tpl": "<t-pull-down-refresh id=\"pull-down-refresh\" loadingTexts=\"{{['继续拉哦', '该松手啦', '努力刷新中', '完成~']}}\"><view style=\"height: 300rpx; background: #fff; text-align: center\">拖拽该区域演示 中间下拉刷新</view></t-pull-down-refresh>",
- "path": "./pull-down-refresh/pull-down-refresh"
- },
- "t-radio-group": {
- "key": "t-radio-group",
- "label": "单选框组",
- "icon": "",
- "properties": [
- {
- "key": "disabled",
- "type": ["Boolean"],
- "desc": "是否禁用全部子单选框",
- "label": ""
- },
- {
- "key": "name",
- "type": ["String"],
- "desc": "HTML 元素原生属性",
- "label": ""
- },
- {
- "key": "options",
- "type": ["Array"],
- "desc": "单选组件按钮形式。RadioOption 数据类型为 string 或 number 时,表示 label 和 value 值相同",
- "label": ""
- },
- {
- "key": "value",
- "type": ["String", "Number", "Boolean"],
- "desc": "选中的值",
- "label": ""
- }
- ],
- "events": [
- {
- "key": "bind:change",
- "desc": "选中值发生变化时触发",
- "label": ""
- }
- ],
- "tpl": "<t-radio-group defaultValue=\"radio1\"><t-radio value=\"radio1\" label=\"单选\" /><t-radio value=\"radio2\" label=\"单选\" /></t-radio-group>",
- "require": {
- "t-radio": "./radio/radio"
- },
- "path": "./radio-group/radio-group"
- },
- "t-radio": {
- "key": "t-radio",
- "label": "单选框",
- "icon": "https://tdesign.gtimg.com/site/miniprogram-doc/doc-radio.png",
- "properties": [
- {
- "key": "align",
- "type": ["String"],
- "desc": "复选框和内容相对位置",
- "label": ""
- },
- {
- "key": "allowUncheck",
- "type": ["Boolean"],
- "desc": "是否允许取消选中",
- "label": ""
- },
- {
- "key": "checked",
- "type": ["Boolean"],
- "desc": "是否选中",
- "label": ""
- },
- {
- "key": "color",
- "type": ["String"],
- "desc": "单选按钮颜色",
- "label": ""
- },
- {
- "key": "content",
- "type": ["String"],
- "desc": "单选内容",
- "label": ""
- },
- {
- "key": "contentDisabled",
- "type": ["Boolean"],
- "desc": "是否禁用组件内容(content)触发选中",
- "label": ""
- },
- {
- "key": "disabled",
- "type": ["Boolean"],
- "desc": "是否为禁用态",
- "label": ""
- },
- {
- "key": "icon",
- "type": ["String", "Array"],
- "desc": "自定义选中图标和非选中图标。示例:[选中态图标,非选中态图标]。值为 fill-circle 表示图标为填充型图标,值为 stroke-line 表示图标为描边型图标",
- "label": ""
- },
- {
- "key": "label",
- "type": ["String"],
- "desc": "主文案",
- "label": ""
- },
- {
- "key": "maxContentRow",
- "type": ["Number"],
- "desc": "内容最大行数限制",
- "label": ""
- },
- {
- "key": "maxLabelRow",
- "type": ["Number"],
- "desc": "主文案最大行数限制",
- "label": ""
- },
- {
- "key": "name",
- "type": ["String"],
- "desc": "HTML 元素原生属性",
- "label": ""
- },
- {
- "key": "value",
- "type": ["String", "Number", "Boolean"],
- "desc": "单选按钮的值",
- "label": ""
- }
- ],
- "externalClasses": ["t-class", "t-class-icon", "t-class-label", "t-class-content", "t-class-border"],
- "events": [
- {
- "key": "bind:change",
- "desc": "值变化时触发",
- "label": ""
- }
- ],
- "tpl": "<t-radio value=\"radio\" label=\"单选\" />",
- "path": "./radio/radio"
- },
- "t-rate": {
- "key": "t-rate",
- "label": "评分",
- "icon": "https://tdesign.gtimg.com/site/miniprogram-doc/doc-rate.png",
- "properties": [
- {
- "key": "allowHalf",
- "type": ["Boolean"],
- "desc": "是否允许半选",
- "label": ""
- },
- {
- "key": "color",
- "type": ["String", "Array"],
- "desc": "评分图标的颜色,样式中默认为 #ED7B2F。一个值表示设置选中高亮的五角星颜色,示例:[选中颜色]。数组则表示分别设置 选中高亮的五角星颜色 和 未选中暗灰的五角星颜色,[选中颜色,未选中颜色]。示例:['#ED7B2F', '#E3E6EB']",
- "label": ""
- },
- {
- "key": "count",
- "type": ["Number"],
- "desc": "评分的数量",
- "label": ""
- },
- {
- "key": "disabled",
- "type": ["Boolean"],
- "desc": "是否禁用评分",
- "label": ""
- },
- {
- "key": "gap",
- "type": ["Number"],
- "desc": "评分图标的间距",
- "label": ""
- },
- {
- "key": "showText",
- "type": ["Boolean"],
- "desc": "是否显示对应的辅助文字",
- "label": ""
- },
- {
- "key": "size",
- "type": ["String"],
- "desc": "评分图标的大小,示例:`20`",
- "label": ""
- },
- {
- "key": "texts",
- "type": ["Array"],
- "desc": "评分等级对应的辅助文字。组件内置默认值为:['极差', '失望', '一般', '满意', '惊喜']。自定义值示例:['1分', '2分', '3分', '4分', '5分']",
- "label": ""
- },
- {
- "key": "value",
- "type": ["Number"],
- "desc": "选择评分的值",
- "label": ""
- },
- {
- "key": "variant",
- "type": ["String"],
- "desc": "形状类型,有描边类型和填充类型两种",
- "label": ""
- }
- ],
- "events": [
- {
- "key": "bind:change",
- "desc": "评分数改变时触发",
- "label": ""
- }
- ],
- "tpl": "<t-rate defaultValue=\"{{4}}\" variant=\"filled\"></t-rate>",
- "path": "./rate/rate"
- },
- "t-search": {
- "key": "t-search",
- "label": "搜索",
- "icon": "https://tdesign.gtimg.com/site/miniprogram-doc/doc-search.png",
- "properties": [
- {
- "key": "action",
- "type": ["String"],
- "desc": "自定义右侧操作按钮文字",
- "label": ""
- },
- {
- "key": "center",
- "type": ["Boolean"],
- "desc": "是否居中",
- "label": ""
- },
- {
- "key": "disabled",
- "type": ["Boolean"],
- "desc": "是否禁用",
- "label": ""
- },
- {
- "key": "focus",
- "type": ["Boolean"],
- "desc": "是否聚焦",
- "label": ""
- },
- {
- "key": "label",
- "type": ["String"],
- "desc": "左侧文本",
- "label": ""
- },
- {
- "key": "leftIcon",
- "type": ["String"],
- "desc": "左侧图标",
- "label": ""
- },
- {
- "key": "placeholder",
- "type": ["String"],
- "desc": "占位符",
- "label": ""
- },
- {
- "key": "rightIcon",
- "type": ["String"],
- "desc": "右侧图标",
- "label": ""
- },
- {
- "key": "shape",
- "type": ["String"],
- "desc": "搜索框形状",
- "label": ""
- },
- {
- "key": "value",
- "type": ["String"],
- "desc": "值",
- "label": ""
- }
- ],
- "externalClasses": [
- "t-class",
- "t-class-input",
- "t-class-input-container",
- "t-class-cancel",
- "t-class-left",
- "t-class-right"
- ],
- "events": [
- {
- "key": "bind:action-click",
- "desc": "点击右侧操作按钮文字时触发",
- "label": ""
- },
- {
- "key": "bind:blur",
- "desc": "失去焦点时触发",
- "label": ""
- },
- {
- "key": "bind:change",
- "desc": "值发生变化时触发",
- "label": ""
- },
- {
- "key": "bind:clear",
- "desc": "点击清除时触发",
- "label": ""
- },
- {
- "key": "bind:focus",
- "desc": "聚焦时触发",
- "label": ""
- },
- {
- "key": "bind:submit",
- "desc": "提交时触发",
- "label": ""
- }
- ],
- "tpl": "<t-search></t-search>",
- "path": "./search/search"
- },
- "t-skeleton": {
- "key": "t-skeleton",
- "label": "骨架屏",
- "icon": "https://tdesign.gtimg.com/site/miniprogram-doc/doc-skeleton.png",
- "properties": [
- {
- "key": "animation",
- "type": ["String"],
- "desc": "动画效果,有「渐变加载动画」和「闪烁加载动画」两种。值为 'none' 则表示没有动画",
- "label": ""
- },
- {
- "key": "delay",
- "type": ["Number"],
- "desc": "【开发中】延迟显示加载效果的时间,用于防止请求速度过快引起的加载闪烁,单位:毫秒",
- "label": ""
- },
- {
- "key": "loading",
- "type": ["Boolean"],
- "desc": "是否为加载状态,如果是则显示骨架图,如果不是则显示加载完成的内容",
- "label": ""
- },
- {
- "key": "rowCol",
- "type": ["Array"],
- "desc": "用于设置行列数量、宽度高度、间距等。【示例一】,`[1, 1, 2]` 表示输出三行骨架图,第一行一列,第二行一列,第三行两列。【示例二】,`[1, 1, { width: '100px' }]` 表示自定义第三行的宽度为 `100px`。【示例三】,`[1, 2, [{ width, height }, { width, height, marginLeft }]]` 表示第三行有两列,且自定义宽度、高度和间距",
- "label": ""
- },
- {
- "key": "theme",
- "type": ["String"],
- "desc": "骨架图风格,有基础、头像组合等两大类",
- "label": ""
- }
- ],
- "externalClasses": ["t-class", "t-class-avatar", "t-class-image", "t-class-text"],
- "tpl": "<t-skeleton rowCol=\"{{ [{ width: '686rpx', height: '32rpx' }, 1, 1, { width: '380rpx', height: '32rpx' }]}}\" loading></t-skeleton>",
- "path": "./skeleton/skeleton"
- },
- "t-slider": {
- "key": "t-slider",
- "label": "滑块",
- "icon": "https://tdesign.gtimg.com/site/miniprogram-doc/doc-slider.png",
- "properties": [
- {
- "key": "colors",
- "type": ["Array"],
- "desc": "颜色,[已选择, 未选择]",
- "label": ""
- },
- {
- "key": "disabled",
- "type": ["Boolean"],
- "desc": "是否禁用组件",
- "label": ""
- },
- {
- "key": "disabledColor",
- "type": ["Array"],
- "desc": "禁用状态滑动条的颜色,[已选, 未选]",
- "label": ""
- },
- {
- "key": "label",
- "type": ["String", "Boolean"],
- "desc": "滑块当前值文本。<br />值为 true 显示默认文案;值为 false 不显示滑块当前值文本;<br />值为 `${value}%` 则表示组件会根据占位符渲染文案;<br />值类型为函数时,参数 `value` 标识滑块值,参数 `position=start` 表示范围滑块的起始值,参数 `position=end` 表示范围滑块的终点值",
- "label": ""
- },
- {
- "key": "marks",
- "type": ["Object", "Array"],
- "desc": "刻度标记,示例:`[0, 10, 40, 200]` 或者 `{ 5: '5¥', 10: '10%' }`",
- "label": ""
- },
- {
- "key": "max",
- "type": ["Number"],
- "desc": "滑块范围最大值",
- "label": ""
- },
- {
- "key": "min",
- "type": ["Number"],
- "desc": "滑块范围最小值",
- "label": ""
- },
- {
- "key": "range",
- "type": ["Boolean"],
- "desc": "双游标滑块",
- "label": ""
- },
- {
- "key": "showExtremeValue",
- "type": ["Boolean"],
- "desc": "是否边界值",
- "label": ""
- },
- {
- "key": "step",
- "type": ["Number"],
- "desc": "步长",
- "label": ""
- },
- {
- "key": "value",
- "type": ["Number", "Array"],
- "desc": "滑块值",
- "label": ""
- }
- ],
- "externalClasses": ["t-class", "t-class-bar", "t-class-bar-active", "t-class-bar-disabled", "t-class-cursor"],
- "events": [
- {
- "key": "bind:change",
- "desc": "滑块值变化时触发",
- "label": ""
- },
- {
- "key": "bind:dragend",
- "desc": "结束拖动时触发",
- "label": ""
- },
- {
- "key": "bind:dragstart",
- "desc": "开始拖动时触发",
- "label": ""
- }
- ],
- "tpl": "<t-slider />",
- "path": "./slider/slider"
- },
- "t-step-item": {
- "key": "t-step-item",
- "label": "步骤",
- "icon": "https://tdesign.gtimg.com/site/miniprogram-doc/doc-steps.png",
- "properties": [
- {
- "key": "content",
- "type": ["String"],
- "desc": "步骤描述",
- "label": ""
- },
- {
- "key": "icon",
- "type": ["String"],
- "desc": "图标。传入 slot 代表使用插槽,其他字符串代表使用内置图标",
- "label": ""
- },
- {
- "key": "status",
- "type": ["String"],
- "desc": "当前步骤的状态",
- "label": ""
- },
- {
- "key": "subStepItems",
- "type": ["Array"],
- "desc": "子步骤条,仅支持 layout = 'vertical' 时",
- "label": ""
- },
- {
- "key": "title",
- "type": ["String"],
- "desc": "标题",
- "label": ""
- }
- ],
- "externalClasses": ["t-class", "t-class-content", "t-class-title", "t-class-description", "t-class-extra"],
- "tpl": "<t-step-item title=\"步骤描述\"></t-step-item>",
- "path": "./steps/step-item"
- },
- "t-stepper": {
- "key": "t-stepper",
- "label": "步进器",
- "icon": "https://tdesign.gtimg.com/site/miniprogram-doc/doc-stepper.png",
- "properties": [
- {
- "key": "disabled",
- "type": ["Boolean"],
- "desc": "禁用全部操作",
- "label": ""
- },
- {
- "key": "disableInput",
- "type": ["Boolean"],
- "desc": "禁用输入框",
- "label": ""
- },
- {
- "key": "inputWidth",
- "type": ["Number"],
- "desc": "输入框宽度",
- "label": ""
- },
- {
- "key": "max",
- "type": ["Number"],
- "desc": "最大值",
- "label": ""
- },
- {
- "key": "min",
- "type": ["Number"],
- "desc": "最小值",
- "label": ""
- },
- {
- "key": "step",
- "type": ["Number"],
- "desc": "步长",
- "label": ""
- },
- {
- "key": "theme",
- "type": ["String"],
- "desc": "组件风格",
- "label": ""
- },
- {
- "key": "value",
- "type": ["String", "Number"],
- "desc": "值",
- "label": ""
- }
- ],
- "externalClasses": ["t-class", "t-class-input", "t-class-add", "t-class-minus"],
- "events": [
- {
- "key": "bind:blur",
- "desc": "输入框失去焦点时触发",
- "label": ""
- },
- {
- "key": "bind:change",
- "desc": "数值发生变更时触发",
- "label": ""
- },
- {
- "key": "bind:overlimit",
- "desc": "数值超出限制时触发",
- "label": ""
- }
- ],
- "tpl": "<t-stepper />",
- "path": "./stepper/stepper"
- },
- "t-steps": {
- "key": "t-steps",
- "label": "步骤条",
- "icon": "https://tdesign.gtimg.com/site/miniprogram-doc/doc-steps.png",
- "properties": [
- {
- "key": "current",
- "type": ["String", "Number"],
- "desc": "当前步骤,即整个步骤条进度。默认根据步骤下标判断步骤的完成状态,当前步骤为进行中,当前步骤之前的步骤为已完成,当前步骤之后的步骤为未开始。如果每个步骤没有设置 value,current 值为步骤长度则表示所有步骤已完成。如果每个步骤设置了自定义 value,则 current = 'FINISH' 表示所有状态完成",
- "label": ""
- },
- {
- "key": "currentStatus",
- "type": ["String"],
- "desc": "用于控制 current 指向的步骤条的状态",
- "label": ""
- },
- {
- "key": "layout",
- "type": ["String"],
- "desc": "步骤条方向,有两种:横向和纵向",
- "label": ""
- },
- {
- "key": "readonly",
- "type": ["Boolean"],
- "desc": "只读状态",
- "label": ""
- },
- {
- "key": "separator",
- "type": ["String"],
- "desc": "步骤条分割符",
- "label": ""
- },
- {
- "key": "theme",
- "type": ["String"],
- "desc": "步骤条风格",
- "label": ""
- }
- ],
- "externalClasses": ["t-class"],
- "events": [
- {
- "key": "bind:change",
- "desc": "当前步骤发生变化时触发",
- "label": ""
- }
- ],
- "tpl": "<t-steps><t-step-item title=\"步骤描述1\" /><t-step-item title=\"步骤描述2\" /></t-steps>",
- "require": {
- "t-step-item": "./steps/step-item"
- },
- "path": "./steps/steps"
- },
- "t-sticky": {
- "key": "t-sticky",
- "label": "吸顶容器",
- "icon": "https://tdesign.gtimg.com/site/miniprogram-doc/doc-sticky.png",
- "properties": [
- {
- "key": "container",
- "type": ["String"],
- "desc": "函数返回容器对应的 NodesRef 节点,将对应节点指定为组件的外部容器,滚动时组件会始终保持在容器范围内,当组件即将超出容器底部时,会返回原位置。",
- "label": ""
- },
- {
- "key": "disabled",
- "type": ["Boolean"],
- "desc": "是否禁用组件",
- "label": ""
- },
- {
- "key": "offsetTop",
- "type": ["String", "Number"],
- "desc": "吸顶时与顶部的距离,单位`px`",
- "label": ""
- },
- {
- "key": "zIndex",
- "type": ["Number"],
- "desc": "吸顶时的 z-index",
- "label": ""
- }
- ],
- "externalClasses": ["t-class"],
- "events": [
- {
- "key": "bind:scroll",
- "desc": "滚动时触发,scrollTop: 距离顶部位置,isFixed: 是否吸顶",
- "label": ""
- }
- ],
- "tpl": "<t-sticky></t-sticky>",
- "path": "./sticky/sticky"
- },
- "t-swipe-cell": {
- "key": "t-swipe-cell",
- "label": "滑动操作",
- "icon": "https://tdesign.gtimg.com/site/miniprogram-doc/doc-swipecell.png",
- "properties": [
- {
- "key": "disabled",
- "type": ["Boolean"],
- "desc": "是否禁用滑动",
- "label": ""
- },
- {
- "key": "expanded",
- "type": ["String"],
- "desc": "操作项是否呈现为打开态",
- "label": ""
- },
- {
- "key": "left",
- "type": ["Array"],
- "desc": "左侧滑动操作项。所有行为同 `right`",
- "label": ""
- },
- {
- "key": "right",
- "type": ["Array"],
- "desc": "右侧滑动操作项。有两种定义方式,一种是使用数组,二种是使用插槽。`right.text` 表示操作文本,`right.className` 表示操作项类名,`right.style` 表示操作项样式,`right.onClick` 表示点击操作项后执行的回调函数。示例:`[{ text: '删除', style: 'background-color: red', onClick: () => {} }]`",
- "label": ""
- }
- ],
- "events": [
- {
- "key": "bind:click",
- "desc": "操作项点击时触发(插槽写法组件不触发,业务侧自定义内容和事件)",
- "label": ""
- }
- ],
- "tpl": "<t-swipe-cell><t-cell title=\"列表-左滑单操作\" note=\"辅助信息\" /><view slot=\"right\">删除</view></t-swipe-cell>",
- "require": {
- "t-cell": "./cell/cell"
- },
- "path": "./swipe-cell/swipe-cell"
- },
- "t-swiper": {
- "key": "t-swiper",
- "label": "轮播",
- "icon": "https://tdesign.gtimg.com/site/miniprogram-doc/doc-swiper.png",
- "properties": [
- {
- "key": "animation",
- "type": ["String"],
- "desc": "轮播切换动画效果类型",
- "label": ""
- },
- {
- "key": "autoplay",
- "type": ["Boolean"],
- "desc": "是否自动播放",
- "label": ""
- },
- {
- "key": "current",
- "type": ["Number"],
- "desc": "当前轮播在哪一项(下标)",
- "label": ""
- },
- {
- "key": "direction",
- "type": ["String"],
- "desc": "轮播滑动方向,包括横向滑动和纵向滑动两个方向",
- "label": ""
- },
- {
- "key": "duration",
- "type": ["Number"],
- "desc": "滑动动画时长",
- "label": ""
- },
- {
- "key": "height",
- "type": ["Number"],
- "desc": "当使用垂直方向滚动时的高度",
- "label": ""
- },
- {
- "key": "interval",
- "type": ["Number"],
- "desc": "轮播间隔时间",
- "label": ""
- },
- {
- "key": "loop",
- "type": ["Boolean"],
- "desc": "是否循环播放",
- "label": ""
- },
- {
- "key": "navigation",
- "type": ["Object"],
- "desc": "导航器全部配置",
- "label": ""
- }
- ],
- "events": [
- {
- "key": "bind:change",
- "desc": "轮播切换时触发",
- "label": ""
- }
- ],
- "tpl": "<t-swiper current=\"{{1}}\" autoplay=\"{{true}}\" duration=\"{{500}}\" interval=\"{{5000}}\" navigation><t-swiper-item wx:for=\"{{[{image: 'https://tdesign.gtimg.com/site/swiper/01.png'},{image: 'https://tdesign.gtimg.com/site/swiper/02.png'}]}}\" wx:key=\"index\"><image src=\"{{item.image}}\" style=\"width: 100%; height: 100%\" /></t-swiper-item></t-swiper>",
- "require": {
- "t-swiper-item": "./swiper/swiper-item"
- },
- "path": "./swiper/swiper"
- },
- "t-switch": {
- "key": "t-switch",
- "label": "开关",
- "icon": "https://tdesign.gtimg.com/site/miniprogram-doc/doc-switch.png",
- "properties": [
- {
- "key": "colors",
- "type": ["Array"],
- "desc": "自定义颜色,[打开时的颜色,关闭时的颜色]。组件默认颜色为 ['#0052d9', 'rgba(0, 0, 0, .26']。示例:[blue, gray]",
- "label": ""
- },
- {
- "key": "customValue",
- "type": ["Array"],
- "desc": "开关内容,[打开时的值,关闭时的值]。默认为 [true, false]。示例:[1, 0]",
- "label": ""
- },
- {
- "key": "disabled",
- "type": ["Boolean"],
- "desc": "是否禁用组件",
- "label": ""
- },
- {
- "key": "label",
- "type": ["String"],
- "desc": "开关的标签",
- "label": ""
- },
- {
- "key": "loading",
- "type": ["Boolean"],
- "desc": "是否处于加载中状态",
- "label": ""
- },
- {
- "key": "size",
- "type": ["String"],
- "desc": "开关尺寸",
- "label": ""
- },
- {
- "key": "value",
- "type": ["String", "Number", "Boolean"],
- "desc": "开关值",
- "label": ""
- }
- ],
- "events": [
- {
- "key": "bind:change",
- "desc": "数据发生变化时触发",
- "label": ""
- }
- ],
- "tpl": "<t-switch defaultValue=\"{{true}}\" />",
- "path": "./switch/switch"
- },
- "t-tab-bar-item": {
- "key": "t-tab-bar-item",
- "label": "标签栏选项",
- "icon": "https://tdesign.gtimg.com/site/miniprogram-doc/doc-tabbar.png",
- "properties": [
- {
- "key": "badgeProps",
- "type": ["Object"],
- "desc": "图标右上角提示信息",
- "label": ""
- },
- {
- "key": "icon",
- "type": ["String"],
- "desc": "图标名称",
- "label": ""
- },
- {
- "key": "subTabBar",
- "type": ["Array"],
- "desc": "二级菜单",
- "label": ""
- },
- {
- "key": "value",
- "type": ["String", "Number"],
- "desc": "标识符",
- "label": ""
- }
- ],
- "tpl": "<t-tab-bar-item wx:for=\"{{[{value: 'label_1',label: '标签栏一',icon: 'app'},{value: 'label_2',label: '标签栏二',icon: 'app'}]}}\" wx:for-item=\"item\" wx:for-index=\"index\" wx:key=\"index\" value=\"{{item.value}}\">{{item.label}}</t-tab-bar-item>",
- "path": "./tab-bar/tab-bar-item"
- },
- "t-tab-bar": {
- "key": "t-tab-bar",
- "label": "标签栏",
- "icon": "https://tdesign.gtimg.com/site/miniprogram-doc/doc-tabbar.png",
- "properties": [
- {
- "key": "bordered",
- "type": ["Boolean"],
- "desc": "是否显示外边框",
- "label": ""
- },
- {
- "key": "color",
- "type": ["Array"],
- "desc": "标签颜色设置。示例:[选中标签的颜色, 未选中的标签颜色]",
- "label": ""
- },
- {
- "key": "fixed",
- "type": ["Boolean"],
- "desc": "是否固定在底部",
- "label": ""
- },
- {
- "key": "safeAreaInsetBottom",
- "type": ["Boolean"],
- "desc": "是否为 iPhoneX 留出底部安全距离",
- "label": ""
- },
- {
- "key": "split",
- "type": ["Boolean"],
- "desc": "是否需要分割线",
- "label": ""
- },
- {
- "key": "value",
- "type": ["String", "Number", "Array"],
- "desc": "当前选中标签的索引",
- "label": ""
- }
- ],
- "externalClasses": ["t-class"],
- "events": [
- {
- "key": "bind:change",
- "desc": "选中标签切换时触发",
- "label": ""
- }
- ],
- "tpl": "<t-tab-bar value=\"label_1\"><t-tab-bar-item wx:for=\"{{[{value: 'label_1',label: '标签栏一',icon: 'app'},{value: 'label_2',label: '标签栏二',icon: 'app'}]}}\" wx:for-item=\"item\" wx:for-index=\"index\" wx:key=\"index\" value=\"{{item.value}}\">{{item.label}}</t-tab-bar-item></t-tab-bar>",
- "require": {
- "t-tab-bar-item": "./tab-bar/tab-bar-item"
- },
- "path": "./tab-bar/tab-bar"
- },
- "t-tab-panel": {
- "key": "t-tab-panel",
- "label": "选项卡面板",
- "icon": "https://tdesign.gtimg.com/site/miniprogram-doc/doc-tabs.png",
- "properties": [
- {
- "key": "destroyOnHide",
- "type": ["Boolean"],
- "desc": "选项卡内容隐藏时是否销毁",
- "label": ""
- },
- {
- "key": "disabled",
- "type": ["Boolean"],
- "desc": "是否禁用当前选项卡",
- "label": ""
- },
- {
- "key": "label",
- "type": ["String"],
- "desc": "选项卡名称",
- "label": ""
- },
- {
- "key": "panel",
- "type": ["String"],
- "desc": "用于自定义选项卡面板内容",
- "label": ""
- },
- {
- "key": "value",
- "type": ["String", "Number"],
- "desc": "选项卡的值,唯一标识",
- "label": ""
- }
- ],
- "tpl": "<t-tab-panel label=\"标签页一\" value=\"0\">标签一内容</t-tab-panel>",
- "path": "./tabs/tab-panel"
- },
- "t-tabs": {
- "key": "t-tabs",
- "label": "选项卡",
- "icon": "https://tdesign.gtimg.com/site/miniprogram-doc/doc-tabs.png",
- "properties": [
- {
- "key": "animation",
- "type": ["Object"],
- "desc": "动画效果设置。其中 duration 表示动画时长",
- "label": ""
- },
- {
- "key": "placement",
- "type": ["String"],
- "desc": "选项卡位置",
- "label": ""
- },
- {
- "key": "showBottomLine",
- "type": ["Boolean"],
- "desc": "是否展示底部激活线条",
- "label": ""
- },
- {
- "key": "stickyProps",
- "type": ["Object"],
- "desc": "是否支持吸顶",
- "label": ""
- },
- {
- "key": "value",
- "type": ["String", "Number"],
- "desc": "激活的选项卡值",
- "label": ""
- }
- ],
- "externalClasses": ["t-class", "t-class-item", "t-class-active", "t-class-track"],
- "events": [
- {
- "key": "bind:change",
- "desc": "激活的选项卡发生变化时触发",
- "label": ""
- }
- ],
- "tpl": "<t-tabs defaultValue=\"{{0}}\"><t-tab-panel label=\"标签页一\" value=\"0\">标签一内容</t-tab-panel><t-tab-panel label=\"标签页二\" value=\"1\">标签二内容</t-tab-panel></t-tabs>",
- "require": {
- "t-tab-panel": "./tabs/tab-panel"
- },
- "path": "./tabs/tabs"
- },
- "t-tag": {
- "key": "t-tag",
- "label": "标签",
- "icon": "https://tdesign.gtimg.com/site/miniprogram-doc/doc-tag.png",
- "properties": [
- {
- "key": "closable",
- "type": ["Boolean"],
- "desc": "标签是否可关闭",
- "label": ""
- },
- {
- "key": "disabled",
- "type": ["Boolean"],
- "desc": "标签禁用态,失效标签不能触发事件。默认风格(theme=default)才有禁用态",
- "label": ""
- },
- {
- "key": "icon",
- "type": ["String"],
- "desc": "标签中的图标,可自定义图标呈现",
- "label": ""
- },
- {
- "key": "maxWidth",
- "type": ["String", "Number"],
- "desc": "标签最大宽度,宽度超出后会出现省略号。示例:'50px' / 80",
- "label": ""
- },
- {
- "key": "shape",
- "type": ["String"],
- "desc": "标签类型,有三种:方形、圆角方形、标记型",
- "label": ""
- },
- {
- "key": "size",
- "type": ["String"],
- "desc": "标签尺寸",
- "label": ""
- },
- {
- "key": "theme",
- "type": ["String"],
- "desc": "组件风格,用于描述组件不同的应用场景",
- "label": ""
- },
- {
- "key": "variant",
- "type": ["String"],
- "desc": "标签风格变体",
- "label": ""
- }
- ],
- "externalClasses": ["t-class"],
- "events": [
- {
- "key": "bind:click",
- "desc": "点击时触发",
- "label": ""
- },
- {
- "key": "bind:close",
- "desc": "如果关闭按钮存在,点击关闭按钮时触发",
- "label": ""
- }
- ],
- "tpl": "<t-tag theme=\"primary\">重要</t-tag>",
- "path": "./tag/tag"
- },
- "t-textarea": {
- "key": "t-textarea",
- "label": "文本输入框",
- "icon": "https://tdesign.gtimg.com/site/miniprogram-doc/doc-textarea.png",
- "properties": [
- {
- "key": "adjustPosition",
- "type": ["Boolean"],
- "desc": "键盘弹起时,是否自动上推页面",
- "label": ""
- },
- {
- "key": "autofocus",
- "type": ["Boolean"],
- "desc": "自动聚焦,拉起键盘",
- "label": ""
- },
- {
- "key": "autosize",
- "type": ["Boolean"],
- "desc": "是否自动增高,值为 autosize 时,style.height 不生效",
- "label": ""
- },
- {
- "key": "confirmHold",
- "type": ["Boolean"],
- "desc": "点击键盘右下角按钮时是否保持键盘不收起点",
- "label": ""
- },
- {
- "key": "confirmType",
- "type": ["String"],
- "desc": "设置键盘右下角按钮的文字,仅在 type='text'时生效",
- "label": ""
- },
- {
- "key": "disabled",
- "type": ["Boolean"],
- "desc": "是否禁用文本框",
- "label": ""
- },
- {
- "key": "focus",
- "type": ["Boolean"],
- "desc": "自动聚焦",
- "label": ""
- },
- {
- "key": "label",
- "type": ["String"],
- "desc": "左侧文本",
- "label": ""
- },
- {
- "key": "maxcharacter",
- "type": ["Number"],
- "desc": "用户最多可以输入的字符个数,一个中文汉字表示两个字符长度",
- "label": ""
- },
- {
- "key": "maxlength",
- "type": ["Number"],
- "desc": "用户最多可以输入的字符个数",
- "label": ""
- },
- {
- "key": "placeholder",
- "type": ["String"],
- "desc": "占位符",
- "label": ""
- },
- {
- "key": "value",
- "type": ["String"],
- "desc": "文本框值",
- "label": ""
- }
- ],
- "externalClasses": ["t-class", "t-class-textarea", "t-class-placeholder", "t-class-name"],
- "events": [
- {
- "key": "bind:blur",
- "desc": "失去焦点时触发",
- "label": ""
- },
- {
- "key": "bind:change",
- "desc": "输入内容变化时触发",
- "label": ""
- },
- {
- "key": "bind:enter",
- "desc": "点击完成时触发",
- "label": ""
- },
- {
- "key": "bind:focus",
- "desc": "获得焦点时触发",
- "label": ""
- },
- {
- "key": "bind:line-change",
- "desc": "行高发生变化时触发",
- "label": ""
- }
- ],
- "tpl": "<t-textarea />",
- "path": "./textarea/textarea"
- },
- "t-toast": {
- "key": "t-toast",
- "label": "轻提示",
- "icon": "https://tdesign.gtimg.com/site/miniprogram-doc/doc-toast.png",
- "properties": [
- {
- "key": "direction",
- "type": ["String"],
- "desc": "图标排列方式",
- "label": ""
- },
- {
- "key": "duration",
- "type": ["Number"],
- "desc": "弹窗显示毫秒数",
- "label": ""
- },
- {
- "key": "icon",
- "type": ["String"],
- "desc": "自定义图标",
- "label": ""
- },
- {
- "key": "message",
- "type": ["String"],
- "desc": "弹窗显示文字",
- "label": ""
- },
- {
- "key": "overlayProps",
- "type": ["Object"],
- "desc": "遮罩层属性,透传至 Overlay",
- "label": ""
- },
- {
- "key": "placement",
- "type": ["String"],
- "desc": "弹窗展示位置",
- "label": ""
- },
- {
- "key": "preventScrollThrough",
- "type": ["Boolean"],
- "desc": "防止滚动穿透,即不允许点击和滚动",
- "label": ""
- },
- {
- "key": "showOverlay",
- "type": ["Boolean"],
- "desc": "是否显示遮罩层",
- "label": ""
- },
- {
- "key": "theme",
- "type": ["String"],
- "desc": "提示类型",
- "label": ""
- }
- ],
- "externalClasses": ["t-class"],
- "tpl": "<t-toast id=\"t-toast\" />",
- "path": "./toast/toast"
- },
- "t-transition": {
- "key": "t-transition",
- "label": "动画",
- "icon": "",
- "properties": [
- {
- "key": "appear",
- "type": ["Boolean"],
- "desc": "首次出现是否展示动画",
- "label": ""
- },
- {
- "key": "customClass",
- "type": ["String"],
- "desc": "自定义容器类名",
- "label": ""
- },
- {
- "key": "destoryOnClose",
- "type": ["Boolean"],
- "desc": "隐藏时是否销毁内容",
- "label": ""
- },
- {
- "key": "duration",
- "type": ["Number"],
- "desc": "指定过渡时间",
- "label": ""
- },
- {
- "key": "name",
- "type": ["String"],
- "desc": "过渡类名",
- "label": ""
- },
- {
- "key": "visible",
- "type": ["Boolean"],
- "desc": "是否显示",
- "label": ""
- }
- ],
- "tpl": "<t-transition visible appear></t-transition>",
- "path": "./transition/transition"
- },
- "t-upload": {
- "key": "t-upload",
- "label": "上传",
- "icon": "https://tdesign.gtimg.com/site/miniprogram-doc/doc-upload.png",
- "properties": [
- {
- "key": "addContent",
- "type": ["String"],
- "desc": "添加按钮内容。值为空,使用默认图标渲染;值为 slot 则表示使用插槽渲染;其他值无效。",
- "label": ""
- },
- {
- "key": "allowUploadDuplicateFile",
- "type": ["Boolean"],
- "desc": "是否允许重复上传相同文件名的文件",
- "label": ""
- },
- {
- "key": "config",
- "type": ["Object"],
- "desc": "图片上传配置,视频上传配置,文件上传配置等,包含图片尺寸、图片来源、视频来源、视频拍摄最长时间等。更多细节查看小程序官网。[图片上传](https://developers.weixin.qq.com/miniprogram/dev/api/media/image/wx.chooseImage.html)。[视频上传](https://developers.weixin.qq.com/miniprogram/dev/api/media/video/wx.chooseVideo.html)",
- "label": ""
- },
- {
- "key": "deleteBtn",
- "type": ["String"],
- "desc": "删除图标。值为空,使用默认图标渲染;值为 slot 则表示使用插槽渲染;其他值无效。",
- "label": ""
- },
- {
- "key": "fileListDisplay",
- "type": ["String"],
- "desc": "用于完全自定义文件列表内容",
- "label": ""
- },
- {
- "key": "files",
- "type": ["Array"],
- "desc": "已上传文件列表",
- "label": ""
- },
- {
- "key": "gridConfig",
- "type": ["Object"],
- "desc": "upload组件每行上传图片列数以及图片的宽度和高度",
- "label": ""
- },
- {
- "key": "gutter",
- "type": ["Number"],
- "desc": "预览窗格的 `gutter` 大小,单位 rpx",
- "label": ""
- },
- {
- "key": "imageProps",
- "type": ["Object"],
- "desc": "透传 Image 组件全部属性",
- "label": ""
- },
- {
- "key": "max",
- "type": ["Number"],
- "desc": "用于控制文件上传数量,值为 0 则不限制",
- "label": ""
- },
- {
- "key": "mediaType",
- "type": ["Array"],
- "desc": "支持上传的文件类型,图片或视频",
- "label": ""
- },
- {
- "key": "requestMethod",
- "type": ["String"],
- "desc": "自定义上传方法",
- "label": ""
- },
- {
- "key": "sizeLimit",
- "type": ["Number", "Object"],
- "desc": "图片文件大小限制,单位 KB。可选单位有:`'B' | 'KB' | 'MB' | 'GB'`。示例一:`1000`。示例二:`{ size: 2, unit: 'MB', message: '图片大小不超过 {sizeLimit} MB' }`",
- "label": ""
- }
- ],
- "events": [
- {
- "key": "bind:add",
- "desc": "上传成功后触发,仅包含本次选择的照片;`url` 表示选定视频的临时文件路径 (本地路径)。`duration` 表示选定视频的时间长度。`size`选定视频的数据量大小。更多描述参考 wx.chooseMedia 小程序官网描述",
- "label": ""
- },
- {
- "key": "bind:complete",
- "desc": "上传成功或失败后触发",
- "label": ""
- },
- {
- "key": "bind:fail",
- "desc": "上传失败后触发",
- "label": ""
- },
- {
- "key": "bind:remove",
- "desc": "移除文件时触发",
- "label": ""
- },
- {
- "key": "bind:select-change",
- "desc": "选择文件或图片之后,上传之前,触发该事件。<br />`files` 表示之前已经上传完成的文件列表。<br />`currentSelectedFiles` 表示本次上传选中的文件列表",
- "label": ""
- },
- {
- "key": "bind:success",
- "desc": "上传成功后触发,包含所有上传的文件;`url` 表示选定视频的临时文件路径 (本地路径)。`duration` 表示选定视频的时间长度。`size`选定视频的数据量大小。更多描述参考 wx.chooseMedia 小程序官网描述",
- "label": ""
- }
- ],
- "tpl": "<t-upload />",
- "path": "./upload/upload"
- }
- },
- "common": {
- "properties": {},
- "events": {}
- },
- "menu": [
- {
- "key": "menu-basic",
- "label": "基础",
- "submenu": [
- {
- "key": "subMenu-button",
- "label": "Button 按钮",
- "components": ["t-button"]
- },
- {
- "key": "subMenu-divider",
- "label": "Divider 分割线",
- "components": ["t-divider"]
- },
- {
- "key": "subMenu-fab",
- "label": "Fab 悬浮按钮",
- "components": ["t-fab"]
- },
- {
- "key": "subMenu-icon",
- "label": "Icon 图标",
- "components": ["t-icon"]
- }
- ]
- },
- {
- "key": "menu-nav",
- "label": "导航",
- "submenu": [
- {
- "key": "subMenu-drawer",
- "label": "Drawer 抽屉",
- "components": ["t-drawer"]
- },
- {
- "key": "subMenu-indexes",
- "label": "Indexes 索引",
- "components": ["t-indexes"]
- },
- {
- "key": "subMenu-navbar",
- "label": "Navbar 导航条",
- "components": ["t-navbar"]
- },
- {
- "key": "subMenu-steps",
- "label": "Steps 步骤条",
- "components": ["t-steps"]
- },
- {
- "key": "subMenu-tabbar",
- "label": "TabBar 标签栏",
- "components": ["t-tab-bar"]
- },
- {
- "key": "subMenu-tabs",
- "label": "Tabs 选项卡",
- "components": ["t-tabs"]
- }
- ]
- },
- {
- "key": "menu-input",
- "label": "输入",
- "submenu": [
- {
- "key": "subMenu-checkbox",
- "label": "CheckBox 复选框",
- "components": ["t-checkbox"]
- },
- {
- "key": "subMenu-dateTimePicker",
- "label": "DateTimePicker 时间选择器",
- "components": ["t-date-time-picker"]
- },
- {
- "key": "subMenu-input",
- "label": "Input 输入框",
- "components": ["t-input"]
- },
- {
- "key": "subMenu-picker",
- "label": "Picker 选择器",
- "components": ["t-picker"]
- },
- {
- "key": "subMenu-radio",
- "label": "Radio 单选框",
- "components": ["t-radio"]
- },
- {
- "key": "subMenu-rate",
- "label": "Rate 评分",
- "components": ["t-rate"]
- },
- {
- "key": "subMenu-search",
- "label": "Search 搜索框",
- "components": ["t-search"]
- },
- {
- "key": "subMenu-slider",
- "label": "Slider 滑动选择器",
- "components": ["t-slider"]
- },
- {
- "key": "subMenu-stepper",
- "label": "Stepper 步进器",
- "components": ["t-stepper"]
- },
- {
- "key": "subMenu-switch",
- "label": "Switch 开关",
- "components": ["t-switch"]
- },
- {
- "key": "subMenu-textarea",
- "label": "Textarea 多行文本框",
- "components": ["t-textarea"]
- },
- {
- "key": "subMenu-upload",
- "label": "UpLoad 上传",
- "components": ["t-upload"]
- }
- ]
- },
- {
- "key": "menu-data",
- "label": "数据展示",
- "submenu": [
- {
- "key": "subMenu-avatar",
- "label": "Avatar 头像",
- "components": ["t-avatar"]
- },
- {
- "key": "subMenu-badge",
- "label": "Badge 徽标",
- "components": ["t-badge"]
- },
- {
- "key": "subMenu-cell",
- "label": "Cell 单元格",
- "components": ["t-cell"]
- },
- {
- "key": "subMenu-collapse",
- "label": "Collapse 折叠面板",
- "components": ["t-collapse"]
- },
- {
- "key": "subMenu-dropdown-menu",
- "label": "DropdownMenu 下拉菜单",
- "components": ["t-dropdown-menu"]
- },
- {
- "key": "subMenu-empty",
- "label": "Empty 空状态",
- "components": ["t-empty"]
- },
- {
- "key": "subMenu-footer",
- "label": "Footer 页脚",
- "components": ["t-footer"]
- },
- {
- "key": "subMenu-grid",
- "label": "Grid 宫格",
- "components": ["t-grid"]
- },
- {
- "key": "subMenu-image",
- "label": "Image 图片",
- "components": ["t-image"]
- },
- {
- "key": "subMenu-skeleton",
- "label": "Skeleton 骨架屏",
- "components": ["t-skeleton"]
- },
- {
- "key": "subMenu-sticky",
- "label": "Sticky 吸顶容器",
- "components": ["t-sticky"]
- },
- {
- "key": "subMenu-swiper",
- "label": "Swiper 轮播图",
- "components": ["t-swiper"]
- },
- {
- "key": "subMenu-tag",
- "label": "Tag 标签",
- "components": ["t-tag"]
- }
- ]
- },
- {
- "key": "menu-info",
- "label": "消息提醒",
- "submenu": [
- {
- "key": "subMenu-actionsheet",
- "label": "ActionSheet 动作面板",
- "components": ["t-action-sheet"]
- },
- {
- "key": "subMenu-back-top",
- "label": "BackTop 返回顶部",
- "components": ["t-back-top"]
- },
- {
- "key": "subMenu-dialog",
- "label": "Dialog 弹出框",
- "components": ["t-dialog"]
- },
- {
- "key": "subMenu-loading",
- "label": "Loading 加载",
- "components": ["t-loading"]
- },
- {
- "key": "subMenu-message",
- "label": "Message 消息通知",
- "components": ["t-message"]
- },
- {
- "key": "subMenu-popup",
- "label": "Popup 弹出层",
- "components": ["t-popup"]
- },
- {
- "key": "subMenu-progress",
- "label": "Progress 进度条",
- "components": ["t-progress"]
- },
- {
- "key": "subMenu-pullDownRefresh",
- "label": "PullDownRefresh 下拉刷新",
- "components": ["t-pull-down-refresh"]
- },
- {
- "key": "subMenu-swipeCell",
- "label": "SwipeCell 滑动操作",
- "components": ["t-swipe-cell"]
- },
- {
- "key": "subMenu-toast",
- "label": "Toast 轻提示",
- "components": ["t-toast"]
- }
- ]
- }
- ]
- }
|