@pisell/materials 1.0.978 → 1.0.980

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 (73) hide show
  1. package/build/lowcode/assets-daily.json +11 -11
  2. package/build/lowcode/assets-dev.json +2 -2
  3. package/build/lowcode/assets-prod.json +11 -11
  4. package/build/lowcode/index.js +1 -1
  5. package/build/lowcode/meta.js +6 -6
  6. package/build/lowcode/preview.js +9 -9
  7. package/build/lowcode/render/default/view.css +1 -1
  8. package/build/lowcode/render/default/view.js +15 -15
  9. package/build/lowcode/view.css +1 -1
  10. package/build/lowcode/view.js +23 -23
  11. package/es/components/PisellSteps/PisellSteps.js +170 -148
  12. package/es/components/PisellSteps/PisellSteps.less +248 -383
  13. package/es/components/PisellSteps/hooks/index.js +4 -0
  14. package/es/components/PisellSteps/hooks/useAnchor.js +55 -0
  15. package/es/components/PisellSteps/hooks/useResponsive.js +43 -0
  16. package/es/components/PisellSteps/hooks/useStepClick.js +35 -0
  17. package/es/components/PisellSteps/hooks/useStepsState.js +60 -0
  18. package/es/components/PisellSteps/index.js +2 -5
  19. package/es/components/PisellSteps/utils/index.js +118 -0
  20. package/es/components/Template/PisellSteps.js +1 -0
  21. package/es/components/Template/PisellSteps.less +1 -0
  22. package/es/components/Template/components/index.js +1 -0
  23. package/es/components/Template/hooks/index.js +1 -0
  24. package/es/components/Template/utils/index.js +1 -0
  25. package/es/components/dataSourceComponents/dataSourceForm/utils.js +3 -4
  26. package/es/components/dataSourceComponents/dataSourceTable/filter/index.d.ts +1 -0
  27. package/es/components/dataSourceComponents/fields/Select/index.d.ts +1 -1
  28. package/es/components/dataSourceComponents/fields/Switch/ReadPretty.d.ts +5 -0
  29. package/es/components/dataSourceComponents/fields/Switch/ReadPretty.js +16 -0
  30. package/es/components/dataSourceComponents/fields/Switch/ReadPretty.less +2 -0
  31. package/es/components/dataSourceComponents/fields/Switch/WithMode.d.ts +3 -0
  32. package/es/components/dataSourceComponents/fields/Switch/WithMode.js +5 -0
  33. package/es/components/dataSourceComponents/fields/Switch/index.d.ts +3 -0
  34. package/es/components/dataSourceComponents/fields/Switch/index.js +8 -0
  35. package/es/components/dataSourceComponents/fields/Switch/type.d.ts +16 -0
  36. package/es/components/dataSourceComponents/fields/Switch/type.js +1 -0
  37. package/es/components/dataSourceComponents/fields/index.d.ts +12 -12
  38. package/es/index.js +1 -1
  39. package/lib/components/PisellSteps/PisellSteps.js +155 -102
  40. package/lib/components/PisellSteps/PisellSteps.less +248 -383
  41. package/lib/components/PisellSteps/hooks/index.js +38 -0
  42. package/lib/components/PisellSteps/hooks/useAnchor.js +63 -0
  43. package/lib/components/PisellSteps/hooks/useResponsive.js +48 -0
  44. package/lib/components/PisellSteps/hooks/useStepClick.js +55 -0
  45. package/lib/components/PisellSteps/hooks/useStepsState.js +54 -0
  46. package/lib/components/PisellSteps/index.js +2 -7
  47. package/lib/components/PisellSteps/utils/index.js +88 -0
  48. package/lib/components/Template/PisellSteps.js +0 -0
  49. package/lib/components/Template/PisellSteps.less +1 -0
  50. package/lib/components/Template/components/index.js +0 -0
  51. package/lib/components/Template/hooks/index.js +0 -0
  52. package/lib/components/Template/utils/index.js +0 -0
  53. package/lib/components/dataSourceComponents/dataSourceForm/utils.js +3 -3
  54. package/lib/components/dataSourceComponents/dataSourceTable/filter/index.d.ts +1 -0
  55. package/lib/components/dataSourceComponents/fields/Select/index.d.ts +1 -1
  56. package/lib/components/dataSourceComponents/fields/Switch/ReadPretty.d.ts +5 -0
  57. package/lib/components/dataSourceComponents/fields/Switch/ReadPretty.js +52 -0
  58. package/lib/components/dataSourceComponents/fields/Switch/ReadPretty.less +2 -0
  59. package/lib/components/dataSourceComponents/fields/Switch/WithMode.d.ts +3 -0
  60. package/lib/components/dataSourceComponents/fields/Switch/WithMode.js +39 -0
  61. package/lib/components/dataSourceComponents/fields/Switch/index.d.ts +3 -0
  62. package/lib/components/dataSourceComponents/fields/Switch/index.js +42 -0
  63. package/lib/components/dataSourceComponents/fields/Switch/type.d.ts +16 -0
  64. package/lib/components/dataSourceComponents/fields/Switch/type.js +17 -0
  65. package/lib/components/dataSourceComponents/fields/index.d.ts +12 -12
  66. package/lib/index.js +3 -3
  67. package/lowcode/data-source-form/constants.ts +3 -0
  68. package/lowcode/data-source-form/utils.ts +36 -7
  69. package/lowcode/form-item-switch/meta.ts +145 -0
  70. package/lowcode/form-item-switch/snippets.ts +15 -0
  71. package/lowcode/pisell-steps/meta.ts +621 -271
  72. package/lowcode/pisell-steps/snippets.ts +27 -69
  73. package/package.json +2 -2
