@pisell/materials 2.2.41 → 2.2.43

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.
Files changed (137) hide show
  1. package/es/components/TimeResourceSelector/index.d.ts +21 -0
  2. package/es/components/TimeResourceSelector/index.js +115 -0
  3. package/es/components/TimeResourceSelector/index.less +59 -0
  4. package/es/components/pisellAnchor/index.d.ts +15 -0
  5. package/es/components/pisellAnchor/index.js +126 -0
  6. package/es/components/pisellAnchor/index.less +177 -0
  7. package/es/components/pisellAvatar/index.d.ts +19 -0
  8. package/es/components/pisellAvatar/index.js +90 -0
  9. package/es/components/pisellAvatar/index.less +26 -0
  10. package/es/components/pisellCard/index.d.ts +8 -0
  11. package/es/components/pisellCard/index.js +34 -5
  12. package/es/components/pisellCard/index.less +31 -4
  13. package/es/components/pisellCustomCheckboxGroup/index.d.ts +16 -0
  14. package/es/components/pisellCustomCheckboxGroup/index.js +72 -0
  15. package/es/components/pisellCustomCheckboxGroup/index.less +0 -0
  16. package/es/components/pisellDropdown/index.d.ts +20 -0
  17. package/es/components/pisellDropdown/index.js +51 -0
  18. package/es/components/pisellDropdown/index.less +44 -0
  19. package/es/components/pisellEmpty/index.d.ts +2 -1
  20. package/es/components/pisellHeaderProgressBar/index.d.ts +29 -0
  21. package/es/components/pisellHeaderProgressBar/index.js +76 -0
  22. package/es/components/pisellHeaderProgressBar/index.less +18 -0
  23. package/es/components/pisellImageCarousels/index.d.ts +18 -0
  24. package/es/components/pisellImageCarousels/index.js +108 -0
  25. package/es/components/pisellImageCarousels/index.less +92 -0
  26. package/es/components/pisellList01/index.d.ts +17 -0
  27. package/es/components/pisellList01/index.js +105 -0
  28. package/es/components/pisellList01/index.less +53 -0
  29. package/es/components/pisellSectionHeaders/index.d.ts +21 -0
  30. package/es/components/pisellSectionHeaders/index.js +35 -0
  31. package/es/components/pisellSectionHeaders/index.less +46 -0
  32. package/es/components/pisellViewGrid/index.d.ts +16 -0
  33. package/es/components/pisellViewGrid/index.js +66 -0
  34. package/es/components/pisellViewGrid/index.less +31 -0
  35. package/es/components/productCard/components/Header/index.js +3 -2
  36. package/es/components/productCard/hooks/useOpenNote.js +3 -2
  37. package/es/components/productCard/index.js +7 -3
  38. package/es/components/productCard/index.less +6 -2
  39. package/es/components/productCard/status.js +3 -1
  40. package/es/components/productCard/types.d.ts +2 -0
  41. package/es/components/productCard/utils.js +17 -1
  42. package/es/components/section-footers/index.d.ts +9 -0
  43. package/es/components/section-footers/index.js +17 -0
  44. package/es/components/section-footers/index.less +5 -0
  45. package/es/components/table/Actions/component/ExportImport/utils/index.d.ts +9 -0
  46. package/es/components/table/Actions/component/ExportImport/utils/index.js +11 -0
  47. package/es/index.d.ts +10 -0
  48. package/es/index.js +11 -1
  49. package/lib/components/TimeResourceSelector/index.d.ts +21 -0
  50. package/lib/components/TimeResourceSelector/index.js +109 -0
  51. package/lib/components/TimeResourceSelector/index.less +59 -0
  52. package/lib/components/pisellAnchor/index.d.ts +15 -0
  53. package/lib/components/pisellAnchor/index.js +120 -0
  54. package/lib/components/pisellAnchor/index.less +177 -0
  55. package/lib/components/pisellAvatar/index.d.ts +19 -0
  56. package/lib/components/pisellAvatar/index.js +108 -0
  57. package/lib/components/pisellAvatar/index.less +26 -0
  58. package/lib/components/pisellCard/index.d.ts +8 -0
  59. package/lib/components/pisellCard/index.js +30 -7
  60. package/lib/components/pisellCard/index.less +31 -4
  61. package/lib/components/pisellCustomCheckboxGroup/index.d.ts +16 -0
  62. package/lib/components/pisellCustomCheckboxGroup/index.js +71 -0
  63. package/lib/components/pisellCustomCheckboxGroup/index.less +0 -0
  64. package/lib/components/pisellDropdown/index.d.ts +20 -0
  65. package/lib/components/pisellDropdown/index.js +72 -0
  66. package/lib/components/pisellDropdown/index.less +44 -0
  67. package/lib/components/pisellEmpty/index.d.ts +2 -1
  68. package/lib/components/pisellHeaderProgressBar/index.d.ts +29 -0
  69. package/lib/components/pisellHeaderProgressBar/index.js +88 -0
  70. package/lib/components/pisellHeaderProgressBar/index.less +18 -0
  71. package/lib/components/pisellImageCarousels/index.d.ts +18 -0
  72. package/lib/components/pisellImageCarousels/index.js +108 -0
  73. package/lib/components/pisellImageCarousels/index.less +92 -0
  74. package/lib/components/pisellList01/index.d.ts +17 -0
  75. package/lib/components/pisellList01/index.js +113 -0
  76. package/lib/components/pisellList01/index.less +53 -0
  77. package/lib/components/pisellSectionHeaders/index.d.ts +21 -0
  78. package/lib/components/pisellSectionHeaders/index.js +52 -0
  79. package/lib/components/pisellSectionHeaders/index.less +46 -0
  80. package/lib/components/pisellViewGrid/index.d.ts +16 -0
  81. package/lib/components/pisellViewGrid/index.js +98 -0
  82. package/lib/components/pisellViewGrid/index.less +31 -0
  83. package/lib/components/productCard/components/Header/index.js +3 -2
  84. package/lib/components/productCard/hooks/useOpenNote.js +2 -1
  85. package/lib/components/productCard/index.js +9 -4
  86. package/lib/components/productCard/index.less +6 -2
  87. package/lib/components/productCard/status.js +3 -1
  88. package/lib/components/productCard/types.d.ts +2 -0
  89. package/lib/components/productCard/utils.js +15 -4
  90. package/lib/components/section-footers/index.d.ts +9 -0
  91. package/lib/components/section-footers/index.js +44 -0
  92. package/lib/components/section-footers/index.less +5 -0
  93. package/lib/components/table/Actions/component/ExportImport/utils/index.d.ts +9 -0
  94. package/lib/components/table/Actions/component/ExportImport/utils/index.js +31 -0
  95. package/lib/index.d.ts +10 -0
  96. package/lib/index.js +30 -0
  97. package/lowcode/pisell-anchor/meta.ts +118 -0
  98. package/lowcode/pisell-anchor/snippets.ts +26 -0
  99. package/lowcode/pisell-avatar/__screenshots__/avatar-1.jpg +0 -0
  100. package/lowcode/pisell-avatar/meta.ts +111 -0
  101. package/lowcode/pisell-avatar/snippets.ts +14 -0
  102. package/lowcode/pisell-card/meta.ts +62 -27
  103. package/lowcode/pisell-card/snippets.ts +6 -0
  104. package/lowcode/pisell-custom-checkbox-group/__screenshots__/card-1.png +0 -0
  105. package/lowcode/pisell-custom-checkbox-group/meta.ts +204 -0
  106. package/lowcode/pisell-custom-checkbox-group/snippets.ts +56 -0
  107. package/lowcode/pisell-dropdown/__screenshots__/dropdown-1.png +0 -0
  108. package/lowcode/pisell-dropdown/meta.ts +180 -0
  109. package/lowcode/pisell-dropdown/snippets.ts +69 -0
  110. package/lowcode/pisell-header-progress-bar/meta.ts +116 -0
  111. package/lowcode/pisell-header-progress-bar/snippets.ts +24 -0
  112. package/lowcode/pisell-image-carousels/meta.ts +143 -0
  113. package/lowcode/pisell-image-carousels/snippets.ts +20 -0
  114. package/lowcode/pisell-list01/meta.ts +74 -0
  115. package/lowcode/pisell-list01/snippets.ts +35 -0
  116. package/lowcode/pisell-section-headers/meta.ts +91 -0
  117. package/lowcode/pisell-section-headers/snippets.ts +22 -0
  118. package/lowcode/pisell-view-grid/__screenshots__/card-1.png +0 -0
  119. package/lowcode/pisell-view-grid/meta.ts +167 -0
  120. package/lowcode/pisell-view-grid/snippets.ts +54 -0
  121. package/lowcode/section-footers/meta.ts +66 -0
  122. package/lowcode/section-footers/snippe.ts +21 -0
  123. package/package.json +4 -3
  124. package/build/lowcode/assets-daily.json +0 -93
  125. package/build/lowcode/assets-dev.json +0 -93
  126. package/build/lowcode/assets-prod.json +0 -93
  127. package/build/lowcode/designer.html +0 -303
  128. package/build/lowcode/index.html +0 -305
  129. package/build/lowcode/index.js +0 -1
  130. package/build/lowcode/meta.js +0 -9
  131. package/build/lowcode/preview.css +0 -1
  132. package/build/lowcode/preview.html +0 -35
  133. package/build/lowcode/preview.js +0 -304
  134. package/build/lowcode/render/default/view.css +0 -1
  135. package/build/lowcode/render/default/view.js +0 -232
  136. package/build/lowcode/view.css +0 -1
  137. package/build/lowcode/view.js +0 -232
