@pisell/materials 1.0.1 → 1.0.2
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/.tmp/assets-daily.json +93 -0
- package/.tmp/assets-dev.json +93 -0
- package/.tmp/assets-prod.json +93 -0
- package/.tmp/default.view.js +24 -0
- package/.tmp/index.jsx +279 -0
- package/.tmp/meta.js +251 -0
- package/.tmp/preview.jsx +72 -0
- package/.tmp/view.js +25 -0
- package/CHANGELOG.md +6 -0
- 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/build.lowcode.js +46 -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 +29 -3
- package/src/components/auto-complete/index.tsx +6 -0
- package/src/components/button/index.tsx +12 -0
- package/src/components/calendar/index.tsx +10 -0
- package/src/components/cascader/index.tsx +6 -0
- package/src/components/checkbox/index.tsx +7 -0
- package/src/components/config-provider/index.tsx +27 -0
- package/src/components/date-picker/index.tsx +22 -0
- package/src/components/drawer/index.tsx +13 -0
- package/src/components/dropdown/index.tsx +13 -0
- package/src/components/form/index.tsx +97 -0
- package/src/components/icon/index.tsx +34 -0
- package/src/components/input/index.tsx +18 -0
- package/src/components/modal/index.tsx +18 -0
- package/src/components/radio/index.tsx +7 -0
- package/src/components/select/index.tsx +6 -0
- package/src/components/skeleton/index.tsx +6 -0
- package/src/components/slider/index.tsx +18 -0
- package/src/components/table/index.tsx +10 -0
- package/src/components/tabs/index.tsx +67 -0
- package/src/components/time-picker/index.tsx +9 -0
- package/src/components/tree-select/index.tsx +8 -0
- package/src/components/upload/index.tsx +5 -0
- package/src/index.tsx +141 -0
- package/src/utils/hoc.tsx +92 -0
- package/src/utils/warning.ts +3 -0
|
Binary file
|
|
@@ -0,0 +1,224 @@
|
|
|
1
|
+
import snippets from './snippets';
|
|
2
|
+
|
|
3
|
+
export default {
|
|
4
|
+
snippets,
|
|
5
|
+
componentName: 'TimePicker',
|
|
6
|
+
title: '时间选择框',
|
|
7
|
+
category: '表单',
|
|
8
|
+
docUrl: "",
|
|
9
|
+
screenshot: "",
|
|
10
|
+
devMode: "proCode",
|
|
11
|
+
npm: {
|
|
12
|
+
package: "@pisell/materials",
|
|
13
|
+
version: "1.0.1",
|
|
14
|
+
exportName: "TimePicker",
|
|
15
|
+
main: "src/index.tsx",
|
|
16
|
+
destructuring: true,
|
|
17
|
+
subName: "",
|
|
18
|
+
},
|
|
19
|
+
props: [
|
|
20
|
+
{
|
|
21
|
+
name: 'defaultValue',
|
|
22
|
+
title: { label: '默认时间', tip: '默认时间' },
|
|
23
|
+
propType: 'date',
|
|
24
|
+
setter: 'DateSetter',
|
|
25
|
+
},
|
|
26
|
+
{
|
|
27
|
+
name: 'value',
|
|
28
|
+
title: { label: '当前时间', tip: '当前时间' },
|
|
29
|
+
propType: 'date',
|
|
30
|
+
setter: 'DateSetter',
|
|
31
|
+
},
|
|
32
|
+
{
|
|
33
|
+
name: 'allowClear',
|
|
34
|
+
title: { label: '支持清除', tip: '是否允许清除' },
|
|
35
|
+
propType: 'bool',
|
|
36
|
+
defaultValue: true,
|
|
37
|
+
setter: 'BoolSetter'
|
|
38
|
+
},
|
|
39
|
+
{
|
|
40
|
+
name: 'autoFocus',
|
|
41
|
+
title: { label: '自动聚焦', tip: '自动获取焦点' },
|
|
42
|
+
propType: 'bool',
|
|
43
|
+
defaultValue: false,
|
|
44
|
+
setter: 'BoolSetter'
|
|
45
|
+
},
|
|
46
|
+
{
|
|
47
|
+
name: 'bordered',
|
|
48
|
+
title: { label: '显示边框', tip: '是否有边框' },
|
|
49
|
+
propType: 'bool',
|
|
50
|
+
defaultValue: true,
|
|
51
|
+
setter: 'BoolSetter'
|
|
52
|
+
},
|
|
53
|
+
{
|
|
54
|
+
name: 'className',
|
|
55
|
+
title: { label: '选择器类名', tip: '选择器类名' },
|
|
56
|
+
propType: 'string',
|
|
57
|
+
setter: 'StringSetter'
|
|
58
|
+
},
|
|
59
|
+
{
|
|
60
|
+
name: 'clearText',
|
|
61
|
+
title: { label: '清除按钮的提示文案', tip: '清除按钮的提示文案' },
|
|
62
|
+
propType: 'string',
|
|
63
|
+
setter: 'StringSetter'
|
|
64
|
+
},
|
|
65
|
+
{
|
|
66
|
+
name: 'disabled',
|
|
67
|
+
title: { label: '是否禁用', tip: '是否为禁用状态' },
|
|
68
|
+
propType: 'bool',
|
|
69
|
+
defaultValue: false,
|
|
70
|
+
setter: 'BoolSetter'
|
|
71
|
+
},
|
|
72
|
+
{
|
|
73
|
+
name: 'disabledHours',
|
|
74
|
+
title: { label: '禁止选择部分小时选项', tip: '禁止选择部分小时选项' },
|
|
75
|
+
propType: 'func',
|
|
76
|
+
},
|
|
77
|
+
{
|
|
78
|
+
name: 'disabledMinutes',
|
|
79
|
+
title: { label: '禁止选择部分分钟选项', tip: '禁止选择部分分钟选项' },
|
|
80
|
+
propType: 'func',
|
|
81
|
+
},
|
|
82
|
+
{
|
|
83
|
+
name: 'disabledSeconds',
|
|
84
|
+
title: { label: '禁止选择部分秒选项', tip: '禁止选择部分秒选项' },
|
|
85
|
+
propType: 'func',
|
|
86
|
+
},
|
|
87
|
+
{
|
|
88
|
+
name: 'format',
|
|
89
|
+
title: { label: '展示的时间格式', tip: '展示的时间格式' },
|
|
90
|
+
propType: 'string',
|
|
91
|
+
setter: 'StringSetter'
|
|
92
|
+
},
|
|
93
|
+
{
|
|
94
|
+
name: 'getPopupContainer',
|
|
95
|
+
title: {
|
|
96
|
+
label: '定义浮层的容器',
|
|
97
|
+
tip: '定义浮层的容器,默认为 body 上新建 div',
|
|
98
|
+
},
|
|
99
|
+
propType: 'func',
|
|
100
|
+
},
|
|
101
|
+
{
|
|
102
|
+
name: 'hideDisabledOptions',
|
|
103
|
+
title: { label: '隐藏禁止选择的选项', tip: '隐藏禁止选择的选项' },
|
|
104
|
+
propType: 'bool',
|
|
105
|
+
defaultValue: false,
|
|
106
|
+
setter: 'BoolSetter'
|
|
107
|
+
},
|
|
108
|
+
{
|
|
109
|
+
name: 'hourStep',
|
|
110
|
+
title: { label: '小时选项间隔', tip: '小时选项间隔' },
|
|
111
|
+
propType: 'number',
|
|
112
|
+
setter: 'NumberSetter'
|
|
113
|
+
},
|
|
114
|
+
{
|
|
115
|
+
name: 'inputReadOnly',
|
|
116
|
+
title: {
|
|
117
|
+
label: '只读',
|
|
118
|
+
tip: '设置输入框为只读(避免在移动设备上打开虚拟键盘)',
|
|
119
|
+
},
|
|
120
|
+
propType: 'bool',
|
|
121
|
+
defaultValue: false,
|
|
122
|
+
setter: 'BoolSetter'
|
|
123
|
+
},
|
|
124
|
+
{
|
|
125
|
+
name: 'minuteStep',
|
|
126
|
+
title: { label: '分钟选项间隔', tip: '分钟选项间隔' },
|
|
127
|
+
propType: 'number',
|
|
128
|
+
setter: 'NumberSetter'
|
|
129
|
+
},
|
|
130
|
+
// {
|
|
131
|
+
// name: 'open',
|
|
132
|
+
// title: { label: '面板是否打开', tip: '面板是否打开' },
|
|
133
|
+
// propType: 'bool',
|
|
134
|
+
// // defaultValue: false,
|
|
135
|
+
// setter: 'BoolSetter'
|
|
136
|
+
// },
|
|
137
|
+
{
|
|
138
|
+
name: 'placeholder',
|
|
139
|
+
title: { label: '空值提示', tip: '没有值的时候显示的内容' },
|
|
140
|
+
propType: {
|
|
141
|
+
type: 'oneOfType',
|
|
142
|
+
value: ['string', { type: 'arrayOf', value: 'string' }],
|
|
143
|
+
},
|
|
144
|
+
},
|
|
145
|
+
{
|
|
146
|
+
name: 'popupClassName',
|
|
147
|
+
title: { label: '弹出层类名', tip: '弹出层类名' },
|
|
148
|
+
propType: 'string',
|
|
149
|
+
setter: 'StringSetter'
|
|
150
|
+
},
|
|
151
|
+
// {
|
|
152
|
+
// name: 'popupStyle',
|
|
153
|
+
// title: { label: '弹出层样式对象', tip: '弹出层样式对象' },
|
|
154
|
+
// propType: 'object',
|
|
155
|
+
// },
|
|
156
|
+
{
|
|
157
|
+
name: 'secondStep',
|
|
158
|
+
title: { label: '秒选项间隔', tip: '秒选项间隔' },
|
|
159
|
+
propType: 'number',
|
|
160
|
+
setter: 'NumberSetter'
|
|
161
|
+
},
|
|
162
|
+
// {
|
|
163
|
+
// name: 'suffixIcon',
|
|
164
|
+
// title: { label: '自定义的选择框后缀图标', tip: '自定义的选择框后缀图标' },
|
|
165
|
+
// propType: 'node',
|
|
166
|
+
// },
|
|
167
|
+
// {
|
|
168
|
+
// name: 'clearIcon',
|
|
169
|
+
// title: { label: '自定义的清除图标', tip: '自定义的清除图标' },
|
|
170
|
+
// propType: 'node',
|
|
171
|
+
// },
|
|
172
|
+
// {
|
|
173
|
+
// name: 'renderExtraFooter',
|
|
174
|
+
// title: {
|
|
175
|
+
// label: '选择框底部显示自定义的内容',
|
|
176
|
+
// tip: '选择框底部显示自定义的内容',
|
|
177
|
+
// },
|
|
178
|
+
// propType: 'func',
|
|
179
|
+
// },
|
|
180
|
+
{
|
|
181
|
+
name: 'use12Hours',
|
|
182
|
+
title: {
|
|
183
|
+
label: '12小时制',
|
|
184
|
+
tip: '使用 12 小时制,为 true 时 `format` 默认为 `h:mm:ss a`',
|
|
185
|
+
},
|
|
186
|
+
propType: 'bool',
|
|
187
|
+
defaultValue: false,
|
|
188
|
+
setter: 'BoolSetter'
|
|
189
|
+
},
|
|
190
|
+
{
|
|
191
|
+
name: 'onChange',
|
|
192
|
+
title: { label: '时间发生变化的回调', tip: '时间发生变化的回调' },
|
|
193
|
+
propType: 'func',
|
|
194
|
+
},
|
|
195
|
+
{
|
|
196
|
+
name: 'onOpenChange',
|
|
197
|
+
title: { label: '面板打开/关闭时的回调', tip: '面板打开/关闭时的回调' },
|
|
198
|
+
propType: 'func',
|
|
199
|
+
},
|
|
200
|
+
{
|
|
201
|
+
name: 'showNow',
|
|
202
|
+
title: { label: '“此刻”按钮', tip: '面板是否显示“此刻”按钮' },
|
|
203
|
+
propType: 'bool',
|
|
204
|
+
setter: 'BoolSetter'
|
|
205
|
+
},
|
|
206
|
+
],
|
|
207
|
+
configure: {
|
|
208
|
+
supports: {
|
|
209
|
+
style: true,
|
|
210
|
+
events: [
|
|
211
|
+
{
|
|
212
|
+
name: 'onChange',
|
|
213
|
+
template:
|
|
214
|
+
"onChange(time,timeString,${extParams}){\n// 时间发生变化的回调\nconsole.log('onChange',time,timeString);}",
|
|
215
|
+
},
|
|
216
|
+
{
|
|
217
|
+
name: 'onOpenChange',
|
|
218
|
+
template:
|
|
219
|
+
"onOpenChange(open,${extParams}){\n// 面板打开/关闭时的回调\nconsole.log('onOpenChange',open);}",
|
|
220
|
+
},
|
|
221
|
+
],
|
|
222
|
+
},
|
|
223
|
+
},
|
|
224
|
+
};
|
|
Binary file
|
|
@@ -0,0 +1,189 @@
|
|
|
1
|
+
import { uuid } from '../_utils/utils';
|
|
2
|
+
|
|
3
|
+
import snippets from './snippets';
|
|
4
|
+
|
|
5
|
+
export default {
|
|
6
|
+
snippets,
|
|
7
|
+
componentName: 'Timeline',
|
|
8
|
+
title: '时间轴',
|
|
9
|
+
category: '数据展示',
|
|
10
|
+
docUrl: "",
|
|
11
|
+
screenshot: "",
|
|
12
|
+
devMode: "proCode",
|
|
13
|
+
npm: {
|
|
14
|
+
package: "@pisell/materials",
|
|
15
|
+
version: "1.0.1",
|
|
16
|
+
exportName: "Timeline",
|
|
17
|
+
main: "src/index.tsx",
|
|
18
|
+
destructuring: true,
|
|
19
|
+
subName: "",
|
|
20
|
+
},
|
|
21
|
+
props: [
|
|
22
|
+
{
|
|
23
|
+
name: 'steps',
|
|
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
|
+
},
|
|
39
|
+
{
|
|
40
|
+
name: 'color',
|
|
41
|
+
title: '圆圈颜色',
|
|
42
|
+
setter: 'StringSetter',
|
|
43
|
+
},
|
|
44
|
+
{
|
|
45
|
+
name: 'dot',
|
|
46
|
+
title: '自定义时间轴点',
|
|
47
|
+
setter: 'node',
|
|
48
|
+
},
|
|
49
|
+
{
|
|
50
|
+
name: 'label',
|
|
51
|
+
title: '设置标签',
|
|
52
|
+
setter: 'StringSetter',
|
|
53
|
+
},
|
|
54
|
+
{
|
|
55
|
+
name: 'position',
|
|
56
|
+
title: {
|
|
57
|
+
label: '自定义节点位置',
|
|
58
|
+
tip: '自定义节点位置',
|
|
59
|
+
},
|
|
60
|
+
propType: {
|
|
61
|
+
type: 'oneOf',
|
|
62
|
+
value: ['left', 'right'],
|
|
63
|
+
},
|
|
64
|
+
setter: [
|
|
65
|
+
{
|
|
66
|
+
componentName: 'RadioGroupSetter',
|
|
67
|
+
props: {
|
|
68
|
+
options: [
|
|
69
|
+
{
|
|
70
|
+
title: 'left',
|
|
71
|
+
value: 'left',
|
|
72
|
+
},
|
|
73
|
+
{
|
|
74
|
+
title: 'right',
|
|
75
|
+
value: 'right',
|
|
76
|
+
},
|
|
77
|
+
],
|
|
78
|
+
},
|
|
79
|
+
},
|
|
80
|
+
'VariableSetter',
|
|
81
|
+
],
|
|
82
|
+
},
|
|
83
|
+
],
|
|
84
|
+
},
|
|
85
|
+
},
|
|
86
|
+
initialValue: () => {
|
|
87
|
+
return {
|
|
88
|
+
key: `timeLine${uuid()}`,
|
|
89
|
+
label: '时间轴',
|
|
90
|
+
};
|
|
91
|
+
},
|
|
92
|
+
},
|
|
93
|
+
},
|
|
94
|
+
},
|
|
95
|
+
extraProps: {
|
|
96
|
+
getValue(target, fieldValue, a, b, c) {
|
|
97
|
+
const map = target.node.children.map((child) => {
|
|
98
|
+
const key = child.getPropValue('key') ? String(child.getPropValue('key')) : child.id;
|
|
99
|
+
const result = { key };
|
|
100
|
+
['color', 'dot', 'label', 'position'].forEach((propKey) => {
|
|
101
|
+
result[propKey] = child.getPropValue(propKey);
|
|
102
|
+
});
|
|
103
|
+
return result;
|
|
104
|
+
});
|
|
105
|
+
return map.length === 0 ? fieldValue : map;
|
|
106
|
+
},
|
|
107
|
+
setValue(target, value) {
|
|
108
|
+
const { node } = target;
|
|
109
|
+
const map = {};
|
|
110
|
+
|
|
111
|
+
if (!Array.isArray(value)) {
|
|
112
|
+
value = [];
|
|
113
|
+
}
|
|
114
|
+
value.forEach((item) => {
|
|
115
|
+
const tabItem = Object.assign({}, item);
|
|
116
|
+
map[item.key] = tabItem;
|
|
117
|
+
});
|
|
118
|
+
|
|
119
|
+
node.children.mergeChildren(
|
|
120
|
+
(child) => {
|
|
121
|
+
const key = String(child.getPropValue('key'));
|
|
122
|
+
if (Object.hasOwnProperty.call(map, key)) {
|
|
123
|
+
['color', 'dot', 'label', 'position'].forEach((propKey) => {
|
|
124
|
+
child.setPropValue(propKey, map[key][propKey]);
|
|
125
|
+
});
|
|
126
|
+
delete map[key];
|
|
127
|
+
return false;
|
|
128
|
+
}
|
|
129
|
+
return true;
|
|
130
|
+
},
|
|
131
|
+
() => {
|
|
132
|
+
const items = [];
|
|
133
|
+
for (const key in map) {
|
|
134
|
+
if (Object.hasOwnProperty.call(map, key)) {
|
|
135
|
+
items.push({
|
|
136
|
+
componentName: 'Timeline.Item',
|
|
137
|
+
props: map[key],
|
|
138
|
+
});
|
|
139
|
+
}
|
|
140
|
+
}
|
|
141
|
+
return items;
|
|
142
|
+
},
|
|
143
|
+
|
|
144
|
+
(child1, child2) => {
|
|
145
|
+
const a = value.findIndex(
|
|
146
|
+
(item) => String(item.key) === String(child1.getPropValue('key')),
|
|
147
|
+
);
|
|
148
|
+
const b = value.findIndex(
|
|
149
|
+
(item) => String(item.key) === String(child2.getPropValue('key')),
|
|
150
|
+
);
|
|
151
|
+
return a - b;
|
|
152
|
+
},
|
|
153
|
+
);
|
|
154
|
+
},
|
|
155
|
+
},
|
|
156
|
+
},
|
|
157
|
+
{
|
|
158
|
+
name: 'mode',
|
|
159
|
+
title: {
|
|
160
|
+
label: '模式',
|
|
161
|
+
tip: '通过设置 `mode` 可以改变时间轴和内容的相对位置',
|
|
162
|
+
},
|
|
163
|
+
propType: { type: 'oneOf', value: ['left', 'alternate', 'right'] },
|
|
164
|
+
},
|
|
165
|
+
{
|
|
166
|
+
name: 'pending',
|
|
167
|
+
title: {
|
|
168
|
+
label: '存在最后节点',
|
|
169
|
+
tip: '指定最后一个幽灵节点是否存在',
|
|
170
|
+
},
|
|
171
|
+
propType: 'bool',
|
|
172
|
+
},
|
|
173
|
+
{
|
|
174
|
+
name: 'pendingDot',
|
|
175
|
+
title: {
|
|
176
|
+
label: '当最后一个幽灵节点存在時,指定其时间图点',
|
|
177
|
+
tip: '当最后一个幽灵节点存在時,指定其时间图点',
|
|
178
|
+
},
|
|
179
|
+
propType: { type: 'oneOfType', value: ['string', 'node'] },
|
|
180
|
+
},
|
|
181
|
+
{
|
|
182
|
+
name: 'reverse',
|
|
183
|
+
title: { label: '节点排序', tip: '节点排序' },
|
|
184
|
+
propType: 'bool',
|
|
185
|
+
defaultValue: false,
|
|
186
|
+
},
|
|
187
|
+
],
|
|
188
|
+
configure: { supports: { style: true } },
|
|
189
|
+
};
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
export default [
|
|
2
|
+
{
|
|
3
|
+
title: '时间轴',
|
|
4
|
+
screenshot: 'https://alifd.alicdn.com/fusion-cool/icons/icon-antd/timeline-1.jpg',
|
|
5
|
+
schema: {
|
|
6
|
+
componentName: 'Timeline',
|
|
7
|
+
props: {
|
|
8
|
+
steps: [
|
|
9
|
+
{
|
|
10
|
+
key: 'timeLinei5wd',
|
|
11
|
+
label: '时间轴',
|
|
12
|
+
},
|
|
13
|
+
{
|
|
14
|
+
key: 'timeLinei5wx',
|
|
15
|
+
label: '时间轴',
|
|
16
|
+
},
|
|
17
|
+
],
|
|
18
|
+
},
|
|
19
|
+
},
|
|
20
|
+
},
|
|
21
|
+
];
|
|
Binary file
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
import snippets from './snippets';
|
|
2
|
+
|
|
3
|
+
export default {
|
|
4
|
+
snippets,
|
|
5
|
+
componentName: 'Timeline.Item',
|
|
6
|
+
title: '时间轴项',
|
|
7
|
+
category: '',
|
|
8
|
+
docUrl: "",
|
|
9
|
+
screenshot: "",
|
|
10
|
+
devMode: "proCode",
|
|
11
|
+
npm: {
|
|
12
|
+
package: "@pisell/materials",
|
|
13
|
+
version: "1.0.1",
|
|
14
|
+
exportName: "Timeline",
|
|
15
|
+
main: "src/index.tsx",
|
|
16
|
+
destructuring: true,
|
|
17
|
+
subName: "Item",
|
|
18
|
+
},
|
|
19
|
+
props: [
|
|
20
|
+
{
|
|
21
|
+
name: 'color',
|
|
22
|
+
title: { label: '颜色', tip: '颜色' },
|
|
23
|
+
propType: 'string',
|
|
24
|
+
defaultValue: '#00f',
|
|
25
|
+
setter: 'ColorSetter',
|
|
26
|
+
},
|
|
27
|
+
{
|
|
28
|
+
name: 'dot',
|
|
29
|
+
title: {
|
|
30
|
+
label: '时间轴点',
|
|
31
|
+
tip: '时间轴点',
|
|
32
|
+
},
|
|
33
|
+
propType: 'node',
|
|
34
|
+
},
|
|
35
|
+
{
|
|
36
|
+
name: 'label',
|
|
37
|
+
title: {
|
|
38
|
+
label: '标签',
|
|
39
|
+
tip: '标签',
|
|
40
|
+
},
|
|
41
|
+
propType: { type: 'oneOfType', value: ['string', 'node', 'func'] },
|
|
42
|
+
},
|
|
43
|
+
{
|
|
44
|
+
name: 'position',
|
|
45
|
+
title: {
|
|
46
|
+
label: '位置',
|
|
47
|
+
tip: '位置',
|
|
48
|
+
},
|
|
49
|
+
propType: { type: 'oneOf', value: ['left', 'right'] },
|
|
50
|
+
},
|
|
51
|
+
],
|
|
52
|
+
configure: { supports: { style: true } },
|
|
53
|
+
};
|
|
Binary file
|