@@ -1,307 +1,657 @@
1
1
  import snippets from './snippets';
2
2
 
3
- /**
4
- * PisellSteps 组件 Lowcode Meta 配置
5
- * 用于阿里低代码引擎的物料描述
6
- */
7
- export default {
8
- snippets,
3
+ const PisellStepsMeta = {
9
4
  componentName: 'PisellSteps',
10
- title: 'Steps 步骤条',
5
+ title: '步骤条',
11
6
  category: '导航',
12
7
  docUrl: '',
13
8
  screenshot: '',
14
9
  devMode: 'proCode',
15
10
  npm: {
16
11
  package: '@pisell/materials',
17
- version: '1.0.0',
12
+ version: '1.0.3',
18
13
  exportName: 'PisellSteps',
19
14
  main: 'src/index.tsx',
20
15
  destructuring: true,
21
16
  subName: '',
22
17
  },
23
- props: [
24
- {
25
- name: 'items',
26
- title: { label: '步骤项配置', tip: '步骤项配置数组' },
27
- setter: {
28
- componentName: 'ArraySetter',
29
- props: {
30
- itemSetter: {
31
- componentName: 'ObjectSetter',
32
- props: {
33
- config: {
34
- items: [
35
- {
36
- name: 'title',
37
- title: { label: '标题', tip: '步骤标题' },
38
- setter: 'PisellI18nSetter',
39
- isRequired: true,
40
- },
41
- {
42
- name: 'subTitle',
43
- title: { label: '副标题', tip: '步骤副标题' },
44
- setter: 'PisellI18nSetter',
45
- },
46
- {
47
- name: 'description',
48
- title: { label: '描述', tip: '步骤详细描述' },
49
- setter: 'PisellI18nSetter',
50
- },
51
- {
52
- name: 'status',
53
- title: { label: '状态', tip: '步骤状态' },
54
- setter: {
55
- componentName: 'RadioGroupSetter',
56
- props: {
57
- options: [
58
- { title: '等待', value: 'wait' },
59
- { title: '进行中', value: 'process' },
60
- { title: '完成', value: 'finish' },
61
- { title: '错误', value: 'error' },
62
- ],
63
- },
18
+ configure: {
19
+ props: [
20
+ {
21
+ title: {
22
+ label: {
23
+ type: 'i18n',
24
+ 'en-US': 'Basic',
25
+ 'zh-CN': '基础配置',
26
+ },
27
+ },
28
+ display: 'block',
29
+ type: 'group',
30
+ items: [
31
+ {
32
+ name: 'type',
33
+ title: {
34
+ label: {
35
+ type: 'i18n',
36
+ 'en-US': 'Type',
37
+ 'zh-CN': '步骤条类型',
38
+ },
39
+ tip: 'type | 步骤条类型,可选 default、dot、navigation',
40
+ },
41
+ propType: {
42
+ type: 'oneOf',
43
+ value: ['default', 'dot', 'navigation'],
44
+ },
45
+ setter: [
46
+ {
47
+ componentName: 'RadioGroupSetter',
48
+ props: {
49
+ options: [
50
+ {
51
+ title: '默认',
52
+ value: 'default',
64
53
  },
65
- propType: {
66
- type: 'oneOf',
67
- value: ['wait', 'process', 'finish', 'error'],
54
+ {
55
+ title: '点状',
56
+ value: 'dot',
57
+ },
58
+ {
59
+ title: '导航',
60
+ value: 'navigation',
61
+ },
62
+ ],
63
+ },
64
+ },
65
+ 'VariableSetter',
66
+ ],
67
+ defaultValue: 'default',
68
+ },
69
+ {
70
+ name: 'current',
71
+ title: {
72
+ label: {
73
+ type: 'i18n',
74
+ 'en-US': 'Current',
75
+ 'zh-CN': '当前步骤',
76
+ },
77
+ tip: 'current | 当前步骤索引(受控模式)',
78
+ },
79
+ propType: 'number',
80
+ setter: ['NumberSetter', 'VariableSetter'],
81
+ },
82
+ {
83
+ name: 'defaultCurrent',
84
+ title: {
85
+ label: {
86
+ type: 'i18n',
87
+ 'en-US': 'Default Current',
88
+ 'zh-CN': '默认当前步骤',
89
+ },
90
+ tip: 'defaultCurrent | 默认当前步骤索引(非受控模式)',
91
+ },
92
+ propType: 'number',
93
+ setter: ['NumberSetter', 'VariableSetter'],
94
+ defaultValue: 0,
95
+ },
96
+ {
97
+ name: 'direction',
98
+ title: {
99
+ label: {
100
+ type: 'i18n',
101
+ 'en-US': 'Direction',
102
+ 'zh-CN': '方向',
103
+ },
104
+ tip: 'direction | 步骤条方向',
105
+ },
106
+ propType: {
107
+ type: 'oneOf',
108
+ value: ['horizontal', 'vertical'],
109
+ },
110
+ setter: [
111
+ {
112
+ componentName: 'RadioGroupSetter',
113
+ props: {
114
+ options: [
115
+ {
116
+ title: '横向',
117
+ value: 'horizontal',
118
+ },
119
+ {
120
+ title: '竖向',
121
+ value: 'vertical',
122
+ },
123
+ ],
124
+ },
125
+ },
126
+ 'VariableSetter',
127
+ ],
128
+ defaultValue: 'horizontal',
129
+ },
130
+ {
131
+ name: 'size',
132
+ title: {
133
+ label: {
134
+ type: 'i18n',
135
+ 'en-US': 'Size',
136
+ 'zh-CN': '尺寸',
137
+ },
138
+ tip: 'size | 步骤条尺寸',
139
+ },
140
+ propType: {
141
+ type: 'oneOf',
142
+ value: ['small', 'default', 'large'],
143
+ },
144
+ setter: [
145
+ {
146
+ componentName: 'RadioGroupSetter',
147
+ props: {
148
+ options: [
149
+ {
150
+ title: '小',
151
+ value: 'small',
152
+ },
153
+ {
154
+ title: '中',
155
+ value: 'default',
156
+ },
157
+ {
158
+ title: '大',
159
+ value: 'large',
160
+ },
161
+ ],
162
+ },
163
+ },
164
+ 'VariableSetter',
165
+ ],
166
+ defaultValue: 'default',
167
+ },
168
+ {
169
+ name: 'status',
170
+ title: {
171
+ label: {
172
+ type: 'i18n',
173
+ 'en-US': 'Status',
174
+ 'zh-CN': '当前步骤状态',
175
+ },
176
+ tip: 'status | 当前步骤的状态',
177
+ },
178
+ propType: {
179
+ type: 'oneOf',
180
+ value: ['wait', 'process', 'finish', 'error'],
181
+ },
182
+ setter: [
183
+ {
184
+ componentName: 'SelectSetter',
185
+ props: {
186
+ options: [
187
+ {
188
+ title: '等待',
189
+ value: 'wait',
190
+ },
191
+ {
192
+ title: '进行中',
193
+ value: 'process',
194
+ },
195
+ {
196
+ title: '完成',
197
+ value: 'finish',
198
+ },
199
+ {
200
+ title: '错误',
201
+ value: 'error',
202
+ },
203
+ ],
204
+ },
205
+ },
206
+ 'VariableSetter',
207
+ ],
208
+ defaultValue: 'process',
209
+ },
210
+ {
211
+ name: 'items',
212
+ title: {
213
+ label: {
214
+ type: 'i18n',
215
+ 'en-US': 'Items',
216
+ 'zh-CN': '步骤数据',
217
+ },
218
+ tip: 'items | 步骤数据配置数组',
219
+ },
220
+ propType: 'object',
221
+ setter: {
222
+ componentName: 'ArraySetter',
223
+ props: {
224
+ itemSetter: {
225
+ componentName: 'ObjectSetter',
226
+ props: {
227
+ config: {
228
+ items: [
229
+ {
230
+ name: 'title',
231
+ title: {
232
+ label: '标题',
233
+ tip: '步骤标题',
234
+ },
235
+ propType: { type: 'oneOfType', value: ['string', 'node'] },
236
+ setter: ['PisellI18nSetter', 'StringSetter', 'SlotSetter'],
237
+ isRequired: true,
238
+ },
239
+ {
240
+ name: 'subTitle',
241
+ title: {
242
+ label: '副标题',
243
+ tip: '步骤副标题',
244
+ },
245
+ propType: { type: 'oneOfType', value: ['string', 'node'] },
246
+ setter: ['PisellI18nSetter', 'StringSetter', 'SlotSetter'],
247
+ },
248
+ {
249
+ name: 'description',
250
+ title: {
251
+ label: '描述',
252
+ tip: '步骤描述',
253
+ },
254
+ propType: { type: 'oneOfType', value: ['string', 'node'] },
255
+ setter: ['PisellI18nSetter', 'StringSetter', 'SlotSetter'],
256
+ },
257
+ {
258
+ name: 'icon',
259
+ title: {
260
+ label: '图标',
261
+ tip: '自定义步骤图标',
262
+ },
263
+ propType: { type: 'oneOfType', value: ['node'] },
264
+ setter: [
265
+ {
266
+ componentName: 'SlotSetter',
267
+ initialValue: {
268
+ type: 'JSSlot',
269
+ value: [
270
+ {
271
+ componentName: 'Icon',
272
+ props: {
273
+ type: 'CheckOutlined',
274
+ size: 16,
275
+ },
276
+ },
277
+ ],
278
+ },
279
+ },
280
+ ],
281
+ },
282
+ {
283
+ name: 'status',
284
+ title: {
285
+ label: '状态',
286
+ tip: '步骤状态',
287
+ },
288
+ propType: {
289
+ type: 'oneOf',
290
+ value: ['wait', 'process', 'finish', 'error'],
291
+ },
292
+ setter: {
293
+ componentName: 'SelectSetter',
294
+ props: {
295
+ options: [
296
+ { title: '等待', value: 'wait' },
297
+ { title: '进行中', value: 'process' },
298
+ { title: '完成', value: 'finish' },
299
+ { title: '错误', value: 'error' },
300
+ ],
301
+ },
302
+ },
303
+ },
304
+ {
305
+ name: 'disabled',
306
+ title: {
307
+ label: '禁用',
308
+ tip: '是否禁用点击',
309
+ },
310
+ propType: 'bool',
311
+ setter: 'BoolSetter',
312
+ defaultValue: false,
313
+ },
314
+ {
315
+ name: 'hidden',
316
+ title: {
317
+ label: '隐藏',
318
+ tip: '是否隐藏该步骤',
319
+ },
320
+ propType: 'bool',
321
+ setter: 'BoolSetter',
322
+ defaultValue: false,
323
+ },
324
+ ],
68
325
  },
69
326
  },
70
- {
71
- name: 'icon',
72
- title: { label: '自定义图标', tip: '自定义步骤图标' },
73
- propType: 'node',
74
- setter: 'IconSetter',
75
- },
76
- {
77
- name: 'disabled',
78
- title: { label: '是否禁用', tip: '禁用该步骤' },
79
- setter: 'BoolSetter',
80
- propType: 'bool',
81
- defaultValue: false,
82
- },
83
- ],
327
+ },
84
328
  },
85
329
  },
86
- initialValue: () => ({
87
- title: '步骤',
88
- disabled: false,
89
- }),
90
330
  },
91
- },
92
- },
93
- propType: 'array',
94
- },
95
- {
96
- name: 'current',
97
- title: {
98
- label: '当前步骤',
99
- tip: '当前步骤索引(从 0 开始)',
100
- },
101
- propType: 'number',
102
- setter: 'NumberSetter',
103
- defaultValue: 0,
104
- },
105
- {
106
- name: 'type',
107
- title: {
108
- label: '步骤条类型',
109
- tip: '步骤条类型',
110
- },
111
- setter: {
112
- componentName: 'RadioGroupSetter',
113
- props: {
114
- options: [
115
- { title: '默认', value: 'default' },
116
- { title: '导航', value: 'navigation' },
117
- { title: '行内', value: 'inline' },
118
- ],
119
- },
120
- },
121
- propType: {
122
- type: 'oneOf',
123
- value: ['default', 'navigation', 'inline'],
124
- },
125
- defaultValue: 'default',
126
- },
127
- {
128
- name: 'size',
129
- title: {
130
- label: '尺寸',
131
- tip: '步骤条尺寸',
132
- },
133
- setter: {
134
- componentName: 'RadioGroupSetter',
135
- props: {
136
- options: [
137
- { title: '默认', value: 'default' },
138
- { title: '小', value: 'small' },
139
- ],
140
- },
141
- },
142
- propType: {
143
- type: 'oneOf',
144
- value: ['default', 'small'],
145
- },
146
- defaultValue: 'default',
147
- },
148
- {
149
- name: 'direction',
150
- title: {
151
- label: '步骤条方向',
152
- tip: '步骤条方向:横向或竖向',
153
- },
154
- setter: {
155
- componentName: 'RadioGroupSetter',
156
- props: {
157
- options: [
158
- { title: '横向', value: 'horizontal' },
159
- { title: '竖向', value: 'vertical' },
160
- ],
161
- },
162
- },
163
- propType: {
164
- type: 'oneOf',
165
- value: ['horizontal', 'vertical'],
166
- },
167
- defaultValue: 'horizontal',
168
- },
169
- {
170
- name: 'status',
171
- title: {
172
- label: '当前步骤状态',
173
- tip: '当前步骤的状态',
174
- },
175
- setter: {
176
- componentName: 'RadioGroupSetter',
177
- props: {
178
- options: [
179
- { title: '等待', value: 'wait' },
180
- { title: '进行中', value: 'process' },
181
- { title: '完成', value: 'finish' },
182
- { title: '错误', value: 'error' },
183
- ],
184
- },
185
- },
186
- propType: {
187
- type: 'oneOf',
188
- value: ['wait', 'process', 'finish', 'error'],
189
- },
190
- defaultValue: 'process',
191
- },
192
- {
193
- name: 'progressDot',
194
- title: {
195
- label: '圆点样式',
196
- tip: '使用圆点样式的步骤条',
197
- },
198
- setter: 'BoolSetter',
199
- propType: { type: 'oneOfType', value: ['bool', 'func'] },
200
- defaultValue: false,
201
- },
202
- {
203
- name: 'labelPlacement',
204
- title: {
205
- label: '标签放置位置',
206
- tip: '标签放置位置',
207
- },
208
- setter: {
209
- componentName: 'RadioGroupSetter',
210
- props: {
211
- options: [
212
- { title: '水平', value: 'horizontal' },
213
- { title: '竖直', value: 'vertical' },
214
- ],
215
- },
216
- },
217
- propType: {
218
- type: 'oneOf',
219
- value: ['horizontal', 'vertical'],
220
- },
221
- defaultValue: 'horizontal',
222
- },
223
- {
224
- name: 'percent',
225
- title: {
226
- label: '进度百分比',
227
- tip: '当前步骤的进度百分比(0-100)',
331
+ {
332
+ name: 'className',
333
+ title: {
334
+ label: {
335
+ type: 'i18n',
336
+ 'en-US': 'ClassName',
337
+ 'zh-CN': '类名',
338
+ },
339
+ tip: 'className | 自定义类名',
340
+ },
341
+ propType: 'string',
342
+ setter: 'StringSetter',
343
+ },
344
+ ],
228
345
  },
229
- propType: 'number',
230
- setter: {
231
- componentName: 'NumberSetter',
232
- props: {
233
- min: 0,
234
- max: 100,
346
+ {
347
+ title: {
348
+ label: {
349
+ type: 'i18n',
350
+ 'en-US': 'Advanced',
351
+ 'zh-CN': '高级配置',
352
+ },
235
353
  },
354
+ display: 'block',
355
+ type: 'group',
356
+ items: [
357
+ {
358
+ name: 'clickable',
359
+ title: {
360
+ label: {
361
+ type: 'i18n',
362
+ 'en-US': 'Clickable',
363
+ 'zh-CN': '可点击',
364
+ },
365
+ tip: 'clickable | 是否允许点击步骤切换',
366
+ },
367
+ propType: 'bool',
368
+ setter: 'BoolSetter',
369
+ defaultValue: false,
370
+ },
371
+ {
372
+ name: 'allowClickFinished',
373
+ title: {
374
+ label: {
375
+ type: 'i18n',
376
+ 'en-US': 'Allow Click Finished',
377
+ 'zh-CN': '允许点击已完成',
378
+ },
379
+ tip: 'allowClickFinished | 是否允许点击已完成的步骤',
380
+ },
381
+ propType: 'bool',
382
+ setter: 'BoolSetter',
383
+ defaultValue: true,
384
+ },
385
+ {
386
+ name: 'showProgressPercent',
387
+ title: {
388
+ label: {
389
+ type: 'i18n',
390
+ 'en-US': 'Show Progress Percent',
391
+ 'zh-CN': '显示进度百分比',
392
+ },
393
+ tip: 'showProgressPercent | 是否显示进度百分比',
394
+ },
395
+ propType: 'bool',
396
+ setter: 'BoolSetter',
397
+ defaultValue: false,
398
+ },
399
+ {
400
+ name: 'percent',
401
+ title: {
402
+ label: {
403
+ type: 'i18n',
404
+ 'en-US': 'Percent',
405
+ 'zh-CN': '进度百分比',
406
+ },
407
+ tip: 'percent | 当前步骤的进度百分比(0-100)',
408
+ },
409
+ propType: 'number',
410
+ setter: ['NumberSetter', 'VariableSetter'],
411
+ condition: {
412
+ type: 'JSFunction',
413
+ value: 'target => !!target.getProps().getPropValue("showProgressPercent")',
414
+ },
415
+ },
416
+ {
417
+ name: 'iconSize',
418
+ title: {
419
+ label: {
420
+ type: 'i18n',
421
+ 'en-US': 'Icon Size',
422
+ 'zh-CN': '图标尺寸',
423
+ },
424
+ tip: 'iconSize | 图标尺寸(单位:px)',
425
+ },
426
+ propType: 'number',
427
+ setter: ['NumberSetter', 'VariableSetter'],
428
+ },
429
+ {
430
+ name: 'iconColor',
431
+ title: {
432
+ label: {
433
+ type: 'i18n',
434
+ 'en-US': 'Icon Color',
435
+ 'zh-CN': '图标颜色',
436
+ },
437
+ tip: 'iconColor | 图标颜色',
438
+ },
439
+ propType: 'string',
440
+ setter: ['ColorSetter', 'StringSetter', 'VariableSetter'],
441
+ },
442
+ {
443
+ name: 'responsive',
444
+ title: {
445
+ label: {
446
+ type: 'i18n',
447
+ 'en-US': 'Responsive',
448
+ 'zh-CN': '响应式',
449
+ },
450
+ tip: 'responsive | 是否开启响应式',
451
+ },
452
+ propType: 'bool',
453
+ setter: 'BoolSetter',
454
+ defaultValue: true,
455
+ },
456
+ {
457
+ name: 'animated',
458
+ title: {
459
+ label: {
460
+ type: 'i18n',
461
+ 'en-US': 'Animated',
462
+ 'zh-CN': '动画',
463
+ },
464
+ tip: 'animated | 是否开启动画',
465
+ },
466
+ propType: 'bool',
467
+ setter: 'BoolSetter',
468
+ defaultValue: true,
469
+ },
470
+ ],
236
471
  },
237
- },
238
- {
239
- name: 'responsive',
240
- title: {
241
- label: '响应式',
242
- tip: '是否响应式适配',
243
- },
244
- setter: 'BoolSetter',
245
- propType: 'bool',
246
- defaultValue: true,
247
- },
248
- {
249
- name: 'showConnector',
250
- title: {
251
- label: '显示连接器',
252
- tip: '是否显示步骤间的连接线',
253
- },
254
- setter: 'BoolSetter',
255
- propType: 'bool',
256
- defaultValue: true,
257
- },
258
- {
259
- name: 'iconPosition',
260
- title: {
261
- label: '图标位置',
262
- tip: '图标位置(竖向布局时有效)',
263
- },
264
- setter: {
265
- componentName: 'RadioGroupSetter',
266
- props: {
267
- options: [
268
- { title: '顶部', value: 'top' },
269
- { title: '底部', value: 'bottom' },
270
- ],
472
+ {
473
+ title: {
474
+ label: {
475
+ type: 'i18n',
476
+ 'en-US': 'Layout',
477
+ 'zh-CN': '布局配置',
478
+ },
271
479
  },
480
+ display: 'block',
481
+ type: 'group',
482
+ items: [
483
+ {
484
+ name: 'labelPlacement',
485
+ title: {
486
+ label: {
487
+ type: 'i18n',
488
+ 'en-US': 'Label Placement',
489
+ 'zh-CN': '标签位置',
490
+ },
491
+ tip: 'labelPlacement | 标签文本位置',
492
+ },
493
+ propType: {
494
+ type: 'oneOf',
495
+ value: ['horizontal', 'vertical'],
496
+ },
497
+ setter: [
498
+ {
499
+ componentName: 'RadioGroupSetter',
500
+ props: {
501
+ options: [
502
+ {
503
+ title: '水平',
504
+ value: 'horizontal',
505
+ },
506
+ {
507
+ title: '垂直',
508
+ value: 'vertical',
509
+ },
510
+ ],
511
+ },
512
+ },
513
+ 'VariableSetter',
514
+ ],
515
+ defaultValue: 'horizontal',
516
+ },
517
+ {
518
+ name: 'gridLayout',
519
+ title: {
520
+ label: {
521
+ type: 'i18n',
522
+ 'en-US': 'Grid Layout',
523
+ 'zh-CN': '栅格布局',
524
+ },
525
+ tip: 'gridLayout | 是否开启栅格布局',
526
+ },
527
+ propType: 'bool',
528
+ setter: 'BoolSetter',
529
+ defaultValue: false,
530
+ },
531
+ {
532
+ name: 'gridColumns',
533
+ title: {
534
+ label: {
535
+ type: 'i18n',
536
+ 'en-US': 'Grid Columns',
537
+ 'zh-CN': '栅格列数',
538
+ },
539
+ tip: 'gridColumns | 栅格列数(仅在 gridLayout=true 时有效)',
540
+ },
541
+ propType: 'number',
542
+ setter: ['NumberSetter', 'VariableSetter'],
543
+ condition: {
544
+ type: 'JSFunction',
545
+ value: 'target => !!target.getProps().getPropValue("gridLayout")',
546
+ },
547
+ },
548
+ {
549
+ name: 'itemLayout',
550
+ title: {
551
+ label: {
552
+ type: 'i18n',
553
+ 'en-US': 'Item Layout',
554
+ 'zh-CN': '项布局',
555
+ },
556
+ tip: 'itemLayout | 标识区和文本区的布局方式',
557
+ },
558
+ propType: {
559
+ type: 'oneOf',
560
+ value: ['horizontal', 'vertical'],
561
+ },
562
+ setter: [
563
+ {
564
+ componentName: 'RadioGroupSetter',
565
+ props: {
566
+ options: [
567
+ {
568
+ title: '水平',
569
+ value: 'horizontal',
570
+ },
571
+ {
572
+ title: '垂直',
573
+ value: 'vertical',
574
+ },
575
+ ],
576
+ },
577
+ },
578
+ 'VariableSetter',
579
+ ],
580
+ defaultValue: 'horizontal',
581
+ },
582
+ {
583
+ name: 'itemGap',
584
+ title: {
585
+ label: {
586
+ type: 'i18n',
587
+ 'en-US': 'Item Gap',
588
+ 'zh-CN': '项间距',
589
+ },
590
+ tip: 'itemGap | 标识区和文本区的间距(单位:px)',
591
+ },
592
+ propType: 'number',
593
+ setter: ['NumberSetter', 'VariableSetter'],
594
+ },
595
+ {
596
+ name: 'connectorPosition',
597
+ title: {
598
+ label: {
599
+ type: 'i18n',
600
+ 'en-US': 'Connector Position',
601
+ 'zh-CN': '连接器位置',
602
+ },
603
+ tip: 'connectorPosition | 连接器位置',
604
+ },
605
+ propType: {
606
+ type: 'oneOf',
607
+ value: ['center', 'top', 'bottom'],
608
+ },
609
+ setter: [
610
+ {
611
+ componentName: 'SelectSetter',
612
+ props: {
613
+ options: [
614
+ {
615
+ title: '居中',
616
+ value: 'center',
617
+ },
618
+ {
619
+ title: '顶部',
620
+ value: 'top',
621
+ },
622
+ {
623
+ title: '底部',
624
+ value: 'bottom',
625
+ },
626
+ ],
627
+ },
628
+ },
629
+ 'VariableSetter',
630
+ ],
631
+ defaultValue: 'center',
632
+ },
633
+ ],
272
634
  },
273
- propType: {
274
- type: 'oneOf',
275
- value: ['top', 'bottom'],
276
- },
277
- defaultValue: 'top',
278
- condition: {
279
- type: 'JSFunction',
280
- value: "target => target.getProps().getPropValue('direction') === 'vertical'",
281
- },
282
- },
283
- {
284
- name: 'className',
285
- title: { label: '自定义类名', tip: '自定义 CSS 类名' },
286
- propType: 'string',
287
- setter: 'StringSetter',
288
- },
289
- {
290
- name: 'onChange',
291
- title: { label: '步骤改变回调', tip: '步骤改变时的回调函数' },
292
- propType: 'func',
293
- },
294
- ],
295
- configure: {
635
+ ],
296
636
  supports: {
297
637
  style: true,
638
+ className: true,
298
639
  events: [
299
640
  {
300
641
  name: 'onChange',
301
642
  template:
302
- "onChange(current,${extParams}){\n// 步骤改变时的回调\nconsole.log('onChange', current);}",
643
+ 'onChange(current,${extParams}){\n// 步骤变更时的回调\nconsole.log(\'onChange\', current);}',
303
644
  },
304
645
  ],
305
646
  },
647
+ component: {
648
+ isContainer: false,
649
+ },
306
650
  },
307
651
  };
652
+
653
+ export default {
654
+ ...PisellStepsMeta,
655
+ snippets,
656
+ };
657
+