chore: auto merge branchs (#29603)

chore: merge master into feature
This commit is contained in:
github-actions[bot] 2021-03-03 07:50:12 +00:00 committed by GitHub
commit 61701130f9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
129 changed files with 1122 additions and 735 deletions

View File

@ -1,4 +1,4 @@
name: PR Refuse
name: PR Open Check
on:
pull_request_target:
@ -8,7 +8,7 @@ jobs:
refuse:
runs-on: ubuntu-latest
steps:
- uses: actions-cool/pr-welcome@v1.1.1
- uses: actions-cool/pr-welcome@v1.1.2
with:
refuse-issue-label: '🎱 Collaborate PR only'
need-creator-authority: 'write'

View File

@ -14,6 +14,7 @@ Ahmed AlSammany <ahmed.alsammany@incorta.com>
Ahmet Simsek <iamaroott@gmail.com>
Aidin <aidin.dadashzadeh@gmail.com>
Aiello <770540123@qq.com>
AkiJoey <akijoey1010635951@gmail.com>
Akshat Mittal <itsreallyakshat@gmail.com>
Alan Braithwaite <asbraithwaite@gmail.com>
Albert Mañosa <albertmasa2@gmail.com>
@ -22,11 +23,13 @@ Albert Zheng <lisong.zheng@gmail.com>
Albert 理斯特 <shuaizhexu@gmail.com>
Alberto Marchetti <cmaster11@gmail.com>
Aleck Landgraf <aleck.landgraf@gmail.com>
Alek Ye <relayon@163.com>
Aleksandr Chernokondratenko <etherreals777@gmail.com>
Alex <alex@niznik.info>
Alex Simons <alexsimons9999@gmail.com>
Alexander <labriko@yandex.ru>
Alexander Anpleenko <vaeum@yandex.com>
Alexander Ionov <orlicus@gmail.com>
Alexander Kachkaev <alexander@kachkaev.ru>
Alexander Suevalov <suevalov.work@gmail.com>
Alexander.Kosov <Alexander.Kosov@nexign-systems.com>
@ -70,6 +73,7 @@ Ben Callaway <me@bencallaway.com>
Benedikt Franke <benedikt@franke.tech>
Benjamin Amelot <bam@activeviam.com>
Benjamin Kniffler <bkniffler@me.com>
Benjamin Schuch <bschuch@gmx.net>
Benjamin Vertonghen <ben.vertonghen@gmail.com>
Benjy Cui <benjytrys@gmail.com>
Benoît Latinier <benoit@latinier.fr>
@ -141,6 +145,7 @@ Damian Green <damian.green@microlease.com>
Dan Minshew <ofenixculpa@gmail.com>
Dana Janoskova <dana.janoskova@accenture.com>
Dane David <dndavid102@gmail.com>
Daniel <caishujunchn@163.com>
Daniel Chang <danielchang2022@u.northwestern.edu>
Daniel Gomez <dgomez@orangeloops.com>
Daniel Harrison <daniel.equiknox@gmail.com>
@ -157,6 +162,7 @@ David Hatten <dhatten@covermymeds.com>
David Schneider <davschne@gmail.com>
Davide Bianchi <bianchidavide12@gmail.com>
Dean van Niekerk <deanvniekerk@gmail.com>
Debiancc <never.be.evil.debian@gmail.com>
DengYun <tdzl2003@gmail.com>
Denis <shumkovdenis@gmail.com>
DiamondYuan <admin@diamondyuan.com>
@ -176,6 +182,7 @@ Dorian <dorian@doma.io>
DosLin <doslino@gmail.com>
Douglas Mason <Demasonjr@gmail.com>
Eager <1226393396@qq.com>
Eber Rodrigues <eberjoe@gmail.com>
EcmaProSrc.P/ka <asoiso@foxmail.com>
Ed Moore <ed@90seconds.tv>
Edd Hannay <accounts@edd.fm>
@ -185,6 +192,7 @@ Eden Wang <Eden.Wang@Akmii.com>
Eduardo Ludi <eduludi@gmail.com>
Edward <7047924@qq.com>
Egor Yurtaev <yurtaev.egor@gmail.com>
Elaina Cherudim <shr9192@gmail.com>
Eldar Mustafaiev <eldar.mustafaiev@gmail.com>
Eli White <github@eli-white.com>
Emerson Laurentino <emersonlaurentino@hotmail.com>
@ -198,6 +206,8 @@ Eric Wang <eric@canva.com>
Eric Wang <wjun0912@gmail.com>
Erwann Mest <m+github@kud.io>
Eslam Yahya <eslamyahya.dev@gmail.com>
Eugene Matvejev <eugene.matvejev@gmail.com>
Eugene Molokov <molokovev@gmail.com>
Eusen <179530591@qq.com>
Evan Charlton <evancharlton@gmail.com>
Evgeny Kuznetsov <jackk@ya.ru>
@ -206,6 +216,7 @@ Federico Marcos <marcosfede@gmail.com>
Ferdi Koomen <info@madebyferdi.com>
Fergus Leung <fergusleung96@gmail.com>
Fernando Giarritiello <fgiarritiello@gmail.com>
Filip Kukovec <filip.kukovec1@gmail.com>
Florian Orpelière <florian.orpeliere@gmail.com>
Flynn <li.fulin@foxmail.com>
For177 <mengqiang.q@gmail.com>
@ -213,6 +224,7 @@ Frank <frankdingv@gmail.com>
Frezc <Frezcw@gmail.com>
Fullstop000 <fullstop1005@gmail.com>
GJ Wang <itellboy@foxmail.com>
GSBL <2602140596@qq.com>
Gabe Medrash <gabeme@alleninstitute.org>
Gabriel Le Breton <lebreton.gabriel@gmail.com>
Gabriel Nunes <gabriel@multiverso.me>
@ -221,6 +233,7 @@ Gao Jiangmiao <tolbkni@gmail.com>
Gautier <rollingautier2@gmail.com>
Geoff Holden <geoff@brightloudnoise.com>
George Gray <george@ummodesign.com>
Germini <634709523@qq.com>
Gerson Garrido <ggarridom23@gmail.com>
Gin-X <xcbwyys@hotmail.com>
Go7hic <gtfx0209@qq.com>
@ -243,6 +256,7 @@ Hanjun Kim <hallazzang@gmail.com>
Hanz Luo <lhz0516@gmail.com>
HarlanLuo <luoxwen@gmail.com>
Haroen Viaene <fingebimus@me.com>
Harrison <stlebea@foxmail.com>
Harry.Hou <harry.hou@ringcentral.com>
Harshit Mehrotra <harshitmehrotra@hotmail.com>
Harutaka Kawamura <hkawamura0130@gmail.com>
@ -254,6 +268,10 @@ HiddenMan <1196089730@qq.com>
Hieu Ho <hieu.ho.le@lazada.com>
Hieu Pham <phthhieu@gmail.com>
Higor Araújo dos Anjos <higor.araujo.anjos@gmail.com>
Hollow Man <hollowman@hollowman.ml>
Homyee King <HomyeeKing@gmail.com>
Hossein Alimadad <hossein.alimadad@gmail.com>
Hossein Mohammadi <hosseinm.developer@gmail.com>
HouXiancheng <505421473@qq.com>
Hsuan Lee <HsuanGM@gmail.com>
Hsuan Lee <hsuangm@gmail.com>
@ -262,6 +280,7 @@ Hughen <446370503@163.com>
Hugo LEHMANN <shogi31@gmail.com>
ILdar Nogmanov <nogmanov@gmail.com>
Igor <nemytyshew@yandex.ru>
Igor Andriushchenko <igor.andriushchenko@snowsoftware.com>
Igor G <i.gaidai4uk@gmail.com>
Ilan <hasanovtk@gmail.com>
Ilya Bondarenko <bondarenko.ik@gmail.com>
@ -293,12 +312,15 @@ James Tsang <wentao_zeng1@163.com>
James Yeung <shunjiey@hotmail.com>
JamesYin <elantion@gmail.com>
Jaroslav Bereza <github.com@bereza.cz>
Jarret Moses <jarret.moses@gmail.com>
Jarvis1010 <travis.mair@gmail.com>
Jase Pellerin <jasepellerin@gmail.com>
Jason <ceocjy@vip.qq.com>
Jason Chung <shiningjason1989@gmail.com>
Jason Yin <yinjiangsheng@gmail.com>
Jay Fong <fjc0kb@gmail.com>
Jean-Luc Sorak <jlsorak@icloud.com>
Jeff Wen <sinchangwen@gmail.com>
Jeffrey Carl Faden <jeffreyatw@gmail.com>
Jehu <z_zhihao@foxmail.com>
Jelle de Jong <jelle@hoest.nl>
@ -330,6 +352,7 @@ Johannes Andersen <johannes.andersen@signifyd.com>
Johannes Loewe <johannes@loewe.pm>
John Johnson III <john@johnjohnson.cc>
John Nguyen <jtnguyen236@gmail.com>
Johnny Lim <izeye@naver.com>
Johnsen <jiajunzhou1994@163.com>
Jonatas Walker <jonataswalker@gmail.com>
Jonathan Gabaut <possimpible@gmail.com>
@ -359,7 +382,7 @@ Kenaniah Cerny <kenaniah@gmail.com>
Kenneth Luján Rosas <elgenio.03@gmail.com>
Kenneth Truong <kenneth.e.truong@gmail.com>
KentonYu <975853613@qq.com>
Kermit Xuan <kermitlx@outlook.com>
Kermit <kermitlx@outlook.com>
Keven Leone <keven.santos.sz@gmail.com>
Kevin Ivan <info@kevinivan.com>
Kevin Wang <gumtree200@gmail.com>
@ -394,13 +417,16 @@ Larry Laski <larry.laski@gmail.com>
LaySent <laysent@gmail.com>
LeeHarlan <709886167@qq.com>
LeezQ <lizhenq2009@gmail.com>
LeoYang <LeoY.Dev@gmail.com>
Leon Koole <leon@koole.io>
Leon Shi <superRaytin@163.com>
Leon Shi <superRaytin@gmail.com>
Li C. Pan <18306423262@163.com>
Li Chao <rftstars@qq.com>
Li Ming <armyiljfe@gmail.com>
LiPinghai <twopoles@163.com>
LilyWakana <873435892@qq.com>
Liming Jin <jinliming2@gmail.com>
Liming Jin <jinlm@knownsec.com>
Liu Ya <liuya54892@gmail.com>
Liu Yang <zation1@gmail.com>
@ -415,6 +441,7 @@ MG12 <wuzhao.mail@gmail.com>
Ma Tianxiao <matx2215@outlook.com>
Maciej Czekaj <natanielcz@gmail.com>
Madis Väin <madisvain@gmail.com>
Maksim Nesterenko <alendorff@gmail.com>
Maksim Slotvinskij <m.slotvinskij@gmail.com>
Maksym Mosyura <wmornotwm@gmail.com>
Malven <marcusalven@gmail.com>
@ -439,11 +466,13 @@ Mathew <khayaanimations@gmail.com>
Mathieu Anderson <anderson@talon.one>
Matias Orellana <morellan@gmail.com>
Matt Lein <matt.lein@code42.com>
Matt Wilkinson <mattwilki17@gmail.com>
Max <maksym.mosyura@kruschecompany.com>
Maximilian Meyer <Maximilian.Meyer@br.de>
MeiLin <postget.me@gmail.com>
MengZhaoFly <1424254461@qq.com>
Meow-z <372086270@qq.com>
Meowu <474384902@qq.com>
Miaow <i@zfeng.net>
Micah Guttman <memtech3@gmail.com>
Michael Adams <mtadams007@gmail.com>
@ -525,6 +554,7 @@ OuYancey <ou.yancey@gmail.com>
Panjie Setiawan Wicaksono <panjie@panjiesw.com>
Patrick Gidich <patrick.gidich@simnova.com>
Patryk <longer44@gmail.com>
Paul Damnhorns <pavel.chertorogov@gmail.com>
Paul Julien <paul.julien@polyconseil.fr>
Paul Julien <paul.julien.dev@gmail.com>
Peach <scdzwyxst@gmail.com>
@ -564,6 +594,7 @@ Ray Booysen <ray.booysen@baikalmkt.com>
Rayron Victor <rayronvictor@gmail.com>
Reed Sun <superreedsun@gmail.com>
Regan Langford <regan.reihana@gmail.com>
Renny Ren <rennyallen@hotmail.com>
Renovate Bot <bot@renovateapp.com>
Rex <zhangzilong.zzl@163.com>
Ricardo Raphael Joson <rrjoson08@gmail.com>
@ -588,6 +619,7 @@ Salavat Gizatov <100ishundred@gmail.com>
Sam Chen <chenxsan@gmail.com>
Sam Kah Chiin <samkahchiin@gmail.com>
Sam Lanning <sam@samlanning.com>
Sam Marks <sam@sammarks.me>
Sam Maxwell <sam@paybase.io>
Samed Düzçay <samedduzcay@gmail.com>
Samuel Gaus <sam@gaus.co.uk>
@ -609,6 +641,7 @@ Sergey Volynkin <sergey.volynkin@akvelon.com>
Sergio Crisostomo <sergiosbox@gmail.com>
Sevak <shaderzak@gmail.com>
Shawn Sit <xueqingxiao@gmail.com>
Shengnan <baxtergu@gmail.com>
ShiTengFei <shitengfei@goyoo.com>
ShuYu Wang <andelf@gmail.com>
Shubham Kanodia <shubhamsizzles@gmail.com>
@ -618,6 +651,7 @@ SimaQ <sima.zhang1990@gmail.com>
Simo Aleksandrov <simo3003@me.com>
Simon Altschuler <simon@altschuler.dk>
Simon Knott <simoknott@gmail.com>
Siou <abz53378@gmail.com>
Sivaraj <contact@sdev.in>
SkyAo <csvwolf@qq.com>
Skylar艺璇 <mengxue.yx@gmail.com>
@ -711,12 +745,15 @@ Xinxing Li <lixinxing.2019@bytedance.com>
Xinzhe Wang <me@imwxz.com>
Xiping.wang <527409987@qq.com>
XuMM_12 <owiatsq@sina.cn>
Xudong Cai <fifsky@gmail.com>
Xudong Huang <me@xudong.dev>
Xuhao <xuhao@rubyfans.com>
Yaindrop <yuan_dian@live.com>
YanYuan <1025138284@qq.com>
Yang Bin <yangkghjh@gmail.com>
Yangzhedi <uiryzd@163.com>
Yann Normand <yann.normand@gmail.com>
Yann Pringault <yann.pringault@gmail.com>
Yash Joshi <jyash97@gmail.com>
Yasin Uslu <nepjua@gmail.com>
Yevhen Hryhorevskyi <evgeniygrigorevskiy@gmail.com>
@ -741,6 +778,7 @@ ZHANGYU <723156735@qq.com>
ZYSzys <zyszys98@gmail.com>
Zack Craig <zack@zack6849.com>
Zap <a124116186@qq.com>
ZeroToOne <igeeke@163.com>
Zester Quinn Albano <zesterquinn.albano@gmail.com>
Zgo <zguoby@gmail.com>
Zhang Zhi <fytriht@gmail.com>
@ -750,8 +788,10 @@ Zhuo Chen <chenzhuo@caicloud.io>
Ziluo <gyfzzu@gmail.com>
Zohaib Ijaz <mzohaib.qc@gmail.com>
Zzzen <843968788@qq.com>
aLIEzsss4 <15624958088@163.com>
aashutoshrathi <aashutoshrathi@gmail.com>
adam <adamwu1992@163.com>
afc163 <afc163@gmail.com>
agent-z <1607291079@qq.com>
ahalimkara <ahalimkara@gmail.com>
alekslario <aleksandlario@gmail.com>
@ -759,16 +799,20 @@ alex89lj <379118572@qq.com>
alexchen <alexchen@easyops.cn>
amedora <americandragsterracing@gmail.com>
appleshell <appleshell@outlook.com>
arange <panpan2558@gmail.com>
arifemrecelik <ce.arifemre@gmail.com>
arturpfb <arturpfb@gmail.com>
ascoders <576625322@qq.com>
ashishg-qburst <ashishg@qburst.com>
atomoo <yangpein@gmail.com>
atzcl <atzcl0310@gmail.com>
bLue <tbdblue@gmail.com>
babycannotsay <335658202@qq.com>
baidumap <460807394@qq.com>
bang <sqibang@gmail.com>
baozefeng <727751065@qq.com>
bcd337 <b.bcd337@gmail.com>
bigbigbo <zxb141242@163.com>
binyellow <571704908@qq.com>
blankzust <450811238@qq.com>
bukas <yhz1219@gmail.com>
@ -786,8 +830,8 @@ chen wen jun <731028571@qq.com>
chencheng (云谦) <sorrycc@gmail.com>
chenlei <745512023@qq.com>
chenlong <long.chen@abssqr.com>
chenshuai2144 <qixian.cs@outlook.com>
chenxiaochun <sjzchenxiaochun@gmail.com>
chequerNoel <noel@chequer.io>
chisus <chisus@smartstudy.co.kr>
chunlea <ichunlea@me.com>
cieldon32 <cieldon32@gmail.com>
@ -808,6 +852,7 @@ decade <decadef20@gmail.com>
delesseps <andrewlessels@gmail.com>
denzw <denzw@21cn.com>
dependabot[bot] <support@dependabot.com>
desperado <yuwei_149@163.com>
detailyang <detailyang@gmail.com>
devqin <devqin@gmail.com>
dian.li <dian.li@yunzhanghu.com>
@ -831,7 +876,9 @@ fkysly <fkysly@gmail.com>
flashback313 <windmark2012@gmail.com>
flyerH <hzw758@qq.com>
frezc <504021398@qq.com>
gaoryrt <gaoryrt@gmail.com>
genie <genie88@163.com>
godfather <greenday.wj@foxmail.com>
gregahren <grega.hren@gmail.com>
gxvv <gaoxin18000@gmail.com>
gyh9457 <gyh9457@163.com>
@ -854,6 +901,7 @@ hicrystal <295247343@qq.com>
hongxuWei <hongxu.wei@outlook.com>
howard <geograous@126.com>
huangyan.py <huangyan.py@bytedance.com>
hugorezende <hugorezendedev@gmail.com>
huishiyi <zhou1maple@gmail.com>
huzzbuzz <huzzbuzz@outlook.com>
iamcastelli <sowed@cyberdude.com>
@ -913,6 +961,7 @@ lich-yoo <lich95for@163.com>
liekkas <zjq0717@163.com>
lihqi <455711093@qq.com>
lilun <lilun_cd@keruyun.com>
limingxin <906529775@qq.com>
littleLane <857183384@qq.com>
liuchuzhang <liuweiminer@hotmail.com>
liuchuzhang <liuweiminer@126.com>
@ -940,6 +989,7 @@ mofelee <mofe@me.com>
moonrailgun <moonrailgun@gmail.com>
mraiguo <810158465@qq.com>
mraiguo <mraiguo@gmail.com>
mumiao <mumiao@dtstack.com>
mushan0x0 <mushan0x0@gmail.com>
muzuiget <muzuiget@gmail.com>
natergj <nater_nater@me.com>
@ -967,6 +1017,8 @@ qianbin <1797661770@qq.com>
qiaojie <1454763497@qq.com>
qiqiboy <imqiqiboy@gmail.com>
qliu <1403927509@qq.com>
qqabcv520 <605655316@qq.com>
qramilq <ramirez99@mail.ru>
qubaoming <qubaoming@didichuxing.com>
ravirambles <ravirambles@gmail.com>
realEago <774855001@qq.com>
@ -997,7 +1049,7 @@ sosohime <theziming@126.com>
spideeee <spideeee@github.com>
stevenyuysy <stevenyuysy@gmail.com>
stickmy <stickmyc@gmail.com>
susiwen <susiwen8@gmail.com>
susiwen8 <susiwen8@gmail.com>
swindme <swindme@163.com>
syssam <s.y.s.sam.sys@gmail.com>
tae <taeshindev@gmail.com>
@ -1024,6 +1076,7 @@ vaytsel <vaytsel@gmail.com>
veveue <veveue@dingtalk.com>
vgeyi <vgeyiz@126.com>
vldh <alwaysloseall@sina.com>
vouis <16nding@gmail.com>
wa-ri <tztl1995@gmail.com>
wadezhan <wadezhan@tencent.com>
wangshantao <605682551@qq.com>
@ -1052,13 +1105,16 @@ xiaofine1122 <985609093@qq.com>
xiaohuoni <448627663@qq.com>
xiaosong <kunkkaco@gmail.com>
xiaoxintang <15707971810@163.com>
xiejiahe <xjh22222228@gmail.com>
xilihuasi <2857818553@qq.com>
xinhui.zxh <xinhui.zxh@antfin.com>
xrkffgg <xrkffgg@gmail.com>
xrkffgg <xrkffgg@vip.qq.com>
xuqiang <xuqiang@xiaoshouyi.com>
xyb <576420147@qq.com>
xz <limxz97@gmail.com>
y-take <y.takey@gmail.com>
yanguoyu <841185308@qq.com>
yangwukang <yangwukang@boco.com.cn>
yangxiaolin <yangxiao2810279802@gmail.com>
ycjcl868 <45808948@qq.com>
@ -1069,6 +1125,7 @@ yeshan333 <1329441308@qq.com>
yibu.wang <yibu.wang@orion.co.com>
yiminanci <yiminanci@gmail.com>
yiminghe <yiminghe@gmail.com>
youmoo <youmoo@vellichor.me>
yuche <i@yuche.me>
yuezk <yuezk001@gmail.com>
yui <1151815317@qq.com>
@ -1086,13 +1143,15 @@ zhangyanling77 <18783226594@163.com>
zhangzh <zhangzh@cnlemon.net>
zhaocai <lzc09008@gmail.com>
zhaopeidong <lwindscar@gmail.com>
zhuguibiao <505418722@qq.com>
zhujun24 <zhujun87654321@gmail.com>
zilong <jzlxiaohei@163.com>
zinkey <yaya@uloveit.com.cn>
zj9495 <zj9495@gmail.com>
zjf <zjffun@gmail.com>
zkwolf <chenhao5866@gmail.com>
zlljqn <zlljqn@gmail.com>
zollero <corona7@163.com>
zombiej <smith3816@gmail.com>
zongzi531 <zongzi.xy@gmail.com>
zoomdong <1344492820@qq.com>
ztplz <mysticzt@gmail.com>
@ -1110,13 +1169,15 @@ zytjs <yitongzhao@163.com>
乔奕轩 <qiao_yixuan@163.com>
二哲 <kodo@forchange.cn>
二手掉包工程师 <rustin.liu@gmail.com>
二货机器人 <smith3816@gmail.com>
付引 <xxxquotes@gmail.com>
何乐 <work@imhele.com>
何志勇 <15988134176@163.com>
何锦余 <cadenho@hotmail.com>
佛门耶稣 <fomenyesu@gmail.com>
信鑫-King <chaolinjin@gmail.com>
偏右 <afc163@gmail.com>
兼续 <rdmclin2@163.com>
冷方冰 <664930912@qq.com>
刘红 <liuhong1.happy@163.com>
初心Yearth <Yearthmain@gmail.com>
南北 <chersquwn@gmail.com>
@ -1127,7 +1188,6 @@ zytjs <yitongzhao@163.com>
吴泽康 <wu.zekang@outlook.com>
啸生 <ikobe621@gmail.com>
大猫 <rdmclin2@gmail.com>
大猫 <rdmclin2@163.com>
宝码 <noyobo@gmail.com>
小哈husky <951565664@qq.com>
小菜 <645801890@qq.com>
@ -1170,9 +1230,10 @@ zytjs <yitongzhao@163.com>
董天成 <dongtiangche@outlook.com>
蒋璇 <645762213@qq.com>
蔡伦 <sliuqin@gmail.com>
薛定谔的猫 <weiran.zsd@outlook.com>
薛定谔的猫 <hh_2013@foxmail.com>
诸岳 <fuping.dfp@antfin.com>
诸岳 <fuping.dfp@antgroup.com>
诸岳 <fuping.dfp@antfin.com>
诸岳 <dengfuping_private@163.com>
诸岳 <dengfuping_develop@163.com>
诸葛龙 <158362530@qq.com>
@ -1181,10 +1242,12 @@ zytjs <yitongzhao@163.com>
郑旭 <332171564@qq.com>
闲耘™ <hotoo.cn@gmail.com>
陆离 <surgesoft@gmail.com>
陈帅 <qixian.cs@outlook.com>
陈帅 <wasd2144@hotmail.com>
陈广亮 <geraldchen890806@gmail.com>
陈立林 <245839124@qq.com>
隋鑫磊 <joshuasui@gmail.com>
雷玮杰 <vingeray@gmail.com>
马斯特 <sd4399340@126.com>
马金花儿 <o.o@mug.dog>
骆也 <luoyefe@gmail.com>

View File

@ -15,6 +15,34 @@ timeline: true
---
## 4.13.0
`2021-02-28`
- 🔥 InputNumber support `stringMode` for high precision `step`. `value` in control out of range shows warning style instead of changing it. Dynamic update `min` & `max` will not trigger `onChange` anymore. [#29373](https://github.com/ant-design/ant-design/pull/29373)
- 🆕 Upload support `beforeUpload` return `Upload.LIST_IGNORE` to skip item added in UploadList. [#29474](https://github.com/ant-design/ant-design/pull/29474)
- 🆕 Image support config motion name. [#29394](https://github.com/ant-design/ant-design/pull/29394) [@crazyair](https://github.com/crazyair)
- ConfigProvider
- 🆕 ConfigProvider support global statistic config to support some statistic function call. [#29285](https://github.com/ant-design/ant-design/pull/29285) [@crazyair](https://github.com/crazyair)
- 🆕 Motion related css `className` prepend `ant-` prefix to avoid naming conflict. [#29268](https://github.com/ant-design/ant-design/pull/29268) [@crazyair](https://github.com/crazyair)
- 🆕 Form.List nest multiple level Form.Item support `preserve` prop. [#29267](https://github.com/ant-design/ant-design/pull/29267)
- 🆕 Drawer support `contentWrapperStyle`. [#29219](https://github.com/ant-design/ant-design/pull/29219) [@kerm1it](https://github.com/kerm1it)
- 🆕 Layout.Sider added ref support. [#29169](https://github.com/ant-design/ant-design/pull/29169) [@qramilq](https://github.com/qramilq)
- 🐞 Fix Table `pagination.current` display error when result of filter is empty. [#29386](https://github.com/ant-design/ant-design/pull/29386) [@jinchaofs](https://github.com/jinchaofs)
- 🐞 Fix Anchor throws error when `target` don't return a html element. [#29523](https://github.com/ant-design/ant-design/pull/29523) [@bcd337](https://github.com/bcd337)
- 🐞 Fix Steps with small size that icon shift up `1px`. [#29484](https://github.com/ant-design/ant-design/pull/29484)
- Select
- 🐞 Fix Select `mode="tags"` large size (41px => 40px). [#29437](https://github.com/ant-design/ant-design/pull/29437)
- 📖 Update Select debounce demo to create DebounceSelect component for easy usage. [#29414](https://github.com/ant-design/ant-design/pull/29414)
- Dropdown
- 🐞 Fix Dropdown menu item lost disable style with icon. [#29433](https://github.com/ant-design/ant-design/pull/29433)
- 🐞 Fix Dropdown menu not support `expandIcon`. [#29338](https://github.com/ant-design/ant-design/pull/29338)
- 🐞 Fix tree-shaking warning on development builds. [#29378](https://github.com/ant-design/ant-design/pull/29378)
- 🇰🇷 Fix TimePicker Korean locale. [#29540](https://github.com/ant-design/ant-design/pull/29540)
- TypeScript
- 🤖 Fix Form.Item generic definition issue. [#29397](https://github.com/ant-design/ant-design/pull/29397) [@mumiao](https://github.com/mumiao)
- 🤖 Optimize Table `filter` definition. [#29385](https://github.com/ant-design/ant-design/pull/29385) [@mumiao](https://github.com/mumiao)
## 4.12.3
`2021-02-10`
@ -291,7 +319,7 @@ It is a wrong release which same as `4.10.3`, don't use it.
- 🆕 Alert support `action` prop. [#25892](https://github.com/ant-design/ant-design/pull/25892) [@jesse3mh9a](https://github.com/jesse3mh9a)
- 🔥 Tree refactor drag behavior. Add `dropIndicatorRender` and `allowDrop` prop. [#26462](https://github.com/ant-design/ant-design/pull/26462) [@07akioni](https://github.com/07akioni)
- 🆕 Space support `wrap` for auto break line. [#27910](https://github.com/ant-design/ant-design/pull/27910)
- 🆕 Descriptions.Item support `labelStyle` &amp; `contentStyle` props. [#27897](https://github.com/ant-design/ant-design/pull/27897)
- 🆕 Descriptions.Item support `labelStyle` & `contentStyle` props. [#27897](https://github.com/ant-design/ant-design/pull/27897)
- 🆕 Form.List support `initialValue`. [#27872](https://github.com/ant-design/ant-design/pull/27872)
- 🆕 Menu supports `expandIcon`, and optimize default expand icon style. [#27565](https://github.com/ant-design/ant-design/pull/27565)
- 🆕 Input and TextArea add `setSelectionRange` of `ref`. [#27584](https://github.com/ant-design/ant-design/pull/27584) [@appleshell](https://github.com/appleshell)

View File

@ -15,6 +15,34 @@ timeline: true
---
## 4.13.0
`2021-02-28`
- 🔥 InputNumber 添加 `stringMode` 属性以支持高精度 `step`。`value` 受控并超出范围时展示警告样式而不是强制改值。动态修改 `min``max` 不再触发 `onChange` 事件。[#29373](https://github.com/ant-design/ant-design/pull/29373)
- 🆕 Upload 支持 `beforeUpload` 返回 `Upload.LIST_IGNORE` 时不将文件展示在列表中。[#29474](https://github.com/ant-design/ant-design/pull/29474)
- 🆕 Image 支持配置动画相关类型。[#29394](https://github.com/ant-design/ant-design/pull/29394) [@crazyair](https://github.com/crazyair)
- ConfigProvider
- 🆕 ConfigProvider 添加全局静态配置以支持部分静态方法。[#29285](https://github.com/ant-design/ant-design/pull/29285) [@crazyair](https://github.com/crazyair)
- 🆕 动画相关 css `className` 全部添加 `ant-` 前缀以防止重名问题。[#29268](https://github.com/ant-design/ant-design/pull/29268) [@crazyair](https://github.com/crazyair)
- 🆕 Form.List 嵌套多层 Form.Item 支持 `preserve` 属性。[#29267](https://github.com/ant-design/ant-design/pull/29267)
- 🆕 Drawer 支持 `contentWrapperStyle`。[#29219](https://github.com/ant-design/ant-design/pull/29219) [@kerm1it](https://github.com/kerm1it)
- 🆕 Layout.Sider 組件添加了 `ref` 支持。[#29169](https://github.com/ant-design/ant-design/pull/29169) [@qramilq](https://github.com/qramilq)
- 🐞 修复 Table 当过滤结果为空时,`pagination.current` 展示错误。[#29386](https://github.com/ant-design/ant-design/pull/29386) [@jinchaofs](https://github.com/jinchaofs)
- 🐞 修复 Anchor `target` 不是 html 元素时会出错的问题。[#29523](https://github.com/ant-design/ant-design/pull/29523) [@bcd337](https://github.com/bcd337)
- 🐞 修复 Steps 小尺寸时图标偏上的问题。[#29484](https://github.com/ant-design/ant-design/pull/29484)
- Select
- 🐞 修复 Select 标签模式下大号控件的高度多了 `1px` 的问题。[#29437](https://github.com/ant-design/ant-design/pull/29437)
- 📖 更新 Select 防抖示例封装成 DebounceSelect 组件以便于用户使用。[#29414](https://github.com/ant-design/ant-design/pull/29414)
- Dropdown
- 🐞 修复 Dropdown 带图标的菜单项禁用样式丢失的问题。[#29433](https://github.com/ant-design/ant-design/pull/29433)
- 🐞 修复 Dropdown 内 Menu 不支持 `expandIcon` 的问题。[#29338](https://github.com/ant-design/ant-design/pull/29338)
- 🐞 Fix 在本地开发时会报 tree-shaking 警告信息的问题。[#29378](https://github.com/ant-design/ant-design/pull/29378)
- 🇰🇷 修复 TimePicker 本地化。[#29540](https://github.com/ant-design/ant-design/pull/29540)
- TypeScript
- 🤖 修复 Form.Item 的泛型定义问题。[#29397](https://github.com/ant-design/ant-design/pull/29397) [@mumiao](https://github.com/mumiao)
- 🤖 优化 Table `filter` 相关类型声明。[#29385](https://github.com/ant-design/ant-design/pull/29385) [@mumiao](https://github.com/mumiao)
## 4.12.3
`2021-02-10`

View File

@ -19,7 +19,7 @@ export default function getScroll(
result = (target as HTMLElement)[method];
}
if (target && !isWindow(target) && typeof result !== 'number') {
result = ((target as HTMLElement).ownerDocument || (target as Document)).documentElement[
result = ((target as HTMLElement).ownerDocument || (target as Document)).documentElement?.[
method
];
}

View File

@ -31,6 +31,6 @@ Alert component for feedback.
### Alert.ErrorBoundary
| Property | Description | Type | Default | Version |
| ----------- | -------------------------------- | --------- | ----------------- | ------- |
| --- | --- | --- | --- | --- |
| description | Custom error description to show | ReactNode | {{ error stack }} | |
| message | Custom error message to show | ReactNode | {{ error }} | |

View File

@ -31,7 +31,7 @@ For displaying anchor hyperlinks on page and jumping between them.
### Link Props
| Property | Description | Type | Default | Version |
| -------- | ----------------------------------------- | --------- | ------- | ------- |
| --- | --- | --- | --- | --- |
| href | The target of hyperlink | string | | |
| target | Specifies where to display the linked URL | string | | |
| title | The content of hyperlink | ReactNode | | |

View File

@ -32,7 +32,7 @@ cover: https://gw.alipayobjects.com/zos/alicdn/_1-C1JwsC/Anchor.svg
### Link Props
| 成员 | 说明 | 类型 | 默认值 | 版本 |
| ------ | -------------------------------- | --------- | ------ | ---- |
| --- | --- | --- | --- | --- |
| href | 锚点链接 | string | - | |
| target | 该属性指定在何处显示链接的资源。 | string | - | |
| title | 文字内容 | ReactNode | - | |

View File

@ -43,7 +43,7 @@ When there is a need for autocomplete functionality.
## Methods
| Name | Description | Version |
| ------- | ------------ | ------- |
| --- | --- | --- |
| blur() | Remove focus | |
| focus() | Get focus | |

View File

@ -51,7 +51,7 @@ cover: https://gw.alipayobjects.com/zos/alicdn/qtJm4yt45/AutoComplete.svg
## 方法
| 名称 | 描述 | 版本 |
| ------- | -------- | ---- |
| --- | --- | --- |
| blur() | 移除焦点 | |
| focus() | 获取焦点 | |

View File

@ -30,7 +30,7 @@ Badge normally appears in proximity to notifications or user avatars with eye-ca
### Badge.Ribbon (4.5.0+)
| 参数 | 说明 | 类型 | 默认值 | 版本 |
| Property | Description | Type | Default | Version |
| --- | --- | --- | --- | --- |
| color | Customize Ribbon color | string | - | |
| placement | The placement of the Ribbon, `start` and `end` follow text direction (RTL or LTR) | `start` \| `end` | `end` | |

View File

@ -37,7 +37,7 @@ A breadcrumb displays the current location within a hierarchy. It allows going b
### Breadcrumb.Separator
| Property | Description | Type | Default | Version |
| -------- | ---------------- | --------- | ------- | ------- |
| --- | --- | --- | --- | --- |
| children | Custom separator | ReactNode | `/` | |
> When using `Breadcrumb.Separator`,its parent component must be set to `separator=""`, otherwise the default separator of the parent component will appear.

View File

@ -38,7 +38,7 @@ cover: https://gw.alipayobjects.com/zos/alicdn/9Ltop8JwH/Breadcrumb.svg
### Breadcrumb.Separator
| 参数 | 说明 | 类型 | 默认值 | 版本 |
| -------- | -------------- | --------- | ------ | ---- |
| --- | --- | --- | --- | --- |
| children | 要显示的分隔符 | ReactNode | `/` | |
> 注意:在使用 `Breadcrumb.Separator` 时,其父组件的分隔符必须设置为 `separator=""`,否则会出现父组件默认的分隔符。

View File

@ -43,7 +43,7 @@ A card can be used to display content related to a single subject. The content c
### Card.Grid
| Property | Description | Type | Default | Version |
| --------- | ------------------------------- | ------------- | ------- | ------- |
| --- | --- | --- | --- | --- |
| className | The className of container | string | - | |
| hoverable | Lift up when hovering card grid | boolean | true | |
| style | The style object of container | CSSProperties | - | |
@ -51,7 +51,7 @@ A card can be used to display content related to a single subject. The content c
### Card.Meta
| Property | Description | Type | Default | Version |
| ----------- | ----------------------------- | ------------- | ------- | ------- |
| --- | --- | --- | --- | --- |
| avatar | Avatar or icon | ReactNode | - | |
| className | The className of container | string | - | |
| description | Description content | ReactNode | - | |

View File

@ -44,7 +44,7 @@ cover: https://gw.alipayobjects.com/zos/antfincdn/NqXt8DJhky/Card.svg
### Card.Grid
| 参数 | 说明 | 类型 | 默认值 | 版本 |
| --------- | ---------------------- | ------------- | ------ | ---- |
| --- | --- | --- | --- | --- |
| className | 网格容器类名 | string | - | |
| hoverable | 鼠标移过时可浮起 | boolean | true | |
| style | 定义网格容器类名的样式 | CSSProperties | - | |
@ -52,7 +52,7 @@ cover: https://gw.alipayobjects.com/zos/antfincdn/NqXt8DJhky/Card.svg
### Card.Meta
| 参数 | 说明 | 类型 | 默认值 | 版本 |
| ----------- | ------------------ | ------------- | ------ | ---- |
| --- | --- | --- | --- | --- |
| avatar | 头像/图标 | ReactNode | - | |
| className | 容器类名 | string | - | |
| description | 描述内容 | ReactNode | - | |

View File

@ -29,7 +29,7 @@ cover: https://gw.alipayobjects.com/zos/antfincdn/%24C9tmj978R/Carousel.svg
## 方法
| 名称 | 描述 |
| ------------------------------ | ------------------------------------------------- |
| --- | --- |
| goTo(slideNumber, dontAnimate) | 切换到指定面板, dontAnimate = true 时,不使用动画 |
| next() | 切换到下一面板 |
| prev() | 切换到上一面板 |

View File

@ -185,6 +185,7 @@
}
&-top {
top: 12px;
bottom: auto;
}
li {
position: relative;

View File

@ -73,6 +73,6 @@ interface Option {
## Methods
| Name | Description | Version |
| ------- | ------------ | ------- |
| --- | --- | --- |
| blur() | Remove focus | |
| focus() | Get focus | |

View File

@ -76,7 +76,7 @@ interface Option {
## 方法
| 名称 | 描述 | 版本 |
| ------- | -------- | ---- |
| --- | --- | --- |
| blur() | 移除焦点 | |
| focus() | 获取焦点 | |

View File

@ -43,6 +43,6 @@ Checkbox component.
#### Checkbox
| Name | Description | Version |
| ------- | ------------ | ------- |
| --- | --- | --- |
| blur() | Remove focus | |
| focus() | Get focus | |

View File

@ -20,7 +20,7 @@ cover: https://gw.alipayobjects.com/zos/alicdn/8nbVbHEm_/CheckBox.svg
#### Checkbox
| 参数 | 说明 | 类型 | 默认值 | 版本 |
| -------------- | --------------------------------------- | ----------------- | ------ | ---- |
| --- | --- | --- | --- | --- |
| autoFocus | 自动获取焦点 | boolean | false | |
| checked | 指定当前是否选中 | boolean | false | |
| defaultChecked | 初始是否选中 | boolean | false | |
@ -54,6 +54,6 @@ interface Option {
#### Checkbox
| 名称 | 描述 | 版本 |
| ------- | -------- | ---- |
| --- | --- | --- |
| blur() | 移除焦点 | |
| focus() | 获取焦点 | |

View File

@ -34,7 +34,7 @@ cover: https://gw.alipayobjects.com/zos/alicdn/IxH16B9RD/Collapse.svg
### Collapse.Panel
| 参数 | 说明 | 类型 | 默认值 | 版本 |
| ----------- | ------------------------------ | ---------------------- | ------ | ----- |
| --- | --- | --- | --- | --- |
| collapsible | 是否可折叠或指定可折叠触发区域 | `header` \| `disabled` | - | 4.9.0 |
| extra | 自定义渲染每个面板右上角的内容 | ReactNode | - | |
| forceRender | 被隐藏时是否渲染 DOM 结构 | boolean | false | |

View File

@ -0,0 +1,12 @@
import ConfigProvider, { globalConfig } from '..';
describe('ConfigProvider.config', () => {
it('rootPrefixCls', () => {
expect(globalConfig().getRootPrefixCls()).toEqual('ant');
ConfigProvider.config({
prefixCls: 'light',
});
expect(globalConfig().getRootPrefixCls()).toEqual('light');
});
});

View File

@ -84,7 +84,7 @@ interface ProviderChildrenProps extends ConfigProviderProps {
}
export const defaultPrefixCls = 'ant';
let globalPrefixCls = defaultPrefixCls;
let globalPrefixCls: string;
const setGlobalConfig = (params: Pick<ConfigProviderProps, 'prefixCls'>) => {
if (params.prefixCls !== undefined) {
@ -92,10 +92,33 @@ const setGlobalConfig = (params: Pick<ConfigProviderProps, 'prefixCls'>) => {
}
};
function getGlobalPrefixCls() {
return globalPrefixCls || defaultPrefixCls;
}
export const globalConfig = () => ({
getPrefixCls: (suffixCls?: string, customizePrefixCls?: string) => {
if (customizePrefixCls) return customizePrefixCls;
return suffixCls ? `${globalPrefixCls}-${suffixCls}` : globalPrefixCls;
return suffixCls ? `${getGlobalPrefixCls()}-${suffixCls}` : getGlobalPrefixCls();
},
getRootPrefixCls: (rootPrefixCls?: string, customizePrefixCls?: string) => {
// Customize rootPrefixCls is first priority
if (rootPrefixCls) {
return rootPrefixCls;
}
// If Global prefixCls provided, use this
if (globalPrefixCls) {
return globalPrefixCls;
}
// [Legacy] If customize prefixCls provided, we cut it to get the prefixCls
if (customizePrefixCls && customizePrefixCls.includes('-')) {
return customizePrefixCls.replace(/^(.*)-[^-]*$/, '$1');
}
// Fallback to default prefixCls
return getGlobalPrefixCls();
},
});

View File

@ -78,7 +78,7 @@ The following APIs are shared by DatePicker, RangePicker.
### Common Methods
| Name | Description | Version |
| ------- | ------------ | ------- |
| --- | --- | --- |
| blur() | Remove focus | |
| focus() | Get focus | |

View File

@ -79,7 +79,7 @@ import locale from 'antd/lib/locale/zh_CN';
### 共同的方法
| 名称 | 描述 | 版本 |
| ------- | -------- | ---- |
| --- | --- | --- |
| blur() | 移除焦点 | |
| focus() | 获取焦点 | |

View File

@ -31,7 +31,7 @@ Commonly displayed on the details page.
### DescriptionItem
| Property | Description | Type | Default | Version |
| ------------ | ------------------------------ | ------------- | ------- | ------- |
| --- | --- | --- | --- | --- |
| contentStyle | Customize label style | CSSProperties | - | 4.9.0 |
| label | The description of the content | ReactNode | - | |
| labelStyle | Customize label style | CSSProperties | - | 4.9.0 |

View File

@ -32,7 +32,7 @@ cover: https://gw.alipayobjects.com/zos/alicdn/MjtG9_FOI/Descriptions.svg
### DescriptionItem
| 参数 | 说明 | 类型 | 默认值 | 版本 |
| ------------ | -------------- | ------------- | ------ | ----- |
| --- | --- | --- | --- | --- |
| contentStyle | 自定义内容样式 | CSSProperties | - | 4.9.0 |
| label | 内容的描述 | ReactNode | - | |
| labelStyle | 自定义标签样式 | CSSProperties | - | 4.9.0 |

View File

@ -16,7 +16,7 @@ cover: https://gw.alipayobjects.com/zos/alicdn/5swjECahe/Divider.svg
## API
| 参数 | 说明 | 类型 | 默认值 | 版本 |
| ----------- | -------------------------- | ----------------------------- | ------------ | ----- |
| --- | --- | --- | --- | --- |
| className | 分割线样式类 | string | - | |
| dashed | 是否虚线 | boolean | false | |
| orientation | 分割线标题的位置 | `left` \| `right` \| `center` | `center` | |

View File

@ -11,6 +11,9 @@ describe('Drawer.typescript', () => {
closable={false}
onClose={onClose}
visible={false}
contentWrapperStyle={{
background: '#f00',
}}
>
<p>Some contents...</p>
<p>Some contents...</p>

View File

@ -22,10 +22,10 @@ A Drawer is a panel that is typically overlaid on top of a page and slides in fr
| --- | --- | --- | --- | --- |
| afterVisibleChange | Callback after the animation ends when switching drawers | function(visible) | - | |
| bodyStyle | Style of the drawer content part | object | - | |
| contentWrapperStyle | Style of the drawer wrapper of content part | CSSProperties | - | |
| className | The class name of the container of the Drawer dialog | string | - | |
| closable | Whether a close (x) button is visible on top right of the Drawer dialog or not | boolean | true | |
| closeIcon | Custom close icon | ReactNode | &lt;CloseOutlined /> | |
| contentWrapperStyle | Style of the drawer wrapper of content part | CSSProperties | - | |
| destroyOnClose | Whether to unmount child components on closing drawer or not | boolean | false | |
| drawerStyle | Style of the popup layer element | object | - | |
| footer | The footer for Drawer | ReactNode | - | |

View File

@ -40,6 +40,7 @@ export interface DrawerProps {
drawerStyle?: React.CSSProperties;
headerStyle?: React.CSSProperties;
bodyStyle?: React.CSSProperties;
contentWrapperStyle?: React.CSSProperties;
title?: React.ReactNode;
visible?: boolean;
width?: number | string;

View File

@ -21,10 +21,10 @@ cover: https://gw.alipayobjects.com/zos/alicdn/7z8NJQhFb/Drawer.svg
| --- | --- | --- | --- | --- |
| afterVisibleChange | 切换抽屉时动画结束后的回调 | function(visible) | - | |
| bodyStyle | 可用于设置 Drawer 内容部分的样式 | CSSProperties | - | |
| contentWrapperStyle | 可用于设置 Drawer 包裹内容部分的样式 | CSSProperties | - | |
| className | 对话框外层容器的类名 | string | - | |
| closable | 是否显示右上角的关闭按钮 | boolean | true | |
| closeIcon | 自定义关闭图标 | ReactNode | &lt;CloseOutlined /> | |
| contentWrapperStyle | 可用于设置 Drawer 包裹内容部分的样式 | CSSProperties | - | |
| destroyOnClose | 关闭时销毁 Drawer 里的子元素 | boolean | false | |
| drawerStyle | 用于设置 Drawer 弹出层的样式 | CSSProperties | - | |
| footer | 抽屉的页脚 | ReactNode | - | |

View File

@ -26,7 +26,7 @@ const ValidateStatuses = tuple('success', 'warning', 'error', 'validating', '');
export type ValidateStatus = typeof ValidateStatuses[number];
type RenderChildren<Values = any> = (form: FormInstance<Values>) => React.ReactNode;
type RcFieldProps = Omit<FieldProps, 'children'>;
type RcFieldProps<Values = any> = Omit<FieldProps<Values>, 'children'>;
type ChildrenType<Values = any> = RenderChildren<Values> | React.ReactNode;
interface MemoInputProps {
@ -43,7 +43,7 @@ const MemoInput = React.memo(
export interface FormItemProps<Values = any>
extends FormItemLabelProps,
FormItemInputProps,
RcFieldProps {
RcFieldProps<Values> {
prefixCls?: string;
noStyle?: boolean;
style?: React.CSSProperties;

View File

@ -73,8 +73,10 @@ describe('Form.typescript', () => {
<Form<FormValues>>
<Form.Item<FormValues>>
{({ getFieldsValue }) => {
const values: FormValues = getFieldsValue();
const values = getFieldsValue();
expect(values).toBeTruthy();
expect(values.username).toBeTruthy();
expect(values.path1?.path2).toBeTruthy();
return null;
}}
</Form.Item>

View File

@ -9,15 +9,15 @@ title:
自定义或第三方的表单控件,也可以与 Form 组件一起使用。只要该组件遵循以下的约定:
> - 提供受控属性 `value` 或其它与 [`valuePropName`](https://ant.design/components/form/#getFieldDecorator-参数) 的值同名的属性。
> - 提供 `onChange` 事件或 [`trigger`](https://ant.design/components/form/#getFieldDecorator-参数) 的值同名的事件。
> - 提供受控属性 `value` 或其它与 [`valuePropName`](https://ant.design/components/form-cn/#Form.Item) 的值同名的属性。
> - 提供 `onChange` 事件或 [`trigger`](https://ant.design/components/form-cn/#Form.Item) 的值同名的事件。
## en-US
Customized or third-party form controls can be used in Form, too. Controls must follow these conventions:
> - It has a controlled property `value` or other name which is equal to the value of [`valuePropName`](https://ant.design/components/form/?locale=en-US#getFieldDecorator's-parameters).
> - It has event `onChange` or an event which name is equal to the value of [`trigger`](https://ant.design/components/form/?locale=en-US#getFieldDecorator's-parameters).
> - It has a controlled property `value` or other name which is equal to the value of [`valuePropName`](https://ant.design/components/form/#Form.Item).
> - It has event `onChange` or an event which name is equal to the value of [`trigger`](https://ant.design/components/form/#Form.Item).
```tsx
import React, { useState } from 'react';

View File

@ -204,7 +204,7 @@ Some operator functions in render form of Form.List.
New in 4.7.0. Show error messages, should only work with `rules` of Form.List. See [example](#components-form-demo-dynamic-form-item).
| Property | Description | Type | Default |
| -------- | ----------- | ------------ | ------- |
| --- | --- | --- | --- |
| errors | Error list | ReactNode\[] | - |
## Form.Provider
@ -287,7 +287,7 @@ validateFields()
#### FieldData
| Name | Description | Type |
| ---------- | ------------------------ | ------------------------ |
| --- | --- | --- |
| errors | Error messages | string\[] |
| name | Field name path | [NamePath](#NamePath)\[] |
| touched | Whether is operated | boolean |
@ -304,7 +304,9 @@ type Rule = RuleConfig | ((form: FormInstance) => RuleConfig);
| Name | Description | Type |
| --- | --- | --- |
| defaultField | Validate rule for all array elements, valid when `type` is `array` | [rule](#Rule) |
| enum | Match enum value. You need to set `type` to `enum` to enable this | any\[] |
| fields | Validate rule for child elements, valid when `type` is `array` or `object` | Record&lt;string, [rule](#Rule)> |
| len | Length of string, number, array | number |
| max | `type` required: max length of `string`, `number`, `array` | number |
| message | Error message. Will auto generate by [template](#validateMessages) if not provided | string |
@ -316,8 +318,6 @@ type Rule = RuleConfig | ((form: FormInstance) => RuleConfig);
| validateTrigger | Set validate trigger event. Must be the sub set of `validateTrigger` in Form.Item | string \| string\[] |
| validator | Customize validation rule. Accept Promise as return. See [example](#components-form-demo-register) | ([rule](#Rule), value) => Promise |
| whitespace | Failed if only has whitespace | boolean |
| defaultField | Validate rule for all array elements, valid when `type` is `array` | [rule](#Rule) |
| fields | Validate rule for child elements, valid when `type` is `array` or `object` | Record<string, [rule](#Rule)> |
## Migrate to v4

View File

@ -193,7 +193,7 @@ Form 通过增量更新方式,只更新被修改的字段相关组件以达到
Form.List 渲染表单相关操作函数。
| 参数 | 说明 | 类型 | 默认值 |
| ------ | ---------- | -------------------------------------------------- | ------------------ |
| --- | --- | --- | --- |
| add | 新增表单项 | (defaultValue?: any, insertIndex?: number) => void | insertIndex: 4.6.0 |
| move | 移动表单项 | (from: number, to: number) => void | - |
| remove | 删除表单项 | (index: number \| number\[]) => void | number\[]: 4.5.0 |
@ -203,7 +203,7 @@ Form.List 渲染表单相关操作函数。
4.7.0 新增。错误展示组件,仅限配合 Form.List 的 rules 一同使用。参考[示例](#components-form-demo-dynamic-form-item)。
| 参数 | 说明 | 类型 | 默认值 |
| ------ | -------- | ------------ | ------ |
| --- | --- | --- | --- |
| errors | 错误列表 | ReactNode\[] | - |
## Form.Provider
@ -286,7 +286,7 @@ validateFields()
#### FieldData
| 名称 | 说明 | 类型 |
| ---------- | ---------------- | ------------------------ |
| --- | --- | --- |
| errors | 错误信息 | string\[] |
| name | 字段名称 | [NamePath](#NamePath)\[] |
| touched | 是否被用户操作过 | boolean |
@ -303,7 +303,9 @@ type Rule = RuleConfig | ((form: FormInstance) => RuleConfig);
| 名称 | 说明 | 类型 |
| --- | --- | --- |
| defaultField | 仅在 `type``array` 类型时有效,用于指定数组元素的校验规则 | [rule](#Rule) |
| enum | 是否匹配枚举中的值(需要将 `type` 设置为 `enum` | any\[] |
| fields | 仅在 `type``array``object` 类型时有效,用于指定子元素的校验规则 | Record&lt;string, [rule](#Rule)> |
| len | string 类型时为字符串长度number 类型时为确定数字; array 类型时为数组长度 | number |
| max | 必须设置 `type`string 类型为字符串最大长度number 类型时为最大值array 类型时为数组最大长度 | number |
| message | 错误信息,不设置时会通过[模板](#validateMessages)自动生成 | string |
@ -315,8 +317,6 @@ type Rule = RuleConfig | ((form: FormInstance) => RuleConfig);
| validateTrigger | 设置触发验证时机,必须是 Form.Item 的 `validateTrigger` 的子集 | string \| string\[] |
| validator | 自定义校验,接收 Promise 作为返回值。[示例](#components-form-demo-register)参考 | ([rule](#Rule), value) => Promise |
| whitespace | 如果字段仅包含空格则校验不通过 | boolean |
| defaultField | 仅在 `type``array` 类型时有效,用于指定数组元素的校验规则 | [rule](#Rule) |
| fields | 仅在 `type``array``object` 类型时有效,用于指定子元素的校验规则 | Record<string, [rule](#Rule)> |
## 从 v3 升级到 v4

View File

@ -3,6 +3,7 @@ import { createContext, Context } from 'react';
export interface RowContextState {
gutter?: [number, number];
wrap?: boolean;
supportFlexGap?: boolean;
}
const RowContext: Context<RowContextState> = createContext({});

View File

@ -1,4 +1,5 @@
import React from 'react';
import ReactDOMServer from 'react-dom/server';
import { mount } from 'enzyme';
import { Col, Row } from '..';
// eslint-disable-next-line no-unused-vars
@ -26,4 +27,27 @@ describe('Grid.Gap', () => {
}),
);
});
it('not break ssr', () => {
const warnSpy = jest.spyOn(console, 'error').mockImplementation(() => {});
const Demo = () => (
<Row gutter={[16, 8]}>
<Col />
</Row>
);
const div = document.createElement('div');
const ssrTxt = ReactDOMServer.renderToString(<Demo />);
div.innerHTML = ssrTxt;
const wrapper = mount(<Demo />, { hydrateIn: div });
expect(warnSpy).not.toHaveBeenCalled();
warnSpy.mockRestore();
wrapper.unmount();
});
});

View File

@ -2,7 +2,6 @@ import * as React from 'react';
import classNames from 'classnames';
import RowContext from './RowContext';
import { ConfigContext } from '../config-provider';
import { detectFlexGapSupported } from '../_util/styleChecker';
// https://github.com/ant-design/ant-design/issues/14324
type ColSpanType = number | string;
@ -48,7 +47,7 @@ function parseFlex(flex: FlexType): string {
const sizes = ['xs', 'sm', 'md', 'lg', 'xl', 'xxl'] as const;
const Col = React.forwardRef<HTMLDivElement, ColProps>((props, ref) => {
const { getPrefixCls, direction } = React.useContext(ConfigContext);
const { gutter, wrap } = React.useContext(RowContext);
const { gutter, wrap, supportFlexGap } = React.useContext(RowContext);
const {
prefixCls: customizePrefixCls,
@ -112,7 +111,7 @@ const Col = React.forwardRef<HTMLDivElement, ColProps>((props, ref) => {
}
// Vertical gutter use padding when gap not support
if (gutter && gutter[1] > 0 && !detectFlexGapSupported()) {
if (gutter && gutter[1] > 0 && !supportFlexGap) {
const verticalGutter = gutter[1] / 2;
mergedStyle.paddingTop = verticalGutter;
mergedStyle.paddingBottom = verticalGutter;

View File

@ -0,0 +1,11 @@
import * as React from 'react';
import { detectFlexGapSupported } from '../../_util/styleChecker';
export default () => {
const [flexible, setFlexible] = React.useState(false);
React.useEffect(() => {
setFlexible(detectFlexGapSupported());
}, []);
return flexible;
};

View File

@ -8,7 +8,7 @@ import ResponsiveObserve, {
ScreenMap,
responsiveArray,
} from '../_util/responsiveObserve';
import { detectFlexGapSupported } from '../_util/styleChecker';
import useFlexGapSupport from './hooks/useFlexGapSupport';
const RowAligns = tuple('top', 'middle', 'bottom', 'stretch');
const RowJustify = tuple('start', 'end', 'center', 'space-around', 'space-between');
@ -46,8 +46,11 @@ const Row = React.forwardRef<HTMLDivElement, RowProps>((props, ref) => {
xxl: true,
});
const supportFlexGap = useFlexGapSupport();
const gutterRef = React.useRef<Gutter | [Gutter, Gutter]>(gutter);
// ================================== Effect ==================================
React.useEffect(() => {
const token = ResponsiveObserve.subscribe(screen => {
const currentGutter = gutterRef.current || 0;
@ -62,6 +65,7 @@ const Row = React.forwardRef<HTMLDivElement, RowProps>((props, ref) => {
return () => ResponsiveObserve.unsubscribe(token);
}, []);
// ================================== Render ==================================
const getGutter = (): [number, number] => {
const results: [number, number] = [0, 0];
const normalizedGutter = Array.isArray(gutter) ? gutter : [gutter, 0];
@ -102,7 +106,7 @@ const Row = React.forwardRef<HTMLDivElement, RowProps>((props, ref) => {
rowStyle.marginLeft = horizontalGutter;
rowStyle.marginRight = horizontalGutter;
if (detectFlexGapSupported()) {
if (supportFlexGap) {
// Set gap direct if flex gap support
[, rowStyle.rowGap] = gutters;
} else {
@ -110,8 +114,14 @@ const Row = React.forwardRef<HTMLDivElement, RowProps>((props, ref) => {
rowStyle.marginBottom = verticalGutter;
}
const rowContext = React.useMemo(() => ({ gutter: gutters, wrap, supportFlexGap }), [
gutters,
wrap,
supportFlexGap,
]);
return (
<RowContext.Provider value={{ gutter: gutters, wrap }}>
<RowContext.Provider value={rowContext}>
<div {...others} className={classes} style={{ ...rowStyle, ...style }} ref={ref}>
{children}
</div>

View File

@ -14,7 +14,7 @@ npm install --save @ant-design/icons
## List of icons
```__react
```_\_react
import IconDisplay from 'site/theme/template/IconDisplay';
ReactDOM.render(<IconDisplay />, mountNode);
```

View File

@ -19,7 +19,7 @@ npm install --save @ant-design/icons
## 图标列表
```__react
```_\_react
import IconDisplay from 'site/theme/template/IconDisplay';
ReactDOM.render(<IconDisplay />, mountNode);
```
@ -149,7 +149,7 @@ ReactDOM.render(<Icon component={MessageSvg} />, mountNode);
`Icon` 中的 `component` 组件的接受的属性如下:
| 字段 | 说明 | 类型 | 只读值 | 版本 |
| --------- | ----------------------- | ---------------- | -------------- | ---- |
| --- | --- | --- | --- | --- |
| className | 计算后的 `svg` 类名 | string | - | |
| fill | `svg` 元素填充的颜色 | string | `currentColor` | |
| height | `svg` 元素高度 | string \| number | `1em` | |

View File

@ -38,7 +38,7 @@ When a numeric value needs to be provided.
## Methods
| Name | Description |
| ------- | ------------ |
| --- | --- |
| blur() | Remove focus |
| focus() | Get focus |

View File

@ -41,7 +41,7 @@ cover: https://gw.alipayobjects.com/zos/alicdn/XOS8qZ0kU/InputNumber.svg
## 方法
| 名称 | 描述 |
| ------- | -------- |
| --- | --- |
| blur() | 移除焦点 |
| focus() | 获取焦点 |

View File

@ -23,7 +23,7 @@ A list can be used to display content related to a single subject. The content c
| footer | List footer renderer | ReactNode | - | |
| grid | The grid type of list. You can set grid to something like {gutter: 16, column: 4} | [object](#List-grid-props) | - | |
| header | List header renderer | ReactNode | - | |
| itemLayout | The layout of list, default is `horizontal`, If a vertical list is desired, set the itemLayout property to `vertical` | string | - | |
| itemLayout | The layout of list | `horizontal` \| `vertical` | `horizontal` | |
| loading | Shows a loading indicator while the contents of the list are being fetched | boolean \| [SpinProps](/components/spin/#API) ([more](https://github.com/ant-design/ant-design/issues/8659)) | false | |
| loadMore | Shows a load more content | ReactNode | - | |
| locale | The i18n text including empty text | object | {emptyText: `No Data`} | |
@ -38,7 +38,7 @@ A list can be used to display content related to a single subject. The content c
Properties for pagination.
| Property | Description | Type | Default |
| -------- | ---------------------------------------- | --------------------------- | -------- |
| --- | --- | --- | --- |
| position | The specify the position of `Pagination` | `top` \| `bottom` \| `both` | `bottom` |
More about pagination, please check [`Pagination`](/components/pagination/).
@ -46,7 +46,7 @@ More about pagination, please check [`Pagination`](/components/pagination/).
### List grid props
| Property | Description | Type | Default | Version |
| -------- | ------------------------ | ------ | ------- | ------- |
| --- | --- | --- | --- | --- |
| column | The column of grid | number | - | |
| gutter | The spacing between grid | number | 0 | |
| xs | `<576px` column of grid | number | - | |
@ -66,7 +66,7 @@ More about pagination, please check [`Pagination`](/components/pagination/).
### List.Item.Meta
| Property | Description | Type | Default | Version |
| ----------- | ---------------------------- | --------- | ------- | ------- |
| --- | --- | --- | --- | --- |
| avatar | The avatar of list item | ReactNode | - | |
| description | The description of list item | ReactNode | - | |
| title | The title of list item | ReactNode | - | |

View File

@ -41,7 +41,7 @@ cover: https://gw.alipayobjects.com/zos/alicdn/5FrZKStG_/List.svg
分页的配置项。
| 参数 | 说明 | 类型 | 默认值 |
| -------- | ------------------ | --------------------------- | -------- |
| --- | --- | --- | --- |
| position | 指定分页显示的位置 | `top` \| `bottom` \| `both` | `bottom` |
更多配置项,请查看 [`Pagination`](/components/pagination/)。
@ -49,7 +49,7 @@ cover: https://gw.alipayobjects.com/zos/alicdn/5FrZKStG_/List.svg
### List grid props
| 参数 | 说明 | 类型 | 默认值 | 版本 |
| ------ | -------------------- | ------ | ------ | ---- |
| --- | --- | --- | --- | --- |
| column | 列数 | number | - | |
| gutter | 栅格间隔 | number | 0 | |
| xs | `<576px` 展示的列数 | number | - | |
@ -69,7 +69,7 @@ cover: https://gw.alipayobjects.com/zos/alicdn/5FrZKStG_/List.svg
### List.Item.Meta
| 参数 | 说明 | 类型 | 默认值 | 版本 |
| ----------- | ------------------ | --------- | ------ | ---- |
| --- | --- | --- | --- | --- |
| avatar | 列表元素的图标 | ReactNode | - | |
| description | 列表元素的描述内容 | ReactNode | - | |
| title | 列表元素的标题 | ReactNode | - | |

View File

@ -153369,7 +153369,7 @@ exports[`Locale Provider should display the text as ko 1`] = `
>
<input
autocomplete="off"
placeholder="날짜 선택"
placeholder="시간 선택"
readonly=""
size="10"
title=""

View File

@ -0,0 +1,73 @@
import React from 'react';
import { mount } from 'enzyme';
import ConfigProvider from '../../config-provider';
import { Modal } from '../..';
import zhCN from '../zh_CN';
class Demo extends React.Component {
static defaultProps = {};
constructor(props) {
super(props);
console.log('constructor', props.type);
}
componentDidMount() {
if (this.props.type === 'dashboard') {
Modal.confirm({ title: 'Hello World!' });
}
console.log('componentDidMount', this.props.type);
}
componentWillUnmount() {
console.log('componentWillUnmount', this.props.type);
}
render() {
return <div>{this.props.type}</div>;
}
}
describe('Locale Provider demo', () => {
it('change type', () => {
jest.useFakeTimers();
const BasicExample = () => {
const [type, setType] = React.useState('');
return (
<div>
<a className="about" onClick={() => setType('about')}>
about
</a>
<a className="dashboard" onClick={() => setType('dashboard')}>
dashboard
</a>
<div>
{type === 'about' && (
<ConfigProvider locale={zhCN}>
<Demo type="about" />
</ConfigProvider>
)}
{type === 'dashboard' && (
<ConfigProvider locale={zhCN}>
<Demo type="dashboard" />
</ConfigProvider>
)}
</div>
</div>
);
};
const wrapper = mount(<BasicExample />);
wrapper.find('.about').at(0).simulate('click');
jest.runAllTimers();
wrapper.find('.dashboard').at(0).simulate('click');
jest.runAllTimers();
expect(document.body.querySelectorAll('.ant-btn-primary span')[0].textContent).toBe('确 定');
Modal.destroyAll();
jest.useRealTimers();
});
});

View File

@ -62,6 +62,10 @@ export default class LocaleProvider extends React.Component<LocaleProviderProps,
);
}
componentDidMount() {
changeConfirmLocale(this.props.locale && this.props.locale.Modal);
}
componentDidUpdate(prevProps: LocaleProviderProps) {
const { locale } = this.props;
if (prevProps.locale !== locale) {

View File

@ -44,7 +44,7 @@ When need to mention someone or something.
### Mention methods
| Name | Description |
| ------- | ------------ |
| --- | --- |
| blur() | Remove focus |
| focus() | Get focus |

View File

@ -45,13 +45,13 @@ cover: https://gw.alipayobjects.com/zos/alicdn/jPE-itMFM/Mentions.svg
### Mentions 方法
| 名称 | 描述 |
| ------- | -------- |
| --- | --- |
| blur() | 移除焦点 |
| focus() | 获取焦点 |
### Option
| 参数 | 说明 | 类型 | 默认值 |
| -------- | -------------- | --------- | ------ |
| --- | --- | --- | --- |
| children | 选项内容 | ReactNode | - |
| value | 选择时填充的值 | string | - |

View File

@ -56,7 +56,7 @@ More layouts with navigation: [Layout](/components/layout).
### Menu.Item
| Param | Description | Type | Default value | Version |
| -------- | ------------------------------------ | --------- | ------------- | ------- |
| --- | --- | --- | --- | --- |
| danger | Display the danger style | boolean | false | 4.3.0 |
| disabled | Whether menu item is disabled | boolean | false | |
| icon | The icon of the menu item | ReactNode | - | 4.2.0 |
@ -98,7 +98,7 @@ More layouts with navigation: [Layout](/components/layout).
### Menu.ItemGroup
| Param | Description | Type | Default value | Version |
| -------- | ---------------------- | ----------- | ------------- | ------- |
| --- | --- | --- | --- | --- |
| children | Sub-menu items | MenuItem\[] | - | |
| title | The title of the group | ReactNode | - | |

View File

@ -57,7 +57,7 @@ cover: https://gw.alipayobjects.com/zos/alicdn/3XZcjGpvK/Menu.svg
### Menu.Item
| 参数 | 说明 | 类型 | 默认值 | 版本 |
| -------- | ------------------------ | --------- | ------ | ----- |
| --- | --- | --- | --- | --- |
| danger | 展示错误状态样式 | boolean | false | 4.3.0 |
| disabled | 是否禁用 | boolean | false | |
| icon | 菜单图标 | ReactNode | - | 4.2.0 |
@ -99,7 +99,7 @@ cover: https://gw.alipayobjects.com/zos/alicdn/3XZcjGpvK/Menu.svg
### Menu.ItemGroup
| 参数 | 说明 | 类型 | 默认值 | 版本 |
| -------- | ------------ | ----------- | ------ | ---- |
| --- | --- | --- | --- | --- |
| children | 分组的菜单项 | MenuItem\[] | - | |
| title | 分组标题 | ReactNode | - | |

View File

@ -76,6 +76,25 @@ describe('message.config', () => {
duration: 3,
});
});
it('customize prefix should auto get transition prefixCls', () => {
message.config({
prefixCls: 'light-message',
});
message.info('bamboo');
expect(getInstance().config).toEqual(
expect.objectContaining({
transitionName: 'light-move-up',
}),
);
message.config({
prefixCls: '',
});
});
it('should be able to global config rootPrefixCls', () => {
ConfigProvider.config({ prefixCls: 'prefix-test' });
message.info('last');

View File

@ -57,8 +57,8 @@ The properties of config are as follows:
| icon | Customized Icon | ReactNode | - |
| key | The unique identifier of the Message | string \| number | - |
| style | Customized inline style | [CSSProperties](https://github.com/DefinitelyTyped/DefinitelyTyped/blob/e434515761b36830c3e58a970abf5186f005adac/types/react/index.d.ts#L794) | - |
| onClose | Specify a function that will be called when the message is closed | function | - |
| onClick | Specify a function that will be called when the message is clicked | function | - |
| onClose | Specify a function that will be called when the message is closed | function | - |
### Global static methods
@ -120,4 +120,4 @@ return (
### How to set static methods prefixCls
You can config with [`ConfigProvider.config`](</components/config-provider/#ConfigProvider.config()-4.13.0+>)
You can config with [`ConfigProvider.config`](/components/config-provider/#ConfigProvider.config()-4.13.0+)

View File

@ -34,7 +34,6 @@ export interface ConfigOptions {
top?: number;
duration?: number;
prefixCls?: string;
rootPrefixCls?: string;
getContainer?: () => HTMLElement;
transitionName?: string;
maxCount?: number;
@ -79,31 +78,36 @@ function getRCNotificationInstance(
}) => void,
) {
const { prefixCls: customizePrefixCls } = args;
const { getPrefixCls } = globalConfig();
const { getPrefixCls, getRootPrefixCls } = globalConfig();
const prefixCls = getPrefixCls('message', customizePrefixCls || localPrefixCls);
const rootPrefixCls = getPrefixCls(undefined, args.rootPrefixCls);
const rootPrefixCls = getRootPrefixCls(args.rootPrefixCls, prefixCls);
if (messageInstance) {
callback({ prefixCls, rootPrefixCls, instance: messageInstance });
return;
}
RCNotification.newInstance(
{
const instanceConfig = {
prefixCls,
transitionName: hasTransitionName ? transitionName : `${rootPrefixCls}-${transitionName}`,
style: { top: defaultTop }, // 覆盖原来的样式
getContainer,
maxCount,
},
(instance: any) => {
};
RCNotification.newInstance(instanceConfig, (instance: any) => {
if (messageInstance) {
callback({ prefixCls, rootPrefixCls, instance: messageInstance });
return;
}
messageInstance = instance;
if (process.env.NODE_ENV === 'test') {
(messageInstance as any).config = instanceConfig;
}
callback({ prefixCls, rootPrefixCls, instance });
},
);
});
}
export interface ThenableArgument {

View File

@ -26,7 +26,7 @@ cover: https://gw.alipayobjects.com/zos/alicdn/hAkKTIW0K/Message.svg
- `message.loading(content, [duration], onClose)`
| 参数 | 说明 | 类型 | 默认值 |
| -------- | ------------------------------------------- | ------------------- | ------ |
| --- | --- | --- | --- |
| content | 提示内容 | ReactNode \| config | - |
| duration | 自动关闭的延时,单位秒。设为 0 时不自动关闭 | number | 3 |
| onClose | 关闭时触发的回调函数 | function | - |
@ -58,8 +58,8 @@ cover: https://gw.alipayobjects.com/zos/alicdn/hAkKTIW0K/Message.svg
| icon | 自定义图标 | ReactNode | - |
| key | 当前提示的唯一标志 | string \| number | - |
| style | 自定义内联样式 | [CSSProperties](https://github.com/DefinitelyTyped/DefinitelyTyped/blob/e434515761b36830c3e58a970abf5186f005adac/types/react/index.d.ts#L794) | - |
| onClose | 关闭时触发的回调函数 | function | - |
| onClick | 点击 message 时触发的回调函数 | function | - |
| onClose | 关闭时触发的回调函数 | function | - |
### 全局方法
@ -121,4 +121,4 @@ return (
### 静态方法如何设置 prefixCls
你可以通过 [`ConfigProvider.config`](</components/config-provider/#ConfigProvider.config()-4.13.0+>) 进行设置。
你可以通过 [`ConfigProvider.config`](/components/config-provider/#ConfigProvider.config()-4.13.0+) 进行设置。

View File

@ -2,6 +2,7 @@ import TestUtils, { act } from 'react-dom/test-utils';
import CSSMotion from 'rc-motion';
import { genCSSMotion } from 'rc-motion/lib/CSSMotion';
import KeyCode from 'rc-util/lib/KeyCode';
import { resetWarned } from 'rc-util/lib/warning';
import Modal from '..';
import { destroyFns } from '../Modal';
import { sleep } from '../../../tests/utils';
@ -482,10 +483,17 @@ describe('Modal.confirm triggers callbacks correctly', () => {
});
it('should be able to config rootPrefixCls', () => {
resetWarned();
jest.useFakeTimers();
Modal.config({
rootPrefixCls: 'my',
});
expect(errorSpy).toHaveBeenCalledWith(
'Warning: [antd: Modal] Modal.config is deprecated. Please use ConfigProvider.config instead.',
);
confirm({
title: 'title',
});

View File

@ -1,5 +1,6 @@
import React from 'react';
import CSSMotion from 'rc-motion';
import { act } from 'react-dom/test-utils';
import { genCSSMotion } from 'rc-motion/lib/CSSMotion';
import { mount } from 'enzyme';
import Modal from '..';
@ -48,15 +49,19 @@ describe('Modal.hook', () => {
expect(wrapper.find('.ant-modal-body').length).toBeTruthy();
// Update instance
act(() => {
instance.update({
content: <div className="updated-content" />,
});
});
wrapper.update();
expect(wrapper.find('.updated-content')).toHaveLength(1);
// Destroy
act(() => {
instance.destroy();
jest.runAllTimers();
});
wrapper.update();
expect(wrapper.find('Modal')).toHaveLength(0);
@ -100,4 +105,62 @@ describe('Modal.hook', () => {
wrapper.find('.ant-modal-wrap').simulate('click');
expect(cancelCount).toEqual(2); // click modal wrapper, trigger onCancel
});
it('update before render', () => {
const Demo = () => {
const [modal, contextHolder] = Modal.useModal();
const openBrokenModal = React.useCallback(() => {
const instance = modal.info({
title: 'Light',
});
instance.update({
title: 'Bamboo',
});
}, [modal]);
return (
<div className="App">
{contextHolder}
<div className="open-hook-modal-btn" onClick={openBrokenModal}>
Test hook modal
</div>
</div>
);
};
const wrapper = mount(<Demo />);
wrapper.find('.open-hook-modal-btn').simulate('click');
expect(wrapper.find('.ant-modal-confirm-title').text()).toEqual('Bamboo');
});
it('destroy before render', () => {
const Demo = () => {
const [modal, contextHolder] = Modal.useModal();
const openBrokenModal = React.useCallback(() => {
const instance = modal.info({
title: 'Light',
});
instance.destroy();
}, [modal]);
return (
<div className="App">
{contextHolder}
<div className="open-hook-modal-btn" onClick={openBrokenModal}>
Test hook modal
</div>
</div>
);
};
const wrapper = mount(<Demo />);
wrapper.find('.open-hook-modal-btn').simulate('click');
expect(wrapper.exists('.ant-modal-confirm-title')).toBeFalsy();
});
});

View File

@ -8,6 +8,7 @@ import { getConfirmLocale } from './locale';
import { ModalFuncProps, destroyFns } from './Modal';
import ConfirmDialog from './ConfirmDialog';
import { globalConfig } from '../config-provider';
import devWarning from '../_util/devWarning';
let defaultRootPrefixCls = '';
@ -159,5 +160,10 @@ export function withConfirm(props: ModalFuncProps): ModalFuncProps {
}
export function modalGlobalConfig({ rootPrefixCls }: { rootPrefixCls: string }) {
devWarning(
false,
'Modal',
'Modal.config is deprecated. Please use ConfigProvider.config instead.',
);
defaultRootPrefixCls = rootPrefixCls;
}

View File

@ -171,4 +171,4 @@ You can config `transitionName=""` and `maskTransitionName=""` to remove motion
### How to set static methods prefixCls
You can config with [`ConfigProvider.config`](</components/config-provider/#ConfigProvider.config()-4.13.0+>)
You can config with [`ConfigProvider.config`](/components/config-provider/#ConfigProvider.config()-4.13.0+)

View File

@ -128,7 +128,7 @@ browserHistory.listen(() => {
### Modal.useModal()
当你需要使用 Context 时,可以通过 `Modal.useModal` 创建一个 `contextHolder` 插入子节点中。通过 hooks 创建的临时 Modal 将会得到 `contextHolder` 所在位置的所有上下文。创建的 `modal` 对象拥有与 [`Modal.method`](<#Modal.method()>) 相同的创建通知方法。
当你需要使用 Context 时,可以通过 `Modal.useModal` 创建一个 `contextHolder` 插入子节点中。通过 hooks 创建的临时 Modal 将会得到 `contextHolder` 所在位置的所有上下文。创建的 `modal` 对象拥有与 [`Modal.method`](#Modal.method()) 相同的创建通知方法。
```jsx
const [modal, contextHolder] = Modal.useModal();
@ -172,4 +172,4 @@ return (
### 静态方法如何设置 prefixCls
你可以通过 [`ConfigProvider.config`](</components/config-provider/#ConfigProvider.config()-4.13.0+>) 进行设置。
你可以通过 [`ConfigProvider.config`](/components/config-provider/#ConfigProvider.config()-4.13.0+) 进行设置。

View File

@ -34,6 +34,21 @@ const ElementsHolder = React.memo(
export default function useModal(): [Omit<ModalStaticFunctions, 'warn'>, React.ReactElement] {
const holderRef = React.useRef<ElementsHolderRef>(null as any);
// ========================== Effect ==========================
const [actionQueue, setActionQueue] = React.useState<(() => void)[]>([]);
React.useEffect(() => {
if (actionQueue.length) {
const cloneQueue = [...actionQueue];
cloneQueue.forEach(action => {
action();
});
setActionQueue([]);
}
}, [actionQueue]);
// =========================== Hook ===========================
const getConfirmFunc = React.useCallback(
(withFunc: (config: ModalFuncProps) => ModalFuncProps) =>
function hookConfirm(config: ModalFuncProps) {
@ -57,13 +72,25 @@ export default function useModal(): [Omit<ModalStaticFunctions, 'warn'>, React.R
return {
destroy: () => {
function destroyAction() {
modalRef.current?.destroy();
}
if (modalRef.current) {
modalRef.current.destroy();
destroyAction();
} else {
setActionQueue(prev => [...prev, destroyAction]);
}
},
update: (newConfig: ModalFuncProps) => {
function updateAction() {
modalRef.current?.update(newConfig);
}
if (modalRef.current) {
modalRef.current.update(newConfig);
updateAction();
} else {
setActionQueue(prev => [...prev, updateAction]);
}
},
};

View File

@ -100,4 +100,4 @@ return (
### How to set static methods prefixCls
You can config with [`ConfigProvider.config`](</components/config-provider/#ConfigProvider.config()-4.13.0+>)
You can config with [`ConfigProvider.config`](/components/config-provider/#ConfigProvider.config()-4.13.0+)

View File

@ -101,4 +101,4 @@ return (
### 静态方法如何设置 prefixCls
你可以通过 [`ConfigProvider.config`](</components/config-provider/#ConfigProvider.config()-4.13.0+>) 进行设置。
你可以通过 [`ConfigProvider.config`](/components/config-provider/#ConfigProvider.config()-4.13.0+) 进行设置。

View File

@ -1,5 +1,6 @@
import * as React from 'react';
import classNames from 'classnames';
import useMergedState from 'rc-util/lib/hooks/useMergedState';
import ExclamationCircleFilled from '@ant-design/icons/ExclamationCircleFilled';
import KeyCode from 'rc-util/lib/KeyCode';
import Tooltip, { AbstractTooltipProps } from '../tooltip';
@ -39,27 +40,16 @@ export interface PopconfirmLocale {
}
const Popconfirm = React.forwardRef<unknown, PopconfirmProps>((props, ref) => {
const [visible, setVisible] = React.useState(props.visible);
React.useEffect(() => {
if ('visible' in props) {
setVisible(props.visible);
}
}, [props.visible]);
React.useEffect(() => {
if ('defaultVisible' in props) {
setVisible(props.defaultVisible);
}
}, [props.defaultVisible]);
const [visible, setVisible] = useMergedState(false, {
value: props.visible,
defaultValue: props.defaultVisible,
});
const settingVisible = (
value: boolean,
e?: React.MouseEvent<HTMLButtonElement> | React.KeyboardEvent<HTMLDivElement>,
) => {
if (!('visible' in props)) {
setVisible(value);
}
props.onVisibleChange?.(value, e);
};

View File

@ -16,7 +16,7 @@ Comparing with `Tooltip`, besides information `Popover` card can also provide ac
## API
| Param | Description | Type | Default value | Version |
| ------- | ------------------- | ---------------------------- | ------------- | ------- |
| --- | --- | --- | --- | --- |
| content | Content of the card | ReactNode \| () => ReactNode | - | |
| title | Title of the card | ReactNode \| () => ReactNode | - | |

View File

@ -17,7 +17,7 @@ cover: https://gw.alipayobjects.com/zos/alicdn/1PNL1p_cO/Popover.svg
## API
| 参数 | 说明 | 类型 | 默认值 | 版本 |
| ------- | -------- | ---------------------------- | ------ | ---- |
| --- | --- | --- | --- | --- |
| content | 卡片内容 | ReactNode \| () => ReactNode | - | |
| title | 卡片标题 | ReactNode \| () => ReactNode | - | |

View File

@ -42,7 +42,7 @@ cover: https://gw.alipayobjects.com/zos/alicdn/xqsDu4ZyR/Progress.svg
### `type="circle"`
| 属性 | 说明 | 类型 | 默认值 |
| ----------- | ------------------------------------------------ | ---------------- | ------ |
| --- | --- | --- | --- |
| strokeColor | 圆形进度条线的色彩,传入 object 时为渐变 | string \| object | - |
| strokeWidth | 圆形进度条线的宽度,单位是进度条画布宽度的百分比 | number | 6 |
| width | 圆形进度条画布宽度,单位 px | number | 132 |

View File

@ -45,6 +45,6 @@ Radio group can wrap a group of `Radio`。
### Radio
| Name | Description |
| ------- | ------------ |
| --- | --- |
| blur() | Remove focus |
| focus() | Get focus |

View File

@ -18,7 +18,7 @@ cover: https://gw.alipayobjects.com/zos/alicdn/8cYb5seNB/Radio.svg
### Radio/Radio.Button
| 参数 | 说明 | 类型 | 默认值 |
| -------------- | --------------------------------- | ------- | ------ |
| --- | --- | --- | --- |
| autoFocus | 自动获取焦点 | boolean | false |
| checked | 指定当前是否选中 | boolean | false |
| defaultChecked | 初始是否选中 | boolean | false |
@ -46,6 +46,6 @@ cover: https://gw.alipayobjects.com/zos/alicdn/8cYb5seNB/Radio.svg
### Radio
| 名称 | 描述 |
| ------- | -------- |
| --- | --- |
| blur() | 移除焦点 |
| focus() | 获取焦点 |

View File

@ -36,6 +36,6 @@ Rate component.
## Methods
| Name | Description |
| ------- | ------------ |
| --- | --- |
| blur() | Remove focus |
| focus() | Get focus |

View File

@ -37,6 +37,6 @@ cover: https://gw.alipayobjects.com/zos/alicdn/R5uiIWmxe/Rate.svg
## 方法
| 名称 | 描述 |
| ------- | -------- |
| --- | --- |
| blur() | 移除焦点 |
| focus() | 获取焦点 |

View File

@ -82,14 +82,14 @@ Select component to select value from options.
### Select Methods
| Name | Description | Version |
| ------- | ------------ | ------- |
| --- | --- | --- |
| blur() | Remove focus | |
| focus() | Get focus | |
### Option props
| Property | Description | Type | Default | Version |
| --------- | ------------------------------------------ | ---------------- | ------- | ------- |
| --- | --- | --- | --- | --- |
| className | The additional class to option | string | - | |
| disabled | Disable this option | boolean | false | |
| title | `title` of Select after select this Option | string | - | |
@ -98,7 +98,7 @@ Select component to select value from options.
### OptGroup props
| Property | Description | Type | Default | Version |
| -------- | ----------- | ----------------------- | ------- | ------- |
| --- | --- | --- | --- | --- |
| key | Group key | string | - | |
| label | Group label | string \| React.Element | - | |

View File

@ -83,14 +83,14 @@ cover: https://gw.alipayobjects.com/zos/alicdn/_0XzgOis7/Select.svg
### Select Methods
| 名称 | 说明 | 版本 |
| ------- | -------- | ---- |
| --- | --- | --- |
| blur() | 取消焦点 | |
| focus() | 获取焦点 | |
### Option props
| 参数 | 说明 | 类型 | 默认值 | 版本 |
| --------- | --------------------------------- | ---------------- | ------ | ---- |
| --- | --- | --- | --- | --- |
| className | Option 器类名 | string | - | |
| disabled | 是否禁用 | boolean | false | |
| title | 选中该 Option 后Select 的 title | string | - | |
@ -99,7 +99,7 @@ cover: https://gw.alipayobjects.com/zos/alicdn/_0XzgOis7/Select.svg
### OptGroup props
| 参数 | 说明 | 类型 | 默认值 | 版本 |
| ----- | ---- | ----------------------- | ------ | ---- |
| --- | --- | --- | --- | --- |
| key | Key | string | - | |
| label | 组名 | string \| React.Element | - | |

View File

@ -204,10 +204,9 @@
.@{select-prefix-cls}-selection-placeholder {
left: @input-padding-horizontal-sm;
}
// https://github.com/ant-design/ant-design/issues/22906
.@{select-prefix-cls}-selection-search:first-child
.@{select-prefix-cls}-selection-search-input {
margin-left: 3px;
// https://github.com/ant-design/ant-design/issues/29559
.@{select-prefix-cls}-selection-search {
margin-inline-start: 3px;
}
}
&.@{select-prefix-cls}-lg {

View File

@ -86,13 +86,6 @@
left: auto;
}
}
&:first-child > .@{select-prefix-cls}-selection-search-input {
.@{select-prefix-cls}-rtl& {
margin-right: 5px !important;
margin-left: 0 !important;
}
}
}
// ======================= Placeholder =======================
@ -149,18 +142,6 @@
}
}
// ========================== Input ==========================
// We only change the style of non-customize input which is only support by `combobox` mode.
// Not customize
&:not(.@{select-prefix-cls}-customize-input) {
.@{select-prefix-cls}-selector {
.@{select-prefix-cls}-rtl& {
padding: 0 @input-padding-horizontal-base;
}
}
}
// ============================================================
// == Size ==
// ============================================================
@ -171,7 +152,7 @@
// With arrow should provides `padding-right` to show the arrow
&.@{select-prefix-cls}-show-arrow .@{select-prefix-cls}-selection-search {
.@{select-prefix-cls}-rtl& {
right: 0;
right: @input-padding-horizontal-sm - 1px;
}
}

View File

@ -39,7 +39,7 @@ Provide a placeholder while you wait for content to load, or to visualise conten
### SkeletonTitleProps
| Property | Description | Type | Default |
| -------- | ---------------------- | ---------------- | ------- |
| --- | --- | --- | --- |
| width | Set the width of title | number \| string | - |
### SkeletonParagraphProps
@ -52,7 +52,7 @@ Provide a placeholder while you wait for content to load, or to visualise conten
### SkeletonButtonProps
| Property | Description | Type | Default |
| -------- | ----------------------- | -------------------------------- | ------- |
| --- | --- | --- | --- |
| active | Show animation effect | boolean | false |
| shape | Set the shape of button | `circle` \| `round` \| `default` | - |
| size | Set the size of button | `large` \| `small` \| `default` | - |
@ -60,6 +60,6 @@ Provide a placeholder while you wait for content to load, or to visualise conten
### SkeletonInputProps
| Property | Description | Type | Default |
| -------- | --------------------- | ------------------------------- | ------- |
| --- | --- | --- | --- |
| active | Show animation effect | boolean | false |
| size | Set the size of input | `large` \| `small` \| `default` | - |

View File

@ -40,7 +40,7 @@ cover: https://gw.alipayobjects.com/zos/alicdn/KpcciCJgv/Skeleton.svg
### SkeletonTitleProps
| 属性 | 说明 | 类型 | 默认值 |
| ----- | -------------------- | ---------------- | ------ |
| --- | --- | --- | --- |
| width | 设置标题占位图的宽度 | number \| string | - |
### SkeletonParagraphProps
@ -53,7 +53,7 @@ cover: https://gw.alipayobjects.com/zos/alicdn/KpcciCJgv/Skeleton.svg
### SkeletonButtonProps
| 属性 | 说明 | 类型 | 默认值 |
| ------ | ---------------- | -------------------------------- | ------ |
| --- | --- | --- | --- |
| active | 是否展示动画效果 | boolean | false |
| shape | 指定按钮的形状 | `circle` \| `round` \| `default` | - |
| size | 设置按钮的大小 | `large` \| `small` \| `default` | - |
@ -61,6 +61,6 @@ cover: https://gw.alipayobjects.com/zos/alicdn/KpcciCJgv/Skeleton.svg
### SkeletonInputProps
| 属性 | 说明 | 类型 | 默认值 |
| ------ | ---------------- | ------------------------------- | ------ |
| --- | --- | --- | --- |
| active | 是否展示动画效果 | boolean | false |
| size | 设置输入框的大小 | `large` \| `small` \| `default` | - |

View File

@ -38,12 +38,12 @@ To input a value in a range.
### range
| Property | Description | Type | Default | Version |
| -------------- | ------------------------------- | ------- | ------- | ------- |
| --- | --- | --- | --- | --- |
| draggableTrack | Whether range track can be drag | boolean | false | 4.10.0 |
## Methods
| Name | Description | Version |
| ------- | ------------ | ------- |
| --- | --- | --- |
| blur() | Remove focus | |
| focus() | Get focus | |

View File

@ -39,12 +39,12 @@ cover: https://gw.alipayobjects.com/zos/alicdn/HZ3meFc6W/Silder.svg
### range
| 参数 | 说明 | 类型 | 默认值 | 版本 |
| -------------- | -------------------- | ------- | ------ | ------ |
| --- | --- | --- | --- | --- |
| draggableTrack | 范围刻度是否可被拖拽 | boolean | false | 4.10.0 |
## 方法
| 名称 | 描述 | 版本 |
| ------- | -------- | ---- |
| --- | --- | --- |
| blur() | 移除焦点 | |
| focus() | 获取焦点 | |

View File

@ -13,7 +13,7 @@ When part of the page is waiting for asynchronous data or during a rendering pro
## API
| Property | Description | Type | Default Value |
| Property | Description | Type | Default |
| --- | --- | --- | --- |
| delay | Specifies a delay in milliseconds for loading state (prevent flush) | number (milliseconds) | - |
| indicator | React node of the spinning indicator | ReactNode | - |

View File

@ -15,7 +15,7 @@ cover: https://gw.alipayobjects.com/zos/alicdn/LBcJqCPRv/Spin.svg
## API
| 参数 | 说明 | 类型 | 默认值 |
| ---------------- | -------------------------------------------- | ------------- | --------- |
| --- | --- | --- | --- |
| delay | 延迟显示加载效果的时间(防止闪烁) | number (毫秒) | - |
| indicator | 加载指示符 | ReactNode | - |
| size | 组件大小,可选值为 `small` `default` `large` | string | `default` |

View File

@ -17,7 +17,7 @@ Display statistic number.
#### Statistic
| Property | Description | Type | Default | Version |
| ---------------- | ----------------------------- | -------------------- | ------- | ------- |
| --- | --- | --- | --- | --- |
| decimalSeparator | The decimal separator | string | `.` | |
| formatter | Customize value display logic | (value) => ReactNode | - | |
| groupSeparator | Group separator | string | `,` | |
@ -32,7 +32,7 @@ Display statistic number.
#### Statistic.Countdown
| Property | Description | Type | Default | Version |
| ---------- | ---------------------------------------- | ---------------- | ---------- | ------- |
| --- | --- | --- | --- | --- |
| format | Format as [moment](http://momentjs.com/) | string | `HH:mm:ss` | |
| prefix | The prefix node of value | ReactNode | - | |
| suffix | The suffix node of value | ReactNode | - | |

View File

@ -18,7 +18,7 @@ cover: https://gw.alipayobjects.com/zos/antfincdn/rcBNhLBrKbE/Statistic.svg
#### Statistic
| 参数 | 说明 | 类型 | 默认值 | 版本 |
| ---------------- | ---------------- | -------------------- | ------ | ----- |
| --- | --- | --- | --- | --- |
| decimalSeparator | 设置小数点 | string | `.` | |
| formatter | 自定义数值展示 | (value) => ReactNode | - | |
| groupSeparator | 设置千分位标识符 | string | `,` | |

View File

@ -97,7 +97,7 @@ const Steps: StepsType = props => {
return (
<RcSteps
icons={icons}
{...omit(props, ['percent'])}
{...omit(props, ['percent', 'responsive'])}
direction={getDirection()}
stepIcon={stepIconRender}
prefixCls={prefixCls}

View File

@ -975,7 +975,7 @@
@steps-icon-custom-size: @steps-icon-size;
@steps-icon-custom-top: 0px;
@steps-icon-custom-font-size: 24px;
@steps-icon-top: -1px;
@steps-icon-top: -0.5px;
@steps-icon-font-size: @font-size-lg;
@steps-icon-margin: 0 8px 0 0;
@steps-title-line-height: @height-base;

View File

@ -31,6 +31,6 @@ Switching Selector.
## Methods
| Name | Description |
| ------- | ------------ |
| --- | --- |
| blur() | Remove focus |
| focus() | Get focus |

View File

@ -32,6 +32,6 @@ cover: https://gw.alipayobjects.com/zos/alicdn/zNdJQMhfm/Switch.svg
## 方法
| 名称 | 描述 |
| ------- | -------- |
| --- | --- |
| blur() | 移除焦点 |
| focus() | 获取焦点 |

View File

@ -1508,4 +1508,53 @@ describe('Table.filter', () => {
expect(wrapper.find('.ant-table-filter-column')).toHaveLength(3);
});
it('should pagination.current be 1 after filtering', () => {
const onChange = jest.fn();
const columns = [
{
title: 'Name',
dataIndex: 'name',
filters: [
{
text: 'Jim',
value: 'Jim',
},
{
text: 'Joe',
value: 'Joe',
},
],
onFilter: (value, record) => record.name.indexOf(value) === 0,
sorter: (a, b) => a.name.length - b.name.length,
sortDirections: ['descend'],
},
];
const dataSource = [
{
key: '1',
name: 'John Brown',
age: 32,
address: 'New York No. 1 Lake Park',
},
{
key: '2',
name: 'Joe Black',
age: 32,
address: 'Sidney No. 1 Lake Park',
},
];
const wrapper = mount(
<Table onChange={onChange} rowKey="name" columns={columns} dataSource={dataSource} />,
);
wrapper.find('.ant-dropdown-trigger').first().simulate('click');
wrapper.find('FilterDropdown').find('MenuItem').at(0).simulate('click');
wrapper.find('.ant-btn-primary').first().simulate('click');
expect(onChange.mock.calls[0][0].current).toBe(1);
wrapper.find('.ant-dropdown-trigger').first().simulate('click');
wrapper.find('FilterDropdown').find('MenuItem').at(1).simulate('click');
wrapper.find('.ant-btn-primary').first().simulate('click');
expect(onChange.mock.calls[1][0].current).toBe(1);
});
});

View File

@ -7,11 +7,11 @@ title:
## zh-CN
带单元格编辑功能的表格。
带单元格编辑功能的表格。当配合 `shouldCellUpdate` 使用时请注意[闭包问题](https://github.com/ant-design/ant-design/issues/29243)。
## en-US
Table with editable cells.
Table with editable cells. When work with `shouldCellUpdate`, please take care of [closure](https://github.com/ant-design/ant-design/issues/29243).
```tsx
import React, { useContext, useState, useEffect, useRef } from 'react';

View File

@ -71,7 +71,8 @@ export default function usePagination(
// Reset `current` if data length or pageSize changed
const maxPage = Math.ceil((paginationTotal || total) / mergedPagination.pageSize!);
if (mergedPagination.current! > maxPage) {
mergedPagination.current = maxPage;
// Prevent a maximum page count of 0
mergedPagination.current = maxPage || 1;
}
const refreshPagination = (current: number = 1, pageSize?: number) => {

View File

@ -148,7 +148,7 @@ One of the Table `columns` prop for describing the table's columns, Column has t
### ColumnGroup
| Property | Description | Type | Default |
| -------- | ------------------------- | --------- | ------- |
| --- | --- | --- | --- |
| title | Title of the column group | ReactNode | - |
### pagination
@ -167,8 +167,8 @@ Properties for expandable.
| Property | Description | Type | Default |
| --- | --- | --- | --- |
| columnWidth | Set the width of the expand column | string \| number | - |
| childrenColumnName | The column contains children to display | string | children |
| columnWidth | Set the width of the expand column | string \| number | - |
| defaultExpandAllRows | Expand all rows initially | boolean | false |
| defaultExpandedRowKeys | Initial expanded row keys | string\[] | - |
| expandedRowClassName | Expanded row's className | function(record, index, indent): string | - |

View File

@ -155,7 +155,7 @@ const columns = [
### ColumnGroup
| 参数 | 说明 | 类型 | 默认值 |
| ----- | ------------ | --------- | ------ |
| --- | --- | --- | --- |
| title | 列头显示文字 | ReactNode | - |
### pagination
@ -174,8 +174,8 @@ const columns = [
| 参数 | 说明 | 类型 | 默认值 |
| --- | --- | --- | --- |
| columnWidth | 自定义展开列宽度 | string \| number | - |
| childrenColumnName | 指定树形结构的列名 | string | children |
| columnWidth | 自定义展开列宽度 | string \| number | - |
| defaultExpandAllRows | 初始时,是否展开所有行 | boolean | false |
| defaultExpandedRowKeys | 默认展开的行 | string\[] | - |
| expandedRowClassName | 展开行的 className | function(record, index, indent): string | - |
@ -223,7 +223,7 @@ const columns = [
### selection
| 参数 | 说明 | 类型 | 默认值 |
| -------- | -------------------------- | --------------------------- | ------ |
| --- | --- | --- | --- |
| key | React 需要的 key建议设置 | string | - |
| text | 选择项显示的文字 | ReactNode | - |
| onSelect | 选择项点击回调 | function(changeableRowKeys) | - |

View File

@ -47,7 +47,7 @@ Ant Design 依次提供了三级选项卡,分别用于不同的场景。
### Tabs.TabPane
| 参数 | 说明 | 类型 | 默认值 |
| ----------- | ----------------------------------------------- | --------- | ------ |
| --- | --- | --- | --- |
| closeIcon | 自定义关闭图标,`在 type="editable-card"`时有效 | ReactNode | - |
| forceRender | 被隐藏时是否渲染 DOM 结构 | boolean | false |
| key | 对应 activeKey | string | - |

View File

@ -18,7 +18,7 @@ Tag for categorizing or markup.
### Tag
| Property | Description | Type | Default | Version |
| --------- | ------------------------------------ | ----------- | ------- | ------- |
| --- | --- | --- | --- | --- |
| closable | Whether the Tag can be closed | boolean | false | |
| closeIcon | Custom close icon | ReactNode | - | 4.4.0 |
| color | Color of the Tag | string | - | |
@ -29,6 +29,6 @@ Tag for categorizing or markup.
### Tag.CheckableTag
| Property | Description | Type | Default |
| -------- | ----------------------------------------------- | ----------------- | ------- |
| --- | --- | --- | --- |
| checked | Checked status of Tag | boolean | false |
| onChange | Callback executed when Tag is checked/unchecked | (checked) => void | - |

View File

@ -18,7 +18,7 @@ cover: https://gw.alipayobjects.com/zos/alicdn/cH1BOLfxC/Tag.svg
### Tag
| 参数 | 说明 | 类型 | 默认值 | 版本 |
| --------- | ---------------- | ----------- | ------ | ----- |
| --- | --- | --- | --- | --- |
| closable | 标签是否可以关闭 | boolean | false | |
| closeIcon | 自定义关闭按钮 | ReactNode | - | 4.4.0 |
| color | 标签色 | string | - | |
@ -29,6 +29,6 @@ cover: https://gw.alipayobjects.com/zos/alicdn/cH1BOLfxC/Tag.svg
### Tag.CheckableTag
| 参数 | 说明 | 类型 | 默认值 |
| -------- | -------------------- | ----------------- | ------ |
| --- | --- | --- | --- |
| checked | 设置标签的选中状态 | boolean | false |
| onChange | 点击标签时触发的回调 | (checked) => void | - |

Some files were not shown because too many files have changed in this diff Show More