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.
- package/README.md +128 -0
- package/build/_components-raw.css +791 -0
- package/build/_shims/antd.js +1 -0
- package/build/_shims/icons.js +1 -0
- package/build/_shims/moment.js +1 -0
- package/build/_shims/react-dom.js +1 -0
- package/build/_shims/react.js +1 -0
- package/build/adapters/DataSourceAdapter.d.ts +46 -0
- package/build/components/AdminLayout/AdminLayout.d.ts +5 -0
- package/build/components/AdminLayout/Breadcrumb.d.ts +8 -0
- package/build/components/AdminLayout/MainContent.d.ts +17 -0
- package/build/components/AdminLayout/Navbar.d.ts +10 -0
- package/build/components/AdminLayout/Sidebar.d.ts +14 -0
- package/build/components/AdminLayout/TabBar.d.ts +13 -0
- package/build/components/AdminLayout/TabPane.d.ts +4 -0
- package/build/components/AdminLayout/index.d.ts +3 -0
- package/build/components/AdminLayout/types.d.ts +42 -0
- package/build/components/CouponCard/CouponCard.d.ts +20 -0
- package/build/components/CouponCard/index.d.ts +1 -0
- package/build/components/OrderForm/OrderForm.d.ts +18 -0
- package/build/components/OrderForm/index.d.ts +1 -0
- package/build/components/OrderList/OrderList.d.ts +29 -0
- package/build/components/OrderList/index.d.ts +1 -0
- package/build/components/ProductForm/ProductForm.d.ts +18 -0
- package/build/components/ProductForm/index.d.ts +3 -0
- package/build/components/ProductList/ProductList.d.ts +47 -0
- package/build/components/ProductList/index.d.ts +3 -0
- package/build/components/PromotionCard/PromotionCard.d.ts +22 -0
- package/build/components/PromotionCard/index.d.ts +1 -0
- package/build/components/RoleCard/RoleCard.d.ts +18 -0
- package/build/components/RoleCard/index.d.ts +1 -0
- package/build/components/UserCard/UserCard.d.ts +17 -0
- package/build/components/UserCard/index.d.ts +1 -0
- package/build/entry-meta.d.ts +603 -0
- package/build/index.css +1 -0
- package/build/index.js +1 -0
- package/build/mall-components-meta.js +2563 -0
- package/build/mall-components.cdn.umd.css +1 -0
- package/build/mall-components.cdn.umd.js +8 -0
- package/build/mall-components.codesandbox.combined.js +1094 -0
- package/build/mall-components.codesandbox.css +401 -0
- package/build/mall-components.codesandbox.js +1080 -0
- package/build/mall-components.umd.css +1 -0
- package/build/mall-components.umd.js +8 -0
- package/build/meta/adminLayoutMeta.d.ts +3 -0
- package/build/meta/couponCardMeta.d.ts +128 -0
- package/build/meta/icons.d.ts +10 -0
- package/build/meta/orderFormMeta.d.ts +111 -0
- package/build/meta/orderListMeta.d.ts +170 -0
- package/build/meta/productFormMeta.d.ts +3 -0
- package/build/meta/productListMeta.d.ts +200 -0
- package/build/meta/promotionCardMeta.d.ts +129 -0
- package/build/meta/roleCardMeta.d.ts +3 -0
- package/build/meta/tabPaneMeta.d.ts +3 -0
- package/build/meta/userCardMeta.d.ts +3 -0
- package/build/meta.d.ts +605 -0
- package/build/setters/RestApiTester.d.ts +11 -0
- package/build/types/common.d.ts +17 -0
- package/build/types/marketing.d.ts +128 -0
- package/build/types/order.d.ts +174 -0
- package/build/types/permission.d.ts +101 -0
- package/build/types/product.d.ts +47 -0
- package/package.json +1 -0
- package/src/adapters/DataSourceAdapter.ts +445 -0
- package/src/components/AdminLayout/AdminLayout.scss +447 -0
- package/src/components/AdminLayout/AdminLayout.tsx +681 -0
- package/src/components/AdminLayout/Breadcrumb.tsx +60 -0
- package/src/components/AdminLayout/MainContent.tsx +54 -0
- package/src/components/AdminLayout/Navbar.tsx +76 -0
- package/src/components/AdminLayout/Sidebar.tsx +256 -0
- package/src/components/AdminLayout/TabBar.tsx +177 -0
- package/src/components/AdminLayout/TabPane.tsx +29 -0
- package/src/components/AdminLayout/index.ts +3 -0
- package/src/components/AdminLayout/types.ts +46 -0
- package/src/components/CouponCard/CouponCard.scss +55 -0
- package/src/components/CouponCard/CouponCard.tsx +687 -0
- package/src/components/CouponCard/index.ts +1 -0
- package/src/components/OrderForm/OrderForm.scss +148 -0
- package/src/components/OrderForm/OrderForm.tsx +503 -0
- package/src/components/OrderForm/index.ts +1 -0
- package/src/components/OrderList/OrderList.scss +160 -0
- package/src/components/OrderList/OrderList.tsx +885 -0
- package/src/components/OrderList/index.ts +1 -0
- package/src/components/ProductForm/ProductForm.scss +23 -0
- package/src/components/ProductForm/ProductForm.tsx +442 -0
- package/src/components/ProductForm/index.ts +3 -0
- package/src/components/ProductList/ProductList.scss +293 -0
- package/src/components/ProductList/ProductList.tsx +454 -0
- package/src/components/ProductList/index.ts +3 -0
- package/src/components/PromotionCard/PromotionCard.scss +71 -0
- package/src/components/PromotionCard/PromotionCard.tsx +579 -0
- package/src/components/PromotionCard/index.ts +1 -0
- package/src/components/RoleCard/RoleCard.scss +77 -0
- package/src/components/RoleCard/RoleCard.tsx +463 -0
- package/src/components/RoleCard/index.ts +1 -0
- package/src/components/UserCard/UserCard.scss +51 -0
- package/src/components/UserCard/UserCard.tsx +432 -0
- package/src/components/UserCard/index.ts +1 -0
- package/src/entry-components.ts +39 -0
- package/src/entry-meta.ts +23 -0
- package/src/index.scss +4 -0
- package/src/index.ts +36 -0
- package/src/index.tsx +17 -0
- package/src/meta/adminLayoutMeta.ts +154 -0
- package/src/meta/couponCardMeta.ts +287 -0
- package/src/meta/icons.ts +41 -0
- package/src/meta/orderFormMeta.ts +279 -0
- package/src/meta/orderListMeta.ts +443 -0
- package/src/meta/productFormMeta.ts +253 -0
- package/src/meta/productListMeta.ts +434 -0
- package/src/meta/promotionCardMeta.ts +276 -0
- package/src/meta/roleCardMeta.ts +142 -0
- package/src/meta/tabPaneMeta.ts +69 -0
- package/src/meta/userCardMeta.ts +128 -0
- package/src/meta.ts +25 -0
- package/src/setters/RestApiTester.tsx +219 -0
- package/src/shims/require.js +8 -0
- package/src/types/common.ts +19 -0
- package/src/types/marketing.ts +124 -0
- package/src/types/order.ts +169 -0
- package/src/types/permission.ts +102 -0
- package/src/types/product.ts +49 -0
|
@@ -0,0 +1,276 @@
|
|
|
1
|
+
import type { IPublicTypeComponentMetadata } from '@alilc/lowcode-types'
|
|
2
|
+
import { Icons } from './icons'
|
|
3
|
+
|
|
4
|
+
const defaultPromotionMockData = {
|
|
5
|
+
code: 200,
|
|
6
|
+
message: 'success',
|
|
7
|
+
data: {
|
|
8
|
+
pageNum: 1,
|
|
9
|
+
pageSize: 10,
|
|
10
|
+
total: 4,
|
|
11
|
+
list: [
|
|
12
|
+
{
|
|
13
|
+
id: 1,
|
|
14
|
+
title: '双十一大促',
|
|
15
|
+
startDate: '2024-11-01',
|
|
16
|
+
endDate: '2024-11-11',
|
|
17
|
+
status: 1,
|
|
18
|
+
createTime: '2024-10-15 10:00:00',
|
|
19
|
+
},
|
|
20
|
+
{
|
|
21
|
+
id: 2,
|
|
22
|
+
title: '618年中大促',
|
|
23
|
+
startDate: '2024-06-01',
|
|
24
|
+
endDate: '2024-06-18',
|
|
25
|
+
status: 1,
|
|
26
|
+
createTime: '2024-05-20 09:00:00',
|
|
27
|
+
},
|
|
28
|
+
{
|
|
29
|
+
id: 3,
|
|
30
|
+
title: '新春季促销',
|
|
31
|
+
startDate: '2024-01-20',
|
|
32
|
+
endDate: '2024-02-10',
|
|
33
|
+
status: 0,
|
|
34
|
+
createTime: '2024-01-10 08:00:00',
|
|
35
|
+
},
|
|
36
|
+
{
|
|
37
|
+
id: 4,
|
|
38
|
+
title: '会员日特惠',
|
|
39
|
+
startDate: '2024-03-15',
|
|
40
|
+
endDate: '2024-03-17',
|
|
41
|
+
status: 1,
|
|
42
|
+
createTime: '2024-03-01 10:00:00',
|
|
43
|
+
},
|
|
44
|
+
],
|
|
45
|
+
},
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
const promotionCardMeta = {
|
|
49
|
+
componentName: 'PromotionCard',
|
|
50
|
+
title: '促销活动管理',
|
|
51
|
+
docUrl: '',
|
|
52
|
+
screenshot: '',
|
|
53
|
+
devMode: 'proCode',
|
|
54
|
+
npm: {
|
|
55
|
+
package: 'mall-components',
|
|
56
|
+
version: '1.0.0',
|
|
57
|
+
exportName: 'PromotionCard',
|
|
58
|
+
main: 'lib/index.js',
|
|
59
|
+
destructuring: true,
|
|
60
|
+
subName: '',
|
|
61
|
+
},
|
|
62
|
+
category: '电商业务',
|
|
63
|
+
group: '营销管理',
|
|
64
|
+
icon: Icons.star,
|
|
65
|
+
props: [
|
|
66
|
+
{
|
|
67
|
+
name: 'dataSourceType',
|
|
68
|
+
propType: 'string',
|
|
69
|
+
description: '数据源类型',
|
|
70
|
+
defaultValue: 'mock',
|
|
71
|
+
},
|
|
72
|
+
{
|
|
73
|
+
name: 'api',
|
|
74
|
+
propType: 'string',
|
|
75
|
+
description: 'API 地址',
|
|
76
|
+
},
|
|
77
|
+
{
|
|
78
|
+
name: 'method',
|
|
79
|
+
propType: 'string',
|
|
80
|
+
description: '请求方法',
|
|
81
|
+
defaultValue: 'GET',
|
|
82
|
+
},
|
|
83
|
+
{
|
|
84
|
+
name: 'mockData',
|
|
85
|
+
propType: 'string',
|
|
86
|
+
description: 'Mock 数据',
|
|
87
|
+
defaultValue: JSON.stringify(defaultPromotionMockData),
|
|
88
|
+
},
|
|
89
|
+
{
|
|
90
|
+
name: 'variableName',
|
|
91
|
+
propType: 'string',
|
|
92
|
+
description: '变量名称',
|
|
93
|
+
},
|
|
94
|
+
{
|
|
95
|
+
name: 'showCreateButton',
|
|
96
|
+
propType: 'bool',
|
|
97
|
+
description: '是否显示创建按钮',
|
|
98
|
+
defaultValue: true,
|
|
99
|
+
},
|
|
100
|
+
{
|
|
101
|
+
name: 'showFilter',
|
|
102
|
+
propType: 'bool',
|
|
103
|
+
description: '是否显示筛选区域',
|
|
104
|
+
defaultValue: true,
|
|
105
|
+
},
|
|
106
|
+
{
|
|
107
|
+
name: 'showStatistics',
|
|
108
|
+
propType: 'bool',
|
|
109
|
+
description: '是否显示统计信息',
|
|
110
|
+
defaultValue: true,
|
|
111
|
+
},
|
|
112
|
+
{
|
|
113
|
+
name: 'showTimeline',
|
|
114
|
+
propType: 'bool',
|
|
115
|
+
description: '是否显示时间线',
|
|
116
|
+
defaultValue: true,
|
|
117
|
+
},
|
|
118
|
+
{
|
|
119
|
+
name: 'style',
|
|
120
|
+
propType: 'object',
|
|
121
|
+
description: '自定义样式',
|
|
122
|
+
},
|
|
123
|
+
{
|
|
124
|
+
name: 'className',
|
|
125
|
+
propType: 'string',
|
|
126
|
+
description: '自定义类名',
|
|
127
|
+
},
|
|
128
|
+
],
|
|
129
|
+
configure: {
|
|
130
|
+
supports: {
|
|
131
|
+
style: true,
|
|
132
|
+
className: true,
|
|
133
|
+
events: [
|
|
134
|
+
{ name: 'onCreatePromotion', description: '创建促销活动' },
|
|
135
|
+
{ name: 'onEditPromotion', description: '编辑促销活动' },
|
|
136
|
+
{ name: 'onDeletePromotion', description: '删除促销活动' },
|
|
137
|
+
{ name: 'onToggleStatus', description: '切换状态' },
|
|
138
|
+
{ name: 'onSearch', description: '搜索' },
|
|
139
|
+
],
|
|
140
|
+
},
|
|
141
|
+
props: [
|
|
142
|
+
{
|
|
143
|
+
type: 'group',
|
|
144
|
+
title: '数据源配置',
|
|
145
|
+
display: 'accordion',
|
|
146
|
+
items: [
|
|
147
|
+
{
|
|
148
|
+
name: 'dataSourceType',
|
|
149
|
+
title: '数据源类型',
|
|
150
|
+
setter: {
|
|
151
|
+
componentName: 'SelectSetter',
|
|
152
|
+
props: {
|
|
153
|
+
options: [
|
|
154
|
+
{ label: 'Mock 数据', value: 'mock' },
|
|
155
|
+
{ label: '数据源绑定', value: 'variable' },
|
|
156
|
+
],
|
|
157
|
+
},
|
|
158
|
+
},
|
|
159
|
+
extraProps: {
|
|
160
|
+
display: 'block',
|
|
161
|
+
},
|
|
162
|
+
},
|
|
163
|
+
{
|
|
164
|
+
name: 'mockData',
|
|
165
|
+
title: 'Mock 数据 (JSON)',
|
|
166
|
+
setter: {
|
|
167
|
+
componentName: 'TextAreaSetter',
|
|
168
|
+
props: {
|
|
169
|
+
rows: 10,
|
|
170
|
+
placeholder: '请输入 JSON 格式的 Mock 数据',
|
|
171
|
+
},
|
|
172
|
+
},
|
|
173
|
+
extraProps: {
|
|
174
|
+
display: 'block',
|
|
175
|
+
},
|
|
176
|
+
condition: (target: any) => {
|
|
177
|
+
return target.getProps().getPropValue('dataSourceType') === 'mock'
|
|
178
|
+
},
|
|
179
|
+
},
|
|
180
|
+
{
|
|
181
|
+
name: 'dataSource',
|
|
182
|
+
title: '绑定数据源',
|
|
183
|
+
setter: {
|
|
184
|
+
componentName: 'MixedSetter',
|
|
185
|
+
props: {
|
|
186
|
+
setters: [
|
|
187
|
+
'JsonSetter',
|
|
188
|
+
'VariableSetter',
|
|
189
|
+
],
|
|
190
|
+
},
|
|
191
|
+
},
|
|
192
|
+
extraProps: {
|
|
193
|
+
display: 'block',
|
|
194
|
+
},
|
|
195
|
+
condition: (target: any) => {
|
|
196
|
+
return target.getProps().getPropValue('dataSourceType') === 'variable'
|
|
197
|
+
},
|
|
198
|
+
},
|
|
199
|
+
],
|
|
200
|
+
},
|
|
201
|
+
{
|
|
202
|
+
type: 'group',
|
|
203
|
+
title: '显示控制',
|
|
204
|
+
display: 'accordion',
|
|
205
|
+
items: [
|
|
206
|
+
{
|
|
207
|
+
name: 'showCreateButton',
|
|
208
|
+
title: '显示创建按钮',
|
|
209
|
+
setter: 'BoolSetter',
|
|
210
|
+
extraProps: {
|
|
211
|
+
display: 'block',
|
|
212
|
+
},
|
|
213
|
+
},
|
|
214
|
+
{
|
|
215
|
+
name: 'showFilter',
|
|
216
|
+
title: '显示筛选区域',
|
|
217
|
+
setter: 'BoolSetter',
|
|
218
|
+
extraProps: {
|
|
219
|
+
display: 'block',
|
|
220
|
+
},
|
|
221
|
+
},
|
|
222
|
+
{
|
|
223
|
+
name: 'showStatistics',
|
|
224
|
+
title: '显示统计信息',
|
|
225
|
+
setter: 'BoolSetter',
|
|
226
|
+
extraProps: {
|
|
227
|
+
display: 'block',
|
|
228
|
+
},
|
|
229
|
+
},
|
|
230
|
+
{
|
|
231
|
+
name: 'showTimeline',
|
|
232
|
+
title: '显示时间线',
|
|
233
|
+
setter: 'BoolSetter',
|
|
234
|
+
extraProps: {
|
|
235
|
+
display: 'block',
|
|
236
|
+
},
|
|
237
|
+
},
|
|
238
|
+
],
|
|
239
|
+
},
|
|
240
|
+
],
|
|
241
|
+
},
|
|
242
|
+
snippets: [
|
|
243
|
+
{
|
|
244
|
+
title: '促销活动管理',
|
|
245
|
+
screenshot: '',
|
|
246
|
+
schema: {
|
|
247
|
+
componentName: 'PromotionCard',
|
|
248
|
+
props: {
|
|
249
|
+
dataSourceType: 'mock',
|
|
250
|
+
mockData: JSON.stringify(defaultPromotionMockData),
|
|
251
|
+
showCreateButton: true,
|
|
252
|
+
showFilter: true,
|
|
253
|
+
showStatistics: true,
|
|
254
|
+
showTimeline: true,
|
|
255
|
+
},
|
|
256
|
+
},
|
|
257
|
+
},
|
|
258
|
+
{
|
|
259
|
+
title: '促销活动管理(简洁模式)',
|
|
260
|
+
screenshot: '',
|
|
261
|
+
schema: {
|
|
262
|
+
componentName: 'PromotionCard',
|
|
263
|
+
props: {
|
|
264
|
+
dataSourceType: 'mock',
|
|
265
|
+
mockData: JSON.stringify(defaultPromotionMockData),
|
|
266
|
+
showCreateButton: false,
|
|
267
|
+
showFilter: false,
|
|
268
|
+
showStatistics: false,
|
|
269
|
+
showTimeline: false,
|
|
270
|
+
},
|
|
271
|
+
},
|
|
272
|
+
},
|
|
273
|
+
],
|
|
274
|
+
}
|
|
275
|
+
|
|
276
|
+
export default promotionCardMeta
|
|
@@ -0,0 +1,142 @@
|
|
|
1
|
+
import type { IPublicTypeComponentMetadata } from '@alilc/lowcode-types'
|
|
2
|
+
import { Icons } from './icons'
|
|
3
|
+
|
|
4
|
+
const roleCardMeta: IPublicTypeComponentMetadata = {
|
|
5
|
+
componentName: 'RoleCard',
|
|
6
|
+
title: '角色管理',
|
|
7
|
+
docUrl: '',
|
|
8
|
+
screenshot: '',
|
|
9
|
+
devMode: 'proCode',
|
|
10
|
+
npm: {
|
|
11
|
+
package: 'mall-components',
|
|
12
|
+
version: '1.0.0',
|
|
13
|
+
exportName: 'RoleCard',
|
|
14
|
+
main: 'lib/index.js',
|
|
15
|
+
destructuring: true,
|
|
16
|
+
subName: '',
|
|
17
|
+
},
|
|
18
|
+
category: '电商业务',
|
|
19
|
+
group: '权限管理',
|
|
20
|
+
icon: Icons.team,
|
|
21
|
+
props: [
|
|
22
|
+
{
|
|
23
|
+
name: 'dataSource',
|
|
24
|
+
propType: 'string',
|
|
25
|
+
description: '数据源配置',
|
|
26
|
+
},
|
|
27
|
+
{
|
|
28
|
+
name: 'showCreateButton',
|
|
29
|
+
propType: 'bool',
|
|
30
|
+
description: '是否显示创建按钮',
|
|
31
|
+
defaultValue: true,
|
|
32
|
+
},
|
|
33
|
+
{
|
|
34
|
+
name: 'showFilter',
|
|
35
|
+
propType: 'bool',
|
|
36
|
+
description: '是否显示筛选区域',
|
|
37
|
+
defaultValue: true,
|
|
38
|
+
},
|
|
39
|
+
{
|
|
40
|
+
name: 'showStatistics',
|
|
41
|
+
propType: 'bool',
|
|
42
|
+
description: '是否显示统计信息',
|
|
43
|
+
defaultValue: true,
|
|
44
|
+
},
|
|
45
|
+
{
|
|
46
|
+
name: 'showPermissionTree',
|
|
47
|
+
propType: 'bool',
|
|
48
|
+
description: '是否显示权限树',
|
|
49
|
+
defaultValue: true,
|
|
50
|
+
},
|
|
51
|
+
{
|
|
52
|
+
name: 'style',
|
|
53
|
+
propType: 'object',
|
|
54
|
+
description: '自定义样式',
|
|
55
|
+
},
|
|
56
|
+
{
|
|
57
|
+
name: 'className',
|
|
58
|
+
propType: 'string',
|
|
59
|
+
description: '自定义类名',
|
|
60
|
+
},
|
|
61
|
+
],
|
|
62
|
+
configure: {
|
|
63
|
+
props: {
|
|
64
|
+
isExtends: true,
|
|
65
|
+
override: [
|
|
66
|
+
{
|
|
67
|
+
name: 'dataSource',
|
|
68
|
+
setter: {
|
|
69
|
+
componentName: 'StringSetter',
|
|
70
|
+
},
|
|
71
|
+
},
|
|
72
|
+
{
|
|
73
|
+
name: 'showCreateButton',
|
|
74
|
+
setter: {
|
|
75
|
+
componentName: 'BoolSetter',
|
|
76
|
+
},
|
|
77
|
+
},
|
|
78
|
+
{
|
|
79
|
+
name: 'showFilter',
|
|
80
|
+
setter: {
|
|
81
|
+
componentName: 'BoolSetter',
|
|
82
|
+
},
|
|
83
|
+
},
|
|
84
|
+
{
|
|
85
|
+
name: 'showStatistics',
|
|
86
|
+
setter: {
|
|
87
|
+
componentName: 'BoolSetter',
|
|
88
|
+
},
|
|
89
|
+
},
|
|
90
|
+
{
|
|
91
|
+
name: 'showPermissionTree',
|
|
92
|
+
setter: {
|
|
93
|
+
componentName: 'BoolSetter',
|
|
94
|
+
},
|
|
95
|
+
},
|
|
96
|
+
],
|
|
97
|
+
},
|
|
98
|
+
component: {
|
|
99
|
+
isContainer: false,
|
|
100
|
+
isModal: false,
|
|
101
|
+
rootSelector: '.mall-role-card',
|
|
102
|
+
nestingRule: {
|
|
103
|
+
parentWhitelist: '',
|
|
104
|
+
childWhitelist: '',
|
|
105
|
+
},
|
|
106
|
+
},
|
|
107
|
+
supports: {
|
|
108
|
+
style: true,
|
|
109
|
+
className: true,
|
|
110
|
+
},
|
|
111
|
+
},
|
|
112
|
+
snippets: [
|
|
113
|
+
{
|
|
114
|
+
title: '角色管理',
|
|
115
|
+
screenshot: '',
|
|
116
|
+
schema: {
|
|
117
|
+
componentName: 'RoleCard',
|
|
118
|
+
props: {
|
|
119
|
+
showCreateButton: true,
|
|
120
|
+
showFilter: true,
|
|
121
|
+
showStatistics: true,
|
|
122
|
+
showPermissionTree: true,
|
|
123
|
+
},
|
|
124
|
+
},
|
|
125
|
+
},
|
|
126
|
+
{
|
|
127
|
+
title: '角色管理(简洁模式)',
|
|
128
|
+
screenshot: '',
|
|
129
|
+
schema: {
|
|
130
|
+
componentName: 'RoleCard',
|
|
131
|
+
props: {
|
|
132
|
+
showCreateButton: false,
|
|
133
|
+
showFilter: false,
|
|
134
|
+
showStatistics: false,
|
|
135
|
+
showPermissionTree: false,
|
|
136
|
+
},
|
|
137
|
+
},
|
|
138
|
+
},
|
|
139
|
+
],
|
|
140
|
+
}
|
|
141
|
+
|
|
142
|
+
export default roleCardMeta
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
import type { IPublicTypeComponentMetadata } from '@alilc/lowcode-types'
|
|
2
|
+
|
|
3
|
+
const TabPaneMeta: IPublicTypeComponentMetadata = {
|
|
4
|
+
componentName: 'TabPane',
|
|
5
|
+
title: '选项卡面板',
|
|
6
|
+
docUrl: 'https://github.com/alibaba/lowcode-engine',
|
|
7
|
+
screenshot: '',
|
|
8
|
+
npm: {
|
|
9
|
+
package: 'mall-components',
|
|
10
|
+
version: '1.0.0',
|
|
11
|
+
exportName: 'TabPane',
|
|
12
|
+
destructuring: true,
|
|
13
|
+
},
|
|
14
|
+
props: [
|
|
15
|
+
{
|
|
16
|
+
name: 'tab',
|
|
17
|
+
propType: 'string',
|
|
18
|
+
description: '选项卡标题',
|
|
19
|
+
defaultValue: '新选项卡',
|
|
20
|
+
},
|
|
21
|
+
{
|
|
22
|
+
name: 'tabKey',
|
|
23
|
+
propType: 'string',
|
|
24
|
+
description: '选项卡唯一标识',
|
|
25
|
+
defaultValue: 'tab1',
|
|
26
|
+
},
|
|
27
|
+
],
|
|
28
|
+
configure: {
|
|
29
|
+
supports: {
|
|
30
|
+
style: true,
|
|
31
|
+
events: [],
|
|
32
|
+
loop: false,
|
|
33
|
+
},
|
|
34
|
+
props: [
|
|
35
|
+
{
|
|
36
|
+
type: 'group',
|
|
37
|
+
title: '基础配置',
|
|
38
|
+
display: 'accordion',
|
|
39
|
+
items: [
|
|
40
|
+
{
|
|
41
|
+
name: 'tab',
|
|
42
|
+
title: '选项卡标题',
|
|
43
|
+
setter: 'InputSetter',
|
|
44
|
+
extraProps: { display: 'block', placeholder: '例如:商品列表' }
|
|
45
|
+
},
|
|
46
|
+
{
|
|
47
|
+
name: 'tabKey',
|
|
48
|
+
title: '选项卡标识',
|
|
49
|
+
setter: 'InputSetter',
|
|
50
|
+
extraProps: { display: 'block', placeholder: '例如:product' }
|
|
51
|
+
},
|
|
52
|
+
],
|
|
53
|
+
},
|
|
54
|
+
],
|
|
55
|
+
component: {
|
|
56
|
+
isContainer: true,
|
|
57
|
+
nestingRule: {
|
|
58
|
+
parentWhitelist: ['AdminLayout'],
|
|
59
|
+
},
|
|
60
|
+
disableBehaviors: ['remove'],
|
|
61
|
+
},
|
|
62
|
+
},
|
|
63
|
+
icon: '',
|
|
64
|
+
category: '隐藏组件',
|
|
65
|
+
group: '布局容器',
|
|
66
|
+
snippets: [],
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
export default TabPaneMeta
|
|
@@ -0,0 +1,128 @@
|
|
|
1
|
+
import type { IPublicTypeComponentMetadata } from '@alilc/lowcode-types'
|
|
2
|
+
import { Icons } from './icons'
|
|
3
|
+
|
|
4
|
+
const userCardMeta: IPublicTypeComponentMetadata = {
|
|
5
|
+
componentName: 'UserCard',
|
|
6
|
+
title: '用户管理',
|
|
7
|
+
docUrl: '',
|
|
8
|
+
screenshot: '',
|
|
9
|
+
devMode: 'proCode',
|
|
10
|
+
npm: {
|
|
11
|
+
package: 'mall-components',
|
|
12
|
+
version: '1.0.0',
|
|
13
|
+
exportName: 'UserCard',
|
|
14
|
+
main: 'lib/index.js',
|
|
15
|
+
destructuring: true,
|
|
16
|
+
subName: '',
|
|
17
|
+
},
|
|
18
|
+
category: '电商业务',
|
|
19
|
+
group: '权限管理',
|
|
20
|
+
icon: Icons.user,
|
|
21
|
+
props: [
|
|
22
|
+
{
|
|
23
|
+
name: 'dataSource',
|
|
24
|
+
propType: 'string',
|
|
25
|
+
description: '数据源配置',
|
|
26
|
+
},
|
|
27
|
+
{
|
|
28
|
+
name: 'showCreateButton',
|
|
29
|
+
propType: 'bool',
|
|
30
|
+
description: '是否显示创建按钮',
|
|
31
|
+
defaultValue: true,
|
|
32
|
+
},
|
|
33
|
+
{
|
|
34
|
+
name: 'showFilter',
|
|
35
|
+
propType: 'bool',
|
|
36
|
+
description: '是否显示筛选区域',
|
|
37
|
+
defaultValue: true,
|
|
38
|
+
},
|
|
39
|
+
{
|
|
40
|
+
name: 'showStatistics',
|
|
41
|
+
propType: 'bool',
|
|
42
|
+
description: '是否显示统计信息',
|
|
43
|
+
defaultValue: true,
|
|
44
|
+
},
|
|
45
|
+
{
|
|
46
|
+
name: 'style',
|
|
47
|
+
propType: 'object',
|
|
48
|
+
description: '自定义样式',
|
|
49
|
+
},
|
|
50
|
+
{
|
|
51
|
+
name: 'className',
|
|
52
|
+
propType: 'string',
|
|
53
|
+
description: '自定义类名',
|
|
54
|
+
},
|
|
55
|
+
],
|
|
56
|
+
configure: {
|
|
57
|
+
props: {
|
|
58
|
+
isExtends: true,
|
|
59
|
+
override: [
|
|
60
|
+
{
|
|
61
|
+
name: 'dataSource',
|
|
62
|
+
setter: {
|
|
63
|
+
componentName: 'StringSetter',
|
|
64
|
+
},
|
|
65
|
+
},
|
|
66
|
+
{
|
|
67
|
+
name: 'showCreateButton',
|
|
68
|
+
setter: {
|
|
69
|
+
componentName: 'BoolSetter',
|
|
70
|
+
},
|
|
71
|
+
},
|
|
72
|
+
{
|
|
73
|
+
name: 'showFilter',
|
|
74
|
+
setter: {
|
|
75
|
+
componentName: 'BoolSetter',
|
|
76
|
+
},
|
|
77
|
+
},
|
|
78
|
+
{
|
|
79
|
+
name: 'showStatistics',
|
|
80
|
+
setter: {
|
|
81
|
+
componentName: 'BoolSetter',
|
|
82
|
+
},
|
|
83
|
+
},
|
|
84
|
+
],
|
|
85
|
+
},
|
|
86
|
+
component: {
|
|
87
|
+
isContainer: false,
|
|
88
|
+
isModal: false,
|
|
89
|
+
rootSelector: '.mall-user-card',
|
|
90
|
+
nestingRule: {
|
|
91
|
+
parentWhitelist: '',
|
|
92
|
+
childWhitelist: '',
|
|
93
|
+
},
|
|
94
|
+
},
|
|
95
|
+
supports: {
|
|
96
|
+
style: true,
|
|
97
|
+
className: true,
|
|
98
|
+
},
|
|
99
|
+
},
|
|
100
|
+
snippets: [
|
|
101
|
+
{
|
|
102
|
+
title: '用户管理',
|
|
103
|
+
screenshot: '',
|
|
104
|
+
schema: {
|
|
105
|
+
componentName: 'UserCard',
|
|
106
|
+
props: {
|
|
107
|
+
showCreateButton: true,
|
|
108
|
+
showFilter: true,
|
|
109
|
+
showStatistics: true,
|
|
110
|
+
},
|
|
111
|
+
},
|
|
112
|
+
},
|
|
113
|
+
{
|
|
114
|
+
title: '用户管理(简洁模式)',
|
|
115
|
+
screenshot: '',
|
|
116
|
+
schema: {
|
|
117
|
+
componentName: 'UserCard',
|
|
118
|
+
props: {
|
|
119
|
+
showCreateButton: false,
|
|
120
|
+
showFilter: false,
|
|
121
|
+
showStatistics: false,
|
|
122
|
+
},
|
|
123
|
+
},
|
|
124
|
+
},
|
|
125
|
+
],
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
export default userCardMeta
|
package/src/meta.ts
ADDED
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import ProductListMeta from './meta/productListMeta'
|
|
2
|
+
import ProductFormMeta from './meta/productFormMeta'
|
|
3
|
+
import OrderListMeta from './meta/orderListMeta'
|
|
4
|
+
import OrderFormMeta from './meta/orderFormMeta'
|
|
5
|
+
import CouponCardMeta from './meta/couponCardMeta'
|
|
6
|
+
import PromotionCardMeta from './meta/promotionCardMeta'
|
|
7
|
+
import UserCardMeta from './meta/userCardMeta'
|
|
8
|
+
import RoleCardMeta from './meta/roleCardMeta'
|
|
9
|
+
import adminLayoutMeta from './meta/adminLayoutMeta'
|
|
10
|
+
import tabPaneMeta from './meta/tabPaneMeta'
|
|
11
|
+
|
|
12
|
+
export default {
|
|
13
|
+
components: [
|
|
14
|
+
ProductListMeta,
|
|
15
|
+
ProductFormMeta,
|
|
16
|
+
OrderListMeta,
|
|
17
|
+
OrderFormMeta,
|
|
18
|
+
CouponCardMeta,
|
|
19
|
+
PromotionCardMeta,
|
|
20
|
+
UserCardMeta,
|
|
21
|
+
RoleCardMeta,
|
|
22
|
+
adminLayoutMeta,
|
|
23
|
+
tabPaneMeta,
|
|
24
|
+
],
|
|
25
|
+
}
|