mall-components 1.0.0

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 (122) hide show
  1. package/README.md +128 -0
  2. package/build/_components-raw.css +791 -0
  3. package/build/_shims/antd.js +1 -0
  4. package/build/_shims/icons.js +1 -0
  5. package/build/_shims/moment.js +1 -0
  6. package/build/_shims/react-dom.js +1 -0
  7. package/build/_shims/react.js +1 -0
  8. package/build/adapters/DataSourceAdapter.d.ts +46 -0
  9. package/build/components/AdminLayout/AdminLayout.d.ts +5 -0
  10. package/build/components/AdminLayout/Breadcrumb.d.ts +8 -0
  11. package/build/components/AdminLayout/MainContent.d.ts +17 -0
  12. package/build/components/AdminLayout/Navbar.d.ts +10 -0
  13. package/build/components/AdminLayout/Sidebar.d.ts +14 -0
  14. package/build/components/AdminLayout/TabBar.d.ts +13 -0
  15. package/build/components/AdminLayout/TabPane.d.ts +4 -0
  16. package/build/components/AdminLayout/index.d.ts +3 -0
  17. package/build/components/AdminLayout/types.d.ts +42 -0
  18. package/build/components/CouponCard/CouponCard.d.ts +20 -0
  19. package/build/components/CouponCard/index.d.ts +1 -0
  20. package/build/components/OrderForm/OrderForm.d.ts +18 -0
  21. package/build/components/OrderForm/index.d.ts +1 -0
  22. package/build/components/OrderList/OrderList.d.ts +29 -0
  23. package/build/components/OrderList/index.d.ts +1 -0
  24. package/build/components/ProductForm/ProductForm.d.ts +18 -0
  25. package/build/components/ProductForm/index.d.ts +3 -0
  26. package/build/components/ProductList/ProductList.d.ts +47 -0
  27. package/build/components/ProductList/index.d.ts +3 -0
  28. package/build/components/PromotionCard/PromotionCard.d.ts +22 -0
  29. package/build/components/PromotionCard/index.d.ts +1 -0
  30. package/build/components/RoleCard/RoleCard.d.ts +18 -0
  31. package/build/components/RoleCard/index.d.ts +1 -0
  32. package/build/components/UserCard/UserCard.d.ts +17 -0
  33. package/build/components/UserCard/index.d.ts +1 -0
  34. package/build/entry-meta.d.ts +603 -0
  35. package/build/index.css +1 -0
  36. package/build/index.js +1 -0
  37. package/build/mall-components-meta.js +2563 -0
  38. package/build/mall-components.cdn.umd.css +1 -0
  39. package/build/mall-components.cdn.umd.js +8 -0
  40. package/build/mall-components.codesandbox.combined.js +1094 -0
  41. package/build/mall-components.codesandbox.css +401 -0
  42. package/build/mall-components.codesandbox.js +1080 -0
  43. package/build/mall-components.umd.css +1 -0
  44. package/build/mall-components.umd.js +8 -0
  45. package/build/meta/adminLayoutMeta.d.ts +3 -0
  46. package/build/meta/couponCardMeta.d.ts +128 -0
  47. package/build/meta/icons.d.ts +10 -0
  48. package/build/meta/orderFormMeta.d.ts +111 -0
  49. package/build/meta/orderListMeta.d.ts +170 -0
  50. package/build/meta/productFormMeta.d.ts +3 -0
  51. package/build/meta/productListMeta.d.ts +200 -0
  52. package/build/meta/promotionCardMeta.d.ts +129 -0
  53. package/build/meta/roleCardMeta.d.ts +3 -0
  54. package/build/meta/tabPaneMeta.d.ts +3 -0
  55. package/build/meta/userCardMeta.d.ts +3 -0
  56. package/build/meta.d.ts +605 -0
  57. package/build/setters/RestApiTester.d.ts +11 -0
  58. package/build/types/common.d.ts +17 -0
  59. package/build/types/marketing.d.ts +128 -0
  60. package/build/types/order.d.ts +174 -0
  61. package/build/types/permission.d.ts +101 -0
  62. package/build/types/product.d.ts +47 -0
  63. package/package.json +1 -0
  64. package/src/adapters/DataSourceAdapter.ts +445 -0
  65. package/src/components/AdminLayout/AdminLayout.scss +447 -0
  66. package/src/components/AdminLayout/AdminLayout.tsx +681 -0
  67. package/src/components/AdminLayout/Breadcrumb.tsx +60 -0
  68. package/src/components/AdminLayout/MainContent.tsx +54 -0
  69. package/src/components/AdminLayout/Navbar.tsx +76 -0
  70. package/src/components/AdminLayout/Sidebar.tsx +256 -0
  71. package/src/components/AdminLayout/TabBar.tsx +177 -0
  72. package/src/components/AdminLayout/TabPane.tsx +29 -0
  73. package/src/components/AdminLayout/index.ts +3 -0
  74. package/src/components/AdminLayout/types.ts +46 -0
  75. package/src/components/CouponCard/CouponCard.scss +55 -0
  76. package/src/components/CouponCard/CouponCard.tsx +687 -0
  77. package/src/components/CouponCard/index.ts +1 -0
  78. package/src/components/OrderForm/OrderForm.scss +148 -0
  79. package/src/components/OrderForm/OrderForm.tsx +503 -0
  80. package/src/components/OrderForm/index.ts +1 -0
  81. package/src/components/OrderList/OrderList.scss +160 -0
  82. package/src/components/OrderList/OrderList.tsx +885 -0
  83. package/src/components/OrderList/index.ts +1 -0
  84. package/src/components/ProductForm/ProductForm.scss +23 -0
  85. package/src/components/ProductForm/ProductForm.tsx +442 -0
  86. package/src/components/ProductForm/index.ts +3 -0
  87. package/src/components/ProductList/ProductList.scss +293 -0
  88. package/src/components/ProductList/ProductList.tsx +454 -0
  89. package/src/components/ProductList/index.ts +3 -0
  90. package/src/components/PromotionCard/PromotionCard.scss +71 -0
  91. package/src/components/PromotionCard/PromotionCard.tsx +579 -0
  92. package/src/components/PromotionCard/index.ts +1 -0
  93. package/src/components/RoleCard/RoleCard.scss +77 -0
  94. package/src/components/RoleCard/RoleCard.tsx +463 -0
  95. package/src/components/RoleCard/index.ts +1 -0
  96. package/src/components/UserCard/UserCard.scss +51 -0
  97. package/src/components/UserCard/UserCard.tsx +432 -0
  98. package/src/components/UserCard/index.ts +1 -0
  99. package/src/entry-components.ts +39 -0
  100. package/src/entry-meta.ts +23 -0
  101. package/src/index.scss +4 -0
  102. package/src/index.ts +36 -0
  103. package/src/index.tsx +17 -0
  104. package/src/meta/adminLayoutMeta.ts +154 -0
  105. package/src/meta/couponCardMeta.ts +287 -0
  106. package/src/meta/icons.ts +41 -0
  107. package/src/meta/orderFormMeta.ts +279 -0
  108. package/src/meta/orderListMeta.ts +443 -0
  109. package/src/meta/productFormMeta.ts +253 -0
  110. package/src/meta/productListMeta.ts +434 -0
  111. package/src/meta/promotionCardMeta.ts +276 -0
  112. package/src/meta/roleCardMeta.ts +142 -0
  113. package/src/meta/tabPaneMeta.ts +69 -0
  114. package/src/meta/userCardMeta.ts +128 -0
  115. package/src/meta.ts +25 -0
  116. package/src/setters/RestApiTester.tsx +219 -0
  117. package/src/shims/require.js +8 -0
  118. package/src/types/common.ts +19 -0
  119. package/src/types/marketing.ts +124 -0
  120. package/src/types/order.ts +169 -0
  121. package/src/types/permission.ts +102 -0
  122. package/src/types/product.ts +49 -0