@@ -0,0 +1,143 @@
1
+ import snippets from './snippets';
2
+
3
+ export default {
4
+ snippets,
5
+ componentName: 'PisellImageCarousels',
6
+ title: '轮播图',
7
+ category: '数据展示',
8
+ docUrl: '',
9
+ screenshot: '',
10
+ devMode: 'proCode',
11
+ npm: {
12
+ package: '@pisell/materials',
13
+ version: '1.0.1',
14
+ exportName: 'PisellImageCarousels',
15
+ main: 'src/index.tsx',
16
+ destructuring: true,
17
+ subName: '',
18
+ },
19
+ props: [
20
+ {
21
+ title: '数据源',
22
+ display: 'block',
23
+ type: 'group',
24
+ items: [
25
+ {
26
+ name: 'dataSource',
27
+ title: { label: '列表数据源', tip: '列表数据源' },
28
+ propType: { type: 'arrayOf', value: 'any' },
29
+ setter: ['JsonSetter', 'VariableSetter'],
30
+ },
31
+ {
32
+ name: 'rowKey',
33
+ title: {
34
+ label: '行Key',
35
+ tip: 'rowKey | 当 renderItem 自定义渲染列表项有效时,自定义每一行的 key 的获取方式',
36
+ },
37
+ propType: {
38
+ type: 'oneOfType',
39
+ value: ['string', 'function'],
40
+ },
41
+ defaultValue: 'id',
42
+ setter: [
43
+ 'StringSetter',
44
+ {
45
+ componentName: 'FunctionSetter',
46
+ props: {
47
+ template:
48
+ 'rowKey(item,${extParams}){\n// 自定义每一行的 key\nreturn `key-${item.id}`;\n}',
49
+ },
50
+ },
51
+ 'VariableSetter',
52
+ ],
53
+ },
54
+ ],
55
+ },
56
+ {
57
+ title: '轮播设置',
58
+ display: 'block',
59
+ type: 'group',
60
+ items: [
61
+ {
62
+ name: 'showDots',
63
+ title: { label: '显示翻页点', tip: 'showDots | 显示翻页点' },
64
+ propType: 'bool',
65
+ setter: 'BoolSetter',
66
+ defaultValue: true,
67
+ },
68
+ {
69
+ name: 'showArrows',
70
+ title: { label: '显示箭头', tip: 'showArrows | 显示箭头' },
71
+ propType: 'bool',
72
+ setter: 'BoolSetter',
73
+ defaultValue: true,
74
+ },
75
+ {
76
+ name: 'autoplay',
77
+ title: { label: '自动切换', tip: 'autoplay | 自动切换' },
78
+ propType: 'bool',
79
+ setter: 'BoolSetter',
80
+ defaultValue: true,
81
+ },
82
+ {
83
+ name: 'interval',
84
+ title: { label: '切换的间隔 (毫秒)', tip: 'interval | 切换的间隔 (毫秒)' },
85
+ setter: {
86
+ componentName: "NumberSetter",
87
+ props: {
88
+ min: 0,
89
+ },
90
+ },
91
+ defaultValue: 3000,
92
+ },
93
+ ],
94
+ },
95
+ {
96
+ title: '图片设置',
97
+ display: 'block',
98
+ type: 'group',
99
+ items: [
100
+ {
101
+ name: 'borderRadius',
102
+ title: { label: '圆角度数', tip: 'borderRadius | 圆角度数' },
103
+ setter: {
104
+ componentName: "NumberSetter",
105
+ props: {
106
+ min: 0,
107
+ },
108
+ },
109
+ defaultValue: 8,
110
+ },
111
+ {
112
+ name: 'width',
113
+ title: { label: '图片宽度', tip: 'width | 图片宽度' },
114
+ setter: {
115
+ componentName: "NumberSetter",
116
+ props: {
117
+ min: 0,
118
+ },
119
+ },
120
+ defaultValue: 640,
121
+ },
122
+ {
123
+ name: 'height',
124
+ title: { label: '图片高度', tip: 'height | 图片高度' },
125
+ setter: {
126
+ componentName: "NumberSetter",
127
+ props: {
128
+ min: 0,
129
+ },
130
+ },
131
+ defaultValue: 400,
132
+ },
133
+ ],
134
+ },
135
+ ],
136
+
137
+ configure: {
138
+ supports: {
139
+ style: true,
140
+ events: [],
141
+ },
142
+ },
143
+ };
@@ -0,0 +1,20 @@
1
+ export default [
2
+ {
3
+ title: '轮播图',
4
+ schema: {
5
+ componentName: 'PisellImageCarousels',
6
+ props: {
7
+ dataSource: ['https://zos.alipayobjects.com/rmsportal/jkjgkEfvpUPVyRjUImniVslZfWPnJuuZ.png',
8
+ 'https://gw.alicdn.com/bao/uploaded/i1/1115405069/O1CN01IYXdQb1nJebqPtA8S_!!1115405069.jpg_.webp'
9
+ ],
10
+ showDots: true,
11
+ showArrows: true,
12
+ autoplay: true,
13
+ interval: 3000,
14
+ borderRadius: 8,
15
+ height: 400,
16
+ width: 640,
17
+ },
18
+ },
19
+ },
20
+ ];
@@ -0,0 +1,74 @@
1
+ import snippets from "./snippets";
2
+
3
+ export default {
4
+ snippets,
5
+ componentName: "PisellList01",
6
+ title: "列表1号",
7
+ category: "Layout",
8
+ devMode: "proCode",
9
+ npm: {
10
+ package: "@pisell/materials",
11
+ version: "1.0.1",
12
+ exportName: "PisellList01",
13
+ main: "src/index.tsx",
14
+ destructuring: true,
15
+ subName: "",
16
+ },
17
+ props: [
18
+ {
19
+ title: '数据源',
20
+ display: 'block',
21
+ type: 'group',
22
+ items: [
23
+ {
24
+ name: 'dataSource',
25
+ title: { label: '列表数据源', tip: 'dataSource | 列表数据源' },
26
+ propType: { type: 'arrayOf', value: 'any' },
27
+ setter: ['JsonSetter', 'VariableSetter'],
28
+ },
29
+ {
30
+ name: 'rowKey',
31
+ title: {
32
+ label: '行Key',
33
+ tip: 'rowKey | 当 renderItem 自定义渲染列表项有效时,自定义每一行的 key 的获取方式',
34
+ },
35
+ propType: {
36
+ type: 'oneOfType',
37
+ value: ['string', 'function'],
38
+ },
39
+ defaultValue: 'id',
40
+ setter: [
41
+ 'StringSetter',
42
+ {
43
+ componentName: 'FunctionSetter',
44
+ props: {
45
+ template:
46
+ 'rowKey(item,${extParams}){\n// 自定义每一行的 key\nreturn `key-${item.id}`;\n}',
47
+ },
48
+ },
49
+ 'VariableSetter',
50
+ ],
51
+ },
52
+ ],
53
+ },
54
+ {
55
+ name: 'showSearch',
56
+ title: { label: '显示搜索', tip: 'showSearch | 显示搜索' },
57
+ propType: 'bool',
58
+ setter: 'BoolSetter',
59
+ },
60
+ {
61
+ name: 'showCategory',
62
+ title: { label: '显示分类', tip: 'showCategory | 显示分类' },
63
+ propType: 'bool',
64
+ setter: 'BoolSetter',
65
+ },
66
+ ],
67
+ configure: {
68
+ supports: {
69
+ style: true,
70
+ events: [
71
+ ],
72
+ },
73
+ },
74
+ };
@@ -0,0 +1,35 @@
1
+ export default [
2
+ {
3
+ title: '列表1号',
4
+ screenshot: 'https://alifd.alicdn.com/fusion-cool/icons/icon-antd/avatar-1.jpg',
5
+ schema: {
6
+ componentName: 'PisellList01',
7
+ props: {
8
+ showSearch: true,
9
+ showCategory: true,
10
+ dataSource: [
11
+ {
12
+ key: '1',
13
+ title: '分类1',
14
+ href: '#1',
15
+ children: [{
16
+ id: 1,
17
+ name: '产品1',
18
+ price: 100,
19
+ }]
20
+ },
21
+ {
22
+ key: '2',
23
+ title: '分类2',
24
+ href: '#2',
25
+ children: [{
26
+ id: 2,
27
+ name: '产品2',
28
+ price: 100,
29
+ }]
30
+ }
31
+ ]
32
+ },
33
+ },
34
+ },
35
+ ];
@@ -0,0 +1,91 @@
1
+ import snippets from './snippets';
2
+
3
+ export default {
4
+ snippets,
5
+ componentName: 'PisellSectionHeaders',
6
+ title: '顶部内容区块',
7
+ category: '数据展示',
8
+ docUrl: '',
9
+ screenshot: '',
10
+ devMode: 'proCode',
11
+ npm: {
12
+ package: '@pisell/materials',
13
+ version: '1.0.1',
14
+ exportName: 'PisellSectionHeaders',
15
+ main: 'src/index.tsx',
16
+ destructuring: true,
17
+ subName: '',
18
+ },
19
+ props: [
20
+ // {
21
+ // title: '基础',
22
+ // display: 'block',
23
+ // type: 'group',
24
+ // items: [
25
+ // {
26
+ // name: 'background',
27
+ // title: { label: '背景色', tip: 'background | 背景色' },
28
+ // propType: 'string',
29
+ // setter: 'ColorSetter',
30
+ // },
31
+ // ],
32
+ // },
33
+ {
34
+ name: 'backNode',
35
+ title: { label: '返回区域', tip: 'backNode | 返回区域' },
36
+ propType: 'node',
37
+ setter: {
38
+ componentName: 'SlotSetter',
39
+ initialValue: {
40
+ type: 'JSSlot',
41
+ value: [],
42
+ },
43
+ },
44
+
45
+ },
46
+ {
47
+ name: 'centerNode',
48
+ title: { label: '中间区域', tip: 'centerNode | 中间区域' },
49
+ propType: 'node',
50
+ setter: {
51
+ componentName: 'SlotSetter',
52
+ initialValue: {
53
+ type: 'JSSlot',
54
+ value: [],
55
+ },
56
+ },
57
+ },
58
+ {
59
+ name: 'actionNode',
60
+ title: { label: '操作区域', tip: 'actionNode | 操作区域' },
61
+ propType: 'node',
62
+ setter: {
63
+ componentName: 'SlotSetter',
64
+ initialValue: {
65
+ type: 'JSSlot',
66
+ value: [],
67
+ },
68
+ },
69
+ },
70
+ ],
71
+ configure: {
72
+ component: {
73
+ isContainer: true,
74
+ },
75
+ supports: {
76
+ style: true,
77
+ events: [
78
+ {
79
+ name: 'onBack',
80
+ template:
81
+ "onBack(value,${extParams}){\n// 返回事件的回调\nconsole.log('onBack',value);}",
82
+ },
83
+ {
84
+ name: 'onAction',
85
+ template:
86
+ "onAction(value,${extParams}){\n// 右侧操作事件的回调\nconsole.log('onAction',value);}",
87
+ },
88
+ ],
89
+ },
90
+ },
91
+ };
@@ -0,0 +1,22 @@
1
+ export default [
2
+ {
3
+ title: '顶部内容区块',
4
+ schema: {
5
+ componentName: 'PisellSectionHeaders',
6
+ props: {
7
+ backNode: {
8
+ type: "JSSlot",
9
+ value: [],
10
+ },
11
+ centerNode: {
12
+ type: "JSSlot",
13
+ value: [],
14
+ },
15
+ actionNode: {
16
+ type: "JSSlot",
17
+ value: [],
18
+ },
19
+ },
20
+ },
21
+ },
22
+ ];
@@ -0,0 +1,167 @@
1
+ import snippets from "./snippets";
2
+
3
+ export default {
4
+ snippets,
5
+ componentName: "PisellViewGrid",
6
+ title: "栅格视图",
7
+ category: "数据展示",
8
+ docUrl: "",
9
+ screenshot: "",
10
+ devMode: "proCode",
11
+ npm: {
12
+ package: "@pisell/materials",
13
+ version: "1.0.1",
14
+ exportName: "PisellViewGrid",
15
+ main: "src/index.tsx",
16
+ destructuring: true,
17
+ subName: "",
18
+ },
19
+ props: [
20
+ {
21
+ title: '数据源',
22
+ display: 'block',
23
+ type: 'group',
24
+ items: [
25
+ {
26
+ name: 'dataSource',
27
+ title: { label: '列表数据源', tip: 'dataSource | 列表数据源' },
28
+ propType: { type: 'arrayOf', value: 'any' },
29
+ setter: ['JsonSetter', 'VariableSetter'],
30
+ },
31
+ {
32
+ name: 'loading',
33
+ title: {
34
+ label: '是否加载中',
35
+ tip: 'loading | 当卡片内容还在加载中时,可以用 loading 展示一个占位',
36
+ },
37
+ propType: 'bool',
38
+ defaultValue: false,
39
+ setter: ['BoolSetter', 'VariableSetter'],
40
+ },
41
+ {
42
+ name: 'rowKey',
43
+ title: {
44
+ label: '行Key',
45
+ tip: 'rowKey | 当 renderItem 自定义渲染列表项有效时,自定义每一行的 key 的获取方式',
46
+ },
47
+ propType: {
48
+ type: 'oneOfType',
49
+ value: ['string', 'function'],
50
+ },
51
+ defaultValue: 'id',
52
+ setter: [
53
+ 'StringSetter',
54
+ {
55
+ componentName: 'FunctionSetter',
56
+ props: {
57
+ template:
58
+ 'rowKey(item,${extParams}){\n// 自定义每一行的 key\nreturn `key-${item.id}`;\n}',
59
+ },
60
+ },
61
+ 'VariableSetter',
62
+ ],
63
+ },
64
+ ],
65
+ },
66
+ {
67
+ title: '栅格 ',
68
+ display: 'block',
69
+ type: 'group',
70
+ items: [
71
+ {
72
+ name: 'columns',
73
+ title: { label: '列数', tip: 'columns | 列数' },
74
+ propType: 'number',
75
+ setter: 'NumberSetter',
76
+ defaultValue: 3,
77
+ },
78
+ {
79
+ name: 'horizontalGap',
80
+ title: { label: '水平间隔', tip: 'horizontalGap | 栅格水平间隔,单位为像素(px)' },
81
+ propType: 'number',
82
+ setter: {
83
+ componentName: 'NumberSetter', props: {
84
+ min: 0,
85
+ },
86
+ },
87
+ defaultValue: 10,
88
+ },
89
+ {
90
+ name: 'verticalGap',
91
+ title: { label: '垂直间隔', tip: 'verticalGap | 栅格垂直间隔,单位为像素(px)' },
92
+ propType: 'number',
93
+ setter: {
94
+ componentName: 'NumberSetter',
95
+ props: {
96
+ min: 0,
97
+ },
98
+ },
99
+ defaultValue: 10,
100
+ },
101
+ {
102
+ name: 'singleRow',
103
+ title: { label: '一行展示', tip: 'singleRow | 一行展示' },
104
+ propType: 'boolean',
105
+ defaultValue: false,
106
+ setter: 'BoolSetter',
107
+ },
108
+ ]
109
+ },
110
+ {
111
+ title: '扩展',
112
+ display: 'block',
113
+ type: 'group',
114
+ items: [
115
+ {
116
+ name: 'renderItem',
117
+ title: {
118
+ label: '渲染函数',
119
+ tip: 'renderItem | 当使用 dataSource 时,可以用 `renderItem` 自定义渲染列表项',
120
+ },
121
+ propType: 'func',
122
+ setter: [
123
+ {
124
+ componentName: 'SlotSetter',
125
+ title: '渲染函数插槽',
126
+ initialValue: {
127
+ type: 'JSSlot',
128
+ params: ['item'],
129
+ value: [
130
+ {
131
+ componentName: 'List.Item',
132
+ props: {},
133
+ children: {
134
+ componentName: 'Typography.Text',
135
+ props: {
136
+ children: {
137
+ type: 'JSExpression',
138
+ value: 'this.item.text',
139
+ },
140
+ },
141
+ },
142
+ },
143
+ ],
144
+ },
145
+ },
146
+ {
147
+ componentName: 'FunctionSetter',
148
+ props: {
149
+ template: 'renderItem(item,${extParams}){\n// 自定义渲染列表项\nreturn `item`;\n}',
150
+ },
151
+ },
152
+ 'VariableSetter',
153
+ ],
154
+ },
155
+ ],
156
+ },
157
+ ],
158
+ configure: {
159
+ supports: {
160
+ style: true,
161
+ events: [],
162
+ },
163
+ component: {
164
+ isContainer: true,
165
+ },
166
+ },
167
+ };
@@ -0,0 +1,54 @@
1
+ export default [
2
+ {
3
+ title: '栅格视图',
4
+ schema: {
5
+ componentName: 'PisellViewGrid',
6
+ props: {
7
+ dataSource: [
8
+ {
9
+ id: 1,
10
+ text: "Racing car sprays burning fuel into crowd.",
11
+ },
12
+ {
13
+ id: 2,
14
+ text: "Japanese princess to wed commoner.",
15
+ },
16
+ {
17
+ id: 3,
18
+ text: "Australian walks 100km after outback crash.",
19
+ },
20
+ {
21
+ id: 4,
22
+ text: "Man charged over missing wedding girl.",
23
+ },
24
+ {
25
+ id: 5,
26
+ text: "Los Angeles battles huge wildfires.",
27
+ },
28
+ ],
29
+ columns: 3,
30
+ horizontalGap: 10,
31
+ verticalGap: 10,
32
+ renderItem: {
33
+ type: "JSSlot",
34
+ params: ["item"],
35
+ value: [
36
+ {
37
+ componentName: "List.Item",
38
+ props: {},
39
+ children: {
40
+ componentName: "Typography.Text",
41
+ props: {
42
+ children: {
43
+ type: "JSExpression",
44
+ value: "this.item.text",
45
+ },
46
+ },
47
+ },
48
+ },
49
+ ],
50
+ },
51
+ },
52
+ },
53
+ },
54
+ ];
@@ -0,0 +1,66 @@
1
+ import snippets from "./snippe";
2
+
3
+ export default {
4
+ snippets,
5
+ componentName: "SectionFooters",
6
+ title: "底部内容区块",
7
+ category: "通用",
8
+ docUrl: "",
9
+ screenshot: "",
10
+ devMode: "proCode",
11
+ npm: {
12
+ package: "@pisell/materials",
13
+ version: "1.0.1",
14
+ exportName: "SectionFooters",
15
+ main: "src/index.tsx",
16
+ destructuring: true,
17
+ subName: "",
18
+ },
19
+ props: [
20
+ {
21
+ name: 'left',
22
+ title: { label: '左边插槽', tip: '左边插槽' },
23
+ propType: 'node',
24
+ setter: {
25
+ componentName: 'SlotSetter',
26
+ initialValue: {
27
+ type: 'JSSlot',
28
+ value: [],
29
+ },
30
+ },
31
+ }, {
32
+ name: 'middle',
33
+ title: { label: '中间插槽', tip: '中间插槽' },
34
+ propType: 'node',
35
+ setter: {
36
+ componentName: 'SlotSetter',
37
+ initialValue: {
38
+ type: 'JSSlot',
39
+ value: [],
40
+ },
41
+ },
42
+ }, {
43
+ name: 'right',
44
+ title: { label: '右边插槽', tip: '右边插槽' },
45
+ propType: 'node',
46
+ setter: {
47
+ componentName: 'SlotSetter',
48
+ initialValue: {
49
+ type: 'JSSlot',
50
+ value: [],
51
+ },
52
+ },
53
+ }],
54
+
55
+ supports: {
56
+ style: true,
57
+ events: [
58
+ {
59
+ name: 'onChange',
60
+ template:
61
+ "onChange(event,${extParams}){\n// 选项变化时的回调函数\nconsole.log('onChange',event);}",
62
+ },
63
+ ]
64
+ },
65
+ "component": {}
66
+ }
@@ -0,0 +1,21 @@
1
+ export default [
2
+ {
3
+ title: '底部内容区块',
4
+ schema: {
5
+ componentName: 'SectionFooters',
6
+ props: {
7
+ left: {
8
+ type: "JSSlot",
9
+ value: [],
10
+ },
11
+ middle: {
12
+ type: "JSSlot",
13
+ value: [],
14
+ },
15
+ right: {
16
+ type: "JSSlot",
17
+ value: [],
18
+ }
19
+ }
20
+ }
21
+ }]