feffery_antd_components 0.1.16 → 0.2.0-rc1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/DESCRIPTION +1 -1
- package/NAMESPACE +1 -0
- package/Project.toml +1 -1
- package/README-en_US.md +51 -0
- package/README.md +14 -5
- package/build/lib/feffery_antd_components/AntdAccordion.py +66 -0
- package/build/lib/feffery_antd_components/AntdAccordionItem.py +60 -0
- package/build/lib/feffery_antd_components/AntdAffix.py +58 -0
- package/build/lib/feffery_antd_components/AntdAlert.py +64 -0
- package/build/lib/feffery_antd_components/AntdAnchor.py +64 -0
- package/build/lib/feffery_antd_components/AntdAvatar.py +83 -0
- package/build/lib/feffery_antd_components/AntdBackTop.py +56 -0
- package/build/lib/feffery_antd_components/AntdBadge.py +74 -0
- package/build/lib/feffery_antd_components/AntdBreadcrumb.py +78 -0
- package/build/lib/feffery_antd_components/AntdButton.py +76 -0
- package/build/lib/feffery_antd_components/AntdCalendar.py +79 -0
- package/build/lib/feffery_antd_components/AntdCard.py +90 -0
- package/build/lib/feffery_antd_components/AntdCardGrid.py +56 -0
- package/build/lib/feffery_antd_components/AntdCarousel.py +60 -0
- package/build/lib/feffery_antd_components/AntdCascader.py +103 -0
- package/build/lib/feffery_antd_components/AntdCheckCard.py +64 -0
- package/build/lib/feffery_antd_components/AntdCheckCardGroup.py +64 -0
- package/build/lib/feffery_antd_components/AntdCheckbox.py +75 -0
- package/build/lib/feffery_antd_components/AntdCheckboxGroup.py +83 -0
- package/build/lib/feffery_antd_components/AntdCol.py +150 -0
- package/build/lib/feffery_antd_components/AntdCollapse.py +85 -0
- package/build/lib/feffery_antd_components/AntdComment.py +90 -0
- package/build/lib/feffery_antd_components/AntdContent.py +54 -0
- package/build/lib/feffery_antd_components/AntdCopyText.py +58 -0
- package/build/lib/feffery_antd_components/AntdCountdown.py +76 -0
- package/build/lib/feffery_antd_components/AntdCustomSkeleton.py +64 -0
- package/build/lib/feffery_antd_components/AntdDatePicker.py +107 -0
- package/build/lib/feffery_antd_components/AntdDateRangePicker.py +109 -0
- package/build/lib/feffery_antd_components/AntdDescriptionItem.py +62 -0
- package/build/lib/feffery_antd_components/AntdDescriptions.py +80 -0
- package/build/lib/feffery_antd_components/AntdDivider.py +66 -0
- package/build/lib/feffery_antd_components/AntdDraggerUpload.py +126 -0
- package/build/lib/feffery_antd_components/AntdDrawer.py +78 -0
- package/build/lib/feffery_antd_components/AntdDropdown.py +90 -0
- package/build/lib/feffery_antd_components/AntdEmpty.py +60 -0
- package/build/lib/feffery_antd_components/AntdFooter.py +54 -0
- package/build/lib/feffery_antd_components/AntdForm.py +76 -0
- package/build/lib/feffery_antd_components/AntdFormItem.py +88 -0
- package/build/lib/feffery_antd_components/AntdHeader.py +54 -0
- package/build/lib/feffery_antd_components/AntdIcon.py +56 -0
- package/build/lib/feffery_antd_components/AntdImage.py +66 -0
- package/build/lib/feffery_antd_components/AntdInput.py +121 -0
- package/build/lib/feffery_antd_components/AntdInputNumber.py +109 -0
- package/build/lib/feffery_antd_components/AntdLayout.py +54 -0
- package/build/lib/feffery_antd_components/AntdMentions.py +80 -0
- package/build/lib/feffery_antd_components/AntdMenu.py +85 -0
- package/build/lib/feffery_antd_components/AntdMessage.py +60 -0
- package/build/lib/feffery_antd_components/AntdModal.py +94 -0
- package/build/lib/feffery_antd_components/AntdNotification.py +64 -0
- package/build/lib/feffery_antd_components/AntdPageHeader.py +66 -0
- package/build/lib/feffery_antd_components/AntdPagination.py +99 -0
- package/build/lib/feffery_antd_components/AntdParagraph.py +74 -0
- package/build/lib/feffery_antd_components/AntdPasteImage.py +56 -0
- package/build/lib/feffery_antd_components/AntdPictureUpload.py +148 -0
- package/build/lib/feffery_antd_components/AntdPopconfirm.py +86 -0
- package/build/lib/feffery_antd_components/AntdPopover.py +78 -0
- package/build/lib/feffery_antd_components/AntdPopupCard.py +72 -0
- package/build/lib/feffery_antd_components/AntdProgress.py +92 -0
- package/{feffery_antd_components → build/lib/feffery_antd_components}/AntdRadio.py +0 -0
- package/build/lib/feffery_antd_components/AntdRadioGroup.py +93 -0
- package/build/lib/feffery_antd_components/AntdRate.py +64 -0
- package/build/lib/feffery_antd_components/AntdResult.py +58 -0
- package/build/lib/feffery_antd_components/AntdRibbon.py +58 -0
- package/build/lib/feffery_antd_components/AntdRow.py +76 -0
- package/build/lib/feffery_antd_components/AntdSegmented.py +91 -0
- package/build/lib/feffery_antd_components/AntdSegmentedColoring.py +86 -0
- package/build/lib/feffery_antd_components/AntdSelect.py +127 -0
- package/build/lib/feffery_antd_components/AntdSider.py +72 -0
- package/build/lib/feffery_antd_components/AntdSkeleton.py +90 -0
- package/build/lib/feffery_antd_components/AntdSkeletonAvatar.py +50 -0
- package/build/lib/feffery_antd_components/AntdSkeletonButton.py +52 -0
- package/build/lib/feffery_antd_components/AntdSkeletonImage.py +44 -0
- package/build/lib/feffery_antd_components/AntdSkeletonInput.py +48 -0
- package/build/lib/feffery_antd_components/AntdSlider.py +74 -0
- package/build/lib/feffery_antd_components/AntdSpace.py +64 -0
- package/build/lib/feffery_antd_components/AntdSpin.py +72 -0
- package/build/lib/feffery_antd_components/AntdStatistic.py +78 -0
- package/build/lib/feffery_antd_components/AntdSteps.py +76 -0
- package/build/lib/feffery_antd_components/AntdSwitch.py +81 -0
- package/build/lib/feffery_antd_components/AntdTabPane.py +68 -0
- package/build/lib/feffery_antd_components/AntdTable.py +361 -0
- package/build/lib/feffery_antd_components/AntdTabs.py +97 -0
- package/build/lib/feffery_antd_components/AntdTag.py +58 -0
- package/{feffery_antd_components → build/lib/feffery_antd_components}/AntdTestLink.py +0 -0
- package/build/lib/feffery_antd_components/AntdText.py +76 -0
- package/build/lib/feffery_antd_components/AntdTimePicker.py +99 -0
- package/build/lib/feffery_antd_components/AntdTimeRangePicker.py +99 -0
- package/build/lib/feffery_antd_components/AntdTimeline.py +72 -0
- package/build/lib/feffery_antd_components/AntdTitle.py +78 -0
- package/build/lib/feffery_antd_components/AntdTooltip.py +68 -0
- package/build/lib/feffery_antd_components/AntdTransfer.py +103 -0
- package/build/lib/feffery_antd_components/AntdTree.py +109 -0
- package/build/lib/feffery_antd_components/AntdTreeSelect.py +115 -0
- package/{feffery_antd_components → build/lib/feffery_antd_components}/AntdTypography.py +0 -0
- package/build/lib/feffery_antd_components/AntdUpload.py +124 -0
- package/build/lib/feffery_antd_components/AntdWatermark.py +68 -0
- package/{feffery_antd_components → build/lib/feffery_antd_components}/Link.py +0 -0
- package/build/lib/feffery_antd_components/__init__.py +53 -0
- package/build/lib/feffery_antd_components/_imports_.py +189 -0
- package/build/lib/feffery_antd_components/feffery_antd_components.min.js +1 -0
- package/build/lib/feffery_antd_components/metadata.json +19958 -0
- package/build/lib/feffery_antd_components/package-info.json +89 -0
- package/feffery_antd_components/AntdAlert.py +1 -1
- package/feffery_antd_components/AntdAnchor.py +1 -1
- package/feffery_antd_components/AntdAvatar.py +1 -1
- package/feffery_antd_components/AntdBackTop.py +1 -1
- package/feffery_antd_components/AntdButton.py +10 -6
- package/feffery_antd_components/AntdCarousel.py +1 -1
- package/feffery_antd_components/AntdCascader.py +9 -5
- package/feffery_antd_components/AntdCol.py +1 -1
- package/feffery_antd_components/AntdContent.py +1 -1
- package/feffery_antd_components/AntdCustomSkeleton.py +1 -1
- package/feffery_antd_components/AntdDraggerUpload.py +1 -1
- package/feffery_antd_components/AntdDrawer.py +1 -1
- package/feffery_antd_components/AntdFooter.py +1 -1
- package/feffery_antd_components/AntdHeader.py +1 -1
- package/feffery_antd_components/AntdIcon.py +8 -4
- package/feffery_antd_components/AntdImage.py +1 -1
- package/feffery_antd_components/AntdInput.py +16 -8
- package/feffery_antd_components/AntdInputNumber.py +11 -7
- package/feffery_antd_components/AntdLayout.py +1 -1
- package/feffery_antd_components/AntdModal.py +10 -4
- package/feffery_antd_components/AntdParagraph.py +1 -1
- package/feffery_antd_components/AntdPasteImage.py +1 -1
- package/feffery_antd_components/AntdPopupCard.py +72 -0
- package/feffery_antd_components/AntdRibbon.py +3 -3
- package/feffery_antd_components/AntdRow.py +1 -1
- package/feffery_antd_components/AntdSegmented.py +5 -3
- package/feffery_antd_components/AntdSegmentedColoring.py +7 -3
- package/feffery_antd_components/AntdSider.py +1 -1
- package/feffery_antd_components/AntdSkeleton.py +1 -1
- package/feffery_antd_components/AntdSpace.py +1 -1
- package/feffery_antd_components/AntdSpin.py +2 -2
- package/feffery_antd_components/AntdStatistic.py +1 -1
- package/feffery_antd_components/AntdTabPane.py +1 -1
- package/feffery_antd_components/AntdTable.py +55 -7
- package/feffery_antd_components/AntdTag.py +1 -1
- package/feffery_antd_components/AntdText.py +1 -1
- package/feffery_antd_components/AntdTitle.py +1 -1
- package/feffery_antd_components/AntdTree.py +6 -4
- package/feffery_antd_components/AntdTreeSelect.py +8 -6
- package/feffery_antd_components/_imports_.py +2 -0
- package/feffery_antd_components/feffery_antd_components.min.js +1 -1
- package/feffery_antd_components/metadata.json +1042 -93
- package/feffery_antd_components/package-info.json +6 -2
- package/git-operations.md +0 -1
- package/images//345/233/275/351/231/205/345/214/226/347/244/272/344/276/213.png +0 -0
- package/package.json +6 -2
- package/setup.py +0 -1
- package/src/FefferyAntdComponents.jl +4 -3
- package/src/jl/'feffery'_antdalert.jl +1 -1
- package/src/jl/'feffery'_antdanchor.jl +1 -1
- package/src/jl/'feffery'_antdavatar.jl +1 -1
- package/src/jl/'feffery'_antdbacktop.jl +1 -1
- package/src/jl/'feffery'_antdbutton.jl +4 -2
- package/src/jl/'feffery'_antdcarousel.jl +1 -1
- package/src/jl/'feffery'_antdcascader.jl +4 -2
- package/src/jl/'feffery'_antdcol.jl +1 -1
- package/src/jl/'feffery'_antdcontent.jl +1 -1
- package/src/jl/'feffery'_antdcustomskeleton.jl +1 -1
- package/src/jl/'feffery'_antddraggerupload.jl +1 -1
- package/src/jl/'feffery'_antddrawer.jl +1 -1
- package/src/jl/'feffery'_antdfooter.jl +1 -1
- package/src/jl/'feffery'_antdheader.jl +1 -1
- package/src/jl/'feffery'_antdicon.jl +4 -2
- package/src/jl/'feffery'_antdimage.jl +1 -1
- package/src/jl/'feffery'_antdinput.jl +8 -4
- package/src/jl/'feffery'_antdinputnumber.jl +5 -3
- package/src/jl/'feffery'_antdlayout.jl +1 -1
- package/src/jl/'feffery'_antdmodal.jl +5 -2
- package/src/jl/'feffery'_antdparagraph.jl +1 -1
- package/src/jl/'feffery'_antdpasteimage.jl +1 -1
- package/src/jl/'feffery'_antdpopupcard.jl +43 -0
- package/src/jl/'feffery'_antdribbon.jl +1 -1
- package/src/jl/'feffery'_antdrow.jl +1 -1
- package/src/jl/'feffery'_antdsegmented.jl +5 -4
- package/src/jl/'feffery'_antdsegmentedcoloring.jl +3 -1
- package/src/jl/'feffery'_antdsider.jl +1 -1
- package/src/jl/'feffery'_antdskeleton.jl +1 -1
- package/src/jl/'feffery'_antdspace.jl +1 -1
- package/src/jl/'feffery'_antdspin.jl +2 -2
- package/src/jl/'feffery'_antdstatistic.jl +1 -1
- package/src/jl/'feffery'_antdtable.jl +31 -4
- package/src/jl/'feffery'_antdtabpane.jl +1 -1
- package/src/jl/'feffery'_antdtag.jl +1 -1
- package/src/jl/'feffery'_antdtext.jl +1 -1
- package/src/jl/'feffery'_antdtitle.jl +1 -1
- package/src/jl/'feffery'_antdtree.jl +3 -2
- package/src/jl/'feffery'_antdtreeselect.jl +3 -2
- package/src/lib/components/AntdAlert.react.js +64 -50
- package/src/lib/components/AntdAnchor.react.js +79 -70
- package/src/lib/components/AntdAvatar.react.js +92 -76
- package/src/lib/components/AntdBackTop.react.js +37 -28
- package/src/lib/components/AntdButton.react.js +82 -54
- package/src/lib/components/AntdCarousel.react.js +43 -34
- package/src/lib/components/AntdCascader.react.js +128 -82
- package/src/lib/components/AntdCheckboxGroup.react.js +2 -0
- package/src/lib/components/AntdDrawer.react.js +68 -59
- package/src/lib/components/AntdIcon.react.js +70 -37
- package/src/lib/components/AntdImage.react.js +16 -3
- package/src/lib/components/AntdInput.react.js +212 -175
- package/src/lib/components/AntdInputNumber.react.js +12 -2
- package/src/lib/components/AntdModal.react.js +22 -1
- package/src/lib/components/AntdPasteImage.react.js +11 -2
- package/src/lib/components/AntdPopupCard.react.js +241 -0
- package/src/lib/components/AntdRibbon.react.js +1 -1
- package/src/lib/components/AntdSegmented.react.js +19 -4
- package/src/lib/components/AntdSegmentedColoring.react.js +107 -82
- package/src/lib/components/AntdSelect.react.js +5 -0
- package/src/lib/components/AntdSpace.react.js +63 -46
- package/src/lib/components/AntdSpin.react.js +21 -6
- package/src/lib/components/AntdStatistic.react.js +68 -59
- package/src/lib/components/AntdTable.react.js +252 -18
- package/src/lib/components/AntdTag.react.js +38 -28
- package/src/lib/components/AntdTree.react.js +182 -136
- package/src/lib/components/AntdTreeSelect.react.js +144 -101
- package/src/lib/components/grid/AntdCol.react.js +61 -52
- package/src/lib/components/grid/AntdRow.react.js +46 -37
- package/src/lib/components/layout/AntdContent.react.js +35 -26
- package/src/lib/components/layout/AntdFooter.react.js +36 -27
- package/src/lib/components/layout/AntdHeader.react.js +35 -26
- package/src/lib/components/layout/AntdLayout.react.js +35 -26
- package/src/lib/components/layout/AntdSider.react.js +61 -52
- package/src/lib/components/skeleton/AntdCustomSkeleton.react.js +11 -3
- package/src/lib/components/skeleton/AntdSkeleton.react.js +11 -2
- package/src/lib/components/styles.css +4 -0
- package/src/lib/components/tabs/AntdTabPane.react.js +46 -37
- package/src/lib/components/typography/AntdParagraph.react.js +59 -50
- package/src/lib/components/typography/AntdText.react.js +61 -52
- package/src/lib/components/typography/AntdTitle.react.js +63 -54
- package/src/lib/components/upload/AntdDraggerUpload.react.js +11 -2
- package/src/lib/components/utils.js +17 -2
- package/src/lib/index.js +24 -1
- package/tests/DebounceTest/app.py +89 -0
- package/tests/SegmentedColoringTest/app.py +106 -0
- package/tests/TableCellClickTest/app.py +67 -0
- package/tests/TableCellRowMergeTest/app.py +88 -0
- package/tests/TableEmptyContentTest/app.py +37 -0
- package/tests/TableMiniChartAdvanceTest/app.py +85 -0
- package/tests/TreeNodeStyleTest/app.py +73 -0
- package/tests/TreeTest/app.py +96 -0
- package/tests/VirtualClassNameTest/app.py +49 -0
- package/usage.py +11 -82
- package/webpack.config.js +45 -11
- package/tests/UploadTest/app.py +0 -70
|
@@ -1,61 +1,65 @@
|
|
|
1
1
|
import React, { Component } from 'react';
|
|
2
2
|
import PropTypes from 'prop-types';
|
|
3
3
|
import { Col } from 'antd';
|
|
4
|
+
import { useCss } from 'react-use';
|
|
5
|
+
import { isString } from 'lodash';
|
|
4
6
|
import 'antd/dist/antd.css';
|
|
5
7
|
import { parseChildrenToArray } from '../utils';
|
|
6
8
|
|
|
7
9
|
// 定义列组件AntdCol,api参数参考https://ant.design/components/grid-cn/
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
className
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
10
|
+
const AntdCol = (props) => {
|
|
11
|
+
// 取得必要属性或参数
|
|
12
|
+
let {
|
|
13
|
+
id,
|
|
14
|
+
children,
|
|
15
|
+
className,
|
|
16
|
+
style,
|
|
17
|
+
key,
|
|
18
|
+
span,
|
|
19
|
+
offset,
|
|
20
|
+
order,
|
|
21
|
+
pull,
|
|
22
|
+
push,
|
|
23
|
+
flex,
|
|
24
|
+
xs,
|
|
25
|
+
sm,
|
|
26
|
+
md,
|
|
27
|
+
lg,
|
|
28
|
+
xl,
|
|
29
|
+
xxl,
|
|
30
|
+
setProps,
|
|
31
|
+
loading_state
|
|
32
|
+
} = props;
|
|
33
|
+
|
|
34
|
+
children = parseChildrenToArray(children)
|
|
35
|
+
|
|
36
|
+
return (
|
|
37
|
+
<Col id={id}
|
|
38
|
+
className={
|
|
39
|
+
isString(className) ?
|
|
40
|
+
className :
|
|
41
|
+
useCss(className)
|
|
42
|
+
}
|
|
43
|
+
style={{ height: '100%', ...style }}
|
|
44
|
+
key={key}
|
|
45
|
+
span={span}
|
|
46
|
+
offset={offset}
|
|
47
|
+
order={order}
|
|
48
|
+
pull={pull}
|
|
49
|
+
push={push}
|
|
50
|
+
flex={flex}
|
|
51
|
+
xs={xs}
|
|
52
|
+
sm={sm}
|
|
53
|
+
md={md}
|
|
54
|
+
lg={lg}
|
|
55
|
+
xl={xl}
|
|
56
|
+
xxl={xxl}
|
|
57
|
+
data-dash-is-loading={
|
|
58
|
+
(loading_state && loading_state.is_loading) || undefined
|
|
59
|
+
}>
|
|
60
|
+
{children}
|
|
61
|
+
</Col>
|
|
62
|
+
);
|
|
59
63
|
}
|
|
60
64
|
|
|
61
65
|
// 定义参数或属性
|
|
@@ -69,7 +73,10 @@ AntdCol.propTypes = {
|
|
|
69
73
|
children: PropTypes.node,
|
|
70
74
|
|
|
71
75
|
// css类名
|
|
72
|
-
className: PropTypes.
|
|
76
|
+
className: PropTypes.oneOfType([
|
|
77
|
+
PropTypes.string,
|
|
78
|
+
PropTypes.object
|
|
79
|
+
]),
|
|
73
80
|
|
|
74
81
|
// 自定义css字典
|
|
75
82
|
style: PropTypes.object,
|
|
@@ -241,3 +248,5 @@ AntdCol.propTypes = {
|
|
|
241
248
|
// 设置默认参数
|
|
242
249
|
AntdCol.defaultProps = {
|
|
243
250
|
}
|
|
251
|
+
|
|
252
|
+
export default AntdCol;
|
|
@@ -1,45 +1,49 @@
|
|
|
1
1
|
import React, { Component } from 'react';
|
|
2
2
|
import PropTypes from 'prop-types';
|
|
3
|
-
import { Row
|
|
3
|
+
import { Row } from 'antd';
|
|
4
|
+
import { useCss } from 'react-use';
|
|
5
|
+
import { isString } from 'lodash';
|
|
4
6
|
import 'antd/dist/antd.css';
|
|
5
7
|
import { parseChildrenToArray } from '../utils';
|
|
6
8
|
|
|
7
9
|
// 定义行组件AntdRow,api参数参考https://ant.design/components/grid-cn/
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
className
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
10
|
+
const AntdRow = (props) => {
|
|
11
|
+
// 取得必要属性或参数
|
|
12
|
+
let {
|
|
13
|
+
id,
|
|
14
|
+
children,
|
|
15
|
+
className,
|
|
16
|
+
style,
|
|
17
|
+
key,
|
|
18
|
+
align,
|
|
19
|
+
gutter,
|
|
20
|
+
justify,
|
|
21
|
+
wrap,
|
|
22
|
+
setProps,
|
|
23
|
+
loading_state
|
|
24
|
+
} = props;
|
|
25
|
+
|
|
26
|
+
children = parseChildrenToArray(children)
|
|
27
|
+
|
|
28
|
+
return (
|
|
29
|
+
<Row id={id}
|
|
30
|
+
className={
|
|
31
|
+
isString(className) ?
|
|
32
|
+
className :
|
|
33
|
+
useCss(className)
|
|
34
|
+
}
|
|
35
|
+
style={style}
|
|
36
|
+
key={key}
|
|
37
|
+
align={align}
|
|
38
|
+
gutter={gutter}
|
|
39
|
+
justify={justify}
|
|
40
|
+
wrap={wrap}
|
|
41
|
+
data-dash-is-loading={
|
|
42
|
+
(loading_state && loading_state.is_loading) || undefined
|
|
43
|
+
}>
|
|
44
|
+
{children}
|
|
45
|
+
</Row>
|
|
46
|
+
);
|
|
43
47
|
}
|
|
44
48
|
|
|
45
49
|
// 定义参数或属性
|
|
@@ -53,7 +57,10 @@ AntdRow.propTypes = {
|
|
|
53
57
|
children: PropTypes.node,
|
|
54
58
|
|
|
55
59
|
// css类名
|
|
56
|
-
className: PropTypes.
|
|
60
|
+
className: PropTypes.oneOfType([
|
|
61
|
+
PropTypes.string,
|
|
62
|
+
PropTypes.object
|
|
63
|
+
]),
|
|
57
64
|
|
|
58
65
|
// 自定义css字典
|
|
59
66
|
style: PropTypes.object,
|
|
@@ -112,3 +119,5 @@ AntdRow.propTypes = {
|
|
|
112
119
|
// 设置默认参数
|
|
113
120
|
AntdRow.defaultProps = {
|
|
114
121
|
}
|
|
122
|
+
|
|
123
|
+
export default AntdRow;
|
|
@@ -1,39 +1,43 @@
|
|
|
1
1
|
import React, { Component } from 'react';
|
|
2
2
|
import PropTypes from 'prop-types';
|
|
3
3
|
import { Layout } from 'antd';
|
|
4
|
+
import { useCss } from 'react-use';
|
|
5
|
+
import { isString } from 'lodash';
|
|
4
6
|
import 'antd/dist/antd.css';
|
|
5
7
|
import { parseChildrenToArray } from '../utils';
|
|
6
8
|
|
|
7
9
|
const { Content } = Layout;
|
|
8
10
|
|
|
9
11
|
// 定义内容组件AntdContent,api参数参考https://ant.design/components/layout-cn/
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
} = this.props;
|
|
12
|
+
const AntdContent = (props) => {
|
|
13
|
+
// 取得必要属性或参数
|
|
14
|
+
let {
|
|
15
|
+
id,
|
|
16
|
+
children,
|
|
17
|
+
className,
|
|
18
|
+
style,
|
|
19
|
+
key,
|
|
20
|
+
setProps,
|
|
21
|
+
loading_state
|
|
22
|
+
} = props;
|
|
22
23
|
|
|
23
|
-
|
|
24
|
+
children = parseChildrenToArray(children)
|
|
24
25
|
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
26
|
+
return (
|
|
27
|
+
<Content id={id}
|
|
28
|
+
className={
|
|
29
|
+
isString(className) ?
|
|
30
|
+
className :
|
|
31
|
+
useCss(className)
|
|
32
|
+
}
|
|
33
|
+
style={style}
|
|
34
|
+
key={key}
|
|
35
|
+
data-dash-is-loading={
|
|
36
|
+
(loading_state && loading_state.is_loading) || undefined
|
|
37
|
+
}>
|
|
38
|
+
{children}
|
|
39
|
+
</Content>
|
|
40
|
+
);
|
|
37
41
|
}
|
|
38
42
|
|
|
39
43
|
// 定义参数或属性
|
|
@@ -47,7 +51,10 @@ AntdContent.propTypes = {
|
|
|
47
51
|
children: PropTypes.node,
|
|
48
52
|
|
|
49
53
|
// css类名
|
|
50
|
-
className: PropTypes.
|
|
54
|
+
className: PropTypes.oneOfType([
|
|
55
|
+
PropTypes.string,
|
|
56
|
+
PropTypes.object
|
|
57
|
+
]),
|
|
51
58
|
|
|
52
59
|
// 自定义css字典
|
|
53
60
|
style: PropTypes.object,
|
|
@@ -80,3 +87,5 @@ AntdContent.propTypes = {
|
|
|
80
87
|
// 设置默认参数
|
|
81
88
|
AntdContent.defaultProps = {
|
|
82
89
|
}
|
|
90
|
+
|
|
91
|
+
export default AntdContent;
|
|
@@ -1,39 +1,43 @@
|
|
|
1
1
|
import React, { Component } from 'react';
|
|
2
2
|
import PropTypes from 'prop-types';
|
|
3
3
|
import { Layout } from 'antd';
|
|
4
|
+
import { isString } from 'lodash';
|
|
5
|
+
import { useCss } from 'react-use';
|
|
4
6
|
import 'antd/dist/antd.css';
|
|
5
7
|
import { parseChildrenToArray } from '../utils';
|
|
6
8
|
|
|
7
9
|
const { Footer } = Layout;
|
|
8
10
|
|
|
9
11
|
// 定义页尾组件AntdFooter,api参数参考https://ant.design/components/layout-cn/
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
} = this.props;
|
|
12
|
+
const AntdFooter = (props) => {
|
|
13
|
+
// 取得必要属性或参数
|
|
14
|
+
let {
|
|
15
|
+
id,
|
|
16
|
+
children,
|
|
17
|
+
className,
|
|
18
|
+
style,
|
|
19
|
+
key,
|
|
20
|
+
setProps,
|
|
21
|
+
loading_state
|
|
22
|
+
} = props;
|
|
22
23
|
|
|
23
|
-
|
|
24
|
+
children = parseChildrenToArray(children)
|
|
24
25
|
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
26
|
+
return (
|
|
27
|
+
<Footer id={id}
|
|
28
|
+
className={
|
|
29
|
+
isString(className) ?
|
|
30
|
+
className :
|
|
31
|
+
useCss(className)
|
|
32
|
+
}
|
|
33
|
+
style={style}
|
|
34
|
+
key={key}
|
|
35
|
+
data-dash-is-loading={
|
|
36
|
+
(loading_state && loading_state.is_loading) || undefined
|
|
37
|
+
}>
|
|
38
|
+
{children}
|
|
39
|
+
</Footer>
|
|
40
|
+
);
|
|
37
41
|
}
|
|
38
42
|
|
|
39
43
|
// 定义参数或属性
|
|
@@ -47,7 +51,10 @@ AntdFooter.propTypes = {
|
|
|
47
51
|
children: PropTypes.node,
|
|
48
52
|
|
|
49
53
|
// css类名
|
|
50
|
-
className: PropTypes.
|
|
54
|
+
className: PropTypes.oneOfType([
|
|
55
|
+
PropTypes.string,
|
|
56
|
+
PropTypes.object
|
|
57
|
+
]),
|
|
51
58
|
|
|
52
59
|
// 自定义css字典
|
|
53
60
|
style: PropTypes.object,
|
|
@@ -79,4 +86,6 @@ AntdFooter.propTypes = {
|
|
|
79
86
|
|
|
80
87
|
// 设置默认参数
|
|
81
88
|
AntdFooter.defaultProps = {
|
|
82
|
-
}
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
export default AntdFooter;
|
|
@@ -1,39 +1,43 @@
|
|
|
1
1
|
import React, { Component } from 'react';
|
|
2
2
|
import PropTypes from 'prop-types';
|
|
3
3
|
import { Layout } from 'antd';
|
|
4
|
+
import { isString } from 'lodash';
|
|
5
|
+
import { useCss } from 'react-use';
|
|
4
6
|
import 'antd/dist/antd.css';
|
|
5
7
|
import { parseChildrenToArray } from '../utils';
|
|
6
8
|
|
|
7
9
|
const { Header } = Layout;
|
|
8
10
|
|
|
9
11
|
// 定义页首组件AntdHeader,api参数参考https://ant.design/components/layout-cn/
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
} = this.props;
|
|
12
|
+
const AntdHeader = (props) => {
|
|
13
|
+
// 取得必要属性或参数
|
|
14
|
+
let {
|
|
15
|
+
id,
|
|
16
|
+
children,
|
|
17
|
+
className,
|
|
18
|
+
style,
|
|
19
|
+
key,
|
|
20
|
+
setProps,
|
|
21
|
+
loading_state
|
|
22
|
+
} = props;
|
|
22
23
|
|
|
23
|
-
|
|
24
|
+
children = parseChildrenToArray(children)
|
|
24
25
|
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
26
|
+
return (
|
|
27
|
+
<Header id={id}
|
|
28
|
+
className={
|
|
29
|
+
isString(className) ?
|
|
30
|
+
className :
|
|
31
|
+
useCss(className)
|
|
32
|
+
}
|
|
33
|
+
style={style}
|
|
34
|
+
key={key}
|
|
35
|
+
data-dash-is-loading={
|
|
36
|
+
(loading_state && loading_state.is_loading) || undefined
|
|
37
|
+
}>
|
|
38
|
+
{children}
|
|
39
|
+
</Header>
|
|
40
|
+
);
|
|
37
41
|
}
|
|
38
42
|
|
|
39
43
|
// 定义参数或属性
|
|
@@ -47,7 +51,10 @@ AntdHeader.propTypes = {
|
|
|
47
51
|
children: PropTypes.node,
|
|
48
52
|
|
|
49
53
|
// css类名
|
|
50
|
-
className: PropTypes.
|
|
54
|
+
className: PropTypes.oneOfType([
|
|
55
|
+
PropTypes.string,
|
|
56
|
+
PropTypes.object
|
|
57
|
+
]),
|
|
51
58
|
|
|
52
59
|
// 自定义css字典
|
|
53
60
|
style: PropTypes.object,
|
|
@@ -80,3 +87,5 @@ AntdHeader.propTypes = {
|
|
|
80
87
|
// 设置默认参数
|
|
81
88
|
AntdHeader.defaultProps = {
|
|
82
89
|
}
|
|
90
|
+
|
|
91
|
+
export default AntdHeader;
|
|
@@ -1,37 +1,41 @@
|
|
|
1
1
|
import React, { Component } from 'react';
|
|
2
2
|
import PropTypes from 'prop-types';
|
|
3
3
|
import { Layout } from 'antd';
|
|
4
|
+
import { isString } from 'lodash';
|
|
5
|
+
import { useCss } from 'react-use';
|
|
4
6
|
import 'antd/dist/antd.css';
|
|
5
7
|
import { parseChildrenToArray } from '../utils';
|
|
6
8
|
|
|
7
9
|
// 定义布局组件AntdLayout,api参数参考https://ant.design/components/layout-cn/
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
} = this.props;
|
|
10
|
+
const AntdLayout = (props) => {
|
|
11
|
+
// 取得必要属性或参数
|
|
12
|
+
let {
|
|
13
|
+
id,
|
|
14
|
+
children,
|
|
15
|
+
className,
|
|
16
|
+
style,
|
|
17
|
+
key,
|
|
18
|
+
setProps,
|
|
19
|
+
loading_state
|
|
20
|
+
} = props;
|
|
20
21
|
|
|
21
|
-
|
|
22
|
+
children = parseChildrenToArray(children)
|
|
22
23
|
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
24
|
+
return (
|
|
25
|
+
<Layout id={id}
|
|
26
|
+
className={
|
|
27
|
+
isString(className) ?
|
|
28
|
+
className :
|
|
29
|
+
useCss(className)
|
|
30
|
+
}
|
|
31
|
+
style={style}
|
|
32
|
+
key={key}
|
|
33
|
+
data-dash-is-loading={
|
|
34
|
+
(loading_state && loading_state.is_loading) || undefined
|
|
35
|
+
}>
|
|
36
|
+
{children}
|
|
37
|
+
</Layout>
|
|
38
|
+
);
|
|
35
39
|
}
|
|
36
40
|
|
|
37
41
|
// 定义参数或属性
|
|
@@ -45,7 +49,10 @@ AntdLayout.propTypes = {
|
|
|
45
49
|
children: PropTypes.node,
|
|
46
50
|
|
|
47
51
|
// css类名
|
|
48
|
-
className: PropTypes.
|
|
52
|
+
className: PropTypes.oneOfType([
|
|
53
|
+
PropTypes.string,
|
|
54
|
+
PropTypes.object
|
|
55
|
+
]),
|
|
49
56
|
|
|
50
57
|
// 自定义css字典
|
|
51
58
|
style: PropTypes.object,
|
|
@@ -78,3 +85,5 @@ AntdLayout.propTypes = {
|
|
|
78
85
|
// 设置默认参数
|
|
79
86
|
AntdLayout.defaultProps = {
|
|
80
87
|
}
|
|
88
|
+
|
|
89
|
+
export default AntdLayout;
|