@@ -0,0 +1,279 @@
1
+ import { Icons } from './icons'
2
+
3
+ const defaultInitialValues = {
4
+ id: 1,
5
+ orderSn: '202401010001',
6
+ memberUsername: 'user001',
7
+ totalAmount: 599.00,
8
+ payAmount: 569.00,
9
+ freightAmount: 0,
10
+ discountAmount: 30.00,
11
+ payType: 1,
12
+ sourceType: 0,
13
+ status: 1,
14
+ orderType: 0,
15
+ receiverName: '张三',
16
+ receiverPhone: '13800138000',
17
+ receiverProvince: '北京市',
18
+ receiverCity: '北京市',
19
+ receiverRegion: '朝阳区',
20
+ receiverDetailAddress: '某某街道某某小区1号楼',
21
+ note: '请尽快发货',
22
+ }
23
+
24
+ const orderFormMeta = {
25
+ componentName: 'OrderForm',
26
+ title: '订单表单',
27
+ docUrl: 'https://github.com/alibaba/lowcode-engine',
28
+ screenshot: '',
29
+ npm: {
30
+ package: 'mall-components',
31
+ version: '1.0.0',
32
+ exportName: 'OrderForm',
33
+ destructuring: true,
34
+ },
35
+ props: [
36
+ {
37
+ name: 'initialValues',
38
+ propType: 'string',
39
+ description: '表单初始值(JSON 格式)',
40
+ defaultValue: '{}',
41
+ },
42
+ {
43
+ name: 'mode',
44
+ propType: 'string',
45
+ description: '表单模式',
46
+ defaultValue: 'create',
47
+ setter: {
48
+ componentName: 'SelectSetter',
49
+ props: {
50
+ options: [
51
+ { label: '创建模式', value: 'create' },
52
+ { label: '编辑模式', value: 'edit' },
53
+ { label: '查看模式', value: 'view' },
54
+ ],
55
+ },
56
+ },
57
+ },
58
+ {
59
+ name: 'showBasicInfo',
60
+ propType: 'bool',
61
+ description: '是否显示基本信息',
62
+ defaultValue: true,
63
+ setter: 'BoolSetter',
64
+ },
65
+ {
66
+ name: 'showReceiverInfo',
67
+ propType: 'bool',
68
+ description: '是否显示收货信息',
69
+ defaultValue: true,
70
+ setter: 'BoolSetter',
71
+ },
72
+ {
73
+ name: 'showMoneyInfo',
74
+ propType: 'bool',
75
+ description: '是否显示费用信息',
76
+ defaultValue: true,
77
+ setter: 'BoolSetter',
78
+ },
79
+ {
80
+ name: 'showOrderItems',
81
+ propType: 'bool',
82
+ description: '是否显示商品信息',
83
+ defaultValue: true,
84
+ setter: 'BoolSetter',
85
+ },
86
+ {
87
+ name: 'showStatusInfo',
88
+ propType: 'bool',
89
+ description: '是否显示状态信息',
90
+ defaultValue: true,
91
+ setter: 'BoolSetter',
92
+ },
93
+ ],
94
+ configure: {
95
+ supports: {
96
+ style: true,
97
+ events: [
98
+ { name: 'onSubmit', description: '提交' },
99
+ { name: 'onCancel', description: '取消' },
100
+ ],
101
+ },
102
+ props: [
103
+ {
104
+ type: 'group',
105
+ title: '表单配置',
106
+ display: 'accordion',
107
+ items: [
108
+ {
109
+ name: 'mode',
110
+ title: '表单模式',
111
+ setter: {
112
+ componentName: 'SelectSetter',
113
+ props: {
114
+ options: [
115
+ { label: '创建模式', value: 'create' },
116
+ { label: '编辑模式', value: 'edit' },
117
+ { label: '查看模式', value: 'view' },
118
+ ],
119
+ },
120
+ },
121
+ },
122
+ {
123
+ name: 'initialValues',
124
+ title: '表单初始值',
125
+ setter: {
126
+ componentName: 'TextAreaSetter',
127
+ props: {
128
+ rows: 10,
129
+ placeholder: '请输入 JSON 格式的表单初始值',
130
+ },
131
+ },
132
+ extraProps: {
133
+ display: 'block',
134
+ },
135
+ },
136
+ ],
137
+ },
138
+ {
139
+ type: 'group',
140
+ title: '标签页显示控制',
141
+ display: 'accordion',
142
+ items: [
143
+ { name: 'showBasicInfo', title: '显示基本信息', setter: 'BoolSetter' },
144
+ { name: 'showReceiverInfo', title: '显示收货信息', setter: 'BoolSetter' },
145
+ { name: 'showMoneyInfo', title: '显示费用信息', setter: 'BoolSetter' },
146
+ { name: 'showOrderItems', title: '显示商品信息', setter: 'BoolSetter' },
147
+ { name: 'showStatusInfo', title: '显示状态信息', setter: 'BoolSetter' },
148
+ ],
149
+ },
150
+ ],
151
+ },
152
+ icon: Icons.form,
153
+ category: '电商业务',
154
+ group: '订单管理',
155
+ snippets: [
156
+ {
157
+ title: '创建订单表单',
158
+ schema: {
159
+ componentName: 'OrderForm',
160
+ props: {
161
+ mode: 'create',
162
+ initialValues: '{}',
163
+ showBasicInfo: true,
164
+ showReceiverInfo: true,
165
+ showMoneyInfo: true,
166
+ showOrderItems: true,
167
+ showStatusInfo: true,
168
+ },
169
+ },
170
+ },
171
+ {
172
+ title: '编辑订单表单',
173
+ schema: {
174
+ componentName: 'OrderForm',
175
+ props: {
176
+ mode: 'edit',
177
+ initialValues: JSON.stringify(defaultInitialValues, null, 2),
178
+ showBasicInfo: true,
179
+ showReceiverInfo: true,
180
+ showMoneyInfo: true,
181
+ showOrderItems: true,
182
+ showStatusInfo: true,
183
+ },
184
+ },
185
+ },
186
+ {
187
+ title: '查看订单表单',
188
+ schema: {
189
+ componentName: 'OrderForm',
190
+ props: {
191
+ mode: 'view',
192
+ initialValues: JSON.stringify(
193
+ {
194
+ ...defaultInitialValues,
195
+ orderItemList: [
196
+ {
197
+ id: 1,
198
+ productName: '时尚运动鞋',
199
+ productSn: 'PRODUCT001',
200
+ productBrand: '时尚运动',
201
+ productPrice: 299,
202
+ productQuantity: 2,
203
+ productPic: 'https://img.yzcdn.cn/vant/cat.jpeg',
204
+ },
205
+ ],
206
+ },
207
+ null,
208
+ 2
209
+ ),
210
+ showBasicInfo: true,
211
+ showReceiverInfo: true,
212
+ showMoneyInfo: true,
213
+ showOrderItems: true,
214
+ showStatusInfo: true,
215
+ },
216
+ },
217
+ },
218
+ {
219
+ title: '只读订单表单',
220
+ schema: {
221
+ componentName: 'OrderForm',
222
+ props: {
223
+ mode: 'view',
224
+ initialValues: JSON.stringify(
225
+ {
226
+ ...defaultInitialValues,
227
+ status: 2,
228
+ deliveryTime: '2024-01-02 09:00:00',
229
+ orderItemList: [
230
+ {
231
+ id: 1,
232
+ productName: '时尚运动鞋',
233
+ productSn: 'PRODUCT001',
234
+ productBrand: '时尚运动',
235
+ productPrice: 299,
236
+ productQuantity: 2,
237
+ productPic: 'https://img.yzcdn.cn/vant/cat.jpeg',
238
+ },
239
+ {
240
+ id: 2,
241
+ productName: '休闲T恤',
242
+ productSn: 'PRODUCT002',
243
+ productBrand: '休闲服饰',
244
+ productPrice: 99,
245
+ productQuantity: 1,
246
+ productPic: 'https://img.yzcdn.cn/vant/cat.jpeg',
247
+ },
248
+ ],
249
+ },
250
+ null,
251
+ 2
252
+ ),
253
+ showBasicInfo: true,
254
+ showReceiverInfo: true,
255
+ showMoneyInfo: true,
256
+ showOrderItems: true,
257
+ showStatusInfo: true,
258
+ },
259
+ },
260
+ },
261
+ {
262
+ title: '简洁订单表单',
263
+ schema: {
264
+ componentName: 'OrderForm',
265
+ props: {
266
+ mode: 'create',
267
+ initialValues: '{}',
268
+ showBasicInfo: true,
269
+ showReceiverInfo: true,
270
+ showMoneyInfo: false,
271
+ showOrderItems: false,
272
+ showStatusInfo: false,
273
+ },
274
+ },
275
+ },
276
+ ],
277
+ }
278
+
279
+ export default orderFormMeta
@@ -0,0 +1,443 @@
1
+ import { Icons } from './icons'
2
+
3
+ const defaultMockData = {
4
+ code: 200,
5
+ message: 'success',
6
+ data: {
7
+ pageNum: 1,
8
+ pageSize: 10,
9
+ total: 50,
10
+ list: [
11
+ {
12
+ id: 1,
13
+ orderSn: '202401010001',
14
+ memberUsername: 'user001',
15
+ totalAmount: 599.00,
16
+ payAmount: 569.00,
17
+ freightAmount: 0,
18
+ discountAmount: 30.00,
19
+ payType: 1,
20
+ sourceType: 0,
21
+ status: 1,
22
+ orderType: 0,
23
+ receiverName: '张三',
24
+ receiverPhone: '13800138000',
25
+ receiverProvince: '北京市',
26
+ receiverCity: '北京市',
27
+ receiverRegion: '朝阳区',
28
+ receiverDetailAddress: '某某街道某某小区1号楼',
29
+ createTime: '2024-01-01 10:00:00',
30
+ paymentTime: '2024-01-01 10:05:00',
31
+ deliveryTime: '',
32
+ receiveTime: '',
33
+ commentTime: '',
34
+ promotionInfo: '满减优惠',
35
+ },
36
+ {
37
+ id: 2,
38
+ orderSn: '202401010002',
39
+ memberUsername: 'user002',
40
+ totalAmount: 1299.00,
41
+ payAmount: 1299.00,
42
+ freightAmount: 0,
43
+ discountAmount: 0,
44
+ payType: 2,
45
+ sourceType: 1,
46
+ status: 2,
47
+ orderType: 0,
48
+ receiverName: '李四',
49
+ receiverPhone: '13900139000',
50
+ receiverProvince: '上海市',
51
+ receiverCity: '上海市',
52
+ receiverRegion: '浦东新区',
53
+ receiverDetailAddress: '某某路某某号',
54
+ createTime: '2024-01-01 11:00:00',
55
+ paymentTime: '2024-01-01 11:10:00',
56
+ deliveryTime: '2024-01-02 09:00:00',
57
+ receiveTime: '',
58
+ commentTime: '',
59
+ promotionInfo: '',
60
+ },
61
+ {
62
+ id: 3,
63
+ orderSn: '202401010003',
64
+ memberUsername: 'user003',
65
+ totalAmount: 299.00,
66
+ payAmount: 299.00,
67
+ freightAmount: 10.00,
68
+ discountAmount: 0,
69
+ payType: 1,
70
+ sourceType: 0,
71
+ status: 3,
72
+ orderType: 0,
73
+ receiverName: '王五',
74
+ receiverPhone: '13700137000',
75
+ receiverProvince: '广东省',
76
+ receiverCity: '深圳市',
77
+ receiverRegion: '南山区',
78
+ receiverDetailAddress: '某某大厦A座',
79
+ createTime: '2024-01-01 12:00:00',
80
+ paymentTime: '2024-01-01 12:05:00',
81
+ deliveryTime: '2024-01-02 10:00:00',
82
+ receiveTime: '2024-01-05 15:00:00',
83
+ commentTime: '',
84
+ promotionInfo: '',
85
+ },
86
+ {
87
+ id: 4,
88
+ orderSn: '202401010004',
89
+ memberUsername: 'user004',
90
+ totalAmount: 899.00,
91
+ payAmount: 0,
92
+ freightAmount: 0,
93
+ discountAmount: 0,
94
+ payType: 0,
95
+ sourceType: 1,
96
+ status: 0,
97
+ orderType: 1,
98
+ receiverName: '赵六',
99
+ receiverPhone: '13600136000',
100
+ receiverProvince: '浙江省',
101
+ receiverCity: '杭州市',
102
+ receiverRegion: '西湖区',
103
+ receiverDetailAddress: '某某花园小区',
104
+ createTime: '2024-01-01 13:00:00',
105
+ paymentTime: '',
106
+ deliveryTime: '',
107
+ receiveTime: '',
108
+ commentTime: '',
109
+ promotionInfo: '秒杀活动',
110
+ },
111
+ {
112
+ id: 5,
113
+ orderSn: '202401010005',
114
+ memberUsername: 'user005',
115
+ totalAmount: 4599.00,
116
+ payAmount: 4599.00,
117
+ freightAmount: 0,
118
+ discountAmount: 0,
119
+ payType: 2,
120
+ sourceType: 0,
121
+ status: 4,
122
+ orderType: 0,
123
+ receiverName: '孙七',
124
+ receiverPhone: '13500135000',
125
+ receiverProvince: '江苏省',
126
+ receiverCity: '南京市',
127
+ receiverRegion: '鼓楼区',
128
+ receiverDetailAddress: '某某广场B座',
129
+ createTime: '2024-01-01 14:00:00',
130
+ paymentTime: '2024-01-01 14:10:00',
131
+ deliveryTime: '',
132
+ receiveTime: '',
133
+ commentTime: '',
134
+ promotionInfo: '',
135
+ },
136
+ ],
137
+ },
138
+ }
139
+
140
+ const orderListMeta = {
141
+ componentName: 'OrderList',
142
+ title: '订单列表',
143
+ docUrl: 'https://github.com/alibaba/lowcode-engine',
144
+ screenshot: '',
145
+ npm: {
146
+ package: 'mall-components',
147
+ version: '1.0.0',
148
+ exportName: 'OrderList',
149
+ destructuring: true,
150
+ },
151
+ props: [
152
+ {
153
+ name: 'dataSourceType',
154
+ propType: 'string',
155
+ description: '数据源类型',
156
+ defaultValue: 'mock',
157
+ },
158
+ {
159
+ name: 'api',
160
+ propType: 'string',
161
+ description: 'API 地址',
162
+ },
163
+ {
164
+ name: 'method',
165
+ propType: 'string',
166
+ description: '请求方法',
167
+ defaultValue: 'GET',
168
+ },
169
+ {
170
+ name: 'mockData',
171
+ propType: 'string',
172
+ description: 'Mock 数据',
173
+ defaultValue: JSON.stringify(defaultMockData),
174
+ },
175
+ {
176
+ name: 'variableName',
177
+ propType: 'string',
178
+ description: '变量名称',
179
+ },
180
+ {
181
+ name: 'showFilter',
182
+ propType: 'bool',
183
+ description: '是否显示筛选搜索区域',
184
+ defaultValue: true,
185
+ },
186
+ {
187
+ name: 'showStatusFilter',
188
+ propType: 'bool',
189
+ description: '是否显示状态筛选',
190
+ defaultValue: true,
191
+ },
192
+ {
193
+ name: 'showSearch',
194
+ propType: 'bool',
195
+ description: '是否显示搜索框',
196
+ defaultValue: true,
197
+ },
198
+ {
199
+ name: 'showDatePicker',
200
+ propType: 'bool',
201
+ description: '是否显示日期选择器',
202
+ defaultValue: true,
203
+ },
204
+ {
205
+ name: 'showActions',
206
+ propType: 'bool',
207
+ description: '是否显示操作按钮',
208
+ defaultValue: true,
209
+ },
210
+ {
211
+ name: 'showBatchOperations',
212
+ propType: 'bool',
213
+ description: '是否显示批量操作',
214
+ defaultValue: true,
215
+ },
216
+ {
217
+ name: 'showExport',
218
+ propType: 'bool',
219
+ description: '是否显示导出按钮',
220
+ defaultValue: true,
221
+ },
222
+ {
223
+ name: 'showPagination',
224
+ propType: 'bool',
225
+ description: '是否显示分页区域',
226
+ defaultValue: true,
227
+ },
228
+ {
229
+ name: 'defaultPageSize',
230
+ propType: 'number',
231
+ description: '默认每页条数',
232
+ defaultValue: 10,
233
+ },
234
+ ],
235
+ configure: {
236
+ supports: {
237
+ style: true,
238
+ events: [
239
+ { name: 'onRowClick', description: '行点击' },
240
+ { name: 'onSearch', description: '搜索' },
241
+ { name: 'onPageChange', description: '分页变化' },
242
+ { name: 'onActionClick', description: '操作按钮点击' },
243
+ { name: 'onBatchOperation', description: '批量操作' },
244
+ ],
245
+ },
246
+ props: [
247
+ {
248
+ type: 'group',
249
+ title: '数据源配置',
250
+ display: 'accordion',
251
+ items: [
252
+ {
253
+ name: 'dataSourceType',
254
+ title: '数据源类型',
255
+ setter: {
256
+ componentName: 'SelectSetter',
257
+ props: {
258
+ options: [
259
+ { label: 'Mock 数据', value: 'mock' },
260
+ { label: '数据源绑定', value: 'variable' },
261
+ ],
262
+ },
263
+ },
264
+ extraProps: {
265
+ display: 'block',
266
+ },
267
+ },
268
+ {
269
+ name: 'mockData',
270
+ title: 'Mock 数据',
271
+ setter: {
272
+ componentName: 'TextAreaSetter',
273
+ props: {
274
+ rows: 10,
275
+ placeholder: '请输入 JSON 格式的 Mock 数据',
276
+ },
277
+ },
278
+ extraProps: {
279
+ display: 'block',
280
+ },
281
+ condition: (target: any) => {
282
+ return target.getProps().getPropValue('dataSourceType') === 'mock'
283
+ },
284
+ },
285
+ {
286
+ name: 'dataSource',
287
+ title: '绑定数据源',
288
+ setter: {
289
+ componentName: 'MixedSetter',
290
+ props: {
291
+ setters: [
292
+ 'JsonSetter',
293
+ 'VariableSetter',
294
+ ],
295
+ },
296
+ },
297
+ extraProps: {
298
+ display: 'block',
299
+ },
300
+ condition: (target: any) => {
301
+ return target.getProps().getPropValue('dataSourceType') === 'variable'
302
+ },
303
+ },
304
+ ],
305
+ },
306
+ {
307
+ type: 'group',
308
+ title: '区域显示控制',
309
+ display: 'accordion',
310
+ items: [
311
+ { name: 'showFilter', title: '显示筛选区域', setter: 'BoolSetter', extraProps: { display: 'block' } },
312
+ { name: 'showStatusFilter', title: '显示状态筛选', setter: 'BoolSetter', extraProps: { display: 'block' } },
313
+ { name: 'showSearch', title: '显示搜索框', setter: 'BoolSetter', extraProps: { display: 'block' } },
314
+ { name: 'showDatePicker', title: '显示日期选择', setter: 'BoolSetter', extraProps: { display: 'block' } },
315
+ { name: 'showActions', title: '显示操作按钮', setter: 'BoolSetter', extraProps: { display: 'block' } },
316
+ { name: 'showBatchOperations', title: '显示批量操作', setter: 'BoolSetter', extraProps: { display: 'block' } },
317
+ { name: 'showExport', title: '显示导出按钮', setter: 'BoolSetter', extraProps: { display: 'block' } },
318
+ { name: 'showPagination', title: '显示分页', setter: 'BoolSetter', extraProps: { display: 'block' } },
319
+ ],
320
+ },
321
+ {
322
+ type: 'group',
323
+ title: '分页配置',
324
+ display: 'accordion',
325
+ items: [
326
+ {
327
+ name: 'defaultPageSize',
328
+ title: '默认每页条数',
329
+ setter: {
330
+ componentName: 'NumberSetter',
331
+ props: {
332
+ min: 1,
333
+ max: 100,
334
+ },
335
+ },
336
+ extraProps: {
337
+ display: 'block',
338
+ },
339
+ },
340
+ ],
341
+ },
342
+ ],
343
+ },
344
+ icon: Icons.file,
345
+ category: '电商业务',
346
+ group: '订单管理',
347
+ snippets: [
348
+ {
349
+ title: '完整订单列表',
350
+ schema: {
351
+ componentName: 'OrderList',
352
+ props: {
353
+ dataSourceType: 'mock',
354
+ mockData: JSON.stringify(defaultMockData),
355
+ showFilter: true,
356
+ showStatusFilter: true,
357
+ showSearch: true,
358
+ showDatePicker: true,
359
+ showActions: true,
360
+ showBatchOperations: true,
361
+ showExport: true,
362
+ showPagination: true,
363
+ defaultPageSize: 10,
364
+ },
365
+ },
366
+ },
367
+ {
368
+ title: '简洁订单列表',
369
+ schema: {
370
+ componentName: 'OrderList',
371
+ props: {
372
+ dataSourceType: 'mock',
373
+ mockData: JSON.stringify(defaultMockData),
374
+ showFilter: false,
375
+ showActions: false,
376
+ showBatchOperations: false,
377
+ showExport: false,
378
+ showPagination: true,
379
+ defaultPageSize: 10,
380
+ },
381
+ },
382
+ },
383
+ {
384
+ title: '只读订单列表',
385
+ schema: {
386
+ componentName: 'OrderList',
387
+ props: {
388
+ dataSourceType: 'mock',
389
+ mockData: JSON.stringify(defaultMockData),
390
+ showFilter: true,
391
+ showStatusFilter: true,
392
+ showSearch: true,
393
+ showDatePicker: true,
394
+ showActions: false,
395
+ showBatchOperations: false,
396
+ showExport: false,
397
+ showPagination: true,
398
+ defaultPageSize: 10,
399
+ },
400
+ },
401
+ },
402
+ {
403
+ title: '纯搜索订单列表',
404
+ schema: {
405
+ componentName: 'OrderList',
406
+ props: {
407
+ dataSourceType: 'mock',
408
+ mockData: JSON.stringify(defaultMockData),
409
+ showFilter: true,
410
+ showStatusFilter: false,
411
+ showSearch: true,
412
+ showDatePicker: false,
413
+ showActions: false,
414
+ showBatchOperations: false,
415
+ showExport: false,
416
+ showPagination: true,
417
+ defaultPageSize: 10,
418
+ },
419
+ },
420
+ },
421
+ {
422
+ title: '待发货订单列表',
423
+ schema: {
424
+ componentName: 'OrderList',
425
+ props: {
426
+ dataSourceType: 'mock',
427
+ mockData: JSON.stringify(defaultMockData),
428
+ showFilter: true,
429
+ showStatusFilter: true,
430
+ showSearch: true,
431
+ showDatePicker: true,
432
+ showActions: true,
433
+ showBatchOperations: true,
434
+ showExport: false,
435
+ showPagination: true,
436
+ defaultPageSize: 10,
437
+ },
438
+ },
439
+ },
440
+ ],
441
+ }
442
+
443
+ export default orderListMeta