@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,58 @@
|
|
|
1
|
+
// FIXME: 选中tabPane点复制,会出问题,因为复制的组件key一样
|
|
2
|
+
|
|
3
|
+
export default {
|
|
4
|
+
componentName: 'List.Item',
|
|
5
|
+
title: '列表项',
|
|
6
|
+
category: '',
|
|
7
|
+
docUrl: "",
|
|
8
|
+
screenshot: "",
|
|
9
|
+
devMode: "proCode",
|
|
10
|
+
npm: {
|
|
11
|
+
package: "@pisell/materials",
|
|
12
|
+
version: "1.0.1",
|
|
13
|
+
exportName: "List",
|
|
14
|
+
main: "src/index.tsx",
|
|
15
|
+
destructuring: true,
|
|
16
|
+
subName: "Item",
|
|
17
|
+
},
|
|
18
|
+
props: [
|
|
19
|
+
{
|
|
20
|
+
name: 'actions',
|
|
21
|
+
title: {
|
|
22
|
+
label: '列表操作组',
|
|
23
|
+
tip: '列表操作组',
|
|
24
|
+
},
|
|
25
|
+
propType: { type: 'arrayOf', value: 'node' },
|
|
26
|
+
setter: {
|
|
27
|
+
componentName: 'ArraySetter',
|
|
28
|
+
props: {
|
|
29
|
+
itemSetter: {
|
|
30
|
+
componentName: 'SlotSetter',
|
|
31
|
+
title: '操作组插槽',
|
|
32
|
+
initialValue: {
|
|
33
|
+
type: 'JSSlot',
|
|
34
|
+
value: [],
|
|
35
|
+
},
|
|
36
|
+
},
|
|
37
|
+
},
|
|
38
|
+
},
|
|
39
|
+
},
|
|
40
|
+
{
|
|
41
|
+
name: 'extra',
|
|
42
|
+
title: {
|
|
43
|
+
label: '额外内容',
|
|
44
|
+
tip: '额外内容',
|
|
45
|
+
},
|
|
46
|
+
propType: 'node',
|
|
47
|
+
setter: 'SlotSetter',
|
|
48
|
+
},
|
|
49
|
+
],
|
|
50
|
+
configure: {
|
|
51
|
+
component: {
|
|
52
|
+
isContainer: true,
|
|
53
|
+
nestingRule: {
|
|
54
|
+
parentWhitelist: ['List'],
|
|
55
|
+
},
|
|
56
|
+
},
|
|
57
|
+
},
|
|
58
|
+
};
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
export default {
|
|
2
|
+
componentName: 'List.Item.Meta',
|
|
3
|
+
title: '列表项内容',
|
|
4
|
+
category: '',
|
|
5
|
+
docUrl: "",
|
|
6
|
+
screenshot: "",
|
|
7
|
+
devMode: "proCode",
|
|
8
|
+
npm: {
|
|
9
|
+
package: "@pisell/materials",
|
|
10
|
+
version: "1.0.1",
|
|
11
|
+
exportName: "List",
|
|
12
|
+
main: "src/index.tsx",
|
|
13
|
+
destructuring: true,
|
|
14
|
+
subName: "Item.Meta",
|
|
15
|
+
},
|
|
16
|
+
props: [
|
|
17
|
+
{
|
|
18
|
+
name: 'avatar',
|
|
19
|
+
title: {
|
|
20
|
+
label: '列表元素图标',
|
|
21
|
+
tip: '列表元素的图标',
|
|
22
|
+
},
|
|
23
|
+
propType: { type: 'oneOfType', value: ['string', 'node'] },
|
|
24
|
+
},
|
|
25
|
+
{
|
|
26
|
+
name: 'title',
|
|
27
|
+
title: {
|
|
28
|
+
label: '列表元素标题',
|
|
29
|
+
tip: '列表元素的标题',
|
|
30
|
+
},
|
|
31
|
+
propType: { type: 'oneOfType', value: ['string', 'node'] },
|
|
32
|
+
},
|
|
33
|
+
{
|
|
34
|
+
name: 'avatar',
|
|
35
|
+
title: {
|
|
36
|
+
label: '列表元素描述内容',
|
|
37
|
+
tip: '列表元素的描述内容',
|
|
38
|
+
},
|
|
39
|
+
propType: { type: 'oneOfType', value: ['string', 'node'] },
|
|
40
|
+
},
|
|
41
|
+
],
|
|
42
|
+
configure: {
|
|
43
|
+
component: {
|
|
44
|
+
nestingRule: {
|
|
45
|
+
parentWhitelist: ['List'],
|
|
46
|
+
},
|
|
47
|
+
},
|
|
48
|
+
},
|
|
49
|
+
};
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
|
|
2
|
+
import { ComponentMetadata, Snippet } from '@alilc/lowcode-types';
|
|
3
|
+
|
|
4
|
+
const LoginMeta: ComponentMetadata = {
|
|
5
|
+
"componentName": "Login",
|
|
6
|
+
"title": "Login",
|
|
7
|
+
"docUrl": "",
|
|
8
|
+
"screenshot": "",
|
|
9
|
+
"devMode": "proCode",
|
|
10
|
+
"npm": {
|
|
11
|
+
"package": "@pisell/materials",
|
|
12
|
+
"version": "1.0.1",
|
|
13
|
+
"exportName": "Login",
|
|
14
|
+
"main": "src/index.tsx",
|
|
15
|
+
"destructuring": true,
|
|
16
|
+
"subName": ""
|
|
17
|
+
},
|
|
18
|
+
"configure": {
|
|
19
|
+
"props": [
|
|
20
|
+
{
|
|
21
|
+
"title": {
|
|
22
|
+
"label": {
|
|
23
|
+
"type": "i18n",
|
|
24
|
+
"en-US": "userName",
|
|
25
|
+
"zh-CN": "userName"
|
|
26
|
+
}
|
|
27
|
+
},
|
|
28
|
+
"name": "userName",
|
|
29
|
+
"setter": {
|
|
30
|
+
"componentName": "StringSetter",
|
|
31
|
+
"isRequired": true,
|
|
32
|
+
"initialValue": ""
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
],
|
|
36
|
+
"supports": {
|
|
37
|
+
"style": true
|
|
38
|
+
},
|
|
39
|
+
"component": {}
|
|
40
|
+
}
|
|
41
|
+
};
|
|
42
|
+
const snippets: Snippet[] = [
|
|
43
|
+
{
|
|
44
|
+
"title": "Login",
|
|
45
|
+
"screenshot": "",
|
|
46
|
+
"schema": {
|
|
47
|
+
"componentName": "Login",
|
|
48
|
+
"props": {}
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
];
|
|
52
|
+
|
|
53
|
+
export default {
|
|
54
|
+
...LoginMeta,
|
|
55
|
+
snippets
|
|
56
|
+
};
|
|
Binary file
|
|
@@ -0,0 +1,159 @@
|
|
|
1
|
+
import snippets from './snippets';
|
|
2
|
+
|
|
3
|
+
export default {
|
|
4
|
+
snippets,
|
|
5
|
+
componentName: 'Mentions',
|
|
6
|
+
title: '提及',
|
|
7
|
+
category: '表单',
|
|
8
|
+
props: [
|
|
9
|
+
{
|
|
10
|
+
name: 'defaultValue',
|
|
11
|
+
title: { label: '默认值', tip: '默认值' },
|
|
12
|
+
propType: 'string',
|
|
13
|
+
setter: 'StringSetter'
|
|
14
|
+
},
|
|
15
|
+
{
|
|
16
|
+
name: 'autoFocus',
|
|
17
|
+
title: { label: '自动聚焦', tip: '自动获得焦点' },
|
|
18
|
+
propType: 'bool',
|
|
19
|
+
defaultValue: false,
|
|
20
|
+
setter: 'BoolSetter'
|
|
21
|
+
},
|
|
22
|
+
{
|
|
23
|
+
name: 'filterOption',
|
|
24
|
+
title: { label: '自定义过滤逻辑', tip: '自定义过滤逻辑' },
|
|
25
|
+
propType: { type: 'oneOfType', value: ['bool', 'func'] },
|
|
26
|
+
},
|
|
27
|
+
{
|
|
28
|
+
name: 'notFoundContent',
|
|
29
|
+
title: {
|
|
30
|
+
label: '空值展示',
|
|
31
|
+
tip: '当下拉列表为空时显示的内容',
|
|
32
|
+
},
|
|
33
|
+
propType: 'node',
|
|
34
|
+
},
|
|
35
|
+
{
|
|
36
|
+
name: 'placement',
|
|
37
|
+
title: { label: '弹出层展示位置', tip: '弹出层展示位置' },
|
|
38
|
+
propType: { type: 'oneOf', value: ['top', 'bottom'] },
|
|
39
|
+
setter: {
|
|
40
|
+
componentName: 'RadioGroupSetter',
|
|
41
|
+
props: {
|
|
42
|
+
options: [
|
|
43
|
+
{
|
|
44
|
+
title: '上',
|
|
45
|
+
value: 'top',
|
|
46
|
+
},
|
|
47
|
+
{
|
|
48
|
+
title: '下',
|
|
49
|
+
value: 'bottom',
|
|
50
|
+
},
|
|
51
|
+
],
|
|
52
|
+
},
|
|
53
|
+
},
|
|
54
|
+
},
|
|
55
|
+
{
|
|
56
|
+
name: 'prefix',
|
|
57
|
+
title: { label: '设置触发关键字', tip: '设置触发关键字' },
|
|
58
|
+
propType: {
|
|
59
|
+
type: 'oneOfType',
|
|
60
|
+
value: ['string', { type: 'arrayOf', value: 'string' }],
|
|
61
|
+
},
|
|
62
|
+
},
|
|
63
|
+
{
|
|
64
|
+
name: 'split',
|
|
65
|
+
title: { label: '设置选中项前后分隔符', tip: '设置选中项前后分隔符' },
|
|
66
|
+
propType: 'string',
|
|
67
|
+
},
|
|
68
|
+
{
|
|
69
|
+
name: 'validateSearch',
|
|
70
|
+
title: { label: '自定义触发验证逻辑', tip: '自定义触发验证逻辑' },
|
|
71
|
+
propType: 'func',
|
|
72
|
+
},
|
|
73
|
+
// {
|
|
74
|
+
// name: 'value',
|
|
75
|
+
// title: { label: '设置值', tip: '设置值' },
|
|
76
|
+
// propType: 'string',
|
|
77
|
+
// },
|
|
78
|
+
{
|
|
79
|
+
name: 'onChange',
|
|
80
|
+
title: { label: '值改变时触发', tip: '值改变时触发' },
|
|
81
|
+
propType: 'func',
|
|
82
|
+
},
|
|
83
|
+
{
|
|
84
|
+
name: 'onSelect',
|
|
85
|
+
title: { label: '选择选项时触发', tip: '选择选项时触发' },
|
|
86
|
+
propType: 'func',
|
|
87
|
+
},
|
|
88
|
+
{
|
|
89
|
+
name: 'onSearch',
|
|
90
|
+
title: { label: '搜索时触发', tip: '搜索时触发' },
|
|
91
|
+
propType: 'func',
|
|
92
|
+
},
|
|
93
|
+
{
|
|
94
|
+
name: 'onFocus',
|
|
95
|
+
title: { label: '获得焦点时触发', tip: '获得焦点时触发' },
|
|
96
|
+
propType: 'func',
|
|
97
|
+
},
|
|
98
|
+
{
|
|
99
|
+
name: 'onBlur',
|
|
100
|
+
title: { label: '失去焦点时触发', tip: '失去焦点时触发' },
|
|
101
|
+
propType: 'func',
|
|
102
|
+
},
|
|
103
|
+
// {
|
|
104
|
+
// name: 'getPopupContainer',
|
|
105
|
+
// title: {
|
|
106
|
+
// label: '指定建议框挂载的 HTML 节点',
|
|
107
|
+
// tip: '指定建议框挂载的 HTML 节点',
|
|
108
|
+
// },
|
|
109
|
+
// propType: 'func',
|
|
110
|
+
// },
|
|
111
|
+
{
|
|
112
|
+
name: 'autoSize',
|
|
113
|
+
title: {
|
|
114
|
+
label: '内容高度',
|
|
115
|
+
tip: '自适应内容高度,可设置为 true | false 或对象:{ minRows: 2, maxRows: 6 }',
|
|
116
|
+
},
|
|
117
|
+
propType: { type: 'oneOfType', value: ['bool', 'object'] },
|
|
118
|
+
},
|
|
119
|
+
{
|
|
120
|
+
name: 'onResize',
|
|
121
|
+
title: { label: 'resize 回调', tip: 'resize 回调' },
|
|
122
|
+
propType: 'func',
|
|
123
|
+
},
|
|
124
|
+
],
|
|
125
|
+
configure: {
|
|
126
|
+
supports: {
|
|
127
|
+
style: true,
|
|
128
|
+
events: [
|
|
129
|
+
{
|
|
130
|
+
name: 'onChange',
|
|
131
|
+
template: "onChange(text,${extParams}){\n// 值改变时触发\nconsole.log('onChange',text);}",
|
|
132
|
+
},
|
|
133
|
+
{
|
|
134
|
+
name: 'onSelect',
|
|
135
|
+
template:
|
|
136
|
+
"onSelect(option,prefix,${extParams}){\n// 选择选项时触发\nconsole.log('onSelect',option,prefix);}",
|
|
137
|
+
},
|
|
138
|
+
{
|
|
139
|
+
name: 'onSearch',
|
|
140
|
+
template:
|
|
141
|
+
"onSearch(text,prefix,${extParams}){\n// 搜索时触发\nconsole.log('onSearch',text,prefix);}",
|
|
142
|
+
},
|
|
143
|
+
{
|
|
144
|
+
name: 'onFocus',
|
|
145
|
+
template: "onFocus(${extParams}){\n// 获得焦点时触发\nconsole.log('onFocus');}",
|
|
146
|
+
},
|
|
147
|
+
{
|
|
148
|
+
name: 'onBlur',
|
|
149
|
+
template: "onBlur(${extParams}){\n// 失去焦点时触发\nconsole.log('onBlur');}",
|
|
150
|
+
},
|
|
151
|
+
{
|
|
152
|
+
name: 'onResize',
|
|
153
|
+
template:
|
|
154
|
+
"onResize({width,height},${extParams}){\n// resize 回调\nconsole.log('onResize',width,height);}",
|
|
155
|
+
},
|
|
156
|
+
],
|
|
157
|
+
},
|
|
158
|
+
},
|
|
159
|
+
};
|
|
Binary file
|
|
@@ -0,0 +1,248 @@
|
|
|
1
|
+
import { uuid } from '../_utils/utils';
|
|
2
|
+
import { itemsExtraProps } from './utils';
|
|
3
|
+
|
|
4
|
+
import snippets from './snippets';
|
|
5
|
+
|
|
6
|
+
export default {
|
|
7
|
+
snippets,
|
|
8
|
+
componentName: 'Menu',
|
|
9
|
+
title: '导航菜单',
|
|
10
|
+
category: '导航',
|
|
11
|
+
docUrl: "",
|
|
12
|
+
screenshot: "",
|
|
13
|
+
devMode: "proCode",
|
|
14
|
+
npm: {
|
|
15
|
+
package: "@pisell/materials",
|
|
16
|
+
version: "1.0.1",
|
|
17
|
+
exportName: "Menu",
|
|
18
|
+
main: "src/index.tsx",
|
|
19
|
+
destructuring: true,
|
|
20
|
+
subName: "",
|
|
21
|
+
},
|
|
22
|
+
props: [
|
|
23
|
+
{
|
|
24
|
+
name: 'items',
|
|
25
|
+
title: '菜单项',
|
|
26
|
+
setter: {
|
|
27
|
+
componentName: 'ArraySetter',
|
|
28
|
+
props: {
|
|
29
|
+
itemSetter: {
|
|
30
|
+
componentName: 'ObjectSetter',
|
|
31
|
+
props: {
|
|
32
|
+
config: {
|
|
33
|
+
items: [
|
|
34
|
+
{
|
|
35
|
+
name: 'key',
|
|
36
|
+
title: 'key',
|
|
37
|
+
setter: 'StringSetter',
|
|
38
|
+
initialValue: (val) => val || uuid(),
|
|
39
|
+
},
|
|
40
|
+
{
|
|
41
|
+
name: 'children',
|
|
42
|
+
title: '菜单名称',
|
|
43
|
+
setter: 'StringSetter',
|
|
44
|
+
},
|
|
45
|
+
{
|
|
46
|
+
name: 'category',
|
|
47
|
+
title: {
|
|
48
|
+
label: '类型',
|
|
49
|
+
tip: '菜单项类型',
|
|
50
|
+
},
|
|
51
|
+
propType: {
|
|
52
|
+
type: 'oneOf',
|
|
53
|
+
value: ['Menu.Item', 'Menu.SubMenu', 'Menu.ItemGroup'],
|
|
54
|
+
},
|
|
55
|
+
setter: [
|
|
56
|
+
{
|
|
57
|
+
componentName: 'RadioGroupSetter',
|
|
58
|
+
props: {
|
|
59
|
+
options: [
|
|
60
|
+
{
|
|
61
|
+
title: 'Item',
|
|
62
|
+
value: 'Menu.Item',
|
|
63
|
+
},
|
|
64
|
+
{
|
|
65
|
+
title: 'SubMenu',
|
|
66
|
+
value: 'Menu.SubMenu',
|
|
67
|
+
},
|
|
68
|
+
{
|
|
69
|
+
title: 'ItemGroup',
|
|
70
|
+
value: 'Menu.ItemGroup',
|
|
71
|
+
},
|
|
72
|
+
],
|
|
73
|
+
},
|
|
74
|
+
},
|
|
75
|
+
'VariableSetter',
|
|
76
|
+
],
|
|
77
|
+
},
|
|
78
|
+
],
|
|
79
|
+
},
|
|
80
|
+
},
|
|
81
|
+
initialValue: () => {
|
|
82
|
+
return {
|
|
83
|
+
key: 'item-' + uuid(),
|
|
84
|
+
category: 'Menu.Item',
|
|
85
|
+
children: '菜单名',
|
|
86
|
+
};
|
|
87
|
+
},
|
|
88
|
+
},
|
|
89
|
+
},
|
|
90
|
+
},
|
|
91
|
+
extraProps: itemsExtraProps,
|
|
92
|
+
},
|
|
93
|
+
{
|
|
94
|
+
name: 'defaultOpenKeys',
|
|
95
|
+
title: {
|
|
96
|
+
label: '初始展开菜单项',
|
|
97
|
+
tip: '初始展开的 SubMenu 菜单项 key 数组',
|
|
98
|
+
},
|
|
99
|
+
propType: { type: 'arrayOf', value: 'string' },
|
|
100
|
+
},
|
|
101
|
+
{
|
|
102
|
+
name: 'defaultSelectedKeys',
|
|
103
|
+
title: { label: '初始选中的菜单项', tip: '初始选中的菜单项 key 数组' },
|
|
104
|
+
propType: { type: 'arrayOf', value: 'string' },
|
|
105
|
+
},
|
|
106
|
+
{
|
|
107
|
+
name: 'forceSubMenuRender',
|
|
108
|
+
title: {
|
|
109
|
+
label: '子菜单预渲染',
|
|
110
|
+
tip: '在子菜单展示之前就渲染进 DOM',
|
|
111
|
+
},
|
|
112
|
+
propType: 'bool',
|
|
113
|
+
defaultValue: false,
|
|
114
|
+
},
|
|
115
|
+
{
|
|
116
|
+
name: 'inlineCollapsed',
|
|
117
|
+
title: { label: '是否收起', tip: 'inline 时菜单是否收起状态' },
|
|
118
|
+
propType: 'bool',
|
|
119
|
+
},
|
|
120
|
+
{
|
|
121
|
+
name: 'inlineIndent',
|
|
122
|
+
title: { label: '缩进宽度', tip: 'inline 模式的菜单缩进宽度' },
|
|
123
|
+
propType: 'number',
|
|
124
|
+
},
|
|
125
|
+
{
|
|
126
|
+
name: 'mode',
|
|
127
|
+
title: {
|
|
128
|
+
label: '菜单类型',
|
|
129
|
+
tip: '菜单类型,现在支持垂直、水平、和内嵌模式三种',
|
|
130
|
+
},
|
|
131
|
+
propType: { type: 'oneOf', value: ['vertical', 'horizontal', 'inline'] },
|
|
132
|
+
},
|
|
133
|
+
{
|
|
134
|
+
name: 'multiple',
|
|
135
|
+
title: { label: '是否允许多选', tip: '是否允许多选' },
|
|
136
|
+
propType: 'bool',
|
|
137
|
+
defaultValue: false,
|
|
138
|
+
},
|
|
139
|
+
{
|
|
140
|
+
name: 'openKeys',
|
|
141
|
+
title: {
|
|
142
|
+
label: '当前展开的菜单项',
|
|
143
|
+
tip: '当前展开的 SubMenu 菜单项 key 数组',
|
|
144
|
+
},
|
|
145
|
+
propType: { type: 'arrayOf', value: 'string' },
|
|
146
|
+
},
|
|
147
|
+
{
|
|
148
|
+
name: 'selectable',
|
|
149
|
+
title: { label: '是否允许选中', tip: '是否允许选中' },
|
|
150
|
+
propType: 'bool',
|
|
151
|
+
defaultValue: true,
|
|
152
|
+
},
|
|
153
|
+
{
|
|
154
|
+
name: 'selectedKeys',
|
|
155
|
+
title: { label: '当前选中项', tip: '当前选中的菜单项 key 数组' },
|
|
156
|
+
propType: { type: 'arrayOf', value: 'string' },
|
|
157
|
+
},
|
|
158
|
+
{
|
|
159
|
+
name: 'style',
|
|
160
|
+
title: { label: '根节点样式', tip: '根节点样式' },
|
|
161
|
+
propType: 'object',
|
|
162
|
+
},
|
|
163
|
+
{
|
|
164
|
+
name: 'subMenuCloseDelay',
|
|
165
|
+
title: {
|
|
166
|
+
label: '关闭延时',
|
|
167
|
+
tip: '用户鼠标离开子菜单后关闭延时,单位:秒',
|
|
168
|
+
},
|
|
169
|
+
propType: 'number',
|
|
170
|
+
},
|
|
171
|
+
{
|
|
172
|
+
name: 'subMenuOpenDelay',
|
|
173
|
+
title: {
|
|
174
|
+
label: '开启延时',
|
|
175
|
+
tip: '用户鼠标进入子菜单后开启延时,单位:秒',
|
|
176
|
+
},
|
|
177
|
+
propType: 'number',
|
|
178
|
+
},
|
|
179
|
+
{
|
|
180
|
+
name: 'theme',
|
|
181
|
+
title: { label: '主题颜色', tip: '主题颜色' },
|
|
182
|
+
propType: { type: 'oneOf', value: ['light', 'dark'] },
|
|
183
|
+
},
|
|
184
|
+
{
|
|
185
|
+
name: 'onClick',
|
|
186
|
+
title: { label: '点击 MenuItem 调用函数', tip: '点击 MenuItem 调用函数' },
|
|
187
|
+
propType: 'func',
|
|
188
|
+
},
|
|
189
|
+
{
|
|
190
|
+
name: 'onDeselect',
|
|
191
|
+
title: {
|
|
192
|
+
label: '取消选中时调用函数',
|
|
193
|
+
tip: '取消选中时调用,仅在 multiple 生效',
|
|
194
|
+
},
|
|
195
|
+
propType: 'func',
|
|
196
|
+
},
|
|
197
|
+
{
|
|
198
|
+
name: 'triggerSubMenuAction',
|
|
199
|
+
title: {
|
|
200
|
+
label: '触发方式',
|
|
201
|
+
tip: '展开/关闭的触发行为',
|
|
202
|
+
},
|
|
203
|
+
propType: { type: 'oneOf', value: ['hover', 'click'] },
|
|
204
|
+
},
|
|
205
|
+
{
|
|
206
|
+
name: 'onOpenChange',
|
|
207
|
+
title: { label: 'SubMenu 展开/关闭的回调', tip: '展开/关闭的回调' },
|
|
208
|
+
propType: 'func',
|
|
209
|
+
},
|
|
210
|
+
{
|
|
211
|
+
name: 'onSelect',
|
|
212
|
+
title: { label: '被选中时调用函数', tip: '被选中时调用函数' },
|
|
213
|
+
propType: 'func',
|
|
214
|
+
},
|
|
215
|
+
{
|
|
216
|
+
name: 'overflowedIndicator',
|
|
217
|
+
title: { label: '折叠图标', tip: '自定义 Menu 折叠时的图标' },
|
|
218
|
+
propType: 'node',
|
|
219
|
+
},
|
|
220
|
+
],
|
|
221
|
+
configure: {
|
|
222
|
+
supports: {
|
|
223
|
+
style: true,
|
|
224
|
+
events: [
|
|
225
|
+
{
|
|
226
|
+
name: 'onClick',
|
|
227
|
+
template:
|
|
228
|
+
"onClick({item,key,keyPath,domEvent},${extParams}){\n// 点击 MenuItem 调用此函数\nconsole.log('onClick',item,key,keyPath,domEvent);}",
|
|
229
|
+
},
|
|
230
|
+
{
|
|
231
|
+
name: 'onDeselect',
|
|
232
|
+
template:
|
|
233
|
+
"onDeselect({item,key,keyPath,selectedKeys,domEvent},${extParams}){\n// 取消选中时调用,仅在 multiple 生效\nconsole.log('onDeselect',item,key,keyPath,selectedKeys,domEvent);}",
|
|
234
|
+
},
|
|
235
|
+
{
|
|
236
|
+
name: 'onOpenChange',
|
|
237
|
+
template:
|
|
238
|
+
"onOpenChange(openKeys,${extParams}){\n// SubMenu 展开/关闭的回调\nconsole.log('onOpenChange',openKeys);}",
|
|
239
|
+
},
|
|
240
|
+
{
|
|
241
|
+
name: 'onSelect',
|
|
242
|
+
template:
|
|
243
|
+
"onSelect({item,key,keyPath,selectedKeys,domEvent},${extParams}){\n// 被选中时调用\nconsole.log('onSelect',item,key,keyPath,selectedKeys,domEvent);}",
|
|
244
|
+
},
|
|
245
|
+
],
|
|
246
|
+
},
|
|
247
|
+
},
|
|
248
|
+
};
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
export default [
|
|
2
|
+
{
|
|
3
|
+
title: '导航菜单',
|
|
4
|
+
screenshot: 'https://alifd.alicdn.com/fusion-cool/icons/icon-antd/menu-1.jpg',
|
|
5
|
+
schema: {
|
|
6
|
+
componentName: 'Menu',
|
|
7
|
+
props: {
|
|
8
|
+
mode: 'inline',
|
|
9
|
+
defaultSelectedKeys: ['1'],
|
|
10
|
+
defaultOpenKeys: ['sub1'],
|
|
11
|
+
theme: 'dark',
|
|
12
|
+
items: [
|
|
13
|
+
{
|
|
14
|
+
key: 'item-i5wd',
|
|
15
|
+
category: 'Menu.Item',
|
|
16
|
+
children: '菜单名',
|
|
17
|
+
},
|
|
18
|
+
],
|
|
19
|
+
},
|
|
20
|
+
},
|
|
21
|
+
},
|
|
22
|
+
];
|