Compare commits

...

1421 Commits
2.2.0 ... main

Author SHA1 Message Date
云荷YunHerry 27acc9a80e
docs(table): ajax demo (#8120)
Co-authored-by: Xian Yu <h3209851541@outlook.com>
2025-06-13 15:46:47 +08:00
selicens 43ad5dec90
docs(mentions): Spelling error in En title (#8127) 2025-06-13 15:45:49 +08:00
selicens aa8802679f
docs(Typography): fix slot name (#8184) 2025-06-13 15:35:05 +08:00
爆炒芋头 aa211fd789
docs(input): showCount type 文档 (#8041)
* fix(input): showCount type 文档

* fix(input): showCount type 文档

---------

Co-authored-by: zhiqiangchen <zhiqiang.chen@igg.com>
2025-03-06 14:37:19 +08:00
tangjinzhou 61d39be86f
Update config.yml 2025-03-06 14:34:53 +08:00
tangjinzhou b80bd37f6e fix: sm select placeholder 2025-02-17 11:28:06 +08:00
wzc520pyfm 3db5e191b8
docs: add ant-design-x-vue link at ecosystem (#8034) 2025-02-09 09:23:58 +08:00
Attacktive 45c7109212
docs: correct possible `size` size in component Select (#7991) 2025-01-05 17:04:07 +08:00
Shai b58d0fb723
docs: added centered to docs (#7967) 2025-01-05 16:55:58 +08:00
clddup a21a1ca533
docs: theme editor 2025-01-05 16:54:32 +08:00
tangjinzhou 4a37016f4e fix: ts type error 2024-11-11 14:52:27 +08:00
tangjinzhou 5d6ebb30ac release 4.2.6 2024-11-11 14:47:34 +08:00
tangjinzhou 888457238d fix: modal aria error 2024-11-11 14:40:49 +08:00
果冻橙 b0d9309471
docs: Add custom icons to support Rsbuild documentation (#7743) 2024-11-08 10:30:05 +08:00
selicens f64d0718ae
docs: Change the default values of attributes (#7744) 2024-11-08 10:28:03 +08:00
selicens 968317ca9f
fix(InputNumber): disabled text clolor (#7776) 2024-11-08 10:18:03 +08:00
Carl Chen 22dad3ba6d
fix[Select]: fix select losing focus issue (#7829) 2024-11-08 10:17:22 +08:00
iamnotblank 4f7bd6f28d
fix(Dialog): aira error (#7823)
* fix(vc-dialog): aira error

* fix(vc-dialog): aira error
2024-11-07 22:54:53 +08:00
snoweast 12fcfa15b1
fix: Safari of input IME (#7918) 2024-11-07 22:45:48 +08:00
tangjinzhou e46d537d45 release 4.2.5 2024-09-19 19:08:59 +08:00
tangjinzhou ac9d1b0a7f fix: empty memory issue 2024-09-19 19:07:08 +08:00
tangjinzhou 2c7008d786 fix: image width & height not work 2024-09-19 19:06:34 +08:00
tangjinzhou 49d4b3166e feat: update type 2024-09-13 19:33:38 +08:00
tangjinzhou 339fb4a230 release 4.2.4 2024-09-13 19:06:37 +08:00
tangjinzhou bb443a05e2 fix: button wave memory leak 2024-09-13 19:05:04 +08:00
YYP 3a79f72816
fix(doc): `positonStyle` typo (#7808) 2024-09-13 18:51:17 +08:00
5918vo 89eec07145
docs: event demo (#7699) (#7728) 2024-09-05 11:38:10 +08:00
Jason Ren c69a6d29b2
docs(zh-cn): finish translation of float-button (#7811) 2024-09-05 11:37:36 +08:00
tangjinzhou 2666cb79ab refactor: transition 2024-06-21 13:40:28 +08:00
tangjinzhou 35d5185634 docs: update changelog 2024-06-10 09:37:38 +08:00
tangjinzhou 4492086aac release 4.2.3 2024-06-10 09:20:15 +08:00
trry-hub 4b7c6ac02c
feat: TourStep support fn children (#7628)
* Fix: [修复自定义按钮无渲染]

* refactor(完善 Tour 自定义按钮代码健壮性): 🦄

---------

Co-authored-by: shizhu <shizhu@yaomaitong.cn>
2024-06-10 09:14:27 +08:00
Kylin 208b8d3085
docs: unify the default value of none to - (#7636) 2024-06-09 22:08:30 +08:00
Carl Chen f41fec26ba
fix[vc-util]: styleObjectToString filter invalid value (#7642) 2024-06-09 09:56:45 +08:00
tangjinzhou 9118d6cd42 release 4.2.2 2024-06-06 10:16:02 +08:00
Aaron-zon 5c7aaf0dd6
fix(FloatButton): type error (#7632) 2024-06-06 10:03:24 +08:00
evanlc b82d8dd2ad
fix(PresetPanel): preset panel stopPropagation (#7550) 2024-06-04 23:28:22 +08:00
Aaron-zon 1d0fa8533a
fix: add missing space-evenly alignment for grid rows (#7579) 2024-06-04 23:26:03 +08:00
Kylin 4318147fc6
refactor(input): remove unnecessary assertions and use?? instead of the ternary operator (#7571)
* refactor: remove unnecessary assertions and use?? instead of the ternary operator

* refactor: use?? instead of the ternary operator
2024-06-04 23:24:44 +08:00
Carl Chen 312bcc5127
docs(collapse): modify the `accordion` attribute text to be easier to understand (#7612) 2024-06-04 23:20:54 +08:00
tangjinzhou 6594fe3964 fix: textarea 2024-06-04 23:12:06 +08:00
tangjinzhou 82f28ce3d0 fix: select input 2024-06-04 21:20:10 +08:00
Carl Chen 6e2c5a6a83
fix[select]: fix placeholder error when inputting Chinese (#7611)
* fix[select]: fix placeholder error when inputting Chinese

fix(selector): fix placeholder error when inputting Chinese

perf: optimize types

* Update SingleSelector.tsx

* Update index.tsx

---------

Co-authored-by: tangjinzhou <415800467@qq.com>
2024-06-04 18:59:24 +08:00
lchrennew 307148e2df
fix: empty space-item are not been hidden (#7557) 2024-06-04 16:13:11 +08:00
bsuooo afebeb9ffa
docs(DatePicker): updating deprecated API (#7570) 2024-06-04 16:12:20 +08:00
selicens aeda2637f6
fix(Input): Chinese input is invalid when the modifier is lazy (#7543) 2024-06-04 16:10:46 +08:00
extclp f42d8ad1ce
chore: remove css-animation (#7613)
* chore: remove css-animate

* chore(site): remove localStorage support check
2024-06-04 16:05:21 +08:00
selicens 33a0708eb4
docs: upgrade document link direction error (#7602) 2024-06-04 16:01:26 +08:00
selicens 085eb398a4
fix(FormItem): class name error (#7582) 2024-06-04 16:00:40 +08:00
selicens 9c27414cd0
fix(FloatButton): type prompt error (#7576) 2024-06-04 15:57:40 +08:00
Kylin 014e86bd27
docs: update README-zh_CN (#7584) 2024-06-04 15:49:47 +08:00
tangjinzhou 40ad45bc05 fix: tree reative data error 2024-06-04 15:46:22 +08:00
neverland 1c82940160
docs: add Vite and Rsbuild to getting started (#7556) 2024-05-09 21:21:20 +08:00
bsuooo 7ce0f115d5
fix(cascader): remove outdated compatibility code(#7532) (#7534) 2024-04-30 19:13:48 +08:00
extclp 54434b0931
docs(Select): remove qs dependencie (#7541) 2024-04-30 19:12:05 +08:00
selicens e01f26c541
fix(TreeSelect): placehold slot invalid (#7545) 2024-04-30 19:11:08 +08:00
tangjinzhou 9a45b35511 release 4.2.1 2024-04-25 09:40:07 +08:00
hippo 8e8073d17e
fix: input clear error (#7523) 2024-04-25 09:29:38 +08:00
extclp d6cc262c3a
refactor: replement deprecated fields (#7519) 2024-04-25 09:25:29 +08:00
tangjinzhou 9d7c171940 release 4.2.0 2024-04-22 15:51:05 +08:00
extclp 48a3ceb921
chore: remove vetur type generator (#7517) 2024-04-22 15:27:58 +08:00
tangjinzhou 23c620ea3a fix: select customicon error #7377 2024-04-22 15:26:02 +08:00
tangjinzhou 752686e334 fix: input composing error, close #7516 2024-04-22 15:11:10 +08:00
tangjinzhou 9b0f0e71e7 perf: table hover cell, close #7451 2024-04-22 10:37:28 +08:00
24min 42d33e963c
fix: carousel beforeChange current value not correct (#7419) 2024-04-22 10:18:19 +08:00
tangjinzhou ed27700ef4 style: lint code 2024-04-22 10:07:02 +08:00
extclp eedd7f3302
chore: remove json file type declare (#7514) 2024-04-22 10:00:03 +08:00
Carl Chen c28c38d02e
fix[Select|Cascader]: select multiple error & cascader error in ssr mode (#7377)
* docs: updating the `dropdownRender` description and jumps in the FAQ for Select

* fix: fix  select error in multiple mode

* fix: fix cascader select error in ssr mode
2024-04-19 22:56:07 +08:00
ashu-guo 162d1fcf95
fix(AutoComplete): #7380 and #7276 (#7391) 2024-04-19 22:46:19 +08:00
selicens 4815ee6f20
fix(Pagination): block default events for the enter key (#7368)
* fix(Pagination): block default events for the enter key

* refactor: consider other keyboard events
2024-04-19 22:44:34 +08:00
bqy_fe 2b41e56520
fix(Input): autoSize not work when change value in onMounted (#7478) 2024-04-19 22:36:44 +08:00
Sean ab874ffd4b
docs: update tree-select api description (#7388) 2024-04-19 22:07:41 +08:00
tangjinzhou 61ade6b8ec fix: autoComplete option slot error, close #7396 #7405 2024-04-19 19:27:51 +08:00
selicens 4d35b8caa3
docs(Modal): add simplified descriptions (#7408)
close #7393
2024-04-19 19:19:33 +08:00
Tang 040af82eb9
docs: update table docs (#7400)
Co-authored-by: 汤显文 <tang_xianwen@gov-info.cn>
2024-04-19 19:19:01 +08:00
Carl Chen a8c72fc5e7
fix[Menu]: fix `menu-item-group` not rendering in SSR (#7349)
* docs: updating the `dropdownRender` description and jumps in the FAQ for Select

* fix: `menu-item-group` rendered in ssr
2024-04-19 19:18:30 +08:00
ashu-guo c25736d57d
chore: merge duplicate property declarations (#7417) 2024-04-19 19:16:46 +08:00
SonicKang 4a48bfc66b
fix: a-qrcord component cannot show ts prompt (#7502) 2024-04-19 19:15:12 +08:00
tangjinzhou 4138d3c822 fix: tabs size error, close #7491 #7482 2024-04-19 19:14:18 +08:00
tangjinzhou dec67a6d65 docs: update site 2024-04-19 19:13:06 +08:00
Carl Chen 85c48c0566
feat[tooltip]: add `arrow` attribute (#7459)
* docs: updating the `dropdownRender` description and jumps in the FAQ for Select

* wip: add popover-arrow

* wip: trigger add arrow attr

* fix: remove popupContextKey

* optimize

* perf: optimize

* docs: optimize docs

* docs: add `arrow` attribute in tooltip en-US docs

* fix: fix bug

* perf[demo]: `radio-group` replace with `segmented`
2024-04-19 13:17:15 +08:00
Carl Chen 966bc1004c
fix[layout]: in a dark mode layout, the text color should change. (#7498)
* docs: updating the `dropdownRender` description and jumps in the FAQ for Select

* fix[layout]: in a dark mode layout, the text color should change
2024-04-19 10:25:23 +08:00
Ordinary 457d0fde0b
fix: remove duplicate style variable (#7490)
Co-authored-by: p-hehongsheng <p-hehongsheng@xiaomi.com>
2024-04-19 10:21:07 +08:00
Saveliy ff184b3969
feat: update ru_RU localization (#7497) 2024-04-19 10:20:15 +08:00
ashu-guo 75886a8cbf
docs: match dependencies in package.json instead of simply setting 'latest' (#7381) 2024-04-19 10:19:50 +08:00
fwd01 2b0c2da232
docs: typo error (#7505)
Co-authored-by: fuwedong <fuwendong5@outlook.com>
2024-04-19 10:18:59 +08:00
tangjinzhou ffd4d8fe92 fix: useForm model change validate error 2024-04-19 10:18:04 +08:00
tangjinzhou 49e1323baa docs: update codesandbox 2024-04-19 09:52:43 +08:00
tangjinzhou 35d1de9ea6 docs: update sandbox 2024-04-19 09:29:05 +08:00
huyikai fa46999963
Update ja_JP.ts (#7438) 2024-03-23 10:40:28 +08:00
tangjinzhou 01300d01da docs: add eth sponsor 2024-03-22 16:20:10 +08:00
tangjinzhou 9a5f83ed06 chore: update pkg 2024-03-03 14:09:19 +08:00
tangjinzhou ce6b7f3b4e chore: update pkg 2024-03-03 14:04:52 +08:00
tangjinzhou 4a2f95fe88 release 4.1.2 2024-01-30 12:19:46 +08:00
Carl Chen 7c73beb309
fix: fixed an error caused by dragging under the `headerCell` slot. (#7291)
* fix: fix headerCell slots

* perf: optimize table columnTitle type
2024-01-30 12:06:45 +08:00
Carl Chen 0cbf3ca354
docs: updating the `dropdownRender` description and jumps in the FAQ for Select (#7313) 2024-01-30 12:05:20 +08:00
Weite Su 7afb7ce465
fix(segmented): title property in segmented component slot not effective (#7302)
Co-authored-by: suweite <weite.su@infinigo.cn>
2024-01-30 12:04:24 +08:00
tangjinzhou 9cc73011c5 chore: import error 2024-01-16 21:23:36 +08:00
tangjinzhou 4b21210700 release 4.1.1 2024-01-16 21:10:05 +08:00
Carl Chen a80ca17461
fix: table slot type optimization (#7288) 2024-01-16 20:57:29 +08:00
HaiWei Lian ad8d32ab09
fix: table filter does not work in header group (#7233) 2024-01-16 20:56:47 +08:00
Carl Chen d870f3f8e0
fix: fixed error with no expected value in `expandColumnTitle` slot (#7265)
* fix: fixed error report with no expected value in `expandColumnTitle` slot

* fix: optimize optional chain

* fix: use default render

* refactor: use `customRenderSlot` replace `renderSlot`

* style: code format

* perf: optimize useColumns code

* fix: fix path

* feat: add customRenderSlot unit test
2024-01-16 20:49:38 +08:00
tangjinzhou c717473568 fix: hook warning, close #7281 #7273 #7274 2024-01-16 20:34:11 +08:00
selicens 1e07544e74
feat(QRCode): support scanned status (#7242) 2024-01-12 11:44:33 +08:00
Light 8ab008d255
typo(table): Supplement FilterDropdown type (#7226)
* fix(table): Supplement FilterDropdown type

* docs(table): Type format
2024-01-12 11:42:46 +08:00
一堆菠萝 f034a7759e
fix(divider): vertical dashed divider not show (#7218) 2024-01-12 10:50:06 +08:00
Konv Suu 3f33cefa81
ci: issue-labeled format error (#7200) 2024-01-12 10:45:46 +08:00
一堆菠萝 81e43c56ef
docs(typography): trigerType api supplement Chinese translation (#7228) 2024-01-12 10:45:09 +08:00
aShu-guo f400c803e1
docs: update modal api description (#7232)
* docs: update modal api description

* docs: update modal api description
2024-01-12 10:44:48 +08:00
somethingfornothing 502c11cc4c
fix(dropdown): unexpectedly hidden(#7246) (#7254) 2024-01-12 10:42:36 +08:00
markthree 2cdb69f706
faet: fix css prefix in nuxt generate (#7256) 2024-01-12 10:30:17 +08:00
tangjinzhou 2eed8e62ec fix: type error 2024-01-05 19:28:55 +08:00
tangjinzhou 61c0d0cc9d release 4.1.0 2024-01-05 16:22:56 +08:00
tangjinzhou d7f9bd27dc fix: support vue 3.4 2024-01-05 16:20:05 +08:00
cc heart 4ed2868137
fix(vue): fixed modal component failed to trigger update in vue@3.4.x (#7244)
* fix(vue): fixed modal component failed to trigger update in vue@3.4.x version

* refactor: use cloneVNode trigger vNode update
2024-01-05 09:11:25 +08:00
tangjinzhou 8696e01039 release 4.0.8 2023-12-18 16:19:36 +08:00
tangjinzhou a3fd390619 docs: update demo 2023-12-18 16:17:43 +08:00
tangjinzhou a9198e44df fix: theme reactive not work #7180 2023-12-18 15:34:54 +08:00
yanyu 509ec682f2
fix: Fix custom theme token (#7180)
* fix: fix table column data is passed into chlidren is undefined or null errorr

* fix: fix custom theme token not take effect

* chore: reset button style

---------

Co-authored-by: undefined <undefined>
2023-12-18 15:20:24 +08:00
tangjinzhou 73f0a29acf fix: textarea cursor error, close #7121 2023-12-18 14:31:53 +08:00
somethingfornothing f93dd9170d
fix: dataRange active-bar (#7157) 2023-12-18 11:37:38 +08:00
yang cfa0a68568
fix(Menu.SubMenu): 修复ConfigProvider组件设置prefixCls属性后动画过渡失效 (#7150) 2023-12-18 11:32:38 +08:00
Konv Suu afcff32fcc
fix(menu): pass motion name to collapseMotion (#7130) 2023-12-18 11:31:57 +08:00
tangjinzhou b989cf2d97 perf: watermark 2023-12-18 11:31:04 +08:00
Jevin 0e6fd652b8
fix(watermark): modify dom properties to regenerate (#7149)
Co-authored-by: “Jevin” <jevin@mogul-tech.com>
2023-12-18 11:29:27 +08:00
selicens 6625d39118
fix(RangPicker): Incorrect display of prevIcon and nextIcon (#7127)
* fix(RangPicker): Incorrect display of prevIcon and nextIcon

* fix: superPrevIcon and superNextIcon invalid
2023-12-18 11:23:30 +08:00
Nined 67efafca4a
perf(Typography): fast and efficient syncEllipsis (#7146) 2023-12-18 11:21:55 +08:00
OliverYoung a8a774a5ff
fix: tooltip onPopupAlign never called (#7112) 2023-12-18 10:54:30 +08:00
一堆菠萝 1fc109704b
fix: Form disabled no effect on Upload (#7110)
* fix: Form disabled no effect on Upload

* docs: update Upload disabled api default value
2023-12-18 10:45:27 +08:00
puppetkkk d140523c89
fix: useWave unref (#7108)
* fix: useWave unref

* fix: wave init value

* fix: wave value

* Update useConfigInject.ts

---------

Co-authored-by: pangzebang <pangzebang@dm-ai.com>
Co-authored-by: tangjinzhou <415800467@qq.com>
2023-12-18 10:41:50 +08:00
cc heart 91fe1b0d71
docs(menu): repair Anchor Jump (#7178)
Under the menu document, some anchor clicks cannot scroll.
2023-12-18 10:27:48 +08:00
lyn c1b4941def
docs: fix typo (#7162) 2023-12-18 10:27:22 +08:00
puppetkkk af383a34bc
docs(config-provider): add wave setting (#7107)
* docs(config-provider): add wave setting

* docs(config-provider): add wave setting

---------

Co-authored-by: pangzebang <pangzebang@dm-ai.com>
2023-12-18 10:25:23 +08:00
cc heart 1dccce4e16
docs(header): restore button hover style (#7105) 2023-12-18 10:24:56 +08:00
cc heart 8aa8e5a778
docs(calendar): optimize calendar docs note layout (#7102)
docs(calendar): optimize calendar docs note layout

docs(calendar): optimize calendar docs note layout

docs(calendar): optimize calendar docs note layout

docs(calendar): optimize calendar docs note layout
2023-12-18 10:24:18 +08:00
Light 42952b713a
docs(notification): Fix hooks description in demo (#7191) 2023-12-18 10:22:49 +08:00
yang 07c36192b8
【docs】:Code example 'setup' is missing (#7153)
* flx

* flx【docs】:Modify the official website code example, switch TS to JS, the top of the example should be '<script setup>'
2023-12-18 10:22:04 +08:00
Jacky 562623c091
fix: remove /* #__PURE__*/ comments (#7156) 2023-12-18 10:21:15 +08:00
tangjinzhou e362571719 test: update flex test 2023-11-11 10:35:49 +08:00
tangjinzhou e32ae99bfd release 4.0.7 2023-11-11 10:33:04 +08:00
tangjinzhou ccbeb44264 docs: add new tag 2023-11-11 10:25:16 +08:00
tangjinzhou 3499b11a47 refactor: flex components 2023-11-11 10:24:58 +08:00
selicens dae7262f13
feat(Flex): New component (#7052)
* feat(Flex): New component

* fix: Unified type

* test: Add unit test and update snapshots

* docs: update md file

---------

Co-authored-by: undefined <undefined>
2023-11-11 10:06:02 +08:00
w-z-y 8cf6be11f7
fix: DatePicker panelChange(#7059)
onPanelChange事件缺少
2023-11-11 10:00:48 +08:00
Konv Suu 2510608665
fix(collapse): custom prefix in animation (#7074) 2023-11-11 09:59:40 +08:00
cc heart b22875db33
fix(message): message offset error (#7093) 2023-11-11 09:53:59 +08:00
lyn 2bdeed1432
typo: fix docs ant Rect is spelled as React (#7082) 2023-11-11 09:31:38 +08:00
lai9fox 49a6b588c1
docs(tree-select): fix duplicate values in demo (#7083) 2023-11-11 09:30:42 +08:00
Konv Suu bd080cde2a
chore: enable pnpm run pre scripts (#7078) 2023-11-11 09:29:29 +08:00
huiliangShen c1454bc7b5
fix(carousel): can not use jsx render children (#7077)
Co-authored-by: banruo <shl@dataqin.com>
2023-11-11 09:28:33 +08:00
cc heart 61402142f8
feat[watermark]: support dark theme (#7067)
* perf[watermark]: replace with token variable

* feat: add theme toggle watch
2023-11-11 09:14:43 +08:00
Konv Suu 242982301d
site: menu show tag when front-matter has tag prop (#7053) 2023-11-02 19:00:16 +08:00
Konv Suu 9bdf882517
docs(theme-editor): handleEditConfigChange logic (#7038) 2023-10-23 10:51:46 +08:00
Konv Suu 88ec06b717
fix(upload): disabled prop apply order (#7047) 2023-10-23 10:16:23 +08:00
Konv Suu 6c39bec277
feat(config-provider ): wave config (#7036) 2023-10-23 10:15:56 +08:00
Konv Suu 82f407d396
docs(tag): colorful demo css style (#7037) 2023-10-23 10:13:49 +08:00
bowen bfcdba251f
docs(checkbox): fix typo (#7039) 2023-10-23 10:13:18 +08:00
cc heart 0abcd25b2a
fix: fix space duplicated key (#7048) 2023-10-23 10:12:26 +08:00
tangjinzhou 72b8d09b92 release 4.0.6 2023-10-17 23:01:50 +08:00
selicens b4c29d927b
fix: dropdownVisibleChange invalid (#7033)
Co-authored-by: undefined <undefined>
2023-10-17 22:59:42 +08:00
tangjinzhou bf917f36eb release 4.0.5 2023-10-17 19:04:56 +08:00
黄小民 0f9c80b86e
fix: rangePick onOk can't close the panel (#7026) 2023-10-17 19:02:10 +08:00
Zev Zhu 61e5746b0d
fix(StyleContext): fix style cache loaded repeat (#7029)
Co-authored-by: unknown <aibayanyu20>
2023-10-17 18:55:10 +08:00
bowen 7786a81e76
docs(menu): fix typo (#7025) 2023-10-17 10:53:20 +08:00
tangjinzhou 6f89185fe1 release 4.0.4 2023-10-16 16:19:34 +08:00
Konv Suu 449adb03df
fix: setContainer in onBeforeMount for drawer (#6986)
* fix: setContainer in onBeforeMount for drawer

* fix: add judgement
2023-10-16 15:56:28 +08:00
tangjinzhou 4428423be4 fix: select dropdown custom input error #7020 2023-10-16 15:51:44 +08:00
selicens 380fcd4aa9
fix(Select): dropdownRender inside dropdown box disappears when the input box gains focus (#7020)
Co-authored-by: undefined <undefined>
2023-10-16 15:03:37 +08:00
tangjinzhou 4a1296bb3f fix: code error #7001 2023-10-16 14:35:19 +08:00
selicens b9c65656db
fix(select): list scrollbar height and timing (#6987) (#7001)
* fix: select scrollbar height

* fix: mousemove appear scrollbar

* Update List.tsx

* Update List.tsx

---------

Co-authored-by: undefined <undefined>
Co-authored-by: tangjinzhou <415800467@qq.com>
2023-10-16 14:33:37 +08:00
selicens f1bcf2093a
fix(FloatButton): BackTop attribute invalid (#7009)
* fix(FloatButton): BackTop attribute invalid

* fix: attribute props

* fix: Remove default slot

---------

Co-authored-by: undefined <undefined>
2023-10-16 14:21:39 +08:00
selicens 398710cf1b
feat(Form): FormItem add tooltip attributes (#7014)
* feat(Form): FormItem add tooltip attributes

* fix: Delete duplicate types

* fix: Remove excess slots and types

* Update FormItemLabel.tsx

---------

Co-authored-by: undefined <undefined>
Co-authored-by: tangjinzhou <415800467@qq.com>
2023-10-16 14:20:32 +08:00
黄小民 858c4ec409
fix bug:#6911 a-range-picker canot close when set popContainer (#6994)
* fix bug:#6911 a-range-picker 组件选择完之后下拉面板无法收起的问题

* update prettier to 3.0.3

* Update package.json

* Update package.json

---------

Co-authored-by: tangjinzhou <415800467@qq.com>
2023-10-16 11:42:55 +08:00
一堆菠萝 77eab3637c
docs(pagination): fix pageSizeOptions API (#7010) 2023-10-16 10:39:56 +08:00
Konv Suu 664711373c
fix(drawer): wrapper style pass to drawer content (#6983) 2023-10-16 09:57:27 +08:00
Konv Suu 21d85ea82c
fix(form-item): initialValue issue in resetField (#6979) 2023-10-16 09:54:41 +08:00
Konv Suu b3ef24963f
fix(checkbox): get disabled prop from parent (#6970) 2023-10-16 09:53:29 +08:00
Konv Suu f953482a4d
chore: remove repeat type (#6962) 2023-10-16 09:51:13 +08:00
Cherry7 a9f9899185
fix(useMessage): closeIcon (#6957)
* fix(useMessage): closeIcon

* chore: del debugger
2023-10-16 09:50:38 +08:00
果冻橙 c99e9b00bd
fix: chrome 117 onCancel event (#6991) 2023-10-16 09:48:13 +08:00
Nitin Ramnani 3084ced55f
test: Added testcases for Tour Component (#7000) 2023-10-16 09:46:04 +08:00
Konv Suu c5ea668e88
chore: provide esm output file in dist (#6966) 2023-10-16 09:44:54 +08:00
Konv Suu 3c5fb84542
fix(vc-image): remove repeat listener (#6945) 2023-09-15 14:25:48 +08:00
Konv Suu 2f7f0e6928
fix(message): getContainer prop doesn't work (#6942) 2023-09-15 14:21:22 +08:00
agoni1212 2c4d4650da
docs: typo (#6941) 2023-09-15 14:19:15 +08:00
Konv Suu 0f1ffc99cd
chore: optimize startup performance (#6952) 2023-09-15 14:18:44 +08:00
tangjinzhou 83d6c93765 release 4.0.3 2023-09-10 11:03:59 +08:00
tangjinzhou a6c945caaa fix: support shadow dom, close #6912 2023-09-10 10:36:30 +08:00
tangjinzhou d0f7c34497 chore: update cssinjs 2023-09-09 23:31:44 +08:00
tangjinzhou 2b8f2adcbf fix: icons support shadow dom, close #6914 2023-09-09 21:50:57 +08:00
Attacktive f25bf6e189
docs: correct simple copy-paste error (#6924) 2023-09-09 09:21:18 +08:00
Konv Suu 93415d0442
docs: mobile drawer menu trigger (#6927) 2023-09-09 09:20:46 +08:00
Konv Suu d185a3af21
docs: update dynamic form item demo (#6930) 2023-09-09 09:19:16 +08:00
tangjinzhou d3800b54a3 chore: update github workflow 2023-09-09 09:11:20 +08:00
tangjinzhou b7eed32484 docs: update img link 2023-09-02 21:06:07 +08:00
Konv Suu 46be19531d
docs: add hide code btn in the bottom for code box (#6917) 2023-09-01 09:35:37 +08:00
tangjinzhou 089548ed74 release 4.0.2 2023-08-31 08:05:31 +08:00
Konv Suu ce72484623
fix(transfer): checkbox click evt run repeatedly (#6902) 2023-08-31 07:47:10 +08:00
tangjinzhou 31d00bf7d1 chore: update lit & format 2023-08-30 22:48:17 +08:00
tangjinzhou deada0aeb8 chore: udpate lint, close #6896 2023-08-30 21:44:03 +08:00
Konv Suu 418d8b33dd
fix(modal): add onUpdate:open prop (#6876) 2023-08-30 16:18:54 +08:00
24min 3c05b7704b
fix(ImageGroup):fix open imagegroup without animation (#6898) 2023-08-30 16:10:03 +08:00
Konv Suu 1254677805
fix: table expandColumnTitle slot type declaration (#6908) 2023-08-30 16:08:01 +08:00
Konv Suu f7cc27b7ad
fix: onAfterClose init flip value (#6913) 2023-08-30 16:07:35 +08:00
tangjinzhou 9855e43805 fix: button wave error, close #6895 2023-08-30 16:05:54 +08:00
Konv Suu 1f01ae0728
docs: nav-phone-icon display normal (#6906) 2023-08-30 15:39:15 +08:00
Konv Suu 9464158c0c
docs(modal): remove obsolete apis (#6904) 2023-08-30 15:38:39 +08:00
24min 13a4470fd8
docs:fix full-screen modal on the presentation documentation has no effect (#6905) 2023-08-30 15:37:13 +08:00
cc hearts 84fb4b4b3d
docs: github icon support hover tips and optimized the background (#6899)
* docs: github icon support hover tips and optimized the background color under hover

* refactor: modify icon to `icon` export

* style: optimize githubIcon style
2023-08-30 15:36:18 +08:00
cc hearts 106750ed62
docs[FormItem]: update FormItem name attribute type (#6897) 2023-08-30 15:35:20 +08:00
tangjinzhou cac650737c docs: add align #6885 2023-08-30 15:26:59 +08:00
Konv Suu 95fa2547fe
docs: add judgement condition for contributor list (#6889) 2023-08-30 15:12:49 +08:00
Konv Suu 70102039c4
fix: default value for direction in configProvider (#6890)
* fix: default value for direction in configProvider

* update defaultConfigProvider
2023-08-30 15:12:10 +08:00
Konv Suu 7a0c2a384c
docs: improve footer & fix toc-affix (#6883) 2023-08-30 15:10:16 +08:00
tangjinzhou 72e148cae8 fix: portal error, close #6880 #6837 #6807 2023-08-30 15:07:27 +08:00
tangjinzhou 6c13c964c5 chore: update type 2023-08-22 14:53:50 +08:00
tangjinzhou 367ddff30e release 4.0.1 2023-08-22 14:37:57 +08:00
Konv Suu e3ad856543
fix(badge): dot with processing status (#6874)
* fix(badge): dot with processing status

* tests: update snapshot
2023-08-22 14:03:09 +08:00
Konv Suu 61df5e656f
fix(input-group): layout style (#6866)
* fix(input-group): layout style

* tests: update snapshot
2023-08-22 10:45:40 +08:00
Konv Suu 439fe840b4
docs(drawer): demo width overflow (#6872) 2023-08-22 10:05:39 +08:00
Konv Suu 197a00f6ea
docs: contributors list add last updated time (#6871) 2023-08-22 10:02:42 +08:00
tangjinzhou 3f99a7e985 docs: update readme 2023-08-21 14:31:04 +08:00
Konv Suu 9c0311546b
feat(input): add password visible feature (#6863)
* feat(input): modify visibilityToggle feature

* test: update snapshot and update test cases

* Update Password.tsx

* Update Password.tsx

* chore: update

* chore: update demo and test

---------

Co-authored-by: tangjinzhou <415800467@qq.com>
2023-08-18 17:03:16 +08:00
Kaivan Wong 7f5b630d72
docs: update the description for fieldNames fields. (#6835)
* fix: update the description for fieldNames fields.

* Update index.zh-CN.md

---------

Co-authored-by: tangjinzhou <415800467@qq.com>
2023-08-18 15:51:17 +08:00
selicens 65ccb447c9
feat(AutoComplete): add border less and customize clear button (#6829)
* feat: add border less

* feat: add customize clear button
2023-08-18 14:52:22 +08:00
tangjinzhou 18405e13b2 docs: update site style 2023-08-18 14:40:56 +08:00
Konv Suu 9e78b4a985
fix(tag): checkable tag don't pass class props (#6854), close #6850 2023-08-18 14:34:44 +08:00
Konv Suu 6cf5d79e2e
fix(tabs): animated tabs style (#6855), close #6804 2023-08-18 14:33:41 +08:00
Konv Suu 1abc33a9e7
docs: improve algolia dropdown menu shadow effect (#6845) 2023-08-18 14:24:36 +08:00
Konv Suu e39e998ecc
feat: pagination buttons transition style (#6832) 2023-08-18 14:23:50 +08:00
selicens cfd4aadc29
feat(Avatar): group add shape & synch demo (#6822) 2023-08-18 14:22:07 +08:00
Konv Suu 38dd977b4c
style: remove table's tr rounded corner (#6825) 2023-08-18 13:52:23 +08:00
selicens 72f9262d0a
feat(Tag): add border less & synch checkable (#6819) 2023-08-18 13:48:00 +08:00
cc-hearts c2d71fa7c3
docs[Form]: fix form docs code references (#6843)
* docs[Form]: fix form docs code references

* docs[Form]: fix form en docs code references

* docs[Form]: fix form en docs title
2023-08-18 11:11:54 +08:00
Cherry7 969dadb265
fix: image height (#6840), close #6836
* fix: image height

* test: update snap
2023-08-18 11:10:44 +08:00
No Two 9c3bf46108
fix: fix spelling of words in code. (#6839) 2023-08-18 11:08:47 +08:00
Konv Suu 141f0100d2
docs: improve site page (#6826) 2023-08-18 11:07:22 +08:00
Konv Suu 6ced156342
docs: add icon search input (#6828)
* docs: add icon search input

* docs: add affix for search input
2023-08-18 11:05:17 +08:00
selicens 42608a5121
docs: add contributors list (#6842) 2023-08-18 11:03:57 +08:00
Konv Suu 22b21cdac8
docs: use a-space replace br in demo (#6861) 2023-08-18 11:03:03 +08:00
Zev Zhu 80a5b531f6
feat: add px2rem in cssinjs (#6817)
* fix: fix table column data is passed into chlidren is undefined or null errorr

* feat: add px2rem in cssinjs
2023-08-18 09:48:10 +08:00
内小子 cacbde3e03
fix(InputNumber): input-number mouseup (#6772)
* fix(InputNumber): input-number mouseup

* fix: replace  with onClick

---------

Co-authored-by: nbn <nabaonan@yunlizhihui.com>
2023-08-06 12:46:26 +08:00
tangjinzhou e3f09a18a1 feat: okText add function #6748 2023-08-06 12:44:16 +08:00
selicens 7bfe30d280
docs(Modal): confirm default oktext synch (#6745) (#6748)
* docs(Modal): confim default oktext synch

* fix: okText logic
2023-08-06 12:43:09 +08:00
Zev Zhu 53dc5daaaf
feat: add static-style-extract (#6713)
* docs: add ant-design-vue nuxt module

* feat: add static-style-extract

* docs: fix import defineProps and defineEmits

* feat: add static-style extract test

* fix: add ignore component

* feat:  calendar select support info.source param (#6697)

* docs: add ant-design-vue nuxt module

* feat: calendar select support info.source param

* docs: synchronous config-provider demo (#6706)

* revert: #6706

* feat: node error

* fix: Handle the output of styles in Server Side Rendering mode

* fix: fix value required error

* chore: change tests dirname

* fix: auchor warning

* chore: add tests

* chore: generate tests snap

* docs: add ssr docs

* docs: synchronous config-provider demo (#6706)

* revert: #6706

* docs: add extract ssr doc

* fix: Removing canUseDom does not have any effect.

* fix: remove range picker in picker map

* fix: watch source can only be a getter/effect function style warning

* fix: styleContext props maybe ref

* fix: remove black list component

* feat: add compChildNameMap

---------

Co-authored-by: selicens <1244620067@qq.com>
Co-authored-by: tangjinzhou <415800467@qq.com>
2023-08-06 12:28:22 +08:00
Cherry7 531ae16553
fix: Dropdown show (#6757) 2023-08-06 11:50:43 +08:00
tangjinzhou d2b6eb9d94 docs: update site 2023-08-06 11:25:35 +08:00
tangjinzhou 27a4d8ceff
Revert "docs: banner adjust light and dark mode (#6799)" (#6816)
This reverts commit 826c183d0b.
2023-08-06 11:23:04 +08:00
tangjinzhou 12074a0dca Merge remote-tracking branch 'origin/feat-v4' 2023-08-06 11:18:07 +08:00
selicens 8f95cdd5a3
feat(App): add App component (#6735)
* feat(App): add App component

* docs: modification error

* docs: doucment update

docs: doucment update
2023-08-06 10:58:13 +08:00
Konv Suu cb0abe5fd5
docs: prev and next buttons only show cn title (#6806) 2023-08-06 10:52:49 +08:00
Konv Suu ed87500e77
docs: fix typo in en docs (#6805) 2023-08-06 10:51:50 +08:00
Konv Suu c01630113d
fix(input): prefix prop has not been passed (#6810), close #4809 2023-08-06 10:51:24 +08:00
Konv Suu 5279d1289a
fix(checkbox): change trigger form validation. (#6741) 2023-07-31 08:52:52 +08:00
Cherry7 9d406ab7ba
fix(PageHeader): ghost style (#6761)
* test(pageheader): update test snap

* fix: ghost style

* fix: ghost style

* chore(pageheader): update ghost demo

* test(pageheader): update test snap
2023-07-31 08:49:35 +08:00
Konv Suu 826c183d0b
docs: banner adjust light and dark mode (#6799) 2023-07-31 08:48:30 +08:00
tangjinzhou bc576d6255 docs: update treeselect 2023-07-29 12:21:21 +08:00
Cherry7 2c39273cc6
fix: autoplay (#6771) close #6768 2023-07-29 12:18:58 +08:00
Cherry7 b49540a339
feat: cssinjs add MULTI_VALUE key (#6770) 2023-07-29 12:17:14 +08:00
果冻橙 37059c38fd
fix dayjs is not excluded in dist (#6767) 2023-07-29 12:16:17 +08:00
黄小民 4fe57fa322
fix(table): expandedRowRender does't work(close #6782) (#6783) 2023-07-29 12:02:34 +08:00
Konv Suu a3ccdeffc2
feat(img): add img flip feature (#6785) 2023-07-29 11:18:34 +08:00
Konv Suu e8c2860c7d
fix(image): sensitivity of image scaling (#6784) 2023-07-29 11:18:22 +08:00
Fts f1f89191ee
fix: Update presetColor.tsx (#6790)
修复相互依赖的报错
2023-07-29 11:10:13 +08:00
Cherry7 0c863c1803
Update README.md (#6734) 2023-07-17 09:35:58 +08:00
selicens 7591d5c3e6
feat: float button support badge (#6738)
* docs(FloatButton): add badge demo

* fix(Badge): color attribute invalid
2023-07-17 09:35:19 +08:00
Simon He 4ea318be30
docs(drawer): fix typo (#6736) 2023-07-17 09:07:49 +08:00
tangjinzhou 5fd00c05b5 doc: update menu 2023-07-14 12:11:27 +08:00
tangjinzhou a2e50dc43e
Feat v4 (#6329)
* refactor(icon): remove style dir (#6215)

* refactor: rename locale

* refactor: locale-provider

* refactor: modal

* refactor: menu

* fix: custom class (#6217)

* refactor: tooltip

* refactor: grid (#6220)

* refactor: grid

* fix(grid): align & justify responsive

* chore: update demo and snapshot

* fix: row ts type not work

* doc: update demo

* refactor: ts

* refactor: spin (#6222)

* fix: typo (#6218)

* fix:  typo

* docs<upload>: docs update

* refactor: spin

* refactor: spin

* refactor: spin

* refactor: spinnn

* refactor: spin

---------

Co-authored-by: lyn <76365499@qq.com>

* fix: spin error #6222

* test: test case error (#6225)

* fix: inject value maybe undefined

* fix: tootip emit correct value

* fix: rollback warning suffix avoid test break

* doc(grid): remove unused type="flex"

* refactor: skeleton (#6224)

* refactor: skeleton

* refactor: skeleton style

* chore: modify skeleton demo style

* fix(button): link and text should not have wave (#6226)

* refactor: dropdown

* refactor: popover & popconfirm

* refactor(tag): less to cssinjs (#6227)

* refactor(empty): less to cssinjs (#6230)

* refactor(empty): less to cssinjs

* chore: remove unuse code

* fix: reactivity lose

* fix: empty props #6230

* refactor: progress style (#6234)

* refactor: progress

* refactor: progress style

* fix: progress attrs

* refactor: progress #6234

* refactor: switch (#6236)

* refactor: switch style

* refactor: delete switch style

* refactor:input (#6237)

* refactor:input

* fix inheritAttrs:false

* fix attrs.class

* feat: input add disabled

* refactor:comment (#6238)

* refactor:comment

* fix inheritAttrs: false & attrs.class

* refactor:pageheader (#6239)

* refactor:pageheader

* fix inheritAttrs: false & attrs.class

* refactor:statistic (#6240)

* refactor:statistic

* fix inheritAttrs: false & attrs.class

* refactor:list (#6241)

* refactor:list

* fix inheritAttrs: false & attrs.class

* feat: update type

* refactor(Space): less to cssinjs & add compact mode (#6229)

* refactor(Space): less to cssinjs & add compact mode

* chore(space): update md

* chore(space): add demo

* chore(space): add some demo

* feat(button): add compact mode

* fix: reactivity lose

* docs: fix props version

---------

Co-authored-by: tangjinzhou <415800467@qq.com>

* perf: space compact

* refactor:typography (#6244)

* refactor:typography

* fix return

* fix import type

* fix: typography #6244

* refactor:datepicker (#6245)

* refactor: datepicker type

* refactor: rate style (#6254)

* refactor(layout): less to cssinjs (#6249)

* doc: update layout cover

* refactor(result): less to cssinjs (#6246)

* refactor(result): less to cssinjs

* fix: class name is overridden

* docs: update result cover

* refactor:slider (#6250)

* feat: slider  deprecated tooltipVisible

* refactor(crad): less to cssinjs  (#6258)

* update

* switch

* Style adjustment

* refactor(Card): less to cssinjs

* Eliminate invalid code

* optimization and adjustment css

* Adjust the css

* Optimize each item

* adjustment css

* refactor: card #6258

* refactor:carousel (#6262)

* refactor:carousel

* docs:update & refactor: carousel type

---------

Co-authored-by: tangjinzhou <415800467@qq.com>

* refactor:transfer (#6247)

* refactor:transfer

* merge v4 branch & fix theme interface conflict

* docs:update & refactor: transfer type

* perf: transfer

* refactor:checkbox (#6248)

* refactor:checkbox

* docs:update & refactor: checkbox type

* feat: checkbox add disabled context

* refactor:pagination (#6251)

* refactor:pagination

* docs:update & refactor: pagination type

* style: update pagination props type

* refactor: mentions (#6255)

* refactor: mentions

* refactor: mentions menu provider

* doc: update mentions demo

* refcator:upload (#6261)

* refcator:upload

* docs:update & refactor: upload type

* Update style.ts

---------

Co-authored-by: tangjinzhou <415800467@qq.com>

* perf: upload motion

* refactor:timeline (#6263)

* refactor:timeline

* docs:update & refactor: timeline type

* perf: timeline

* refactor:steps (#6264)

* refactor:steps

* fix ...attrs

* fix StepsToken error

* docs:update & refactor: steps type

* fix: steps icon clss error

* refactor:collapse (#6266)

* refactor:collapse

* fix collapse props version

* docs:update & refactor: collapse type & fix collapsible

* feat: update collapse type

* refactor:inputnumber (#6265)

* refactor:inputnumber

* docs:update & refactor: inputnumber type

---------

Co-authored-by: tangjinzhou <415800467@qq.com>

* feat: number add compactSize & disabledContext

* refactor:table (#6267)

* refactor:table

* docs:update & refactor: table type

---------

Co-authored-by: tangjinzhou <415800467@qq.com>

* refactor: table

* feat: table add expandColumnTitle slot

* refactor:calendar (#6269)

* refactor:calendar

* docs:update

* refactor:timepicker (#6270)

* refactor:timepicker

* docs:update & refactor: timepicker type

* refactor:tree (#6276)

* Feat v4 fix type errors (#6285)

* fix compile type errors

* fix menuprops type import

* fix lint errors

* fix lint errors

* fix format error

* fix node version

* fix run dist error

* fix run lint

* fix as any

* fix string type

* refactor: rename locale file

* feat: tree add leafIcon

* [tabs] :less to cssinjs  (#6288)

* update

* switch

* Style adjustment

* refactor(Card): less to cssinjs

* tabs: less to cssinjs 开发ing

* add function cssinjs

* Eliminate irrelevant code

* Eliminate irrelevant code 2

* update components

* Eliminate irrelevant input  code

* refactor: tabs #6288

* feat: add segmented (#6286)

* refactor: segmented #6286

* refactor:select (#6295)

* refactor:select

* update doc

* delete useless

* feat: select add context size

* refactor: tree select (#6296)

* feat: tree-select add context size

* perf: table

* docs: update doc toc

* refactor: cascader

* refactor: auto-complete

* refactor: image

* refactor: drawer

* refactor:radio (#6299)

* refactor:radio

* fix attrs

* feat: radio add disabled context

* fix: some type & doc (#6292)

* fix: typo (#6218)

* fix:  typo

* docs<upload>: docs update

* fix: type of minute in props disabledDateTime of DatePicker (#6233)

* docs: typo (#6256)

* feat: tooltip added overlayInnerStyle attribute

* Update abstractTooltipProps.ts

* Update Tooltip.tsx

---------

Co-authored-by: lyn <76365499@qq.com>
Co-authored-by: H1mple <35363759+baohangxing@users.noreply.github.com>
Co-authored-by: tangjinzhou <415800467@qq.com>

* refactor: form

* fix: directive not work

* fix: use open, remove visible

* doc: update cover

* refactor: remove not use code

* chore: update build script

* doc: update doc

* doc: refactor doc

* chore: update token error

* chore: update style

* refactor: rename _style to style

* fix: tag warning

* fix(dropdown): open invalid (#6316)

* feat: add watermark  (#6300)

* feat: add watermark

* feat: add watermark demo

* feat: add mutationObserver

* feat: add watermark demo

* refactor: watermark type

* doc: add theme-editor

* fix: inject value maybe undefined && tag style invalid (#6320)

* fix: inject value maybe undefined

* fix(tag): style invalid

* feat: add qrcode (#6315)

* feat: add qrcode

* fix: qrcode bug

* fix: qrcode value required

* refactor: props  deconstruct

* Feat v4 floatbutton (#6294)

* feat: add float-button components

* fix type &  demo display

* fix components entry

* fix review bug

* fix bug

* fix .value

* refactor: qrcode #6315

* refactor: float-button

* fix: groupsize context error

* fix: floatbutton animation not work

* Feat v4 theme editor (#6348)

* feat: add theme editor container

* feat: add theme editor layout

* add left panel

* add vue-colorful & fix bug

* 修复hue组件抖动问题

* fix bug && add demo

* fix bug

* fix demo preview

* fix theme editor components demo

* fix: token effect error

* Feat v4 theme editor (#6349)

* feat: add theme editor container

* feat: add theme editor layout

* add left panel

* add vue-colorful & fix bug

* 修复hue组件抖动问题

* fix bug && add demo

* fix bug

* fix demo preview

* fix theme editor components demo

* add theme editor token drawer

* add theme editor token drawer

* fix bug

* open commment

* fix error demo

* fix theme editor bug

* fix: cssinjs effect error

* doc: format code

* fix: tag click event not trigger

* release 4.0.0-alpha.1

* fix: qrcode type

* fix: remove not use file

* doc: update doc site

* doc: update site

* doc: fix theme editor bgcolor (#6358)

* fix: motion not work

* release 4.0.0-alpha.2

* fix: qrcode ; error, close #6362

* fix docs dark theme & add docs coverDark (#6367)

* fix docs dark theme & add docs coverDark

* fix theme Editor edit

* fix: dropdown divider disappear, close  #6365 (#6369)

* doc: update baner

* fix: button wave not work

* fix: ant-piker-cell-range-hover-end style error (#6373)

* fix: ant-piker-cell-range-hover-end style error

* feat: be consistent with antd

* feat: be consistent with antd

* fix: ConfigProvider error for style, close #6368

* release 4.0.0-alpha.4

* style: add dark style for `pre` and `code` (#6382)

* docs: version menu (#6390)

* Feat(DatePicker): increase presets prop (#6387)

* feat(date-picker): add PresetDate type

* feat(date-picker): add usePresets hook

* feat(date-picker): add PresetPanel Component

* feat(date-picker): add PresetPanel Component

* feat(demo): update Preset Ranges Examples

* feat(docs): add new prop presets

* feat(docs): add new prop presets with english

* fix(RangePicker): footer is not managed by panels

* chore(Picker): prefixCls default rc-picker

* chore(date-picker): update presetted-ranges demo

* chore(date-picker): update rangePickerProps'presets

* feat(date-picker): presets reactively processing

* chore(date-picker): update type

* refactor(RangePicker): deprecated ranges prop

* chore(date-picker): update type

* chore(PickerPanel): del notuse panelRef

---------

Co-authored-by: tangjinzhou <415800467@qq.com>

* fix: datepicker presets error #6387

* docs: update datepicker doc #6387

* feat(Steps): add items prop and variants (#6406)

* refactor(steps): add items prop and variants

* feat(steps): add Label Placement and Inline Steps demo

* feat(steps): Label Placement and Inline Steps snap

* test(steps): Steps demo snap

* feat(Steps): update docs

* fix(Step): progressDot

* chore(useLegacyItems): change from warning to devWarning

* refactor(Steps): Remove useLegacyItems

* refactor(Steps): renderStep

* test(Steps): update test snapshot

* chore(Steps): filterEmpty

* feat(Steps): update docs

* docs: update site

* refactor: steps #6406

* test: update steps

* perf: shallowRef instead ref

* fix(Modal): fix modal locale (#6423)

* feat(StyleProvider): add StyleProvider handle cssinjs features (#6415)

* feat(StyleProvider): StyleProvider

* feat(StyleProvider): refactor to  use context

* chore(StyleProvider): update AStyleProviderProps type

* chore(App): reback

* chore(StyleProvider): export StyleProvider

* feat(StyleProvider): update StyleProvider docs

* feat(StyleProvider): update StyleProvider docs

* feat(StyleProvider): add StyleProvider docs routes

* chore(StyleProvider): with useStyleProvider

* docs: update compatiple #6415

* feat(Progress): enhance size prop and add variants (#6409)

* refactor(progress): Progress size and add variants

* feat(progress): add `getsize`

* refactor(progress): Progress size and add variants

* chore(progress): update props type

* chore(progress): update props type

* feat(progress): update demo

* feat(progress): update docs

* test(progress): update test snap

* fix(Circle): Merging classes

* test(progress): update test snap

* feat(progress): add size demo

* test(progress): add size snapshot

* chore(Progress): reback Circle svg class change

* fix: progress borderRadius reactive #6409

* fix(defaultConfigProvider): add getPopupContainer (#6425), close #6419

* fix: qrcode size error, close #6418

* release 4.0.0-alpha.4

* fix: picker import error

* test: add QRCode unit testing (#6441)

* fix

* fix compile type errors

* fix menuprops type import

* fix lint errors

* fix lint errors

* fix format error

* fix node version

* fix run dist error

* fix run lint

* fix as any

* fix string type

* fix steps error & fix docs version select option & fix theme editor error

* fix(badge): badge props count default value error (#6433)

* docs: update site responsive

* fix: modal api method i18n not work, close #6438

* release 4.0.0-alpha.5

* chore(docs): update docs (#6446)

* docs(space): update demo

* docs(affix): update docs

* fix: cssinjs compatibility (#6454)

* feat: add convertLegacyToken

* docs: v4 vuedocs (#6468)

* fix introduce doc

* fix getting-started doc

* add migration-v4 doc

* fix docs

* Update migration-v4.zh-CN.md

* Update migration-v4.zh-CN.md

* Update migration-v4.en-US.md

* Update migration-v4.zh-CN.md

* Update getting-started.en-US.md

* Update getting-started.zh-CN.md

* Update introduce.en-US.md

* Update introduce.zh-CN.md

---------

Co-authored-by: tangjinzhou <415800467@qq.com>

* feat: remove backtop

* feat(anchor): add direction action (#6447)

* refactor(anchor): direction show

* refactor(anchor): update anchor css

* feat(anchor): update demo

* test(anchor): update demo test snap

* feat(anchor): update docs

* Update index.zh-CN.md

* Update index.en-US.md

---------

Co-authored-by: tangjinzhou <415800467@qq.com>

* feat: anchor add customTitle slot #6447

* docs: update doc anchor

* feat(menu): icon support function components with items and update demo (#6457)

* fix(menu): icon do not show problem

* fix(menu): icon do not show problem

* feat(menu): update demo

* test(menu): update demo snap

* chore(Menu): update docs

* test(Menu): update demo

* Update MenuItem.tsx

* Update SubMenu.tsx

---------

Co-authored-by: tangjinzhou <415800467@qq.com>

* doc: update menu icon

* feat: menu items icon add arg

* fix: antd.min error

* release 4.0.0-alpha.6

* fix: table resizable not work && type error (#6514)

* Refactor(demo): change options to composition api (#6499)

* feat(demo): A-B

* feat(demo): update B-checkbox

* feat(demo): update CheckBox -DatePicker

* feat(demo): update DatePicker - Form

* feat(demo): update Form - List

* feat(demo): update  List-pagination

* feat(demo): update  List - skeleton

* feat(demo): update  skeleton - switch

* feat(demo): update  skeleton - switch

* feat(demo): update   switch - upload

* feat(demo): update  watermark

* fix(demo): del hashId

* fix: submenu type lose theme

* fix: dropdown menu hide error

* fix: dealing with switching topics modal, notification, message does not take effect close #6512 (#6518)

* fix: resolve dark mode not support

* fix: unified expression

* feat(modal): add useModal (#6517)

* feat(modal): add useModal hook

* feat(modal): add HookModal demo

* test(modal): update HookModal demo snap

* feat(modal): update modal docs

* chore(modal): update modal type

* perf: useModal #6517

* release 4.0.0-beta.1

* docs: fix tab demo error

* fix(config-provider): fix ConfigProvider.config is not function close #6528 (#6529)

* Feat(use): add useMessage useNotification (#6527)

* feat(Message): add useMessage hook

* feat(Notification): add useNotification hook

* feat(Message): add Hook demo

* feat(Notification): add Hook demo

* test(Message): update demo snap

* test(Notification): update demo snap

* docs(Message): update docs with FAQ

* docs(Notification): update docs with FAQ

* refactor: useMessage #6527

* refactor: useNotification #6527

* release 4.0.0-beta.2

* docs(button): update demo with space (#6536)

* feat(button): demo space

* test(button): update demo snap

* chore(button): disabled demo Ghost space

* test(button): update disabled demo snap

* docs(introduce): update docs (#6539)

* docs(introduce): update docs

* docs(introduce): add Dollar

* Update introduce.zh-CN.md

* Update introduce.en-US.md

---------

Co-authored-by: tangjinzhou <415800467@qq.com>

* docs(customize-theme): update docs (#6540)

* fix introduce doc

* fix getting-started doc

* add migration-v4 doc

* fix docs

* Update migration-v4.zh-CN.md

* Update migration-v4.zh-CN.md

* Update migration-v4.en-US.md

* Update migration-v4.zh-CN.md

* Update getting-started.en-US.md

* Update getting-started.zh-CN.md

* Update introduce.en-US.md

* Update introduce.zh-CN.md

* update customize-theme doc & fix migration-v4 error

* update customize-theme doc

* fix migration-v4 error

* remove SSR & shadowDom

* Update customize-theme.zh-CN.md

* Update customize-theme.en-US.md

---------

Co-authored-by: tangjinzhou <415800467@qq.com>

* fix: getPopupContainer not work

* release 4.0.0-beta.3

* release 4.0.0-beta.4

* docs: update grid docs (#6549)

Co-authored-by: zhuzhengjian <zhuzhengjian@hoteamsoft.com>

* test(alert): update demo with space (#6541)

* docs(alert): update demo with space

* docs(alert): update alert test snap

---------

Co-authored-by: zhuzhengjian <zhuzhengjian@hoteamsoft.com>

* fix: components bug & update docs (#6548)

* fix bug

* fix test case and update snapshot,fix space merge class

* docs(grid): update migrate docs && delete xxxl in grid docs (#6562)

* fix: segmentd disabled label is undefined (#6556)

* fix: segmentd disabled label is undefined

* fix: segmentd disabled label is undefined

* fix: segmentd disabled label is undefined

* fix(grid): remove grid xxxl attribute (#6572)

* fix: remove grid xxxl attribute

* docs: remove xxxl in grid docs

* fix: tooltip custom color error

* feat: remove Step __legacy

* feat: add tour (#6332)

* feat v4 add tour

* fix type error

* sync tour from antd5.4.6 & fix type error

* fix error

* refactor: tour #6332

* fix: tour center

* fix: picker support v-show

* test: update snap

* test: update tour test

* fix: tour-mask attrs pointer-events (#6577)

* fix: tour animated

* feat: support vue 3.3 slot type

* release 4.0.0-rc.1

* release 4.0.0-rc.2, close #6588

* 4.0.0-rc.3

* chore: remove vue private api

* fix: paginantion error, close #6590

* release 4.0.0-rc.4

* fix: checxbox style

* fix: pagination mini size style

* release 4.0.0-rc.5

* docs: update v4 tabs doc error(#6606) (#6607)

* docs: add ant-design-vue nuxt module (#6620)

* fix: layout-sider and menu transition style(#6637) (#6640)

* docs: fixed the style error of online demo (#6630)

* feat: checkbox label slot support use option label (#6642)

* docs: 📃change the default  setting of  "treeNodeFilterProp" from  "value" to "label"

* revert: ↩revert this config and create another pr to commit

* feat: checkbox label slot support use option label

* test: 🧪update checkbox *.snap file

---------

Co-authored-by: tangjinzhou <415800467@qq.com>

* fix: add disabledContext override with form components (#6618)

* fix: add disabledContext override with form components

* test: update snap

* fix: LabelWidth demo filename

* fix: fontsize spelling mistake

* fix(tour): target position (#6629)

* style: format lint

* docs(form): add form disabled demo (#6658)

* fix: comment node error

* release 4.0

* fix: portalWrapper add autoLock prop (#6687), close #6649

* fix: image animation & zindex, close #6675

* docs(QRCode): Synchronize QR code demonstration and add SVG (#6660)

* fix: Synchronize QR code demonstration and add SVG

* fix: responsive loss and invalid border style

* docs: synchronize antd5.6.3 QRCode color in dark mode

* feat:  calendar select support info.source param (#6697)

* docs: add ant-design-vue nuxt module

* feat: calendar select support info.source param

* docs: synchronous config-provider demo (#6706)

* revert: #6706

* docs: export space-compact types (#6716)

* release 4.0.0

---------

Co-authored-by: bqy_fe <1743369777@qq.com>
Co-authored-by: zkwolf <chenhao5866@gmail.com>
Co-authored-by: Zev Zhu <45655660+aibayanyu20@users.noreply.github.com>
Co-authored-by: lyn <76365499@qq.com>
Co-authored-by: 果冻橙 <shifeng199307@gmail.com>
Co-authored-by: songsong0707 <74165917+songsong0707@users.noreply.github.com>
Co-authored-by: yang <30883395+webvs2@users.noreply.github.com>
Co-authored-by: selicens <1244620067@qq.com>
Co-authored-by: 一堆菠萝 <53335668+JavanShen@users.noreply.github.com>
Co-authored-by: H1mple <35363759+baohangxing@users.noreply.github.com>
Co-authored-by: Cherry7 <79909910+CCherry07@users.noreply.github.com>
Co-authored-by: Konv Suu <2583695112@qq.com>
Co-authored-by: luoawai <32483950+luoawai@users.noreply.github.com>
Co-authored-by: 鱼见 <657715602@qq.com>
Co-authored-by: zhuzhengjian <zhuzhengjian@hoteamsoft.com>
Co-authored-by: Cupid Valentine <53572196+valcosmos@users.noreply.github.com>
Co-authored-by: 专业逮虾户aa <30494925+waldonUB@users.noreply.github.com>
Co-authored-by: PanStar <PanStar@users.noreply.github.com>
2023-07-14 11:58:27 +08:00
tangjinzhou 0a738a36b6
Merge branch 'main' into feat-v4 2023-07-14 11:56:19 +08:00
tangjinzhou 10f990d534 release 4.0.0 2023-07-14 11:54:46 +08:00
PanStar 8b5d71663a
docs: export space-compact types (#6716) 2023-07-14 10:08:30 +08:00
tangjinzhou 058e8ec542 revert: #6706 2023-07-03 21:40:54 +08:00
selicens f70b04c74f
docs: synchronous config-provider demo (#6706) 2023-07-03 21:29:54 +08:00
Zev Zhu 2ce4e7da82
feat: calendar select support info.source param (#6697)
* docs: add ant-design-vue nuxt module

* feat: calendar select support info.source param
2023-07-03 21:27:18 +08:00
huyikai a0e94978f5
docs: update upload demo ts
示例代码在运行时,ts类型报错.原因是试图在可能为 undefined 的对象上使用扩展运算符.
2023-07-03 21:25:29 +08:00
selicens fc5181d1d8
docs(QRCode): Synchronize QR code demonstration and add SVG (#6660)
* fix: Synchronize QR code demonstration and add SVG

* fix: responsive loss and invalid border style

* docs: synchronize antd5.6.3 QRCode color in dark mode
2023-06-28 10:11:52 +08:00
tangjinzhou 994707bd50 fix: image animation & zindex, close #6675 2023-06-25 10:55:27 +08:00
Cherry7 e9d26f2a7d
fix: portalWrapper add autoLock prop (#6687), close #6649 2023-06-25 06:51:25 +08:00
tangjinzhou 7fd0e4a225 release 4.0 2023-06-15 21:06:59 +08:00
tangjinzhou e229248053 fix: comment node error 2023-06-15 21:06:59 +08:00
selicens 10159941b9
docs(form): add form disabled demo (#6658) 2023-06-15 16:07:35 +08:00
tangjinzhou 9c26ab05d3 style: format lint 2023-06-15 13:38:17 +08:00
果冻橙 6861a77d29
fix(tour): target position (#6629) 2023-06-15 13:23:04 +08:00
Cherry7 308c30c738
fix: add disabledContext override with form components (#6618)
* fix: add disabledContext override with form components

* test: update snap

* fix: LabelWidth demo filename

* fix: fontsize spelling mistake
2023-06-15 11:17:58 +08:00
专业逮虾户aa afc1b84ed0
feat: checkbox label slot support use option label (#6642)
* docs: 📃change the default  setting of  "treeNodeFilterProp" from  "value" to "label"

* revert: ↩revert this config and create another pr to commit

* feat: checkbox label slot support use option label

* test: 🧪update checkbox *.snap file

---------

Co-authored-by: tangjinzhou <415800467@qq.com>
2023-06-15 11:11:24 +08:00
tangjinzhou 58f6d6ee28 Merge remote-tracking branch 'origin/main' into feat-v4 2023-06-15 11:05:14 +08:00
Cupid Valentine 7270855ce8
docs: fixed the style error of online demo (#6630) 2023-06-12 22:47:37 +08:00
selicens 19f0aea965
fix: layout-sider and menu transition style(#6637) (#6640) 2023-06-12 22:47:01 +08:00
专业逮虾户aa 8212237045
docs: 🐞change the default setting of "treeNodeFilterProp" from "va… (#6610)
* docs: 📃change the default  setting of  "treeNodeFilterProp" from  "value" to "label"

* revert: ↩revert this config and create another pr to commit
2023-06-01 15:03:54 +08:00
bqy_fe 80edf86d18
fix(image-group): props definition (#6621)
* fix(image-group): props definition

* feat: add ImageGroupProps type definition
2023-06-01 14:58:30 +08:00
Zev Zhu 6f032c9722
docs: add ant-design-vue nuxt module (#6620) 2023-06-01 14:57:23 +08:00
selicens 1001ff3834
docs(tabs): update v3-tabs doc erroe(#6606) (#6608) 2023-06-01 14:56:09 +08:00
selicens 6be947aeb9
docs: update v4 tabs doc error(#6606) (#6607) 2023-06-01 14:55:50 +08:00
Cherry7 3057cfe9ef
doc(TreeSelect): update fieldNames docs (#6623) 2023-06-01 14:55:17 +08:00
tangjinzhou 45ede0853b release 4.0.0-rc.5 2023-05-25 22:19:01 +08:00
tangjinzhou afb2619a81 fix: pagination mini size style 2023-05-25 22:18:34 +08:00
tangjinzhou 2bf85998ba fix: checxbox style 2023-05-25 21:57:35 +08:00
tangjinzhou 9cff5cb558
Update README.md (#6594) 2023-05-24 16:01:39 +08:00
tangjinzhou 42cb6871ee release 4.0.0-rc.4 2023-05-23 14:38:58 +08:00
tangjinzhou 508e8e3706 fix: paginantion error, close #6590 2023-05-23 14:38:26 +08:00
tangjinzhou fe3c2bdf89 chore: remove vue private api 2023-05-20 22:09:11 +08:00
tangjinzhou 64b9347fce 4.0.0-rc.3 2023-05-20 16:58:23 +08:00
tangjinzhou 96f940d834 release 4.0.0-rc.2, close #6588 2023-05-20 15:52:46 +08:00
tangjinzhou d3d37f08a2 Merge remote-tracking branch 'origin/main' into feat-v4 2023-05-20 15:50:21 +08:00
tangjinzhou 1e0cefa786 fix: table not work 2023-05-20 15:49:17 +08:00
tangjinzhou d49082008e Merge remote-tracking branch 'origin/main' into feat-v4 2023-05-19 10:15:43 +08:00
tangjinzhou bba322702e fix: ts error 2023-05-19 10:15:07 +08:00
tangjinzhou 1d0a2737a4 release 4.0.0-rc.1 2023-05-19 09:12:03 +08:00
tangjinzhou c9f0841628 feat: support vue 3.3 slot type 2023-05-18 23:30:34 +08:00
tangjinzhou 03760e3e3d Merge remote-tracking branch 'origin/main' into feat-v4 2023-05-18 23:23:43 +08:00
tangjinzhou 144bb2e6d5 feat: support vue 3.3 slot type 2023-05-18 22:53:21 +08:00
tangjinzhou b4258dc23d feat: support vue 3.3 slot type 2023-05-18 21:22:58 +08:00
tangjinzhou 9499a7fc86 fix: vue 3.3 type error 2023-05-18 16:22:12 +08:00
tangjinzhou c36f7e701f fix: tour animated 2023-05-18 07:23:46 +08:00
果冻橙 83017269ab
fix: tour-mask attrs pointer-events (#6577) 2023-05-18 07:19:48 +08:00
tangjinzhou 1c7b7a35f6 test: update tour test 2023-05-17 23:05:18 +08:00
tangjinzhou 28263bbe33 test: update snap 2023-05-17 22:57:15 +08:00
tangjinzhou 5aad611d4c fix: picker support v-show 2023-05-17 22:53:02 +08:00
tangjinzhou 429172b345 fix: tour center 2023-05-17 22:12:52 +08:00
tangjinzhou e5787c2ed2 refactor: tour #6332 2023-05-17 19:02:49 +08:00
果冻橙 698c0ff3b4
feat: add tour (#6332)
* feat v4 add tour

* fix type error

* sync tour from antd5.4.6 & fix type error

* fix error
2023-05-17 11:05:47 +08:00
tangjinzhou db4148af5a feat: remove Step __legacy 2023-05-17 09:23:44 +08:00
tangjinzhou 21cf533664 fix: tooltip custom color error 2023-05-16 22:49:17 +08:00
Zev Zhu 4c8cc0129f
fix(grid): remove grid xxxl attribute (#6572)
* fix: remove grid xxxl attribute

* docs: remove xxxl in grid docs
2023-05-16 22:30:18 +08:00
JerryHuang 6a1952c469
docs: Modify the error description of the upload component document (#6560) 2023-05-14 17:03:21 +08:00
selicens a694167f37
fix: segmentd disabled label is undefined (#6556)
* fix: segmentd disabled label is undefined

* fix: segmentd disabled label is undefined

* fix: segmentd disabled label is undefined
2023-05-14 17:02:07 +08:00
Zev Zhu 3ed455b3f7
docs(grid): update migrate docs && delete xxxl in grid docs (#6562) 2023-05-14 17:01:26 +08:00
果冻橙 e49e72d24a
fix: components bug & update docs (#6548)
* fix bug

* fix test case and update snapshot,fix space merge class
2023-05-14 16:59:56 +08:00
Zev Zhu 149cedd262
test(alert): update demo with space (#6541)
* docs(alert): update demo with space

* docs(alert): update alert test snap

---------

Co-authored-by: zhuzhengjian <zhuzhengjian@hoteamsoft.com>
2023-05-11 23:29:19 +08:00
Zev Zhu 8bf8515933
docs: update grid docs (#6549)
Co-authored-by: zhuzhengjian <zhuzhengjian@hoteamsoft.com>
2023-05-11 23:28:47 +08:00
Cherry7 f5bea1413b
docs(demo): stripe dark (#6542) 2023-05-11 23:23:08 +08:00
tangjinzhou 0d24755ee3 release 4.0.0-beta.4 2023-05-08 16:39:33 +08:00
tangjinzhou f2f7cfd94d release 4.0.0-beta.3 2023-05-08 16:09:50 +08:00
tangjinzhou d933605b56 fix: getPopupContainer not work 2023-05-08 16:09:29 +08:00
果冻橙 266482deca
docs(customize-theme): update docs (#6540)
* fix introduce doc

* fix getting-started doc

* add migration-v4 doc

* fix docs

* Update migration-v4.zh-CN.md

* Update migration-v4.zh-CN.md

* Update migration-v4.en-US.md

* Update migration-v4.zh-CN.md

* Update getting-started.en-US.md

* Update getting-started.zh-CN.md

* Update introduce.en-US.md

* Update introduce.zh-CN.md

* update customize-theme doc & fix migration-v4 error

* update customize-theme doc

* fix migration-v4 error

* remove SSR & shadowDom

* Update customize-theme.zh-CN.md

* Update customize-theme.en-US.md

---------

Co-authored-by: tangjinzhou <415800467@qq.com>
2023-05-08 10:03:07 +08:00
gongshun 1deefa8b7f
chore: modify the babel configuration (#6532)
* chore: modify the babel configuration

* fix: 参考 antd-tools 的代码
2023-05-07 20:39:19 +08:00
Cherry7 fd8af2322c
docs(introduce): update docs (#6539)
* docs(introduce): update docs

* docs(introduce): add Dollar

* Update introduce.zh-CN.md

* Update introduce.en-US.md

---------

Co-authored-by: tangjinzhou <415800467@qq.com>
2023-05-07 20:36:58 +08:00
Cherry7 9fdc297686
docs(button): update demo with space (#6536)
* feat(button): demo space

* test(button): update demo snap

* chore(button): disabled demo Ghost space

* test(button): update disabled demo snap
2023-05-07 20:33:24 +08:00
tangjinzhou fded418b8a release 4.0.0-beta.2 2023-05-05 11:59:37 +08:00
tangjinzhou feffe70ebb refactor: useNotification #6527 2023-05-05 11:55:42 +08:00
tangjinzhou 02ed988cba refactor: useMessage #6527 2023-05-05 11:01:57 +08:00
Cherry7 6eb4d8f5c5
Feat(use): add useMessage useNotification (#6527)
* feat(Message): add useMessage hook

* feat(Notification): add useNotification hook

* feat(Message): add Hook demo

* feat(Notification): add Hook demo

* test(Message): update demo snap

* test(Notification): update demo snap

* docs(Message): update docs with FAQ

* docs(Notification): update docs with FAQ
2023-05-05 09:59:57 +08:00
Zev Zhu b61c88e5df
fix(config-provider): fix ConfigProvider.config is not function close #6528 (#6529) 2023-05-05 09:41:34 +08:00
tangjinzhou ac93c476d1 docs: fix tab demo error 2023-05-03 15:35:46 +08:00
tangjinzhou db46965761 release 4.0.0-beta.1 2023-05-03 15:10:52 +08:00
tangjinzhou 5578c14a8e perf: useModal #6517 2023-05-03 15:09:01 +08:00
Cherry7 69640c0af8
feat(modal): add useModal (#6517)
* feat(modal): add useModal hook

* feat(modal): add HookModal demo

* test(modal): update HookModal demo snap

* feat(modal): update modal docs

* chore(modal): update modal type
2023-05-03 14:15:34 +08:00
tangjinzhou 0df6abe3a7 Merge remote-tracking branch 'origin/main' into feat-v4 2023-05-03 13:50:14 +08:00
Zev Zhu 045193e797
fix: passing a non-array as children to a table will result in an error. (#6521)
* fix: fix table column data is passed into chlidren is undefined or null errorr

* chore(menu): fix menu inline demo watch not trigger
2023-05-03 13:30:26 +08:00
Zhan Dong 3b37cc1ae7
fix(input-number): fix the issuse of missing id when use in form (#6519)
closed #6466
2023-05-03 13:28:47 +08:00
Zev Zhu b103b7570d
fix: dealing with switching topics modal, notification, message does not take effect close #6512 (#6518)
* fix: resolve dark mode not support

* fix: unified expression
2023-05-03 13:24:28 +08:00
Simon He b39f2b2d03
perf(anchor): reduce unnecessary calculations (#6516) 2023-05-03 13:14:59 +08:00
tangjinzhou 61d6312783 fix: dropdown menu hide error 2023-05-02 23:36:12 +08:00
tangjinzhou 98be7071e5 Merge remote-tracking branch 'origin/main' into feat-v4 2023-04-28 15:51:46 +08:00
tangjinzhou 5439e0c164 fix: submenu type lose theme 2023-04-28 15:37:29 +08:00
Cherry7 9be58078d2
Refactor(demo): change options to composition api (#6499)
* feat(demo): A-B

* feat(demo): update B-checkbox

* feat(demo): update CheckBox -DatePicker

* feat(demo): update DatePicker - Form

* feat(demo): update Form - List

* feat(demo): update  List-pagination

* feat(demo): update  List - skeleton

* feat(demo): update  skeleton - switch

* feat(demo): update  skeleton - switch

* feat(demo): update   switch - upload

* feat(demo): update  watermark

* fix(demo): del hashId
2023-04-28 14:08:21 +08:00
Simon He 019b539f16
perf(affix): reduce unnecessary calculations (#6509) 2023-04-28 14:04:35 +08:00
tangjinzhou ccf850552d release 3.2.20 2023-04-27 22:53:30 +08:00
tangjinzhou 858169aee3 fix: datePicker support empty, close #6510 2023-04-27 22:39:23 +08:00
tangjinzhou 80fbabc66f fix: space remounted slot, close #6500 2023-04-27 22:18:35 +08:00
tangjinzhou 6d1035f1b0 docs: add quarterOfYear, close #6508 2023-04-27 21:29:17 +08:00
果冻橙 063c06f9c6
fix: table resizable not work && type error (#6514) 2023-04-27 21:04:29 +08:00
tangjinzhou 43009f0c59 release 4.0.0-alpha.6 2023-04-23 19:33:19 +08:00
tangjinzhou ca0d8cc7c1 release 3.2.19 2023-04-23 19:20:44 +08:00
tangjinzhou 678ec079bc fix: antd.min error 2023-04-23 19:18:11 +08:00
tangjinzhou eba8f6b960 feat: menu items icon add arg 2023-04-23 15:52:31 +08:00
tangjinzhou 760c4c2695 doc: update menu icon 2023-04-23 15:00:34 +08:00
Cherry7 8ab50b1757
feat(menu): icon support function components with items and update demo (#6457)
* fix(menu): icon do not show problem

* fix(menu): icon do not show problem

* feat(menu): update demo

* test(menu): update demo snap

* chore(Menu): update docs

* test(Menu): update demo

* Update MenuItem.tsx

* Update SubMenu.tsx

---------

Co-authored-by: tangjinzhou <415800467@qq.com>
2023-04-23 14:23:15 +08:00
tangjinzhou 12c9e0c3fb release 3.2.18 2023-04-23 13:40:28 +08:00
tangjinzhou b0990b7323 Merge remote-tracking branch 'origin/main' into feat-v4 2023-04-23 11:02:19 +08:00
tangjinzhou c36b69d7bd fix: ts error 2023-04-22 22:17:17 +08:00
Zhan Dong 8e5431886a
feat: Add focus and blur methods to buttons (#6490), close #6483
* feat(button): add methods for focus and blur

closed #6483

* docs(button): add focus methods doc
2023-04-22 21:21:15 +08:00
tangjinzhou 5376014b33 docs: update doc anchor 2023-04-21 22:29:04 +08:00
tangjinzhou bccd9204e8 feat: anchor add customTitle slot #6447 2023-04-21 21:29:20 +08:00
Cherry7 8932aff13f
feat(anchor): add direction action (#6447)
* refactor(anchor): direction show

* refactor(anchor): update anchor css

* feat(anchor): update demo

* test(anchor): update demo test snap

* feat(anchor): update docs

* Update index.zh-CN.md

* Update index.en-US.md

---------

Co-authored-by: tangjinzhou <415800467@qq.com>
2023-04-21 17:33:38 +08:00
tangjinzhou de00607dc7 feat: remove backtop 2023-04-21 16:19:41 +08:00
果冻橙 118ae9a50b
docs: v4 vuedocs (#6468)
* fix introduce doc

* fix getting-started doc

* add migration-v4 doc

* fix docs

* Update migration-v4.zh-CN.md

* Update migration-v4.zh-CN.md

* Update migration-v4.en-US.md

* Update migration-v4.zh-CN.md

* Update getting-started.en-US.md

* Update getting-started.zh-CN.md

* Update introduce.en-US.md

* Update introduce.zh-CN.md

---------

Co-authored-by: tangjinzhou <415800467@qq.com>
2023-04-21 15:46:40 +08:00
tangjinzhou 0683ede0fb feat: add convertLegacyToken 2023-04-21 14:52:32 +08:00
xihaoshangdi 634adae1c3
fix(a-form):fixed use props.name instead window.name (#6460) 2023-04-21 14:01:57 +08:00
Cherry7 95642610da
fix(Select): fix polite span effect (#6467) 2023-04-21 13:55:28 +08:00
xing.org1^ 69da428a51
fix(RangePicker): syntax errors (#6469) 2023-04-21 11:14:34 +08:00
tangjinzhou 78c8c9d791 fix: virtual list error at firefox, close #6470 2023-04-21 11:12:45 +08:00
Cherry7 c690f4188a
doc(transfer): tree-transfer disabled style (#6480) 2023-04-21 09:54:05 +08:00
果冻橙 838aa71b4b
fix: cssinjs compatibility (#6454) 2023-04-13 16:39:29 +08:00
Cherry7 2bf654da71
chore(docs): update docs (#6446)
* docs(space): update demo

* docs(affix): update docs
2023-04-12 21:25:23 +08:00
Cherry7 bf5fcdc269
docs(DatePicker): update docs (#6450) 2023-04-12 21:22:14 +08:00
tangjinzhou 515ab9e38c release 4.0.0-alpha.5 2023-04-08 22:02:52 +08:00
tangjinzhou d4f2e97ca9 fix: modal api method i18n not work, close #6438 2023-04-08 21:56:32 +08:00
tangjinzhou be90b53527 docs: update site responsive 2023-04-08 21:14:27 +08:00
鱼见 0b85b84dcf
fix(badge): badge props count default value error (#6433) 2023-04-08 21:05:12 +08:00
果冻橙 4e277ea9bb
fix
* fix compile type errors

* fix menuprops type import

* fix lint errors

* fix lint errors

* fix format error

* fix node version

* fix run dist error

* fix run lint

* fix as any

* fix string type

* fix steps error & fix docs version select option & fix theme editor error
2023-04-08 20:57:46 +08:00
selicens bf97057c2c
test: add QRCode unit testing (#6441) 2023-04-08 20:56:35 +08:00
tangjinzhou 637656b0c3 fix: picker import error 2023-04-06 17:31:51 +08:00
tangjinzhou 0e1b7fd94f release 4.0.0-alpha.4 2023-04-06 17:12:50 +08:00
tangjinzhou 33d1553908 fix: qrcode size error, close #6418 2023-04-06 17:09:04 +08:00
Cherry7 2eaad16331
fix(defaultConfigProvider): add getPopupContainer (#6425), close #6419 2023-04-06 15:56:58 +08:00
tangjinzhou 58998c4978 fix: progress borderRadius reactive #6409 2023-04-06 15:40:10 +08:00
Cherry7 7db4265616
feat(Progress): enhance size prop and add variants (#6409)
* refactor(progress): Progress size and add variants

* feat(progress): add `getsize`

* refactor(progress): Progress size and add variants

* chore(progress): update props type

* chore(progress): update props type

* feat(progress): update demo

* feat(progress): update docs

* test(progress): update test snap

* fix(Circle): Merging classes

* test(progress): update test snap

* feat(progress): add size demo

* test(progress): add size snapshot

* chore(Progress): reback Circle svg class change
2023-04-06 15:11:58 +08:00
tangjinzhou 8a3ed32254 docs: update compatiple #6415 2023-04-06 14:46:47 +08:00
Cherry7 1151bdad0f
feat(StyleProvider): add StyleProvider handle cssinjs features (#6415)
* feat(StyleProvider): StyleProvider

* feat(StyleProvider): refactor to  use context

* chore(StyleProvider): update AStyleProviderProps type

* chore(App): reback

* chore(StyleProvider): export StyleProvider

* feat(StyleProvider): update StyleProvider docs

* feat(StyleProvider): update StyleProvider docs

* feat(StyleProvider): add StyleProvider docs routes

* chore(StyleProvider): with useStyleProvider
2023-04-06 11:07:55 +08:00
luoawai 84037f8eef
fix(Modal): fix modal locale (#6423) 2023-04-06 10:56:10 +08:00
tangjinzhou 3e46f27b59 perf: shallowRef instead ref 2023-04-05 22:03:02 +08:00
tangjinzhou 719847901e test: update steps 2023-04-05 17:04:02 +08:00
tangjinzhou fbfec0a062 refactor: steps #6406 2023-04-05 16:28:49 +08:00
tangjinzhou 9a5cbeee50 docs: update site 2023-04-05 13:50:08 +08:00
Cherry7 b0125de963
feat(Steps): add items prop and variants (#6406)
* refactor(steps): add items prop and variants

* feat(steps): add Label Placement and Inline Steps demo

* feat(steps): Label Placement and Inline Steps snap

* test(steps): Steps demo snap

* feat(Steps): update docs

* fix(Step): progressDot

* chore(useLegacyItems): change from warning to devWarning

* refactor(Steps): Remove useLegacyItems

* refactor(Steps): renderStep

* test(Steps): update test snapshot

* chore(Steps): filterEmpty

* feat(Steps): update docs
2023-04-05 13:39:40 +08:00
tangjinzhou bf1e6fec95 docs: update datepicker doc #6387 2023-04-05 13:30:31 +08:00
tangjinzhou 5f1cb0d240 fix: datepicker presets error #6387 2023-04-05 13:29:08 +08:00
Cherry7 f6daa8d28f
Feat(DatePicker): increase presets prop (#6387)
* feat(date-picker): add PresetDate type

* feat(date-picker): add usePresets hook

* feat(date-picker): add PresetPanel Component

* feat(date-picker): add PresetPanel Component

* feat(demo): update Preset Ranges Examples

* feat(docs): add new prop presets

* feat(docs): add new prop presets with english

* fix(RangePicker): footer is not managed by panels

* chore(Picker): prefixCls default rc-picker

* chore(date-picker): update presetted-ranges demo

* chore(date-picker): update rangePickerProps'presets

* feat(date-picker): presets reactively processing

* chore(date-picker): update type

* refactor(RangePicker): deprecated ranges prop

* chore(date-picker): update type

* chore(PickerPanel): del notuse panelRef

---------

Co-authored-by: tangjinzhou <415800467@qq.com>
2023-04-05 10:56:07 +08:00
tangjinzhou 48ab5a2f99 Merge remote-tracking branch 'origin/main' into feat-v4 2023-04-05 10:05:59 +08:00
Cherry7 1977074a7e
fix(dayjs): cannot handle week and quarter String + Format (#6385)
* fix(generateRangePicker): onChange type

* fix(dayjs): cannot handle week's String + Format

* test(date-picker): update snap

* test(date-picker): add WeekPicker valueFormat case

* refactor(dayjs): todate support week and quarter

* test(QuarterPicker): test QuarterPicker valueFormat

* chore(QuarterPicker): findTargetStr rename

* test(DatePicker): update demo snap
2023-04-05 09:47:51 +08:00
tangjinzhou 72508d864b
Revert "fix: useMergedState is not updated in time (#6402)" (#6421)
This reverts commit 670ff3f857.
2023-04-05 09:32:56 +08:00
siaikin 670ff3f857
fix: useMergedState is not updated in time (#6402)
Co-authored-by: siaikin <abc131054026@outlook.com>
2023-04-05 08:25:18 +08:00
HeyXml a8294a9f79
docs: pull request branch in EN and CN introduce docs (#6404) 2023-04-04 23:44:24 +08:00
Dmytro Lukashenko 9445dd23c8
fix: fix bug with render class ant-upload-drag-container in dom (#6413)
Co-authored-by: Dmytro Lukashenko <dmytro.lukashenko@levi9.com>
2023-04-04 23:43:11 +08:00
HeyXml 2a5b18ac6e
fix: fix form error style for input addonAfter slot when disabled (#6403), close #6374 2023-04-04 23:04:46 +08:00
tangjinzhou 65408bfd48 release 3.2.17 2023-04-04 22:40:53 +08:00
tangjinzhou a8823f523c revert: dropdown #6324, close #6400, #6405 2023-04-04 22:32:55 +08:00
tangjinzhou f4b47ad94b
Delete translate.yml 2023-03-31 21:56:54 +08:00
Szymon Jędrych b16c89fcd2
docs(introduce): fix urls to components overwiev, fix links to PR templates (#6389)
* Move pull request template to PULL_REQUEST_TEMPLATE folder, rename english template to pr_en, fix url

* Fix urls to components in EN and CN introduce docs

* Fix url to chinese pr template
2023-03-27 08:17:09 +08:00
Cherry7 ae27d430e5
docs: version menu (#6390) 2023-03-27 08:16:03 +08:00
Konv Suu 9dbe035efe
style: add dark style for `pre` and `code` (#6382) 2023-03-27 08:11:29 +08:00
wheeljs 7ebabb3778
docs(upload): duplicated prop `directory` (#6378)
Co-authored-by: will.tian <will.tian@hyatt.com>
2023-03-27 08:10:49 +08:00
tangjinzhou 051161f102 release 3.2.16 2023-03-23 14:11:54 +08:00
tangjinzhou 9802fb3ea1 test: update snap 2023-03-23 14:11:40 +08:00
tangjinzhou 5fd866b136 format: inputnumber util 2023-03-23 11:56:15 +08:00
Cherry7 d956eed086
Fix form type prompt (#6375)
* fix(FormITem): Change from ValidationRule to Rule

* fix(FormI): from props type
2023-03-23 10:37:13 +08:00
tangjinzhou 6d60eba281 release 4.0.0-alpha.4 2023-03-21 15:09:00 +08:00
tangjinzhou bfcbd5bdef fix: ConfigProvider error for style, close #6368 2023-03-21 15:08:16 +08:00
Cherry7 4d2a37fcd3
fix: ant-piker-cell-range-hover-end style error (#6373)
* fix: ant-piker-cell-range-hover-end style error

* feat: be consistent with antd

* feat: be consistent with antd
2023-03-21 14:08:37 +08:00
ming e5e20cca5b
feat[data-picker]: improve format types and docs (#6371)
Co-authored-by: xiamingming1 <xiamingming@jd.com>
2023-03-21 14:05:57 +08:00
tangjinzhou dcc3bb10cb fix: button wave not work 2023-03-20 16:45:26 +08:00
tangjinzhou 7d1418d9f4 doc: update baner 2023-03-20 13:36:49 +08:00
zkwolf 3653f37d6b
fix: dropdown divider disappear, close #6365 (#6369) 2023-03-20 13:32:23 +08:00
果冻橙 f265a7bb02
fix docs dark theme & add docs coverDark (#6367)
* fix docs dark theme & add docs coverDark

* fix theme Editor edit
2023-03-20 11:15:02 +08:00
tangjinzhou 89314fb4d0 fix: qrcode ; error, close #6362 2023-03-17 10:27:17 +08:00
tangjinzhou b1f38eb2ec release 4.0.0-alpha.2 2023-03-16 14:42:15 +08:00
tangjinzhou d95861aa90 fix: motion not work 2023-03-16 14:41:44 +08:00
Jobin 0a610d818f
fix: Export the types referenced in the Props of the Slider component for external use. (#6357) 2023-03-16 08:28:54 +08:00
果冻橙 5cc85f3cc1
doc: fix theme editor bgcolor (#6358) 2023-03-16 08:27:37 +08:00
tangjinzhou 98c361cbad doc: add qq 2023-03-15 11:17:23 +08:00
tangjinzhou 2ac1e1d42a doc: add next site nav 2023-03-15 10:57:38 +08:00
tangjinzhou f3935ebb4f doc: update site 2023-03-14 13:38:47 +08:00
tangjinzhou 11c52d487d doc: update doc site 2023-03-14 10:30:18 +08:00
tangjinzhou 295c417f49 fix: remove not use file 2023-03-13 21:24:27 +08:00
tangjinzhou 27c5a6c96a fix: qrcode type 2023-03-13 15:22:48 +08:00
tangjinzhou fc7cadb3f9 release 4.0.0-alpha.1 2023-03-13 15:08:43 +08:00
tangjinzhou ad1d6443f2 fix: tag click event not trigger 2023-03-13 12:08:38 +08:00
tangjinzhou 77d0d188f0 doc: format code 2023-03-13 11:58:59 +08:00
tangjinzhou b22bd85828 fix: cssinjs effect error 2023-03-13 11:11:40 +08:00
果冻橙 f819a1b209
Feat v4 theme editor (#6349)
* feat: add theme editor container

* feat: add theme editor layout

* add left panel

* add vue-colorful & fix bug

* 修复hue组件抖动问题

* fix bug && add demo

* fix bug

* fix demo preview

* fix theme editor components demo

* add theme editor token drawer

* add theme editor token drawer

* fix bug

* open commment

* fix error demo

* fix theme editor bug
2023-03-13 09:54:21 +08:00
tangjinzhou dde2ff140d fix: token effect error 2023-03-12 23:48:46 +08:00
果冻橙 f429148734
Feat v4 theme editor (#6348)
* feat: add theme editor container

* feat: add theme editor layout

* add left panel

* add vue-colorful & fix bug

* 修复hue组件抖动问题

* fix bug && add demo

* fix bug

* fix demo preview

* fix theme editor components demo
2023-03-12 15:15:52 +08:00
tangjinzhou 23a213acda Merge remote-tracking branch 'origin/main' into feat-v4 2023-03-08 13:44:43 +08:00
tangjinzhou 6fb47874a3 fix: image preview error #6333 2023-03-08 13:43:47 +08:00
tangjinzhou d241a06f9d Merge remote-tracking branch 'origin/main' into feat-v4 2023-03-04 08:37:28 +08:00
Zz-ZzzZ 3d2d5fdd99
fix(dropdown): fix close popup doesn't emit 'visibleChange' event (#6324)
* fix(dropdown): fix close popup doesn't emit 'visibleChange' event

* Update Dropdown.tsx

---------

Co-authored-by: tangjinzhou <415800467@qq.com>
2023-03-03 21:45:53 +08:00
tangjinzhou 1d9a521669 fix: floatbutton animation not work 2023-03-03 17:25:11 +08:00
tangjinzhou a04cae1221 fix: groupsize context error 2023-03-03 17:13:48 +08:00
tangjinzhou add208aefb refactor: float-button 2023-03-03 16:58:47 +08:00
tangjinzhou 355c41b4aa refactor: qrcode #6315 2023-03-03 14:56:23 +08:00
果冻橙 3f5f3ecabf
Feat v4 floatbutton (#6294)
* feat: add float-button components

* fix type &  demo display

* fix components entry

* fix review bug

* fix bug

* fix .value
2023-03-02 10:59:44 +08:00
selicens 41a455f881
feat: add qrcode (#6315)
* feat: add qrcode

* fix: qrcode bug

* fix: qrcode value required

* refactor: props  deconstruct
2023-03-02 10:46:16 +08:00
zkwolf eda7247c2c
fix: inject value maybe undefined && tag style invalid (#6320)
* fix: inject value maybe undefined

* fix(tag): style invalid
2023-02-28 21:57:11 +08:00
tangjinzhou f85485e733 doc: add theme-editor 2023-02-28 16:47:38 +08:00
tangjinzhou a1e967dfc2 refactor: watermark type 2023-02-28 11:01:43 +08:00
Zev Zhu 6058ca5576
feat: add watermark (#6300)
* feat: add watermark

* feat: add watermark demo

* feat: add mutationObserver

* feat: add watermark demo
2023-02-28 10:35:10 +08:00
zkwolf dd063b8275
fix(dropdown): open invalid (#6316) 2023-02-28 10:25:46 +08:00
tangjinzhou 9c6a9fb47c fix: tag warning 2023-02-27 16:06:26 +08:00
tangjinzhou 516b2e5a0c refactor: rename _style to style 2023-02-27 16:00:05 +08:00
tangjinzhou d3a919b0bf chore: update style 2023-02-27 15:54:40 +08:00
tangjinzhou 261e7d0857 chore: update token error 2023-02-27 11:00:19 +08:00
tangjinzhou b393a0a2dd doc: refactor doc 2023-02-24 23:58:46 +08:00
tangjinzhou 2b80870461 doc: update doc 2023-02-23 21:42:41 +08:00
tangjinzhou 33a47bc27a chore: update build script 2023-02-23 17:20:38 +08:00
tangjinzhou 53b146ab88 refactor: remove not use code 2023-02-23 17:19:50 +08:00
tangjinzhou f3ffcdbc7e doc: update cover 2023-02-23 12:21:23 +08:00
tangjinzhou 37b5d02b6d fix: use open, remove visible 2023-02-23 11:58:23 +08:00
tangjinzhou 1b51e6ffb3 fix: directive not work 2023-02-23 10:01:30 +08:00
tangjinzhou f39d4894e4 refactor: form 2023-02-21 23:11:05 +08:00
一堆菠萝 975d70e7ed
fix: some type & doc (#6292)
* fix: typo (#6218)

* fix:  typo

* docs<upload>: docs update

* fix: type of minute in props disabledDateTime of DatePicker (#6233)

* docs: typo (#6256)

* feat: tooltip added overlayInnerStyle attribute

* Update abstractTooltipProps.ts

* Update Tooltip.tsx

---------

Co-authored-by: lyn <76365499@qq.com>
Co-authored-by: H1mple <35363759+baohangxing@users.noreply.github.com>
Co-authored-by: tangjinzhou <415800467@qq.com>
2023-02-21 14:10:35 +08:00
tangjinzhou c301c63e8b feat: radio add disabled context 2023-02-21 12:06:31 +08:00
果冻橙 e04f73dfef
refactor:radio (#6299)
* refactor:radio

* fix attrs
2023-02-21 11:33:54 +08:00
tangjinzhou 8fcb3fdfe3 refactor: drawer 2023-02-20 23:26:23 +08:00
tangjinzhou c7b15a96a8 refactor: image 2023-02-20 15:38:42 +08:00
tangjinzhou e8918ce589 refactor: auto-complete 2023-02-20 14:17:36 +08:00
tangjinzhou 62dda88ea0 refactor: cascader 2023-02-20 14:08:09 +08:00
tangjinzhou 3741931363 docs: update doc toc 2023-02-20 11:58:26 +08:00
tangjinzhou 7af22a70f9 perf: table 2023-02-20 11:15:17 +08:00
tangjinzhou 087dfa2f1b feat: tree-select add context size 2023-02-20 11:04:25 +08:00
果冻橙 799eeed346
refactor: tree select (#6296) 2023-02-20 10:32:25 +08:00
tangjinzhou 124aae72a4 feat: select add context size 2023-02-20 10:28:16 +08:00
果冻橙 39e5824699
refactor:select (#6295)
* refactor:select

* update doc

* delete useless
2023-02-20 00:17:22 +08:00
tangjinzhou 9df8317ece refactor: segmented #6286 2023-02-20 00:05:54 +08:00
selicens 62e7f94aba
feat: add segmented (#6286) 2023-02-18 16:16:44 +08:00
tangjinzhou 47385347ee refactor: tabs #6288 2023-02-17 23:14:26 +08:00
yang 6240ab2885
[tabs] :less to cssinjs (#6288)
* update

* switch

* Style adjustment

* refactor(Card): less to cssinjs

* tabs: less to cssinjs 开发ing

* add function cssinjs

* Eliminate irrelevant code

* Eliminate irrelevant code 2

* update components

* Eliminate irrelevant input  code
2023-02-17 22:08:24 +08:00
tangjinzhou 328e42a9be feat: tree add leafIcon 2023-02-17 22:02:59 +08:00
tangjinzhou 634675e032 refactor: rename locale file 2023-02-17 22:02:59 +08:00
果冻橙 7ddf882a99
Feat v4 fix type errors (#6285)
* fix compile type errors

* fix menuprops type import

* fix lint errors

* fix lint errors

* fix format error

* fix node version

* fix run dist error

* fix run lint

* fix as any

* fix string type
2023-02-17 22:01:30 +08:00
果冻橙 895b43338d
refactor:tree (#6276) 2023-02-17 10:04:45 +08:00
果冻橙 9f53d53cb8
refactor:timepicker (#6270)
* refactor:timepicker

* docs:update & refactor: timepicker type
2023-02-17 10:03:34 +08:00
果冻橙 cd47a277da
refactor:calendar (#6269)
* refactor:calendar

* docs:update
2023-02-17 10:02:38 +08:00
tangjinzhou adec5211f1 feat: table add expandColumnTitle slot 2023-02-17 09:49:21 +08:00
tangjinzhou a6a270b44a refactor: table 2023-02-16 19:23:44 +08:00
果冻橙 8472c25633
refactor:table (#6267)
* refactor:table

* docs:update & refactor: table type

---------

Co-authored-by: tangjinzhou <415800467@qq.com>
2023-02-16 07:44:48 +08:00
tangjinzhou c1ed77f67a feat: number add compactSize & disabledContext 2023-02-15 15:49:23 +08:00
果冻橙 df6a1fdb71
refactor:inputnumber (#6265)
* refactor:inputnumber

* docs:update & refactor: inputnumber type

---------

Co-authored-by: tangjinzhou <415800467@qq.com>
2023-02-15 15:37:49 +08:00
tangjinzhou 321989b9c2 feat: update collapse type 2023-02-15 15:33:54 +08:00
果冻橙 2f51f2d3af
refactor:collapse (#6266)
* refactor:collapse

* fix collapse props version

* docs:update & refactor: collapse type & fix collapsible
2023-02-15 15:28:52 +08:00
tangjinzhou dc9987aea8 fix: steps icon clss error 2023-02-15 14:34:11 +08:00
果冻橙 3715ded674
refactor:steps (#6264)
* refactor:steps

* fix ...attrs

* fix StepsToken error

* docs:update & refactor: steps type
2023-02-15 14:08:45 +08:00
tangjinzhou 04e3819b0b perf: timeline 2023-02-15 14:03:11 +08:00
果冻橙 587c1ca89d
refactor:timeline (#6263)
* refactor:timeline

* docs:update & refactor: timeline type
2023-02-15 13:52:47 +08:00
tangjinzhou 8a233d7c3a perf: upload motion 2023-02-15 13:38:57 +08:00
果冻橙 0464c84afc
refcator:upload (#6261)
* refcator:upload

* docs:update & refactor: upload type

* Update style.ts

---------

Co-authored-by: tangjinzhou <415800467@qq.com>
2023-02-15 10:19:49 +08:00
tangjinzhou 7e29eb2163 doc: update mentions demo 2023-02-14 15:50:16 +08:00
Zev Zhu 92795a828f
refactor: mentions (#6255)
* refactor: mentions

* refactor: mentions menu provider
2023-02-14 14:09:23 +08:00
tangjinzhou 44e5d09f22 style: update pagination props type 2023-02-14 14:06:14 +08:00
果冻橙 f6afd7fffc
refactor:pagination (#6251)
* refactor:pagination

* docs:update & refactor: pagination type
2023-02-14 14:02:22 +08:00
tangjinzhou 7de1be6a9a feat: checkbox add disabled context 2023-02-14 13:58:37 +08:00
果冻橙 19ec975deb
refactor:checkbox (#6248)
* refactor:checkbox

* docs:update & refactor: checkbox type
2023-02-14 13:49:06 +08:00
tangjinzhou 4ccb1c3e19 perf: transfer 2023-02-13 20:46:02 +08:00
果冻橙 68d295d7ef
refactor:transfer (#6247)
* refactor:transfer

* merge v4 branch & fix theme interface conflict

* docs:update & refactor: transfer type
2023-02-13 20:21:29 +08:00
果冻橙 bbfb3cef7d
refactor:carousel (#6262)
* refactor:carousel

* docs:update & refactor: carousel type

---------

Co-authored-by: tangjinzhou <415800467@qq.com>
2023-02-13 17:46:06 +08:00
tangjinzhou e9ce4eb2d5 refactor: card #6258 2023-02-13 17:35:49 +08:00
yang cb08f8551a
refactor(crad): less to cssinjs (#6258)
* update

* switch

* Style adjustment

* refactor(Card): less to cssinjs

* Eliminate invalid code

* optimization and adjustment css

* Adjust the css

* Optimize each item

* adjustment css
2023-02-13 17:21:48 +08:00
tangjinzhou f0e5da3b69 feat: slider deprecated tooltipVisible 2023-02-12 15:24:58 +08:00
果冻橙 2f049329a5
refactor:slider (#6250) 2023-02-12 15:00:38 +08:00
tangjinzhou 350dbfedbb docs: update result cover 2023-02-12 14:48:12 +08:00
bqy_fe 4b2ffd7127
refactor(result): less to cssinjs (#6246)
* refactor(result): less to cssinjs

* fix: class name is overridden
2023-02-12 14:44:50 +08:00
tangjinzhou a5389a22ea doc: update layout cover 2023-02-12 14:37:02 +08:00
bqy_fe 7a34c99935
refactor(layout): less to cssinjs (#6249) 2023-02-12 14:34:58 +08:00
songsong0707 dc480bd4b3
refactor: rate style (#6254) 2023-02-12 11:24:00 +08:00
tangjinzhou 1d774507c0 refactor: datepicker type 2023-02-12 11:18:49 +08:00
果冻橙 80918cba98
refactor:datepicker (#6245) 2023-02-12 10:37:06 +08:00
tangjinzhou 197e209b4e fix: typography #6244 2023-02-12 10:05:44 +08:00
果冻橙 82c4c8f0d3
refactor:typography (#6244)
* refactor:typography

* fix return

* fix import type
2023-02-12 09:56:57 +08:00
tangjinzhou 23b81b0e17 perf: space compact 2023-02-12 09:49:00 +08:00
bqy_fe f0649999fb
refactor(Space): less to cssinjs & add compact mode (#6229)
* refactor(Space): less to cssinjs & add compact mode

* chore(space): update md

* chore(space): add demo

* chore(space): add some demo

* feat(button): add compact mode

* fix: reactivity lose

* docs: fix props version

---------

Co-authored-by: tangjinzhou <415800467@qq.com>
2023-02-12 09:26:39 +08:00
lyn b695dc95e3
docs: typo (#6256) 2023-02-11 21:18:36 +08:00
tangjinzhou e2d4f8c2e3 feat: update type 2023-02-08 15:14:43 +08:00
果冻橙 de77b0175d
refactor:list (#6241)
* refactor:list

* fix inheritAttrs: false & attrs.class
2023-02-08 14:14:08 +08:00
果冻橙 26f98b7b10
refactor:statistic (#6240)
* refactor:statistic

* fix inheritAttrs: false & attrs.class
2023-02-08 14:11:53 +08:00
果冻橙 a9fbf98f0e
refactor:pageheader (#6239)
* refactor:pageheader

* fix inheritAttrs: false & attrs.class
2023-02-08 14:10:45 +08:00
果冻橙 fee7c04d67
refactor:comment (#6238)
* refactor:comment

* fix inheritAttrs: false & attrs.class
2023-02-08 14:09:32 +08:00
tangjinzhou 8658806e3f feat: input add disabled 2023-02-08 11:04:16 +08:00
果冻橙 4f3ce35e74
refactor:input (#6237)
* refactor:input

* fix inheritAttrs:false

* fix attrs.class
2023-02-08 07:50:04 +08:00
Zev Zhu 69c17dc255
refactor: switch (#6236)
* refactor: switch style

* refactor: delete switch style
2023-02-07 23:19:09 +08:00
H1mple bcc46d1d5d
fix: type of minute in props disabledDateTime of DatePicker (#6233) 2023-02-07 11:28:29 +08:00
tangjinzhou a40816880a refactor: progress #6234 2023-02-07 11:08:42 +08:00
Zev Zhu 2c1afa5e72
refactor: progress style (#6234)
* refactor: progress

* refactor: progress style

* fix: progress attrs
2023-02-07 10:25:02 +08:00
tangjinzhou 81e26a900e fix: empty props #6230 2023-02-07 10:06:05 +08:00
bqy_fe fc0f0d8a96
refactor(empty): less to cssinjs (#6230)
* refactor(empty): less to cssinjs

* chore: remove unuse code

* fix: reactivity lose
2023-02-07 09:57:31 +08:00
bqy_fe a205615af9
refactor(tag): less to cssinjs (#6227) 2023-02-03 09:50:40 +08:00
tangjinzhou 9b5a07220b refactor: popover & popconfirm 2023-02-02 22:18:42 +08:00
tangjinzhou 47c84cdbad refactor: dropdown 2023-02-02 22:18:42 +08:00
zkwolf 989bedda47
fix(button): link and text should not have wave (#6226) 2023-02-02 18:08:36 +08:00
Zev Zhu dd57d1e305
refactor: skeleton (#6224)
* refactor: skeleton

* refactor: skeleton style

* chore: modify skeleton demo style
2023-02-02 18:07:46 +08:00
zkwolf 158cca7f8a
test: test case error (#6225)
* fix: inject value maybe undefined

* fix: tootip emit correct value

* fix: rollback warning suffix avoid test break

* doc(grid): remove unused type="flex"
2023-02-02 18:05:58 +08:00
tangjinzhou 8099391e97 fix: spin error #6222 2023-02-01 17:33:59 +08:00
Zev Zhu 7939eb1718
refactor: spin (#6222)
* fix: typo (#6218)

* fix:  typo

* docs<upload>: docs update

* refactor: spin

* refactor: spin

* refactor: spin

* refactor: spinnn

* refactor: spin

---------

Co-authored-by: lyn <76365499@qq.com>
2023-02-01 17:17:56 +08:00
tangjinzhou 34373ca05d refactor: ts 2023-02-01 15:49:24 +08:00
tangjinzhou 4ef70b1503 doc: update demo 2023-01-31 22:49:08 +08:00
tangjinzhou 31776a2cf8 fix: row ts type not work 2023-01-31 22:37:36 +08:00
zkwolf 31ca070a18
refactor: grid (#6220)
* refactor: grid

* fix(grid): align & justify responsive

* chore: update demo and snapshot
2023-01-31 22:20:43 +08:00
lyn f49437f002
fix: typo (#6218)
* fix:  typo

* docs<upload>: docs update
2023-01-31 22:13:12 +08:00
tangjinzhou 1d01df4b85 refactor: tooltip 2023-01-30 22:28:00 +08:00
zkwolf 337d958c67
fix: custom class (#6217) 2023-01-29 14:50:30 +08:00
tangjinzhou 94e981e00b refactor: menu 2023-01-28 19:11:32 +08:00
tangjinzhou 221b203cbb refactor: modal 2023-01-28 10:02:40 +08:00
tangjinzhou dfe462ec6f refactor: locale-provider 2023-01-28 08:53:47 +08:00
tangjinzhou 8110d8cbbd refactor: rename locale 2023-01-28 08:39:47 +08:00
bqy_fe c903de3c0e
refactor(icon): remove style dir (#6215) 2023-01-28 08:25:17 +08:00
bqy_fe 44d7917afd
refactor(divider): less to cssinjs (#6214)
* refactor(divider): less to cssinjs

* fix: add inheritAttrs
2023-01-28 08:22:49 +08:00
tangjinzhou 73ce708868 refactor: message & notification 2023-01-27 22:36:28 +08:00
tangjinzhou d211688059 fix: responsive reactive #6213 2023-01-27 16:54:13 +08:00
zkwolf 9d5343ae9c
refactor: descriptions (#6213)
* refactor: descriptions

* fix: ts error

Co-authored-by: tangjinzhou <415800467@qq.com>
2023-01-27 16:46:58 +08:00
tangjinzhou 2d54e2124f fix: type error 2023-01-27 16:29:47 +08:00
tangjinzhou b5d7d582cd refactor: configprovider 2023-01-27 16:00:17 +08:00
tangjinzhou 0399ce0ec7 style: update util 2023-01-26 22:14:20 +08:00
tangjinzhou 94c2887c81 fix: button classname error 2023-01-26 22:13:01 +08:00
tangjinzhou 75e4b72c21 refactor: button 2023-01-26 21:42:27 +08:00
tangjinzhou 287a8d0c4e refactor: Breadcrumb 2023-01-26 16:52:06 +08:00
tangjinzhou 1e4e3cb3b4 refactor: badge 2023-01-26 11:13:29 +08:00
tangjinzhou e64a19a05a refactor: backtop 2023-01-26 10:13:10 +08:00
tangjinzhou 6c735fee67 refactor: anchor & add items 2023-01-25 17:23:03 +08:00
tangjinzhou f8ddc430cf refactor: avatar 2023-01-25 16:39:56 +08:00
tangjinzhou 641714734a doc: update component cover 2023-01-25 16:22:35 +08:00
tangjinzhou 46862d749b refactor: affix support cssinjs 2023-01-25 16:16:25 +08:00
tangjinzhou 1f33babc89 feat: alert add action slot 2023-01-25 15:27:03 +08:00
tangjinzhou b2841a27ae refactor: cssinjs 2023-01-25 11:28:53 +08:00
tangjinzhou c0d7d041b4 refactor: cssinjs 2023-01-25 10:28:10 +08:00
tangjinzhou 10b52e0072 refactor: ccsinjs 2023-01-24 22:51:59 +08:00
tangjinzhou d64c6a8d53 Merge remote-tracking branch 'origin/main' into feat-v3.3 2023-01-17 18:39:55 +08:00
Nguyen Ba Hung 058bc3622a
doc: Add "format" prop for time-picker demo (#6197)
The `format` prop is used to format the display value of the time-picker.
Reference from AntDesign official docs: https://github.com/ant-design/ant-design/blob/master/components/time-picker/demo/hide-column.tsx
2023-01-17 16:55:16 +08:00
DMQ 034f71c005
fix: set the correct activce classname for stickyScrollBar (#6169) 2023-01-17 16:52:16 +08:00
lyn c8b7848f99
docs(date-picker): docs update (#6175)
* Update index.zh-CN.md

* Update index.en-US.md
2023-01-17 16:51:39 +08:00
tarasovsn 75c65e094f
Fixed some errors in generator-types (#6095)
Co-authored-by: starasov <starasov@sportmaster.ru>
2022-12-15 10:54:20 +08:00
M.Wang 8a0c8a8fb1
fix(vc-slick): #6100 - Fix content responsiveness in carousel component slot. (#6149)
* fix(vc-slick): #6100 - Fix content responsiveness in carousel component slot.

* feat(_util) add deepCloneElement function
2022-12-15 10:28:33 +08:00
Konv Suu 7ea18a8287
fix: notification onClose event runs repeatedly (#6150) 2022-12-11 14:49:02 +08:00
tangjinzhou 2eb071ce30 release 3.3.0-beta.4 2022-12-01 21:26:57 +08:00
lyn 5b3ade8980
docs(select): docs update (#6118) 2022-11-25 15:47:23 +08:00
tangjinzhou 6bd8a9b984 test: update snap 2022-11-25 09:55:31 +08:00
tangjinzhou 040956819f Merge remote-tracking branch 'origin/main' into feat-v3.3 2022-11-24 19:28:21 +08:00
luokavin 0fd3d302e4
docs(tree-select): docs typos (#6107) 2022-11-22 10:19:01 +08:00
luokavin 80a160d766
docs(tree-select): docs typos (#6108) 2022-11-22 10:18:35 +08:00
lyn cb80e40aa6
docs(pagination): docs update (#6114)
* Update index.zh-CN.md

* Update index.en-US.md
2022-11-22 10:18:13 +08:00
tangjinzhou 7246e62823 release 3.2.15 2022-11-10 11:42:58 +08:00
tangjinzhou 925a8f6ee5 fix: image delete error 2022-11-10 11:40:11 +08:00
tangjinzhou 7c35bcfece release 3.2.14 2022-11-07 15:57:27 +08:00
tangjinzhou fbf1c78cc8 doc: add backtop 2022-11-07 15:34:53 +08:00
tangjinzhou d484e1f6a0 fix: rangePicker popup pos, close #6073, #6074 2022-11-07 15:23:24 +08:00
tangjinzhou 7fa1fe428d feat: add vueuse feature 2022-11-07 13:42:51 +08:00
QiangGuZi ac9d3e40c1
fix: import type (#6071) 2022-11-07 11:03:05 +08:00
QiangGuZi 265233c34f
fix(directory-tree): expose scrollTo method. (#6067)
Co-authored-by: tan_qiang <tan.qiang@oushu.io>
2022-11-01 13:36:24 +08:00
tangjinzhou 639b746ba5 test: update test 2022-10-31 10:46:36 +08:00
tangjinzhou fcca4baefe test: menu test error 2022-10-31 10:18:19 +08:00
tangjinzhou 9eac1a1da5 fix: picker nest select error, close #6062 #5994 2022-10-30 21:45:59 +08:00
tangjinzhou 213c3a4059 fix: not use prefixCls with custom theme #6063 2022-10-30 15:05:36 +08:00
lchrennew 4cdda535a6
fix: Cannot use custom prefixCls with custom theme color (#6063) 2022-10-30 15:00:12 +08:00
tangjinzhou 5e60d7c3b0 doc: add surely form 2022-10-30 14:05:52 +08:00
tangjinzhou 7252149804 fix: error when menu key dynamic, close #6057 2022-10-28 09:07:44 +08:00
Remx Xu 2a30de162c
fix typo (#6047) 2022-10-28 08:58:35 +08:00
tangjinzhou e10b659aac docs: add survey 2022-10-27 11:20:00 +08:00
Li kang 4201c923b5
docs(Badge) Change the description of the text attribute of the Badge component document (#6012)
* 更改Badge组件文档text属性说明

* 更改Avatar组件文档crossOrigin属性说明

Co-authored-by: 吴亚丹 <wuyadan@uniontech.com>
2022-10-21 14:38:57 +08:00
大猪 a69a7ff82a
fix: Style variables describe error , close #6009 (#6027)
Co-authored-by: wanjun.shi <wanjun.shi@transsion.com>
2022-10-21 14:38:10 +08:00
lyn d0eebf3791
docs: Update index.en-US.md (#6040) 2022-10-21 14:36:33 +08:00
tangjinzhou d7f78435c1 chore: update vue tsc 2022-10-13 09:35:04 +08:00
24min bc5dc845ac
docs: remove one of openFileDialogOnClick props in docs (#6019) 2022-10-12 22:40:12 +08:00
tangjinzhou 7923c25e4f release 3.2.13 2022-10-08 14:36:33 +08:00
tangjinzhou aea54ac7ad fix: defaultXXX error in fieldNames, close #6007 2022-10-08 14:26:21 +08:00
tangjinzhou af756de1f3 test: update snap 2022-10-04 14:50:15 +08:00
tangjinzhou 775e48d428 fix: table fixed shadow error, close #5996 2022-10-04 11:15:12 +08:00
tangjinzhou 23a8368894 docs: fix site error, close #5993 2022-09-28 13:54:45 +08:00
tangjinzhou 714a6f4764 fix: transfer delete error, close #5975 2022-09-27 10:49:49 +08:00
tangjinzhou 8318b731b4 docs: update add accept info, close #5986 2022-09-26 22:15:38 +08:00
yang 31430f5365
feat: cascader add tagRender slot (#5954)
* Cascader :修复 tagRender 选项,并添加demo  🐛 📝
Cascader: Fix the tagRender option and add Demo 🐛 📝

* 修改 test 中等待时机

* Update index.tsx

* Update index.test.js

Co-authored-by: yang <29636098325@qq.com>
Co-authored-by: tangjinzhou <415800467@qq.com>
2022-09-26 22:06:52 +08:00
bqy_fe c2b197a443
fix(Table): loading prop type definition (#5964) 2022-09-26 21:34:34 +08:00
Garret MH a2f7d6d062
feat: Vue 3 Migration Build support (#5973), close #5765
closes vueComponent/ant-design-vue#5765

Add `compatConfig: { MODE: 3 }` to all component definitions to signal to `@vue/compat` not to use any Vue 2 compatibility features.
2022-09-26 21:33:41 +08:00
manny3 b35f63788d
fix: Tag component close icon display bug (#5956)
Co-authored-by: Tony <tony.chen@omnichat.ai>
2022-09-13 20:09:49 +08:00
tangjinzhou 0f634e27d5 fix: popover button style 2022-09-13 20:04:00 +08:00
24min 31800cb99c
fix: a flash of pictures when previewing was turned off (#5955) 2022-09-13 19:44:34 +08:00
tangjinzhou 6cd099d691 doc: add google ad 2022-09-13 11:13:39 +08:00
tangjinzhou 07907ca7f3 test: snap 2022-09-02 16:51:56 +08:00
tangjinzhou 3cb1edad41 release 3.2.12 2022-09-02 16:17:15 +08:00
tangjinzhou 24c4c84576 test: update snap 2022-09-02 16:16:03 +08:00
tangjinzhou 1177c336cb doc: add jeecg sponser 2022-09-02 14:37:20 +08:00
tangjinzhou 0f11e4ecd4 fix: descriptionsItem labelStyle not work, close #5920 2022-09-01 16:11:01 +08:00
atom d48cd8ef57
feat: copyable stopPropagation #5746 (#5769)
* 分离copyable按钮动作,不再冒泡至父级组件

* Update interactive.vue

Co-authored-by: tangjinzhou <415800467@qq.com>
2022-09-01 14:09:07 +08:00
舜岳 187f3b8c07
fix: fix table container z-index (#5786) 2022-09-01 14:03:53 +08:00
Peritot Chan 00422ac77b
fix: config provider theme active color not same in variable.less (#5929) 2022-09-01 11:03:29 +08:00
tangjinzhou b53a5de6dc doc: add jeecg sponsors 2022-09-01 10:43:28 +08:00
tangjinzhou 9815f817d4 fix: type import error 2022-08-28 09:00:25 +08:00
Airene Fang 6feda7be81
fix generate web-types.json bug (#5674)
set the wrong default value by parse md table error.
2022-08-25 11:07:49 +08:00
bqy_fe 2a3798e9b4
docs(form): fix typo (#5896) 2022-08-22 08:59:35 +08:00
bqy_fe ae451b71df
feat(props-util): [filterEmpty] support handle nested fragment (#5890) 2022-08-14 09:04:17 +08:00
tangjinzhou d933f3edd5 fix: table column null error, close #5888 2022-08-12 16:19:32 +08:00
tangjinzhou dd60465373 chore: update webpack confgi 2022-08-11 22:26:35 +08:00
tangjinzhou 60a8be3014 release 3.3.0-beta.3 2022-08-11 14:27:54 +08:00
tangjinzhou a26ac3e9f4 feat: rating character add params 2022-08-11 14:24:39 +08:00
tangjinzhou e7fdb128e3 Merge remote-tracking branch 'origin/main' into feat-v3.3 2022-08-11 14:12:39 +08:00
tangjinzhou fa53e89e51 doc: fix site error 2022-08-08 10:13:51 +08:00
tangjinzhou 1d6a8916cc release 3.2.11 2022-08-08 09:40:38 +08:00
tangjinzhou 8d0155878e Merge remote-tracking branch 'origin/main' into feat-v3.3 2022-08-07 20:03:09 +08:00
tangjinzhou 333c48c6ba fix: cdn dayjs error, close #5874 2022-08-07 15:10:53 +08:00
gp e79dd3508c
fix(inputNumber): inputNumber size UI error (#5873) 2022-08-07 14:10:00 +08:00
BlackTooth 3ca5209e0d
fix: select auto location (#5843)
* fix: select auto location

* fix: 3  Altitude location errors may occur

Co-authored-by: 隆杰 <longjie.li@taxsoyea.net>
2022-08-07 14:00:29 +08:00
tangjinzhou e5e98e5776 feat: add tooltip-border-radius 2022-08-06 17:16:11 +08:00
izhouteng b9000c891a
chore: add unified to devDependencies (#5839)
Co-authored-by: undefined <undefined>
2022-07-28 16:54:52 +08:00
BiggerRain 125a0f7636
docs: text error (#5845) 2022-07-28 16:52:56 +08:00
tangjinzhou 4c8131bd70 test: update snap 2022-07-25 08:41:38 +08:00
peritot 612c5000b5
docs: update alert & drawer doc in closeIcon default value (#5838) 2022-07-24 09:13:57 +08:00
meteorlxy 05357a8c3f
feat(Divider): add divider-horizontal-gutter variable (#5820) 2022-07-24 09:08:40 +08:00
舜岳 151555b7b7
doc(site): fix Login Form style (#5797) 2022-07-24 09:04:22 +08:00
tangjinzhou c739e498c5 perf: import icons #5822 2022-07-24 08:59:51 +08:00
tangjinzhou 86450c2a1b perf: import icons #5822 2022-07-24 08:56:44 +08:00
WD c40fec0afa
chore(site): upgrade vitejs to v3 (#5809) 2022-07-16 09:44:06 +08:00
tangjinzhou 6650c4d6b1 fix: dropdown text wrap, close #5798 2022-07-12 10:16:42 +08:00
tangjinzhou 8ef4d44787 release 3.2.10 2022-07-07 21:57:45 +08:00
tangjinzhou 6d83af53b5 test: update snap 2022-07-07 19:46:57 +08:00
tangjinzhou 3d77a1c1d4 test: update snap 2022-07-07 14:39:15 +08:00
tangjinzhou 36df585acf fix: menu hide when quicky hover 2022-07-07 10:24:19 +08:00
tangjinzhou 39e7b8f4b6 test: add require context 2022-07-07 10:07:54 +08:00
tangjinzhou 85b7741f3c test: update babel config 2022-07-07 09:50:56 +08:00
tangjinzhou b440215842 test: update jest config 2022-07-07 09:31:18 +08:00
tangjinzhou 73bd25cbbe style: fix lint code 2022-07-06 21:24:35 +08:00
tangjinzhou 7473233bc9 test: update focus test 2022-07-06 19:10:14 +08:00
tangjinzhou 9d210e3a30 fix: remove mock transition when test env #4565 2022-07-06 18:21:16 +08:00
tangjinzhou 901811bc43 chore: update jest to 28 2022-07-06 17:40:21 +08:00
tangjinzhou 9ea87fb973 release 3.3.0-beta.2 2022-07-02 22:28:43 +08:00
tangjinzhou dae579a88e chore: update tools 2022-07-02 22:22:01 +08:00
tangjinzhou 58e8fd3e2e doc: update changelog 2022-07-02 21:04:01 +08:00
Amour1688 aae9a48dd0
chore: bundle esm output (#5772) 2022-07-02 21:02:48 +08:00
tangjinzhou 09c5a3e53f Merge remote-tracking branch 'origin/main' into feat-v3.3 2022-07-02 21:01:41 +08:00
WD 985f1cfe1d
chore(build): set minimum running node version v12.22.0 (#5770) 2022-07-02 20:52:13 +08:00
tangjinzhou e42fdd7a06 Merge remote-tracking branch 'origin/main' into feat-v3.3 2022-07-02 09:54:19 +08:00
tys1128 7999a2fef6
fix: add boolean type to autosize prop (#5766)
Co-authored-by: oaktian <oak.tian@vesync.com>
2022-07-01 13:52:20 +08:00
WD a2690a2d45
chore: upgrade vitejs to the latest release version (#5760) 2022-07-01 13:51:21 +08:00
tangjinzhou f672f873dc fix: table ellipsis title not work, close #5755 2022-06-30 10:36:33 +08:00
zhengqbbb d94fe1c0b2
chore: use `czg` commitizen adapter (#5750) 2022-06-27 14:18:30 +08:00
tangjinzhou 4c0f6f5865 release 3.2.9 2022-06-25 09:42:30 +08:00
tangjinzhou 8a659da84f fix: select fash 2022-06-25 09:29:02 +08:00
tangjinzhou 3003d67c4f release 3.2.8 2022-06-24 11:23:36 +08:00
tangjinzhou 8b6a771318 Merge remote-tracking branch 'origin/main' into feat-v3.3 2022-06-24 10:52:47 +08:00
tangjinzhou 39ac6ed89e fix: typography editing error, close #5743 2022-06-24 10:41:15 +08:00
Gin bddf64e0ad
fix(DirectoryTree): `selectedKeys` updating (#5732)
- In `multiple` mode, it should emit single value instead of multiple values on single click.
2022-06-22 09:26:41 +08:00
tangjinzhou 62dc2402f3 feat: ConfigProvider.config add getPopupContainer 2022-06-21 14:51:23 +08:00
tangjinzhou b3dafb92ef doc: update select suffix demo, close #5701 2022-06-20 10:21:14 +08:00
tangjinzhou 9493dc224b fix: table resize trigger scrollbar 2022-06-20 09:26:56 +08:00
tangjinzhou cbd9e6b6ce fix: row gutter type error, close #5725 2022-06-20 09:09:32 +08:00
WD ab8457303e
fix(upload): inheritAttrs, close #5714 2022-06-18 21:48:00 +08:00
WD 168626bfeb
feat(Image): Image support mouse wheel zoom in and out (#5703), close #5700 2022-06-18 11:14:59 +08:00
tangjinzhou d9304506d3 doc: update doc 2022-06-16 10:08:04 +08:00
tangjinzhou bb4b86a82e feat: merge main 2022-06-13 11:07:06 +08:00
tangjinzhou 87121e2632 release 3.2.7 2022-06-13 10:43:20 +08:00
tangjinzhou e39edab75a fix: typography trigger twice end event, close #5696 2022-06-13 10:15:15 +08:00
tangjinzhou 599b474ab7 feat: table expandedRowKeys support v-model, close #5695 2022-06-13 09:37:53 +08:00
dyh333 09cb907bee
doc(carousel): using getImgUrl function in customPaging demo (#5679)
Co-authored-by: dingyihui <dingyihui@cmss.chinamobile.com>
2022-06-13 09:20:18 +08:00
sedice c87ecd7ffc
doc(site) make footer's z-index less than back-top's z-index (#5692) 2022-06-13 09:18:11 +08:00
tangjinzhou 033e55af5d test: update snap 2022-06-11 21:58:12 +08:00
tangjinzhou e5b9308374 fix: global form message not work, close #5693 2022-06-11 21:56:41 +08:00
bqy_fe 171b2b643f
feat(radio-group): support global component size prop (#5690), close #5688
* fix(radio-group): remove the default value of the component size prop

* update test
2022-06-11 13:38:46 +08:00
wengjq 87db9bd87d
fix: checkbox set additional attribute no work,close #5678 (#5682) 2022-06-08 15:59:21 +08:00
tangjinzhou fef42fd089 release 3.2.6 2022-06-07 20:22:56 +08:00
tangjinzhou 361e818bcc fix: cascader trigger support custom component, close #5677 2022-06-07 20:09:09 +08:00
tangjinzhou e86a833b15 doc: update doc, close #5675 2022-06-07 19:53:07 +08:00
tangjinzhou 3ddc7cdd7c fix: rangePicker xxxStep not work, close #5671 2022-06-07 10:47:51 +08:00
tangjinzhou 71c6195771 fix: datepicker arrow error 2022-06-07 09:52:47 +08:00
tangjinzhou e907ffd759 doc: update useInjectFormItemContext, close #5667 2022-06-06 09:50:33 +08:00
Gin 18ce00d239
fix: global `mousedown` handler in picker input hooks (#5657) 2022-06-03 14:28:44 +08:00
tangjinzhou 3cd7ca3e0b
Revert "Update vi_VN.tsx (#5653)" (#5660)
This reverts commit 387141ae68.
2022-05-31 15:12:25 +08:00
Ichiro 387141ae68
Update vi_VN.tsx (#5653) 2022-05-30 08:59:04 +08:00
tangjinzhou d5bb271dd8 doc: link error, close #5652 2022-05-28 14:21:03 +08:00
tangjinzhou 9b0fb707e2 release 3.2.5 2022-05-26 22:02:20 +08:00
tangjinzhou 2c2a372137 test: update snap 2022-05-26 21:55:56 +08:00
tangjinzhou ba8e17e1b5 fix: steps progressDot slot not work, close #5648 #5649 2022-05-26 15:03:26 +08:00
bqy_fe c7e079bd65
feat: enable the left or right keyboard to switch image (#5642), close #5630
* feat: enable the left or right keyboard to switch image

* fix: eslint error
2022-05-25 16:02:11 +08:00
Gin dead1a3753
fix: table dragging css class should only be effective in table component (#5644) 2022-05-25 16:00:13 +08:00
tangjinzhou 4f9b677555 fix: tooltip global getPopupContainer not work, #5636 2022-05-24 15:12:08 +08:00
tangjinzhou 44e1f020c8 fix: useForm style error, close #5635 2022-05-24 14:39:40 +08:00
tangjinzhou 9280b418d7
Merge branch 'main' into feat-v3.3 2022-05-23 14:30:18 +08:00
tangjinzhou 09ff91488c release 3.2.4 2022-05-23 11:00:37 +08:00
tangjinzhou efe600e89e test: update snap 2022-05-23 10:42:09 +08:00
tangjinzhou 8b34bdfa5e doc: add 3.3.0 changelog 2022-05-23 09:26:07 +08:00
Xavier Luo 3cbbba1020
fix(Tooltip): prefixCls and span line-height while in disabled Compatible (#5627) 2022-05-23 09:07:43 +08:00
tangjinzhou 3b1d48b4b4 test: update test 2022-05-22 21:45:48 +08:00
tangjinzhou dd1a535943 test: update test 2022-05-22 17:01:43 +08:00
tangjinzhou 5b583962db style: lint format 2022-05-22 16:39:57 +08:00
tangjinzhou 37d35f7801 feat: table add filterResetToDefaultFilteredValue & filterSearch funcion 2022-05-22 14:23:53 +08:00
tangjinzhou a4b6c0aee4 feat: transfer add status 2022-05-22 10:35:19 +08:00
tangjinzhou 03f559a0dc feat: tree-select add status & placement 2022-05-22 10:10:43 +08:00
tangjinzhou bf1226d3bb feat: timepicker add status & placement 2022-05-21 22:23:52 +08:00
tangjinzhou 527dec6078 feat: select add status & placement 2022-05-21 22:03:56 +08:00
tangjinzhou af9371fe6f style: tooltip 2022-05-21 17:44:43 +08:00
tangjinzhou 5c136e0286 style: tag 2022-05-21 17:40:52 +08:00
tangjinzhou a32d29149f style: tabs 2022-05-21 17:38:19 +08:00
tangjinzhou e6a46b43ac feat: add some less var 2022-05-21 17:31:39 +08:00
tangjinzhou 9d1e5d72b5 fix: Switch disabled color in dark theme 2022-05-21 17:27:32 +08:00
tangjinzhou 63a688f94c feat: steps add small dot 2022-05-21 17:25:20 +08:00
tangjinzhou 21f9a1178a feat: dd aria-* to Spin 2022-05-21 17:21:53 +08:00
tangjinzhou 76573fc252 refactor: rename slider js to ts 2022-05-21 17:14:41 +08:00
tangjinzhou 208c7ac6de feat: skeleton add block input 2022-05-21 16:51:10 +08:00
tangjinzhou 44be8722f8 refactor: radio context 2022-05-21 16:29:11 +08:00
tangjinzhou a435e2c090 fix: apply scale transform to disabled star 2022-05-21 15:52:09 +08:00
tangjinzhou 8475542b2f style: upload 2022-05-21 15:50:39 +08:00
tangjinzhou 40a65d19da feat: upload add crossOrigin 2022-05-21 15:23:45 +08:00
tangjinzhou 8ad9317d11 Merge remote-tracking branch 'origin/main' into feat-v3.3 2022-05-21 15:14:29 +08:00
tangjinzhou d9b3d8057f style: update statistic type 2022-05-21 15:06:02 +08:00
tangjinzhou 4439e0f3c3 feat: tree add scrollTo method, close #5626 2022-05-21 13:17:26 +08:00
tangjinzhou 5edca6be5a fix: countdown support dayjs value 2022-05-21 10:57:08 +08:00
tangjinzhou 13e1db0bc4 chore: type support vue@3.2.35 2022-05-21 10:56:28 +08:00
bowen fdf76b9fb9
fix: use fromPairs replace Object.fromEntries (#5605)
* fix: use fromPairs replace Object.fromEntries

* fix: use lodash-es replace lodash
2022-05-20 16:19:14 +08:00
bqy_fe bb85f1f372
fix(Drawer): closeIcon customization is invalid (#5616) 2022-05-20 16:18:31 +08:00
tangjinzhou 76585f75b9 style: popover & progress 2022-05-19 22:28:59 +08:00
tangjinzhou 3656dd5dbb style: pagination 2022-05-19 22:22:58 +08:00
tangjinzhou 7b60f2a8e6 style: page-header 2022-05-19 22:14:53 +08:00
tangjinzhou 5cf2707e11 feat: notification add top & bottom placement 2022-05-19 17:42:45 +08:00
tangjinzhou d716421745 feat: mentions add status 2022-05-19 17:34:41 +08:00
tangjinzhou c6f692222d Merge remote-tracking branch 'origin/main' into feat-v3.3 2022-05-19 17:20:31 +08:00
tangjinzhou 03c41177a3 fix: form clearValidate & resetValidate support array, close #5619 2022-05-19 17:13:06 +08:00
tangjinzhou c1a1b93553 style: update message 2022-05-19 16:38:19 +08:00
tangjinzhou 6e41fbd01f feat: inputnumber add status & upIcon & downIcon 2022-05-19 11:03:26 +08:00
tangjinzhou 093fa555ba feat: input add clearIcon & status 2022-05-18 22:51:45 +08:00
tangjinzhou e9d41efcec feat: add image progress 2022-05-16 14:56:35 +08:00
tangjinzhou d5348f0361 feat(row): add support for space-evenly 2022-05-16 14:51:48 +08:00
tangjinzhou e4f678f665 feat: add skipFlatten 2022-05-16 14:31:46 +08:00
tangjinzhou f00b9535d2 feat: dropdown add arrow 2022-05-16 10:57:15 +08:00
tangjinzhou a1ac22443e feat: drawer add rtl 2022-05-15 15:04:40 +08:00
tangjinzhou 4eb8088645 feat: datePicker add status & placement 2022-05-15 14:48:46 +08:00
tangjinzhou 353f470c11 style: config-provider 2022-05-15 10:28:34 +08:00
tangjinzhou 7a91110326 fix: global validateMessages no work, close #5599 2022-05-15 10:22:23 +08:00
tangjinzhou 73f7f9e3b9 style: update checkbox 2022-05-14 15:50:50 +08:00
tangjinzhou 5bc17f0578 feat: cascader add status & showCheckedStrategy 2022-05-14 15:40:17 +08:00
tangjinzhou dbe7fe78ce feat: autocomplete add status 2022-05-14 14:57:40 +08:00
bqy_fe 40be639b63
feat(select): support global size (#5590) 2022-05-12 09:50:12 +08:00
tangjinzhou 6e1f30666b refactor: form 2022-05-11 21:52:51 +08:00
tangjinzhou c4a61f210f feat: menu add itemsType 2022-05-11 09:58:23 +08:00
tangjinzhou 0244e7f5b4 refactor: Simplify Button Group Style 2022-05-10 16:18:44 +08:00
tangjinzhou 3aedf48eaf feat: Breadcrumb accessibility improvements 2022-05-10 15:48:14 +08:00
tangjinzhou 78045b4b5b fix: Badge Animation enter and leave in RTL 2022-05-10 15:43:23 +08:00
tangjinzhou 894a5b955c fix: BackTop responsive in RTL 2022-05-10 15:41:07 +08:00
tangjinzhou a8dbea7c32 style: update some code 2022-05-10 15:36:18 +08:00
tangjinzhou 1d08e80165 feat: anchor add activeLink arg 2022-05-10 15:35:44 +08:00
tangjinzhou ebc2082934 fix: menu support scoped style, close #5578 2022-05-10 14:26:24 +08:00
yvh d315b61418
fix: inputnumber v-model ts type (#5577)
这个命名不对再props上应该是on开头
2022-05-08 15:24:43 +08:00
SamnangNhum 9673cb3a1a
refactor(locale-provider): rename file km_HK to km_KH (#5571) 2022-05-06 09:14:11 +08:00
tangjinzhou e4a7411ede release 3.2.3 2022-05-05 14:08:03 +08:00
YuLe 2826ee1d04
Update introduce.en-US.md (#5564) 2022-05-05 10:13:38 +08:00
tangjinzhou 96caaa0769 fix: card empty slot render 2022-04-28 14:06:59 +08:00
tangjinzhou 7789cb2989 fix: table customRender fragment warning, close #5556 2022-04-28 10:49:16 +08:00
tangjinzhou 9aeadaf877 perf: tree, close #5551 2022-04-27 22:37:22 +08:00
tangjinzhou 53b4c5d8b2 doc: update tree-select doc 2022-04-26 21:32:23 +08:00
tangjinzhou 646f0c69b2 fix: modal method wrapClassName not work, close #5550 2022-04-26 17:14:03 +08:00
tangjinzhou c5159279ce fix: progress dashboard not work, close #5549 2022-04-26 11:29:37 +08:00
tangjinzhou ba041a767e release 3.2.2 2022-04-26 11:08:43 +08:00
tangjinzhou cb6d0bd411 fix: table loop problem, close #5543 2022-04-26 11:08:18 +08:00
tangjinzhou 04752880af doc: update drag demo 2022-04-25 14:24:03 +08:00
tangjinzhou 98867b36ae release 3.2.1 2022-04-25 10:33:27 +08:00
tangjinzhou c127bac6fe doc: update drag modal demo 2022-04-24 09:59:09 +08:00
tangjinzhou f081707576 doc: add drag modal 2022-04-23 17:24:53 +08:00
tangjinzhou dd69527946 doc: add drag modal 2022-04-23 17:19:48 +08:00
tangjinzhou 38d7408ecf feat: opti resize table handle 2022-04-23 15:43:54 +08:00
tangjinzhou 91527cbc25 fix: select trigger twice search, close #5537 2022-04-23 14:29:08 +08:00
tangjinzhou 0c879fc22d feat: select option add title 2022-04-23 13:28:00 +08:00
tangjinzhou c686bd2518 doc: update table custom filter demo, close #5529 2022-04-23 10:25:16 +08:00
tangjinzhou fc9b52e6e7 fix: ssr memory leak, close #5501 #5502 2022-04-23 09:48:03 +08:00
bqy_fe 04f3e0da21
fix(Table): expandFixed prop type definition (#5539),close #5535 2022-04-23 09:44:15 +08:00
tangjinzhou ab90e3fa08 style: update image code, #5531 2022-04-22 19:18:20 +08:00
bqy_fe bc3843b774
feat(Image): add previewMask prop (#5531)
* fix(Image): can not cancel previewMask

* remove redundant code

* remove redundant code

* update code
2022-04-22 16:22:36 +08:00
Freewayy 9b6e742f0c
docs(upload): update `showUploadList` prop (#5533)
* Update index.en-US.md

add `showDownloadIcon` option

* Update index.zh-CN.md

add `showDownloadIcon` option
2022-04-22 10:20:20 +08:00
tangjinzhou 728bfe69da style: remove not use code 2022-04-19 13:51:22 +08:00
tangjinzhou 722f3f2ebf release 3.2.0 2022-04-19 11:29:40 +08:00
tangjinzhou 7bbf6d5272 fix: remove valueModifiers 2022-04-19 11:28:21 +08:00
bqy_fe 3a7cb252e6
fix(Input): fix warning about failed setting prop size on input element (#5508)
* fix(Input): warning about failed setting prop size on input element

* omit size prop
2022-04-19 09:52:00 +08:00
tangjinzhou cddaf8cbc4 test: update snap 2022-04-14 16:25:13 +08:00
tangjinzhou 93c1d400c1 feat: datepicker add rangeQuarterPlaceholder 2022-04-14 16:17:59 +08:00
tangjinzhou a7da435079 fix: datepicker panels change, close #5488 2022-04-14 16:16:52 +08:00
tangjinzhou 531755ebea test: update snap 2022-04-14 14:20:37 +08:00
bqy_fe bd87079e12
feat(image): add new features (#5479)
* feat(image): add new features

* fix: lint error

* update test

* update code

* update docs

* perf: reset currentIndex after close

* update code

* update code

* update code

* update code

* update code

* add rootClassName props

* fix lint
2022-04-14 09:54:45 +08:00
Roubaozi 32a145a79f
doc: update tree switchIcon props type description (#5485)
Co-authored-by: xzp <xingzepeng@geo-compass.com>
2022-04-13 08:51:28 +08:00
tangjinzhou 7a050e2498 fix: table stickyscrollbar not show when keepalive change 2022-04-12 16:51:35 +08:00
tangjinzhou 8ad95e75c2 doc: update tree switchIcon, close #5484 2022-04-12 16:01:34 +08:00
tangjinzhou b3e31e1eba test: update snap 2022-04-12 14:38:05 +08:00
tangjinzhou d5270e9a9d fix: cascader auto adjust overflow, close #5482 2022-04-12 14:24:27 +08:00
tangjinzhou 6d2bcf0ab8 feat: cascader add clearIcon & removeIcon slot 2022-04-12 14:03:30 +08:00
tangjinzhou f1f6085dbb feat: inputnumber add lazy 2022-04-12 10:52:06 +08:00
tangjinzhou 278478b5b0 fix: tree data deep reactive, close #5480 2022-04-12 09:37:40 +08:00
tangjinzhou 6f8c75cd6d fix: timeRangePicker ts type support string 2022-04-11 21:12:25 +08:00
bqy_fe d645ad6eda
docs(modal): update type definition (#5478) 2022-04-10 09:36:03 +08:00
bqy_fe 23f56561e9
docs(layout): update type definition (#5477) 2022-04-10 09:35:40 +08:00
bqy_fe 2addaf35ac
docs(config-provider): remove redundant vertical bars (#5470) 2022-04-09 22:20:20 +08:00
bqy_fe 07940a4836
docs(typography): remove redundant props (#5471) 2022-04-09 22:20:09 +08:00
bqy_fe c0efc1e615
docs(text-area): fix markdown syntax issue (#5473) 2022-04-09 22:19:57 +08:00
bqy_fe 8fbdbb13a6
docs(rate): update type definition (#5474) 2022-04-09 22:19:46 +08:00
bqy_fe 4724c0415e
docs(upload): fix markdown syntax issue (#5475) 2022-04-09 22:19:32 +08:00
bqy_fe bb1ae396e0
docs(tag): update type definition (#5476) 2022-04-09 22:19:20 +08:00
bqy_fe eb29738cd8
docs(result): fix markdown syntax issue (#5469) 2022-04-09 22:17:18 +08:00
bqy_fe b4b2732133
docs(message): remove redundant props (#5468) 2022-04-09 22:16:56 +08:00
bqy_fe bfdc6749f9
docs(select): update type definition (#5467) 2022-04-09 22:16:25 +08:00
bqy_fe 4fc0fea5cd
docs(menu): update type definition (#5466)
* docs(menu): update type definition

* docs(menu): update type definition
2022-04-09 22:15:57 +08:00
bqy_fe 6e9cb0bd56
docs(dropdown): remove redundant periods (#5465) 2022-04-09 22:15:26 +08:00
bqy_fe 9b6bf4ac5f
fix(tabs): disabled animated when tabPosition is left/right (#5464)
* fix(tabs): disabled animated when tabPosition is left/right

* fix(tabs): disabled animated when tabPosition is left/right

* test: update test

* test: update test & position demo
2022-04-09 22:14:53 +08:00
bqy_fe 0c803216e5
docs(cascader): type definition (#5462) 2022-04-09 09:43:31 +08:00
bqy_fe 9b554c9295
docs(mentions): fix notFoundContent props type definition (#5461) 2022-04-09 09:42:53 +08:00
bqy_fe c9eb20f24b
docs(dropdown): make type definitions more beautiful (#5460) 2022-04-09 09:42:26 +08:00
bqy_fe e82e4bed3e
docs(descriptions): [API] fix type definition (#5459) 2022-04-09 09:39:39 +08:00
bqy_fe 4c83c64812
docs(descriptions): fix markdown issue (#5458) 2022-04-09 09:38:55 +08:00
bqy_fe babc85bc1b
docs(DatePicker): remove redundant square brackets (#5457) 2022-04-09 09:37:56 +08:00
bqy_fe 1ca0689233
doc: [API] remove duplicate props (#5456) 2022-04-08 19:19:10 +08:00
bqy_fe 34ebd55082
refactor(style): destructuring style change to array (#5451) 2022-04-08 10:04:31 +08:00
bqy_fe a41a9b086b
fix(modal): style prop support string constant (#5449) 2022-04-08 10:01:35 +08:00
tangjinzhou 74f77de5d0 release 3.1.1 2022-04-06 16:49:02 +08:00
tangjinzhou 7d9edbfde0 doc: update form demo 2022-04-06 16:48:23 +08:00
bqy_fe dd0653249d
fix(FormItem): append a trigger field to the rule type (#5439) 2022-04-06 16:11:26 +08:00
tangjinzhou 7c6dcba441 doc: update grid demo 2022-04-06 16:00:01 +08:00
tangjinzhou 4a4670bdce fix: virtual list not update height for dynamic data 2022-04-06 15:54:03 +08:00
tangjinzhou 48ade76046 doc: update 2022-04-06 15:54:03 +08:00
ajuner b68a395e33
docs: perf dark (#5440)
Co-authored-by: caijun <caijun@gumingnc.com>
2022-04-06 15:17:34 +08:00
tangjinzhou a7ea9bbe34 test: update snap 2022-04-06 10:48:46 +08:00
tangjinzhou 2e0f65926d doc: update doc 2022-04-06 10:12:47 +08:00
tangjinzhou 9e6a592cff test: update snap 2022-04-06 09:45:29 +08:00
tangjinzhou 6d14732e2a release 3.1.0 2022-04-06 09:25:44 +08:00
tangjinzhou 6222e43d7a release 3.1.0 2022-04-06 09:24:25 +08:00
tangjinzhou 272430ba06 fix: selectoption empty error 2022-04-03 10:00:48 +08:00
tangjinzhou 327489603f release 3.1.0-rc.6 2022-04-01 22:35:28 +08:00
tangjinzhou a154ecdfaf fix: mentions cannot select, close #5432 2022-04-01 22:20:10 +08:00
tangjinzhou fa76f5c480 fix: blur & focus lose argumnet, close #5434 2022-04-01 21:31:20 +08:00
anflower 0d06ce26ac
feat: Modify the warning in the conductutil file for attention (#5424) 2022-04-01 10:36:22 +08:00
tangjinzhou a298b00052 fix: sticky scrollbar show when init 2022-03-30 23:15:42 +08:00
tangjinzhou 9004644738 perf: table hover & stickyScroll 2022-03-30 22:38:19 +08:00
tangjinzhou 797a1c6c8f doc: update next to main 2022-03-30 19:36:12 +08:00
tangjinzhou ec177879ac fix: select option tootip error, close #5307 2022-03-30 10:26:27 +08:00
tangjinzhou 669b22a54b fix: tabs auto overflow error for addIcon 2022-03-29 12:59:15 +08:00
tangjinzhou 80342f40b3 release 3.0.0-rc.5 2022-03-28 15:21:30 +08:00
tangjinzhou afd74c95d8 fix: table sticky scroll bar not reactive 2022-03-27 10:34:00 +08:00
tangjinzhou 8e37ffbb97 doc: update demo 2022-03-27 10:33:18 +08:00
tangjinzhou def6a72a77 fix: form scrollToField not work form nest field, close #5404, #5407 2022-03-26 23:00:21 +08:00
tangjinzhou 00dc2add94
chore: update ts type (#5408)
* feat: update prop type

* feat: update ts type

* feat: update ts type

* feat: update ts type

* feat: update ts type

* test: update snap

* feat: update ts type
2022-03-26 22:52:54 +08:00
tangjinzhou 790f83f4a6 release 3.1.0-rc.5 2022-03-25 16:53:37 +08:00
tangjinzhou 3613eceff8 fix: select deep watch options, close #5398 2022-03-25 16:40:06 +08:00
tangjinzhou e146b4847d fix: menuItem custom icon lose custom class, close #5390 2022-03-24 23:57:43 +08:00
tangjinzhou e9ba9fe110 doc: update changelog 2022-03-24 22:34:48 +08:00
tangjinzhou 12588250d5 release 3.1.0-rc.3 2022-03-24 22:10:13 +08:00
tangjinzhou b0042ab40c feat: support change base-primary for cssvar 2022-03-24 22:09:20 +08:00
tangjinzhou e7fb72ce90 fix: Dropdown not auto adjust placement, close #5391 2022-03-24 21:19:35 +08:00
tangjinzhou 2feab99b89 fix: radio click trigger twice, close #5389 2022-03-24 14:07:41 +08:00
tangjinzhou 7bf1e0dda1 fix: menu selectedKeys & openKeys support deep watch 2022-03-23 22:07:06 +08:00
wengjq d137971e0a
fix(TimeRangePicker): disabledTime does not work (#5387) close #5383 2022-03-23 21:27:31 +08:00
tangjinzhou e81abe39ee fix: form htmlFor not work, close #5384 2022-03-23 17:28:04 +08:00
tangjinzhou 86e69d34d9 fix: upload limit error, close #5385 2022-03-23 16:53:37 +08:00
tangjinzhou ecab7f66d8 fix: rangePicker showTime disabled not work, close #5286 #5380 2022-03-23 11:04:12 +08:00
tangjinzhou 5724c84fe7 feat: update affix ts type 2022-03-23 10:02:24 +08:00
tangjinzhou 5d9afb7d1c fix: layout sidebar collapsed, close #5373 2022-03-21 14:38:26 +08:00
Amour1688 cec9414d5c
chore: support pnpm (#5367) 2022-03-20 21:19:31 +08:00
tangjinzhou 7127a5d816 perf: tree & treeselect #5365 2022-03-20 16:42:00 +08:00
tangjinzhou 96f508104c style: refactor vnode.js to ts 2022-03-20 10:57:44 +08:00
bqy_fe 414e7a1c56
fix: autocomplete custom children class not work
* refactor(v3/vc-selector/input): use composition api

* fix: change input props className to class

* revert with cloneElement

* fix: auto-complete demo custom test
2022-03-20 10:50:57 +08:00
tangjinzhou c86338542d style: checkbox.tsx #5363 2022-03-20 10:05:44 +08:00
tangjinzhou ecda0a1084 doc: remove log 2022-03-20 10:04:23 +08:00
Arron 47e218d7ab
fix(checkbox): onClick event triggered twice (#5363)
Co-authored-by: 张宏亮 <hongliang@yunshan.net>
2022-03-20 10:03:28 +08:00
tangjinzhou 17acda5655 release 3.1.0-rc.2 2022-03-19 15:31:00 +08:00
tangjinzhou 97a08423a1 fix: button loading animate not work, close #5360 2022-03-19 15:21:32 +08:00
tangjinzhou ea79779ab5 revert: select listItemHeight default value 2022-03-19 14:38:11 +08:00
ysex cc47bb66ea
fix: Update useDestroyed.ts (#5361)
destroyed should be true not false
2022-03-19 10:19:37 +08:00
tangjinzhou d1e2f4ff27 doc: update big-data demo 2022-03-18 20:54:53 +08:00
tangjinzhou bc5928ec42 perf: virtual list 2022-03-18 16:55:15 +08:00
tangjinzhou 9bd52d4ca0 release 3.1.0-rc.1 2022-03-18 10:31:24 +08:00
tangjinzhou 00551b6263 doc: update, close 5350 2022-03-18 09:43:00 +08:00
bqy_fe 120980cb5c
feat(components): export multiple components props (#5353) 2022-03-18 09:30:37 +08:00
tangjinzhou a2ecd5f48e fix: table column resize not work, close #5348 2022-03-17 22:07:58 +08:00
tangjinzhou ee6d489bf4 fix: formItem error repeat show, close #5349 2022-03-17 21:53:14 +08:00
tangjinzhou c69cf76d3c chore: update pkg 2022-03-17 16:48:31 +08:00
tangjinzhou 73ce0ca7ff test: update snap 2022-03-17 16:30:31 +08:00
tangjinzhou bac864ff83 doc: update table 2022-03-17 15:39:19 +08:00
tangjinzhou 625efff1fa fix: tooltip should work with loading switch 2022-03-17 15:10:28 +08:00
tangjinzhou 2b81a7213b fix: timeline custom color should work on antd icons 2022-03-17 14:56:09 +08:00
tangjinzhou ccf9a410ac style: some code 2022-03-17 14:50:13 +08:00
tangjinzhou 5c9aea8a19 feat: radio support number option 2022-03-17 14:42:03 +08:00
tangjinzhou 71e110036e feat: popover support empty slot 2022-03-17 14:02:07 +08:00
tangjinzhou 85197c4b50 feat: pagination add responsive 2022-03-17 13:51:08 +08:00
tangjinzhou 00cf241315 feat: update type 2022-03-17 11:15:33 +08:00
tangjinzhou f8cef206f3 doc: update menu 2022-03-17 11:14:54 +08:00
tangjinzhou 05ff353f5d feat: update locale i18 2022-03-17 11:14:19 +08:00
tangjinzhou 3814fc8f4e revert: useBreakpoint 2022-03-17 10:52:07 +08:00
tangjinzhou 67939d3399 perf: Improve List render perfermance when grid is undefined 2022-03-17 10:35:27 +08:00
tangjinzhou fa9f1f4f53 feat: layout sider support dynamic breakpoint 2022-03-17 10:32:58 +08:00
tangjinzhou adbc39bfbd style: some code 2022-03-17 10:24:49 +08:00
tangjinzhou 8f20fd514a feat: checkbox option support number 2022-03-17 10:23:58 +08:00
tangjinzhou 4b9fe8242e style: less typo 2022-03-17 10:23:09 +08:00
tangjinzhou 32ffd6bb32 doc: update icon demo 2022-03-17 10:21:04 +08:00
tangjinzhou d929217752 Fix Input.TextArea cut text logic when maxLength configured. 2022-03-17 10:19:18 +08:00
tangjinzhou ab26180635 feat: New theme less variable for Radio, Divider, Modal, Dropdown, Drawer. 2022-03-17 10:18:26 +08:00
tangjinzhou 4471520e35 fix: item error when not use in form, close #5343 2022-03-16 20:39:25 +08:00
tangjinzhou 1e8bbccdd2 doc: update ad 2022-03-16 09:08:13 +08:00
bqy eb6711f4f9
feat(components): [modal] export modalProps (#5340) 2022-03-15 23:02:49 +08:00
tangjinzhou a3149521bd doc: update doc 2022-03-15 22:47:33 +08:00
tangjinzhou 8f47732b45 style: lint code 2022-03-15 15:35:17 +08:00
tangjinzhou fe7ee5b9a4 release 3.1.0-rc.0 2022-03-15 15:32:47 +08:00
showkw 9b730ef5e2
fix: wave's custom prefixCls not working (#5334) 2022-03-15 14:39:11 +08:00
tangjinzhou a8d5dad362 revert: formItem errorlist animate 2022-03-15 14:34:25 +08:00
tangjinzhou 2b8bdf3b1d doc: update 2022-03-15 09:51:18 +08:00
tangjinzhou 2efe1af6b6 fix: row gutter ts type 2022-03-15 09:50:19 +08:00
tangjinzhou 9707506c5a doc: add theme demo 2022-03-14 16:40:25 +08:00
tangjinzhou 24ea3cd7f3 doc: update doc 2022-03-13 22:11:23 +08:00
tangjinzhou ed346d6251 doc: update doc 2022-03-13 22:10:21 +08:00
tangjinzhou f2e58b6225 chore: update compile script 2022-03-13 17:07:08 +08:00
tangjinzhou cf37535d22 test: update snap 2022-03-13 16:21:16 +08:00
tangjinzhou bf2ee6f5bd chore: update icons pkg 2022-03-13 16:10:39 +08:00
tangjinzhou 1750e163c0 style: style file name 2022-03-13 13:21:16 +08:00
tangjinzhou ac52955caf chore: remove webpack-filter-warnings-plugin 2022-03-12 23:14:32 +08:00
tangjinzhou 637310015e chore: update dist script 2022-03-12 23:00:23 +08:00
tangjinzhou 2bafbb104c test: update snap 2022-03-12 16:28:36 +08:00
tangjinzhou b3a0263c03 doc: add ad 2022-03-12 15:44:59 +08:00
tangjinzhou 21fd0c74e8 doc: update header & footer 2022-03-12 15:15:49 +08:00
tangjinzhou abc4894605 feat: tree add activeKey 2022-03-12 14:30:19 +08:00
tangjinzhou 5dd7a57734 fix: tree-select not disable parent cannot checked, close #5316 2022-03-12 13:35:23 +08:00
tangjinzhou f7e89998e9 fix: datePicker valueFormat log warning, close #5323 2022-03-12 11:00:36 +08:00
tangjinzhou ce00829d85 doc: submenu popupOffset, close #5312 2022-03-12 10:33:04 +08:00
tangjinzhou fc3bd1cba0 feat: select add filterSort virtual listHeight, close #5310 2022-03-12 10:16:27 +08:00
KaygNas fe4c3e60bf
fix(layout-sider): support layout-sider trigger slot (#5317)
* fix(layout-sider): support layout-sider trigger slot

* fix: sider trigger support slot

Co-authored-by: huangchengjie <huangchengjie@dm-ai.com>
Co-authored-by: tangjinzhou <415800467@qq.com>
2022-03-12 10:05:33 +08:00
tangjinzhou 87a0cd5a00 test: update input snap 2022-03-12 10:02:41 +08:00
tangjinzhou 2ee3d43534
Feat css var (#5327)
* style: affix & util

* feat(alert): add customIcon slot

* feat(anchor): ts type

* style: auto-complete

* feat: avatar add crossOrigin & maxPopoverTrigger

* style(backTop): v-show instead v-if

* style: badge

* style: breadcrumb

* feat: button add global size

* feat: update i18n

* feat: picker add disabledTime

* test: update snap

* doc: update img url

* style: fix Card tabs of left position

* doc: update cascader doc

* feat: collapse

* style: comment

* style: configprovider

* feat: date-picker add soem icon slot

* style: update descriptions style

* feat: add divider orientationMargin

* doc: update drawer

* feat: dropdown add destroyPopupOnHide & loading

* style: update empty

* feat: form add labelWrap

* style: update grid

* test: update grid snap

* fix: image ts error

* fix: mentions cannot select, close #5233

* doc: update pagination change info, close #5293

* fix: table dynamic expand error, close #5295

* style: remove not use

* release 3.0.0-beta.11

* doc: update typo

* feat: input add showCount

* feat: inputNumber add prefix slot

* style: update layout

* style: update list

* feat: add locale i18

* style: update locale ts

* style: update mentions

* feat: menu divider add dashed

* perf: menu

* perf: menu animate

* feat: modal method add wrapClassName

* style: update pageheader

* feat: update pagination ts

* feat: confirm add showCancel & promise

* doc: update popover

* style: update progress

* style: radio

* style: update rate、result、row

* feat: select add fieldNames

* feat: add skeleton button & input

* feat: spin tip support slot

* style: slider & space

* stype: update steps ts type

* style: update switch

* feat: table add tree filter

* test: update input sanp

* feat: table add filterMode...

* fix: tree autoExpandParent bug

* test: update input snap

* doc: tabs add destroyInactiveTabPane

* style: update tag

* style: update timeline & time-picker

* fix: Tooltip arrowPointAtCenter 1px shift bug

* feat: typography add enterEnterIcon triggerType

* doc: update tree-select

* fix: deps and TypeScript types

* style: udpate transfer

* style: update style

* doc: add colorScheme

* chore: add css var builg

* doc: sort api

* style: lint code

* doc: add css var

* test: update snap

* chore: add pre script

* chore: update lint

* perf: collapse animate

* perf: collapse tree

* perf: typography shaking when edit

* doc: update auto-complete demo

* fix: table tree not have animate

* feat: deprecated dropdown center placement

* feat: deprecated dropdown center placement

* test: update snap
2022-03-12 09:56:32 +08:00
tangjinzhou fdf7857f89 release 3.0.0-beta.13 2022-03-04 14:06:29 +08:00
tangjinzhou 4c786dd7a7 perf: motion 2022-03-04 11:50:11 +08:00
tangjinzhou 207c944e21 fix: datepicker cursor for date-fns, close #5302 2022-03-04 11:44:11 +08:00
tangjinzhou 7999cdecbf fix: carousel click error, close #5299 2022-03-04 11:31:22 +08:00
tangjinzhou 639a68521c release 3.0.0-beta.12 2022-03-02 14:13:41 +08:00
tangjinzhou 991fa776cf fix: upload height error, close #5298 2022-03-02 14:05:33 +08:00
tangjinzhou 55e0ad7f92 fix: menu horizontal mode shaking 2022-03-02 13:48:02 +08:00
tangjinzhou fe0fc8084f doc: update typo 2022-02-28 22:17:50 +08:00
tangjinzhou f0c770def0 release 3.0.0-beta.11 2022-02-28 22:11:43 +08:00
tangjinzhou f771a1aec0 style: remove not use 2022-02-28 22:00:38 +08:00
tangjinzhou be7a73a7e6 fix: table dynamic expand error, close #5295 2022-02-28 21:44:15 +08:00
tangjinzhou 78c436b990 doc: update pagination change info, close #5293 2022-02-28 19:34:40 +08:00
tangjinzhou f0bc380527 fix: mentions cannot select, close #5233 2022-02-25 22:34:51 +08:00
tangjinzhou c7492a0b59
Refactor carousel (#5292)
* refactor: carousel

* refactor: carousel

* style: update vc-slick path
2022-02-25 14:38:09 +08:00
tangjinzhou 5edc8cadca fix: slider type warning, close #5289 2022-02-24 10:38:02 +08:00
tangjinzhou 04baae5a57
Refactor upload (#5290)
* refactor: vc-upload

* refactor: vc-upload

* refactor: upload

* refactor: upload

* refactor: upload
2022-02-24 09:58:58 +08:00
tangjinzhou 3cf5d4fa43 feat: labelCol & wrapperCol types, close #5265 2022-02-18 21:37:44 +08:00
tangjinzhou 6056b751b6 release 3.0.0-beta.10 2022-02-18 16:33:30 +08:00
tangjinzhou 31c3a6f693 fix: tree-select cannot open issue, #5220 2022-02-18 16:15:05 +08:00
tangjinzhou ad06a9ee05 fix: dropdown contextmenu, close #5259 2022-02-17 22:06:30 +08:00
tangjinzhou 2ec21c95a7 test: update snapshot 2022-02-17 21:03:25 +08:00
tangjinzhou 2e0bfd1f01 doc: add carouse img 2022-02-17 21:02:21 +08:00
tangjinzhou d9cdfa67db fix: descriptions warning, close #5250 2022-02-17 19:32:38 +08:00
tangjinzhou 2d0e2b6899 fix: dateFns parse strict mode 2022-02-14 14:19:13 +08:00
tangjinzhou 91c6a28205 fix: dropdownMatchSelectWidth:false not close virtual scroll #5242 2022-02-14 10:14:16 +08:00
tangjinzhou 2b0adaf717 test: update snapshots 2022-02-14 09:29:01 +08:00
Wang JiangDi 43b218806a
doc: markdown format (#5240) 2022-02-14 09:21:39 +08:00
tangjinzhou 8f9875e518 fix: datefns & dayjs parse strict, close #5221 2022-02-13 11:10:07 +08:00
tangjinzhou 5d38b3cf8d chore: update dependencies, close #5239 2022-02-13 09:41:39 +08:00
tangjinzhou c615251136 doc: select add searchValue, #5236 2022-02-13 09:38:10 +08:00
Jelmer de Wit d12edaea6f
docs(image): add controlled preview demo (#5234) 2022-02-10 10:52:09 +08:00
tangjinzhou 34869eceb5 release 3.0.0-beta.9 2022-01-28 10:31:23 +08:00
tangjinzhou 23624679fe feat: add title prop for progress, close #4929 2022-01-28 10:10:56 +08:00
Steven R. Loomis 42e34a63ec
fix: remove auto title on progress span #4929 (#4956)
- also updated test cases

Fixes: https://github.com/vueComponent/ant-design-vue/issues/4929
2022-01-28 10:02:21 +08:00
tangjinzhou 037470e1d2 fix: block not work when small size, close #5219 2022-01-27 20:47:37 +08:00
tangjinzhou b952038db1 fix: tree-select enter error, close #5217 2022-01-27 17:07:23 +08:00
tangjinzhou 5cc603d84c doc: remove optionLabelProp, close #5212 2022-01-27 15:20:13 +08:00
tangjinzhou 53fa27771d feat: add optionLabel slot 2022-01-27 15:12:15 +08:00
tangjinzhou 5c23d97daf doc: add tree-select demo 2022-01-25 10:17:32 +08:00
tangjinzhou 95ce5f4eb1 doc: update doc 2022-01-25 09:38:36 +08:00
chaegumi 4846bd0f65
docs: update menu doc, add triggerSubMenuAction description (#5202) 2022-01-25 09:31:37 +08:00
tangjinzhou 6d4248d046 fix: drag treenode style 2022-01-23 15:31:28 +08:00
tangjinzhou d442db08eb refactor: wave 2022-01-23 14:48:27 +08:00
tangjinzhou 7657157586 style: remove not use file 2022-01-23 10:25:59 +08:00
tangjinzhou ae4085f7c0 style: remove not use file 2022-01-23 10:21:23 +08:00
tangjinzhou 3d2a80b3bb doc: add dropdownVisibleChange, close #5195 2022-01-22 14:55:36 +08:00
tangjinzhou 41fe8be1f6 perf: mobile scroll, close #5191 2022-01-22 14:19:36 +08:00
tangjinzhou 1418422bcf fix: input focus style error, close #5188 2022-01-22 11:09:49 +08:00
tangjinzhou 1d47959606 doc: update tabs demo 2022-01-21 23:46:55 +08:00
tangjinzhou b88d97a314 release 3.0.0-beta.8 2022-01-21 23:15:20 +08:00
tangjinzhou ab79b4b078 fix: tabs control mode not work, close #5180 2022-01-21 22:58:58 +08:00
tangjinzhou f0385d7c24
Refactor cascader (#5192)
* feat: tree

* refactor: select

* refactor: select

* refactor: select

* refactor: vc-tree-select

* refactor: tree-select

* refactor: tree-select

* feat: add showLeafIcon

* refactor: remove lod vc-tree-select

* feat: tree-select add tag-render

* refactor: cascader

* refactor: cascader

* refactor: cascader

* refactor: cascader

* fix: maxTagmaxTagPlaceholder not work
2022-01-21 21:58:10 +08:00
Small 7624d80abe
doc: add usage for vite (#5176), close #5169 2022-01-18 19:30:02 +08:00
zkwolf 62428b6df3
fix(table): responsive invalid (#5172)
* fix(table): reponsive invalid #5171

* docs(table): add reponsive demo
2022-01-17 10:47:04 +08:00
tangjinzhou 26f1b98728 feat: summary cell support inheritAttrs 2022-01-14 14:22:03 +08:00
tangjinzhou 10fed707f8 doc: update demo ts error 2022-01-12 23:51:18 +08:00
tangjinzhou 239354e313 fix: modal getContainer not work 2022-01-12 23:50:02 +08:00
tangjinzhou b62c1564ec feat: add some type export 2022-01-12 22:57:07 +08:00
tangjinzhou ce767f2e0d doc: update demo ts type 2022-01-11 23:30:47 +08:00
tangjinzhou b25c5cc28e fix: ts type error 2022-01-11 23:23:07 +08:00
menghan 9693e4b10b
fix:(modal): getContainer property invalid (#5147)
* fix:(modal): getContainer property invalid

* Update Modal.tsx
2022-01-11 16:03:09 +08:00
tangjinzhou dab6f90f81 release 3.0.0-beta.7 2022-01-10 10:29:48 +08:00
tangjinzhou f6d1b848e4 fix: modal cannot open in dropdown, close #5139 2022-01-10 10:23:17 +08:00
tangjinzhou 3d3dcd5c44 test: update snap 2022-01-10 10:22:55 +08:00
tangjinzhou 23f5fba013 feat: add formItemInstance type 2022-01-10 09:27:03 +08:00
tangjinzhou 7dda6e8e07 feat: update ts type 2022-01-09 22:50:29 +08:00
tangjinzhou 3297f7aa58 fix: modal esc not work 2022-01-07 21:41:00 +08:00
tangjinzhou 8013592e82 doc: update doc 2022-01-07 21:28:49 +08:00
tangjinzhou 7c9c95cc37 release 3.0.0-beta.6 2022-01-07 21:15:41 +08:00
tangjinzhou 615d7c7d32 doc: fix empty demo, close #5136 2022-01-07 19:02:28 +08:00
tangjinzhou dd0b0b2eb9 feat: date-picker support vshow, close #5132 2022-01-07 18:50:30 +08:00
tangjinzhou 98755f332c
refactor: modal (#5129), close #5096
* fix: can not scroll when close dialog #5096

* refactor: modal
2022-01-06 16:08:53 +08:00
tangjinzhou ab2df12cce doc: update document title, close #5121 2022-01-06 15:58:42 +08:00
tangjinzhou 0a5dbf3642 fix: virtual scrollBar not update, close #5124 2022-01-06 15:04:21 +08:00
tangjinzhou efa045ab9c doc: fix select range time issue, close #5125 2022-01-06 10:27:05 +08:00
tangjinzhou 3e8959ad22 fix: dropdown menu log warning, close #5127 2022-01-06 09:54:27 +08:00
tangjinzhou 81ab68f696 release 3.0.0-beta.5 2022-01-04 10:30:05 +08:00
tangjinzhou 5c90cc251e fix: space size=0 not work, close #5101 2022-01-04 09:51:23 +08:00
tangjinzhou 3fc7a050ec fix: component ts build error 2022-01-03 23:14:08 +08:00
tangjinzhou 5b20498792 fix: component ts type 2022-01-03 22:45:16 +08:00
tangjinzhou d71df4b3ba fix: component ts type 2022-01-03 22:23:24 +08:00
tangjinzhou b13756ffbe fix: time-picker type error #5109 2022-01-01 16:41:34 +08:00
tangjinzhou ad76bb678d
refactor: message & notification (#5113)
* refactor: notification

* refactor: message

* refactor: notification

* test: update message & notification test
2022-01-01 10:34:37 +08:00
ZhangQingyuan 8a3724ff89
docs(carousel): customArrows.vue zindex misspelled (#5099) 2021-12-30 09:37:10 +08:00
小叮当 1d33c51d24
docs: fix typos and uniform punctuation in migration v3 (#5098) 2021-12-30 09:29:29 +08:00
zhouxinyong f6725f86c2
docs: add @formily/antdv link (#5092) 2021-12-28 22:00:41 +08:00
tangjinzhou 2213d0ed62 release 3.0.0-beta.4 2021-12-28 21:57:54 +08:00
tangjinzhou 3c0979c5e4 doc: add form demo 2021-12-28 21:46:35 +08:00
tangjinzhou ed3740048a feat: form add noStyle 2021-12-28 21:41:07 +08:00
tangjinzhou ca2ad60aef fix: input type ts 2021-12-28 18:56:31 +08:00
tangjinzhou 26496ba0a9
refactor: checkbox (#5091)
* style: remove not use pkg

* refactor: vc-checkbox

* refactor: checkbox

* fix: radio type
2021-12-28 16:47:52 +08:00
Palm Civet 620214d536
docs: remove app.config.productionTip (#5084) 2021-12-27 22:21:36 +08:00
tangjinzhou 30bbd4c3b4 fix: inputnumber can not input min value, close #5083 2021-12-27 21:59:52 +08:00
tangjinzhou 41f4187593 release 3.0.0-beta.3 2021-12-27 15:46:45 +08:00
tangjinzhou e1613fa9d4 fix: select not scroll, close #5082 2021-12-27 15:40:48 +08:00
tangjinzhou 8b2b402f73 release 3.0.0-beta.2 2021-12-27 10:08:27 +08:00
tangjinzhou b265d75c9a fix: table first render width, close #5075 #4993 2021-12-27 10:02:18 +08:00
zkwolf 0bc1e0a620
fix(form-item): should not validate when not have name (#5081) 2021-12-27 09:41:43 +08:00
zkwolf 8beb37f64a
chore: remove deep-assign (#5079) 2021-12-26 23:14:09 +08:00
tangjinzhou 862a2b36e3 doc: udapte changelog 2021-12-24 21:47:50 +08:00
tangjinzhou 8526a7eb81 doc: udapte changelog 2021-12-24 21:43:21 +08:00
tangjinzhou 3791cfc37c release 3.0.0-beta.1 2021-12-24 21:35:36 +08:00
tangjinzhou c6ab969a96 doc: update api 2021-12-24 21:32:10 +08:00
tangjinzhou 9cfeace7f8 test: update test 2021-12-24 17:43:55 +08:00
tangjinzhou 47f1bb050b test: update snap 2021-12-24 16:57:29 +08:00
tangjinzhou e9c9fbae21 test: update test 2021-12-24 16:45:10 +08:00
tangjinzhou 73ebf4c518 feat: add global types for volar, close #5067 2021-12-24 16:16:44 +08:00
tangjinzhou b645f827d0 fix: tabpane name error 2021-12-24 16:08:51 +08:00
tangjinzhou 3ff4f6b926 fix: web-type.json lose, close #4860 2021-12-24 14:46:05 +08:00
tangjinzhou b6c1b3ed86 fix: tree render perf, close #5069 2021-12-24 14:15:10 +08:00
tangjinzhou 4e70c6dd77 perf: virtual list 2021-12-23 23:23:01 +08:00
tangjinzhou 7aae6f675c
doc: form add demo (#5070)
* doc: add form demo

* fix: form dynamic error

* doc: add form demo

* revert: formitem auto validate #4955

* fix: input not update when set undefined

* doc: add form demo

* fix: form validate for number tyope, close #5064

* fix: form validateMessages not work

* doc: add form demo
2021-12-23 22:00:14 +08:00
tangjinzhou 1c9cfd19e6 Merge commit 'cbbf9f8f' into next 2021-12-21 16:31:32 +08:00
tangjinzhou 72f82771f1 feat: export formInstance type 2021-12-21 16:13:53 +08:00
刘贺 cbbf9f8f51
docs: modify typos in migration v3 (#5057) 2021-12-20 21:47:14 +08:00
tangjinzhou 89435951ae feat: tabs overflow node support remove 2021-12-20 16:19:35 +08:00
tangjinzhou 02e6fecc6d fix: tabs not update, close #5056 2021-12-20 16:18:48 +08:00
tangjinzhou 5cc1bd715d refactor: input-number 2021-12-20 14:52:29 +08:00
tangjinzhou 246e1163bb refactor: input-number 2021-12-20 14:52:29 +08:00
tangjinzhou 2a47de6c57 refactor: input-number 2021-12-20 14:52:29 +08:00
tangjinzhou 384ea35ca7 test: update slider update 2021-12-20 14:52:29 +08:00
tangjinzhou 257f7f03b5 refactor: raf 2021-12-20 14:52:29 +08:00
tangjinzhou b77ca0eed7 release 3.0.0-alpha.16 2021-12-19 09:49:04 +08:00
tangjinzhou ebd52af454 refactor: form input css 2021-12-18 17:00:55 +08:00
tangjinzhou b02af565a6 fix: spin cause table pagination animation#5028 2021-12-18 16:19:21 +08:00
tangjinzhou a3799fb0ea doc: update readme 2021-12-17 21:53:55 +08:00
tangjinzhou 443640effa feat: customCell add column arg, close #5052 2021-12-17 21:23:56 +08:00
liweijie0812 79ea8918e5
doc: vite-plugin-components has been renamed to unplugin-vue-components (#5043) 2021-12-17 17:04:15 +08:00
tangjinzhou 46b216274f fix: cannot select when use custom prefixCls #5023 2021-12-17 16:59:50 +08:00
tangjinzhou 47066753ac test: update transition #5023 2021-12-17 16:23:11 +08:00
tangjinzhou ae9ab9c5b0 test: update transition #5023 2021-12-17 16:05:58 +08:00
tangjinzhou 9784b429f5 refactor: upload types, close #5047 2021-12-17 15:32:32 +08:00
tangjinzhou 06516ec60d fix: input earch icon 2021-12-16 22:55:28 +08:00
tangjinzhou 2c2c070663 perf: ts type, close #5044 2021-12-16 17:20:18 +08:00
tangjinzhou 18cc95fa30 fix: table warning for page, close #5029 2021-12-16 16:01:58 +08:00
tangjinzhou 66eb020ce1 fix: input textarea cursor pos error 2021-12-16 14:30:27 +08:00
tangjinzhou 31c8339315 fix: remove textarea maxlength support emoji 2021-12-16 09:36:27 +08:00
tangjinzhou af2e2683b4 fix: carousel touch warning, close #5040 2021-12-15 23:52:43 +08:00
tangjinzhou 9791231e63 test: update snap 2021-12-15 23:29:15 +08:00
tangjinzhou 883d6e21ad fix: menu custom class, close #5038 2021-12-15 23:22:14 +08:00
tangjinzhou 0ee974a3aa fix: input type 2021-12-15 22:59:00 +08:00
tangjinzhou 296a2e549a refactor: input 2021-12-15 22:27:07 +08:00
tangjinzhou 5543ce6add refactor: input 2021-12-15 20:48:24 +08:00
tangjinzhou 7ec6831508 refactor: input 2021-12-14 23:50:22 +08:00
zkwolf cd6c6ff048
fix(rate): global prefixCls invalid (#5026) 2021-12-13 15:52:20 +08:00
tangjinzhou 07ee749023 release 3.0.0-alpha.15 2021-12-12 17:05:56 +08:00
tangjinzhou 4204ff0736 test: update typography test 2021-12-12 16:49:31 +08:00
tangjinzhou b9ff4eabcc fix: ssr error 2021-12-12 16:47:30 +08:00
tangjinzhou 9d469fb2af perf: layout 2021-12-12 14:32:53 +08:00
tangjinzhou 8eb43a4848 fix: table ts type #5009
close #5009
2021-12-12 14:30:58 +08:00
tangjinzhou c685b46704 test: update snap 2021-12-11 22:52:56 +08:00
tangjinzhou 0f833cb536 fix: trigger multipe click #5002
本质原因应该还是 vue 问题,有待进一步定位
2021-12-11 22:51:12 +08:00
tangjinzhou 9c0464d072 perf: layout 2021-12-11 22:29:29 +08:00
tangjinzhou 6e5390cec4 doc: add version info 2021-12-11 17:28:50 +08:00
tangjinzhou bcc5ca40ec test: update snap 2021-12-11 15:36:38 +08:00
tangjinzhou d9cd6f2ba5 fix: slider tooltip hide error 2021-12-11 15:30:13 +08:00
tangjinzhou 7bc9c78d51 fix: trigger animate #5008
close #5008
2021-12-11 14:59:52 +08:00
tangjinzhou 7d7f0f326c feat: input & textarea support lazy dir #4951
close #4951
2021-12-10 16:29:04 +08:00
tangjinzhou 6c28a8e40c fix: formItem error explain style #5004
close #5004
2021-12-10 15:52:13 +08:00
tangjinzhou 8e207009b0 fix: menu hide animate lose 2021-12-10 00:02:12 +08:00
tangjinzhou fcd6add766 doc: submenu required key 2021-12-09 22:57:44 +08:00
tangjinzhou 95a1b4a964 perf: menu lazy render children #4812 2021-12-09 22:48:53 +08:00
tangjinzhou 30f87e6193 test: add snap 2021-12-08 14:59:26 +08:00
tangjinzhou 0a404e88b7 fix: formItem name type #4998
close #4998
2021-12-08 14:56:57 +08:00
24min ee3188a782
fix: a-statistic-countdown slots error (#4996)
* 🎈 fix countdown slot Bug

*  review change
2021-12-08 10:39:36 +08:00
tangjinzhou 3b1510b70e fix: radio cursor style #4997
close #4997
2021-12-08 10:26:23 +08:00
tangjinzhou 6f5730b8ac doc: update table ajax demo #4980
close #4980
2021-12-08 09:47:38 +08:00
tangjinzhou 5ed8f8686d fix: select placeholder support slot #4995 2021-12-07 22:23:36 +08:00
tangjinzhou 3bb093cb23 release 3.0.0-alpha.14 2021-12-05 14:28:51 +08:00
tangjinzhou 56a9b9a405 ci: fix ci error on npm 8 2021-12-05 14:18:08 +08:00
tangjinzhou b19c8dd650 style: prettier format 2021-12-05 01:06:31 +08:00
tangjinzhou 9ed73529a6 test: update test 2021-12-05 00:46:32 +08:00
tangjinzhou 698b684233 fix: select cannot scroll #4971
close #4971
2021-12-05 00:15:53 +08:00
tangjinzhou 75be0189d6 doc: add table faq #4970
close #4970
2021-12-04 14:49:03 +08:00
tangjinzhou bde57724b7 fix: collapse activeKey deepWatch #4969 2021-12-04 09:21:05 +08:00
tangjinzhou eea3fe9015 fix: rangePicker type error #4961
close #4961
2021-12-03 22:49:43 +08:00
tangjinzhou 6fad9ead9e fix: slider tipFormatter error #4954 2021-12-03 22:37:38 +08:00
tangjinzhou 5265440f76 feat: formate validateFields values #4964 2021-12-03 22:36:59 +08:00
ludd c07e3f0831
fix: Slider tipFormatter types (#4954)
* Update index.tsx

* Update index.tsx

* Update index.tsx

Co-authored-by: tangjinzhou <415800467@qq.com>
2021-12-02 21:42:48 +08:00
tangjinzhou 79ae8006a8 fix: form change value not trigger validate #4955
close $4955
2021-11-30 22:23:44 +08:00
tangjinzhou af54405381 fix: textarea not trigger blur event 2021-11-30 22:22:09 +08:00
根号三 fbabea9065
docs: name casing in doc (#4944)
* doc: convert the name of icon components to kebab-case

* doc: copy kebab cased icon name
2021-11-30 21:08:51 +08:00
芋头 4a80b556f8
feat: add xxxl grid col size for 4k&5k display (#4953)
* feat: add xxxl grid col size for 4k&5k display

* Update index.zh-CN.md

* Update index.zh-CN.md

* Update index.en-US.md

* Update index.zh-CN.md

Co-authored-by: undefined <undefined>
Co-authored-by: tangjinzhou <415800467@qq.com>
2021-11-30 21:07:50 +08:00
tangjinzhou 65fc82e105 fix: remove window 2021-11-29 17:53:09 +08:00
tangjinzhou 0dd60654c5 doc: update rice 2021-11-28 16:29:55 +08:00
tangjinzhou dfe590240f doc: update style 2021-11-28 16:16:20 +08:00
tangjinzhou e8a77eb3a9 doc: add surelyvue 2021-11-28 16:11:04 +08:00
tangjinzhou 0113abb6f6 doc: update changelog 2021-11-28 14:53:53 +08:00
John b336d3acca
docs: fix the incorrect version of antdv in codesandbox (#4942) 2021-11-28 14:52:01 +08:00
tangjinzhou 57469f4be8 release 3.0.0-alpha.13 2021-11-28 10:42:13 +08:00
tangjinzhou 96299c5812 fix: anchor fixed less #4931
close #4931
2021-11-28 10:14:12 +08:00
tangjinzhou cf4ab5470c fix: slide up animate #4909
close #4909
2021-11-28 10:00:17 +08:00
Candy 7df7d788f8
fix: useForm ruleRef undefined warning #4881 (#4882), close #4881
Co-authored-by: candychuang <candychuang@tencent.com>
2021-11-27 16:47:26 +08:00
tangjinzhou 8dfe7eed8b doc: update 2021-11-27 16:35:58 +08:00
tangjinzhou 7461188c60 doc: remove unuse code 2021-11-27 16:35:18 +08:00
tangjinzhou 95cae149c4 fix: button support disabled=false #4930
close #4930
2021-11-27 15:23:08 +08:00
tangjinzhou 61bf98e641 fix: useForm trigger watchEffect, close #4932 2021-11-27 15:17:22 +08:00
tangjinzhou 0ae5d7a324 doc: udpate i18n doc 2021-11-27 10:41:35 +08:00
tangjinzhou be9d448ec9 fix: tabs moreIcon not work #4928
close #4928
2021-11-27 10:04:37 +08:00
tangjinzhou fe54804b21 fix: table summary sticky position not work 2021-11-26 22:54:05 +08:00
tangjinzhou 8ade6ebce2 fix: table ts error #4912
close #4912
2021-11-26 22:39:25 +08:00
tangjinzhou b20865ffb6 fix: ts type error 2021-11-26 22:34:27 +08:00
tangjinzhou ddc34539a9 fix: drawer remove visible isRequired #4908 2021-11-26 21:54:40 +08:00
tangjinzhou bbfe451d5e fix: step type error #4908
close #4908
2021-11-26 21:48:35 +08:00
tangjinzhou 5ad66497e5 test: update snap 2021-11-26 19:15:35 +08:00
tangjinzhou 3a141b2e9b doc: update md plugin 2021-11-26 17:17:40 +08:00
tangjinzhou b07882d92f doc: add surely-vue 2021-11-26 16:58:10 +08:00
tangjinzhou 5398550d35 style: lint format 2021-11-26 14:55:28 +08:00
tangjinzhou e28168e0be chore: update lint & ts 2021-11-26 14:48:37 +08:00
tangjinzhou 51874d9cee release 3.0.0-alpha.12 2021-11-20 22:21:59 +08:00
tangjinzhou 7a64fe544d fix: table rowSelection error #4889 2021-11-20 22:08:30 +08:00
tangjinzhou 67066e2fb6 fix: treeSelect isLeaf not work #4883
close #4883
2021-11-20 21:45:28 +08:00
tangjinzhou 5af08c0904 fix: table rowSelection deep watch #4889
close #4889
2021-11-20 16:49:25 +08:00
tangjinzhou d129670882 fix: table rowSelection deep watch #4889
close #4889
2021-11-20 16:29:27 +08:00
tangjinzhou 3e05460d09 fix: rowSelection trigger visible warning #4885
close #4885
2021-11-20 16:06:56 +08:00
tangjinzhou 84b9ac5904 fix: treeSelect reset undefined not clear #4897
close #4897
2021-11-20 15:05:20 +08:00
tangjinzhou 876720f31b fix: timeRangePicker hide panel not work #4902
close #4902
2021-11-20 14:20:36 +08:00
tangjinzhou f5986a9cc9 doc: update switch #4906 2021-11-20 13:52:30 +08:00
tangjinzhou 3b3c71b3a0 doc: update table 2021-11-20 13:46:59 +08:00
litong534 74038a0f61
doc: Update search.vue (#4872)
add missing props
2021-11-20 13:28:59 +08:00
bobo leng 723785ef4e
docs: complete missing prop of checkbox (#4865)
* docs: complete missing prop of checkbox

* docs: complete missing prop of checkbox
2021-11-20 13:27:29 +08:00
tangjinzhou 042bf616f8 fix: some components miss type, close #4866 2021-11-10 10:06:59 +08:00
tangjinzhou cf9627e16d release 3.0.0-alpha.12 2021-11-09 14:47:17 +08:00
tangjinzhou 85eb1066a3 fix: type miss, close #4863 2021-11-09 14:36:15 +08:00
tangjinzhou 87a4007dd3 release 3.0.0-alpha.11 2021-11-08 22:48:02 +08:00
tangjinzhou 91dbc39bad fix: collapse animation not work, close #4856 2021-11-08 22:41:27 +08:00
tangjinzhou dc4275129b fix: Compatible with empty slots for bodyCell
#4855
2021-11-08 21:59:14 +08:00
John 45c0583426
doc: support CodeSandbox (#4861) 2021-11-08 19:10:20 +08:00
tangjinzhou c3400115dd release 3.0.0-alpha.10 2021-11-05 15:24:11 +08:00
tangjinzhou a61f7fdd11 doc: tree add accordion demo
close #4849
2021-11-05 15:10:30 +08:00
tangjinzhou 685460591d fix: tree not trigger loadData
close #4835
2021-11-05 14:39:42 +08:00
tangjinzhou 8f77208806 feat: tree add parent for event callback
#4849
2021-11-05 13:21:19 +08:00
tangjinzhou bbf1cc8a6f fix: breadcrumb.item click not work, close #4845 2021-11-05 09:51:44 +08:00
tangjinzhou 215a4d5752 doc: update form typos, close #4850 2021-11-05 09:41:56 +08:00
tangjinzhou 0ef6cc81b4 fix: checkbox not aligned center in group
close #4846
2021-11-05 09:21:40 +08:00
tangjinzhou bb2af2c730 Merge branch 'next' of github.com:vueComponent/ant-design-vue into next 2021-11-05 09:19:31 +08:00
萤火 61afa1571f
doc: Update automatic-tokenization.vue (#4847)
value 为数组类型,不是字符串类型
2021-11-05 09:12:40 +08:00
tangjinzhou 641afe1b34 fix: resizeColumn ts type error 2021-11-04 22:00:07 +08:00
tangjinzhou 6dfc8375c8 release 3.0.0-alpha.9 2021-11-03 16:34:24 +08:00
tangjinzhou fd02bcfb7b test: update snap 2021-11-03 16:32:15 +08:00
tangjinzhou e38e59d05a fix: multipe select can not separator content, #4844 2021-11-03 16:24:35 +08:00
tangjinzhou 80f9b9e8ac feat: select support fieldNames 2021-11-03 16:22:02 +08:00
tangjinzhou 3ce5046dd5 fix: form not trigger validate for inputnumber, close #4831 2021-11-02 21:33:58 +08:00
tangjinzhou 42afcbbfbc fix: tabs can not scroll at mobile, close #4828 2021-11-02 21:23:31 +08:00
tangjinzhou 9f5ac8d441 revert: some dulp val #4839 2021-11-02 17:11:30 +08:00
zkwolf 247032833b
fix(tree-select): checkable & selectable invalid (#4839)
Co-authored-by: tangjinzhou <415800467@qq.com>
2021-11-02 17:09:06 +08:00
tangjinzhou c57da055fc fix: raf type error 2021-11-02 17:06:42 +08:00
tangjinzhou 35bcec1e80 fix: tree-select selectable not work, close #4838 2021-11-02 17:04:34 +08:00
tangjinzhou 6f0dab1f72 fix: breadcrumb-item click type, close #4832 2021-11-02 16:38:17 +08:00
tangjinzhou 166bac62b4 test: update snap #4834 2021-11-02 16:21:33 +08:00
Yaro Shkvorets 8e15f126eb
fix: prevent <a> tag to be crawled 2021-11-02 16:17:20 +08:00
根号三 943a345a92
docs: fix typos in `Input` (#4830)
close: #4826
2021-11-02 16:08:36 +08:00
tangjinzhou a938bcb4de fix: requestAnimationFrame error in ssr, close #4833 2021-11-02 16:07:35 +08:00
tangjinzhou 7b03f8a739 release 3.0.0-alpha.8 2021-10-30 13:56:26 +08:00
tangjinzhou 26b07115cd fix: ts type error, close #4823 2021-10-30 13:54:04 +08:00
tangjinzhou fdc2012b90 release 3.0.0-alpha.7 2021-10-29 17:08:10 +08:00
tangjinzhou fbd9a21dc8 feat(tree): add expose some state, close #4820 2021-10-29 16:47:25 +08:00
tangjinzhou c16a5d46ae doc: carousel demo, close #4821 2021-10-29 15:33:30 +08:00
tangjinzhou 75e53514dc test: update snap 2021-10-29 15:29:29 +08:00
tangjinzhou c8617dc9ee fix: table resize handle line color, close #4813 # 2021-10-29 15:28:59 +08:00
tangjinzhou a5604bb967 fix: tree-select not update when empty 2021-10-29 14:50:25 +08:00
tangjinzhou a5779f2d18 feat: add form onValidate, close #4817 2021-10-29 10:22:35 +08:00
tangjinzhou 42cc616ed3 fix: table column resize for scroll, close #4811 2021-10-27 16:31:53 +08:00
tangjinzhou 15d4b2eb2c doc: add tree-select highlight demo, close #4809 2021-10-27 16:30:30 +08:00
tangjinzhou 6b4a1c8f61 release 3.0.0-alpha.6 2021-10-27 15:00:13 +08:00
tangjinzhou abcc545484 test: update snap 2021-10-27 14:59:36 +08:00
tangjinzhou 1272457517 feat: add resize table column 2021-10-27 14:58:55 +08:00
tangjinzhou 17a1ca5edf release 3.0.0-alpha.5 2021-10-26 21:22:50 +08:00
tangjinzhou a9f6365d78 doc: add sticky demo 2021-10-26 18:11:16 +08:00
tangjinzhou 7fbb0a0947 fix: table sticky error, close #4808 2021-10-26 18:10:47 +08:00
tangjinzhou 9322965027 perf: table, close #4787 2021-10-26 17:48:54 +08:00
tangjinzhou 816665f935 test: update snap 2021-10-26 16:51:14 +08:00
tangjinzhou 40f361fe1f fix: table sticky type error, close #4804 2021-10-26 16:46:32 +08:00
tangjinzhou 7e9e5af63f fix: table emptyText locale not work, close #4805 2021-10-26 16:44:10 +08:00
tangjinzhou a6d9d36343 fix: api components support locale, close #4780 2021-10-26 16:12:56 +08:00
tangjinzhou c76b46fa1a style: remove not use file 2021-10-25 17:36:41 +08:00
tangjinzhou 333331a11c feat: dropdown support text type, close #4802 2021-10-25 17:00:04 +08:00
tangjinzhou 40d08f73bb fix: tree fieldNames for key error, close #4790 2021-10-25 16:40:08 +08:00
tangjinzhou f6868abbdb fix: menu throw error at mobile, close #4794 2021-10-25 16:02:53 +08:00
tangjinzhou 7d67e0e7f2 fix: sueForm support dynamic rule, close #4799 2021-10-25 15:00:41 +08:00
tangjinzhou 4fc7c1666a doc: update 2021-10-25 14:59:49 +08:00
tangjinzhou 0373e3d523 doc: update 2021-10-25 09:42:36 +08:00
hyw123456 d41d7a610c
fix(typescript): Table type modification (#4781)
vite build error: Wrong type
2021-10-21 21:26:10 +08:00
Recovery f2994c8fcc
docs: pass isZhCN prop to PrevAndNext (#4786)
Co-authored-by: chengcq <chengcq@getui.com>
2021-10-21 21:25:22 +08:00
tangjinzhou 8fc4d7ac9c doc: udpate changelog 2021-10-20 10:16:49 +08:00
tangjinzhou 80fe6953ce bump 3.0.0-alpha.4 2021-10-20 09:53:51 +08:00
zkwolf d7a124c59d
docs: update tree-select doc and fix typo (#4766)
* docs: update tree-select doc and fix typo

* docs(tree-select): fix fieldNames description
2021-10-18 16:18:42 +08:00
tangjinzhou f0f71787c7 doc: uddate table 2021-10-18 15:30:09 +08:00
tangjinzhou 3a968fdd33 perf: use shallowRef 2021-10-17 21:31:34 +08:00
tangjinzhou 3f71a14874 doc: update qrcode 2021-10-17 09:55:46 +08:00
tangjinzhou 73d68b9040 doc: update qrcode 2021-10-17 09:50:26 +08:00
tangjinzhou bb03efcf7a release 3.0.0-alpha.3 2021-10-14 15:45:39 +08:00
tangjinzhou 98b5e5d53f fix: popover & popconfirm auto placement, close #4767 2021-10-14 11:04:27 +08:00
tangjinzhou 7638d3cc69 fix: table reactive error, close #4756 2021-10-14 10:46:13 +08:00
tangjinzhou bd0bc086c1 fix: table reactive error, close #4756 2021-10-14 10:42:35 +08:00
tangjinzhou f64d7adb22 fix: table sort tooltip npt work 2021-10-10 10:37:59 +08:00
btea 350242129e
chore: revise prettier command (#4742) 2021-10-09 09:59:17 +08:00
btea e87f80bce3
doc: start-up site show network (#4741) 2021-10-09 09:57:18 +08:00
tangjinzhou 9536fdd157 Merge branch 'next' of github.com:vueComponent/ant-design-vue into next 2021-10-08 10:28:57 +08:00
tangjinzhou 21de9fb209 chore: add security, close #4676 2021-10-08 10:28:38 +08:00
ajuner a00ef07cd8
docs(drawer): update desc (#4738) 2021-10-08 10:11:20 +08:00
tangjinzhou c4f6eb603e fix: process.nextTick #4737 2021-10-08 09:54:01 +08:00
tangjinzhou cc0a53c191 doc: udpate drawer demo 2021-10-07 22:26:31 +08:00
tangjinzhou b78ccde9d9 release 3.0.0-alpha.1 2021-10-07 22:13:56 +08:00
tangjinzhou 8323952cfd chore: lock esbuild version 2021-10-07 17:49:26 +08:00
tangjinzhou 5f02f0c90d test: update snap 2021-10-07 17:42:31 +08:00
tangjinzhou ac70da19f5 fix: tree fieldNames error #4726 2021-10-07 15:22:34 +08:00
tangjinzhou 62c6f0e0d0 fix: directory tree fieldsname error #4726
close #4726
2021-10-07 13:27:43 +08:00
tangjinzhou 75cf264040
refactor: tabs & card (#4732)
* refactor: tabs

* refactor: tabs

* fix: tabs hotreload error

* refactor: rename useRef

* feat: add leftExtra rightExtra

* refactor: tabs

* test: update tabs test

* refactor: card

* doc: update tabs demo

* refactor: add card style

* style: update vue dep
2021-10-07 09:23:36 +08:00
tangjinzhou 022a3ce795 fix: notification style error, close #4703 2021-10-03 14:05:02 +08:00
tangjinzhou a5a3411c28
refactor: drawer (#4725)
* refactor(drawer): use compositionAPI

* refactor(drawer): update

* refactor: update

* chore: update

* docs: update

* fix: remove transitionStr

* chore: use useConfigInject

* refactor: drawer #4708

Co-authored-by: ajuner <106791576@qq.com>
2021-10-03 13:30:50 +08:00
tangjinzhou 4fe3c7a919 Merge branch 'next' of github.com:vueComponent/ant-design-vue into next 2021-10-02 10:09:32 +08:00
tangjinzhou cf002d8f47 chore: update slash 2021-10-02 10:00:22 +08:00
renovate[bot] d79460ff55
chore(deps): update dependency vue-clipboard2 to v0.3.3 (#4642)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2021-10-02 09:13:56 +08:00
renovate[bot] 71b5c43252
fix(deps): update dependency async-validator to v4 (#4493)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2021-10-02 09:10:44 +08:00
renovate[bot] 5c7ccf3b8d
chore(deps): update dependency axios to ^0.22.0 (#4723)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2021-10-02 09:06:21 +08:00
tangjinzhou 1fb40a31e4 fix: table pagination current error 2021-10-01 17:08:51 +08:00
tangjinzhou 1add0d251c fix: table pagination not reactive 2021-10-01 16:13:24 +08:00
tangjinzhou 1228e1d604 doc: fix tag demo error #4721 2021-10-01 15:18:45 +08:00
tangjinzhou 4021e89b15 feat: radiogroup support any label&value #4720 2021-10-01 15:10:20 +08:00
tangjinzhou 84341ef912 feat: radio support rtl #4720 2021-10-01 15:06:18 +08:00
ajuner cf3fe6b9e0
refactor(radio): use composition api (#4720)
* refactor(radio): use composition api

* docs: update

* chore: update

* docs: update

* Update Group.tsx

Co-authored-by: tangjinzhou <415800467@qq.com>
2021-10-01 14:53:37 +08:00
xrkffgg f653955c97
docs: add issues-helper badge (#4719)
* docs: add issues-helper badge

* Update README-zh_CN.md

* Update README.md
2021-10-01 14:06:02 +08:00
ajuner cb53a18f02
doc(transfer): docs & selectedKeys (#4717)
* refactor(transfer): docs & selectedKeys

* docs: update snapshot
2021-09-30 08:54:51 +08:00
renovate[bot] 5a9d7188b8
chore(deps): update dependency slash to v4 (#4697)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2021-09-25 22:34:45 +08:00
renovate[bot] e1c8a57efd
chore(deps): update dependency eslint-plugin-no-explicit-type-exports to ^0.12.0 (#4693)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2021-09-25 22:32:52 +08:00
renovate[bot] a1d7b972d2
fix(deps): update dependency @ant-design/colors to v6 (#4698)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2021-09-25 22:31:43 +08:00
renovate[bot] 9a16dcd6f2
chore(deps): update dependency @types/node to v14 (#4695)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2021-09-25 22:29:53 +08:00
tangjinzhou c219e71ae9 style: remove not use code 2021-09-25 22:19:39 +08:00
tangjinzhou 3a98c44356 doc: update table doc 2021-09-25 18:24:17 +08:00
tangjinzhou ba560a37fe style: remove not use mixins 2021-09-25 18:17:41 +08:00
tangjinzhou 3aeeeb2aed
3.0 ready (#4523)
* refactor: transfer、tooltip (#4306)

* refactor(transfer): use composition api (#4135)

* refactor(transfer): use composition api

* fix: remove console

* refactor(tooltip): use composition api (#4059)

* refactor(tooltip): use composition api

* chore: useConfigInject

* fix: remove useless

* style: format code

* refactor: transfer

* refactor: tooltip

Co-authored-by: ajuner <106791576@qq.com>

* Refactor mentions (#4341)

* refactor(mentions): use compositionAPI (#4313)

* refactor: mentions

* refactor: mentions

Co-authored-by: ajuner <106791576@qq.com>

* Refactor progress (#4358)

* fix: timepicker error border not show #4331

* fix(UploadDragger): fix UploadDrager no export (#4334)

* refactor(switch): support customize checked value #4329 (#4332)

* refactor(switch): support customize checked value #4329

* test: add test case

* refactor: update props name

* refactor: update ts

* refactor: optimize

* style: uncheckedValue to unCheckedValue

* test: update snap

* feat: udpate switch ts

* docs: remove ie11

* fix: tree-select throw error when use slot title

* fix: TypeScript definition of Table interface for typescript 4.3.5 (#4353)

* fix type for typescript 4.3.5

* Update interface.ts

close #4296

* fix: dropdown submenu style error #4351
close #4351

* fix(notification): 完善notification类型 (#4346)

* refactor(progress): use composition API (#4355)

* refactor(progress): use composition API

* refactor(vc-progress): update

* refactor: progress

* refactor: progress

* fix: timepicker error border not show #4331

* fix(UploadDragger): fix UploadDrager no export (#4334)

* refactor(switch): support customize checked value #4329 (#4332)

* refactor(switch): support customize checked value #4329

* test: add test case

* refactor: update props name

* refactor: update ts

* refactor: optimize

* style: uncheckedValue to unCheckedValue

* test: update snap

* feat: udpate switch ts

* docs: remove ie11

* fix: tree-select throw error when use slot title

* fix: TypeScript definition of Table interface for typescript 4.3.5 (#4353)

* fix type for typescript 4.3.5

* Update interface.ts

close #4296

* fix: dropdown submenu style error #4351
close #4351

* fix(notification): 完善notification类型 (#4346)

* refactor(progress): use composition API (#4355)

* refactor(progress): use composition API

* refactor(vc-progress): update

* refactor: progress

* refactor: progress

Co-authored-by: Jarvis <35361626+fanhaoyuan@users.noreply.github.com>
Co-authored-by: John <John60676@qq.com>
Co-authored-by: 艾斯特洛 <axetroy.dev@gmail.com>
Co-authored-by: zanllp <qc@zanllp.cn>

* docs: add changelog

* refactor: tree

* refactor: tree

* style: lint

* refactor: tree

* 热factor: tree

* refactor: tree

* refactor: tree

* refactor: tree

* refactor: directory tree

* refactor: tree

* refactor: tree-select

* refactor: tree-select

* refactor: tree-select

* refactor: tree-select

* refactor: tree-select

* style: lint format

* refactor: tree-select

* refactor: tree-select

* refactor: tree-select

* refactor: tree-select

* refactor: tree-select

* refactor: tree-select

* fix: upload ts error

* fix: update tree title render & switchIcon

* test: update tree test

* feat: add VirtualScroll tree

* refactor: datePicker & calendar & trigger (#4522)

* style: update

* test: update calendar test

* test: update test

* test: update test

* refactor: slider

* feat: update slider css

* refactor: slider to ts

* refactor: slider to ts

* perf: update default itemHeight

* test: update

* fix: uddate ts type

* fix: update skeleton

* fix: update skeleton

* refactor: update vc-pagination

* refactor: pagination

* refactor: timeline

* refactor: steps

* refactor: collapse

* refactor: collapse

* refactor: popconfirm

* refactor: popover

* refactor: dropdown

* doc: merge doc

* chore: vite for dev (#4602)

* style: js to jsx

* doc: add site

* style: lint

* style: format ts type

* doc: update

* style: format code

* style: format site

* doc: update

* style: dmeo

* style: format scripts

* chore: remove sub-modules

* chore: update vite

* site: add site build

* test: update snap

* doc(select): add tip (#4606)

* refactor: table (#4641)

* refactor: table

* refactor: table

* refactor: table

* refactor: table

* refactor: table

* refactor: table

* refactor: table

* refactor: table

* refactor: table

* fix: column not pass to cell

* doc: uppate table

* fix: update bodyCell headerCell

* doc: remove examples

* refactor: table

* fix: table title not work

* fix: table selection

* fix: table checkStrictly

* refactor: table

* fix: table template error

* feat: table support summary

* test: update snap

* perf: table

* docs(table): fix ajax demo (#4639)

* test: update table

* refactor: remove old table

* doc: update  table doc

* doc: update doc

* doc: update select

* doc: update summary

Co-authored-by: John <John60676@qq.com>

* doc: update doc

* fix: menu arrow not work

* test: update

* doc: add next site

* style: format

* doc: update

* doc: update site script

* fix: expand icon not fixed

* feat: use renderSlot

* test: update table snap

* feat: confirm support reactively

* feat: configProvider.config

* feat: message support configprovider.config

* feat: notification support configprovider.config

* doc: update doc

* fix: typescript compile error

* style: add import eslint

* doc: update demo

* chore: set transpileOnly true

* style: fix eslint error

* test: update snap

* doc: update

* test: mock date

* test: update snap

* chore: remove gulp-typescript (#4675)

* feat: V3 form (#4678)

* chore: update husky

* perf: update formItem

* perf: useInjectFormItemContext

* fix: table ts error

* doc: add Customized Form Controls demo

* feat: export useInjectFormItemContext

* doc: update form doc

* doc: update doc

* doc: update doc

* feat: autocomplete support option slot

* doc: update

* feat: add form item rest

* style: remove omit.js

* refactor: autocomplete

* doc: add changelog to site

* doc: update site anchor

* doc: update doc layout

* test: update table test

* doc: update

* chore: udpate gulp script

* chore: udpate gulp script

* doc: add changelog

* doc: update

* test: ignore some test wait vue-test-utils

* fix: form id error #4582
close #4582

* doc: add select Responsive demo

* doc: remove temp doc

Co-authored-by: ajuner <106791576@qq.com>
Co-authored-by: Jarvis <35361626+fanhaoyuan@users.noreply.github.com>
Co-authored-by: John <John60676@qq.com>
Co-authored-by: 艾斯特洛 <axetroy.dev@gmail.com>
Co-authored-by: zanllp <qc@zanllp.cn>
Co-authored-by: Amour1688 <lcz_1996@foxmail.com>
2021-09-25 16:51:32 +08:00
叡山电车 2e22b221c9
fix(select): mergedValue shouldn't modified by outValue (#4670) 2021-09-19 09:14:54 +08:00
tangjinzhou 2e5e146f0c chore: update ignorePlugin 2021-09-17 21:59:17 +08:00
tangjinzhou 5d990afe27 release 2.2.8 2021-09-17 16:45:02 +08:00
沈青川 7236fc253b
fix: ModalFuncProps types which can be string text (#4664) 2021-09-17 16:13:26 +08:00
叡山电车 27b258c29b
fix(useForm): immdiate validate doesn't work (#4646) 2021-09-15 15:14:46 +08:00
ajuner 3b8b19ea8c
fix: tree-select clear button render (#4655) 2021-09-15 13:31:59 +08:00
gitplus 2ce3f44403
fix(tag): prefixCls value (#4649) 2021-09-14 22:09:24 +08:00
叡山电车 752642afaf
fix(form): non-null predict for rulesRef (#4643) 2021-09-11 21:01:11 +08:00
undefined fc0589c48f Merge branch 'next' of https://github.com/vueComponent/ant-design-vue into next 2021-09-10 10:04:26 +08:00
undefined 741718a0f9 fix: autocomplete can not reset to undefined 2021-09-10 10:03:49 +08:00
Jérôme Prudent 4f36599458
feat: Support for patch method (#4637)
There is nothing HTTP speaking to prevent a multipart request with PATCH semantics.
2021-09-10 09:09:48 +08:00
叡山电车 a4d907a1bf
fix(Modal): type-definition error (#4632) 2021-09-09 17:02:02 +08:00
undefined d2b72143f0 fix: list gutter support array 2021-09-09 08:14:49 +08:00
tangjinzhou 4a28121b91 release 2.2.7 2021-09-08 22:11:28 +08:00
undefined 4c1347c24b fix: drawer jump bug #4609
close #4609
2021-09-08 21:48:35 +08:00
undefined 11498add8e fix: appcontext not work & function support #4627 2021-09-08 17:12:11 +08:00
Amour1688 9cd4783fd5
fix: typescript compile error (#4624) 2021-09-07 14:16:46 +08:00
undefined 3b08eee8c7 fix: ts error 2021-09-06 22:47:56 +08:00
undefined 44ae7f1b93 fix: dropdown menuitem danger not work #4618
close #4618
2021-09-06 21:26:43 +08:00
tangjinzhou c213c83844
fix: nest table throw error #4600
close #4600
2021-09-01 14:23:59 +08:00
xrkffgg 8c122c7ca5
ci: create issue open check 2021-08-31 20:04:20 +08:00
tangjinzhou 5c2eeb7d33 fix: type error 2021-08-29 14:09:15 +08:00
mehunk 83f85f240c
chore: add typescript version limit (#4587)
Co-authored-by: undefined <undefined>
2021-08-29 13:58:11 +08:00
tangjinzhou 3fd9f9ae71 fix: update EventHandlerNonNull to EventHandler 2021-08-29 10:44:24 +08:00
John 1f34aed666
fix: `imageProps` type #4583 (#4586)
close #4583
2021-08-28 16:39:40 +08:00
tangjinzhou 2b51d30c2e chore: add object-assign 2021-08-26 09:46:16 +08:00
tangjinzhou f3f3919c34 fix: remove transfer warning #4574 2021-08-26 09:44:02 +08:00
tangjinzhou 30a5f68fef chore: update compile config 2021-08-26 09:37:19 +08:00
tangjinzhou b3efecfab2 chore: update action config 2021-08-26 08:47:22 +08:00
tangjinzhou 285e05fc15 test: update transition test 2021-08-25 23:40:57 +08:00
tangjinzhou a58eaf5ea1 chore: update gulpfile 2021-08-25 23:07:11 +08:00
tangjinzhou 25cca73a31
chore: update prepublishOnly 2021-08-25 22:43:14 +08:00
tangjinzhou 381636f83c chore: update webpack dev server config 2021-08-25 09:58:58 +08:00
tangjinzhou 0d41aa929a feat: select option support number #4570
close #4570
2021-08-24 23:26:58 +08:00
CandyTong bd553de501
fix(auto-complete): cannot use configProvider prefixCls #4566 (#4569)
Co-authored-by: candychuang <candychuang@tencent.com>

close #4566
2021-08-24 23:00:31 +08:00
tangjinzhou c6c004ce8d fix: useForm support dynamic add rule #4498
close #4498 #4557
2021-08-24 15:22:43 +08:00
ajuner e9a44b9984
fix: remove zoom (#4555) 2021-08-22 21:39:24 +08:00
renovate[bot] 52df212c71
chore(deps): update dependency webpack-dev-server to v4 (#4543)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2021-08-20 08:28:42 +08:00
tangjinzhou 40f746e3e2 style: add warning form validateField #4536
close #4536
2021-08-18 20:57:51 +08:00
tangjinzhou 6ce295d490 fix: remove form warning in some case #4531 2021-08-18 20:26:07 +08:00
zkwolf baaccd574e
fix(switch): custom checkedChildren unexpected (#4528)
* fix(switch): custom checkedChildren unexpected

* Update index.tsx

Co-authored-by: tangjinzhou <415800467@qq.com>
2021-08-18 15:41:21 +08:00
mehunk c7abe76939
fix(mentions): chinese or japanese input error (#4524) 2021-08-18 08:36:28 +08:00
tangjinzhou af0620d14e feat: support overflowedIndicator slot #4515 2021-08-13 22:12:29 +08:00
tangjinzhou 6479864a6f release 2.2.6 2021-08-12 16:04:33 +08:00
Carter Li d0f03cae2a
fix(modal): allow Prop `getContainer` to be type of string & boolean (#4494) 2021-08-12 15:47:15 +08:00
tangjinzhou 9f15fe9fdf fix: add resize-observer-polyfill #4508
close #4508
2021-08-12 15:42:33 +08:00
tangjinzhou 8187d3a739 fix: rate slot character not work #4509
close #4509
2021-08-12 15:33:01 +08:00
tangjinzhou 4e14656ef1 fix: table expanded icon render error #4507 2021-08-12 15:11:40 +08:00
tangjinzhou 665e5919af release 2.2.5 2021-08-11 17:13:51 +08:00
tangjinzhou ccb24016c0 fix: select not scrollTo active position 2021-08-11 16:59:39 +08:00
tangjinzhou 01718e35ba fix: transition remove appearFromClass #4409 2021-08-11 16:41:23 +08:00
tangjinzhou 68c1f45501 feat: select support custom option by option slot 2021-08-11 15:22:49 +08:00
tangjinzhou 07f6d9edf0 docs: udapte changelog 2021-08-10 16:51:21 +08:00
tangjinzhou 1da679de34 release 2.2.4 2021-08-10 16:34:09 +08:00
tangjinzhou 3be5a422f2 release 2.2.4 2021-08-10 16:25:04 +08:00
tangjinzhou 0cd3db0bb0 fix: auto hide table scrollbar #4484
close #4484
2021-08-10 16:09:24 +08:00
tangjinzhou 08c3c9cc3b fix: symbol error 2021-08-10 15:21:13 +08:00
tangjinzhou f5849fad68 test: update snap 2021-08-10 14:39:47 +08:00
tangjinzhou 6f3fca48a1 feat: support vue@3.2 2021-08-10 14:36:28 +08:00
tangjinzhou 4135161173 fix: progress trailColor not work #4483
close #4483
2021-08-08 15:03:52 +08:00
tangjinzhou 257565b29d release 2.2.3 2021-08-07 10:02:41 +08:00
tangjinzhou 33f7b4850c fix: table fixed column not show dropdown 2021-08-07 09:26:24 +08:00
tangjinzhou 987c3872bf test: update table snap 2021-08-07 00:00:02 +08:00
tangjinzhou 38569c28c7 perf: table use sticky for fixed column 2021-08-06 23:27:54 +08:00
Zuobin Wang 4fed700e96
chore(all): delete useless Omit define (#4470) 2021-08-05 14:55:30 +08:00
tangjinzhou 524cc1382c style: collapse #4474 2021-08-05 14:50:49 +08:00
John 093f07c500
feat(vc-collapse): `key` support number type #4405 (#4474)
close #4405
2021-08-05 14:44:21 +08:00
tangjinzhou 881a796afd perf: statistic countdown 2021-08-05 14:36:50 +08:00
tangjinzhou 7665cbea01 fix: select can not scroll #4396
close #4396
2021-08-05 11:41:34 +08:00
zkwolf f35bafb88a
fix(tree-select): wrong title slot (#4459)
close #4457
2021-08-04 22:54:58 +08:00
tangjinzhou 1ed4923ea1 perf: update menu 2021-08-02 08:52:36 +08:00
tangjinzhou 386f3d003f perf: update menu 2021-08-01 23:31:28 +08:00
tangjinzhou 5bdd6f4007 fix: filter invalid form items #4435 2021-07-31 22:41:36 +08:00
zkwolf 5409ce545c
feat(input-password): accept global prefixCls (#4430) 2021-07-30 16:10:58 +08:00
Darma1106 903ac35aa7
perf: active tab color(#4241) (#4414)
close #4241
2021-07-30 16:09:24 +08:00
tangjinzhou e7e3aeb548 perf: remove chrome passive warning 2021-07-23 10:10:39 +08:00
xrkffgg fa5a6d87ff
ci: fix pr labeled user name 2021-07-19 13:10:05 +08:00
xrkffgg b00379744c
ci: create pr labeled 2021-07-19 13:08:00 +08:00
tangjinzhou a448e57475 test: update snap 2021-07-19 10:04:41 +08:00
tangjinzhou 002611752f fix: badge status error #4384
close #4384
2021-07-19 09:58:22 +08:00
xrkffgg 50503e5fc7
chore: Update issue-reply.yml (#4385) 2021-07-19 09:25:57 +08:00
tangjinzhou b5ab14df8d fix: formitem error when use native tag #4383
close #4383
2021-07-17 21:19:10 +08:00
John bea5df1541
fix(mentions): filterOption support boolean #4366 (#4376)
close #4366
2021-07-15 21:22:53 +08:00
tangjinzhou 2dc5bbbf43 fix: useForm type error #4372
close #4372
2021-07-15 21:20:00 +08:00
tangjinzhou 3da2b65fd8
Revert "chore(deps): update dependency husky to v7 (#4304)" (#4361)
This reverts commit cceac72267.
2021-07-13 13:59:06 +08:00
renovate[bot] cceac72267
chore(deps): update dependency husky to v7 (#4304)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2021-07-13 10:39:27 +08:00
tangjinzhou a758fb2a75 fix: empty error at jsx #4349
close #4349
2021-07-13 10:31:54 +08:00
tangjinzhou 39c866eb02 feat: useForm ts type 2021-07-12 10:00:10 +08:00
tangjinzhou cf60f9c46f release 2.2.2 2021-07-11 21:12:47 +08:00
zanllp 8ce46ab1a1
fix(notification): 完善notification类型 (#4346) 2021-07-11 14:46:45 +08:00
tangjinzhou c20c1f2a32 fix: dropdown submenu style error #4351
close #4351
2021-07-11 14:13:07 +08:00
艾斯特洛 fb94726a1e
fix: TypeScript definition of Table interface for typescript 4.3.5 (#4353)
* fix type for typescript 4.3.5

* Update interface.ts

close #4296
2021-07-11 10:00:52 +08:00
tangjinzhou 1152e8cd71 fix: tree-select throw error when use slot title 2021-07-08 11:36:32 +08:00
tangjinzhou 60aeec7033 docs: remove ie11 2021-07-07 22:16:13 +08:00
tangjinzhou cf2ffa2bd9 feat: udpate switch ts 2021-07-07 22:09:09 +08:00
tangjinzhou 292f5c9d75 test: update snap 2021-07-07 21:51:03 +08:00
tangjinzhou ffb52a2c40 style: uncheckedValue to unCheckedValue 2021-07-07 21:50:50 +08:00
John 427cf36eaa
refactor(switch): support customize checked value #4329 (#4332)
* refactor(switch): support customize checked value #4329

* test: add test case

* refactor: update props name

* refactor: update ts

* refactor: optimize
2021-07-07 21:35:41 +08:00
Jarvis 9e0244dfc3
fix(UploadDragger): fix UploadDrager no export (#4334) 2021-07-07 21:24:14 +08:00
tangjinzhou 203e42382f fix: timepicker error border not show #4331 2021-07-06 21:58:05 +08:00
tangjinzhou 16ee0dd2f1 fix: submenu animation lose #4325 2021-07-06 15:54:58 +08:00
tangjinzhou b7b433e98f release 2.2.1 2021-07-06 11:01:35 +08:00
tangjinzhou 761f6a6661 fix: datepicker trigger scroll in safari #4323 2021-07-06 10:40:11 +08:00
tangjinzhou 40c4b80f69 test: udpate space test 2021-07-06 10:07:48 +08:00
tangjinzhou e64fb33905 fix: space style error when not support flex 2021-07-06 10:02:26 +08:00
3523 changed files with 563848 additions and 136202 deletions

36
.antd-tools.config.js Normal file
View File

@ -0,0 +1,36 @@
const fs = require('fs');
const path = require('path');
const restCssPath = path.join(process.cwd(), 'components', 'style', 'reset.css');
const tokenStatisticPath = path.join(process.cwd(), 'components', 'version', 'token.json');
const tokenMetaPath = path.join(process.cwd(), 'components', 'version', 'token-meta.json');
function finalizeCompile() {
if (fs.existsSync(path.join(__dirname, './es'))) {
fs.copyFileSync(restCssPath, path.join(process.cwd(), 'es', 'style', 'reset.css'));
fs.copyFileSync(tokenStatisticPath, path.join(process.cwd(), 'es', 'version', 'token.json'));
fs.copyFileSync(tokenMetaPath, path.join(process.cwd(), 'es', 'version', 'token-meta.json'));
}
if (fs.existsSync(path.join(__dirname, './lib'))) {
fs.copyFileSync(restCssPath, path.join(process.cwd(), 'lib', 'style', 'reset.css'));
fs.copyFileSync(tokenStatisticPath, path.join(process.cwd(), 'lib', 'version', 'token.json'));
fs.copyFileSync(tokenMetaPath, path.join(process.cwd(), 'lib', 'version', 'token-meta.json'));
}
}
function finalizeDist() {
if (fs.existsSync(path.join(__dirname, './dist'))) {
fs.copyFileSync(restCssPath, path.join(process.cwd(), 'dist', 'reset.css'));
}
}
module.exports = {
compile: {
finalize: finalizeCompile,
},
dist: {
finalize: finalizeDist,
},
bail: true,
};

View File

@ -7,3 +7,7 @@ es/
lib/ lib/
_site/ _site/
dist/ dist/
site/dist/
components/version/version.ts
site/src/router/demoRoutes.js
locale/

View File

@ -1,77 +0,0 @@
{
"root": true,
"env": {
"browser": true,
"node": true,
"jasmine": true,
"jest": true,
"es6": true
},
"parserOptions": {
"parser": "babel-eslint"
},
"extends": ["plugin:vue/vue3-recommended", "prettier"],
"plugins": ["markdown", "jest"],
"overrides": [
{
"files": ["**/demo/*.md"],
"processor": "markdown/markdown",
"rules": {
"no-console": "off"
}
},
{
"files": ["*.ts", "*.tsx"],
"extends": [
"@vue/typescript/recommended",
"@vue/prettier",
"@vue/prettier/@typescript-eslint"
],
"rules": {
"@typescript-eslint/no-explicit-any": 0,
"@typescript-eslint/ban-types": 0,
"@typescript-eslint/consistent-type-imports": 1,
"@typescript-eslint/explicit-module-boundary-types": 0,
"@typescript-eslint/no-empty-function": 0,
"@typescript-eslint/no-non-null-assertion": 0,
"@typescript-eslint/no-unused-vars": [
"error",
{ "vars": "all", "args": "after-used", "ignoreRestSiblings": true }
],
"@typescript-eslint/ban-ts-comment": 0
}
}
],
"rules": {
"comma-dangle": [2, "always-multiline"],
"no-var": "error",
"no-console": [2, { "allow": ["warn", "error"] }],
"object-shorthand": 2,
"no-unused-vars": [2, { "ignoreRestSiblings": true, "argsIgnorePattern": "^h$" }],
"no-undef": 2,
"camelcase": "off",
"no-extra-boolean-cast": "off",
"semi": ["error", "always"],
"vue/require-explicit-emits": "off",
"vue/require-prop-types": "off",
"vue/require-default-prop": "off",
"vue/no-reserved-keys": "off",
"vue/comment-directive": "off",
"vue/prop-name-casing": "off",
"vue/one-component-per-file": "off",
"vue/custom-event-name-casing": "off",
"vue/max-attributes-per-line": [
2,
{
"singleline": 20,
"multiline": {
"max": 1,
"allowFirstLine": false
}
}
]
},
"globals": {
"h": true
}
}

112
.eslintrc.js Normal file
View File

@ -0,0 +1,112 @@
module.exports = {
root: true,
env: {
browser: true,
node: true,
jasmine: true,
jest: true,
es6: true,
},
parser: '@typescript-eslint/parser',
parserOptions: {
parser: 'babel-eslint',
},
extends: [
'plugin:vue/vue3-recommended',
'plugin:import/recommended',
'plugin:import/typescript',
'@vue/typescript/recommended',
'@vue/prettier',
// 'prettier',
],
// extends: [
// 'eslint:recommended',
// 'plugin:vue/vue3-recommended',
// '@vue/typescript/recommended',
// '@vue/prettier',
// ],
plugins: ['markdown', 'jest', '@typescript-eslint', 'import'],
globals: {
h: true,
defineProps: 'readonly',
},
overrides: [
{
files: ['*.md'],
processor: 'markdown/markdown',
rules: {
'no-console': 'off',
},
},
{
files: ['*.ts', '*.tsx'],
// extends: ['@vue/typescript/recommended', '@vue/prettier'],
parserOptions: {
project: './tsconfig.json',
},
rules: {
'@typescript-eslint/ban-types': 0,
'@typescript-eslint/consistent-type-imports': 'error',
'@typescript-eslint/explicit-module-boundary-types': 0,
'@typescript-eslint/no-empty-function': 0,
'@typescript-eslint/no-non-null-assertion': 0,
'@typescript-eslint/no-unused-vars': [
'error',
{ vars: 'all', args: 'after-used', ignoreRestSiblings: true },
],
'@typescript-eslint/ban-ts-comment': 0,
},
},
{
files: ['*.vue'],
parser: 'vue-eslint-parser',
parserOptions: {
parser: '@typescript-eslint/parser',
ecmaVersion: 2021,
},
rules: {
'no-console': 'off',
'vue/no-reserved-component-names': 'off',
},
},
],
rules: {
'@typescript-eslint/no-explicit-any': 0,
'@typescript-eslint/no-empty-function': 0,
'@typescript-eslint/no-unused-vars': [
'error',
{ vars: 'all', args: 'after-used', ignoreRestSiblings: true, argsIgnorePattern: '^_' },
],
'import/no-named-as-default': 'off',
'import/namespace': [2, { allowComputed: true }],
'import/no-named-as-default-member': 'off',
'import/no-unresolved': [2, { ignore: ['ant-design-vue'] }],
'comma-dangle': [2, 'always-multiline'],
'no-var': 'error',
'no-console': [2, { allow: ['warn', 'error'] }],
'object-shorthand': 2,
'no-unused-vars': [2, { ignoreRestSiblings: true, argsIgnorePattern: '^_' }],
'no-undef': 2,
camelcase: 'off',
'no-extra-boolean-cast': 'off',
semi: ['error', 'always'],
'vue/no-v-html': 'off',
'vue/require-explicit-emits': 'off',
'vue/require-prop-types': 'off',
'vue/require-default-prop': 'off',
'vue/no-reserved-keys': 'off',
'vue/comment-directive': 'off',
'vue/prop-name-casing': 'off',
'vue/one-component-per-file': 'off',
'vue/custom-event-name-casing': 'off',
'vue/v-on-event-hyphenation': 'off',
'vue/max-attributes-per-line': [
2,
{
singleline: 20,
multiline: 1,
},
],
'vue/multi-word-component-names': 'off',
},
};

View File

@ -1,4 +1,4 @@
blank_issues_enabled: false blank_issues_enabled: true
contact_links: contact_links:
- name: Create new issue - name: Create new issue
url: https://vuecomponent.github.io/issue-helper/ url: https://vuecomponent.github.io/issue-helper/
@ -13,5 +13,5 @@ contact_links:
url: https://www.paypal.me/tangjinzhou url: https://www.paypal.me/tangjinzhou
about: Love Ant Design Vue? Please consider supporting us via Paypal. about: Love Ant Design Vue? Please consider supporting us via Paypal.
- name: 支付宝/微信 赞助 - name: 支付宝/微信 赞助
url: https://qn.antdv.com/alipay-and-wechat.png url: https://aliyuncdn.antdv.com/alipay-and-wechat.png
about: Ant Design Vue 的健康持续发展需要您的支持,🙏 about: Ant Design Vue 的健康持续发展需要您的支持,🙏

View File

@ -1,51 +0,0 @@
First of all, thank you for your contribution! 😄
New feature please send pull request to feature branch, and rest to master branch. Pull request will be merged after one of collaborators approve. Please makes sure that these form are filled before submitting your pull request, thank you!
[[中文版模板 / Chinese template](https://github.com/vueComponent/ant-design-vue/blob/master/.github/PULL_REQUEST_TEMPLATE/pr_cn.md)]
### This is a ...
- [ ] New feature
- [ ] Bug fix
- [ ] Site / document update
- [ ] Component style update
- [ ] TypeScript definition update
- [ ] Refactoring
- [ ] Code style optimization
- [ ] Branch merge
- [ ] Other (about what?)
### What's the background?
> 1. Describe the source of requirement.
> 2. Resolve what problem.
> 3. Related issue link.
### API Realization (Optional if not new feature)
> 1. Basic thought of solution and other optional proposal.
> 2. List final API realization and usage sample.
> 3. GIF or snapshot should be provided if includes UI/interactive modification.
### What's the effect? (Optional if not new feature)
> 1. Does this PR affect user? Which part will be affected?
> 2. What will say in changelog?
> 3. Does this PR contains potential break change or other risk?
### Changelog description (Optional if not new feature)
> 1. English description
> 2. Chinese description (optional)
### Self Check before Merge
- [ ] Doc is updated/provided or not needed
- [ ] Demo is updated/provided or not needed
- [ ] TypeScript definition is updated/provided or not needed
- [ ] Changelog is provided or not needed
### Additional Plan? (Optional if not new feature)
> If this PR related with other PR or following info. You can type here.

View File

@ -1,8 +1,8 @@
首先,感谢你的贡献! 😄 首先,感谢你的贡献! 😄
新特性请提交至 feature 分支,其余可提交至 master 分支。在一个维护者审核通过后合并。请确保填写以下 pull request 的信息,谢谢!~ 新特性请提交至 feature 分支,其余可提交至 main 分支。在一个维护者审核通过后合并。请确保填写以下 pull request 的信息,谢谢!~
[[English Template / 英文模板](?expand=1)] [[English Template / 英文模板](./pr_en.md)]
### 这个变动的性质是 ### 这个变动的性质是

51
.github/PULL_REQUEST_TEMPLATE/pr_en.md vendored Normal file
View File

@ -0,0 +1,51 @@
First of all, thank you for your contribution! 😄
New feature please send pull request to feature branch, and rest to main branch. Pull request will be merged after one of collaborators approve. Please makes sure that these form are filled before submitting your pull request, thank you!
[[中文版模板 / Chinese template](./pr_cn.md)]
### This is a ...
- [ ] New feature
- [ ] Bug fix
- [ ] Site / document update
- [ ] Component style update
- [ ] TypeScript definition update
- [ ] Refactoring
- [ ] Code style optimization
- [ ] Branch merge
- [ ] Other (about what?)
### What's the background?
> 1. Describe the source of requirement.
> 2. Resolve what problem.
> 3. Related issue link.
### API Realization (Optional if not new feature)
> 1. Basic thought of solution and other optional proposal.
> 2. List final API realization and usage sample.
> 3. GIF or snapshot should be provided if includes UI/interactive modification.
### What's the effect? (Optional if not new feature)
> 1. Does this PR affect user? Which part will be affected?
> 2. What will say in changelog?
> 3. Does this PR contains potential break change or other risk?
### Changelog description (Optional if not new feature)
> 1. English description
> 2. Chinese description (optional)
### Self Check before Merge
- [ ] Doc is updated/provided or not needed
- [ ] Demo is updated/provided or not needed
- [ ] TypeScript definition is updated/provided or not needed
- [ ] Changelog is provided or not needed
### Additional Plan? (Optional if not new feature)
> If this PR related with other PR or following info. You can type here.

View File

@ -16,7 +16,7 @@ jobs:
key: lock-${{ github.sha }} key: lock-${{ github.sha }}
- name: create package-lock.json - name: create package-lock.json
run: npm i --package-lock-only run: npm i --package-lock-only --ignore-scripts
- name: hack for singe file - name: hack for singe file
run: | run: |

View File

@ -4,12 +4,15 @@ on:
schedule: schedule:
- cron: "0 0 * * *" - cron: "0 0 * * *"
permissions:
contents: read
jobs: jobs:
close-issues: close-issues:
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- name: need reproduce - name: need reproduce
uses: actions-cool/issues-helper@v1.7 uses: actions-cool/issues-helper@v3
with: with:
actions: 'close-issues' actions: 'close-issues'
labels: '🤔 Need Reproduce' labels: '🤔 Need Reproduce'

76
.github/workflows/issue-labeled.yml vendored Normal file
View File

@ -0,0 +1,76 @@
name: Issue Labeled
on:
issues:
types: [labeled]
permissions:
contents: read
jobs:
issue-labeled:
permissions:
issues: write # for actions-cool/issues-helper to update issues
pull-requests: write # for actions-cool/issues-helper to update PRs
runs-on: ubuntu-latest
steps:
- name: Need Reproduce
if: github.event.label.name == '🤔 Need Reproduce'
uses: actions-cool/issues-helper@v3
with:
actions: 'create-comment'
token: ${{ secrets.GITHUB_TOKEN }}
issue-number: ${{ github.event.issue.number }}
body: |
Hello @${{ github.event.issue.user.login }}. Please provide a online reproduction by forking this [link for vue2](https://codesandbox.io/s/2wpk21kzvr)、 [link for vue3](https://codesandbox.io/s/agitated-franklin-1w72v) or a minimal GitHub repository. Make sure to choose the correct version.
你好 @${{ github.event.issue.user.login }}, 我们需要你提供一个在线的重现实例以便于我们帮你排查问题。你可以通过点击 [此处 for vue2](https://codesandbox.io/s/2wpk21kzvr)、 [此处 for vue3](https://codesandbox.io/s/agitated-franklin-1w72v) 创建一个 codesandbox 或者提供一个最小化的 GitHub 仓库。请确保选择准确的版本。
- name: help wanted
if: github.event.label.name == 'help wanted'
uses: actions-cool/issues-helper@v3
with:
actions: 'create-comment'
token: ${{ secrets.GITHUB_TOKEN }}
issue-number: ${{ github.event.issue.number }}
body: |
Hello @${{ github.event.issue.user.login }}. We totally like your proposal/feedback, welcome to send us a Pull Request for it. Please send your Pull Request to proper branch, fill the Pull Request Template here, provide changelog/TypeScript/documentation/test cases if needed and make sure CI passed, we will review it soon. We appreciate your effort in advance and looking forward to your contribution!
你好 @${{ github.event.issue.user.login }},我们完全同意你的提议/反馈,欢迎直接在此仓库创建一个 Pull Request 来解决这个问题。请将 Pull Request 发到正确的分支,务必填写 Pull Request 内的预设模板,提供改动所需相应的 changelog、TypeScript 定义、测试用例、文档等,并确保 CI 通过,我们会尽快进行 Review提前感谢和期待您的贡献。
- name: Usage
if: github.event.label.name == 'Usage'
uses: actions-cool/issues-helper@v3
with:
actions: 'create-comment, close-issue'
token: ${{ secrets.GITHUB_TOKEN }}
issue-number: ${{ github.event.issue.number }}
body: |
Hello @${{ github.event.issue.user.login }}, we use GitHub issues to trace bugs or discuss plans of Ant Design Vue. So, please don't ask usage questions here. You can try to open a new discussion in [antdv discussions](https://github.com/vueComponent/ant-design-vue/discussions), select `Q&A` to ask questions, also can ask questions on [Stack Overflow](http://stackoverflow.com/questions/) or [Segment Fault](https://segmentfault.com).
你好 @${{ github.event.issue.user.login }}Ant Design Vue Issue 板块是用于 bug 反馈与需求讨论的地方。请勿询问如何使用的问题,你可以试着在 [antdv discussions](https://github.com/vueComponent/ant-design-vue/discussions) 新开一个 discussion选择 `Q&A` 类别进行提问,也可以在 [Stack Overflow](http://stackoverflow.com/questions/) 或者 [Segment Fault](https://segmentfault.com/) 中提问。
- name: 1.x
if: github.event.label.name == '1.x'
uses: actions-cool/issues-helper@v3
with:
actions: 'create-comment,close-issue'
token: ${{ secrets.GITHUB_TOKEN }}
issue-number: ${{ github.event.issue.number }}
body: |
Hi @${{ github.event.issue.user.login }}. Current version (1.x) is off the maintenance period. We may not accept pull request or fix bug with it anymore. This topic will be auto closed.
你好 @${{ github.event.issue.user.login }}当前版本1.x已经过了维护期。我们不会再接受对其的相关 PR 与 issue。当前 topic 会被自动关闭。
- name: 2.x
if: github.event.label.name == '2.x'
uses: actions-cool/issues-helper@v3
with:
actions: 'create-comment,close-issue'
token: ${{ secrets.GITHUB_TOKEN }}
issue-number: ${{ github.event.issue.number }}
body: |
Hi @${{ github.event.issue.user.login }}. Current version (2.x) is off the maintenance period. We may not accept pull request or fix bug with it anymore. This topic will be auto closed.
你好 @${{ github.event.issue.user.login }}当前版本2.x已经过了维护期。我们不会再接受对其的相关 PR 与 issue。当前 topic 会被自动关闭。

34
.github/workflows/issue-open-check.yml vendored Normal file
View File

@ -0,0 +1,34 @@
name: Issue Open Check
on:
issues:
types: [opened]
permissions:
contents: read
jobs:
issue-open-check:
permissions:
contents: read # for visiky/dingtalk-release-notify to get latest release
issues: write # for actions-cool/issues-helper to update issues
pull-requests: write # for actions-cool/issues-helper to update PRs
runs-on: ubuntu-latest
steps:
- uses: actions-cool/check-user-permission@v1.0.0
id: checkUser
with:
require: 'write'
- name: check invalid
if: (contains(github.event.issue.body, 'issue-helper') == false) && (steps.checkUser.outputs.result == 'false')
uses: actions-cool/issues-helper@v3
with:
actions: 'create-comment,add-labels,close-issue'
issue-number: ${{ github.event.issue.number }}
labels: 'Invalid'
body: |
Hello @${{ github.event.issue.user.login }}, your issue has been closed because it does not conform to our issue requirements. Please use the [Issue Helper](https://vuecomponent.github.io/issue-helper/) to create an issue, thank you!
你好 @${{ github.event.issue.user.login }},为了能够进行高效沟通,我们对 issue 有一定的格式要求,你的 issue 因为不符合要求而被自动关闭。你可以通过 [issue 助手](https://vuecomponent.github.io/issue-helper/) 来创建 issue 以方便我们定位错误。谢谢配合!

View File

@ -1,31 +0,0 @@
name: Issue Reply
on:
issues:
types: [labeled]
jobs:
issue-reply:
runs-on: ubuntu-latest
steps:
- name: Need Reproduce
if: github.event.label.name == '🤔 Need Reproduce'
uses: actions-cool/issues-helper@v1
with:
actions: 'create-comment'
issue-number: ${{ github.event.issue.number }}
body: |
Hello @${{ github.event.issue.user.login }}. Please provide a online reproduction by forking this [link for vue2](https://codesandbox.io/s/2wpk21kzvr)、 [link for vue3](https://codesandbox.io/s/agitated-franklin-1w72v) or a minimal GitHub repository. Make sure to choose the correct version.
你好 @${{ github.event.issue.user.login }}, 我们需要你提供一个在线的重现实例以便于我们帮你排查问题。你可以通过点击 [此处 for vue2](https://codesandbox.io/s/2wpk21kzvr)、 [此处 for vue3](https://codesandbox.io/s/agitated-franklin-1w72v) 创建一个 codesandbox 或者提供一个最小化的 GitHub 仓库。请确保选择准确的版本。
- name: help wanted
if: github.event.label.name == 'help wanted'
uses: actions-cool/issues-helper@v1
with:
actions: 'create-comment'
issue-number: ${{ github.event.issue.number }}
body: |
Hello @${{ github.event.issue.user.login }}. We totally like your proposal/feedback, welcome to send us a Pull Request for it. Please send your Pull Request to proper branch, fill the Pull Request Template here, provide changelog/TypeScript/documentation/test cases if needed and make sure CI passed, we will review it soon. We appreciate your effort in advance and looking forward to your contribution!
你好 @${{ github.event.issue.user.login }},我们完全同意你的提议/反馈,欢迎直接在此仓库创建一个 Pull Request 来解决这个问题。请将 Pull Request 发到正确的分支,务必填写 Pull Request 内的预设模板,提供改动所需相应的 changelog、TypeScript 定义、测试用例、文档等,并确保 CI 通过,我们会尽快进行 Review提前感谢和期待您的贡献。

View File

@ -10,13 +10,13 @@ jobs:
uses: actions/checkout@v2 uses: actions/checkout@v2
- name: cache package-lock.json - name: cache package-lock.json
uses: actions/cache@v1 uses: actions/cache@v2
with: with:
path: package-temp-dir path: package-temp-dir
key: lock-${{ github.sha }} key: lock-${{ github.sha }}
- name: create package-lock.json - name: create package-lock.json
run: npm i --package-lock-only run: npm i --package-lock-only --ignore-scripts
- name: hack for singe file - name: hack for singe file
run: | run: |
@ -27,7 +27,7 @@ jobs:
- name: cache node_modules - name: cache node_modules
id: node_modules_cache_id id: node_modules_cache_id
uses: actions/cache@v1 uses: actions/cache@v2
with: with:
path: node_modules path: node_modules
key: node_modules-${{ hashFiles('**/package-temp-dir/package-lock.json') }} key: node_modules-${{ hashFiles('**/package-temp-dir/package-lock.json') }}
@ -43,25 +43,25 @@ jobs:
uses: actions/checkout@v2 uses: actions/checkout@v2
- name: restore cache from package-lock.json - name: restore cache from package-lock.json
uses: actions/cache@v1 uses: actions/cache@v2
with: with:
path: package-temp-dir path: package-temp-dir
key: lock-${{ github.sha }} key: lock-${{ github.sha }}
- name: restore cache from node_modules - name: restore cache from node_modules
uses: actions/cache@v1 uses: actions/cache@v2
with: with:
path: node_modules path: node_modules
key: node_modules-${{ hashFiles('**/package-temp-dir/package-lock.json') }} key: node_modules-${{ hashFiles('**/package-temp-dir/package-lock.json') }}
- name: cache lib - name: cache lib
uses: actions/cache@v1 uses: actions/cache@v2
with: with:
path: lib path: lib
key: lib-${{ github.sha }} key: lib-${{ github.sha }}
- name: cache es - name: cache es
uses: actions/cache@v1 uses: actions/cache@v2
with: with:
path: es path: es
key: es-${{ github.sha }} key: es-${{ github.sha }}
@ -77,13 +77,13 @@ jobs:
uses: actions/checkout@v2 uses: actions/checkout@v2
- name: restore cache from package-lock.json - name: restore cache from package-lock.json
uses: actions/cache@v1 uses: actions/cache@v2
with: with:
path: package-temp-dir path: package-temp-dir
key: lock-${{ github.sha }} key: lock-${{ github.sha }}
- name: restore cache from node_modules - name: restore cache from node_modules
uses: actions/cache@v1 uses: actions/cache@v2
with: with:
path: node_modules path: node_modules
key: node_modules-${{ hashFiles('**/package-temp-dir/package-lock.json') }} key: node_modules-${{ hashFiles('**/package-temp-dir/package-lock.json') }}
@ -98,24 +98,14 @@ jobs:
- name: checkout - name: checkout
uses: actions/checkout@v2 uses: actions/checkout@v2
# with:
# token: ${{ secrets.ACCESS_TOKEN }}
# - name: Checkout submodules
# uses: actions/checkout@v2
# with:
# repository: tangjinzhou/antdv-demo
# token: ${{ secrets.ACCESS_TOKEN }}
# path: antdv-demo
# submodules: true
- name: restore cache from package-lock.json - name: restore cache from package-lock.json
uses: actions/cache@v1 uses: actions/cache@v2
with: with:
path: package-temp-dir path: package-temp-dir
key: lock-${{ github.sha }} key: lock-${{ github.sha }}
- name: restore cache from node_modules - name: restore cache from node_modules
uses: actions/cache@v1 uses: actions/cache@v2
with: with:
path: node_modules path: node_modules
key: node_modules-${{ hashFiles('**/package-temp-dir/package-lock.json') }} key: node_modules-${{ hashFiles('**/package-temp-dir/package-lock.json') }}

View File

@ -1,23 +0,0 @@
name: Translation Helper
on:
pull_request_target:
types: [opened]
issues:
types: [opened]
jobs:
translate:
runs-on: ubuntu-latest
steps:
- name: issue
if: github.event_name == 'issues'
uses: actions-cool/translation-helper@v1.1.1
with:
translate-body: false
- name: pr
if: github.event_name == 'pull_request_target'
uses: actions-cool/translation-helper@v1.1.1
with:
translate-body: false

13
.gitignore vendored
View File

@ -59,11 +59,12 @@ jspm_packages/
dist dist
lib lib
es es
/locale
_site _site
yarn.lock yarn.lock
package-lock.json package-lock.json
pnpm-lock.yaml
/coverage /coverage
.husky
# 备份文件 # 备份文件
/components/test/* /components/test/*
@ -73,3 +74,13 @@ site/dev.js
# IDE 语法提示临时文件 # IDE 语法提示临时文件
vetur/ vetur/
report.html
site/src/router/demoRoutes.js
components/version/version.ts
components/version/version.tsx
components/version/token.json
components/version/token-meta.json
~component-api.json

3
.gitmodules vendored
View File

@ -1,3 +0,0 @@
[submodule "v2-doc"]
path = v2-doc
url = https://github.com/vueComponent/v2-doc

1
.husky/.gitignore vendored Normal file
View File

@ -0,0 +1 @@
_

4
.husky/pre-commit Executable file
View File

@ -0,0 +1,4 @@
#!/bin/sh
. "$(dirname "$0")/_/husky.sh"
npx --no-install pretty-quick --staged

View File

@ -8,44 +8,49 @@ const transformIgnorePatterns = [
'node_modules/(?!@ant-design/icons-vue|@ant-design/icons-svg|lodash-es)/', 'node_modules/(?!@ant-design/icons-vue|@ant-design/icons-svg|lodash-es)/',
]; ];
const testPathIgnorePatterns = ['/node_modules/', 'node']; const testPathIgnorePatterns = ['/node_modules/', 'node'];
if (process.env.WORKFLOW === 'true') {
testPathIgnorePatterns.push('demo\\.test*'); function getTestRegex(libDir) {
if (libDir === 'dist') {
return 'demo\\.test\\.js$';
}
return '.*\\.test\\.(j|t)sx?$';
} }
module.exports = { module.exports = {
testURL: 'http://localhost/', verbose: true,
setupFiles: ['./tests/setup.js'], setupFiles: ['./tests/setup.js'],
setupFilesAfterEnv: ['./tests/setupAfterEnv.ts'],
moduleFileExtensions: ['js', 'jsx', 'ts', 'tsx', 'json', 'vue', 'md', 'jpg'], moduleFileExtensions: ['js', 'jsx', 'ts', 'tsx', 'json', 'vue', 'md', 'jpg'],
modulePathIgnorePatterns: ['/_site/'], modulePathIgnorePatterns: ['/_site/'],
testPathIgnorePatterns: testPathIgnorePatterns, testPathIgnorePatterns: testPathIgnorePatterns,
transform: { transform: {
'^.+\\.(vue|md)$': '<rootDir>/node_modules/vue-jest', '\\.(vue|md)$': '<rootDir>/node_modules/@vue/vue3-jest',
'^.+\\.(js|jsx)$': '<rootDir>/node_modules/babel-jest', '\\.(js|jsx)$': '<rootDir>/node_modules/babel-jest',
'^.+\\.(ts|tsx)$': '<rootDir>/node_modules/ts-jest', '\\.(ts|tsx)$': '<rootDir>/node_modules/ts-jest',
'^.+\\.svg$': '<rootDir>/node_modules/jest-transform-stub', '\\.svg$': '<rootDir>/node_modules/jest-transform-stub',
}, },
testRegex: libDir === 'dist' ? 'demo\\.test\\.js$' : '.*\\.test\\.js$', testRegex: getTestRegex(libDir),
moduleNameMapper: { moduleNameMapper: {
'^@/(.*)$': '<rootDir>/$1', '^@/(.*)$/': '<rootDir>/$1',
'ant-design-vue$': '<rootDir>/components/index.ts', '^ant-design-vue$': '<rootDir>/components/index',
'ant-design-vue/es': '<rootDir>/components', '^ant-design-vue/es/(.*)$': '<rootDir>/components/$1',
}, },
snapshotSerializers: ['<rootDir>/node_modules/jest-serializer-vue'], snapshotSerializers: ['<rootDir>/node_modules/jest-serializer-vue'],
collectCoverage: process.env.COVERAGE === 'true', collectCoverage: process.env.COVERAGE === 'true',
collectCoverageFrom: [ collectCoverageFrom: [
'components/**/*.{js,jsx,vue}', 'components/**/*.{js,jsx,vue}',
'!components/*/style/index.{js,jsx}',
'!components/style/*.{js,jsx}',
'!components/*/locale/*.{js,jsx}',
'!components/*/__tests__/**/type.{js,jsx}', '!components/*/__tests__/**/type.{js,jsx}',
'!components/vc-*/**/*', '!components/vc-*/**/*',
'!components/*/demo/**/*', '!components/*/demo/**/*',
'!components/_util/**/*', '!components/_util/**/*',
'!components/align/**/*', '!components/align/**/*',
'!components/trigger/**/*', '!components/trigger/**/*',
'!components/style.js',
'!**/node_modules/**', '!**/node_modules/**',
], ],
testEnvironment: 'jest-environment-jsdom-fifteen', testEnvironment: 'jsdom',
testEnvironmentOptions: {
url: 'http://localhost',
customExportConditions: ['node', 'node-addons'],
},
transformIgnorePatterns, transformIgnorePatterns,
globals: { globals: {
'ts-jest': { 'ts-jest': {

1
.npmrc Normal file
View File

@ -0,0 +1 @@
enable-pre-post-scripts=true

View File

@ -18,7 +18,6 @@ yarn-error.log
.editorconfig .editorconfig
.eslintignore .eslintignore
**/*.yml **/*.yml
components/style/color/*.less
**/assets **/assets
.gitattributes .gitattributes
.stylelintrc .stylelintrc

View File

@ -1,9 +1,11 @@
{ {
"singleQuote": true, "singleQuote": true,
"trailingComma": "all", "trailingComma": "all",
"endOfLine": "lf",
"printWidth": 100, "printWidth": 100,
"proseWrap": "never", "proseWrap": "never",
"arrowParens": "avoid", "arrowParens": "avoid",
"htmlWhitespaceSensitivity": "ignore",
"overrides": [ "overrides": [
{ {
"files": ".prettierrc", "files": ".prettierrc",

View File

@ -4,13 +4,40 @@
"stylelint-config-rational-order", "stylelint-config-rational-order",
"stylelint-config-prettier" "stylelint-config-prettier"
], ],
"plugins": ["stylelint-order", "stylelint-declaration-block-no-ignored-properties"], "customSyntax": "postcss-less",
"plugins": ["stylelint-declaration-block-no-ignored-properties"],
"rules": { "rules": {
"comment-empty-line-before": null, "function-name-case": ["lower"],
"function-name-case": ["lower", { "ignoreFunctions": ["/colorPalette/"] }], "function-no-unknown": [
"no-invalid-double-slash-comments": null, true,
{
"ignoreFunctions": [
"fade",
"fadeout",
"tint",
"darken",
"ceil",
"fadein",
"floor",
"unit",
"shade",
"lighten",
"percentage",
"-"
]
}
],
"import-notation": null,
"no-descending-specificity": null, "no-descending-specificity": null,
"declaration-empty-line-before": null "no-invalid-position-at-import-rule": null,
}, "declaration-empty-line-before": null,
"ignoreFiles": ["components/style/color/{bezierEasing,colorPalette,tinyColor}.less"] "keyframes-name-pattern": null,
"custom-property-pattern": null,
"number-max-precision": 8,
"alpha-value-notation": "number",
"color-function-notation": "legacy",
"selector-class-pattern": null,
"selector-id-pattern": null,
"selector-not-notation": null
}
} }

5
.vcmrc
View File

@ -9,8 +9,9 @@
"perf", "perf",
"test", "test",
"chore", "chore",
"revert" "revert",
"ci"
], ],
"warnOnFail": false, "warnOnFail": false,
"autoFix": false "autoFix": false
} }

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

22
LICENSE
View File

@ -44,3 +44,25 @@ NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
MIT License
Copyright (c) 2019-PRESENT Anthony Fu<https://github.com/antfu>
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

View File

@ -1,6 +1,6 @@
<p align="center"> <p align="center">
<a href="https://www.antdv.com/"> <a href="https://www.antdv.com/">
<img width="200" src="https://qn.antdv.com/logo.png"> <img width="200" src="https://aliyuncdn.antdv.com/logo.png">
</a> </a>
</p> </p>
@ -10,9 +10,9 @@
<div align="center"> <div align="center">
An enterprise-class UI components based on Ant Design and Vue 3. 基于 Ant Design 和 Vue 3 的企业级 UI 组件库。
![test](https://github.com/vueComponent/ant-design-vue/workflows/test/badge.svg) [![codecov](https://img.shields.io/codecov/c/github/vueComponent/ant-design-vue/master.svg?style=flat-square)](https://codecov.io/gh/vueComponent/ant-design-vue) [![npm package](https://img.shields.io/npm/v/ant-design-vue.svg?style=flat-square)](https://www.npmjs.org/package/ant-design-vue) [![NPM downloads](http://img.shields.io/npm/dm/ant-design-vue.svg?style=flat-square)](http://www.npmtrends.com/ant-design-vue) [![backers](https://opencollective.com/ant-design-vue/backers/badge.svg)](#backers) [![sponsors](https://opencollective.com/ant-design-vue/sponsors/badge.svg)](#sponsors) [![extension-for-VSCode](https://img.shields.io/badge/extension%20for-VSCode-blue.svg?style=flat-square)](https://marketplace.visualstudio.com/items?itemName=ant-design-vue.vscode-ant-design-vue-helper) ![test](https://github.com/vueComponent/ant-design-vue/workflows/test/badge.svg) [![codecov](https://img.shields.io/codecov/c/github/vueComponent/ant-design-vue/master.svg?style=flat-square)](https://codecov.io/gh/vueComponent/ant-design-vue) [![npm package](https://img.shields.io/npm/v/ant-design-vue.svg?style=flat-square)](https://www.npmjs.org/package/ant-design-vue) [![NPM downloads](http://img.shields.io/npm/dm/ant-design-vue.svg?style=flat-square)](http://www.npmtrends.com/ant-design-vue) [![backers](https://opencollective.com/ant-design-vue/backers/badge.svg)](#backers) [![sponsors](https://opencollective.com/ant-design-vue/sponsors/badge.svg)](#sponsors) [![extension-for-VSCode](https://img.shields.io/badge/extension%20for-VSCode-blue.svg?style=flat-square)](https://marketplace.visualstudio.com/items?itemName=ant-design-vue.vscode-ant-design-vue-helper) [![issues-helper](https://img.shields.io/badge/Issues%20Manage%20By-issues--helper-orange?style=flat-square)](https://github.com/actions-cool/issues-helper)
</div> </div>
@ -26,9 +26,15 @@ An enterprise-class UI components based on Ant Design and Vue 3.
- 开箱即用的高质量 Vue 组件。 - 开箱即用的高质量 Vue 组件。
- 共享 [Ant Design of React](http://ant-design.gitee.io/docs/spec/introduce-cn) 设计工具体系。 - 共享 [Ant Design of React](http://ant-design.gitee.io/docs/spec/introduce-cn) 设计工具体系。
## 关注我们
收藏加关注,第一时间获取更新动态!
![star us](https://user-images.githubusercontent.com/6937879/261937060-e0501ab3-9388-4712-a25d-3f2ba2271865.gif)
## 支持环境 ## 支持环境
- 现代浏览器和 IE11 及以上。1.x 版本支持 IE 9+(需要 [polyfills](https://www.antdv.com/docs/vue/getting-started-cn/#兼容性) - 现代浏览器。1.x 版本支持 IE 9+(需要 [polyfills](https://www.antdv.com/docs/vue/getting-started-cn/#兼容性)
- 支持服务端渲染。 - 支持服务端渲染。
- [Electron](https://electronjs.org/) - [Electron](https://electronjs.org/)
- 支持 Vue 2 和 Vue 3 - 支持 Vue 2 和 Vue 3
@ -65,6 +71,9 @@ $ yarn add ant-design-vue
| [ant-design-vue-helper](https://marketplace.visualstudio.com/items?itemName=ant-design-vue.vscode-ant-design-vue-helper) | ant-design-vue 的 vscode 扩展 | | [ant-design-vue-helper](https://marketplace.visualstudio.com/items?itemName=ant-design-vue.vscode-ant-design-vue-helper) | ant-design-vue 的 vscode 扩展 |
| [vue-cli-plugin-ant-design](https://github.com/vueComponent/vue-cli-plugin-ant-design) | 使用 vue-cli3 快速使用 ant-design-vue 组件库 | | [vue-cli-plugin-ant-design](https://github.com/vueComponent/vue-cli-plugin-ant-design) | 使用 vue-cli3 快速使用 ant-design-vue 组件库 |
| [vue-dash-event](https://github.com/vueComponent/vue-dash-event) | 在 DOM 模板中,您可以使用 ant-design-vue 组件的自定义事件camelCase | | [vue-dash-event](https://github.com/vueComponent/vue-dash-event) | 在 DOM 模板中,您可以使用 ant-design-vue 组件的自定义事件camelCase |
| [@formily/antdv](https://github.com/formilyjs/antdv) | 这是一个结合了 Formily 和 ant-design-vue 的组件库 |
| [@ant-design-vue/nuxt](https://github.com/vueComponent/ant-design-vue-nuxt) | ant-design-vue 的 nuxt 模块扩展 |
| [ant-design-x-vue](https://github.com/wzc520pyfm/ant-design-x-vue) | 基于 Ant Design X 设计规范的 Vue AI 界面解决方案 |
## 问答 ## 问答
@ -79,24 +88,33 @@ ant-design-vue 是 MIT 协议的开源项目。为了项目能够更好的持续
- [Patreon](https://www.patreon.com/tangjinzhou) - [Patreon](https://www.patreon.com/tangjinzhou)
- [opencollective](https://opencollective.com/ant-design-vue) - [opencollective](https://opencollective.com/ant-design-vue)
- [paypal](https://www.paypal.me/tangjinzhou) - [paypal](https://www.paypal.me/tangjinzhou)
- [支付宝或微信](https://qn.antdv.com/alipay-and-wechat.png) - [支付宝或微信](https://aliyuncdn.antdv.com/alipay-and-wechat.png)
- ETH: 0x30cc48515d8ae9fefa20ab87226ad7e8ab9c3bc2
## Sponsors ## 赞助商
Become a sponsor and get your logo on our README on Github with a link to your site. [[Become a sponsor](https://opencollective.com/ant-design-vue#sponsor)] 成为赞助商,并在 Github 上的自述文件上获得您的徽标,并链接到您的网站。 [[成为赞助商](https://opencollective.com/ant-design-vue#sponsor)]
<a href="https://opencollective.com/ant-design-vue/sponsor/0/website" target="_blank"><img src="https://opencollective.com/ant-design-vue/sponsor/0/avatar.svg"></a> <a href="https://opencollective.com/ant-design-vue/sponsor/1/website" target="_blank"><img src="https://opencollective.com/ant-design-vue/sponsor/1/avatar.svg"></a> <a href="https://opencollective.com/ant-design-vue/sponsor/2/website" target="_blank"><img src="https://opencollective.com/ant-design-vue/sponsor/2/avatar.svg"></a> <a href="https://opencollective.com/ant-design-vue/sponsor/3/website" target="_blank"><img src="https://opencollective.com/ant-design-vue/sponsor/3/avatar.svg"></a> <a href="https://opencollective.com/ant-design-vue/sponsor/4/website" target="_blank"><img src="https://opencollective.com/ant-design-vue/sponsor/4/avatar.svg"></a> <a href="https://opencollective.com/ant-design-vue/sponsor/5/website" target="_blank"><img src="https://opencollective.com/ant-design-vue/sponsor/5/avatar.svg"></a> <a href="https://opencollective.com/ant-design-vue/sponsor/6/website" target="_blank"><img src="https://opencollective.com/ant-design-vue/sponsor/6/avatar.svg"></a> <a href="https://opencollective.com/ant-design-vue/sponsor/7/website" target="_blank"><img src="https://opencollective.com/ant-design-vue/sponsor/7/avatar.svg"></a> <a href="https://opencollective.com/ant-design-vue/sponsor/8/website" target="_blank"><img src="https://opencollective.com/ant-design-vue/sponsor/8/avatar.svg"></a> <a href="https://opencollective.com/ant-design-vue/sponsor/9/website" target="_blank"><img src="https://opencollective.com/ant-design-vue/sponsor/9/avatar.svg"></a> <a href="https://opencollective.com/ant-design-vue/sponsor/10/website" target="_blank"><img src="https://opencollective.com/ant-design-vue/sponsor/10/avatar.svg"></a> <a href="http://www.jeecg.com/" target="_blank"><img src="https://aliyuncdn.antdv.com/jeecg-logo.png" height="64"></a> <a href="https://opencollective.com/ant-design-vue/sponsor/0/website" target="_blank"><img src="https://opencollective.com/ant-design-vue/sponsor/0/avatar.svg"></a> <a href="https://opencollective.com/ant-design-vue/sponsor/1/website" target="_blank"><img src="https://opencollective.com/ant-design-vue/sponsor/1/avatar.svg"></a> <a href="https://opencollective.com/ant-design-vue/sponsor/2/website" target="_blank"><img src="https://opencollective.com/ant-design-vue/sponsor/2/avatar.svg"></a> <a href="https://opencollective.com/ant-design-vue/sponsor/3/website" target="_blank"><img src="https://opencollective.com/ant-design-vue/sponsor/3/avatar.svg"></a> <a href="https://opencollective.com/ant-design-vue/sponsor/4/website" target="_blank"><img src="https://opencollective.com/ant-design-vue/sponsor/4/avatar.svg"></a> <a href="https://opencollective.com/ant-design-vue/sponsor/5/website" target="_blank"><img src="https://opencollective.com/ant-design-vue/sponsor/5/avatar.svg"></a> <a href="https://opencollective.com/ant-design-vue/sponsor/6/website" target="_blank"><img src="https://opencollective.com/ant-design-vue/sponsor/6/avatar.svg"></a> <a href="https://opencollective.com/ant-design-vue/sponsor/7/website" target="_blank"><img src="https://opencollective.com/ant-design-vue/sponsor/7/avatar.svg"></a> <a href="https://opencollective.com/ant-design-vue/sponsor/8/website" target="_blank"><img src="https://opencollective.com/ant-design-vue/sponsor/8/avatar.svg"></a> <a href="https://opencollective.com/ant-design-vue/sponsor/9/website" target="_blank"><img src="https://opencollective.com/ant-design-vue/sponsor/9/avatar.svg"></a> <a href="https://opencollective.com/ant-design-vue/sponsor/10/website" target="_blank"><img src="https://opencollective.com/ant-design-vue/sponsor/10/avatar.svg"></a>
## Backers ## 支持者
Support us with a monthly donation and help us continue our activities. [[Become a backer](https://opencollective.com/ant-design-vue#backer)] 每月捐款支持我们,帮助我们继续我们的活动。 [[成为支持者](https://opencollective.com/ant-design-vue#backer)]
<a href="https://github.com/chuzhixin/vue-admin-beautiful" target="_blank"><img width="64" style="border-radius: 50%;" src="https://gitee.com/chu1204505056/image/raw/master/vue-admin-beautiful.png" title="vue-admin-beautiful"></a> <a href="https://opencollective.com/ant-design-vue/backer/0/website" target="_blank"><img src="https://opencollective.com/ant-design-vue/backer/0/avatar.svg"></a> <a href="https://opencollective.com/ant-design-vue/backer/1/website" target="_blank"><img src="https://opencollective.com/ant-design-vue/backer/1/avatar.svg"></a> <a href="https://opencollective.com/ant-design-vue/backer/2/website" target="_blank"><img src="https://opencollective.com/ant-design-vue/backer/2/avatar.svg"></a> <a href="https://opencollective.com/ant-design-vue/backer/3/website" target="_blank"><img src="https://opencollective.com/ant-design-vue/backer/3/avatar.svg"></a> <a href="https://opencollective.com/ant-design-vue/backer/4/website" target="_blank"><img src="https://opencollective.com/ant-design-vue/backer/4/avatar.svg"></a> <a href="https://opencollective.com/ant-design-vue/backer/5/website" target="_blank"><img src="https://opencollective.com/ant-design-vue/backer/5/avatar.svg"></a> <a href="https://opencollective.com/ant-design-vue/backer/6/website" target="_blank"><img src="https://opencollective.com/ant-design-vue/backer/6/avatar.svg"></a> <a href="https://opencollective.com/ant-design-vue/backer/7/website" target="_blank"><img src="https://opencollective.com/ant-design-vue/backer/7/avatar.svg"></a> <a href="https://opencollective.com/ant-design-vue/backer/8/website" target="_blank"><img src="https://opencollective.com/ant-design-vue/backer/8/avatar.svg"></a> <a href="https://opencollective.com/ant-design-vue/backer/9/website" target="_blank"><img src="https://opencollective.com/ant-design-vue/backer/9/avatar.svg"></a> <a href="https://opencollective.com/ant-design-vue/backer/10/website" target="_blank"><img src="https://opencollective.com/ant-design-vue/backer/10/avatar.svg"></a> <a href="https://github.com/chuzhixin/vue-admin-beautiful" target="_blank"><img width="64" style="border-radius: 50%;" src="https://gitee.com/chu1204505056/image/raw/master/vue-admin-beautiful.png" title="vue-admin-beautiful"></a> <a href="https://opencollective.com/ant-design-vue/backer/0/website" target="_blank"><img src="https://opencollective.com/ant-design-vue/backer/0/avatar.svg"></a> <a href="https://opencollective.com/ant-design-vue/backer/1/website" target="_blank"><img src="https://opencollective.com/ant-design-vue/backer/1/avatar.svg"></a> <a href="https://opencollective.com/ant-design-vue/backer/2/website" target="_blank"><img src="https://opencollective.com/ant-design-vue/backer/2/avatar.svg"></a> <a href="https://opencollective.com/ant-design-vue/backer/3/website" target="_blank"><img src="https://opencollective.com/ant-design-vue/backer/3/avatar.svg"></a> <a href="https://opencollective.com/ant-design-vue/backer/4/website" target="_blank"><img src="https://opencollective.com/ant-design-vue/backer/4/avatar.svg"></a> <a href="https://opencollective.com/ant-design-vue/backer/5/website" target="_blank"><img src="https://opencollective.com/ant-design-vue/backer/5/avatar.svg"></a> <a href="https://opencollective.com/ant-design-vue/backer/6/website" target="_blank"><img src="https://opencollective.com/ant-design-vue/backer/6/avatar.svg"></a> <a href="https://opencollective.com/ant-design-vue/backer/7/website" target="_blank"><img src="https://opencollective.com/ant-design-vue/backer/7/avatar.svg"></a> <a href="https://opencollective.com/ant-design-vue/backer/8/website" target="_blank"><img src="https://opencollective.com/ant-design-vue/backer/8/avatar.svg"></a> <a href="https://opencollective.com/ant-design-vue/backer/9/website" target="_blank"><img src="https://opencollective.com/ant-design-vue/backer/9/avatar.svg"></a> <a href="https://opencollective.com/ant-design-vue/backer/10/website" target="_blank"><img src="https://opencollective.com/ant-design-vue/backer/10/avatar.svg"></a>
## Patreon ## Patreon
Support us with a monthly donation and help us continue our activities. [[Become a backer](https://www.patreon.com/tangjinzhou)] 每月捐款支持我们,帮助我们继续我们的活动。 [[成为支持者](https://www.patreon.com/tangjinzhou)]
<a href="https://www.mokeyjay.com" target="_blank"><img width="64" style="border-radius: 50%;" src="https://www.mokeyjay.com/headimg.png" title="donation by Patreon"></a> <a href="https://www.mokeyjay.com" target="_blank"><img width="64" style="border-radius: 50%;" src="https://www.mokeyjay.com/headimg.png" title="donation by Patreon"></a>
## [更多赞助者 (通过 Patreon、支付宝、微信、paypal 等等)](https://github.com/vueComponent/ant-design-vue/blob/master/BACKERS.md) ## [更多赞助者 (通过 Patreon、支付宝、微信、paypal 等等)](https://github.com/vueComponent/ant-design-vue/blob/master/BACKERS.md)
## 贡献者
感谢所有为 ant-design-vue 做出贡献的人!
<a href="https://github.com/vueComponent/ant-design-vue/graphs/contributors">
<img src="https://contrib.rocks/image?repo=vueComponent/ant-design-vue&max=100&columns=15" />
</a>

View File

@ -1,6 +1,6 @@
<p align="center"> <p align="center">
<a href="https://www.antdv.com/"> <a href="https://www.antdv.com/">
<img width="200" src="https://qn.antdv.com/logo.png"> <img width="200" src="https://aliyuncdn.antdv.com/logo.png">
</a> </a>
</p> </p>
@ -12,7 +12,7 @@
An enterprise-class UI components based on Ant Design and Vue. An enterprise-class UI components based on Ant Design and Vue.
![test](https://github.com/vueComponent/ant-design-vue/workflows/test/badge.svg) [![codecov](https://img.shields.io/codecov/c/github/vueComponent/ant-design-vue/master.svg?style=flat-square)](https://codecov.io/gh/vueComponent/ant-design-vue) [![npm package](https://img.shields.io/npm/v/ant-design-vue.svg?style=flat-square)](https://www.npmjs.org/package/ant-design-vue) [![NPM downloads](http://img.shields.io/npm/dm/ant-design-vue.svg?style=flat-square)](http://www.npmtrends.com/ant-design-vue) [![backers](https://opencollective.com/ant-design-vue/backers/badge.svg)](#backers) [![sponsors](https://opencollective.com/ant-design-vue/sponsors/badge.svg)](#sponsors) [![extension-for-VSCode](https://img.shields.io/badge/extension%20for-VSCode-blue.svg?style=flat-square)](https://marketplace.visualstudio.com/items?itemName=ant-design-vue.vscode-ant-design-vue-helper) ![test](https://github.com/vueComponent/ant-design-vue/workflows/test/badge.svg) [![codecov](https://img.shields.io/codecov/c/github/vueComponent/ant-design-vue/master.svg?style=flat-square)](https://codecov.io/gh/vueComponent/ant-design-vue) [![npm package](https://img.shields.io/npm/v/ant-design-vue.svg?style=flat-square)](https://www.npmjs.org/package/ant-design-vue) [![NPM downloads](http://img.shields.io/npm/dm/ant-design-vue.svg?style=flat-square)](http://www.npmtrends.com/ant-design-vue) [![backers](https://opencollective.com/ant-design-vue/backers/badge.svg)](#backers) [![sponsors](https://opencollective.com/ant-design-vue/sponsors/badge.svg)](#sponsors) [![extension-for-VSCode](https://img.shields.io/badge/extension%20for-VSCode-blue.svg?style=flat-square)](https://marketplace.visualstudio.com/items?itemName=ant-design-vue.vscode-ant-design-vue-helper) [![issues-helper](https://img.shields.io/badge/Issues%20Manage%20By-issues--helper-orange?style=flat-square)](https://github.com/actions-cool/issues-helper)
</div> </div>
@ -26,9 +26,15 @@ English | [简体中文](./README-zh_CN.md)
- A set of high-quality Vue components out of the box. - A set of high-quality Vue components out of the box.
- Shared [Ant Design of React](https://ant.design/docs/spec/introduce) design resources. - Shared [Ant Design of React](https://ant.design/docs/spec/introduce) design resources.
## Getting started & staying tuned with us.
Star us, and you will receive all releases notifications from GitHub without any delay!
![star us](https://user-images.githubusercontent.com/6937879/261937060-e0501ab3-9388-4712-a25d-3f2ba2271865.gif)
## Environment Support ## Environment Support
- Modern browsers and Internet Explorer 11+. v1.x support Internet Explorer 9+ (with [polyfills](https://www.antdv.com/docs/vue/getting-started/#Compatibility)) - Modern browsers. v1.x support Internet Explorer 9+ (with [polyfills](https://www.antdv.com/docs/vue/getting-started/#compatibility))
- Server-side Rendering - Server-side Rendering
- Support Vue 2 & Vue 3 - Support Vue 2 & Vue 3
- [Electron](https://electronjs.org/) - [Electron](https://electronjs.org/)
@ -39,7 +45,7 @@ English | [简体中文](./README-zh_CN.md)
## Using npm or yarn ## Using npm or yarn
**We recommend using npm or yarn to install**it not only makes development easierbut also allow you to take advantage of the rich ecosystem of Javascript packages and tooling. **We recommend using npm or yarn to install**, it not only makes development easier, but also allow you to take advantage of the rich ecosystem of Javascript packages and tooling.
```bash ```bash
$ npm install ant-design-vue --save $ npm install ant-design-vue --save
@ -49,7 +55,7 @@ $ npm install ant-design-vue --save
$ yarn add ant-design-vue $ yarn add ant-design-vue
``` ```
If you are in a bad network environmentyou can try other registries and tools like [cnpm](https://github.com/cnpm/cnpm). If you are in a bad network environment, you can try other registries and tools like [cnpm](https://github.com/cnpm/cnpm).
## Links ## Links
@ -65,6 +71,9 @@ If you are in a bad network environmentyou can try other registries and tools
| [ant-design-vue-helper](https://marketplace.visualstudio.com/items?itemName=ant-design-vue.vscode-ant-design-vue-helper) | A vscode extension for ant-design-vue | | [ant-design-vue-helper](https://marketplace.visualstudio.com/items?itemName=ant-design-vue.vscode-ant-design-vue-helper) | A vscode extension for ant-design-vue |
| [vue-cli-plugin-ant-design](https://github.com/vueComponent/vue-cli-plugin-ant-design) | Vue-cli 3 plugin to add ant-design-vue | | [vue-cli-plugin-ant-design](https://github.com/vueComponent/vue-cli-plugin-ant-design) | Vue-cli 3 plugin to add ant-design-vue |
| [vue-dash-event](https://github.com/vueComponent/vue-dash-event) | The library function, implemented in the DOM template, can use the custom event of the ant-design-vue component (camelCase) | | [vue-dash-event](https://github.com/vueComponent/vue-dash-event) | The library function, implemented in the DOM template, can use the custom event of the ant-design-vue component (camelCase) |
| [@formily/antdv](https://github.com/formilyjs/antdv) | The Library with Formily and ant-design-vue |
| [@ant-design-vue/nuxt](https://github.com/vueComponent/ant-design-vue-nuxt) | A nuxt module for ant-design-vue |
| [ant-design-x-vue](https://github.com/wzc520pyfm/ant-design-x-vue) | A Vue AI interface solutions base on the Ant Design X design specification |
## Donation ## Donation
@ -73,26 +82,25 @@ ant-design-vue is an MIT-licensed open source project. In order to achieve bette
- [Patreon](https://www.patreon.com/tangjinzhou) - [Patreon](https://www.patreon.com/tangjinzhou)
- [opencollective](https://opencollective.com/ant-design-vue) - [opencollective](https://opencollective.com/ant-design-vue)
- [paypal](https://www.paypal.me/tangjinzhou) - [paypal](https://www.paypal.me/tangjinzhou)
- [支付宝或微信](https://qn.antdv.com/alipay-and-wechat.png) - [支付宝或微信](https://aliyuncdn.antdv.com/alipay-and-wechat.png)
- ETH: 0x30cc48515d8ae9fefa20ab87226ad7e8ab9c3bc2
## Sponsors ## Sponsors
Become a sponsor and get your logo on our README on Github with a link to your site. [[Become a sponsor](https://opencollective.com/ant-design-vue#sponsor)] Become a sponsor and get your logo on our README on Github with a link to your site. [[Become a sponsor](https://opencollective.com/ant-design-vue#sponsor)]
<a href="https://opencollective.com/ant-design-vue/sponsor/0/website" target="_blank"><img src="https://opencollective.com/ant-design-vue/sponsor/0/avatar.svg"></a> <a href="https://opencollective.com/ant-design-vue/sponsor/1/website" target="_blank"><img src="https://opencollective.com/ant-design-vue/sponsor/1/avatar.svg"></a> <a href="https://opencollective.com/ant-design-vue/sponsor/2/website" target="_blank"><img src="https://opencollective.com/ant-design-vue/sponsor/2/avatar.svg"></a> <a href="https://opencollective.com/ant-design-vue/sponsor/3/website" target="_blank"><img src="https://opencollective.com/ant-design-vue/sponsor/3/avatar.svg"></a> <a href="https://opencollective.com/ant-design-vue/sponsor/4/website" target="_blank"><img src="https://opencollective.com/ant-design-vue/sponsor/4/avatar.svg"></a> <a href="https://opencollective.com/ant-design-vue/sponsor/5/website" target="_blank"><img src="https://opencollective.com/ant-design-vue/sponsor/5/avatar.svg"></a> <a href="https://opencollective.com/ant-design-vue/sponsor/6/website" target="_blank"><img src="https://opencollective.com/ant-design-vue/sponsor/6/avatar.svg"></a> <a href="https://opencollective.com/ant-design-vue/sponsor/7/website" target="_blank"><img src="https://opencollective.com/ant-design-vue/sponsor/7/avatar.svg"></a> <a href="https://opencollective.com/ant-design-vue/sponsor/8/website" target="_blank"><img src="https://opencollective.com/ant-design-vue/sponsor/8/avatar.svg"></a> <a href="https://opencollective.com/ant-design-vue/sponsor/9/website" target="_blank"><img src="https://opencollective.com/ant-design-vue/sponsor/9/avatar.svg"></a> <a href="https://opencollective.com/ant-design-vue/sponsor/10/website" target="_blank"><img src="https://opencollective.com/ant-design-vue/sponsor/10/avatar.svg"></a> <a href="http://www.jeecg.com/" target="_blank"><img src="https://aliyuncdn.antdv.com/jeecg-logo.png" height="64"></a> <a href="https://opencollective.com/ant-design-vue/sponsor/0/website" target="_blank"><img src="https://opencollective.com/ant-design-vue/sponsor/0/avatar.svg"></a> <a href="https://opencollective.com/ant-design-vue/sponsor/1/website" target="_blank"><img src="https://opencollective.com/ant-design-vue/sponsor/1/avatar.svg"></a> <a href="https://opencollective.com/ant-design-vue/sponsor/2/website" target="_blank"><img src="https://opencollective.com/ant-design-vue/sponsor/2/avatar.svg"></a> <a href="https://opencollective.com/ant-design-vue/sponsor/3/website" target="_blank"><img src="https://opencollective.com/ant-design-vue/sponsor/3/avatar.svg"></a> <a href="https://opencollective.com/ant-design-vue/sponsor/4/website" target="_blank"><img src="https://opencollective.com/ant-design-vue/sponsor/4/avatar.svg"></a> <a href="https://opencollective.com/ant-design-vue/sponsor/5/website" target="_blank"><img src="https://opencollective.com/ant-design-vue/sponsor/5/avatar.svg"></a> <a href="https://opencollective.com/ant-design-vue/sponsor/6/website" target="_blank"><img src="https://opencollective.com/ant-design-vue/sponsor/6/avatar.svg"></a> <a href="https://opencollective.com/ant-design-vue/sponsor/7/website" target="_blank"><img src="https://opencollective.com/ant-design-vue/sponsor/7/avatar.svg"></a> <a href="https://opencollective.com/ant-design-vue/sponsor/8/website" target="_blank"><img src="https://opencollective.com/ant-design-vue/sponsor/8/avatar.svg"></a> <a href="https://opencollective.com/ant-design-vue/sponsor/9/website" target="_blank"><img src="https://opencollective.com/ant-design-vue/sponsor/9/avatar.svg"></a> <a href="https://opencollective.com/ant-design-vue/sponsor/10/website" target="_blank"><img src="https://opencollective.com/ant-design-vue/sponsor/10/avatar.svg"></a>
## Backers
Support us with a monthly donation and help us continue our activities. [[Become a backer](https://opencollective.com/ant-design-vue#backer)]
<a href="https://github.com/chuzhixin/vue-admin-beautiful" target="_blank"><img width="64" style="border-radius: 50%;" src="https://gitee.com/chu1204505056/image/raw/master/vue-admin-beautiful.png" title="vue-admin-beautiful"></a> <a href="https://opencollective.com/ant-design-vue/backer/0/website" target="_blank"><img src="https://opencollective.com/ant-design-vue/backer/0/avatar.svg"></a> <a href="https://opencollective.com/ant-design-vue/backer/1/website" target="_blank"><img src="https://opencollective.com/ant-design-vue/backer/1/avatar.svg"></a> <a href="https://opencollective.com/ant-design-vue/backer/2/website" target="_blank"><img src="https://opencollective.com/ant-design-vue/backer/2/avatar.svg"></a> <a href="https://opencollective.com/ant-design-vue/backer/3/website" target="_blank"><img src="https://opencollective.com/ant-design-vue/backer/3/avatar.svg"></a> <a href="https://opencollective.com/ant-design-vue/backer/4/website" target="_blank"><img src="https://opencollective.com/ant-design-vue/backer/4/avatar.svg"></a> <a href="https://opencollective.com/ant-design-vue/backer/5/website" target="_blank"><img src="https://opencollective.com/ant-design-vue/backer/5/avatar.svg"></a> <a href="https://opencollective.com/ant-design-vue/backer/6/website" target="_blank"><img src="https://opencollective.com/ant-design-vue/backer/6/avatar.svg"></a> <a href="https://opencollective.com/ant-design-vue/backer/7/website" target="_blank"><img src="https://opencollective.com/ant-design-vue/backer/7/avatar.svg"></a> <a href="https://opencollective.com/ant-design-vue/backer/8/website" target="_blank"><img src="https://opencollective.com/ant-design-vue/backer/8/avatar.svg"></a> <a href="https://opencollective.com/ant-design-vue/backer/9/website" target="_blank"><img src="https://opencollective.com/ant-design-vue/backer/9/avatar.svg"></a> <a href="https://opencollective.com/ant-design-vue/backer/10/website" target="_blank"><img src="https://opencollective.com/ant-design-vue/backer/10/avatar.svg"></a><a href="https://opencollective.com/ant-design-vue/backer/9/website" target="_blank"><img src="https://opencollective.com/ant-design-vue/backer/9/avatar.svg"></a>
## Patreon
Support us with a monthly donation and help us continue our activities. [[Become a backer](https://www.patreon.com/tangjinzhou)]
<a href="https://www.mokeyjay.com" target="_blank"><img width="64" style="border-radius: 50%;" src="https://www.mokeyjay.com/headimg.png" title="donation by Patreon"></a>
## [More Sponsor (From Patreon、alipay、wechat、paypal...)](https://github.com/vueComponent/ant-design-vue/blob/master/BACKERS.md) ## [More Sponsor (From Patreon、alipay、wechat、paypal...)](https://github.com/vueComponent/ant-design-vue/blob/master/BACKERS.md)
## Contributors
Thank you to all the people who already contributed to ant-design-vue!
<a href="https://github.com/vueComponent/ant-design-vue/graphs/contributors">
<img src="https://contrib.rocks/image?repo=vueComponent/ant-design-vue&max=100&columns=15" />
</a>
[![Let's fund issues in this repository](https://issuehunt.io/static/embed/issuehunt-button-v1.svg)](https://issuehunt.io/repos/104172832) [![Let's fund issues in this repository](https://issuehunt.io/static/embed/issuehunt-button-v1.svg)](https://issuehunt.io/repos/104172832)
This project is tested with BrowserStack.

17
SECURITY.md Normal file
View File

@ -0,0 +1,17 @@
# Security Policy
## Supported Versions
Use this section to tell people about which versions of your project are currently being supported with security updates.
| Version | Supported |
| ------- | ------------------ |
| 1.x | :white_check_mark: |
| 2.x | :x: |
| 3.x | :white_check_mark: |
## Reporting a Vulnerability
Use this section to tell people how to report a vulnerability.
Tell them where to go, how often they can expect to get an update on a reported vulnerability, what to expect if the vulnerability is accepted or declined, etc.

View File

@ -0,0 +1,68 @@
// Read all the api from current documents
const glob = require('glob');
const fs = require('fs');
const COMPONENT_NAME = /components\/([^/]*)/;
const PROP_NAME = /^\s*\|\s*([^\s|]*)/;
const components = {};
function mappingPropLine(component, line) {
const propMatch = line.match(PROP_NAME);
if (!propMatch) return;
const propName = propMatch[1];
if (!/^[a-z]/.test(propName)) return;
components[component] = Array.from(new Set([...(components[component] || []), propName]));
}
function apiReport(entities) {
const apis = {};
Object.keys(entities).forEach(component => {
const apiList = entities[component];
apiList.forEach(api => {
if (typeof apis[api] === 'function') {
apis[api] = [];
}
apis[api] = [...(apis[api] || []), component];
});
});
return apis;
}
function printReport(apis) {
const apiList = Object.keys(apis).map(api => ({
name: api,
componentList: apis[api],
}));
apiList.sort((a, b) => b.componentList.length - a.componentList.length);
// eslint-disable-next-line no-console
console.log('| name | components | comments |');
// eslint-disable-next-line no-console
console.log('| ---- | ---------- | -------- |');
apiList.forEach(({ name, componentList }) => {
// eslint-disable-next-line no-console
console.log('|', name, '|', componentList.join(', '), '| |');
});
}
module.exports = () => {
glob('components/*/*.md', (error, files) => {
files.forEach(filePath => {
// Read md file to parse content
const content = fs.readFileSync(filePath, 'utf8');
const component = filePath.match(COMPONENT_NAME)[1];
// Parse lines to get API
const lines = content.split(/[\r\n]+/);
lines.forEach(line => {
mappingPropLine(component, line);
});
});
printReport(apiReport(components));
});
};

View File

@ -4,10 +4,11 @@
'use strict'; 'use strict';
require('colorful').colorful(); require('colorful').colorful();
require('colorful').isatty = true;
const gulp = require('gulp'); const gulp = require('gulp');
const program = require('commander'); const program = require('commander');
program.option('-c --npm-tag <type>', 'add --npm-tag=xxx');
program.on('--help', () => { program.on('--help', () => {
console.log(' Usage:'.to.bold.blue.color); console.log(' Usage:'.to.bold.blue.color);
console.log(); console.log();

View File

@ -3,17 +3,21 @@ const pkg = require('../../package.json');
const { parseAndWrite } = require('./lib/index.js'); const { parseAndWrite } = require('./lib/index.js');
const rootPath = path.resolve(__dirname, '../../'); const rootPath = path.resolve(__dirname, '../../');
try { parseAndWrite({
parseAndWrite({ version: pkg.version,
version: pkg.version, name: 'ant-design-vue',
name: 'types', path: path.resolve(rootPath, './components'),
path: path.resolve(rootPath, './v2-doc/src/docs'), typingsPath: path.resolve(rootPath, './typings/global.d.ts'),
// default match lang // default match lang
test: /en-US\.md/, test: /en-US\.md/,
outputDir: path.resolve(rootPath, './vetur'), outputDir: path.resolve(rootPath, './vetur'),
tagPrefix: 'a-', tagPrefix: 'a-',
})
.then(result => {
// eslint-disable-next-line no-console
console.log(`generator types success: ${result} tags generated`);
})
.catch(error => {
console.error('generator types error', error);
return Promise.reject(error);
}); });
console.log('generator types success');
} catch (e) {
console.error('generator types error', e);
}

View File

@ -1,7 +1,6 @@
/* eslint-disable no-continue */ import type { Articals } from './parser';
import { Artical, Articals } from './parser';
import { formatType, removeVersion, toKebabCase } from './utils'; import { formatType, removeVersion, toKebabCase } from './utils';
import { VueTag } from './type'; import type { VueTag } from './type';
function getComponentName(name: string, tagPrefix: string) { function getComponentName(name: string, tagPrefix: string) {
if (name) { if (name) {
@ -35,14 +34,19 @@ function parserProps(tag: VueTag, line: any) {
}); });
} }
export function formatter(articals: Articals, componentName: string, tagPrefix: string = '') { export function formatter(
articals: Articals,
componentName: string,
kebabComponentName: string,
tagPrefix = '',
) {
if (!articals.length) { if (!articals.length) {
return; return;
} }
const tags: VueTag[] = []; const tags: VueTag[] = [];
const tag: VueTag = { const tag: VueTag = {
name: getComponentName(componentName, tagPrefix), name: kebabComponentName,
slots: [], slots: [],
events: [], events: [],
attributes: [], attributes: [],
@ -81,9 +85,13 @@ export function formatter(articals: Articals, componentName: string, tagPrefix:
} }
// 额外的子组件 // 额外的子组件
if (tableTitle.includes(componentName) && !tableTitle.includes('events')) { if (
tableTitle.includes(componentName) &&
!tableTitle.includes('events') &&
!tableTitle.includes('()')
) {
const childTag: VueTag = { const childTag: VueTag = {
name: getComponentName(tableTitle.replace('.', ''), tagPrefix), name: getComponentName(tableTitle.replace(/\.|\//g, ''), tagPrefix),
slots: [], slots: [],
events: [], events: [],
attributes: [], attributes: [],
@ -94,6 +102,7 @@ export function formatter(articals: Articals, componentName: string, tagPrefix:
tags.push(childTag); tags.push(childTag);
return; return;
} }
// 额外的子组件事件 // 额外的子组件事件
if (tableTitle.includes(componentName) && tableTitle.includes('events')) { if (tableTitle.includes(componentName) && tableTitle.includes('events')) {
const childTagName = getComponentName( const childTagName = getComponentName(

View File

@ -1,52 +1,84 @@
import glob from 'fast-glob'; import glob from 'fast-glob';
import { join, dirname, basename } from 'path'; import { dirname, join } from 'path';
import { mdParser } from './parser'; import { mdParser } from './parser';
import { formatter } from './formatter'; import { formatter } from './formatter';
import { genWebTypes } from './web-types'; import { genWebTypes } from './web-types';
import { readFileSync, outputFileSync } from 'fs-extra'; import { outputFileSync, readFileSync } from 'fs-extra';
import { Options, VueTag } from './type'; import type { Options, VueTag } from './type';
import { normalizePath, getComponentName } from './utils'; import { getComponentName, normalizePath, toKebabCase } from './utils';
import { genVeturTags, genVeturAttributes } from './vetur'; import { flatMap } from 'lodash';
async function readMarkdown(options: Options) { async function readMarkdown(options: Options): Promise<Map<String, VueTag>> {
// const mds = await glob(normalizePath(`${options.path}/**/*.md`)) const mdPaths = await glob(normalizePath(`${options.path}/**/*.md`));
const mds = await glob(normalizePath(`${options.path}/**/*.md`)); const data = mdPaths
return mds
.filter(md => options.test.test(md)) .filter(md => options.test.test(md))
.map(path => { .map(path => {
const docPath = dirname(path); const docPath = dirname(path);
const componentName = docPath.substring(docPath.lastIndexOf('/') + 1); const kebabComponentName =
return { options.tagPrefix + docPath.substring(docPath.lastIndexOf('/') + 1) || '';
componentName: getComponentName(componentName || ''), const componentName = getComponentName(docPath.substring(docPath.lastIndexOf('/') + 1) || '');
md: readFileSync(path, 'utf-8'), const fileContent = readFileSync(path, 'utf-8');
}; return formatter(mdParser(fileContent), componentName, kebabComponentName, options.tagPrefix);
}); })
.filter(item => item) as VueTag[][];
const tags = new Map<String, VueTag>();
flatMap(data, item => item).forEach(mergedTag => mergeTag(tags, mergedTag));
return tags;
} }
export async function parseAndWrite(options: Options) { function readTypings(options: Options): Map<String, VueTag> {
const tags = new Map<String, VueTag>();
const fileContent = readFileSync(options.typingsPath, 'utf-8');
fileContent
.split('\n')
.filter(line => line && line.includes('typeof'))
.map(line => {
const l = line.trim();
return toKebabCase(l.substring(0, l.indexOf(':')));
})
.forEach(tagName =>
tags.set(tagName, {
name: tagName,
slots: [],
events: [],
attributes: [],
}),
);
return tags;
}
function mergeTag(tags: Map<String, VueTag>, mergedTag: VueTag) {
const tagName = mergedTag.name;
const vueTag = tags.get(tagName);
if (vueTag) {
vueTag.slots = [...vueTag.slots, ...mergedTag.slots];
vueTag.events = [...vueTag.events, ...mergedTag.events];
vueTag.attributes = [...vueTag.attributes, ...mergedTag.attributes];
} else {
tags.set(tagName, mergedTag);
}
}
function mergeTags(mergedTagsArr: Map<String, VueTag>[]): VueTag[] {
if (mergedTagsArr.length === 1) return [...mergedTagsArr[0].values()];
const tags = new Map<String, VueTag>();
if (mergedTagsArr.length === 0) return [];
mergedTagsArr.forEach(mergedTags => {
mergedTags.forEach(mergedTag => mergeTag(tags, mergedTag));
});
return [...tags.values()];
}
export async function parseAndWrite(options: Options): Promise<Number> {
if (!options.outputDir) { if (!options.outputDir) {
throw new Error('outputDir can not be empty.'); throw new Error('outputDir can not be empty.');
} }
const tagsFromMarkdown = await readMarkdown(options);
const docs = await readMarkdown(options); const tagsFromTypings = await readTypings(options);
const datas = docs const tags = mergeTags([tagsFromMarkdown, tagsFromTypings]);
.map(doc => formatter(mdParser(doc.md), doc.componentName, options.tagPrefix))
.filter(item => item) as VueTag[][];
const tags: VueTag[] = [];
datas.forEach(arr => {
tags.push(...arr);
});
const webTypes = genWebTypes(tags, options); const webTypes = genWebTypes(tags, options);
const veturTags = genVeturTags(tags);
const veturAttributes = genVeturAttributes(tags);
outputFileSync(join(options.outputDir, 'tags.json'), JSON.stringify(veturTags, null, 2));
outputFileSync(
join(options.outputDir, 'attributes.json'),
JSON.stringify(veturAttributes, null, 2),
);
outputFileSync(join(options.outputDir, 'web-types.json'), JSON.stringify(webTypes, null, 2)); outputFileSync(join(options.outputDir, 'web-types.json'), JSON.stringify(webTypes, null, 2));
return tags.length;
} }
export default { parseAndWrite }; export default { parseAndWrite };

View File

@ -21,13 +21,13 @@ export type Articals = Artical[];
function readLine(input: string) { function readLine(input: string) {
const end = input.indexOf('\n'); const end = input.indexOf('\n');
return input.substr(0, end !== -1 ? end : input.length); return input.substring(0, end !== -1 ? end : input.length);
} }
function splitTableLine(line: string) { function splitTableLine(line: string) {
line = line.replace('\\|', 'JOIN'); line = line.replace(/\\\|/g, 'JOIN');
const items = line.split('|').map(item => item.trim().replace('JOIN', '|')); const items = line.split('|').map(item => item.trim().replace(/JOIN/g, '|'));
// remove pipe character on both sides // remove pipe character on both sides
items.pop(); items.pop();
@ -47,7 +47,7 @@ function tableParse(input: string) {
}; };
while (start < end) { while (start < end) {
const target = input.substr(start); const target = input.substring(start);
const line = readLine(target); const line = readLine(target);
if (!/^\|/.test(target)) { if (!/^\|/.test(target)) {
@ -77,14 +77,9 @@ export function mdParser(input: string): Articals {
const artical = []; const artical = [];
let start = 0; let start = 0;
const end = input.length; const end = input.length;
// artical.push({
// type: 'title',
// content: title,
// level: 0,
// });
while (start < end) { while (start < end) {
const target = input.substr(start); const target = input.substring(start);
let match; let match;
if ((match = TITLE_REG.exec(target))) { if ((match = TITLE_REG.exec(target))) {
@ -96,7 +91,7 @@ export function mdParser(input: string): Articals {
start += match.index + match[0].length; start += match.index + match[0].length;
} else if ((match = TABLE_REG.exec(target))) { } else if ((match = TABLE_REG.exec(target))) {
const { table, usedLength } = tableParse(target.substr(match.index)); const { table, usedLength } = tableParse(target.substring(match.index));
artical.push({ artical.push({
type: 'table', type: 'table',
table, table,
@ -108,6 +103,5 @@ export function mdParser(input: string): Articals {
} }
} }
// artical[0].content = title
return artical; return artical;
} }

View File

@ -1,4 +1,4 @@
import { PathLike } from 'fs'; import type { PathLike } from 'fs';
export type VueSlot = { export type VueSlot = {
name: string; name: string;
@ -28,34 +28,16 @@ export type VueAttribute = {
export type VueTag = { export type VueTag = {
name: string; name: string;
slots?: VueSlot[]; slots: VueSlot[];
events?: VueEvent[]; events: VueEvent[];
attributes?: VueAttribute[]; attributes: VueAttribute[];
description?: string; description?: string;
}; };
export type VeturTag = {
description?: string;
attributes: string[];
};
export type VeturTags = Record<string, VeturTag>;
export type VeturAttribute = {
type: string;
description: string;
};
export type VeturAttributes = Record<string, VeturAttribute>;
export type VeturResult = {
tags: VeturTags;
attributes: VeturAttributes;
};
export type Options = { export type Options = {
name: string; name: string;
path: PathLike; path: PathLike;
typingsPath: PathLike;
test: RegExp; test: RegExp;
version: string; version: string;
outputDir?: string; outputDir?: string;

View File

@ -1,6 +1,6 @@
// myName -> my-name // myName -> my-name
export function toKebabCase(input: string): string { export function toKebabCase(camel: string): string {
return input.replace(/[A-Z]/g, (val, index) => (index === 0 ? '' : '-') + val.toLowerCase()); return camel.replace(/((?<=[a-z\d])[A-Z]|(?<=[A-Z\d])[A-Z](?=[a-z]))/g, '-$1').toLowerCase();
} }
// name `v2.0.0` -> name // name `v2.0.0` -> name
@ -18,7 +18,7 @@ export function formatType(type: string) {
} }
export function getComponentName(name: string) { export function getComponentName(name: string) {
let title = name const title = name
.split('-') .split('-')
.map(it => it.substring(0, 1) + it.substring(1)) .map(it => it.substring(0, 1) + it.substring(1))
.join(''); .join('');

View File

@ -1,30 +0,0 @@
import { VueTag, VeturTags, VeturAttributes } from './type';
export function genVeturTags(tags: VueTag[]) {
const veturTags: VeturTags = {};
tags.forEach(tag => {
veturTags[tag.name] = {
attributes: tag.attributes ? tag.attributes.map(item => item.name) : [],
};
});
return veturTags;
}
export function genVeturAttributes(tags: VueTag[]) {
const veturAttributes: VeturAttributes = {};
tags.forEach(tag => {
if (tag.attributes) {
tag.attributes.forEach(attr => {
veturAttributes[`${tag.name}/${attr.name}`] = {
type: attr.value.type,
description: `${attr.description}, Default: ${attr.default}`,
};
});
}
});
return veturAttributes;
}

View File

@ -1,4 +1,4 @@
import { VueTag, Options } from './type'; import type { VueTag, Options } from './type';
// create web-types.json to provide autocomplete in JetBrains IDEs // create web-types.json to provide autocomplete in JetBrains IDEs
export function genWebTypes(tags: VueTag[], options: Options) { export function genWebTypes(tags: VueTag[], options: Options) {

View File

@ -1,4 +1,4 @@
const { resolve } = require('./utils/projectHelper'); const { resolve, isThereHaveBrowserslistConfig } = require('./utils/projectHelper');
module.exports = function (modules) { module.exports = function (modules) {
const plugins = [ const plugins = [
@ -20,7 +20,8 @@ module.exports = function (modules) {
resolve('@babel/plugin-transform-runtime'), resolve('@babel/plugin-transform-runtime'),
{ {
useESModules: modules === false, useESModules: modules === false,
version: '^7.10.4', version:
require(`${process.cwd()}/package.json`).dependencies['@babel/runtime'] || '^7.10.4',
}, },
], ],
// resolve('babel-plugin-inline-import-data-uri'), // resolve('babel-plugin-inline-import-data-uri'),
@ -38,9 +39,11 @@ module.exports = function (modules) {
resolve('@babel/preset-env'), resolve('@babel/preset-env'),
{ {
modules, modules,
targets: { targets: isThereHaveBrowserslistConfig()
browsers: ['last 2 versions', 'Firefox ESR', '> 1%', 'not ie 11'], ? undefined
}, : {
browsers: ['last 2 versions', 'Firefox ESR', '> 1%', 'ie >= 11'],
},
}, },
], ],
], ],

17
antd-tools/getNpm.js Normal file
View File

@ -0,0 +1,17 @@
'use strict';
const runCmd = require('./runCmd');
module.exports = function (done) {
if (process.env.NPM_CLI) {
done(process.env.NPM_CLI);
return;
}
runCmd('which', ['tnpm'], code => {
let npm = 'npm';
if (!code) {
npm = 'tnpm';
}
done(npm);
});
};

View File

@ -1,15 +1,14 @@
'use strict'; 'use strict';
const fs = require('fs'); const fs = require('fs');
const assign = require('object-assign');
const { getProjectPath } = require('./utils/projectHelper'); const { getProjectPath } = require('./utils/projectHelper');
module.exports = function() { module.exports = function () {
let my = {}; let my = {};
if (fs.existsSync(getProjectPath('tsconfig.json'))) { if (fs.existsSync(getProjectPath('tsconfig.json'))) {
my = require(getProjectPath('tsconfig.json')); my = require(getProjectPath('tsconfig.json'));
} }
return assign( return Object.assign(
{ {
noUnusedParameters: true, noUnusedParameters: true,
noUnusedLocals: true, noUnusedLocals: true,

View File

@ -1,5 +1,4 @@
const { getProjectPath, resolve, injectRequire } = require('./utils/projectHelper'); const { getProjectPath, resolve } = require('./utils/projectHelper');
injectRequire();
const path = require('path'); const path = require('path');
const webpack = require('webpack'); const webpack = require('webpack');
const WebpackBar = require('webpackbar'); const WebpackBar = require('webpackbar');
@ -23,7 +22,7 @@ const imageOptions = {
limit: 10000, limit: 10000,
}; };
function getWebpackConfig(modules) { function getWebpackConfig(modules, esm = false) {
const pkg = require(getProjectPath('package.json')); const pkg = require(getProjectPath('package.json'));
const babelConfig = require('./getBabelCommonConfig')(modules || false); const babelConfig = require('./getBabelCommonConfig')(modules || false);
@ -76,11 +75,10 @@ function getWebpackConfig(modules) {
'readline', 'readline',
'repl', 'repl',
'tls', 'tls',
].reduce((acc, name) => Object.assign({}, acc, { [name]: false }), {}), ].reduce((acc, name) => Object.assign({}, acc, { [name]: 'empty' }), {}),
}, },
module: { module: {
noParse: [/moment.js/],
rules: [ rules: [
{ {
test: /\.vue$/, test: /\.vue$/,
@ -125,6 +123,9 @@ function getWebpackConfig(modules) {
}, },
{ {
loader: 'ts-loader', loader: 'ts-loader',
options: {
transpileOnly: true,
},
}, },
], ],
}, },
@ -149,36 +150,6 @@ function getWebpackConfig(modules) {
}, },
], ],
}, },
{
test: /\.less$/,
use: [
MiniCssExtractPlugin.loader,
{
loader: 'css-loader',
options: {
sourceMap: true,
},
},
{
loader: 'postcss-loader',
options: {
postcssOptions: {
plugins: ['autoprefixer'],
},
sourceMap: true,
},
},
{
loader: 'less-loader',
options: {
lessOptions: {
sourceMap: true,
javascriptEnabled: true,
},
},
},
],
},
// Images // Images
{ {
test: svgRegex, test: svgRegex,
@ -199,7 +170,7 @@ function getWebpackConfig(modules) {
new webpack.BannerPlugin(` new webpack.BannerPlugin(`
${pkg.name} v${pkg.version} ${pkg.name} v${pkg.version}
Copyright 2017-present, ant-design-vue. Copyright 2017-present, Ant Design Vue.
All rights reserved. All rights reserved.
`), `),
new WebpackBar({ new WebpackBar({
@ -214,17 +185,37 @@ All rights reserved.
}; };
if (process.env.RUN_ENV === 'PRODUCTION') { if (process.env.RUN_ENV === 'PRODUCTION') {
const entry = ['./index']; let entry = ['./index'];
config.externals = { config.externals = [
vue: { {
root: 'Vue', vue: {
commonjs2: 'vue', root: 'Vue',
commonjs: 'vue', commonjs2: 'vue',
amd: 'vue', commonjs: 'vue',
amd: 'vue',
module: 'vue',
},
}, },
}; ];
config.output.library = distFileBaseName; if (esm) {
config.output.libraryTarget = 'umd'; entry = ['./index.esm'];
config.experiments = {
...config.experiments,
outputModule: true,
};
config.output.chunkFormat = 'module';
config.output.library = {
type: 'module',
};
config.target = 'es2019';
} else {
config.output.libraryTarget = 'umd';
config.output.library = distFileBaseName;
config.output.globalObject = 'this';
}
const entryName = esm ? `${distFileBaseName}.esm` : distFileBaseName;
config.optimization = { config.optimization = {
minimizer: [ minimizer: [
new TerserPlugin({ new TerserPlugin({
@ -235,11 +226,10 @@ All rights reserved.
}), }),
], ],
}; };
// Development // Development
const uncompressedConfig = merge({}, config, { const uncompressedConfig = merge({}, config, {
entry: { entry: {
[distFileBaseName]: entry, [entryName]: entry,
}, },
mode: 'development', mode: 'development',
plugins: [ plugins: [
@ -252,11 +242,10 @@ All rights reserved.
// Production // Production
const prodConfig = merge({}, config, { const prodConfig = merge({}, config, {
entry: { entry: {
[`${distFileBaseName}.min`]: entry, [`${entryName}.min`]: entry,
}, },
mode: 'production', mode: 'production',
plugins: [ plugins: [
new webpack.optimize.ModuleConcatenationPlugin(),
new webpack.LoaderOptionsPlugin({ new webpack.LoaderOptionsPlugin({
minimize: true, minimize: true,
}), }),
@ -273,7 +262,7 @@ All rights reserved.
return [prodConfig, uncompressedConfig]; return [prodConfig, uncompressedConfig];
} }
return config; return [config];
} }
getWebpackConfig.webpack = webpack; getWebpackConfig.webpack = webpack;

View File

@ -1,15 +1,10 @@
/* eslint-disable no-console */ /* eslint-disable no-console */
const { getProjectPath, injectRequire } = require('./utils/projectHelper'); const { getProjectPath, getConfig } = require('./utils/projectHelper');
injectRequire();
// const install = require('./install')
const runCmd = require('./runCmd'); const runCmd = require('./runCmd');
const getBabelCommonConfig = require('./getBabelCommonConfig'); const getBabelCommonConfig = require('./getBabelCommonConfig');
const merge2 = require('merge2'); const merge2 = require('merge2');
const { execSync } = require('child_process'); const { execSync } = require('child_process');
const through2 = require('through2'); const through2 = require('through2');
const transformLess = require('./transformLess');
const webpack = require('webpack'); const webpack = require('webpack');
const babel = require('gulp-babel'); const babel = require('gulp-babel');
const argv = require('minimist')(process.argv.slice(2)); const argv = require('minimist')(process.argv.slice(2));
@ -26,16 +21,26 @@ const ts = require('gulp-typescript');
const gulp = require('gulp'); const gulp = require('gulp');
const fs = require('fs'); const fs = require('fs');
const rimraf = require('rimraf'); const rimraf = require('rimraf');
const tsConfig = require('./getTSCommonConfig')();
const replaceLib = require('./replaceLib');
const stripCode = require('gulp-strip-code'); const stripCode = require('gulp-strip-code');
const compareVersions = require('compare-versions'); const compareVersions = require('compare-versions');
const getTSCommonConfig = require('./getTSCommonConfig');
const replaceLib = require('./replaceLib');
const sortApiTable = require('./sortApiTable');
const { glob } = require('glob');
const packageJson = require(getProjectPath('package.json')); const packageJson = require(getProjectPath('package.json'));
const tsDefaultReporter = ts.reporter.defaultReporter(); const tsDefaultReporter = ts.reporter.defaultReporter();
const cwd = process.cwd(); const cwd = process.cwd();
const libDir = getProjectPath('lib'); const libDir = getProjectPath('lib');
const esDir = getProjectPath('es'); const esDir = getProjectPath('es');
const localeDir = getProjectPath('locale');
const tsConfig = getTSCommonConfig();
// FIXME: hard code, not find typescript can modify the path resolution
const localeDts = `import type { Locale } from '../lib/locale-provider';
declare const localeValues: Locale;
export default localeValues;`;
function dist(done) { function dist(done) {
rimraf.sync(path.join(cwd, 'dist')); rimraf.sync(path.join(cwd, 'dist'));
@ -51,11 +56,17 @@ function dist(done) {
} }
const info = stats.toJson(); const info = stats.toJson();
const { dist: { finalize } = {}, bail } = getConfig();
if (stats.hasErrors()) { if (stats.hasErrors()) {
console.error(info.errors); (info.errors || []).forEach(error => {
console.error(error);
});
// https://github.com/ant-design/ant-design/pull/31662
if (bail) {
process.exit(1);
}
} }
if (stats.hasWarnings()) { if (stats.hasWarnings()) {
console.warn(info.warnings); console.warn(info.warnings);
} }
@ -70,6 +81,11 @@ function dist(done) {
version: false, version: false,
}); });
console.log(buildInfo); console.log(buildInfo);
// Additional process of dist finalize
if (finalize) {
console.log('[Dist] Finalization...');
finalize();
}
done(0); done(0);
}); });
} }
@ -98,6 +114,11 @@ gulp.task('tsc', () =>
), ),
); );
gulp.task('clean', () => {
rimraf.sync(getProjectPath('_site'));
rimraf.sync(getProjectPath('_data'));
});
function babelify(js, modules) { function babelify(js, modules) {
const babelConfig = getBabelCommonConfig(modules); const babelConfig = getBabelCommonConfig(modules);
babelConfig.babelrc = false; babelConfig.babelrc = false;
@ -105,20 +126,10 @@ function babelify(js, modules) {
if (modules === false) { if (modules === false) {
babelConfig.plugins.push(replaceLib); babelConfig.plugins.push(replaceLib);
} }
let stream = js.pipe(babel(babelConfig)).pipe( const stream = js.pipe(babel(babelConfig)).pipe(
through2.obj(function z(file, encoding, next) { through2.obj(function z(file, encoding, next) {
this.push(file.clone()); this.push(file.clone());
if (file.path.match(/\/style\/index\.(js|jsx|ts|tsx)$/)) { if (modules !== false) {
const content = file.contents.toString(encoding);
file.contents = Buffer.from(
content
.replace(/\/style\/?'/g, "/style/css'")
.replace(/\/style\/?"/g, '/style/css"')
.replace(/\.less/g, '.css'),
);
file.path = file.path.replace(/index\.(js|jsx|ts|tsx)$/, 'css.js');
this.push(file);
} else if (modules !== false) {
const content = file.contents.toString(encoding); const content = file.contents.toString(encoding);
file.contents = Buffer.from( file.contents = Buffer.from(
content content
@ -130,48 +141,36 @@ function babelify(js, modules) {
next(); next();
}), }),
); );
if (modules === false) {
stream = stream.pipe(
stripCode({
start_comment: '@remove-on-es-build-begin',
end_comment: '@remove-on-es-build-end',
}),
);
}
return stream.pipe(gulp.dest(modules === false ? esDir : libDir)); return stream.pipe(gulp.dest(modules === false ? esDir : libDir));
} }
function compile(modules) { function compile(modules) {
const { compile: { transformTSFile, transformFile } = {} } = getConfig();
rimraf.sync(modules !== false ? libDir : esDir); rimraf.sync(modules !== false ? libDir : esDir);
const less = gulp
.src(['components/**/*.less'])
.pipe(
through2.obj(function (file, encoding, next) {
this.push(file.clone());
if (
file.path.match(/\/style\/index\.less$/) ||
file.path.match(/\/style\/v2-compatible-reset\.less$/)
) {
transformLess(file.path)
.then(css => {
file.contents = Buffer.from(css);
file.path = file.path.replace(/\.less$/, '.css');
this.push(file);
next();
})
.catch(e => {
console.error(e);
});
} else {
next();
}
}),
)
.pipe(gulp.dest(modules === false ? esDir : libDir));
const assets = gulp const assets = gulp
.src(['components/**/*.@(png|svg)']) .src(['components/**/*.@(png|svg)'])
.pipe(gulp.dest(modules === false ? esDir : libDir)); .pipe(gulp.dest(modules === false ? esDir : libDir));
let error = 0; let error = 0;
// =============================== FILE ===============================
let transformFileStream;
if (transformFile) {
transformFileStream = gulp
.src(['components/**/*.tsx'])
.pipe(
through2.obj(function (file, encoding, next) {
let nextFile = transformFile(file) || file;
nextFile = Array.isArray(nextFile) ? nextFile : [nextFile];
nextFile.forEach(f => this.push(f));
next();
}),
)
.pipe(gulp.dest(modules === false ? esDir : libDir));
}
// ================================ TS ================================
const source = [ const source = [
'components/**/*.js', 'components/**/*.js',
'components/**/*.jsx', 'components/**/*.jsx',
@ -181,7 +180,29 @@ function compile(modules) {
'!components/*/__tests__/*', '!components/*/__tests__/*',
]; ];
const tsResult = gulp.src(source).pipe( // Strip content if needed
let sourceStream = gulp.src(source);
if (modules === false) {
sourceStream = sourceStream.pipe(
stripCode({
start_comment: '@remove-on-es-build-begin',
end_comment: '@remove-on-es-build-end',
}),
);
}
if (transformTSFile) {
sourceStream = sourceStream.pipe(
through2.obj(function (file, encoding, next) {
let nextFile = transformTSFile(file) || file;
nextFile = Array.isArray(nextFile) ? nextFile : [nextFile];
nextFile.forEach(f => this.push(f));
next();
}),
);
}
const tsResult = sourceStream.pipe(
ts(tsConfig, { ts(tsConfig, {
error(e) { error(e) {
tsDefaultReporter.error(e); tsDefaultReporter.error(e);
@ -201,7 +222,26 @@ function compile(modules) {
tsResult.on('end', check); tsResult.on('end', check);
const tsFilesStream = babelify(tsResult.js, modules); const tsFilesStream = babelify(tsResult.js, modules);
const tsd = tsResult.dts.pipe(gulp.dest(modules === false ? esDir : libDir)); const tsd = tsResult.dts.pipe(gulp.dest(modules === false ? esDir : libDir));
return merge2([less, tsFilesStream, tsd, assets]); return merge2([tsFilesStream, tsd, assets, transformFileStream].filter(s => s));
}
function generateLocale() {
if (!fs.existsSync(localeDir)) {
fs.mkdirSync(localeDir);
}
const localeFiles = glob.sync('components/locale/*.ts?(x)');
localeFiles.forEach(item => {
const match = item.match(/components\/locale\/(.*)\.tsx?/);
if (match) {
const locale = match[1];
fs.writeFileSync(
path.join(localeDir, `${locale}.js`),
`module.exports = require('../lib/locale/${locale}');`,
);
fs.writeFileSync(path.join(localeDir, `${locale}.d.ts`), localeDts);
}
});
} }
function tag() { function tag() {
@ -294,7 +334,6 @@ gulp.task(
function publish(tagString, done) { function publish(tagString, done) {
let args = ['publish', '--with-antd-tools']; let args = ['publish', '--with-antd-tools'];
args = args.concat(['--tag', 'next']);
if (tagString) { if (tagString) {
args = args.concat(['--tag', tagString]); args = args.concat(['--tag', tagString]);
} }
@ -329,19 +368,36 @@ function pub(done) {
} }
} }
const startTime = new Date();
gulp.task('compile-with-es', done => { gulp.task('compile-with-es', done => {
console.log('start compile at ', startTime);
console.log('[Parallel] Compile to es...'); console.log('[Parallel] Compile to es...');
compile(false).on('finish', done); compile(false).on('finish', done);
}); });
gulp.task('compile-with-lib', done => { gulp.task('compile-with-lib', done => {
console.log('[Parallel] Compile to js...'); console.log('[Parallel] Compile to js...');
compile().on('finish', done); compile().on('finish', () => {
generateLocale();
done();
});
});
gulp.task('compile-finalize', done => {
// Additional process of compile finalize
const { compile: { finalize } = {} } = getConfig();
if (finalize) {
console.log('[Compile] Finalization...');
finalize();
}
done();
}); });
gulp.task( gulp.task(
'compile', 'compile',
gulp.series(gulp.parallel('compile-with-es', 'compile-with-lib'), done => { gulp.series(gulp.parallel('compile-with-es', 'compile-with-lib'), 'compile-finalize', done => {
console.log('end compile at ', new Date());
console.log('compile time ', (new Date() - startTime) / 1000, 's');
done(); done();
}), }),
); );
@ -396,7 +452,7 @@ gulp.task(
newVersion.trim() === version newVersion.trim() === version
) { ) {
// eslint-disable-next-line no-unused-vars // eslint-disable-next-line no-unused-vars
runCmd('npm', ['run', 'pub'], code => { runCmd('npm', ['run', 'pub'], _code => {
done(); done();
}); });
} else { } else {
@ -419,7 +475,11 @@ gulp.task(
const npmArgs = getNpmArgs(); const npmArgs = getNpmArgs();
if (npmArgs) { if (npmArgs) {
for (let arg = npmArgs.shift(); arg; arg = npmArgs.shift()) { for (let arg = npmArgs.shift(); arg; arg = npmArgs.shift()) {
if (/^pu(b(l(i(sh?)?)?)?)?$/.test(arg) && npmArgs.indexOf('--with-antd-tools') < 0) { if (
/^pu(b(l(i(sh?)?)?)?)?$/.test(arg) &&
npmArgs.indexOf('--with-antd-tools') < 0 &&
!process.env.npm_config_with_antd_tools
) {
reportError(); reportError();
done(1); done(1);
return; return;
@ -429,3 +489,11 @@ gulp.task(
done(); done();
}), }),
); );
gulp.task(
'sort-api-table',
gulp.series(done => {
sortApiTable();
done();
}),
);

View File

@ -12,6 +12,19 @@ function replacePath(path) {
path.node.source.value = esModule; path.node.source.value = esModule;
} }
} }
// @ant-design/icons-vue/xxx => @ant-design/icons-vue/es/icons/xxx
const antdIconMatcher = /@ant-design\/icons-vue\/([^/]*)$/;
if (path.node.source && antdIconMatcher.test(path.node.source.value)) {
const esModule = path.node.source.value.replace(
antdIconMatcher,
(_, iconName) => `@ant-design/icons-vue/es/icons/${iconName}`,
);
const esPath = dirname(getProjectPath('node_modules', esModule));
if (fs.existsSync(esPath)) {
path.node.source.value = esModule;
}
}
} }
function replaceLib() { function replaceLib() {

View File

@ -1,9 +1,17 @@
'use strict'; 'use strict';
const isWindows = require('is-windows');
const getRunCmdEnv = require('./utils/getRunCmdEnv'); const getRunCmdEnv = require('./utils/getRunCmdEnv');
function runCmd(cmd, _args, fn) { function runCmd(cmd, _args, fn) {
const args = _args || []; const args = _args || [];
if (isWindows()) {
args.unshift(cmd);
args.unshift('/c');
cmd = process.env.ComSpec;
}
const runner = require('child_process').spawn(cmd, args, { const runner = require('child_process').spawn(cmd, args, {
// keep color // keep color
stdio: 'inherit', stdio: 'inherit',

165
antd-tools/sortApiTable.js Normal file
View File

@ -0,0 +1,165 @@
const program = require('commander');
const majo = require('majo');
const fs = require('fs');
const path = require('path');
const chalk = require('chalk');
const unified = require('unified');
const parse = require('remark-parse');
const stringify = require('remark-stringify');
const yamlConfig = require('remark-yaml-config');
const frontmatter = require('remark-frontmatter');
let fileAPIs = {};
const remarkWithYaml = unified()
.use(parse)
.use(stringify, {
paddedTable: false,
listItemIndent: 1,
stringLength: () => 3,
})
.use(frontmatter)
.use(yamlConfig);
const stream = majo.majo();
function getCellValue(node) {
return node.children[0].children[0].value;
}
// from small to large
const sizeBreakPoints = ['xs', 'sm', 'md', 'lg', 'xl', 'xxl'];
const whiteMethodList = ['afterChange', 'beforeChange'];
const groups = {
isDynamic: val => /^on[A-Z]/.test(val) || whiteMethodList.indexOf(val) > -1,
isSize: val => sizeBreakPoints.indexOf(val) > -1,
};
function asciiSort(prev, next) {
if (prev > next) {
return 1;
}
if (prev < next) {
return -1;
}
return 0;
}
// follow the alphabet order
function alphabetSort(nodes) {
// use toLowerCase to keep `case insensitive`
return nodes.sort((...comparison) =>
asciiSort(...comparison.map(val => getCellValue(val).toLowerCase())),
);
}
function sizeSort(nodes) {
return nodes.sort((...comparison) =>
asciiSort(...comparison.map(val => sizeBreakPoints.indexOf(getCellValue(val).toLowerCase()))),
);
}
function sort(ast, filename) {
const nameMatch = filename.match(/^components\/([^/]*)\//);
const componentName = nameMatch[1];
fileAPIs[componentName] = fileAPIs[componentName] || {
static: new Set(),
size: new Set(),
dynamic: new Set(),
};
ast.children.forEach(child => {
const staticProps = [];
// prefix with `on`
const dynamicProps = [];
// one of ['xs', 'sm', 'md', 'lg', 'xl']
const sizeProps = [];
// find table markdown type
if (child.type === 'table') {
// slice will create new array, so sort can affect the original array.
// slice(1) cut down the thead
child.children.slice(1).forEach(node => {
const value = getCellValue(node);
if (groups.isDynamic(value)) {
dynamicProps.push(node);
fileAPIs[componentName].dynamic.add(value);
} else if (groups.isSize(value)) {
sizeProps.push(node);
fileAPIs[componentName].size.add(value);
} else {
staticProps.push(node);
fileAPIs[componentName].static.add(value);
}
});
// eslint-disable-next-line
child.children = [
child.children[0],
...alphabetSort(staticProps),
...sizeSort(sizeProps),
...alphabetSort(dynamicProps),
];
}
});
return ast;
}
function sortAPI(md, filename) {
return remarkWithYaml.stringify(sort(remarkWithYaml.parse(md), filename));
}
function sortMiddleware(ctx) {
Object.keys(ctx.files).forEach(filename => {
const content = ctx.fileContents(filename);
ctx.writeContents(filename, sortAPI(content, filename));
});
}
module.exports = () => {
fileAPIs = {};
program
.version('0.1.0')
.option(
'-f, --file [file]',
'Specify which file to be transformed',
// default value
'components/**/index.+(zh-CN|en-US).md',
)
.option('-o, --output [output]', 'Specify component api output path', '~component-api.json')
.parse(process.argv);
// Get the markdown file all need to be transformed
/* eslint-disable no-console */
stream
.source(program.file)
.use(sortMiddleware)
.dest('.')
.then(() => {
if (program.output) {
const data = {};
Object.keys(fileAPIs).forEach(componentName => {
data[componentName] = {
static: [...fileAPIs[componentName].static],
size: [...fileAPIs[componentName].size],
dynamic: [...fileAPIs[componentName].dynamic],
};
});
const reportPath = path.resolve(program.output);
fs.writeFileSync(reportPath, JSON.stringify(data, null, 2), 'utf8');
console.log(chalk.cyan(`API list file: ${reportPath}`));
}
})
.then(() => {
console.log(chalk.green(`sort ant-design-vue api successfully!`));
});
/* eslint-enable no-console */
};

View File

@ -1,30 +0,0 @@
const less = require('less');
const { readFileSync } = require('fs');
const path = require('path');
const postcss = require('postcss');
const NpmImportPlugin = require('less-plugin-npm-import');
const autoprefixer = require('autoprefixer');
function transformLess(lessFile, config = {}) {
const { cwd = process.cwd() } = config;
const resolvedLessFile = path.resolve(cwd, lessFile);
let data = readFileSync(resolvedLessFile, 'utf-8');
data = data.replace(/^\uFEFF/, '');
// Do less compile
const lessOpts = {
paths: [path.dirname(resolvedLessFile)],
filename: resolvedLessFile,
plugins: [new NpmImportPlugin({ prefix: '~' })],
javascriptEnabled: true,
};
return less
.render(data, lessOpts)
.then(result => postcss([autoprefixer]).process(result.css, { from: undefined }))
.then(r => {
return r.css;
});
}
module.exports = transformLess;

View File

@ -24,13 +24,13 @@ class CleanUpStatsPlugin {
apply(compiler) { apply(compiler) {
compiler.hooks.done.tap('CleanUpStatsPlugin', stats => { compiler.hooks.done.tap('CleanUpStatsPlugin', stats => {
const { children } = stats.compilation; const { children, warnings } = stats.compilation;
if (Array.isArray(children)) { if (Array.isArray(children)) {
stats.compilation.children = children.filter(child => this.shouldPickStatChild(child)); stats.compilation.children = children.filter(child => this.shouldPickStatChild(child));
} }
// if (Array.isArray(warnings)) { if (Array.isArray(warnings)) {
// stats.compilation.warnings = warnings.filter(message => this.shouldPickWarning(message)); stats.compilation.warnings = warnings.filter(message => this.shouldPickWarning(message));
// } }
}); });
} }
} }

View File

@ -2,6 +2,11 @@
// NOTE: the following code was partially adopted from https://github.com/iarna/in-publish // NOTE: the following code was partially adopted from https://github.com/iarna/in-publish
module.exports = function getNpmArgs() { module.exports = function getNpmArgs() {
// https://github.com/iarna/in-publish/pull/14
if (process.env.npm_command) {
return [process.env.npm_command];
}
let npmArgv = null; let npmArgv = null;
try { try {

View File

@ -1,10 +1,7 @@
const fs = require('fs'); const fs = require('fs');
module.exports = function getChangelog(file, version) { module.exports = function getChangelog(file, version) {
const lines = fs const lines = fs.readFileSync(file).toString().split('\n');
.readFileSync(file)
.toString()
.split('\n');
const changeLog = []; const changeLog = [];
const startPattern = new RegExp(`^## ${version}`); const startPattern = new RegExp(`^## ${version}`);
const stopPattern = /^## /; // 前一个版本 const stopPattern = /^## /; // 前一个版本

View File

@ -1,6 +1,7 @@
'use strict'; 'use strict';
const path = require('path'); const path = require('path');
const isWindows = require('is-windows');
module.exports = function getRunCmdEnv() { module.exports = function getRunCmdEnv() {
const env = {}; const env = {};
@ -11,16 +12,12 @@ module.exports = function getRunCmdEnv() {
const nodeModulesBinDir = path.join(__dirname, '../../node_modules/.bin'); const nodeModulesBinDir = path.join(__dirname, '../../node_modules/.bin');
Object.entries(env) Object.entries(env)
.filter( .filter(v => v.slice(0, 1).pop().toLowerCase() === 'path')
v =>
v
.slice(0, 1)
.pop()
.toLowerCase() === 'path',
)
.forEach(v => { .forEach(v => {
const key = v.slice(0, 1).pop(); const key = v.slice(0, 1).pop();
env[key] = env[key] ? `${nodeModulesBinDir}:${env[key]}` : nodeModulesBinDir; env[key] = env[key]
? `${nodeModulesBinDir}${isWindows() ? ';' : ':'}${env[key]}`
: nodeModulesBinDir;
}); });
return env; return env;
}; };

View File

@ -13,6 +13,7 @@ function resolve(moduleName) {
// We need hack the require to ensure use package module first // We need hack the require to ensure use package module first
// For example, `typescript` is required by `gulp-typescript` but provided by `antd` // For example, `typescript` is required by `gulp-typescript` but provided by `antd`
// we do not need for ant-design-vue
let injected = false; let injected = false;
function injectRequire() { function injectRequire() {
if (injected) return; if (injected) return;
@ -20,7 +21,7 @@ function injectRequire() {
const Module = require('module'); const Module = require('module');
const oriRequire = Module.prototype.require; const oriRequire = Module.prototype.require;
Module.prototype.require = function(...args) { Module.prototype.require = function (...args) {
const moduleName = args[0]; const moduleName = args[0];
try { try {
return oriRequire.apply(this, args); return oriRequire.apply(this, args);
@ -45,9 +46,35 @@ function getConfig() {
return {}; return {};
} }
/**
* 是否存在可用的browserslist config
* https://github.com/browserslist/browserslist#queries
* @returns
*/
function isThereHaveBrowserslistConfig() {
try {
const packageJson = require(getProjectPath('package.json'));
if (packageJson.browserslist) {
return true;
}
} catch (e) {
//
}
if (fs.existsSync(getProjectPath('.browserslistrc'))) {
return true;
}
if (fs.existsSync(getProjectPath('browserslist'))) {
return true;
}
// parent项目的配置支持需要再补充
// ROWSERSLIST ROWSERSLIST_ENV 变量的形式,需要再补充。
return false;
}
module.exports = { module.exports = {
getProjectPath, getProjectPath,
resolve, resolve,
injectRequire, injectRequire,
getConfig, getConfig,
isThereHaveBrowserslistConfig,
}; };

View File

@ -1,7 +1,7 @@
module.exports = { module.exports = {
env: { env: {
test: { test: {
presets: [['@babel/preset-env', { targets: { node: true } }]], presets: [['@babel/preset-env']],
plugins: [ plugins: [
['@vue/babel-plugin-jsx', { mergeProps: false, enableObjectSlots: false }], ['@vue/babel-plugin-jsx', { mergeProps: false, enableObjectSlots: false }],
'@babel/plugin-proposal-optional-chaining', '@babel/plugin-proposal-optional-chaining',
@ -12,6 +12,7 @@ module.exports = {
'@babel/plugin-proposal-class-properties', '@babel/plugin-proposal-class-properties',
'@babel/plugin-syntax-dynamic-import', '@babel/plugin-syntax-dynamic-import',
'@babel/plugin-transform-runtime', '@babel/plugin-transform-runtime',
'transform-require-context',
], ],
}, },
}, },

View File

@ -0,0 +1,123 @@
import type { ExtractPropTypes, PropType } from 'vue';
import { shallowRef, onMounted, defineComponent, onBeforeUnmount } from 'vue';
import Button from '../button';
import type { ButtonProps } from '../button';
import type { LegacyButtonType } from '../button/buttonTypes';
import { convertLegacyProps } from '../button/buttonTypes';
import useDestroyed from './hooks/useDestroyed';
import { objectType } from './type';
import { findDOMNode } from './props-util';
const actionButtonProps = {
type: {
type: String as PropType<LegacyButtonType>,
},
actionFn: Function as PropType<(...args: any[]) => any | PromiseLike<any>>,
close: Function,
autofocus: Boolean,
prefixCls: String,
buttonProps: objectType<ButtonProps>(),
emitEvent: Boolean,
quitOnNullishReturnValue: Boolean,
};
export type ActionButtonProps = ExtractPropTypes<typeof actionButtonProps>;
function isThenable<T>(thing?: PromiseLike<T>): boolean {
return !!(thing && thing.then);
}
export default defineComponent({
compatConfig: { MODE: 3 },
name: 'ActionButton',
props: actionButtonProps,
setup(props, { slots }) {
const clickedRef = shallowRef<boolean>(false);
const buttonRef = shallowRef();
const loading = shallowRef(false);
let timeoutId: any;
const isDestroyed = useDestroyed();
onMounted(() => {
if (props.autofocus) {
timeoutId = setTimeout(() => findDOMNode(buttonRef.value)?.focus?.());
}
});
onBeforeUnmount(() => {
clearTimeout(timeoutId);
});
const onInternalClose = (...args: any[]) => {
props.close?.(...args);
};
const handlePromiseOnOk = (returnValueOfOnOk?: PromiseLike<any>) => {
if (!isThenable(returnValueOfOnOk)) {
return;
}
loading.value = true;
returnValueOfOnOk!.then(
(...args: any[]) => {
if (!isDestroyed.value) {
loading.value = false;
}
onInternalClose(...args);
clickedRef.value = false;
},
(e: Error) => {
// See: https://github.com/ant-design/ant-design/issues/6183
if (!isDestroyed.value) {
loading.value = false;
}
clickedRef.value = false;
return Promise.reject(e);
},
);
};
const onClick = (e: MouseEvent) => {
const { actionFn } = props;
if (clickedRef.value) {
return;
}
clickedRef.value = true;
if (!actionFn) {
onInternalClose();
return;
}
let returnValueOfOnOk: PromiseLike<any>;
if (props.emitEvent) {
returnValueOfOnOk = actionFn(e);
if (props.quitOnNullishReturnValue && !isThenable(returnValueOfOnOk)) {
clickedRef.value = false;
onInternalClose(e);
return;
}
} else if (actionFn.length) {
returnValueOfOnOk = actionFn(props.close);
// https://github.com/ant-design/ant-design/issues/23358
clickedRef.value = false;
} else {
returnValueOfOnOk = actionFn();
if (!returnValueOfOnOk) {
onInternalClose();
return;
}
}
handlePromiseOnOk(returnValueOfOnOk);
};
return () => {
const { type, prefixCls, buttonProps } = props;
return (
<Button
{...convertLegacyProps(type)}
onClick={onClick}
loading={loading.value}
prefixCls={prefixCls}
{...buttonProps}
ref={buttonRef}
v-slots={slots}
></Button>
);
};
},
});

View File

@ -1,50 +1,167 @@
import { defineComponent, ref, withDirectives } from 'vue'; import type { PropType } from 'vue';
import antInput from './antInputDirective'; import { computed, defineComponent, shallowRef, ref, watch } from 'vue';
import PropTypes from './vue-types'; import PropTypes from './vue-types';
import type { BaseInputInnerExpose } from './BaseInputInner';
import BaseInputInner from './BaseInputInner';
import { styleObjectToString } from '../vc-util/Dom/css';
export interface BaseInputExpose {
focus: () => void;
blur: () => void;
input: HTMLInputElement | HTMLTextAreaElement | null;
setSelectionRange: (
start: number,
end: number,
direction?: 'forward' | 'backward' | 'none',
) => void;
select: () => void;
getSelectionStart: () => number | null;
getSelectionEnd: () => number | null;
getScrollTop: () => number | null;
setScrollTop: (scrollTop: number) => void;
}
const BaseInput = defineComponent({ const BaseInput = defineComponent({
compatConfig: { MODE: 3 },
inheritAttrs: false,
props: { props: {
value: PropTypes.string.def(''), disabled: PropTypes.looseBool,
type: PropTypes.string,
value: PropTypes.any,
lazy: PropTypes.bool.def(true),
tag: {
type: String as PropType<'input' | 'textarea'>,
default: 'input',
},
size: PropTypes.string,
style: PropTypes.oneOfType([String, Object]),
class: PropTypes.string,
}, },
emits: ['change', 'input'], emits: [
setup(_p, { emit }) { 'change',
const inputRef = ref(null); 'input',
'blur',
'keydown',
'focus',
'compositionstart',
'compositionend',
'keyup',
'paste',
'mousedown',
],
setup(props, { emit, attrs, expose }) {
const inputRef = shallowRef<BaseInputInnerExpose>(null);
const renderValue = ref();
const isComposing = ref(false);
watch(
[() => props.value, isComposing],
() => {
if (isComposing.value) return;
renderValue.value = props.value;
},
{ immediate: true },
);
const handleChange = (e: Event) => { const handleChange = (e: Event) => {
const { composing } = e.target as any; emit('change', e);
if ((e as any).isComposing || composing) { };
emit('input', e); const onCompositionstart = (e: CompositionEvent) => {
} else { isComposing.value = true;
emit('input', e); (e.target as any).composing = true;
emit('change', e); emit('compositionstart', e);
};
const onCompositionend = (e: CompositionEvent) => {
isComposing.value = false;
(e.target as any).composing = false;
emit('compositionend', e);
const event = document.createEvent('HTMLEvents');
event.initEvent('input', true, true);
e.target.dispatchEvent(event);
handleChange(e);
};
const handleInput = (e: Event) => {
if (isComposing.value && props.lazy) {
renderValue.value = (e.target as HTMLInputElement).value;
return;
}
emit('input', e);
};
const handleBlur = (e: Event) => {
emit('blur', e);
};
const handleFocus = (e: Event) => {
emit('focus', e);
};
const focus = () => {
if (inputRef.value) {
inputRef.value.focus();
} }
}; };
return { const blur = () => {
inputRef, if (inputRef.value) {
focus: () => { inputRef.value.blur();
if (inputRef.value) { }
inputRef.value.focus();
}
},
blur: () => {
if (inputRef.value) {
inputRef.value.blur();
}
},
handleChange,
}; };
}, const handleKeyDown = (e: KeyboardEvent) => {
render() { emit('keydown', e);
return withDirectives( };
( const handleKeyUp = (e: KeyboardEvent) => {
<input emit('keyup', e);
{...this.$props} };
{...this.$attrs} const setSelectionRange = (
onInput={this.handleChange} start: number,
onChange={this.handleChange} end: number,
ref="inputRef" direction?: 'forward' | 'backward' | 'none',
) => {
inputRef.value?.setSelectionRange(start, end, direction);
};
const select = () => {
inputRef.value?.select();
};
expose({
focus,
blur,
input: computed(() => inputRef.value?.input),
setSelectionRange,
select,
getSelectionStart: () => inputRef.value?.getSelectionStart(),
getSelectionEnd: () => inputRef.value?.getSelectionEnd(),
getScrollTop: () => inputRef.value?.getScrollTop(),
});
const handleMousedown = (e: MouseEvent) => {
emit('mousedown', e);
};
const handlePaste = (e: ClipboardEvent) => {
emit('paste', e);
};
const styleString = computed(() => {
return props.style && typeof props.style !== 'string'
? styleObjectToString(props.style)
: props.style;
});
return () => {
const { style, lazy, ...restProps } = props;
return (
<BaseInputInner
{...restProps}
{...attrs}
style={styleString.value}
onInput={handleInput}
onChange={handleChange}
onBlur={handleBlur}
onFocus={handleFocus}
ref={inputRef}
value={renderValue.value}
onCompositionstart={onCompositionstart}
onCompositionend={onCompositionend}
onKeyup={handleKeyUp}
onKeydown={handleKeyDown}
onPaste={handlePaste}
onMousedown={handleMousedown}
/> />
) as any, );
[[antInput]], };
);
}, },
}); });

View File

@ -0,0 +1,96 @@
import type { PropType } from 'vue';
import { defineComponent, shallowRef } from 'vue';
import PropTypes from './vue-types';
export interface BaseInputInnerExpose {
focus: () => void;
blur: () => void;
input: HTMLInputElement | HTMLTextAreaElement | null;
setSelectionRange: (
start: number,
end: number,
direction?: 'forward' | 'backward' | 'none',
) => void;
select: () => void;
getSelectionStart: () => number | null;
getSelectionEnd: () => number | null;
getScrollTop: () => number | null;
setScrollTop: (scrollTop: number) => void;
}
const BaseInputInner = defineComponent({
compatConfig: { MODE: 3 },
// inheritAttrs: false,
props: {
disabled: PropTypes.looseBool,
type: PropTypes.string,
value: PropTypes.any,
tag: {
type: String as PropType<'input' | 'textarea'>,
default: 'input',
},
size: PropTypes.string,
onChange: Function as PropType<(e: Event) => void>,
onInput: Function as PropType<(e: Event) => void>,
onBlur: Function as PropType<(e: Event) => void>,
onFocus: Function as PropType<(e: Event) => void>,
onKeydown: Function as PropType<(e: Event) => void>,
onCompositionstart: Function as PropType<(e: Event) => void>,
onCompositionend: Function as PropType<(e: Event) => void>,
onKeyup: Function as PropType<(e: Event) => void>,
onPaste: Function as PropType<(e: Event) => void>,
onMousedown: Function as PropType<(e: Event) => void>,
},
emits: [
'change',
'input',
'blur',
'keydown',
'focus',
'compositionstart',
'compositionend',
'keyup',
'paste',
'mousedown',
],
setup(props, { expose }) {
const inputRef = shallowRef(null);
const focus = () => {
if (inputRef.value) {
inputRef.value.focus();
}
};
const blur = () => {
if (inputRef.value) {
inputRef.value.blur();
}
};
const setSelectionRange = (
start: number,
end: number,
direction?: 'forward' | 'backward' | 'none',
) => {
inputRef.value?.setSelectionRange(start, end, direction);
};
const select = () => {
inputRef.value?.select();
};
expose({
focus,
blur,
input: inputRef,
setSelectionRange,
select,
getSelectionStart: () => inputRef.value?.selectionStart,
getSelectionEnd: () => inputRef.value?.selectionEnd,
getScrollTop: () => inputRef.value?.scrollTop,
});
return () => {
const { tag: Tag, value, ...restProps } = props;
return <Tag {...restProps} ref={inputRef} value={value} />;
};
},
});
export default BaseInputInner;

View File

@ -1,44 +0,0 @@
import { nextTick } from 'vue';
import { getOptionProps } from './props-util';
export default {
methods: {
setState(state = {}, callback) {
let newState = typeof state === 'function' ? state(this.$data, this.$props) : state;
if (this.getDerivedStateFromProps) {
const s = this.getDerivedStateFromProps(getOptionProps(this), {
...this.$data,
...newState,
});
if (s === null) {
return;
} else {
newState = { ...newState, ...(s || {}) };
}
}
Object.assign(this.$data, newState);
if (this._.isMounted) {
this.$forceUpdate();
}
nextTick(() => {
callback && callback();
});
},
__emit() {
// 直接调用事件底层组件不需要vueTool记录events
const args = [].slice.call(arguments, 0);
let eventName = args[0];
eventName = `on${eventName[0].toUpperCase()}${eventName.substring(1)}`;
const event = this.$props[eventName] || this.$attrs[eventName];
if (args.length && event) {
if (Array.isArray(event)) {
for (let i = 0, l = event.length; i < l; i++) {
event[i](...args.slice(1));
}
} else {
event(...args.slice(1));
}
}
},
},
};

View File

@ -0,0 +1,45 @@
import { nextTick } from 'vue';
import { getOptionProps } from './props-util';
export default {
methods: {
setState(state = {}, callback: () => any) {
let newState = typeof state === 'function' ? state(this.$data, this.$props) : state;
if (this.getDerivedStateFromProps) {
const s = this.getDerivedStateFromProps(getOptionProps(this), {
...this.$data,
...newState,
});
if (s === null) {
return;
} else {
newState = { ...newState, ...(s || {}) };
}
}
Object.assign(this.$data, newState);
if (this._.isMounted) {
this.$forceUpdate();
}
nextTick(() => {
callback && callback();
});
},
__emit() {
// 直接调用事件底层组件不需要vueTool记录events
// eslint-disable-next-line prefer-rest-params
const args = [].slice.call(arguments, 0);
let eventName = args[0];
eventName = `on${eventName[0].toUpperCase()}${eventName.substring(1)}`;
const event = this.$props[eventName] || this.$attrs[eventName];
if (args.length && event) {
if (Array.isArray(event)) {
for (let i = 0, l = event.length; i < l; i++) {
event[i](...args.slice(1));
}
} else {
event(...args.slice(1));
}
}
},
},
};

View File

@ -1,44 +0,0 @@
import { nextTick } from 'vue';
import { getOptionProps } from './props-util';
export default {
methods: {
setState(state = {}, callback) {
let newState = typeof state === 'function' ? state(this, this.$props) : state;
if (this.getDerivedStateFromProps) {
const s = this.getDerivedStateFromProps(getOptionProps(this), {
...this,
...newState,
});
if (s === null) {
return;
} else {
newState = { ...newState, ...(s || {}) };
}
}
Object.assign(this, newState);
if (this._.isMounted) {
this.$forceUpdate();
}
nextTick(() => {
callback && callback();
});
},
__emit() {
// 直接调用事件底层组件不需要vueTool记录events
const args = [].slice.call(arguments, 0);
let eventName = args[0];
eventName = `on${eventName[0].toUpperCase()}${eventName.substring(1)}`;
const event = this.$props[eventName] || this.$attrs[eventName];
if (args.length && event) {
if (Array.isArray(event)) {
for (let i = 0, l = event.length; i < l; i++) {
event[i](...args.slice(1));
}
} else {
event(...args.slice(1));
}
}
},
},
};

View File

@ -0,0 +1,19 @@
export type FocusEventHandler = (e: FocusEvent) => void;
export type MouseEventHandler = (e: MouseEvent) => void;
export type KeyboardEventHandler = (e: KeyboardEvent) => void;
export type CompositionEventHandler = (e: CompositionEvent) => void;
export type ClipboardEventHandler = (e: ClipboardEvent) => void;
export type ChangeEventHandler = (e: ChangeEvent) => void;
export type WheelEventHandler = (e: WheelEvent) => void;
export type ChangeEvent = Event & {
target: {
value?: string | undefined;
};
};
export type CheckboxChangeEvent = Event & {
target: {
checked?: boolean;
};
};
export type EventHandler = (...args: any[]) => void;

View File

@ -1,48 +0,0 @@
import PropTypes from './vue-types';
import { defineComponent, nextTick, Teleport } from 'vue';
export default defineComponent({
name: 'Portal',
props: {
getContainer: PropTypes.func.isRequired,
children: PropTypes.any.isRequired,
didUpdate: PropTypes.func,
},
data() {
this._container = null;
return {};
},
mounted() {
this.createContainer();
},
updated() {
const { didUpdate } = this.$props;
if (didUpdate) {
nextTick(() => {
didUpdate(this.$props);
});
}
},
beforeUnmount() {
this.removeContainer();
},
methods: {
createContainer() {
this._container = this.$props.getContainer();
this.$forceUpdate();
},
removeContainer() {
if (this._container && this._container.parentNode) {
this._container.parentNode.removeChild(this._container);
}
},
},
render() {
if (this._container) {
return <Teleport to={this._container}>{this.$props.children}</Teleport>;
}
return null;
},
});

View File

@ -0,0 +1,72 @@
import PropTypes from './vue-types';
import {
defineComponent,
nextTick,
onBeforeMount,
onMounted,
onUpdated,
Teleport,
watch,
} from 'vue';
import { useInjectPortal } from '../vc-trigger/context';
export default defineComponent({
compatConfig: { MODE: 3 },
name: 'Portal',
inheritAttrs: false,
props: {
getContainer: PropTypes.func.isRequired,
didUpdate: Function,
},
setup(props, { slots }) {
let isSSR = true;
// getContainer
let container: HTMLElement;
const { shouldRender } = useInjectPortal();
function setContainer() {
if (shouldRender.value) {
container = props.getContainer();
}
}
onBeforeMount(() => {
isSSR = false;
// drawer
setContainer();
});
onMounted(() => {
if (container) return;
// https://github.com/vueComponent/ant-design-vue/issues/6937
setContainer();
});
const stopWatch = watch(shouldRender, () => {
if (shouldRender.value && !container) {
container = props.getContainer();
}
if (container) {
stopWatch();
}
});
onUpdated(() => {
nextTick(() => {
if (shouldRender.value) {
props.didUpdate?.(props);
}
});
});
// onBeforeUnmount(() => {
// if (container && container.parentNode) {
// container.parentNode.removeChild(container);
// }
// });
return () => {
if (!shouldRender.value) return null;
if (isSSR) {
return slots.default?.();
}
return container ? <Teleport to={container} v-slots={slots}></Teleport> : null;
};
},
});

View File

@ -1,151 +0,0 @@
import PropTypes from './vue-types';
import switchScrollingEffect from './switchScrollingEffect';
import setStyle from './setStyle';
import Portal from './Portal';
import { defineComponent } from 'vue';
let openCount = 0;
const windowIsUndefined = !(
typeof window !== 'undefined' &&
window.document &&
window.document.createElement
);
// https://github.com/ant-design/ant-design/issues/19340
// https://github.com/ant-design/ant-design/issues/19332
let cacheOverflow = {};
export default defineComponent({
name: 'PortalWrapper',
props: {
wrapperClassName: PropTypes.string,
forceRender: PropTypes.looseBool,
getContainer: PropTypes.any,
children: PropTypes.func,
visible: PropTypes.looseBool,
},
data() {
this._component = null;
const { visible } = this.$props;
openCount = visible ? openCount + 1 : openCount;
return {};
},
watch: {
visible(val) {
openCount = val ? openCount + 1 : openCount - 1;
},
getContainer(getContainer, prevGetContainer) {
const getContainerIsFunc =
typeof getContainer === 'function' && typeof prevGetContainer === 'function';
if (
getContainerIsFunc
? getContainer.toString() !== prevGetContainer.toString()
: getContainer !== prevGetContainer
) {
this.removeCurrentContainer(false);
}
},
},
updated() {
this.setWrapperClassName();
},
beforeUnmount() {
const { visible } = this.$props;
// 离开时不会 render 导到离开时数值不变,改用 func 。。
openCount = visible && openCount ? openCount - 1 : openCount;
this.removeCurrentContainer(visible);
},
methods: {
getParent() {
const { getContainer } = this.$props;
if (getContainer) {
if (typeof getContainer === 'string') {
return document.querySelectorAll(getContainer)[0];
}
if (typeof getContainer === 'function') {
return getContainer();
}
if (typeof getContainer === 'object' && getContainer instanceof window.HTMLElement) {
return getContainer;
}
}
return document.body;
},
getDomContainer() {
if (windowIsUndefined) {
return null;
}
if (!this.container) {
this.container = document.createElement('div');
const parent = this.getParent();
if (parent) {
parent.appendChild(this.container);
}
}
this.setWrapperClassName();
return this.container;
},
setWrapperClassName() {
const { wrapperClassName } = this.$props;
if (this.container && wrapperClassName && wrapperClassName !== this.container.className) {
this.container.className = wrapperClassName;
}
},
savePortal(c) {
// Warning: don't rename _component
// https://github.com/react-component/util/pull/65#discussion_r352407916
this._component = c;
},
removeCurrentContainer() {
this.container = null;
this._component = null;
},
/**
* Enhance ./switchScrollingEffect
* 1. Simulate document body scroll bar with
* 2. Record body has overflow style and recover when all of PortalWrapper invisible
* 3. Disable body scroll when PortalWrapper has open
*
* @memberof PortalWrapper
*/
switchScrollingEffect() {
if (openCount === 1 && !Object.keys(cacheOverflow).length) {
switchScrollingEffect();
// Must be set after switchScrollingEffect
cacheOverflow = setStyle({
overflow: 'hidden',
overflowX: 'hidden',
overflowY: 'hidden',
});
} else if (!openCount) {
setStyle(cacheOverflow);
cacheOverflow = {};
switchScrollingEffect(true);
}
},
},
render() {
const { children, forceRender, visible } = this.$props;
let portal = null;
const childProps = {
getOpenCount: () => openCount,
getContainer: this.getDomContainer,
switchScrollingEffect: this.switchScrollingEffect,
};
if (forceRender || visible || this._component) {
portal = (
<Portal
getContainer={this.getDomContainer}
children={children(childProps)}
ref={this.savePortal}
></Portal>
);
}
return portal;
},
});

View File

@ -0,0 +1,191 @@
import PropTypes from './vue-types';
import Portal from './Portal';
import {
defineComponent,
shallowRef,
watch,
onMounted,
onBeforeUnmount,
onUpdated,
nextTick,
computed,
} from 'vue';
import canUseDom from './canUseDom';
import raf from './raf';
import { booleanType } from './type';
import useScrollLocker from './hooks/useScrollLocker';
let openCount = 0;
const supportDom = canUseDom();
/** @private Test usage only */
export function getOpenCount() {
return process.env.NODE_ENV === 'test' ? openCount : 0;
}
const getParent = (getContainer: GetContainer) => {
if (!supportDom) {
return null;
}
if (getContainer) {
if (typeof getContainer === 'string') {
return document.querySelectorAll(getContainer)[0] as HTMLElement;
}
if (typeof getContainer === 'function') {
return getContainer();
}
if (typeof getContainer === 'object' && getContainer instanceof window.HTMLElement) {
return getContainer;
}
}
return document.body;
};
export type GetContainer = string | HTMLElement | (() => HTMLElement);
export default defineComponent({
compatConfig: { MODE: 3 },
name: 'PortalWrapper',
inheritAttrs: false,
props: {
wrapperClassName: String,
forceRender: { type: Boolean, default: undefined },
getContainer: PropTypes.any,
visible: { type: Boolean, default: undefined },
autoLock: booleanType(),
didUpdate: Function,
},
setup(props, { slots }) {
const container = shallowRef<HTMLElement>();
const componentRef = shallowRef();
const rafId = shallowRef<number>();
const triggerUpdate = shallowRef(1);
const defaultContainer = canUseDom() && document.createElement('div');
const removeCurrentContainer = () => {
// Portal will remove from `parentNode`.
// Let's handle this again to avoid refactor issue.
if (container.value === defaultContainer) {
container.value?.parentNode?.removeChild(container.value);
}
container.value = null;
};
let parent: HTMLElement = null;
const attachToParent = (force = false) => {
if (force || (container.value && !container.value.parentNode)) {
parent = getParent(props.getContainer);
if (parent) {
parent.appendChild(container.value);
return true;
}
return false;
}
return true;
};
const getContainer = () => {
if (!supportDom) {
return null;
}
if (!container.value) {
container.value = defaultContainer;
attachToParent(true);
}
setWrapperClassName();
return container.value;
};
const setWrapperClassName = () => {
const { wrapperClassName } = props;
if (container.value && wrapperClassName && wrapperClassName !== container.value.className) {
container.value.className = wrapperClassName;
}
};
onUpdated(() => {
setWrapperClassName();
attachToParent();
});
useScrollLocker(
computed(() => {
return (
props.autoLock &&
props.visible &&
canUseDom() &&
(container.value === document.body || container.value === defaultContainer)
);
}),
);
onMounted(() => {
let init = false;
watch(
[() => props.visible, () => props.getContainer],
([visible, getContainer], [prevVisible, prevGetContainer]) => {
// Update count
if (supportDom) {
parent = getParent(props.getContainer);
if (parent === document.body) {
if (visible && !prevVisible) {
openCount += 1;
} else if (init) {
openCount -= 1;
}
}
}
if (init) {
// Clean up container if needed
const getContainerIsFunc =
typeof getContainer === 'function' && typeof prevGetContainer === 'function';
if (
getContainerIsFunc
? getContainer.toString() !== prevGetContainer.toString()
: getContainer !== prevGetContainer
) {
removeCurrentContainer();
}
}
init = true;
},
{ immediate: true, flush: 'post' },
);
nextTick(() => {
if (!attachToParent()) {
rafId.value = raf(() => {
triggerUpdate.value += 1;
});
}
});
});
onBeforeUnmount(() => {
const { visible } = props;
if (supportDom && parent === document.body) {
// render func
openCount = visible && openCount ? openCount - 1 : openCount;
}
removeCurrentContainer();
raf.cancel(rafId.value);
});
return () => {
const { forceRender, visible } = props;
let portal = null;
const childProps = {
getOpenCount: () => openCount,
getContainer,
};
if (triggerUpdate.value && (forceRender || visible || componentRef.value)) {
portal = (
<Portal
getContainer={getContainer}
ref={componentRef}
didUpdate={props.didUpdate}
v-slots={{ default: () => slots.default?.(childProps) }}
></Portal>
);
}
return portal;
};
},
});

View File

@ -0,0 +1,13 @@
import { defineComponent } from 'vue';
export default defineComponent({
compatConfig: { MODE: 3 },
name: 'Portal',
inheritAttrs: false,
props: ['getContainer'],
setup(_props, { slots }) {
return () => {
return slots.default?.();
};
},
});

View File

@ -0,0 +1,11 @@
import { defineComponent } from 'vue';
import { customRenderSlot } from '../vnode';
export default defineComponent({
name: 'RenderSlot',
setup(_props, { slots }) {
return () => {
return customRenderSlot(slots, 'default', {}, () => ['default value']);
};
},
});

View File

@ -0,0 +1,8 @@
import UnreachableException from '../unreachableException';
describe('UnreachableException', () => {
it('error thrown matches snapshot', () => {
const exception = new UnreachableException('some value');
expect(exception.error.message).toMatchInlineSnapshot(`"unreachable case: \\"some value\\""`);
});
});

View File

@ -0,0 +1,26 @@
import RenderSlot from '../__mocks__/RenderSlot';
import { mount } from '@vue/test-utils';
import { nextTick } from 'vue';
describe('render slot content', () => {
it('renders slot content', () => {
const wrapper = mount(RenderSlot, {
slots: {
default: () => 'This is slot content',
},
});
expect(wrapper.html()).toContain('This is slot content');
});
it('render default value when slot is fragment', async () => {
const wrapper = mount(RenderSlot, {
slots: {
default: () => <></>,
},
});
await nextTick();
expect(wrapper.html()).toContain('default value');
});
});

View File

@ -1,35 +0,0 @@
function onCompositionStart(e) {
e.target.composing = true;
}
function onCompositionEnd(e) {
// prevent triggering an input event for no reason
if (!e.target.composing) return;
e.target.composing = false;
trigger(e.target, 'input');
}
function trigger(el, type) {
const e = document.createEvent('HTMLEvents');
e.initEvent(type, true, true);
el.dispatchEvent(e);
}
export function addEventListener(el, event, handler, options) {
el.addEventListener(event, handler, options);
}
const antInput = {
created(el, binding) {
if (!binding.modifiers || !binding.modifiers.lazy) {
addEventListener(el, 'compositionstart', onCompositionStart);
addEventListener(el, 'compositionend', onCompositionEnd);
// Safari < 10.2 & UIWebView doesn't fire compositionend when
// switching focus before confirming composition choice
// this also fixes the issue where some browsers e.g. iOS Chrome
// fires "change" instead of "input" on autocomplete.
addEventListener(el, 'change', onCompositionEnd);
}
},
};
export default antInput;

View File

@ -0,0 +1,50 @@
import { nextTick } from 'vue';
import { addClass, removeClass } from '../vc-util/Dom/class';
import type { CSSMotionProps } from './transition';
const collapseMotion = (name = 'ant-motion-collapse', appear = true): CSSMotionProps => {
return {
name,
appear,
css: true,
onBeforeEnter: (node: HTMLDivElement) => {
node.style.height = '0px';
node.style.opacity = '0';
addClass(node, name);
},
onEnter: (node: HTMLDivElement) => {
nextTick(() => {
node.style.height = `${node.scrollHeight}px`;
node.style.opacity = '1';
});
},
onAfterEnter: (node: HTMLDivElement) => {
if (node) {
removeClass(node, name);
node.style.height = null;
node.style.opacity = null;
}
},
onBeforeLeave: (node: HTMLDivElement) => {
addClass(node, name);
node.style.height = `${node.offsetHeight}px`;
node.style.opacity = null;
},
onLeave: (node: HTMLDivElement) => {
setTimeout(() => {
node.style.height = '0px';
node.style.opacity = '0';
});
},
onAfterLeave: (node: HTMLDivElement) => {
if (node) {
removeClass(node, name);
if (node.style) {
node.style.height = null;
node.style.opacity = null;
}
}
},
};
};
export default collapseMotion;

View File

@ -1,23 +1,34 @@
import type { ElementOf } from './type'; import type { PresetColorKey } from '../theme/interface';
import { tuple } from './type'; import { PresetColors } from '../theme/interface';
export const PresetStatusColorTypes = tuple('success', 'processing', 'error', 'default', 'warning'); type InverseColor = `${PresetColorKey}-inverse`;
const inverseColors = PresetColors.map<InverseColor>(color => `${color}-inverse`);
export const PresetColorTypes = tuple( export const PresetStatusColorTypes = [
'pink', 'success',
'red', 'processing',
'yellow', 'error',
'orange', 'default',
'cyan', 'warning',
'green', ] as const;
'blue',
'purple',
'geekblue',
'magenta',
'volcano',
'gold',
'lime',
);
export type PresetColorType = ElementOf<typeof PresetColorTypes>; export type PresetColorType = PresetColorKey | InverseColor;
export type PresetStatusColorType = ElementOf<typeof PresetStatusColorTypes>;
export type PresetStatusColorType = (typeof PresetStatusColorTypes)[number];
/**
* determine if the color keyword belongs to the `Ant Design` {@link PresetColors}.
* @param color color to be judged
* @param includeInverse whether to include reversed colors
*/
export function isPresetColor(color?: any, includeInverse = true) {
if (includeInverse) {
return [...inverseColors, ...PresetColors].includes(color);
}
return PresetColors.includes(color);
}
export function isPresetStatusColor(color?: any): color is PresetStatusColorType {
return PresetStatusColorTypes.includes(color);
}

View File

@ -1,22 +0,0 @@
/**
* Safe chained function
*
* Will only create a new function if needed,
* otherwise will pass back existing functions or null.
*
* @returns {function|null}
*/
export default function createChainedFunction() {
const args = [].slice.call(arguments, 0);
if (args.length === 1) {
return args[0];
}
return function chainedFunction() {
for (let i = 0; i < args.length; i++) {
if (args[i] && args[i].apply) {
args[i].apply(this, arguments);
}
}
};
}

View File

@ -0,0 +1,22 @@
import { inject, provide, reactive, watchEffect } from 'vue';
function createContext<T extends Record<string, any>>(defaultValue?: T) {
const contextKey = Symbol('contextKey');
const useProvide = (props: T, newProps?: T) => {
const mergedProps = reactive<T>({} as T);
provide(contextKey, mergedProps);
watchEffect(() => {
Object.assign(mergedProps, props, newProps || {});
});
return mergedProps;
};
const useInject = () => {
return inject(contextKey, defaultValue as T) || ({} as T);
};
return {
useProvide,
useInject,
};
}
export default createContext;

View File

@ -1,130 +0,0 @@
const START_EVENT_NAME_MAP = {
transitionstart: {
transition: 'transitionstart',
WebkitTransition: 'webkitTransitionStart',
MozTransition: 'mozTransitionStart',
OTransition: 'oTransitionStart',
msTransition: 'MSTransitionStart',
},
animationstart: {
animation: 'animationstart',
WebkitAnimation: 'webkitAnimationStart',
MozAnimation: 'mozAnimationStart',
OAnimation: 'oAnimationStart',
msAnimation: 'MSAnimationStart',
},
};
const END_EVENT_NAME_MAP = {
transitionend: {
transition: 'transitionend',
WebkitTransition: 'webkitTransitionEnd',
MozTransition: 'mozTransitionEnd',
OTransition: 'oTransitionEnd',
msTransition: 'MSTransitionEnd',
},
animationend: {
animation: 'animationend',
WebkitAnimation: 'webkitAnimationEnd',
MozAnimation: 'mozAnimationEnd',
OAnimation: 'oAnimationEnd',
msAnimation: 'MSAnimationEnd',
},
};
const startEvents = [];
const endEvents = [];
function detectEvents() {
const testEl = document.createElement('div');
const style = testEl.style;
if (!('AnimationEvent' in window)) {
delete START_EVENT_NAME_MAP.animationstart.animation;
delete END_EVENT_NAME_MAP.animationend.animation;
}
if (!('TransitionEvent' in window)) {
delete START_EVENT_NAME_MAP.transitionstart.transition;
delete END_EVENT_NAME_MAP.transitionend.transition;
}
function process(EVENT_NAME_MAP, events) {
for (const baseEventName in EVENT_NAME_MAP) {
if (EVENT_NAME_MAP.hasOwnProperty(baseEventName)) {
const baseEvents = EVENT_NAME_MAP[baseEventName];
for (const styleName in baseEvents) {
if (styleName in style) {
events.push(baseEvents[styleName]);
break;
}
}
}
}
}
process(START_EVENT_NAME_MAP, startEvents);
process(END_EVENT_NAME_MAP, endEvents);
}
if (typeof window !== 'undefined' && typeof document !== 'undefined') {
detectEvents();
}
function addEventListener(node, eventName, eventListener) {
node.addEventListener(eventName, eventListener, false);
}
function removeEventListener(node, eventName, eventListener) {
node.removeEventListener(eventName, eventListener, false);
}
const TransitionEvents = {
// Start events
startEvents,
addStartEventListener(node, eventListener) {
if (startEvents.length === 0) {
window.setTimeout(eventListener, 0);
return;
}
startEvents.forEach(startEvent => {
addEventListener(node, startEvent, eventListener);
});
},
removeStartEventListener(node, eventListener) {
if (startEvents.length === 0) {
return;
}
startEvents.forEach(startEvent => {
removeEventListener(node, startEvent, eventListener);
});
},
// End events
endEvents,
addEndEventListener(node, eventListener) {
if (endEvents.length === 0) {
window.setTimeout(eventListener, 0);
return;
}
endEvents.forEach(endEvent => {
addEventListener(node, endEvent, eventListener);
});
},
removeEndEventListener(node, eventListener) {
if (endEvents.length === 0) {
return;
}
endEvents.forEach(endEvent => {
removeEventListener(node, endEvent, eventListener);
});
},
};
export default TransitionEvents;

View File

@ -1,184 +0,0 @@
// https://github.com/yiminghe/css-animation 1.5.0
import Event from './Event';
import classes from '../component-classes';
import { requestAnimationTimeout, cancelAnimationTimeout } from '../requestAnimationTimeout';
const isCssAnimationSupported = Event.endEvents.length !== 0;
const capitalPrefixes = [
'Webkit',
'Moz',
'O',
// ms is special .... !
'ms',
];
const prefixes = ['-webkit-', '-moz-', '-o-', 'ms-', ''];
function getStyleProperty(node, name) {
// old ff need null, https://developer.mozilla.org/en-US/docs/Web/API/Window/getComputedStyle
const style = window.getComputedStyle(node, null);
let ret = '';
for (let i = 0; i < prefixes.length; i++) {
ret = style.getPropertyValue(prefixes[i] + name);
if (ret) {
break;
}
}
return ret;
}
function fixBrowserByTimeout(node) {
if (isCssAnimationSupported) {
const transitionDelay = parseFloat(getStyleProperty(node, 'transition-delay')) || 0;
const transitionDuration = parseFloat(getStyleProperty(node, 'transition-duration')) || 0;
const animationDelay = parseFloat(getStyleProperty(node, 'animation-delay')) || 0;
const animationDuration = parseFloat(getStyleProperty(node, 'animation-duration')) || 0;
const time = Math.max(transitionDuration + transitionDelay, animationDuration + animationDelay);
// sometimes, browser bug
node.rcEndAnimTimeout = setTimeout(() => {
node.rcEndAnimTimeout = null;
if (node.rcEndListener) {
node.rcEndListener();
}
}, time * 1000 + 200);
}
}
function clearBrowserBugTimeout(node) {
if (node.rcEndAnimTimeout) {
clearTimeout(node.rcEndAnimTimeout);
node.rcEndAnimTimeout = null;
}
}
const cssAnimation = (node, transitionName, endCallback) => {
const nameIsObj = typeof transitionName === 'object';
const className = nameIsObj ? transitionName.name : transitionName;
const activeClassName = nameIsObj ? transitionName.active : `${transitionName}-active`;
let end = endCallback;
let start;
let active;
const nodeClasses = classes(node);
if (endCallback && Object.prototype.toString.call(endCallback) === '[object Object]') {
end = endCallback.end;
start = endCallback.start;
active = endCallback.active;
}
if (node.rcEndListener) {
node.rcEndListener();
}
node.rcEndListener = e => {
if (e && e.target !== node) {
return;
}
if (node.rcAnimTimeout) {
cancelAnimationTimeout(node.rcAnimTimeout);
node.rcAnimTimeout = null;
}
clearBrowserBugTimeout(node);
nodeClasses.remove(className);
nodeClasses.remove(activeClassName);
Event.removeEndEventListener(node, node.rcEndListener);
node.rcEndListener = null;
// Usually this optional end is used for informing an owner of
// a leave animation and telling it to remove the child.
if (end) {
end();
}
};
Event.addEndEventListener(node, node.rcEndListener);
if (start) {
start();
}
nodeClasses.add(className);
node.rcAnimTimeout = requestAnimationTimeout(() => {
node.rcAnimTimeout = null;
nodeClasses.add(className);
nodeClasses.add(activeClassName);
if (active) {
requestAnimationTimeout(active, 0);
}
fixBrowserByTimeout(node);
// 30ms for firefox
}, 30);
return {
stop() {
if (node.rcEndListener) {
node.rcEndListener();
}
},
};
};
cssAnimation.style = (node, style, callback) => {
if (node.rcEndListener) {
node.rcEndListener();
}
node.rcEndListener = e => {
if (e && e.target !== node) {
return;
}
if (node.rcAnimTimeout) {
cancelAnimationTimeout(node.rcAnimTimeout);
node.rcAnimTimeout = null;
}
clearBrowserBugTimeout(node);
Event.removeEndEventListener(node, node.rcEndListener);
node.rcEndListener = null;
// Usually this optional callback is used for informing an owner of
// a leave animation and telling it to remove the child.
if (callback) {
callback();
}
};
Event.addEndEventListener(node, node.rcEndListener);
node.rcAnimTimeout = requestAnimationTimeout(() => {
for (const s in style) {
if (style.hasOwnProperty(s)) {
node.style[s] = style[s];
}
}
node.rcAnimTimeout = null;
fixBrowserByTimeout(node);
}, 0);
};
cssAnimation.setTransition = (node, p, value) => {
let property = p;
let v = value;
if (value === undefined) {
v = property;
property = '';
}
property = property || '';
capitalPrefixes.forEach(prefix => {
node.style[`${prefix}Transition${property}`] = v;
});
};
cssAnimation.isCssAnimationSupported = isCssAnimationSupported;
export { isCssAnimationSupported };
export default cssAnimation;

View File

@ -0,0 +1,29 @@
export type KeyType = string | number;
type ValueType = [number, any]; // [times, realValue]
const SPLIT = '%';
class Entity {
instanceId: string;
constructor(instanceId: string) {
this.instanceId = instanceId;
}
/** @private Internal cache map. Do not access this directly */
cache = new Map<string, ValueType>();
get(keys: KeyType[] | string): ValueType | null {
return this.cache.get(Array.isArray(keys) ? keys.join(SPLIT) : keys) || null;
}
update(keys: KeyType[] | string, valueFn: (origin: ValueType | null) => ValueType | null) {
const path = Array.isArray(keys) ? keys.join(SPLIT) : keys;
const prevValue = this.cache.get(path)!;
const nextValue = valueFn(prevValue);
if (nextValue === null) {
this.cache.delete(path);
} else {
this.cache.set(path, nextValue);
}
}
}
export default Entity;

View File

@ -0,0 +1,19 @@
import type { CSSInterpolation } from './hooks/useStyleRegister';
class Keyframe {
private name: string;
style: CSSInterpolation;
constructor(name: string, style: CSSInterpolation) {
this.name = name;
this.style = style;
}
getName(hashId = ''): string {
return hashId ? `${hashId}-${this.name}` : this.name;
}
_keyframe = true;
}
export default Keyframe;

View File

@ -0,0 +1,195 @@
import type { ShallowRef, ExtractPropTypes, InjectionKey, Ref } from 'vue';
import {
provide,
defineComponent,
unref,
inject,
watch,
shallowRef,
getCurrentInstance,
} from 'vue';
import CacheEntity from './Cache';
import type { Linter } from './linters/interface';
import type { Transformer } from './transformers/interface';
import { arrayType, booleanType, objectType, someType, stringType, withInstall } from '../type';
export const ATTR_TOKEN = 'data-token-hash';
export const ATTR_MARK = 'data-css-hash';
export const ATTR_CACHE_PATH = 'data-cache-path';
// Mark css-in-js instance in style element
export const CSS_IN_JS_INSTANCE = '__cssinjs_instance__';
export function createCache() {
const cssinjsInstanceId = Math.random().toString(12).slice(2);
// Tricky SSR: Move all inline style to the head.
// PS: We do not recommend tricky mode.
if (typeof document !== 'undefined' && document.head && document.body) {
const styles = document.body.querySelectorAll(`style[${ATTR_MARK}]`) || [];
const { firstChild } = document.head;
Array.from(styles).forEach(style => {
(style as any)[CSS_IN_JS_INSTANCE] = (style as any)[CSS_IN_JS_INSTANCE] || cssinjsInstanceId;
// Not force move if no head
// Not force move if no head
if ((style as any)[CSS_IN_JS_INSTANCE] === cssinjsInstanceId) {
document.head.insertBefore(style, firstChild);
}
});
// Deduplicate of moved styles
const styleHash: Record<string, boolean> = {};
Array.from(document.querySelectorAll(`style[${ATTR_MARK}]`)).forEach(style => {
const hash = style.getAttribute(ATTR_MARK)!;
if (styleHash[hash]) {
if ((style as any)[CSS_IN_JS_INSTANCE] === cssinjsInstanceId) {
style.parentNode?.removeChild(style);
}
} else {
styleHash[hash] = true;
}
});
}
return new CacheEntity(cssinjsInstanceId);
}
export type HashPriority = 'low' | 'high';
export interface StyleContextProps {
autoClear?: boolean;
/** @private Test only. Not work in production. */
mock?: 'server' | 'client';
/**
* Only set when you need ssr to extract style on you own.
* If not provided, it will auto create <style /> on the end of Provider in server side.
*/
cache: CacheEntity;
/** Tell children that this context is default generated context */
defaultCache: boolean;
/** Use `:where` selector to reduce hashId css selector priority */
hashPriority?: HashPriority;
/** Tell cssinjs where to inject style in */
container?: Element | ShadowRoot;
/** Component wil render inline `<style />` for fallback in SSR. Not recommend. */
ssrInline?: boolean;
/** Transform css before inject in document. Please note that `transformers` do not support dynamic update */
transformers?: Transformer[];
/**
* Linters to lint css before inject in document.
* Styles will be linted after transforming.
* Please note that `linters` do not support dynamic update.
*/
linters?: Linter[];
}
const StyleContextKey: InjectionKey<ShallowRef<Partial<StyleContextProps>>> =
Symbol('StyleContextKey');
export type UseStyleProviderProps = Partial<StyleContextProps> | Ref<Partial<StyleContextProps>>;
// fix: https://github.com/vueComponent/ant-design-vue/issues/7023
const getCache = () => {
const instance = getCurrentInstance();
let cache: CacheEntity;
if (instance && instance.appContext) {
const globalCache = instance.appContext?.config?.globalProperties?.__ANTDV_CSSINJS_CACHE__;
if (globalCache) {
cache = globalCache;
} else {
cache = createCache();
if (instance.appContext.config.globalProperties) {
instance.appContext.config.globalProperties.__ANTDV_CSSINJS_CACHE__ = cache;
}
}
} else {
cache = createCache();
}
return cache;
};
const defaultStyleContext: StyleContextProps = {
cache: createCache(),
defaultCache: true,
hashPriority: 'low',
};
// fix: https://github.com/vueComponent/ant-design-vue/issues/6912
export const useStyleInject = () => {
const cache = getCache();
return inject(StyleContextKey, shallowRef({ ...defaultStyleContext, cache }));
};
export const useStyleProvider = (props: UseStyleProviderProps) => {
const parentContext = useStyleInject();
const context = shallowRef<Partial<StyleContextProps>>({
...defaultStyleContext,
cache: createCache(),
});
watch(
[() => unref(props), parentContext],
() => {
const mergedContext: Partial<StyleContextProps> = {
...parentContext.value,
};
const propsValue = unref(props);
Object.keys(propsValue).forEach(key => {
const value = propsValue[key];
if (propsValue[key] !== undefined) {
mergedContext[key] = value;
}
});
const { cache } = propsValue;
mergedContext.cache = mergedContext.cache || createCache();
mergedContext.defaultCache = !cache && parentContext.value.defaultCache;
context.value = mergedContext;
},
{ immediate: true },
);
provide(StyleContextKey, context);
return context;
};
export const styleProviderProps = () => ({
autoClear: booleanType(),
/** @private Test only. Not work in production. */
mock: stringType<'server' | 'client'>(),
/**
* Only set when you need ssr to extract style on you own.
* If not provided, it will auto create <style /> on the end of Provider in server side.
*/
cache: objectType<CacheEntity>(),
/** Tell children that this context is default generated context */
defaultCache: booleanType(),
/** Use `:where` selector to reduce hashId css selector priority */
hashPriority: stringType<HashPriority>(),
/** Tell cssinjs where to inject style in */
container: someType<Element | ShadowRoot>(),
/** Component wil render inline `<style />` for fallback in SSR. Not recommend. */
ssrInline: booleanType(),
/** Transform css before inject in document. Please note that `transformers` do not support dynamic update */
transformers: arrayType<Transformer[]>(),
/**
* Linters to lint css before inject in document.
* Styles will be linted after transforming.
* Please note that `linters` do not support dynamic update.
*/
linters: arrayType<Linter[]>(),
});
export type StyleProviderProps = Partial<ExtractPropTypes<ReturnType<typeof styleProviderProps>>>;
export const StyleProvider = withInstall(
defineComponent({
name: 'AStyleProvider',
inheritAttrs: false,
props: styleProviderProps(),
setup(props, { slots }) {
useStyleProvider(props);
return () => slots.default?.();
},
}),
);
export default {
useStyleInject,
useStyleProvider,
StyleProvider,
};

View File

@ -0,0 +1,165 @@
import hash from '@emotion/hash';
import { ATTR_TOKEN, CSS_IN_JS_INSTANCE, useStyleInject } from '../StyleContext';
import type Theme from '../theme/Theme';
import useGlobalCache from './useGlobalCache';
import { flattenToken, token2key } from '../util';
import type { Ref } from 'vue';
import { ref, computed } from 'vue';
const EMPTY_OVERRIDE = {};
const isProduction = process.env.NODE_ENV === 'production';
// nuxt generate when NODE_ENV is prerender
const isPrerender = process.env.NODE_ENV === 'prerender';
// Generate different prefix to make user selector break in production env.
// This helps developer not to do style override directly on the hash id.
const hashPrefix = !isProduction && !isPrerender ? 'css-dev-only-do-not-override' : 'css';
export interface Option<DerivativeToken, DesignToken> {
/**
* Generate token with salt.
* This is used to generate different hashId even same derivative token for different version.
*/
salt?: string;
override?: object;
/**
* Format token as you need. Such as:
*
* - rename token
* - merge token
* - delete token
*
* This should always be the same since it's one time process.
* It's ok to useMemo outside but this has better cache strategy.
*/
formatToken?: (mergedToken: any) => DerivativeToken;
/**
* Get final token with origin token, override token and theme.
* The parameters do not contain formatToken since it's passed by user.
* @param origin The original token.
* @param override Extra tokens to override.
* @param theme Theme instance. Could get derivative token by `theme.getDerivativeToken`
*/
getComputedToken?: (
origin: DesignToken,
override: object,
theme: Theme<any, any>,
) => DerivativeToken;
}
const tokenKeys = new Map<string, number>();
function recordCleanToken(tokenKey: string) {
tokenKeys.set(tokenKey, (tokenKeys.get(tokenKey) || 0) + 1);
}
function removeStyleTags(key: string, instanceId: string) {
if (typeof document !== 'undefined') {
const styles = document.querySelectorAll(`style[${ATTR_TOKEN}="${key}"]`);
styles.forEach(style => {
if ((style as any)[CSS_IN_JS_INSTANCE] === instanceId) {
style.parentNode?.removeChild(style);
}
});
}
}
const TOKEN_THRESHOLD = 0;
// Remove will check current keys first
function cleanTokenStyle(tokenKey: string, instanceId: string) {
tokenKeys.set(tokenKey, (tokenKeys.get(tokenKey) || 0) - 1);
const tokenKeyList = Array.from(tokenKeys.keys());
const cleanableKeyList = tokenKeyList.filter(key => {
const count = tokenKeys.get(key) || 0;
return count <= 0;
});
// Should keep tokens under threshold for not to insert style too often
if (tokenKeyList.length - cleanableKeyList.length > TOKEN_THRESHOLD) {
cleanableKeyList.forEach(key => {
removeStyleTags(key, instanceId);
tokenKeys.delete(key);
});
}
}
export const getComputedToken = <DerivativeToken = object, DesignToken = DerivativeToken>(
originToken: DesignToken,
overrideToken: object,
theme: Theme<any, any>,
format?: (token: DesignToken) => DerivativeToken,
) => {
const derivativeToken = theme.getDerivativeToken(originToken);
// Merge with override
let mergedDerivativeToken = {
...derivativeToken,
...overrideToken,
};
// Format if needed
if (format) {
mergedDerivativeToken = format(mergedDerivativeToken);
}
return mergedDerivativeToken;
};
/**
* Cache theme derivative token as global shared one
* @param theme Theme entity
* @param tokens List of tokens, used for cache. Please do not dynamic generate object directly
* @param option Additional config
* @returns Call Theme.getDerivativeToken(tokenObject) to get token
*/
export default function useCacheToken<DerivativeToken = object, DesignToken = DerivativeToken>(
theme: Ref<Theme<any, any>>,
tokens: Ref<Partial<DesignToken>[]>,
option: Ref<Option<DerivativeToken, DesignToken>> = ref({}),
) {
const style = useStyleInject();
// Basic - We do basic cache here
const mergedToken = computed(() => Object.assign({}, ...tokens.value));
const tokenStr = computed(() => flattenToken(mergedToken.value));
const overrideTokenStr = computed(() => flattenToken(option.value.override || EMPTY_OVERRIDE));
const cachedToken = useGlobalCache<[DerivativeToken & { _tokenKey: string }, string]>(
'token',
computed(() => [
option.value.salt || '',
theme.value.id,
tokenStr.value,
overrideTokenStr.value,
]),
() => {
const {
salt = '',
override = EMPTY_OVERRIDE,
formatToken,
getComputedToken: compute,
} = option.value;
const mergedDerivativeToken = compute
? compute(mergedToken.value, override, theme.value)
: getComputedToken(mergedToken.value, override, theme.value, formatToken);
// Optimize for `useStyleRegister` performance
const tokenKey = token2key(mergedDerivativeToken, salt);
mergedDerivativeToken._tokenKey = tokenKey;
recordCleanToken(tokenKey);
const hashId = `${hashPrefix}-${hash(tokenKey)}`;
mergedDerivativeToken._hashId = hashId; // Not used
return [mergedDerivativeToken, hashId];
},
cache => {
// Remove token will remove all related style
cleanTokenStyle(cache[0]._tokenKey, style.value?.cache.instanceId);
},
);
return cachedToken;
}

View File

@ -0,0 +1,58 @@
import { useStyleInject } from '../StyleContext';
import type { KeyType } from '../Cache';
import useHMR from './useHMR';
import type { ShallowRef, Ref } from 'vue';
import { onBeforeUnmount, watch, watchEffect, shallowRef } from 'vue';
export default function useClientCache<CacheType>(
prefix: string,
keyPath: Ref<KeyType[]>,
cacheFn: () => CacheType,
onCacheRemove?: (cache: CacheType, fromHMR: boolean) => void,
): ShallowRef<CacheType> {
const styleContext = useStyleInject();
const fullPathStr = shallowRef('');
const res = shallowRef<CacheType>();
watchEffect(() => {
fullPathStr.value = [prefix, ...keyPath.value].join('%');
});
const HMRUpdate = useHMR();
const clearCache = (pathStr: string) => {
styleContext.value.cache.update(pathStr, prevCache => {
const [times = 0, cache] = prevCache || [];
const nextCount = times - 1;
if (nextCount === 0) {
onCacheRemove?.(cache, false);
return null;
}
return [times - 1, cache];
});
};
watch(
fullPathStr,
(newStr, oldStr) => {
if (oldStr) clearCache(oldStr);
// Create cache
styleContext.value.cache.update(newStr, prevCache => {
const [times = 0, cache] = prevCache || [];
// HMR should always ignore cache since developer may change it
let tmpCache = cache;
if (process.env.NODE_ENV !== 'production' && cache && HMRUpdate) {
onCacheRemove?.(tmpCache, HMRUpdate);
tmpCache = null;
}
const mergedCache = tmpCache || cacheFn();
return [times + 1, mergedCache];
});
res.value = styleContext.value.cache.get(fullPathStr.value)![1];
},
{ immediate: true },
);
onBeforeUnmount(() => {
clearCache(fullPathStr.value);
});
return res;
}

View File

@ -0,0 +1,34 @@
function useProdHMR() {
return false;
}
let webpackHMR = false;
function useDevHMR() {
return webpackHMR;
}
export default process.env.NODE_ENV === 'production' ? useProdHMR : useDevHMR;
// Webpack `module.hot.accept` do not support any deps update trigger
// We have to hack handler to force mark as HRM
if (
process.env.NODE_ENV !== 'production' &&
typeof module !== 'undefined' &&
module &&
(module as any).hot &&
typeof window !== 'undefined'
) {
const win = window as any;
if (typeof win.webpackHotUpdate === 'function') {
const originWebpackHotUpdate = win.webpackHotUpdate;
win.webpackHotUpdate = (...args: any[]) => {
webpackHMR = true;
setTimeout(() => {
webpackHMR = false;
}, 0);
return originWebpackHotUpdate(...args);
};
}
}

View File

@ -0,0 +1,91 @@
import canUseDom from '../../../../_util/canUseDom';
import { ATTR_MARK } from '../../StyleContext';
export const ATTR_CACHE_MAP = 'data-ant-cssinjs-cache-path';
/**
* This marks style from the css file.
* Which means not exist in `<style />` tag.
*/
export const CSS_FILE_STYLE = '_FILE_STYLE__';
export function serialize(cachePathMap: Record<string, string>) {
return Object.keys(cachePathMap)
.map(path => {
const hash = cachePathMap[path];
return `${path}:${hash}`;
})
.join(';');
}
let cachePathMap: Record<string, string>;
let fromCSSFile = true;
/**
* @private Test usage only. Can save remove if no need.
*/
export function reset(mockCache?: Record<string, string>, fromFile = true) {
cachePathMap = mockCache!;
fromCSSFile = fromFile;
}
export function prepare() {
if (!cachePathMap) {
cachePathMap = {};
if (canUseDom()) {
const div = document.createElement('div');
div.className = ATTR_CACHE_MAP;
div.style.position = 'fixed';
div.style.visibility = 'hidden';
div.style.top = '-9999px';
document.body.appendChild(div);
let content = getComputedStyle(div).content || '';
content = content.replace(/^"/, '').replace(/"$/, '');
// Fill data
content.split(';').forEach(item => {
const [path, hash] = item.split(':');
cachePathMap[path] = hash;
});
// Remove inline record style
const inlineMapStyle = document.querySelector(`style[${ATTR_CACHE_MAP}]`);
if (inlineMapStyle) {
fromCSSFile = false;
inlineMapStyle.parentNode?.removeChild(inlineMapStyle);
}
document.body.removeChild(div);
}
}
}
export function existPath(path: string) {
prepare();
return !!cachePathMap[path];
}
export function getStyleAndHash(path: string): [style: string | null, hash: string] {
const hash = cachePathMap[path];
let styleStr: string | null = null;
if (hash && canUseDom()) {
if (fromCSSFile) {
styleStr = CSS_FILE_STYLE;
} else {
const style = document.querySelector(`style[${ATTR_MARK}="${cachePathMap[path]}"]`);
if (style) {
styleStr = style.innerHTML;
} else {
// Clean up since not exist anymore
delete cachePathMap[path];
}
}
}
return [styleStr, hash];
}

View File

@ -0,0 +1,566 @@
import hash from '@emotion/hash';
import type * as CSS from 'csstype';
// @ts-ignore
import unitless from '@emotion/unitless';
import { compile, serialize, stringify } from 'stylis';
import type { Theme, Transformer } from '../..';
import type Cache from '../../Cache';
import type Keyframes from '../../Keyframes';
import type { Linter } from '../../linters';
import { contentQuotesLinter, hashedAnimationLinter } from '../../linters';
import type { HashPriority } from '../../StyleContext';
import {
useStyleInject,
ATTR_CACHE_PATH,
ATTR_MARK,
ATTR_TOKEN,
CSS_IN_JS_INSTANCE,
} from '../../StyleContext';
import { supportLayer } from '../../util';
import useGlobalCache from '../useGlobalCache';
import { removeCSS, updateCSS } from '../../../../vc-util/Dom/dynamicCSS';
import type { Ref } from 'vue';
import { computed } from 'vue';
import type { VueNode } from '../../../type';
import canUseDom from '../../../../_util/canUseDom';
import {
ATTR_CACHE_MAP,
existPath,
getStyleAndHash,
serialize as serializeCacheMap,
} from './cacheMapUtil';
const isClientSide = canUseDom();
const SKIP_CHECK = '_skip_check_';
const MULTI_VALUE = '_multi_value_';
export type CSSProperties = Omit<CSS.PropertiesFallback<number | string>, 'animationName'> & {
animationName?: CSS.PropertiesFallback<number | string>['animationName'] | Keyframes;
};
export type CSSPropertiesWithMultiValues = {
[K in keyof CSSProperties]:
| CSSProperties[K]
| readonly Extract<CSSProperties[K], string>[]
| {
[SKIP_CHECK]?: boolean;
[MULTI_VALUE]?: boolean;
value: CSSProperties[K] | CSSProperties[K][];
};
};
export type CSSPseudos = { [K in CSS.Pseudos]?: CSSObject };
type ArrayCSSInterpolation = readonly CSSInterpolation[];
export type InterpolationPrimitive = null | undefined | boolean | number | string | CSSObject;
export type CSSInterpolation = InterpolationPrimitive | ArrayCSSInterpolation | Keyframes;
export type CSSOthersObject = Record<string, CSSInterpolation>;
export interface CSSObject extends CSSPropertiesWithMultiValues, CSSPseudos, CSSOthersObject {}
// ============================================================================
// == Parser ==
// ============================================================================
// Preprocessor style content to browser support one
export function normalizeStyle(styleStr: string): string {
const serialized = serialize(compile(styleStr), stringify);
return serialized.replace(/\{%%%\:[^;];}/g, ';');
}
function isCompoundCSSProperty(value: CSSObject[string]) {
return typeof value === 'object' && value && (SKIP_CHECK in value || MULTI_VALUE in value);
}
// hash
function injectSelectorHash(key: string, hashId: string, hashPriority?: HashPriority) {
if (!hashId) {
return key;
}
const hashClassName = `.${hashId}`;
const hashSelector = hashPriority === 'low' ? `:where(${hashClassName})` : hashClassName;
// hashId
const keys = key.split(',').map(k => {
const fullPath = k.trim().split(/\s+/);
// Selector HTML Element
let firstPath = fullPath[0] || '';
const htmlElement = firstPath.match(/^\w+/)?.[0] || '';
firstPath = `${htmlElement}${hashSelector}${firstPath.slice(htmlElement.length)}`;
return [firstPath, ...fullPath.slice(1)].join(' ');
});
return keys.join(',');
}
export interface ParseConfig {
hashId?: string;
hashPriority?: HashPriority;
layer?: string;
path?: string;
transformers?: Transformer[];
linters?: Linter[];
}
export interface ParseInfo {
root?: boolean;
injectHash?: boolean;
parentSelectors: string[];
}
// Global effect style will mount once and not removed
// The effect will not save in SSR cache (e.g. keyframes)
const globalEffectStyleKeys = new Set();
/**
* @private Test only. Clear the global effect style keys.
*/
export const _cf =
process.env.NODE_ENV !== 'production' ? () => globalEffectStyleKeys.clear() : undefined;
// Parse CSSObject to style content
export const parseStyle = (
interpolation: CSSInterpolation,
config: ParseConfig = {},
{ root, injectHash, parentSelectors }: ParseInfo = {
root: true,
parentSelectors: [],
},
): [
parsedStr: string,
// Style content which should be unique on all of the style (e.g. Keyframes).
// Firefox will flick with same animation name when exist multiple same keyframes.
effectStyle: Record<string, string>,
] => {
const { hashId, layer, path, hashPriority, transformers = [], linters = [] } = config;
let styleStr = '';
let effectStyle: Record<string, string> = {};
function parseKeyframes(keyframes: Keyframes) {
const animationName = keyframes.getName(hashId);
if (!effectStyle[animationName]) {
const [parsedStr] = parseStyle(keyframes.style, config, {
root: false,
parentSelectors,
});
effectStyle[animationName] = `@keyframes ${keyframes.getName(hashId)}${parsedStr}`;
}
}
function flattenList(list: ArrayCSSInterpolation, fullList: CSSObject[] = []) {
list.forEach(item => {
if (Array.isArray(item)) {
flattenList(item, fullList);
} else if (item) {
fullList.push(item as CSSObject);
}
});
return fullList;
}
const flattenStyleList = flattenList(
Array.isArray(interpolation) ? interpolation : [interpolation],
);
flattenStyleList.forEach(originStyle => {
// Only root level can use raw string
const style: CSSObject = typeof originStyle === 'string' && !root ? {} : originStyle;
if (typeof style === 'string') {
styleStr += `${style}\n`;
} else if ((style as any)._keyframe) {
// Keyframe
parseKeyframes(style as unknown as Keyframes);
} else {
const mergedStyle = transformers.reduce((prev, trans) => trans?.visit?.(prev) || prev, style);
// Normal CSSObject
Object.keys(mergedStyle).forEach(key => {
const value = mergedStyle[key];
if (
typeof value === 'object' &&
value &&
(key !== 'animationName' || !(value as Keyframes)._keyframe) &&
!isCompoundCSSProperty(value)
) {
let subInjectHash = false;
//
let mergedKey = key.trim();
// Whether treat child as root. In most case it is false.
let nextRoot = false;
//
if ((root || injectHash) && hashId) {
if (mergedKey.startsWith('@')) {
// hashId
subInjectHash = true;
} else {
// hashId
mergedKey = injectSelectorHash(key, hashId, hashPriority);
}
} else if (root && !hashId && (mergedKey === '&' || mergedKey === '')) {
// In case of `{ '&': { a: { color: 'red' } } }` or `{ '': { a: { color: 'red' } } }` without hashId,
// we will get `&{a:{color:red;}}` or `{a:{color:red;}}` string for stylis to compile.
// But it does not conform to stylis syntax,
// and finally we will get `{color:red;}` as css, which is wrong.
// So we need to remove key in root, and treat child `{ a: { color: 'red' } }` as root.
mergedKey = '';
nextRoot = true;
}
const [parsedStr, childEffectStyle] = parseStyle(value as any, config, {
root: nextRoot,
injectHash: subInjectHash,
parentSelectors: [...parentSelectors, mergedKey],
});
effectStyle = {
...effectStyle,
...childEffectStyle,
};
styleStr += `${mergedKey}${parsedStr}`;
} else {
function appendStyle(cssKey: string, cssValue: any) {
if (
process.env.NODE_ENV !== 'production' &&
(typeof value !== 'object' || !(value as any)?.[SKIP_CHECK])
) {
[contentQuotesLinter, hashedAnimationLinter, ...linters].forEach(linter =>
linter(cssKey, cssValue, { path, hashId, parentSelectors }),
);
}
//
const styleName = cssKey.replace(/[A-Z]/g, match => `-${match.toLowerCase()}`);
// Auto suffix with px
let formatValue = cssValue;
if (!unitless[cssKey] && typeof formatValue === 'number' && formatValue !== 0) {
formatValue = `${formatValue}px`;
}
// handle animationName & Keyframe value
if (cssKey === 'animationName' && (cssValue as Keyframes)?._keyframe) {
parseKeyframes(cssValue as Keyframes);
formatValue = (cssValue as Keyframes).getName(hashId);
}
styleStr += `${styleName}:${formatValue};`;
}
const actualValue = (value as any)?.value ?? value;
if (
typeof value === 'object' &&
(value as any)?.[MULTI_VALUE] &&
Array.isArray(actualValue)
) {
actualValue.forEach(item => {
appendStyle(key, item);
});
} else {
appendStyle(key, actualValue);
}
}
});
}
});
if (!root) {
styleStr = `{${styleStr}}`;
} else if (layer && supportLayer()) {
const layerCells = layer.split(',');
const layerName = layerCells[layerCells.length - 1].trim();
styleStr = `@layer ${layerName} {${styleStr}}`;
// Order of layer if needed
if (layerCells.length > 1) {
// zombieJ: stylis do not support layer order, so we need to handle it manually.
styleStr = `@layer ${layer}{%%%:%}${styleStr}`;
}
}
return [styleStr, effectStyle];
};
// ============================================================================
// == Register ==
// ============================================================================
function uniqueHash(path: (string | number)[], styleStr: string) {
return hash(`${path.join('%')}${styleStr}`);
}
// function Empty() {
// return null;
// }
/**
* Register a style to the global style sheet.
*/
export default function useStyleRegister(
info: Ref<{
theme: Theme<any, any>;
token: any;
path: string[];
hashId?: string;
layer?: string;
nonce?: string | (() => string);
clientOnly?: boolean;
/**
* Tell cssinjs the insert order of style.
* It's useful when you need to insert style
* before other style to overwrite for the same selector priority.
*/
order?: number;
}>,
styleFn: () => CSSInterpolation,
) {
const styleContext = useStyleInject();
const tokenKey = computed(() => info.value.token._tokenKey as string);
const fullPath = computed(() => [tokenKey.value, ...info.value.path]);
// Check if need insert style
let isMergedClientSide = isClientSide;
if (process.env.NODE_ENV !== 'production' && styleContext.value.mock !== undefined) {
isMergedClientSide = styleContext.value.mock === 'client';
}
// const [cacheStyle[0], cacheStyle[1], cacheStyle[2]]
useGlobalCache<
[
styleStr: string,
tokenKey: string,
styleId: string,
effectStyle: Record<string, string>,
clientOnly: boolean | undefined,
order: number,
]
>(
'style',
fullPath,
// Create cache if needed
() => {
const { path, hashId, layer, nonce, clientOnly, order = 0 } = info.value;
const cachePath = fullPath.value.join('|');
// Get style from SSR inline style directly
if (existPath(cachePath)) {
const [inlineCacheStyleStr, styleHash] = getStyleAndHash(cachePath);
if (inlineCacheStyleStr) {
return [inlineCacheStyleStr, tokenKey.value, styleHash, {}, clientOnly, order];
}
}
const styleObj = styleFn();
const { hashPriority, container, transformers, linters, cache } = styleContext.value;
const [parsedStyle, effectStyle] = parseStyle(styleObj, {
hashId,
hashPriority,
layer,
path: path.join('-'),
transformers,
linters,
});
const styleStr = normalizeStyle(parsedStyle);
const styleId = uniqueHash(fullPath.value, styleStr);
if (isMergedClientSide) {
const mergedCSSConfig: Parameters<typeof updateCSS>[2] = {
mark: ATTR_MARK,
prepend: 'queue',
attachTo: container,
priority: order,
};
const nonceStr = typeof nonce === 'function' ? nonce() : nonce;
if (nonceStr) {
mergedCSSConfig.csp = { nonce: nonceStr };
}
const style = updateCSS(styleStr, styleId, mergedCSSConfig);
(style as any)[CSS_IN_JS_INSTANCE] = cache.instanceId;
// Used for `useCacheToken` to remove on batch when token removed
style.setAttribute(ATTR_TOKEN, tokenKey.value);
// Dev usage to find which cache path made this easily
if (process.env.NODE_ENV !== 'production') {
style.setAttribute(ATTR_CACHE_PATH, fullPath.value.join('|'));
}
// Inject client side effect style
Object.keys(effectStyle).forEach(effectKey => {
if (!globalEffectStyleKeys.has(effectKey)) {
globalEffectStyleKeys.add(effectKey);
// Inject
updateCSS(normalizeStyle(effectStyle[effectKey]), `_effect-${effectKey}`, {
mark: ATTR_MARK,
prepend: 'queue',
attachTo: container,
});
}
});
}
return [styleStr, tokenKey.value, styleId, effectStyle, clientOnly, order];
},
// Remove cache if no need
([, , styleId], fromHMR) => {
if ((fromHMR || styleContext.value.autoClear) && isClientSide) {
removeCSS(styleId, { mark: ATTR_MARK });
}
},
);
return (node: VueNode) => {
return node;
// let styleNode: VueNode;
// if (!styleContext.ssrInline || isMergedClientSide || !styleContext.defaultCache) {
// styleNode = <Empty />;
// } else {
// styleNode = (
// <style
// {...{
// [ATTR_TOKEN]: cacheStyle.value[1],
// [ATTR_MARK]: cacheStyle.value[2],
// }}
// innerHTML={cacheStyle.value[0]}
// />
// );
// }
// return (
// <>
// {styleNode}
// {node}
// </>
// );
};
}
// ============================================================================
// == SSR ==
// ============================================================================
export function extractStyle(cache: Cache, plain = false) {
const matchPrefix = `style%`;
// prefix with `style` is used for `useStyleRegister` to cache style context
const styleKeys = Array.from(cache.cache.keys()).filter(key => key.startsWith(matchPrefix));
// Common effect styles like animation
const effectStyles: Record<string, boolean> = {};
// Mapping of cachePath to style hash
const cachePathMap: Record<string, string> = {};
let styleText = '';
function toStyleStr(
style: string,
tokenKey?: string,
styleId?: string,
customizeAttrs: Record<string, string> = {},
) {
const attrs: Record<string, string | undefined> = {
...customizeAttrs,
[ATTR_TOKEN]: tokenKey,
[ATTR_MARK]: styleId,
};
const attrStr = Object.keys(attrs)
.map(attr => {
const val = attrs[attr];
return val ? `${attr}="${val}"` : null;
})
.filter(v => v)
.join(' ');
return plain ? style : `<style ${attrStr}>${style}</style>`;
}
// ====================== Fill Style ======================
type OrderStyle = [order: number, style: string];
const orderStyles: OrderStyle[] = styleKeys
.map(key => {
const cachePath = key.slice(matchPrefix.length).replace(/%/g, '|');
const [styleStr, tokenKey, styleId, effectStyle, clientOnly, order]: [
string,
string,
string,
Record<string, string>,
boolean,
number,
] = cache.cache.get(key)![1];
// Skip client only style
if (clientOnly) {
return null! as OrderStyle;
}
// ====================== Style ======================
// Used for vc-util
const sharedAttrs = {
'data-vc-order': 'prependQueue',
'data-vc-priority': `${order}`,
};
let keyStyleText = toStyleStr(styleStr, tokenKey, styleId, sharedAttrs);
// Save cache path with hash mapping
cachePathMap[cachePath] = styleId;
// =============== Create effect style ===============
if (effectStyle) {
Object.keys(effectStyle).forEach(effectKey => {
// Effect style can be reused
if (!effectStyles[effectKey]) {
effectStyles[effectKey] = true;
keyStyleText += toStyleStr(
normalizeStyle(effectStyle[effectKey]),
tokenKey,
`_effect-${effectKey}`,
sharedAttrs,
);
}
});
}
const ret: OrderStyle = [order, keyStyleText];
return ret;
})
.filter(o => o);
orderStyles
.sort((o1, o2) => o1[0] - o2[0])
.forEach(([, style]) => {
styleText += style;
});
// ==================== Fill Cache Path ====================
styleText += toStyleStr(
`.${ATTR_CACHE_MAP}{content:"${serializeCacheMap(cachePathMap)}";}`,
undefined,
undefined,
{
[ATTR_CACHE_MAP]: ATTR_CACHE_MAP,
},
);
return styleText;
}

View File

@ -0,0 +1,77 @@
import useCacheToken from './hooks/useCacheToken';
import type { CSSInterpolation, CSSObject } from './hooks/useStyleRegister';
import useStyleRegister, { extractStyle } from './hooks/useStyleRegister';
import Keyframes from './Keyframes';
import type { Linter } from './linters';
import { legacyNotSelectorLinter, logicalPropertiesLinter, parentSelectorLinter } from './linters';
import type { StyleContextProps, StyleProviderProps } from './StyleContext';
import { createCache, useStyleInject, useStyleProvider, StyleProvider } from './StyleContext';
import type { DerivativeFunc, TokenType } from './theme';
import { createTheme, Theme } from './theme';
import type { Transformer } from './transformers/interface';
import legacyLogicalPropertiesTransformer from './transformers/legacyLogicalProperties';
import px2remTransformer from './transformers/px2rem';
import { supportLogicProps, supportWhere } from './util';
const cssinjs = {
Theme,
createTheme,
useStyleRegister,
useCacheToken,
createCache,
useStyleInject,
useStyleProvider,
Keyframes,
extractStyle,
// Transformer
legacyLogicalPropertiesTransformer,
px2remTransformer,
// Linters
logicalPropertiesLinter,
legacyNotSelectorLinter,
parentSelectorLinter,
// cssinjs
StyleProvider,
};
export {
Theme,
createTheme,
useStyleRegister,
useCacheToken,
createCache,
useStyleInject,
useStyleProvider,
Keyframes,
extractStyle,
// Transformer
legacyLogicalPropertiesTransformer,
px2remTransformer,
// Linters
logicalPropertiesLinter,
legacyNotSelectorLinter,
parentSelectorLinter,
// cssinjs
StyleProvider,
};
export type {
TokenType,
CSSObject,
CSSInterpolation,
DerivativeFunc,
Transformer,
Linter,
StyleContextProps,
StyleProviderProps,
};
export const _experimental = {
supportModernCSS: () => supportWhere() && supportLogicProps(),
};
export default cssinjs;

View File

@ -0,0 +1,25 @@
import type { Linter } from './interface';
import { lintWarning } from './utils';
const linter: Linter = (key, value, info) => {
if (key === 'content') {
// From emotion: https://github.com/emotion-js/emotion/blob/main/packages/serialize/src/index.js#L63
const contentValuePattern =
/(attr|counters?|url|(((repeating-)?(linear|radial))|conic)-gradient)\(|(no-)?(open|close)-quote/;
const contentValues = ['normal', 'none', 'initial', 'inherit', 'unset'];
if (
typeof value !== 'string' ||
(contentValues.indexOf(value) === -1 &&
!contentValuePattern.test(value) &&
(value.charAt(0) !== value.charAt(value.length - 1) ||
(value.charAt(0) !== '"' && value.charAt(0) !== "'")))
) {
lintWarning(
`You seem to be using a value for 'content' without quotes, try replacing it with \`content: '"${value}"'\`.`,
info,
);
}
}
};
export default linter;

View File

@ -0,0 +1,15 @@
import type { Linter } from './interface';
import { lintWarning } from './utils';
const linter: Linter = (key, value, info) => {
if (key === 'animation') {
if (info.hashId && value !== 'none') {
lintWarning(
`You seem to be using hashed animation '${value}', in which case 'animationName' with Keyframe as value is recommended.`,
info,
);
}
}
};
export default linter;

View File

@ -0,0 +1,6 @@
export { default as contentQuotesLinter } from './contentQuotesLinter';
export { default as hashedAnimationLinter } from './hashedAnimationLinter';
export type { Linter } from './interface';
export { default as legacyNotSelectorLinter } from './legacyNotSelectorLinter';
export { default as logicalPropertiesLinter } from './logicalPropertiesLinter';
export { default as parentSelectorLinter } from './parentSelectorLinter';

View File

@ -0,0 +1,9 @@
export interface LinterInfo {
path?: string;
hashId?: string;
parentSelectors: string[];
}
export interface Linter {
(key: string, value: string | number, info: LinterInfo): void;
}

View File

@ -0,0 +1,33 @@
import type { Linter, LinterInfo } from './interface';
import { lintWarning } from './utils';
function isConcatSelector(selector: string) {
const notContent = selector.match(/:not\(([^)]*)\)/)?.[1] || '';
// split selector. e.g.
// `h1#a.b` => ['h1', #a', '.b']
const splitCells = notContent.split(/(\[[^[]*])|(?=[.#])/).filter(str => str);
return splitCells.length > 1;
}
function parsePath(info: LinterInfo) {
return info.parentSelectors.reduce((prev, cur) => {
if (!prev) {
return cur;
}
return cur.includes('&') ? cur.replace(/&/g, prev) : `${prev} ${cur}`;
}, '');
}
const linter: Linter = (_key, _value, info) => {
const parentSelectorPath = parsePath(info);
const notList = parentSelectorPath.match(/:not\([^)]*\)/g) || [];
if (notList.length > 0 && notList.some(isConcatSelector)) {
lintWarning(`Concat ':not' selector not support in legacy browsers.`, info);
}
};
export default linter;

View File

@ -0,0 +1,88 @@
import type { Linter } from './interface';
import { lintWarning } from './utils';
const linter: Linter = (key, value, info) => {
switch (key) {
case 'marginLeft':
case 'marginRight':
case 'paddingLeft':
case 'paddingRight':
case 'left':
case 'right':
case 'borderLeft':
case 'borderLeftWidth':
case 'borderLeftStyle':
case 'borderLeftColor':
case 'borderRight':
case 'borderRightWidth':
case 'borderRightStyle':
case 'borderRightColor':
case 'borderTopLeftRadius':
case 'borderTopRightRadius':
case 'borderBottomLeftRadius':
case 'borderBottomRightRadius':
lintWarning(
`You seem to be using non-logical property '${key}' which is not compatible with RTL mode. Please use logical properties and values instead. For more information: https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_Logical_Properties.`,
info,
);
return;
case 'margin':
case 'padding':
case 'borderWidth':
case 'borderStyle':
// case 'borderColor':
if (typeof value === 'string') {
const valueArr = value.split(' ').map(item => item.trim());
if (valueArr.length === 4 && valueArr[1] !== valueArr[3]) {
lintWarning(
`You seem to be using '${key}' property with different left ${key} and right ${key}, which is not compatible with RTL mode. Please use logical properties and values instead. For more information: https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_Logical_Properties.`,
info,
);
}
}
return;
case 'clear':
case 'textAlign':
if (value === 'left' || value === 'right') {
lintWarning(
`You seem to be using non-logical value '${value}' of ${key}, which is not compatible with RTL mode. Please use logical properties and values instead. For more information: https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_Logical_Properties.`,
info,
);
}
return;
case 'borderRadius':
if (typeof value === 'string') {
const radiusGroups = value.split('/').map(item => item.trim());
const invalid = radiusGroups.reduce((result, group) => {
if (result) {
return result;
}
const radiusArr = group.split(' ').map(item => item.trim());
// borderRadius: '2px 4px'
if (radiusArr.length >= 2 && radiusArr[0] !== radiusArr[1]) {
return true;
}
// borderRadius: '4px 4px 2px'
if (radiusArr.length === 3 && radiusArr[1] !== radiusArr[2]) {
return true;
}
// borderRadius: '4px 4px 2px 4px'
if (radiusArr.length === 4 && radiusArr[2] !== radiusArr[3]) {
return true;
}
return result;
}, false);
if (invalid) {
lintWarning(
`You seem to be using non-logical value '${value}' of ${key}, which is not compatible with RTL mode. Please use logical properties and values instead. For more information: https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_Logical_Properties.`,
info,
);
}
}
return;
default:
}
};
export default linter;

View File

@ -0,0 +1,15 @@
import type { Linter } from '..';
import { lintWarning } from './utils';
const linter: Linter = (_key, _value, info) => {
if (
info.parentSelectors.some(selector => {
const selectors = selector.split(',');
return selectors.some(item => item.split('&').length > 2);
})
) {
lintWarning('Should not use more than one `&` in a selector.', info);
}
};
export default linter;

View File

@ -0,0 +1,13 @@
import devWarning from '../../../vc-util/warning';
import type { LinterInfo } from './interface';
export function lintWarning(message: string, info: LinterInfo) {
const { path, parentSelectors } = info;
devWarning(
false,
`[Ant Design Vue CSS-in-JS] ${path ? `Error in '${path}': ` : ''}${message}${
parentSelectors.length ? ` Selector info: ${parentSelectors.join(' -> ')}` : ''
}`,
);
}

View File

@ -0,0 +1,38 @@
import warning from '../../warning';
import type { DerivativeFunc, TokenType } from './interface';
let uuid = 0;
/**
* Theme with algorithms to derive tokens from design tokens.
* Use `createTheme` first which will help to manage the theme instance cache.
*/
export default class Theme<DesignToken extends TokenType, DerivativeToken extends TokenType> {
private derivatives: DerivativeFunc<DesignToken, DerivativeToken>[];
public readonly id: number;
constructor(
derivatives:
| DerivativeFunc<DesignToken, DerivativeToken>
| DerivativeFunc<DesignToken, DerivativeToken>[],
) {
this.derivatives = Array.isArray(derivatives) ? derivatives : [derivatives];
this.id = uuid;
if (derivatives.length === 0) {
warning(
derivatives.length > 0,
'[Ant Design Vue CSS-in-JS] Theme should have at least one derivative function.',
);
}
uuid += 1;
}
getDerivativeToken(token: DesignToken): DerivativeToken {
return this.derivatives.reduce<DerivativeToken>(
(result, derivative) => derivative(token, result),
undefined as any,
);
}
}

View File

@ -0,0 +1,135 @@
import type Theme from './Theme';
import type { DerivativeFunc } from './interface';
// ================================== Cache ==================================
type ThemeCacheMap = Map<
DerivativeFunc<any, any>,
{
map?: ThemeCacheMap;
value?: [Theme<any, any>, number];
}
>;
type DerivativeOptions = DerivativeFunc<any, any>[];
export function sameDerivativeOption(left: DerivativeOptions, right: DerivativeOptions) {
if (left.length !== right.length) {
return false;
}
for (let i = 0; i < left.length; i++) {
if (left[i] !== right[i]) {
return false;
}
}
return true;
}
export default class ThemeCache {
public static MAX_CACHE_SIZE = 20;
public static MAX_CACHE_OFFSET = 5;
private readonly cache: ThemeCacheMap;
private keys: DerivativeOptions[];
private cacheCallTimes: number;
constructor() {
this.cache = new Map();
this.keys = [];
this.cacheCallTimes = 0;
}
public size(): number {
return this.keys.length;
}
private internalGet(
derivativeOption: DerivativeOptions,
updateCallTimes = false,
): [Theme<any, any>, number] | undefined {
let cache: ReturnType<ThemeCacheMap['get']> = { map: this.cache };
derivativeOption.forEach(derivative => {
if (!cache) {
cache = undefined;
} else {
cache = cache?.map?.get(derivative);
}
});
if (cache?.value && updateCallTimes) {
cache.value[1] = this.cacheCallTimes++;
}
return cache?.value;
}
public get(derivativeOption: DerivativeOptions): Theme<any, any> | undefined {
return this.internalGet(derivativeOption, true)?.[0];
}
public has(derivativeOption: DerivativeOptions): boolean {
return !!this.internalGet(derivativeOption);
}
public set(derivativeOption: DerivativeOptions, value: Theme<any, any>): void {
// New cache
if (!this.has(derivativeOption)) {
if (this.size() + 1 > ThemeCache.MAX_CACHE_SIZE + ThemeCache.MAX_CACHE_OFFSET) {
const [targetKey] = this.keys.reduce<[DerivativeOptions, number]>(
(result, key) => {
const [, callTimes] = result;
if (this.internalGet(key)![1] < callTimes) {
return [key, this.internalGet(key)![1]];
}
return result;
},
[this.keys[0], this.cacheCallTimes],
);
this.delete(targetKey);
}
this.keys.push(derivativeOption);
}
let cache = this.cache;
derivativeOption.forEach((derivative, index) => {
if (index === derivativeOption.length - 1) {
cache.set(derivative, { value: [value, this.cacheCallTimes++] });
} else {
const cacheValue = cache.get(derivative);
if (!cacheValue) {
cache.set(derivative, { map: new Map() });
} else if (!cacheValue.map) {
cacheValue.map = new Map();
}
cache = cache.get(derivative)!.map!;
}
});
}
private deleteByPath(
currentCache: ThemeCacheMap,
derivatives: DerivativeFunc<any, any>[],
): Theme<any, any> | undefined {
const cache = currentCache.get(derivatives[0])!;
if (derivatives.length === 1) {
if (!cache.map) {
currentCache.delete(derivatives[0]);
} else {
currentCache.set(derivatives[0], { map: cache.map });
}
return cache.value?.[0];
}
const result = this.deleteByPath(cache.map!, derivatives.slice(1));
if ((!cache.map || cache.map.size === 0) && !cache.value) {
currentCache.delete(derivatives[0]);
}
return result;
}
public delete(derivativeOption: DerivativeOptions): Theme<any, any> | undefined {
// If cache exists
if (this.has(derivativeOption)) {
this.keys = this.keys.filter(item => !sameDerivativeOption(item, derivativeOption));
return this.deleteByPath(this.cache, derivativeOption);
}
return undefined;
}
}

View File

@ -0,0 +1,26 @@
import ThemeCache from './ThemeCache';
import Theme from './Theme';
import type { DerivativeFunc, TokenType } from './interface';
const cacheThemes = new ThemeCache();
/**
* Same as new Theme, but will always return same one if `derivative` not changed.
*/
export default function createTheme<
DesignToken extends TokenType,
DerivativeToken extends TokenType,
>(
derivatives:
| DerivativeFunc<DesignToken, DerivativeToken>[]
| DerivativeFunc<DesignToken, DerivativeToken>,
) {
const derivativeArr = Array.isArray(derivatives) ? derivatives : [derivatives];
// Create new theme if not exist
if (!cacheThemes.has(derivativeArr)) {
cacheThemes.set(derivativeArr, new Theme(derivativeArr));
}
// Get theme from cache and return
return cacheThemes.get(derivativeArr)!;
}

View File

@ -0,0 +1,4 @@
export { default as createTheme } from './createTheme';
export { default as Theme } from './Theme';
export { default as ThemeCache } from './ThemeCache';
export type { TokenType, DerivativeFunc } from './interface';

View File

@ -0,0 +1,5 @@
export type TokenType = object;
export type DerivativeFunc<DesignToken extends TokenType, DerivativeToken extends TokenType> = (
designToken: DesignToken,
derivativeToken?: DerivativeToken,
) => DerivativeToken;

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