@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,43 @@
|
|
|
1
|
+
export default [
|
|
2
|
+
{
|
|
3
|
+
title: '表格',
|
|
4
|
+
screenshot: 'https://alifd.alicdn.com/fusion-cool/icons/icon-antd/table-1.png',
|
|
5
|
+
schema: {
|
|
6
|
+
componentName: 'Table',
|
|
7
|
+
props: {
|
|
8
|
+
dataSource: [
|
|
9
|
+
{
|
|
10
|
+
id: '1',
|
|
11
|
+
name: '胡彦斌',
|
|
12
|
+
age: 32,
|
|
13
|
+
address: '西湖区湖底公园1号',
|
|
14
|
+
},
|
|
15
|
+
{
|
|
16
|
+
id: '2',
|
|
17
|
+
name: '王一博',
|
|
18
|
+
age: 28,
|
|
19
|
+
address: '滨江区网商路699号',
|
|
20
|
+
},
|
|
21
|
+
],
|
|
22
|
+
columns: [
|
|
23
|
+
{
|
|
24
|
+
title: '姓名',
|
|
25
|
+
dataIndex: 'name',
|
|
26
|
+
key: 'name',
|
|
27
|
+
},
|
|
28
|
+
{
|
|
29
|
+
title: '年龄',
|
|
30
|
+
dataIndex: 'age',
|
|
31
|
+
key: 'age',
|
|
32
|
+
},
|
|
33
|
+
],
|
|
34
|
+
rowKey: 'id',
|
|
35
|
+
pagination: {
|
|
36
|
+
pageSize: 10,
|
|
37
|
+
total: 15,
|
|
38
|
+
current: 1,
|
|
39
|
+
},
|
|
40
|
+
},
|
|
41
|
+
},
|
|
42
|
+
},
|
|
43
|
+
];
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
@@ -0,0 +1,415 @@
|
|
|
1
|
+
import { uuid } from '../_utils/utils';
|
|
2
|
+
|
|
3
|
+
import snippets from './snippets';
|
|
4
|
+
|
|
5
|
+
export default {
|
|
6
|
+
snippets,
|
|
7
|
+
componentName: 'Tabs',
|
|
8
|
+
title: '标签页',
|
|
9
|
+
category: '数据展示',
|
|
10
|
+
docUrl: "",
|
|
11
|
+
screenshot: "",
|
|
12
|
+
devMode: "proCode",
|
|
13
|
+
npm: {
|
|
14
|
+
package: "@pisell/materials",
|
|
15
|
+
version: "1.0.1",
|
|
16
|
+
exportName: "Tabs",
|
|
17
|
+
main: "src/index.tsx",
|
|
18
|
+
destructuring: true,
|
|
19
|
+
subName: "",
|
|
20
|
+
},
|
|
21
|
+
props: [
|
|
22
|
+
{
|
|
23
|
+
name: 'items',
|
|
24
|
+
title: '标签项',
|
|
25
|
+
setter: {
|
|
26
|
+
componentName: 'ArraySetter',
|
|
27
|
+
props: {
|
|
28
|
+
itemSetter: {
|
|
29
|
+
componentName: 'ObjectSetter',
|
|
30
|
+
props: {
|
|
31
|
+
config: {
|
|
32
|
+
items: [
|
|
33
|
+
{
|
|
34
|
+
name: 'key',
|
|
35
|
+
title: 'key',
|
|
36
|
+
setter: 'StringSetter',
|
|
37
|
+
initialValue: (val) => val || uuid(),
|
|
38
|
+
supportVariable: true
|
|
39
|
+
},
|
|
40
|
+
{
|
|
41
|
+
name: 'label',
|
|
42
|
+
title: '标题',
|
|
43
|
+
setter: 'StringSetter',
|
|
44
|
+
initialValue: '标签项',
|
|
45
|
+
supportVariable: true
|
|
46
|
+
},
|
|
47
|
+
// {
|
|
48
|
+
// name: 'closeable',
|
|
49
|
+
// title: '是否可删除',
|
|
50
|
+
// condition(target) {
|
|
51
|
+
// return target.getProps().getPropValue('type') === 'editable-card';
|
|
52
|
+
// },
|
|
53
|
+
// setter: 'BoolSetter',
|
|
54
|
+
// initialValue: true,
|
|
55
|
+
// },
|
|
56
|
+
{
|
|
57
|
+
name: 'disabled',
|
|
58
|
+
title: '禁用',
|
|
59
|
+
setter: 'BoolSetter',
|
|
60
|
+
initialValue: false,
|
|
61
|
+
supportVariable: true
|
|
62
|
+
},
|
|
63
|
+
{
|
|
64
|
+
name: 'forceRender',
|
|
65
|
+
title: '隐藏时保留',
|
|
66
|
+
propType: 'bool',
|
|
67
|
+
setter: 'BoolSetter',
|
|
68
|
+
initialValue: false,
|
|
69
|
+
supportVariable: true
|
|
70
|
+
},
|
|
71
|
+
{
|
|
72
|
+
name: 'children',
|
|
73
|
+
title: '内容',
|
|
74
|
+
setter: {
|
|
75
|
+
componentName: 'SlotSetter',
|
|
76
|
+
initialValue: {
|
|
77
|
+
type: 'JSSlot',
|
|
78
|
+
value: [],
|
|
79
|
+
},
|
|
80
|
+
},
|
|
81
|
+
},
|
|
82
|
+
],
|
|
83
|
+
},
|
|
84
|
+
},
|
|
85
|
+
initialValue: () => {
|
|
86
|
+
return {
|
|
87
|
+
key: uuid(),
|
|
88
|
+
label: '标签项',
|
|
89
|
+
disabled: false,
|
|
90
|
+
forceRender: false,
|
|
91
|
+
children: {
|
|
92
|
+
type: 'JSSlot',
|
|
93
|
+
value: [],
|
|
94
|
+
},
|
|
95
|
+
};
|
|
96
|
+
},
|
|
97
|
+
},
|
|
98
|
+
},
|
|
99
|
+
}
|
|
100
|
+
},
|
|
101
|
+
// {
|
|
102
|
+
// name: 'tabs',
|
|
103
|
+
// title: '标签项',
|
|
104
|
+
// setter: {
|
|
105
|
+
// componentName: 'ArraySetter',
|
|
106
|
+
// props: {
|
|
107
|
+
// itemSetter: {
|
|
108
|
+
// componentName: 'ObjectSetter',
|
|
109
|
+
// props: {
|
|
110
|
+
// config: {
|
|
111
|
+
// items: [
|
|
112
|
+
// {
|
|
113
|
+
// name: 'key',
|
|
114
|
+
// title: 'key',
|
|
115
|
+
// setter: 'StringSetter',
|
|
116
|
+
// initialValue: (val) => val || uuid(),
|
|
117
|
+
// supportVariable: true
|
|
118
|
+
// },
|
|
119
|
+
// {
|
|
120
|
+
// name: 'tab',
|
|
121
|
+
// title: '标题',
|
|
122
|
+
// setter: 'StringSetter',
|
|
123
|
+
// initialValue: '标签项',
|
|
124
|
+
// supportVariable: true
|
|
125
|
+
// },
|
|
126
|
+
// // {
|
|
127
|
+
// // name: 'closeable',
|
|
128
|
+
// // title: '是否可删除',
|
|
129
|
+
// // condition(target) {
|
|
130
|
+
// // return target.getProps().getPropValue('type') === 'editable-card';
|
|
131
|
+
// // },
|
|
132
|
+
// // setter: 'BoolSetter',
|
|
133
|
+
// // initialValue: true,
|
|
134
|
+
// // },
|
|
135
|
+
// {
|
|
136
|
+
// name: 'disabled',
|
|
137
|
+
// title: '禁用',
|
|
138
|
+
// setter: 'BoolSetter',
|
|
139
|
+
// initialValue: false,
|
|
140
|
+
// supportVariable: true
|
|
141
|
+
// },
|
|
142
|
+
// {
|
|
143
|
+
// name: 'forceRender',
|
|
144
|
+
// title: '隐藏时保留',
|
|
145
|
+
// propType: 'bool',
|
|
146
|
+
// setter: 'BoolSetter',
|
|
147
|
+
// initialValue: false,
|
|
148
|
+
// supportVariable: true
|
|
149
|
+
// },
|
|
150
|
+
// ],
|
|
151
|
+
// },
|
|
152
|
+
// },
|
|
153
|
+
// initialValue: () => {
|
|
154
|
+
// return {
|
|
155
|
+
// key: uuid(),
|
|
156
|
+
// tab: '标签项',
|
|
157
|
+
// closeable: true,
|
|
158
|
+
// disabled: false,
|
|
159
|
+
// forceRender: false,
|
|
160
|
+
// };
|
|
161
|
+
// },
|
|
162
|
+
// },
|
|
163
|
+
// },
|
|
164
|
+
// },
|
|
165
|
+
// extraProps: {
|
|
166
|
+
// getValue(target, fieldValue) {
|
|
167
|
+
// const map = target.node.children.map((child) => {
|
|
168
|
+
// const key = child.getPropValue('key') ? String(child.getPropValue('key')) : child.id;
|
|
169
|
+
// return {
|
|
170
|
+
// key,
|
|
171
|
+
// tab: child.getPropValue('tab'),
|
|
172
|
+
// closeable: child.getPropValue('closeable'),
|
|
173
|
+
// disabled: child.getPropValue('disabled'),
|
|
174
|
+
// forceRender: child.getPropValue('forceRender'),
|
|
175
|
+
// };
|
|
176
|
+
// });
|
|
177
|
+
// return map;
|
|
178
|
+
// },
|
|
179
|
+
// setValue(target, value) {
|
|
180
|
+
// const { node } = target;
|
|
181
|
+
// const map = {};
|
|
182
|
+
|
|
183
|
+
// if (!Array.isArray(value)) {
|
|
184
|
+
// value = [];
|
|
185
|
+
// }
|
|
186
|
+
// value.forEach((item) => {
|
|
187
|
+
// const tabItem = Object.assign({}, item);
|
|
188
|
+
// map[item.key] = tabItem;
|
|
189
|
+
// });
|
|
190
|
+
|
|
191
|
+
// node.children.mergeChildren(
|
|
192
|
+
// (child) => {
|
|
193
|
+
// const key = String(child.getPropValue('key'));
|
|
194
|
+
// if (Object.hasOwnProperty.call(map, key)) {
|
|
195
|
+
// child.setPropValue('tab', map[key].tab);
|
|
196
|
+
// child.setPropValue('closeable', map[key].closeable);
|
|
197
|
+
// child.setPropValue('disabled', map[key].disabled);
|
|
198
|
+
// child.setPropValue('forceRender', map[key].forceRender);
|
|
199
|
+
// delete map[key];
|
|
200
|
+
// return false;
|
|
201
|
+
// }
|
|
202
|
+
// return true;
|
|
203
|
+
// },
|
|
204
|
+
// () => {
|
|
205
|
+
// const items = [];
|
|
206
|
+
// for (const key in map) {
|
|
207
|
+
// if (Object.hasOwnProperty.call(map, key)) {
|
|
208
|
+
// items.push({
|
|
209
|
+
// componentName: 'Tabs.TabPane',
|
|
210
|
+
// props: map[key],
|
|
211
|
+
// });
|
|
212
|
+
// }
|
|
213
|
+
// }
|
|
214
|
+
// return items;
|
|
215
|
+
// },
|
|
216
|
+
// (child1, child2) => {
|
|
217
|
+
// const a = value.findIndex(
|
|
218
|
+
// (item) => String(item.key) === String(child1.getPropValue('key')),
|
|
219
|
+
// );
|
|
220
|
+
// const b = value.findIndex(
|
|
221
|
+
// (item) => String(item.key) === String(child2.getPropValue('key')),
|
|
222
|
+
// );
|
|
223
|
+
// return a - b;
|
|
224
|
+
// },
|
|
225
|
+
// );
|
|
226
|
+
// },
|
|
227
|
+
// },
|
|
228
|
+
// },
|
|
229
|
+
// {
|
|
230
|
+
|
|
231
|
+
// name: 'addIcon',
|
|
232
|
+
// title: { label: '自定义添加按钮', tip: '自定义添加按钮' },
|
|
233
|
+
// propType: 'node',
|
|
234
|
+
// },
|
|
235
|
+
{
|
|
236
|
+
name: 'animated',
|
|
237
|
+
title: {
|
|
238
|
+
label: '切换动画',
|
|
239
|
+
tip: '是否使用动画切换Tabs',
|
|
240
|
+
},
|
|
241
|
+
propType: 'bool',
|
|
242
|
+
setter: 'BoolSetter',
|
|
243
|
+
supportVariable: true
|
|
244
|
+
},
|
|
245
|
+
// {
|
|
246
|
+
// name: 'renderTabBar',
|
|
247
|
+
// title: { label: '替换TabBar', tip: '替换TabBar,用于二次封装标签头' },
|
|
248
|
+
// propType: 'func',
|
|
249
|
+
// },
|
|
250
|
+
{
|
|
251
|
+
name: 'defaultActiveKey',
|
|
252
|
+
title: {
|
|
253
|
+
label: '初始选中',
|
|
254
|
+
tip: '初始化选中面板的key,如果没有设置activeKey',
|
|
255
|
+
},
|
|
256
|
+
propType: 'string',
|
|
257
|
+
setter: 'StringSetter',
|
|
258
|
+
supportVariable: true
|
|
259
|
+
},
|
|
260
|
+
// {
|
|
261
|
+
// name: 'activeKey',
|
|
262
|
+
// title: { label: '当前激活tab面板', tip: '当前激活tab面板,注意配置了这个属性就需要自己处理点击切换' },
|
|
263
|
+
// propType: 'string',
|
|
264
|
+
// },
|
|
265
|
+
{
|
|
266
|
+
name: 'hideAdd',
|
|
267
|
+
title: {
|
|
268
|
+
label: '隐藏加号',
|
|
269
|
+
tip: '是否隐藏加号图标,在`type="editable-card"`时有效',
|
|
270
|
+
},
|
|
271
|
+
condition(target) {
|
|
272
|
+
return target.getProps().getPropValue('type') === 'editable-card';
|
|
273
|
+
},
|
|
274
|
+
propType: 'bool',
|
|
275
|
+
setter: 'BoolSetter',
|
|
276
|
+
defaultValue: false,
|
|
277
|
+
supportVariable: true
|
|
278
|
+
},
|
|
279
|
+
{
|
|
280
|
+
name: 'size',
|
|
281
|
+
title: {
|
|
282
|
+
label: '尺寸',
|
|
283
|
+
tip: '大小,提供 `large` `default` 和 `small` 三种大小',
|
|
284
|
+
},
|
|
285
|
+
propType: {
|
|
286
|
+
type: 'oneOf',
|
|
287
|
+
value: ['large', 'default', 'small'],
|
|
288
|
+
},
|
|
289
|
+
defaultValue: 'default',
|
|
290
|
+
},
|
|
291
|
+
{
|
|
292
|
+
name: 'centered',
|
|
293
|
+
title: { label: '标签居中', tip: '标签居中展示' },
|
|
294
|
+
propType: 'bool',
|
|
295
|
+
defaultValue: false,
|
|
296
|
+
setter: 'BoolSetter',
|
|
297
|
+
supportVariable: true
|
|
298
|
+
},
|
|
299
|
+
{
|
|
300
|
+
name: 'tabBarExtraContent',
|
|
301
|
+
title: { label: '额外元素', tip: 'tab bar上额外的元素' },
|
|
302
|
+
propType: 'node',
|
|
303
|
+
},
|
|
304
|
+
{
|
|
305
|
+
name: 'tabBarGutter',
|
|
306
|
+
title: { label: '标签间隙', tip: 'tabs之间的间隙' },
|
|
307
|
+
propType: 'number',
|
|
308
|
+
setter: 'NumberSetter',
|
|
309
|
+
supportVariable: true
|
|
310
|
+
},
|
|
311
|
+
// {
|
|
312
|
+
// name: 'tabBarStyle',
|
|
313
|
+
// title: { label: 'tab bar的样式对象', tip: 'tab bar的样式对象' },
|
|
314
|
+
// propType: 'object',
|
|
315
|
+
// },
|
|
316
|
+
{
|
|
317
|
+
name: 'tabPosition',
|
|
318
|
+
title: {
|
|
319
|
+
label: '页签位置',
|
|
320
|
+
tip: '页签位置',
|
|
321
|
+
},
|
|
322
|
+
propType: {
|
|
323
|
+
type: 'oneOf',
|
|
324
|
+
value: ['top', 'right', 'bottom', 'left'],
|
|
325
|
+
},
|
|
326
|
+
defaultValue: 'top',
|
|
327
|
+
},
|
|
328
|
+
{
|
|
329
|
+
name: 'type',
|
|
330
|
+
title: {
|
|
331
|
+
label: '页签样式',
|
|
332
|
+
tip: '页签的基本样式,可选`line`、`card`、`editable-card`类型',
|
|
333
|
+
},
|
|
334
|
+
propType: {
|
|
335
|
+
type: 'oneOf',
|
|
336
|
+
value: ['line', 'card', 'editable-card'],
|
|
337
|
+
},
|
|
338
|
+
defaultValue: 'line',
|
|
339
|
+
},
|
|
340
|
+
{
|
|
341
|
+
name: 'onChange',
|
|
342
|
+
title: { label: '切换面板的回调', tip: '切换面板的回调' },
|
|
343
|
+
propType: 'func',
|
|
344
|
+
},
|
|
345
|
+
{
|
|
346
|
+
name: 'onEdit',
|
|
347
|
+
title: {
|
|
348
|
+
label: '新增删除回调',
|
|
349
|
+
tip: '新增和删除页签的回调,在`type="editable-card"`时有效',
|
|
350
|
+
},
|
|
351
|
+
condition(target) {
|
|
352
|
+
return target.getProps().getPropValue('type') === 'editable-card';
|
|
353
|
+
},
|
|
354
|
+
propType: 'func',
|
|
355
|
+
},
|
|
356
|
+
{
|
|
357
|
+
name: 'onTabClick',
|
|
358
|
+
title: { label: 'tab点击回调', tip: 'tab被点击的回调' },
|
|
359
|
+
propType: 'func',
|
|
360
|
+
},
|
|
361
|
+
{
|
|
362
|
+
name: 'onTabScroll',
|
|
363
|
+
title: { label: 'tab滚动触发', tip: 'tab滚动时触发' },
|
|
364
|
+
propType: 'func',
|
|
365
|
+
},
|
|
366
|
+
{
|
|
367
|
+
name: 'keyboard',
|
|
368
|
+
title: { label: '键盘切换', tip: '开启键盘切换功能' },
|
|
369
|
+
propType: 'bool',
|
|
370
|
+
defaultValue: true,
|
|
371
|
+
},
|
|
372
|
+
],
|
|
373
|
+
configure: {
|
|
374
|
+
component: {
|
|
375
|
+
isContainer: true,
|
|
376
|
+
},
|
|
377
|
+
supports: {
|
|
378
|
+
style: true,
|
|
379
|
+
events: [
|
|
380
|
+
{
|
|
381
|
+
name: 'onChange',
|
|
382
|
+
template:
|
|
383
|
+
"onChange(activeKey,${extParams}){\n// 切换面板的回调\nconsole.log('onChange',activeKey);}",
|
|
384
|
+
},
|
|
385
|
+
{
|
|
386
|
+
name: 'onEdit',
|
|
387
|
+
template:
|
|
388
|
+
"onEdit(targetKey,action,${extParams}){\n// 新增和删除页签的回调\nconsole.log('onEdit',targetKey,action);}",
|
|
389
|
+
},
|
|
390
|
+
{
|
|
391
|
+
name: 'onTabClick',
|
|
392
|
+
template:
|
|
393
|
+
"onTabClick(key,event,${extParams}){\n// tab 被点击的回调\nconsole.log('onTabClick',key,event);}",
|
|
394
|
+
},
|
|
395
|
+
{
|
|
396
|
+
name: 'onTabScroll',
|
|
397
|
+
template:
|
|
398
|
+
"onTabScroll({direction},${extParams}){\n// tab 滚动时触\nconsole.log('onTabScroll',direction);}",
|
|
399
|
+
},
|
|
400
|
+
],
|
|
401
|
+
},
|
|
402
|
+
advanced: {
|
|
403
|
+
// initialChildren: [
|
|
404
|
+
// {
|
|
405
|
+
// componentName: 'Tabs.TabPane',
|
|
406
|
+
// props: { key: 'item1', tab: 'Item 1' },
|
|
407
|
+
// },
|
|
408
|
+
// {
|
|
409
|
+
// componentName: 'Tabs.TabPane',
|
|
410
|
+
// props: { key: 'item2', tab: 'Item 2' },
|
|
411
|
+
// },
|
|
412
|
+
// ],
|
|
413
|
+
},
|
|
414
|
+
},
|
|
415
|
+
};
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
export default [
|
|
2
|
+
{
|
|
3
|
+
title: '普通型',
|
|
4
|
+
screenshot: 'https://alifd.alicdn.com/fusion-cool/icons/icon-antd/tabs-1.jpg',
|
|
5
|
+
schema: {
|
|
6
|
+
componentName: 'Tabs',
|
|
7
|
+
props: {
|
|
8
|
+
type: 'line',
|
|
9
|
+
items: [
|
|
10
|
+
{
|
|
11
|
+
label: '标签项1',
|
|
12
|
+
key: 'tab-item-1',
|
|
13
|
+
children: {
|
|
14
|
+
type: 'JSSlot',
|
|
15
|
+
value: [],
|
|
16
|
+
},
|
|
17
|
+
},
|
|
18
|
+
{
|
|
19
|
+
label: '标签项2',
|
|
20
|
+
key: 'tab-item-2',
|
|
21
|
+
children: {
|
|
22
|
+
type: 'JSSlot',
|
|
23
|
+
value: [],
|
|
24
|
+
},
|
|
25
|
+
}
|
|
26
|
+
]
|
|
27
|
+
}
|
|
28
|
+
},
|
|
29
|
+
},
|
|
30
|
+
{
|
|
31
|
+
title: '卡片型',
|
|
32
|
+
screenshot: 'https://alifd.alicdn.com/fusion-cool/icons/icon-antd/tabs-2.jpg',
|
|
33
|
+
schema: {
|
|
34
|
+
componentName: 'Tabs',
|
|
35
|
+
props: {
|
|
36
|
+
type: 'card',
|
|
37
|
+
items: [
|
|
38
|
+
{
|
|
39
|
+
label: '标签项1',
|
|
40
|
+
key: 'tab-item-1',
|
|
41
|
+
children: {
|
|
42
|
+
type: 'JSSlot',
|
|
43
|
+
value: [],
|
|
44
|
+
},
|
|
45
|
+
},
|
|
46
|
+
{
|
|
47
|
+
label: '标签项2',
|
|
48
|
+
key: 'tab-item-2',
|
|
49
|
+
children: {
|
|
50
|
+
type: 'JSSlot',
|
|
51
|
+
value: [],
|
|
52
|
+
},
|
|
53
|
+
}
|
|
54
|
+
]
|
|
55
|
+
}
|
|
56
|
+
},
|
|
57
|
+
},
|
|
58
|
+
{
|
|
59
|
+
title: '可编辑卡片',
|
|
60
|
+
screenshot: 'https://alifd.alicdn.com/fusion-cool/icons/icon-antd/tabs-3.jpg',
|
|
61
|
+
schema: {
|
|
62
|
+
componentName: 'Tabs',
|
|
63
|
+
props: {
|
|
64
|
+
type: 'editable-card',
|
|
65
|
+
items: [
|
|
66
|
+
{
|
|
67
|
+
label: '标签项1',
|
|
68
|
+
key: 'tab-item-1',
|
|
69
|
+
children: {
|
|
70
|
+
type: 'JSSlot',
|
|
71
|
+
value: [],
|
|
72
|
+
},
|
|
73
|
+
},
|
|
74
|
+
{
|
|
75
|
+
label: '标签项2',
|
|
76
|
+
key: 'tab-item-2',
|
|
77
|
+
children: {
|
|
78
|
+
type: 'JSSlot',
|
|
79
|
+
value: [],
|
|
80
|
+
},
|
|
81
|
+
}
|
|
82
|
+
]
|
|
83
|
+
}
|
|
84
|
+
},
|
|
85
|
+
},
|
|
86
|
+
];
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
// FIXME: 选中tabPane点复制,会出问题,因为复制的组件key一样
|
|
2
|
+
|
|
3
|
+
export default {
|
|
4
|
+
componentName: 'Tabs.TabPane',
|
|
5
|
+
title: '标签页项',
|
|
6
|
+
category: '',
|
|
7
|
+
docUrl: "",
|
|
8
|
+
screenshot: "",
|
|
9
|
+
devMode: "proCode",
|
|
10
|
+
npm: {
|
|
11
|
+
package: "@pisell/materials",
|
|
12
|
+
version: "1.0.1",
|
|
13
|
+
exportName: "Tabs",
|
|
14
|
+
main: "src/index.tsx",
|
|
15
|
+
destructuring: true,
|
|
16
|
+
subName: "TabPane",
|
|
17
|
+
},
|
|
18
|
+
props: [
|
|
19
|
+
{
|
|
20
|
+
name: 'key',
|
|
21
|
+
title: {
|
|
22
|
+
label: 'key',
|
|
23
|
+
tip: 'key',
|
|
24
|
+
},
|
|
25
|
+
propType: 'string',
|
|
26
|
+
setter: 'StringSetter',
|
|
27
|
+
supportVariable: true
|
|
28
|
+
},
|
|
29
|
+
{
|
|
30
|
+
name: 'tab',
|
|
31
|
+
title: {
|
|
32
|
+
label: '标题',
|
|
33
|
+
tip: '标题',
|
|
34
|
+
},
|
|
35
|
+
propType: 'string',
|
|
36
|
+
setter: 'StringSetter',
|
|
37
|
+
supportVariable: true
|
|
38
|
+
},
|
|
39
|
+
// {
|
|
40
|
+
// name: 'closeable',
|
|
41
|
+
// title: {
|
|
42
|
+
// label: '可删除',
|
|
43
|
+
// tip: '是否可删除',
|
|
44
|
+
// },
|
|
45
|
+
// propType: 'bool',
|
|
46
|
+
// defaultValue: true,
|
|
47
|
+
// },
|
|
48
|
+
{
|
|
49
|
+
name: 'disabled',
|
|
50
|
+
title: {
|
|
51
|
+
label: '是否禁用',
|
|
52
|
+
tip: '是否为禁用状态',
|
|
53
|
+
},
|
|
54
|
+
propType: 'bool',
|
|
55
|
+
defaultValue: false,
|
|
56
|
+
setter: 'BoolSetter',
|
|
57
|
+
supportVariable: true
|
|
58
|
+
},
|
|
59
|
+
{
|
|
60
|
+
name: 'forceRender',
|
|
61
|
+
title: {
|
|
62
|
+
label: '隐藏时保留',
|
|
63
|
+
tip: '被隐藏时是否渲染 DOM 结构',
|
|
64
|
+
},
|
|
65
|
+
propType: 'bool',
|
|
66
|
+
setter: 'BoolSetter',
|
|
67
|
+
supportVariable: true
|
|
68
|
+
},
|
|
69
|
+
],
|
|
70
|
+
configure: {
|
|
71
|
+
component: {
|
|
72
|
+
isContainer: true,
|
|
73
|
+
nestingRule: {
|
|
74
|
+
parentWhitelist: ['Tab'],
|
|
75
|
+
},
|
|
76
|
+
},
|
|
77
|
+
},
|
|
78
|
+
};
|
|
Binary file
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
import snippets from './snippets';
|
|
2
|
+
|
|
3
|
+
export default {
|
|
4
|
+
snippets,
|
|
5
|
+
componentName: 'Tag',
|
|
6
|
+
title: '标签',
|
|
7
|
+
category: '数据展示',
|
|
8
|
+
docUrl: "",
|
|
9
|
+
screenshot: "",
|
|
10
|
+
devMode: "proCode",
|
|
11
|
+
npm: {
|
|
12
|
+
package: "@pisell/materials",
|
|
13
|
+
version: "1.0.1",
|
|
14
|
+
exportName: "Tag",
|
|
15
|
+
main: "src/index.tsx",
|
|
16
|
+
destructuring: true,
|
|
17
|
+
subName: "",
|
|
18
|
+
},
|
|
19
|
+
props: [
|
|
20
|
+
{
|
|
21
|
+
name: 'children',
|
|
22
|
+
title: { label: '内容', tip: '内容' },
|
|
23
|
+
propType: 'string',
|
|
24
|
+
},
|
|
25
|
+
{
|
|
26
|
+
name: 'closable',
|
|
27
|
+
title: { label: '可关闭', tip: '标签是否可以关闭' },
|
|
28
|
+
propType: 'bool',
|
|
29
|
+
defaultValue: false,
|
|
30
|
+
},
|
|
31
|
+
{
|
|
32
|
+
name: 'color',
|
|
33
|
+
title: { label: '标签色', tip: '标签色' },
|
|
34
|
+
propType: 'string',
|
|
35
|
+
},
|
|
36
|
+
// {
|
|
37
|
+
// name: 'closeIcon',
|
|
38
|
+
// title: { label: '自定义关闭按钮', tip: '自定义关闭按钮' },
|
|
39
|
+
// propType: 'node',
|
|
40
|
+
// },
|
|
41
|
+
{
|
|
42
|
+
name: 'onClose',
|
|
43
|
+
title: { label: '关闭时的回调', tip: '关闭时的回调' },
|
|
44
|
+
propType: 'func',
|
|
45
|
+
},
|
|
46
|
+
// {
|
|
47
|
+
// name: 'visible',
|
|
48
|
+
// title: { label: '是否显示标签', tip: '是否显示标签' },
|
|
49
|
+
// propType: 'bool',
|
|
50
|
+
// defaultValue: true,
|
|
51
|
+
// },
|
|
52
|
+
{
|
|
53
|
+
name: 'icon',
|
|
54
|
+
title: { label: '设置图标', tip: '设置图标' },
|
|
55
|
+
propType: 'node',
|
|
56
|
+
},
|
|
57
|
+
],
|
|
58
|
+
configure: {
|
|
59
|
+
supports: {
|
|
60
|
+
style: true,
|
|
61
|
+
events: [
|
|
62
|
+
{
|
|
63
|
+
name: 'onClose',
|
|
64
|
+
template: "onClose(event,${extParams}){\n// 关闭时的回调\nconsole.log('onClose',event);}",
|
|
65
|
+
},
|
|
66
|
+
],
|
|
67
|
+
},
|
|
68
|
+
},
|
|
69
|
+
};
|