@pisell/materials 1.0.1 → 1.0.3
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/build/lowcode/assets-daily.json +93 -0
- package/build/lowcode/assets-dev.json +93 -0
- package/build/lowcode/assets-prod.json +93 -0
- package/build/lowcode/designer.html +303 -0
- package/build/lowcode/index.html +305 -0
- package/build/lowcode/index.js +1 -0
- package/build/lowcode/meta.js +9 -0
- package/build/lowcode/preview.css +1 -0
- package/build/lowcode/preview.html +35 -0
- package/build/lowcode/preview.js +304 -0
- package/build/lowcode/render/default/view.js +22 -0
- package/build/lowcode/view.js +22 -0
- package/es/components/auto-complete/index.d.ts +3 -0
- package/es/components/auto-complete/index.js +4 -0
- package/es/components/button/index.d.ts +3 -0
- package/es/components/button/index.js +15 -0
- package/es/components/calendar/index.d.ts +3 -0
- package/es/components/calendar/index.js +4 -0
- package/es/components/cascader/index.d.ts +3 -0
- package/es/components/cascader/index.js +4 -0
- package/es/components/checkbox/index.d.ts +3 -0
- package/es/components/checkbox/index.js +5 -0
- package/es/components/config-provider/index.d.ts +4 -0
- package/es/components/config-provider/index.js +30 -0
- package/es/components/date-picker/index.d.ts +3 -0
- package/es/components/date-picker/index.js +7 -0
- package/es/components/drawer/index.d.ts +2 -0
- package/es/components/drawer/index.js +13 -0
- package/es/components/dropdown/index.d.ts +3 -0
- package/es/components/dropdown/index.js +13 -0
- package/es/components/form/index.d.ts +8 -0
- package/es/components/form/index.js +132 -0
- package/es/components/icon/index.d.ts +12 -0
- package/es/components/icon/index.js +40 -0
- package/es/components/input/index.d.ts +3 -0
- package/es/components/input/index.js +12 -0
- package/es/components/modal/index.d.ts +2 -0
- package/es/components/modal/index.js +18 -0
- package/es/components/radio/index.d.ts +3 -0
- package/es/components/radio/index.js +5 -0
- package/es/components/select/index.d.ts +3 -0
- package/es/components/select/index.js +4 -0
- package/es/components/skeleton/index.d.ts +3 -0
- package/es/components/skeleton/index.js +5 -0
- package/es/components/slider/index.d.ts +3 -0
- package/es/components/slider/index.js +16 -0
- package/es/components/table/index.d.ts +3 -0
- package/es/components/table/index.js +12 -0
- package/es/components/tabs/index.d.ts +11 -0
- package/es/components/tabs/index.js +93 -0
- package/es/components/time-picker/index.d.ts +3 -0
- package/es/components/time-picker/index.js +4 -0
- package/es/components/tree-select/index.d.ts +2 -0
- package/es/components/tree-select/index.js +6 -0
- package/es/components/upload/index.d.ts +3 -0
- package/es/components/upload/index.js +4 -0
- package/es/index.d.ts +63 -0
- package/es/index.js +85 -0
- package/es/utils/hoc.d.ts +17 -0
- package/es/utils/hoc.js +80 -0
- package/es/utils/warning.d.ts +1 -0
- package/es/utils/warning.js +6 -0
- package/lib/components/auto-complete/index.d.ts +3 -0
- package/lib/components/auto-complete/index.js +28 -0
- package/lib/components/button/index.d.ts +3 -0
- package/lib/components/button/index.js +45 -0
- package/lib/components/calendar/index.d.ts +3 -0
- package/lib/components/calendar/index.js +32 -0
- package/lib/components/cascader/index.d.ts +3 -0
- package/lib/components/cascader/index.js +28 -0
- package/lib/components/checkbox/index.d.ts +3 -0
- package/lib/components/checkbox/index.js +29 -0
- package/lib/components/config-provider/index.d.ts +4 -0
- package/lib/components/config-provider/index.js +54 -0
- package/lib/components/date-picker/index.d.ts +3 -0
- package/lib/components/date-picker/index.js +41 -0
- package/lib/components/drawer/index.d.ts +2 -0
- package/lib/components/drawer/index.js +45 -0
- package/lib/components/dropdown/index.d.ts +3 -0
- package/lib/components/dropdown/index.js +45 -0
- package/lib/components/form/index.d.ts +8 -0
- package/lib/components/form/index.js +114 -0
- package/lib/components/icon/index.d.ts +12 -0
- package/lib/components/icon/index.js +52 -0
- package/lib/components/input/index.d.ts +3 -0
- package/lib/components/input/index.js +38 -0
- package/lib/components/modal/index.d.ts +2 -0
- package/lib/components/modal/index.js +50 -0
- package/lib/components/radio/index.d.ts +3 -0
- package/lib/components/radio/index.js +29 -0
- package/lib/components/select/index.d.ts +3 -0
- package/lib/components/select/index.js +28 -0
- package/lib/components/skeleton/index.d.ts +3 -0
- package/lib/components/skeleton/index.js +29 -0
- package/lib/components/slider/index.d.ts +3 -0
- package/lib/components/slider/index.js +47 -0
- package/lib/components/table/index.d.ts +3 -0
- package/lib/components/table/index.js +41 -0
- package/lib/components/tabs/index.d.ts +11 -0
- package/lib/components/tabs/index.js +92 -0
- package/lib/components/time-picker/index.d.ts +3 -0
- package/lib/components/time-picker/index.js +31 -0
- package/lib/components/tree-select/index.d.ts +2 -0
- package/lib/components/tree-select/index.js +40 -0
- package/lib/components/upload/index.d.ts +3 -0
- package/lib/components/upload/index.js +28 -0
- package/lib/index.d.ts +63 -0
- package/lib/index.js +225 -0
- package/lib/utils/hoc.d.ts +17 -0
- package/lib/utils/hoc.js +101 -0
- package/lib/utils/warning.d.ts +1 -0
- package/lib/utils/warning.js +31 -0
- package/lowcode/_setters/antd-icon-setter/index.tsx +285 -0
- package/lowcode/_setters/antd-icon-setter/style.less +69 -0
- package/lowcode/_setters/index.tsx +1 -0
- package/lowcode/_utils/hoc.tsx +93 -0
- package/lowcode/_utils/transform-meta.ts +343 -0
- package/lowcode/_utils/utils.ts +6 -0
- package/lowcode/affix/__screenshots__/affix-1.jpg +0 -0
- package/lowcode/affix/meta.ts +68 -0
- package/lowcode/affix/snippets.ts +20 -0
- package/lowcode/alert/__screenshots__/alert-1.png +0 -0
- package/lowcode/alert/__screenshots__/alert-2.png +0 -0
- package/lowcode/alert/__screenshots__/alert-3.png +0 -0
- package/lowcode/alert/__screenshots__/alert-4.png +0 -0
- package/lowcode/alert/meta.ts +102 -0
- package/lowcode/alert/snippets.ts +54 -0
- package/lowcode/anchor/__screenshots__/anchor-1.png +0 -0
- package/lowcode/anchor/snippets.ts +30 -0
- package/lowcode/anchor.link/meta.ts +29 -0
- package/lowcode/anchor.link/snippets.ts +1 -0
- package/lowcode/auto-complete/__screenshots__/auto-complete-1.png +0 -0
- package/lowcode/auto-complete/meta.ts +453 -0
- package/lowcode/auto-complete/snippets.ts +26 -0
- package/lowcode/avatar/__screenshots__/avatar-1.jpg +0 -0
- package/lowcode/avatar/meta.ts +82 -0
- package/lowcode/avatar/snippets.ts +12 -0
- package/lowcode/badge/__screenshots__/badge-1.png +0 -0
- package/lowcode/badge/meta.ts +94 -0
- package/lowcode/badge/snippets.ts +12 -0
- package/lowcode/breadcrumb/__screenshots__/breadcrumb-1.jpg +0 -0
- package/lowcode/breadcrumb/meta.ts +136 -0
- package/lowcode/breadcrumb/snippets.ts +44 -0
- package/lowcode/button/__screenshots__/button-1.png +0 -0
- package/lowcode/button/__screenshots__/button-2.png +0 -0
- package/lowcode/button/__screenshots__/button-3.png +0 -0
- package/lowcode/button/__screenshots__/button-4.png +0 -0
- package/lowcode/button/__screenshots__/button-5.png +0 -0
- package/lowcode/button/__screenshots__/button-6.png +0 -0
- package/lowcode/button/meta.ts +510 -0
- package/lowcode/button/snippets.ts +68 -0
- package/lowcode/calendar/__screenshots__/calendar-1.jpg +0 -0
- package/lowcode/calendar/meta.ts +133 -0
- package/lowcode/calendar/snippets.ts +10 -0
- package/lowcode/card/__screenshots__/card-1.png +0 -0
- package/lowcode/card/meta.ts +97 -0
- package/lowcode/card/snippets.ts +12 -0
- package/lowcode/carousel/__screenshots__/carousel-1.jpg +0 -0
- package/lowcode/carousel/meta.ts +148 -0
- package/lowcode/carousel/snippets.ts +23 -0
- package/lowcode/cascader/__screenshots__/cascader-1.png +0 -0
- package/lowcode/cascader/meta.ts +175 -0
- package/lowcode/cascader/snippets.ts +46 -0
- package/lowcode/checkbox/__screenshots__/checkbox-1.png +0 -0
- package/lowcode/checkbox/meta.ts +85 -0
- package/lowcode/checkbox/snippets.ts +35 -0
- package/lowcode/checkbox.group/__screenshots__/checkbox-group-1.png +0 -0
- package/lowcode/checkbox.group/meta.ts +150 -0
- package/lowcode/collapse/__screenshots__/collapse-1.png +0 -0
- package/lowcode/collapse/meta.ts +221 -0
- package/lowcode/collapse/snippets.ts +28 -0
- package/lowcode/collapse.pane/meta.ts +84 -0
- package/lowcode/config-provider/__screenshots__/config-provider-1.jpg +0 -0
- package/lowcode/config-provider/meta.ts +140 -0
- package/lowcode/config-provider/snippets.ts +10 -0
- package/lowcode/date-picker/__screenshots__/date-picker-1.png +0 -0
- package/lowcode/date-picker/__screenshots__/date-picker-2.png +0 -0
- package/lowcode/date-picker/__screenshots__/date-picker-3.png +0 -0
- package/lowcode/date-picker/__screenshots__/date-picker-4.png +0 -0
- package/lowcode/date-picker/__screenshots__/date-picker-5.png +0 -0
- package/lowcode/date-picker/meta.ts +281 -0
- package/lowcode/date-picker/snippets.ts +50 -0
- package/lowcode/date-picker.range-picker/__screenshots__/date-picker-range-picker-1.png +0 -0
- package/lowcode/date-picker.range-picker/__screenshots__/date-picker-range-picker-2.png +0 -0
- package/lowcode/date-picker.range-picker/__screenshots__/date-picker-range-picker-3.png +0 -0
- package/lowcode/date-picker.range-picker/__screenshots__/date-picker-range-picker-4.png +0 -0
- package/lowcode/date-picker.range-picker/meta.ts +356 -0
- package/lowcode/date-picker.range-picker/snippets.ts +44 -0
- package/lowcode/descriptions/__screenshots__/descriptions-1.jpg +0 -0
- package/lowcode/descriptions/meta.ts +230 -0
- package/lowcode/descriptions/snippets.ts +18 -0
- package/lowcode/descriptions.item/meta.ts +37 -0
- package/lowcode/directory-tree/meta.ts +2747 -0
- package/lowcode/divider/__screenshots__/divider-1.png +0 -0
- package/lowcode/divider/__screenshots__/divider-2.png +0 -0
- package/lowcode/divider/meta.ts +70 -0
- package/lowcode/divider/snippets.ts +27 -0
- package/lowcode/drawer/__screenshots__/drawer-1.png +0 -0
- package/lowcode/drawer/__screenshots__/drawer-2.png +0 -0
- package/lowcode/drawer/meta.ts +420 -0
- package/lowcode/drawer/snippets.ts +40 -0
- package/lowcode/dropdown/__screenshots__/dropdown-1.png +0 -0
- package/lowcode/dropdown/meta.ts +143 -0
- package/lowcode/dropdown/snippets.ts +73 -0
- package/lowcode/empty/__screenshots__/empty-1.png +0 -0
- package/lowcode/empty/meta.ts +40 -0
- package/lowcode/empty/snippets.ts +10 -0
- package/lowcode/form/__screenshots__/form-1.png +0 -0
- package/lowcode/form/meta.ts +380 -0
- package/lowcode/form/snippets.ts +511 -0
- package/lowcode/form.item/__screenshots__/form-item-1.jpg +0 -0
- package/lowcode/form.item/meta.ts +348 -0
- package/lowcode/form.item/snippets.ts +12 -0
- package/lowcode/form.list/meta.ts +42 -0
- package/lowcode/form.list/snippets.ts +11 -0
- package/lowcode/grid.col/meta.ts +116 -0
- package/lowcode/grid.col/snippets.ts +1 -0
- package/lowcode/grid.row/__screenshots__/1-1-1-1.png +0 -0
- package/lowcode/grid.row/__screenshots__/1-1-1.png +0 -0
- package/lowcode/grid.row/__screenshots__/1-1.png +0 -0
- package/lowcode/grid.row/__screenshots__/1-3.png +0 -0
- package/lowcode/grid.row/meta.ts +118 -0
- package/lowcode/grid.row/snippets.ts +108 -0
- package/lowcode/icon/__screenshots__/icon-1.jpg +0 -0
- package/lowcode/icon/meta.ts +74 -0
- package/lowcode/icon/snippets.ts +13 -0
- package/lowcode/image/__screenshots__/image-1.png +0 -0
- package/lowcode/image/meta.ts +53 -0
- package/lowcode/image/snippets.ts +14 -0
- package/lowcode/input/__screenshots__/input-1.png +0 -0
- package/lowcode/input/meta.ts +190 -0
- package/lowcode/input/snippets.ts +12 -0
- package/lowcode/input-number/__screenshots__/input-number-1.png +0 -0
- package/lowcode/input-number/meta.ts +213 -0
- package/lowcode/input-number/snippets.ts +12 -0
- package/lowcode/input.group/__screenshots__/input-group-1.jpg +0 -0
- package/lowcode/input.group/meta.ts +53 -0
- package/lowcode/input.group/snippets.ts +24 -0
- package/lowcode/input.password/__screenshots__/input-password-1.png +0 -0
- package/lowcode/input.password/meta.ts +192 -0
- package/lowcode/input.password/snippets.ts +12 -0
- package/lowcode/input.search/__screenshots__/input-search-1.png +0 -0
- package/lowcode/input.search/meta.ts +206 -0
- package/lowcode/input.search/snippets.ts +12 -0
- package/lowcode/input.text-area/__screenshots__/input-text-area-1.png +0 -0
- package/lowcode/input.text-area/meta.ts +210 -0
- package/lowcode/input.text-area/snippets.ts +16 -0
- package/lowcode/list/__screenshots__/list-1.png +0 -0
- package/lowcode/list/meta.ts +499 -0
- package/lowcode/list/snippets.ts +201 -0
- package/lowcode/list.item/meta.ts +58 -0
- package/lowcode/list.item.meta/meta.ts +49 -0
- package/lowcode/login/meta.ts +56 -0
- package/lowcode/mentions/__screenshots__/mentions-1.png +0 -0
- package/lowcode/mentions/meta.ts +159 -0
- package/lowcode/mentions/snippets.ts +10 -0
- package/lowcode/menu/__screenshots__/menu-1.jpg +0 -0
- package/lowcode/menu/meta.ts +248 -0
- package/lowcode/menu/snippets.ts +22 -0
- package/lowcode/menu/utils.ts +97 -0
- package/lowcode/menu.item/meta.ts +63 -0
- package/lowcode/menu.item/snippets.ts +1 -0
- package/lowcode/menu.item-group/__screenshots__/menu-item-group-1.png +0 -0
- package/lowcode/menu.item-group/meta.ts +110 -0
- package/lowcode/menu.item-group/snippets.ts +1 -0
- package/lowcode/menu.sub-menu/meta.ts +131 -0
- package/lowcode/menu.sub-menu/snippets.ts +1 -0
- package/lowcode/modal/__screenshots__/modal-1.png +0 -0
- package/lowcode/modal/__screenshots__/modal-2.png +0 -0
- package/lowcode/modal/meta.ts +270 -0
- package/lowcode/modal/snippets.ts +33 -0
- package/lowcode/page-header/__screenshots__/page-header-1.jpg +0 -0
- package/lowcode/page-header/meta.ts +157 -0
- package/lowcode/page-header/snippets.ts +13 -0
- package/lowcode/pagination/__screenshots__/pagination-1.jpg +0 -0
- package/lowcode/pagination/meta.ts +231 -0
- package/lowcode/pagination/snippets.ts +14 -0
- package/lowcode/popconfirm/__screenshots__/popconfirm-1.jpg +0 -0
- package/lowcode/popconfirm/meta.ts +121 -0
- package/lowcode/popconfirm/snippets.ts +21 -0
- package/lowcode/popover/__screenshots__/popover-1.jpg +0 -0
- package/lowcode/popover/meta.ts +332 -0
- package/lowcode/popover/snippets.ts +10 -0
- package/lowcode/progress/__screenshots__/progress-1.png +0 -0
- package/lowcode/progress/__screenshots__/progress-2.png +0 -0
- package/lowcode/progress/meta.ts +142 -0
- package/lowcode/progress/snippets.ts +24 -0
- package/lowcode/radio/__screenshots__/radio-1.png +0 -0
- package/lowcode/radio/meta.ts +69 -0
- package/lowcode/radio/snippets.ts +35 -0
- package/lowcode/radio.group/__screenshots__/radio-group-1.png +0 -0
- package/lowcode/radio.group/meta.ts +213 -0
- package/lowcode/rate/__screenshots__/rate-1.png +0 -0
- package/lowcode/rate/meta.ts +132 -0
- package/lowcode/rate/snippets.ts +12 -0
- package/lowcode/result/__screenshots__/result-1.png +0 -0
- package/lowcode/result/meta.ts +53 -0
- package/lowcode/result/snippets.ts +14 -0
- package/lowcode/select/__screenshots__/select-1.png +0 -0
- package/lowcode/select/meta.ts +427 -0
- package/lowcode/select/snippets.ts +28 -0
- package/lowcode/skeleton/__screenshots__/skeleton-1.png +0 -0
- package/lowcode/skeleton/meta.ts +63 -0
- package/lowcode/skeleton/snippets.ts +13 -0
- package/lowcode/slider/__screenshots__/slider-1.png +0 -0
- package/lowcode/slider/meta.ts +218 -0
- package/lowcode/slider/snippets.ts +12 -0
- package/lowcode/slot/meta.ts +61 -0
- package/lowcode/slot/view.tsx +58 -0
- package/lowcode/space/__screenshots__/space-1.png +0 -0
- package/lowcode/space/meta.ts +65 -0
- package/lowcode/space/snippets.ts +24 -0
- package/lowcode/spin/__screenshots__/spin-1.png +0 -0
- package/lowcode/spin/meta.ts +60 -0
- package/lowcode/spin/snippets.ts +13 -0
- package/lowcode/statistic/__screenshots__/statistic-1.png +0 -0
- package/lowcode/statistic/meta.ts +67 -0
- package/lowcode/statistic/snippets.ts +13 -0
- package/lowcode/steps/__screenshots__/steps-1.png +0 -0
- package/lowcode/steps/meta.ts +281 -0
- package/lowcode/steps/snippets.ts +36 -0
- package/lowcode/steps.step/meta.ts +54 -0
- package/lowcode/steps.step/snippets.ts +1 -0
- package/lowcode/switch/__screenshots__/switch-1.png +0 -0
- package/lowcode/switch/meta.ts +122 -0
- package/lowcode/switch/snippets.ts +12 -0
- package/lowcode/table/__screenshots__/table-1.png +0 -0
- package/lowcode/table/meta.ts +847 -0
- package/lowcode/table/snippets.ts +43 -0
- package/lowcode/tabs/__screenshots__/tabs-1.jpg +0 -0
- package/lowcode/tabs/__screenshots__/tabs-2.jpg +0 -0
- package/lowcode/tabs/__screenshots__/tabs-3.jpg +0 -0
- package/lowcode/tabs/meta.ts +415 -0
- package/lowcode/tabs/snippets.ts +86 -0
- package/lowcode/tabs.tab-pane/meta.ts +78 -0
- package/lowcode/tag/__screenshots__/tag-1.png +0 -0
- package/lowcode/tag/meta.ts +69 -0
- package/lowcode/tag/snippets.ts +13 -0
- package/lowcode/time-picker/__screenshots__/time-picker-1.png +0 -0
- package/lowcode/time-picker/meta.ts +224 -0
- package/lowcode/time-picker/snippets.ts +10 -0
- package/lowcode/timeline/__screenshots__/timeline-1.jpg +0 -0
- package/lowcode/timeline/meta.ts +189 -0
- package/lowcode/timeline/snippets.ts +21 -0
- package/lowcode/timeline.item/__screenshots__/timeline-1.jpg +0 -0
- package/lowcode/timeline.item/meta.ts +53 -0
- package/lowcode/timeline.item/snippets.ts +10 -0
- package/lowcode/tooltip/__screenshots__/tooltip-1.jpg +0 -0
- package/lowcode/tooltip/meta.ts +306 -0
- package/lowcode/tooltip/snippets.ts +12 -0
- package/lowcode/transfer/__screenshots__/transfer-1.png +0 -0
- package/lowcode/transfer/meta.ts +304 -0
- package/lowcode/transfer/snippets.ts +42 -0
- package/lowcode/tree/__screenshots__/tree-1.jpg +0 -0
- package/lowcode/tree/meta.ts +377 -0
- package/lowcode/tree/snippets.ts +30 -0
- package/lowcode/tree-select/__screenshots__/tree-select-1.png +0 -0
- package/lowcode/tree-select/meta.ts +314 -0
- package/lowcode/tree-select/snippets.ts +34 -0
- package/lowcode/typography.link/__screenshots__/typography-link-1.png +0 -0
- package/lowcode/typography.link/meta.ts +44 -0
- package/lowcode/typography.link/snippets.ts +14 -0
- package/lowcode/typography.paragraph/__screenshots__/typography-paragraph-1.png +0 -0
- package/lowcode/typography.paragraph/meta.ts +129 -0
- package/lowcode/typography.paragraph/snippets.ts +14 -0
- package/lowcode/typography.text/__screenshots__/typography-text-1.png +0 -0
- package/lowcode/typography.text/__screenshots__/typography-text-2.png +0 -0
- package/lowcode/typography.text/__screenshots__/typography-text-3.png +0 -0
- package/lowcode/typography.text/meta.ts +200 -0
- package/lowcode/typography.text/snippets.ts +34 -0
- package/lowcode/typography.title/__screenshots__/typography-title-1.png +0 -0
- package/lowcode/typography.title/__screenshots__/typography-title-2.png +0 -0
- package/lowcode/typography.title/__screenshots__/typography-title-3.png +0 -0
- package/lowcode/typography.title/__screenshots__/typography-title-4.png +0 -0
- package/lowcode/typography.title/meta.ts +130 -0
- package/lowcode/typography.title/snippets.ts +46 -0
- package/lowcode/upload/__screenshots__/upload-1.png +0 -0
- package/lowcode/upload/meta.ts +439 -0
- package/lowcode/upload/snippets.ts +16 -0
- package/package.json +37 -3
- package/.fatherrc.ts +0 -7
- package/CHANGELOG.md +0 -7
- package/tsconfig.json +0 -14
|
@@ -0,0 +1,343 @@
|
|
|
1
|
+
import {
|
|
2
|
+
FieldConfig,
|
|
3
|
+
PropConfig,
|
|
4
|
+
PropType,
|
|
5
|
+
SetterType,
|
|
6
|
+
OneOf,
|
|
7
|
+
ObjectOf,
|
|
8
|
+
ArrayOf,
|
|
9
|
+
TransformedComponentMetadata,
|
|
10
|
+
} from '@ali/lowcode-types';
|
|
11
|
+
|
|
12
|
+
// http://gitlab.alibaba-inc.com/ali-lowcode/ali-lowcode-engine/merge_requests/1054678
|
|
13
|
+
// 这个MR合并后可以去掉这个文件
|
|
14
|
+
|
|
15
|
+
function propConfigToFieldConfig(
|
|
16
|
+
propConfig: PropConfig,
|
|
17
|
+
supportVariable: boolean,
|
|
18
|
+
): FieldConfig {
|
|
19
|
+
const { name, description } = propConfig;
|
|
20
|
+
const title = {
|
|
21
|
+
label: {
|
|
22
|
+
type: 'i18n',
|
|
23
|
+
'en-US': name,
|
|
24
|
+
'zh-CN': description?.slice(0, 10) || name,
|
|
25
|
+
},
|
|
26
|
+
tip: description ? `${name} | ${description}` : undefined,
|
|
27
|
+
};
|
|
28
|
+
|
|
29
|
+
let setter =
|
|
30
|
+
(propConfig as any).setter ||
|
|
31
|
+
propTypeToSetter(propConfig.propType, supportVariable);
|
|
32
|
+
|
|
33
|
+
if (supportVariable && (propConfig as any).supportVariable !== false) {
|
|
34
|
+
if (
|
|
35
|
+
setter.componentName === 'MixedSetter' &&
|
|
36
|
+
setter.props?.setters &&
|
|
37
|
+
setter.props?.setters?.every((setter: any) => {
|
|
38
|
+
return (
|
|
39
|
+
setter?.componentName !== 'VariableSetter' &&
|
|
40
|
+
setter !== 'VariableSetter'
|
|
41
|
+
);
|
|
42
|
+
})
|
|
43
|
+
) {
|
|
44
|
+
setter.props.setters.push('VariableSetter');
|
|
45
|
+
} else if (
|
|
46
|
+
setter &&
|
|
47
|
+
setter !== 'VariableSetter' &&
|
|
48
|
+
setter.componentName !== 'VariableSetter'
|
|
49
|
+
) {
|
|
50
|
+
setter = {
|
|
51
|
+
componentName: 'MixedSetter',
|
|
52
|
+
props: {
|
|
53
|
+
setters: [setter, 'VariableSetter'],
|
|
54
|
+
},
|
|
55
|
+
};
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
return {
|
|
60
|
+
title,
|
|
61
|
+
...propConfig,
|
|
62
|
+
// TODO 这边直接用propConfig,将setter丢在propconfig里,需要确认是否在PropConfig扩展还是换实现
|
|
63
|
+
setter,
|
|
64
|
+
};
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
function propTypeToSetter(
|
|
68
|
+
propType: PropType,
|
|
69
|
+
supportVariable: boolean,
|
|
70
|
+
): SetterType {
|
|
71
|
+
let typeName: string;
|
|
72
|
+
let isRequired: boolean | undefined = false;
|
|
73
|
+
if (typeof propType === 'string') {
|
|
74
|
+
typeName = propType;
|
|
75
|
+
} else if (typeof propType === 'object') {
|
|
76
|
+
typeName = propType.type;
|
|
77
|
+
isRequired = propType.isRequired;
|
|
78
|
+
} else {
|
|
79
|
+
typeName = 'string';
|
|
80
|
+
}
|
|
81
|
+
// TODO: use mixinSetter wrapper
|
|
82
|
+
switch (typeName) {
|
|
83
|
+
case 'string':
|
|
84
|
+
return {
|
|
85
|
+
componentName: 'StringSetter',
|
|
86
|
+
isRequired,
|
|
87
|
+
initialValue: '',
|
|
88
|
+
};
|
|
89
|
+
case 'number':
|
|
90
|
+
return {
|
|
91
|
+
componentName: 'NumberSetter',
|
|
92
|
+
isRequired,
|
|
93
|
+
initialValue: 0,
|
|
94
|
+
};
|
|
95
|
+
case 'bool':
|
|
96
|
+
return {
|
|
97
|
+
componentName: 'BoolSetter',
|
|
98
|
+
isRequired,
|
|
99
|
+
initialValue: false,
|
|
100
|
+
};
|
|
101
|
+
case 'oneOf':
|
|
102
|
+
const dataSource = ((propType as OneOf).value || []).map(
|
|
103
|
+
(value, index) => {
|
|
104
|
+
const t = typeof value;
|
|
105
|
+
return {
|
|
106
|
+
label:
|
|
107
|
+
t === 'string' || t === 'number' || t === 'boolean'
|
|
108
|
+
? String(value)
|
|
109
|
+
: `value ${index}`,
|
|
110
|
+
value,
|
|
111
|
+
};
|
|
112
|
+
},
|
|
113
|
+
);
|
|
114
|
+
const componentName =
|
|
115
|
+
dataSource.length >= 4 ? 'SelectSetter' : 'RadioGroupSetter';
|
|
116
|
+
return {
|
|
117
|
+
componentName,
|
|
118
|
+
props: { dataSource, options: dataSource },
|
|
119
|
+
isRequired,
|
|
120
|
+
initialValue: dataSource[0] ? dataSource[0].value : null,
|
|
121
|
+
};
|
|
122
|
+
|
|
123
|
+
case 'element':
|
|
124
|
+
case 'node': // TODO: use Mixin
|
|
125
|
+
return {
|
|
126
|
+
// slotSetter
|
|
127
|
+
componentName: 'SlotSetter',
|
|
128
|
+
props: {
|
|
129
|
+
mode: typeName,
|
|
130
|
+
},
|
|
131
|
+
isRequired,
|
|
132
|
+
initialValue: {
|
|
133
|
+
type: 'JSSlot',
|
|
134
|
+
value: [],
|
|
135
|
+
},
|
|
136
|
+
};
|
|
137
|
+
case 'shape':
|
|
138
|
+
case 'exact':
|
|
139
|
+
const items = ((propType as any).value || []).map((item: any) =>
|
|
140
|
+
propConfigToFieldConfig(item, supportVariable),
|
|
141
|
+
);
|
|
142
|
+
return {
|
|
143
|
+
componentName: 'ObjectSetter',
|
|
144
|
+
props: {
|
|
145
|
+
config: {
|
|
146
|
+
items,
|
|
147
|
+
extraSetter:
|
|
148
|
+
typeName === 'shape'
|
|
149
|
+
? propTypeToSetter('any', supportVariable)
|
|
150
|
+
: null,
|
|
151
|
+
},
|
|
152
|
+
},
|
|
153
|
+
isRequired,
|
|
154
|
+
initialValue: (field: any) => {
|
|
155
|
+
const data: any = {};
|
|
156
|
+
items.forEach((item: any) => {
|
|
157
|
+
let initial = item.defaultValue;
|
|
158
|
+
if (
|
|
159
|
+
initial == null &&
|
|
160
|
+
item.setter &&
|
|
161
|
+
typeof item.setter === 'object'
|
|
162
|
+
) {
|
|
163
|
+
initial = (item.setter as any).initialValue;
|
|
164
|
+
}
|
|
165
|
+
data[item.name] = initial
|
|
166
|
+
? typeof initial === 'function'
|
|
167
|
+
? initial(field)
|
|
168
|
+
: initial
|
|
169
|
+
: null;
|
|
170
|
+
});
|
|
171
|
+
return data;
|
|
172
|
+
},
|
|
173
|
+
};
|
|
174
|
+
case 'object':
|
|
175
|
+
case 'objectOf':
|
|
176
|
+
return {
|
|
177
|
+
componentName: 'ObjectSetter',
|
|
178
|
+
props: {
|
|
179
|
+
config: {
|
|
180
|
+
extraSetter: propTypeToSetter(
|
|
181
|
+
typeName === 'objectOf' ? (propType as ObjectOf).value : 'any',
|
|
182
|
+
supportVariable,
|
|
183
|
+
),
|
|
184
|
+
},
|
|
185
|
+
},
|
|
186
|
+
isRequired,
|
|
187
|
+
initialValue: {},
|
|
188
|
+
};
|
|
189
|
+
case 'array':
|
|
190
|
+
case 'arrayOf':
|
|
191
|
+
return {
|
|
192
|
+
componentName: 'ArraySetter',
|
|
193
|
+
props: {
|
|
194
|
+
itemSetter: propTypeToSetter(
|
|
195
|
+
typeName === 'arrayOf' ? (propType as ArrayOf).value : 'any',
|
|
196
|
+
supportVariable,
|
|
197
|
+
),
|
|
198
|
+
},
|
|
199
|
+
isRequired,
|
|
200
|
+
initialValue: [],
|
|
201
|
+
};
|
|
202
|
+
case 'func':
|
|
203
|
+
return {
|
|
204
|
+
componentName: 'FunctionSetter',
|
|
205
|
+
isRequired,
|
|
206
|
+
};
|
|
207
|
+
case 'color':
|
|
208
|
+
return {
|
|
209
|
+
componentName: 'ColorSetter',
|
|
210
|
+
isRequired,
|
|
211
|
+
};
|
|
212
|
+
case 'oneOfType':
|
|
213
|
+
return {
|
|
214
|
+
componentName: 'MixedSetter',
|
|
215
|
+
props: {
|
|
216
|
+
// TODO:
|
|
217
|
+
setters: (propType as any).value.map((item: any) =>
|
|
218
|
+
propTypeToSetter(item, supportVariable),
|
|
219
|
+
),
|
|
220
|
+
},
|
|
221
|
+
isRequired,
|
|
222
|
+
};
|
|
223
|
+
default:
|
|
224
|
+
// do nothing
|
|
225
|
+
}
|
|
226
|
+
return {
|
|
227
|
+
componentName: 'MixedSetter',
|
|
228
|
+
isRequired,
|
|
229
|
+
props: {},
|
|
230
|
+
};
|
|
231
|
+
}
|
|
232
|
+
|
|
233
|
+
const NO_EVENTS = ['beforeUpload'];
|
|
234
|
+
const EVENT_RE = /^on|after|before[A-Z][\w]*$/;
|
|
235
|
+
|
|
236
|
+
export default function(
|
|
237
|
+
metadata: TransformedComponentMetadata,
|
|
238
|
+
supportVariable: boolean,
|
|
239
|
+
): TransformedComponentMetadata {
|
|
240
|
+
const { configure = {} } = metadata;
|
|
241
|
+
// TODO types后续补充
|
|
242
|
+
let extendsProps: any = null;
|
|
243
|
+
if (configure.props) {
|
|
244
|
+
if (Array.isArray(configure.props)) {
|
|
245
|
+
return metadata;
|
|
246
|
+
}
|
|
247
|
+
const { isExtends, override = [] } = configure.props;
|
|
248
|
+
// 不开启继承时,直接返回configure配置
|
|
249
|
+
if (!isExtends) {
|
|
250
|
+
return {
|
|
251
|
+
...metadata,
|
|
252
|
+
configure: {
|
|
253
|
+
...configure,
|
|
254
|
+
props: [...override],
|
|
255
|
+
},
|
|
256
|
+
};
|
|
257
|
+
}
|
|
258
|
+
|
|
259
|
+
extendsProps = {};
|
|
260
|
+
// 开启继承后,缓存重写内容的配置
|
|
261
|
+
override.forEach((prop: any) => {
|
|
262
|
+
extendsProps[prop.name] = prop;
|
|
263
|
+
});
|
|
264
|
+
}
|
|
265
|
+
|
|
266
|
+
if (!metadata.props) {
|
|
267
|
+
return {
|
|
268
|
+
...metadata,
|
|
269
|
+
configure: {
|
|
270
|
+
...configure,
|
|
271
|
+
props: [],
|
|
272
|
+
},
|
|
273
|
+
};
|
|
274
|
+
}
|
|
275
|
+
const { component = {}, supports = {} } = configure;
|
|
276
|
+
const supportedEvents: any[] | null = (supports as any).events ? null : [];
|
|
277
|
+
const props: FieldConfig[] = [];
|
|
278
|
+
|
|
279
|
+
metadata.props.forEach(prop => {
|
|
280
|
+
const { name, propType, description } = prop;
|
|
281
|
+
if (
|
|
282
|
+
name === 'children' &&
|
|
283
|
+
(component.isContainer ||
|
|
284
|
+
propType === 'node' ||
|
|
285
|
+
propType === 'element' ||
|
|
286
|
+
propType === 'any')
|
|
287
|
+
) {
|
|
288
|
+
if (component.isContainer !== false) {
|
|
289
|
+
component.isContainer = true;
|
|
290
|
+
props.push(propConfigToFieldConfig(prop, supportVariable));
|
|
291
|
+
return;
|
|
292
|
+
}
|
|
293
|
+
}
|
|
294
|
+
|
|
295
|
+
if (
|
|
296
|
+
EVENT_RE.test(name) &&
|
|
297
|
+
NO_EVENTS.indexOf(name) < 0 &&
|
|
298
|
+
(propType === 'func' || propType === 'any')
|
|
299
|
+
) {
|
|
300
|
+
if (supportedEvents) {
|
|
301
|
+
supportedEvents.push({
|
|
302
|
+
name,
|
|
303
|
+
description,
|
|
304
|
+
});
|
|
305
|
+
(supports as any).events = supportedEvents;
|
|
306
|
+
}
|
|
307
|
+
return;
|
|
308
|
+
}
|
|
309
|
+
|
|
310
|
+
if (name === 'className' && (propType === 'string' || propType === 'any')) {
|
|
311
|
+
if ((supports as any).className == null) {
|
|
312
|
+
(supports as any).className = true;
|
|
313
|
+
}
|
|
314
|
+
return;
|
|
315
|
+
}
|
|
316
|
+
|
|
317
|
+
if (name === 'style' && (propType === 'object' || propType === 'any')) {
|
|
318
|
+
if ((supports as any).style == null) {
|
|
319
|
+
(supports as any).style = true;
|
|
320
|
+
}
|
|
321
|
+
return;
|
|
322
|
+
}
|
|
323
|
+
|
|
324
|
+
// 存在覆盖配置时
|
|
325
|
+
if (extendsProps) {
|
|
326
|
+
if (name in extendsProps) {
|
|
327
|
+
prop = extendsProps[name];
|
|
328
|
+
}
|
|
329
|
+
}
|
|
330
|
+
|
|
331
|
+
props.push(propConfigToFieldConfig(prop, supportVariable));
|
|
332
|
+
});
|
|
333
|
+
|
|
334
|
+
return {
|
|
335
|
+
...metadata,
|
|
336
|
+
configure: {
|
|
337
|
+
...configure,
|
|
338
|
+
props,
|
|
339
|
+
supports,
|
|
340
|
+
component,
|
|
341
|
+
},
|
|
342
|
+
} as any;
|
|
343
|
+
}
|
|
Binary file
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
import { ComponentMetadata, Snippet } from "@alilc/lowcode-types";
|
|
2
|
+
import snippets from "./snippets";
|
|
3
|
+
|
|
4
|
+
const AffixMeta: ComponentMetadata = {
|
|
5
|
+
componentName: "Affix",
|
|
6
|
+
title: "固钉",
|
|
7
|
+
category: "导航",
|
|
8
|
+
docUrl: "",
|
|
9
|
+
screenshot: "",
|
|
10
|
+
devMode: "proCode",
|
|
11
|
+
npm: {
|
|
12
|
+
package: "@pisell/materials",
|
|
13
|
+
version: "1.0.1",
|
|
14
|
+
exportName: "Affix",
|
|
15
|
+
main: "src/index.tsx",
|
|
16
|
+
destructuring: true,
|
|
17
|
+
subName: "",
|
|
18
|
+
},
|
|
19
|
+
configure: {
|
|
20
|
+
props: [
|
|
21
|
+
{
|
|
22
|
+
name: "offsetBottom",
|
|
23
|
+
title: {
|
|
24
|
+
label: "底部触发距离",
|
|
25
|
+
tip: "距离窗口底部达到指定偏移量后触发",
|
|
26
|
+
},
|
|
27
|
+
propType: "number",
|
|
28
|
+
},
|
|
29
|
+
{
|
|
30
|
+
name: "offsetTop",
|
|
31
|
+
title: {
|
|
32
|
+
label: "顶部触发距离",
|
|
33
|
+
tip: "距离窗口顶部达到指定偏移量后触发",
|
|
34
|
+
},
|
|
35
|
+
propType: "number",
|
|
36
|
+
},
|
|
37
|
+
{
|
|
38
|
+
name: "target",
|
|
39
|
+
title: {
|
|
40
|
+
label: "获取触发元素",
|
|
41
|
+
tip: "设置 `Affix` 需要监听其滚动事件的元素,值为一个返回对应 DOM 元素的函数",
|
|
42
|
+
},
|
|
43
|
+
propType: "func",
|
|
44
|
+
},
|
|
45
|
+
{
|
|
46
|
+
name: "onChange",
|
|
47
|
+
title: { label: "监听状态改变", tip: "固定状态改变时触发的回调函数" },
|
|
48
|
+
propType: "func",
|
|
49
|
+
},
|
|
50
|
+
],
|
|
51
|
+
supports: {
|
|
52
|
+
style: true,
|
|
53
|
+
events: [
|
|
54
|
+
{
|
|
55
|
+
name: "onChange",
|
|
56
|
+
template:
|
|
57
|
+
"onChange(affixed,${extParams}){\n// 固定状态变更回调函数\nconsole.log('onChange', affixed);}",
|
|
58
|
+
},
|
|
59
|
+
],
|
|
60
|
+
},
|
|
61
|
+
component: {},
|
|
62
|
+
},
|
|
63
|
+
};
|
|
64
|
+
|
|
65
|
+
export default {
|
|
66
|
+
...AffixMeta,
|
|
67
|
+
snippets,
|
|
68
|
+
};
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
export default [
|
|
2
|
+
{
|
|
3
|
+
title: '固钉',
|
|
4
|
+
screenshot: 'https://alifd.alicdn.com/fusion-cool/icons/icon-antd/affix-1.jpg',
|
|
5
|
+
schema: {
|
|
6
|
+
componentName: 'Affix',
|
|
7
|
+
props: {
|
|
8
|
+
offsetTop: 100,
|
|
9
|
+
},
|
|
10
|
+
children: [
|
|
11
|
+
{
|
|
12
|
+
componentName: 'Button',
|
|
13
|
+
props: {
|
|
14
|
+
children: 'Affix Top',
|
|
15
|
+
},
|
|
16
|
+
},
|
|
17
|
+
],
|
|
18
|
+
},
|
|
19
|
+
},
|
|
20
|
+
];
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
@@ -0,0 +1,102 @@
|
|
|
1
|
+
import { ComponentMetadata, Snippet } from "@alilc/lowcode-types";
|
|
2
|
+
import snippets from "./snippets";
|
|
3
|
+
|
|
4
|
+
const AlertMeta: ComponentMetadata = {
|
|
5
|
+
componentName: "Alert",
|
|
6
|
+
title: "警告提示",
|
|
7
|
+
category: "反馈",
|
|
8
|
+
docUrl: "",
|
|
9
|
+
screenshot: "",
|
|
10
|
+
devMode: "proCode",
|
|
11
|
+
npm: {
|
|
12
|
+
package: "@pisell/materials",
|
|
13
|
+
version: "1.0.1",
|
|
14
|
+
exportName: "Alert",
|
|
15
|
+
main: "src/index.tsx",
|
|
16
|
+
destructuring: true,
|
|
17
|
+
subName: "",
|
|
18
|
+
},
|
|
19
|
+
configure: {
|
|
20
|
+
props: [
|
|
21
|
+
{
|
|
22
|
+
name: "afterClose",
|
|
23
|
+
title: {
|
|
24
|
+
label: "关闭动画结束后触发的回调函数",
|
|
25
|
+
tip: "关闭动画结束后触发的回调函数",
|
|
26
|
+
},
|
|
27
|
+
propType: "func",
|
|
28
|
+
},
|
|
29
|
+
{
|
|
30
|
+
name: "banner",
|
|
31
|
+
title: { label: "顶部公告", tip: "是否用作顶部公告" },
|
|
32
|
+
propType: "bool",
|
|
33
|
+
defaultValue: false,
|
|
34
|
+
},
|
|
35
|
+
{
|
|
36
|
+
name: "closable",
|
|
37
|
+
title: { label: "可关闭", tip: "默认不显示关闭按钮" },
|
|
38
|
+
propType: "bool",
|
|
39
|
+
},
|
|
40
|
+
{
|
|
41
|
+
name: "closeText",
|
|
42
|
+
title: { label: "自定义关闭按钮", tip: "自定义关闭按钮" },
|
|
43
|
+
propType: { type: "oneOfType", value: ["string", "node"] },
|
|
44
|
+
},
|
|
45
|
+
{
|
|
46
|
+
name: "description",
|
|
47
|
+
title: {
|
|
48
|
+
label: "描述信息",
|
|
49
|
+
tip: "警告提示的辅助性文字介绍",
|
|
50
|
+
},
|
|
51
|
+
propType: { type: "oneOfType", value: ["string", "node"] },
|
|
52
|
+
},
|
|
53
|
+
{
|
|
54
|
+
name: "icon",
|
|
55
|
+
title: {
|
|
56
|
+
label: "图标",
|
|
57
|
+
tip: "自定义图标,`showIcon` 为 true 时有效",
|
|
58
|
+
},
|
|
59
|
+
propType: "node",
|
|
60
|
+
},
|
|
61
|
+
{
|
|
62
|
+
name: "message",
|
|
63
|
+
title: { label: "警告提示内容", tip: "警告提示内容" },
|
|
64
|
+
propType: { type: "oneOfType", value: ["string", "node"] },
|
|
65
|
+
},
|
|
66
|
+
{
|
|
67
|
+
name: "showIcon",
|
|
68
|
+
title: { label: "显示图标", tip: "是否显示辅助图标" },
|
|
69
|
+
propType: "bool",
|
|
70
|
+
},
|
|
71
|
+
{
|
|
72
|
+
name: "type",
|
|
73
|
+
title: { label: "类型", tip: "类型" },
|
|
74
|
+
propType: {
|
|
75
|
+
type: "oneOf",
|
|
76
|
+
value: ["success", "info", "warning", "error"],
|
|
77
|
+
},
|
|
78
|
+
},
|
|
79
|
+
{
|
|
80
|
+
name: "onClose",
|
|
81
|
+
title: { label: "关闭时触发的回调函数", tip: "关闭时触发的回调函数" },
|
|
82
|
+
propType: "func",
|
|
83
|
+
},
|
|
84
|
+
],
|
|
85
|
+
supports: {
|
|
86
|
+
style: true,
|
|
87
|
+
events: [
|
|
88
|
+
{
|
|
89
|
+
name: "onClose",
|
|
90
|
+
template:
|
|
91
|
+
"onChange(event,${extParams}){\n// 关闭时触发的回调函数\nconsole.log('onChange');}",
|
|
92
|
+
},
|
|
93
|
+
],
|
|
94
|
+
},
|
|
95
|
+
component: {},
|
|
96
|
+
},
|
|
97
|
+
};
|
|
98
|
+
|
|
99
|
+
export default {
|
|
100
|
+
...AlertMeta,
|
|
101
|
+
snippets,
|
|
102
|
+
};
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
export default [
|
|
2
|
+
{
|
|
3
|
+
title: '成功提示',
|
|
4
|
+
screenshot: 'https://alifd.alicdn.com/fusion-cool/icons/icon-antd/alert-1.png',
|
|
5
|
+
schema: {
|
|
6
|
+
componentName: 'Alert',
|
|
7
|
+
props: {
|
|
8
|
+
message: 'Success Tips',
|
|
9
|
+
description: 'Detailed description and advice about successful copywriting.',
|
|
10
|
+
type: 'success',
|
|
11
|
+
showIcon: true,
|
|
12
|
+
},
|
|
13
|
+
},
|
|
14
|
+
},
|
|
15
|
+
{
|
|
16
|
+
title: '信息提示',
|
|
17
|
+
screenshot: 'https://alifd.alicdn.com/fusion-cool/icons/icon-antd/alert-2.png',
|
|
18
|
+
schema: {
|
|
19
|
+
componentName: 'Alert',
|
|
20
|
+
props: {
|
|
21
|
+
message: 'Informational Notes',
|
|
22
|
+
description: 'Additional description and information about copywriting.',
|
|
23
|
+
type: 'info',
|
|
24
|
+
showIcon: true,
|
|
25
|
+
},
|
|
26
|
+
},
|
|
27
|
+
},
|
|
28
|
+
{
|
|
29
|
+
title: '警告提示',
|
|
30
|
+
screenshot: 'https://alifd.alicdn.com/fusion-cool/icons/icon-antd/alert-3.png',
|
|
31
|
+
schema: {
|
|
32
|
+
componentName: 'Alert',
|
|
33
|
+
props: {
|
|
34
|
+
message: 'Warning',
|
|
35
|
+
description: 'This is a warning notice about copywriting.',
|
|
36
|
+
type: 'warning',
|
|
37
|
+
showIcon: true,
|
|
38
|
+
},
|
|
39
|
+
},
|
|
40
|
+
},
|
|
41
|
+
{
|
|
42
|
+
title: '错误提示',
|
|
43
|
+
screenshot: 'https://alifd.alicdn.com/fusion-cool/icons/icon-antd/alert-4.png',
|
|
44
|
+
schema: {
|
|
45
|
+
componentName: 'Alert',
|
|
46
|
+
props: {
|
|
47
|
+
message: 'Error',
|
|
48
|
+
description: 'This is an error message about copywriting.',
|
|
49
|
+
type: 'error',
|
|
50
|
+
showIcon: true,
|
|
51
|
+
},
|
|
52
|
+
},
|
|
53
|
+
},
|
|
54
|
+
];
|
|
Binary file
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
export default [
|
|
2
|
+
{
|
|
3
|
+
title: '锚点',
|
|
4
|
+
screenshot: 'https://alifd.alicdn.com/fusion-cool/icons/icon-antd/anchor-1.png',
|
|
5
|
+
schema: {
|
|
6
|
+
componentName: 'Anchor',
|
|
7
|
+
props: {},
|
|
8
|
+
children: [
|
|
9
|
+
{
|
|
10
|
+
componentName: 'Anchor.Link',
|
|
11
|
+
props: {
|
|
12
|
+
title: 'Document',
|
|
13
|
+
},
|
|
14
|
+
},
|
|
15
|
+
{
|
|
16
|
+
componentName: 'Anchor.Link',
|
|
17
|
+
props: {
|
|
18
|
+
title: 'API',
|
|
19
|
+
},
|
|
20
|
+
},
|
|
21
|
+
{
|
|
22
|
+
componentName: 'Anchor.Link',
|
|
23
|
+
props: {
|
|
24
|
+
title: 'Demo',
|
|
25
|
+
},
|
|
26
|
+
},
|
|
27
|
+
],
|
|
28
|
+
},
|
|
29
|
+
},
|
|
30
|
+
];
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import snippets from './snippets';
|
|
2
|
+
|
|
3
|
+
export default {
|
|
4
|
+
snippets,
|
|
5
|
+
componentName: 'Anchor.Link',
|
|
6
|
+
title: '锚点链接',
|
|
7
|
+
category: '其他',
|
|
8
|
+
props: [
|
|
9
|
+
{
|
|
10
|
+
name: 'href',
|
|
11
|
+
title: { label: '锚点链接', tip: '锚点链接' },
|
|
12
|
+
propType: 'string',
|
|
13
|
+
},
|
|
14
|
+
{
|
|
15
|
+
name: 'target',
|
|
16
|
+
title: {
|
|
17
|
+
label: 'target',
|
|
18
|
+
tip: '该属性指定在何处显示链接的资源',
|
|
19
|
+
},
|
|
20
|
+
propType: 'string',
|
|
21
|
+
},
|
|
22
|
+
{
|
|
23
|
+
name: 'title',
|
|
24
|
+
title: { label: '内容', tip: '内容' },
|
|
25
|
+
propType: 'string',
|
|
26
|
+
},
|
|
27
|
+
],
|
|
28
|
+
configure: { supports: { style: true } },
|
|
29
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export default [];
|
|
Binary file
|