@pisell/materials 6.0.6 → 6.0.8
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/build/lowcode/assets-daily.json +11 -11
- package/build/lowcode/assets-dev.json +2 -2
- package/build/lowcode/assets-prod.json +11 -11
- package/build/lowcode/index.js +1 -1
- package/build/lowcode/meta.js +7 -7
- package/build/lowcode/preview.js +8 -8
- package/build/lowcode/render/default/view.css +1 -1
- package/build/lowcode/render/default/view.js +21 -53
- package/build/lowcode/view.css +1 -1
- package/build/lowcode/view.js +18 -50
- package/es/components/config-provider/index.js +1 -1
- package/es/components/dataSourceComponents/dataSourceForm/BaseForm.js +20 -11
- package/es/components/dataSourceComponents/dataSourceForm/formItem.js +1 -1
- package/es/components/dataSourceComponents/dataSourceForm/group/index.less +2 -2
- package/es/components/dataSourceComponents/dataSourceForm/index.js +4 -2
- package/es/components/dataSourceComponents/dataSourceForm/provider/formSetting/FormSettingContext.d.ts +4 -0
- package/es/components/dataSourceComponents/dataSourceForm/provider/formSetting/FormSettingProvider.js +11 -3
- package/es/components/dataSourceComponents/dataSourceForm/provider/jsonWrapper/JsonWrapperProvider.js +10 -3
- package/es/components/dataSourceComponents/dataSourceForm/serve.d.ts +3 -2
- package/es/components/dataSourceComponents/dataSourceForm/serve.js +36 -20
- package/es/components/dataSourceComponents/dataSourceForm/submitButton/index.js +46 -25
- package/es/components/dataSourceComponents/dataSourceForm/type.d.ts +5 -0
- package/es/components/dataSourceComponents/dataSourceForm/utils.d.ts +3 -1
- package/es/components/dataSourceComponents/dataSourceForm/utils.js +38 -10
- package/es/components/dataSourceComponents/dataSourceTable/filter/index.js +1 -1
- package/es/components/dataSourceComponents/dataSourceTable/hooks/useColumns.js +4 -1
- package/es/components/dataSourceComponents/dataSourceTable/hooks/useTableProps.d.ts +7 -0
- package/es/components/dataSourceComponents/dataSourceTable/hooks/useTableProps.js +28 -5
- package/es/components/dataSourceComponents/dataSourceTable/index.js +4 -2
- package/es/components/dataSourceComponents/dataSourceTable/type.d.ts +9 -1
- package/es/components/dataSourceComponents/fields/Input.Phone/WithMode.js +7 -1
- package/es/components/dataSourceComponents/fields/Input.Url/ReadPretty.d.ts +1 -0
- package/es/components/dataSourceComponents/fields/Input.Url/ReadPretty.js +16 -1
- package/es/components/dataSourceComponents/fields/Input.Url/ReadPretty.less +1 -1
- package/es/components/dataSourceComponents/fields/Select/index.js +7 -1
- package/es/components/dataSourceComponents/fields/Upload/serve.d.ts +4 -1
- package/es/components/dataSourceComponents/fields/Upload/serve.js +10 -31
- package/es/components/dataSourceComponents/hooks/useActions.d.ts +2 -1
- package/es/components/dataSourceComponents/hooks/useActions.js +73 -36
- package/es/components/dataSourceComponents/provider/dataSource/DataSourceContext.d.ts +7 -0
- package/es/components/dataSourceComponents/provider/dataSource/DataSourceProvider.js +3 -1
- package/es/components/dataSourceComponents/provider/variables/VariablesProvider.js +49 -3
- package/es/components/login-and-register/index.d.ts +82 -0
- package/es/components/login-and-register/index.js +360 -0
- package/es/components/login-and-register/index.less +211 -0
- package/es/components/organizationTenantSwitcher/defaultLogo.png +0 -0
- package/es/components/organizationTenantSwitcher/index.d.ts +17 -0
- package/es/components/organizationTenantSwitcher/index.js +96 -0
- package/es/components/organizationTenantSwitcher/index.less +88 -0
- package/es/components/page/index.js +4 -4
- package/es/components/page-header/index.d.ts +14 -0
- package/es/components/page-header/index.js +36 -0
- package/es/components/page-header/index.less +45 -0
- package/es/components/pisellAvatar/index.d.ts +19 -0
- package/es/components/pisellAvatar/index.js +89 -0
- package/es/components/pisellAvatar/index.less +26 -0
- package/es/components/pisellModal/components/PcModal/index.js +1 -1
- package/es/components/pisellTags/index.d.ts +13 -0
- package/es/components/pisellTags/index.js +83 -0
- package/es/components/pisellTags/index.less +17 -0
- package/es/components/pisellTags/utils.d.ts +1 -0
- package/es/components/pisellTags/utils.js +89 -0
- package/es/components/pisellText/components/Amount/index.js +1 -1
- package/es/components/pisellViewGrid/index.d.ts +16 -0
- package/es/components/pisellViewGrid/index.js +66 -0
- package/es/components/pisellViewGrid/index.less +31 -0
- package/es/components/profileMenu/index.d.ts +26 -0
- package/es/components/profileMenu/index.js +115 -0
- package/es/components/profileMenu/index.less +135 -0
- package/es/components/table/Header/index.js +8 -11
- package/es/index.d.ts +7 -0
- package/es/index.js +8 -1
- package/es/locales/en-US.d.ts +1 -0
- package/es/locales/en-US.js +1 -0
- package/es/locales/zh-CN.d.ts +1 -0
- package/es/locales/zh-CN.js +1 -0
- package/es/locales/zh-TW.d.ts +1 -0
- package/es/locales/zh-TW.js +1 -0
- package/lib/components/config-provider/index.js +1 -1
- package/lib/components/dataSourceComponents/dataSourceForm/BaseForm.js +22 -4
- package/lib/components/dataSourceComponents/dataSourceForm/formItem.js +1 -1
- package/lib/components/dataSourceComponents/dataSourceForm/group/index.less +2 -2
- package/lib/components/dataSourceComponents/dataSourceForm/index.js +3 -2
- package/lib/components/dataSourceComponents/dataSourceForm/provider/formSetting/FormSettingContext.d.ts +4 -0
- package/lib/components/dataSourceComponents/dataSourceForm/provider/formSetting/FormSettingProvider.js +17 -3
- package/lib/components/dataSourceComponents/dataSourceForm/provider/jsonWrapper/JsonWrapperProvider.js +16 -6
- package/lib/components/dataSourceComponents/dataSourceForm/serve.d.ts +3 -2
- package/lib/components/dataSourceComponents/dataSourceForm/serve.js +9 -5
- package/lib/components/dataSourceComponents/dataSourceForm/submitButton/index.js +15 -4
- package/lib/components/dataSourceComponents/dataSourceForm/type.d.ts +5 -0
- package/lib/components/dataSourceComponents/dataSourceForm/utils.d.ts +3 -1
- package/lib/components/dataSourceComponents/dataSourceForm/utils.js +51 -5
- package/lib/components/dataSourceComponents/dataSourceTable/filter/index.js +1 -1
- package/lib/components/dataSourceComponents/dataSourceTable/hooks/useColumns.js +4 -1
- package/lib/components/dataSourceComponents/dataSourceTable/hooks/useTableProps.d.ts +7 -0
- package/lib/components/dataSourceComponents/dataSourceTable/hooks/useTableProps.js +24 -3
- package/lib/components/dataSourceComponents/dataSourceTable/index.js +2 -2
- package/lib/components/dataSourceComponents/dataSourceTable/type.d.ts +9 -1
- package/lib/components/dataSourceComponents/fields/Input.Phone/WithMode.js +6 -1
- package/lib/components/dataSourceComponents/fields/Input.Url/ReadPretty.d.ts +1 -0
- package/lib/components/dataSourceComponents/fields/Input.Url/ReadPretty.js +17 -2
- package/lib/components/dataSourceComponents/fields/Input.Url/ReadPretty.less +1 -1
- package/lib/components/dataSourceComponents/fields/Select/index.js +5 -1
- package/lib/components/dataSourceComponents/fields/Upload/serve.d.ts +4 -1
- package/lib/components/dataSourceComponents/fields/Upload/serve.js +20 -12
- package/lib/components/dataSourceComponents/hooks/useActions.d.ts +2 -1
- package/lib/components/dataSourceComponents/hooks/useActions.js +25 -7
- package/lib/components/dataSourceComponents/provider/dataSource/DataSourceContext.d.ts +7 -0
- package/lib/components/dataSourceComponents/provider/dataSource/DataSourceProvider.js +3 -1
- package/lib/components/dataSourceComponents/provider/variables/VariablesProvider.js +49 -3
- package/lib/components/login-and-register/index.d.ts +82 -0
- package/lib/components/login-and-register/index.js +261 -0
- package/lib/components/login-and-register/index.less +211 -0
- package/lib/components/organizationTenantSwitcher/defaultLogo.png +0 -0
- package/lib/components/organizationTenantSwitcher/index.d.ts +17 -0
- package/lib/components/organizationTenantSwitcher/index.js +119 -0
- package/lib/components/organizationTenantSwitcher/index.less +88 -0
- package/lib/components/page/index.js +4 -4
- package/lib/components/page-header/index.d.ts +14 -0
- package/lib/components/page-header/index.js +63 -0
- package/lib/components/page-header/index.less +45 -0
- package/lib/components/pisellAvatar/index.d.ts +19 -0
- package/lib/components/pisellAvatar/index.js +108 -0
- package/lib/components/pisellAvatar/index.less +26 -0
- package/lib/components/pisellModal/components/PcModal/index.js +1 -1
- package/lib/components/pisellTags/index.d.ts +13 -0
- package/lib/components/pisellTags/index.js +113 -0
- package/lib/components/pisellTags/index.less +17 -0
- package/lib/components/pisellTags/utils.d.ts +1 -0
- package/lib/components/pisellTags/utils.js +86 -0
- package/lib/components/pisellText/components/Amount/index.js +2 -2
- package/lib/components/pisellViewGrid/index.d.ts +16 -0
- package/lib/components/pisellViewGrid/index.js +98 -0
- package/lib/components/pisellViewGrid/index.less +31 -0
- package/lib/components/profileMenu/index.d.ts +26 -0
- package/lib/components/profileMenu/index.js +113 -0
- package/lib/components/profileMenu/index.less +135 -0
- package/lib/components/table/Header/index.js +11 -1
- package/lib/index.d.ts +7 -0
- package/lib/index.js +21 -0
- package/lib/locales/en-US.d.ts +1 -0
- package/lib/locales/en-US.js +1 -0
- package/lib/locales/zh-CN.d.ts +1 -0
- package/lib/locales/zh-CN.js +1 -0
- package/lib/locales/zh-TW.d.ts +1 -0
- package/lib/locales/zh-TW.js +1 -0
- package/lowcode/_utils/defaultSchema.ts +64 -0
- package/lowcode/data-source-form/meta.ts +130 -0
- package/lowcode/data-source-form/utils.ts +33 -3
- package/lowcode/data-source-table/meta.ts +139 -3
- package/lowcode/data-source-table/utils.tsx +6 -0
- package/lowcode/form-item-date-picker/snippets.ts +3 -0
- package/lowcode/form-item-input/snippets.ts +3 -1
- package/lowcode/form-item-input-number/snippets.ts +4 -0
- package/lowcode/form-item-input.email/snippets.ts +3 -0
- package/lowcode/form-item-input.json/snippets.ts +4 -1
- package/lowcode/form-item-input.password/snippets.ts +3 -0
- package/lowcode/form-item-input.phone/snippets.ts +3 -0
- package/lowcode/form-item-input.text-area/snippets.ts +3 -1
- package/lowcode/form-item-input.url/snippets.ts +3 -0
- package/lowcode/form-item-select/meta.ts +2 -1
- package/lowcode/form-item-select/snippets.ts +6 -0
- package/lowcode/form-item-time-picker/snippets.ts +3 -0
- package/lowcode/form-item-translation/snippets.ts +3 -1
- package/lowcode/login-and-register/meta.ts +541 -0
- package/lowcode/login-and-register/snippets.ts +38 -0
- package/lowcode/organization-tenant-switch/meta.ts +127 -0
- package/lowcode/page-header/meta.ts +68 -124
- package/lowcode/page-header/snippets.ts +1 -1
- package/lowcode/pisell-avatar/__screenshots__/avatar-1.jpg +0 -0
- package/lowcode/pisell-avatar/meta.ts +111 -0
- package/lowcode/pisell-avatar/snippets.ts +14 -0
- package/lowcode/pisell-tags/__screenshots__/tag-1.png +0 -0
- package/lowcode/pisell-tags/meta.ts +123 -0
- package/lowcode/pisell-tags/snippets.ts +14 -0
- package/lowcode/pisell-view-grid/__screenshots__/card-1.png +0 -0
- package/lowcode/pisell-view-grid/meta.ts +167 -0
- package/lowcode/pisell-view-grid/snippets.ts +54 -0
- package/lowcode/profile-menu/meta.ts +175 -0
- package/lowcode/profile-menu/snippets.ts +71 -0
- package/lowcode/submit-button/meta.ts +6 -0
- package/package.json +1 -1
|
@@ -164,6 +164,7 @@ const dataSourceForm: MetaType = {
|
|
|
164
164
|
title: '字段',
|
|
165
165
|
display: 'entry',
|
|
166
166
|
type: 'group',
|
|
167
|
+
name: "_fields1",
|
|
167
168
|
items: [
|
|
168
169
|
{
|
|
169
170
|
title: {
|
|
@@ -261,6 +262,59 @@ const dataSourceForm: MetaType = {
|
|
|
261
262
|
},
|
|
262
263
|
},
|
|
263
264
|
},
|
|
265
|
+
{
|
|
266
|
+
type: 'group',
|
|
267
|
+
name: "_extraParams",
|
|
268
|
+
title: '额外参数',
|
|
269
|
+
display: 'entry',
|
|
270
|
+
items: [
|
|
271
|
+
{
|
|
272
|
+
name: 'extraParams.list',
|
|
273
|
+
title: {
|
|
274
|
+
type: 'i18n',
|
|
275
|
+
'en-US': 'List Params',
|
|
276
|
+
'zh-CN': '列表参数',
|
|
277
|
+
},
|
|
278
|
+
setter: 'StringSetter'
|
|
279
|
+
},
|
|
280
|
+
{
|
|
281
|
+
name: 'extraParams.get',
|
|
282
|
+
title: {
|
|
283
|
+
type: 'i18n',
|
|
284
|
+
'en-US': 'Get Params',
|
|
285
|
+
'zh-CN': '获取参数',
|
|
286
|
+
},
|
|
287
|
+
setter: 'JsonSetter'
|
|
288
|
+
},
|
|
289
|
+
{
|
|
290
|
+
name: 'extraParams.update',
|
|
291
|
+
title: {
|
|
292
|
+
type: 'i18n',
|
|
293
|
+
'en-US': 'Update Params',
|
|
294
|
+
'zh-CN': '更新参数',
|
|
295
|
+
},
|
|
296
|
+
setter: 'JsonSetter'
|
|
297
|
+
},
|
|
298
|
+
// {
|
|
299
|
+
// name: 'extraParams.create',
|
|
300
|
+
// title: {
|
|
301
|
+
// type: 'i18n',
|
|
302
|
+
// 'en-US': 'Create Params',
|
|
303
|
+
// 'zh-CN': '创建参数',
|
|
304
|
+
// },
|
|
305
|
+
// setter: 'StringSetter'
|
|
306
|
+
// },
|
|
307
|
+
// {
|
|
308
|
+
// name: 'extraParams.destroy',
|
|
309
|
+
// title: {
|
|
310
|
+
// type: 'i18n',
|
|
311
|
+
// 'en-US': 'Destroy Params',
|
|
312
|
+
// 'zh-CN': '删除参数',
|
|
313
|
+
// },
|
|
314
|
+
// setter: 'StringSetter'
|
|
315
|
+
// }
|
|
316
|
+
]
|
|
317
|
+
}
|
|
264
318
|
],
|
|
265
319
|
},
|
|
266
320
|
{
|
|
@@ -453,6 +507,70 @@ const dataSourceForm: MetaType = {
|
|
|
453
507
|
setter: 'BoolSetter',
|
|
454
508
|
supportVariable: true,
|
|
455
509
|
},
|
|
510
|
+
|
|
511
|
+
{
|
|
512
|
+
type: 'group',
|
|
513
|
+
title: {
|
|
514
|
+
type: 'i18n',
|
|
515
|
+
'en-US': 'Functions',
|
|
516
|
+
'zh-CN': '函数配置',
|
|
517
|
+
},
|
|
518
|
+
display: 'accordion',
|
|
519
|
+
items: [
|
|
520
|
+
{
|
|
521
|
+
name: 'customSubmit',
|
|
522
|
+
title: {
|
|
523
|
+
label: {
|
|
524
|
+
type: 'i18n',
|
|
525
|
+
'en-US': 'Custom Submit',
|
|
526
|
+
'zh-CN': '自定义提交',
|
|
527
|
+
},
|
|
528
|
+
},
|
|
529
|
+
setter: {
|
|
530
|
+
componentName: 'FunctionSetter',
|
|
531
|
+
props: {
|
|
532
|
+
template:
|
|
533
|
+
"customSubmit(values,${extParams}){\n// 格式化数据\nreturn values}",
|
|
534
|
+
},
|
|
535
|
+
},
|
|
536
|
+
},
|
|
537
|
+
{
|
|
538
|
+
name: 'formatSubmitValues',
|
|
539
|
+
title: {
|
|
540
|
+
label: {
|
|
541
|
+
type: 'i18n',
|
|
542
|
+
'en-US': 'Format Submit Values',
|
|
543
|
+
'zh-CN': '提交前格式化数据',
|
|
544
|
+
},
|
|
545
|
+
},
|
|
546
|
+
setter: {
|
|
547
|
+
componentName: 'FunctionSetter',
|
|
548
|
+
props: {
|
|
549
|
+
template:
|
|
550
|
+
"formatSubmitValues(values,${extParams}){\n// 格式化数据\nreturn values}",
|
|
551
|
+
},
|
|
552
|
+
},
|
|
553
|
+
},
|
|
554
|
+
{
|
|
555
|
+
name: 'formatInitialValues',
|
|
556
|
+
title: {
|
|
557
|
+
label: {
|
|
558
|
+
type: 'i18n',
|
|
559
|
+
'en-US': 'Format Initial Values',
|
|
560
|
+
'zh-CN': '获取详情时格式化数据',
|
|
561
|
+
},
|
|
562
|
+
},
|
|
563
|
+
setter: {
|
|
564
|
+
componentName: 'FunctionSetter',
|
|
565
|
+
props: {
|
|
566
|
+
template:
|
|
567
|
+
"formatInitialValues(values,${extParams}){\n// 格式化数据\nreturn values}",
|
|
568
|
+
},
|
|
569
|
+
},
|
|
570
|
+
},
|
|
571
|
+
],
|
|
572
|
+
},
|
|
573
|
+
|
|
456
574
|
{
|
|
457
575
|
type: 'group',
|
|
458
576
|
title: '布局',
|
|
@@ -704,6 +822,13 @@ const dataSourceForm: MetaType = {
|
|
|
704
822
|
tip: '字段值更新时触发回调事件',
|
|
705
823
|
},
|
|
706
824
|
},
|
|
825
|
+
{
|
|
826
|
+
name: 'onDataSourceFinish',
|
|
827
|
+
title: {
|
|
828
|
+
label: '数据源提交成功',
|
|
829
|
+
tip: '数据源提交成功',
|
|
830
|
+
},
|
|
831
|
+
},
|
|
707
832
|
],
|
|
708
833
|
component: { isContainer: true },
|
|
709
834
|
supports: {
|
|
@@ -729,6 +854,11 @@ const dataSourceForm: MetaType = {
|
|
|
729
854
|
template:
|
|
730
855
|
"onValuesChange(changedValues,allValues,${extParams}){\n// 字段值更新时触发回调事件\nconsole.log('onValuesChange',changedValues,allValues);}",
|
|
731
856
|
},
|
|
857
|
+
{
|
|
858
|
+
name: 'onDataSourceFinish',
|
|
859
|
+
template:
|
|
860
|
+
"onDataSourceFinish(values,result,${extParams}){\n// 数据源提交成功\nconsole.log('onDataSourceFinish',values,result);}",
|
|
861
|
+
},
|
|
732
862
|
],
|
|
733
863
|
},
|
|
734
864
|
advanced: {
|
|
@@ -139,6 +139,12 @@ export const createFormItemSchema = (
|
|
|
139
139
|
name,
|
|
140
140
|
renderMode: modeMap[mode] || 'edit',
|
|
141
141
|
allowClear: true,
|
|
142
|
+
placeholder: {
|
|
143
|
+
type: 'i18n',
|
|
144
|
+
'en': 'Enter',
|
|
145
|
+
'zh-CN': '请输入',
|
|
146
|
+
'zh-HK': '請輸入',
|
|
147
|
+
},
|
|
142
148
|
};
|
|
143
149
|
let componentName = xComponent;
|
|
144
150
|
|
|
@@ -224,13 +230,27 @@ export const createFormItemSchema = (
|
|
|
224
230
|
) {
|
|
225
231
|
if (['Radio.Group', 'Checkbox.Group'].includes(xComponent)) {
|
|
226
232
|
props.direction = 'horizontal';
|
|
233
|
+
props.placeholder = "";
|
|
227
234
|
} else {
|
|
228
235
|
props.styleType = 'antd';
|
|
229
236
|
props.showSearch = true;
|
|
230
|
-
props.isShowDropdown = true;
|
|
231
237
|
props.optionFilterProp = 'label';
|
|
238
|
+
props.placeholder = {
|
|
239
|
+
type: 'i18n',
|
|
240
|
+
'en': 'Select an option',
|
|
241
|
+
'zh-CN': '请选择一个选项',
|
|
242
|
+
'zh-HK': '請選擇一個選項',
|
|
243
|
+
};
|
|
244
|
+
|
|
232
245
|
if (props.mode === "multiple") {
|
|
233
246
|
props.selectAll = true;
|
|
247
|
+
props.isShowDropdown = true;
|
|
248
|
+
props.placeholder = {
|
|
249
|
+
type: 'i18n',
|
|
250
|
+
'en': 'Select one or more options',
|
|
251
|
+
'zh-CN': '请选择一个或多个选项',
|
|
252
|
+
'zh-HK': '請選擇一個或多個選項',
|
|
253
|
+
};
|
|
234
254
|
}
|
|
235
255
|
}
|
|
236
256
|
props.optionSourceType = 'default';
|
|
@@ -239,14 +259,24 @@ export const createFormItemSchema = (
|
|
|
239
259
|
|
|
240
260
|
if (xComponent === 'TimePicker') {
|
|
241
261
|
props.format = 'HH:mm';
|
|
242
|
-
props.placeholder =
|
|
262
|
+
props.placeholder = {
|
|
263
|
+
type: 'i18n',
|
|
264
|
+
'en': 'Select a time',
|
|
265
|
+
'zh-CN': '请选择时间',
|
|
266
|
+
'zh-HK': '請選擇時間',
|
|
267
|
+
};
|
|
243
268
|
props.defaultValue = props.defaultValue || null;
|
|
244
269
|
}
|
|
245
270
|
|
|
246
271
|
if (xComponent === 'DatePicker') {
|
|
247
272
|
props.format = props.dateFormat || 'YYYY-MM-DD';
|
|
248
273
|
props.showTime = false;
|
|
249
|
-
props.placeholder =
|
|
274
|
+
props.placeholder = {
|
|
275
|
+
type: 'i18n',
|
|
276
|
+
'en': 'Select a date',
|
|
277
|
+
'zh-CN': '请选择日期',
|
|
278
|
+
'zh-HK': '請選擇日期',
|
|
279
|
+
};
|
|
250
280
|
props.defaultValue = null;
|
|
251
281
|
}
|
|
252
282
|
|
|
@@ -454,6 +454,59 @@ const dataSourceTable = {
|
|
|
454
454
|
// },
|
|
455
455
|
// ],
|
|
456
456
|
// },
|
|
457
|
+
|
|
458
|
+
{
|
|
459
|
+
type: 'group',
|
|
460
|
+
title: '额外参数',
|
|
461
|
+
display: 'entry',
|
|
462
|
+
items: [
|
|
463
|
+
{
|
|
464
|
+
name: 'extraParams.list',
|
|
465
|
+
title: {
|
|
466
|
+
type: 'i18n',
|
|
467
|
+
'en-US': 'List Params',
|
|
468
|
+
'zh-CN': '列表参数',
|
|
469
|
+
},
|
|
470
|
+
setter: 'JsonSetter'
|
|
471
|
+
},
|
|
472
|
+
{
|
|
473
|
+
name: 'extraParams.get',
|
|
474
|
+
title: {
|
|
475
|
+
type: 'i18n',
|
|
476
|
+
'en-US': 'Get Params',
|
|
477
|
+
'zh-CN': '获取参数',
|
|
478
|
+
},
|
|
479
|
+
setter: 'JsonSetter'
|
|
480
|
+
},
|
|
481
|
+
{
|
|
482
|
+
name: 'extraParams.update',
|
|
483
|
+
title: {
|
|
484
|
+
type: 'i18n',
|
|
485
|
+
'en-US': 'Update Params',
|
|
486
|
+
'zh-CN': '更新参数',
|
|
487
|
+
},
|
|
488
|
+
setter: 'JsonSetter'
|
|
489
|
+
},
|
|
490
|
+
// {
|
|
491
|
+
// name: 'extraParams.create',
|
|
492
|
+
// title: {
|
|
493
|
+
// type: 'i18n',
|
|
494
|
+
// 'en-US': 'Create Params',
|
|
495
|
+
// 'zh-CN': '创建参数',
|
|
496
|
+
// },
|
|
497
|
+
// setter: 'StringSetter'
|
|
498
|
+
// },
|
|
499
|
+
// {
|
|
500
|
+
// name: 'extraParams.destroy',
|
|
501
|
+
// title: {
|
|
502
|
+
// type: 'i18n',
|
|
503
|
+
// 'en-US': 'Destroy Params',
|
|
504
|
+
// 'zh-CN': '删除参数',
|
|
505
|
+
// },
|
|
506
|
+
// setter: 'StringSetter'
|
|
507
|
+
// }
|
|
508
|
+
]
|
|
509
|
+
}
|
|
457
510
|
],
|
|
458
511
|
},
|
|
459
512
|
|
|
@@ -816,6 +869,29 @@ const dataSourceTable = {
|
|
|
816
869
|
},
|
|
817
870
|
},
|
|
818
871
|
},
|
|
872
|
+
{
|
|
873
|
+
name: 'beforeOpen',
|
|
874
|
+
title: {
|
|
875
|
+
label: {
|
|
876
|
+
type: 'i18n',
|
|
877
|
+
'en-US': 'Before Open',
|
|
878
|
+
'zh-CN': '打开前校验',
|
|
879
|
+
},
|
|
880
|
+
tip: {
|
|
881
|
+
type: 'i18n',
|
|
882
|
+
'en-US': 'beforeOpen | Function to validate before opening',
|
|
883
|
+
'zh-CN': 'beforeOpen | 打开前的校验函数,返回 true 才会打开',
|
|
884
|
+
},
|
|
885
|
+
},
|
|
886
|
+
propType: 'func',
|
|
887
|
+
setter: {
|
|
888
|
+
componentName: 'FunctionSetter',
|
|
889
|
+
props: {
|
|
890
|
+
template:
|
|
891
|
+
"beforeOpen(values,${extParams}){\n// 校验数据\nreturn true}",
|
|
892
|
+
},
|
|
893
|
+
},
|
|
894
|
+
},
|
|
819
895
|
],
|
|
820
896
|
},
|
|
821
897
|
},
|
|
@@ -2375,13 +2451,13 @@ const dataSourceTable = {
|
|
|
2375
2451
|
},
|
|
2376
2452
|
tip: {
|
|
2377
2453
|
type: 'i18n',
|
|
2378
|
-
'en-US': 'Open mode | Dialog(modal)、Drawer(drawer)',
|
|
2379
|
-
'zh-CN': '打开方式 | 对话框(modal)、抽屉(drawer)',
|
|
2454
|
+
'en-US': 'Open mode | Dialog(modal)、Drawer(drawer) | Custom(custom)',
|
|
2455
|
+
'zh-CN': '打开方式 | 对话框(modal)、抽屉(drawer) | 自定义(custom)',
|
|
2380
2456
|
},
|
|
2381
2457
|
},
|
|
2382
2458
|
propType: {
|
|
2383
2459
|
type: 'oneOf',
|
|
2384
|
-
value: ['modal', 'drawer'],
|
|
2460
|
+
value: ['modal', 'drawer', 'custom'],
|
|
2385
2461
|
},
|
|
2386
2462
|
setter: {
|
|
2387
2463
|
componentName: 'RadioGroupSetter',
|
|
@@ -2395,11 +2471,40 @@ const dataSourceTable = {
|
|
|
2395
2471
|
title: '抽屉',
|
|
2396
2472
|
value: 'drawer',
|
|
2397
2473
|
},
|
|
2474
|
+
{
|
|
2475
|
+
title: '自定义',
|
|
2476
|
+
value: 'custom',
|
|
2477
|
+
},
|
|
2398
2478
|
],
|
|
2399
2479
|
},
|
|
2400
2480
|
},
|
|
2401
2481
|
defaultValue: 'drawer',
|
|
2402
2482
|
},
|
|
2483
|
+
{
|
|
2484
|
+
name: 'onClick',
|
|
2485
|
+
title: {
|
|
2486
|
+
label: {
|
|
2487
|
+
type: 'i18n',
|
|
2488
|
+
'en-US': 'Click Event',
|
|
2489
|
+
'zh-CN': '点击事件',
|
|
2490
|
+
},
|
|
2491
|
+
tip: {
|
|
2492
|
+
type: 'i18n',
|
|
2493
|
+
'en-US': 'Click event handler',
|
|
2494
|
+
'zh-CN': '点击事件处理函数',
|
|
2495
|
+
},
|
|
2496
|
+
},
|
|
2497
|
+
propType: 'func',
|
|
2498
|
+
setter: [
|
|
2499
|
+
{
|
|
2500
|
+
componentName: 'FunctionSetter',
|
|
2501
|
+
props: {
|
|
2502
|
+
template: 'onClick(record,${extParams}){\n// 点击按钮时的回调\nconsole.log("onClick", record);\n}',
|
|
2503
|
+
},
|
|
2504
|
+
},
|
|
2505
|
+
'VariableSetter',
|
|
2506
|
+
],
|
|
2507
|
+
},
|
|
2403
2508
|
{
|
|
2404
2509
|
name: 'openContentSize',
|
|
2405
2510
|
title: {
|
|
@@ -2527,6 +2632,37 @@ const dataSourceTable = {
|
|
|
2527
2632
|
},
|
|
2528
2633
|
},
|
|
2529
2634
|
},
|
|
2635
|
+
{
|
|
2636
|
+
name: 'show',
|
|
2637
|
+
title: {
|
|
2638
|
+
label: {
|
|
2639
|
+
type: 'i18n',
|
|
2640
|
+
'en-US': 'Show',
|
|
2641
|
+
'zh-CN': '是否展示',
|
|
2642
|
+
},
|
|
2643
|
+
tip: {
|
|
2644
|
+
type: 'i18n',
|
|
2645
|
+
'en-US': 'Whether to show this operation button',
|
|
2646
|
+
'zh-CN': '是否展示该操作按钮',
|
|
2647
|
+
},
|
|
2648
|
+
},
|
|
2649
|
+
propType: {
|
|
2650
|
+
type: 'oneOfType',
|
|
2651
|
+
value: ['JSFunction', 'bool',]
|
|
2652
|
+
},
|
|
2653
|
+
setter: [
|
|
2654
|
+
{
|
|
2655
|
+
componentName: 'FunctionSetter',
|
|
2656
|
+
props: {
|
|
2657
|
+
template:
|
|
2658
|
+
"show(record,${extParams}){\n// 校验数据\nreturn true}",
|
|
2659
|
+
},
|
|
2660
|
+
},
|
|
2661
|
+
{
|
|
2662
|
+
componentName: 'BoolSetter'
|
|
2663
|
+
},
|
|
2664
|
+
],
|
|
2665
|
+
}
|
|
2530
2666
|
],
|
|
2531
2667
|
},
|
|
2532
2668
|
},
|
|
@@ -236,6 +236,12 @@ export const getFormContent = (target: any, mode: 'add' | 'edit' | 'view') => {
|
|
|
236
236
|
showAfterSubmit: true,
|
|
237
237
|
title: toastTitleMap[mode as 'add' | 'edit'],
|
|
238
238
|
},
|
|
239
|
+
childrenString: {
|
|
240
|
+
type: 'i18n',
|
|
241
|
+
en: 'Save',
|
|
242
|
+
'zh-CN': '保存',
|
|
243
|
+
'zh-HK': '保存',
|
|
244
|
+
},
|
|
239
245
|
})
|
|
240
246
|
);
|
|
241
247
|
}
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import { datePickerPlaceholder } from "../_utils/defaultSchema";
|
|
2
|
+
|
|
1
3
|
export default [
|
|
2
4
|
{
|
|
3
5
|
title: '日期输入',
|
|
@@ -6,6 +8,7 @@ export default [
|
|
|
6
8
|
title: '日期输入',
|
|
7
9
|
componentName: 'FormItemDatePicker',
|
|
8
10
|
props: {
|
|
11
|
+
placeholder: datePickerPlaceholder,
|
|
9
12
|
showTime: false
|
|
10
13
|
},
|
|
11
14
|
},
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import { inputPlaceholder } from "../_utils/defaultSchema";
|
|
2
|
+
|
|
1
3
|
export default [
|
|
2
4
|
{
|
|
3
5
|
title: '单行文本',
|
|
@@ -6,7 +8,7 @@ export default [
|
|
|
6
8
|
componentName: 'FormItemInput',
|
|
7
9
|
title: '单行文本',
|
|
8
10
|
props: {
|
|
9
|
-
placeholder:
|
|
11
|
+
placeholder: inputPlaceholder,
|
|
10
12
|
allowClear: true,
|
|
11
13
|
},
|
|
12
14
|
},
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import { inputPlaceholder } from "../_utils/defaultSchema";
|
|
2
|
+
|
|
1
3
|
export default [
|
|
2
4
|
{
|
|
3
5
|
title: '数字输入',
|
|
@@ -8,6 +10,7 @@ export default [
|
|
|
8
10
|
componentName: 'FormItemInputNumber',
|
|
9
11
|
props: {
|
|
10
12
|
allowClear: true,
|
|
13
|
+
placeholder: inputPlaceholder,
|
|
11
14
|
},
|
|
12
15
|
},
|
|
13
16
|
},
|
|
@@ -21,6 +24,7 @@ export default [
|
|
|
21
24
|
props: {
|
|
22
25
|
addonAfter: '%',
|
|
23
26
|
allowClear: true,
|
|
27
|
+
placeholder: inputPlaceholder,
|
|
24
28
|
},
|
|
25
29
|
},
|
|
26
30
|
},
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import { inputPlaceholder } from "../_utils/defaultSchema";
|
|
2
|
+
|
|
1
3
|
export default [
|
|
2
4
|
{
|
|
3
5
|
title: '电子邮箱输入',
|
|
@@ -6,6 +8,7 @@ export default [
|
|
|
6
8
|
componentName: 'FormItemInput.Email',
|
|
7
9
|
title: '电子邮箱输入',
|
|
8
10
|
props: {
|
|
11
|
+
placeholder: inputPlaceholder,
|
|
9
12
|
typeobj: {
|
|
10
13
|
type: 'email',
|
|
11
14
|
enabled: true,
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import { inputPlaceholder } from "../_utils/defaultSchema";
|
|
2
|
+
|
|
1
3
|
export default [
|
|
2
4
|
{
|
|
3
5
|
title: 'JSON',
|
|
@@ -6,10 +8,11 @@ export default [
|
|
|
6
8
|
title: 'JSON',
|
|
7
9
|
componentName: 'FormItemInput.JSON',
|
|
8
10
|
props: {
|
|
11
|
+
|
|
9
12
|
autoSize: {
|
|
10
13
|
minRows: 4,
|
|
11
14
|
},
|
|
12
|
-
placeholder:
|
|
15
|
+
placeholder: inputPlaceholder,
|
|
13
16
|
normalize: {
|
|
14
17
|
type: 'JSExpression',
|
|
15
18
|
value:
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import { inputPlaceholder } from "../_utils/defaultSchema";
|
|
2
|
+
|
|
1
3
|
export default [
|
|
2
4
|
{
|
|
3
5
|
title: '手机号码输入',
|
|
@@ -6,6 +8,7 @@ export default [
|
|
|
6
8
|
title: '手机号码输入',
|
|
7
9
|
componentName: 'FormItemInput.Phone',
|
|
8
10
|
props: {
|
|
11
|
+
placeholder: inputPlaceholder,
|
|
9
12
|
type: 'tel',
|
|
10
13
|
allowClear: true,
|
|
11
14
|
typeobj: {
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import { inputPlaceholder } from "../_utils/defaultSchema";
|
|
2
|
+
|
|
1
3
|
export default [
|
|
2
4
|
{
|
|
3
5
|
title: "多行文本",
|
|
@@ -7,7 +9,7 @@ export default [
|
|
|
7
9
|
componentName: 'FormItemInput.TextArea',
|
|
8
10
|
props: {
|
|
9
11
|
allowClear: true,
|
|
10
|
-
placeholder:
|
|
12
|
+
placeholder: inputPlaceholder,
|
|
11
13
|
},
|
|
12
14
|
},
|
|
13
15
|
},
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import { inputPlaceholder } from "../_utils/defaultSchema";
|
|
2
|
+
|
|
1
3
|
export default [
|
|
2
4
|
{
|
|
3
5
|
title: '链接输入',
|
|
@@ -6,6 +8,7 @@ export default [
|
|
|
6
8
|
componentName: 'FormItemInput.URL',
|
|
7
9
|
title: '链接输入',
|
|
8
10
|
props: {
|
|
11
|
+
placeholder: inputPlaceholder,
|
|
9
12
|
allowClear: true,
|
|
10
13
|
typeobj: {
|
|
11
14
|
type: 'url',
|
|
@@ -33,11 +33,12 @@ export default {
|
|
|
33
33
|
// 信息分组
|
|
34
34
|
getFormItemGeneralInfoGroup([
|
|
35
35
|
generalItemMap['label'],
|
|
36
|
+
generalItemMap['placeholder'],
|
|
36
37
|
generalItemMap['tooltip'],
|
|
37
38
|
generalItemMap['extra'],
|
|
38
39
|
generalItemMap['hideLabel'],
|
|
39
40
|
generalItemMap['renderMode'],
|
|
40
|
-
|
|
41
|
+
generalItemMap['defaultValue'],
|
|
41
42
|
]),
|
|
42
43
|
// 选项类型分组
|
|
43
44
|
formItemGeneralOptionTypeGroup,
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import { selectPlaceholder, selectMultiplePlaceholder } from "../_utils/defaultSchema";
|
|
2
|
+
|
|
1
3
|
export default [
|
|
2
4
|
{
|
|
3
5
|
title: '单项选择器',
|
|
@@ -7,9 +9,11 @@ export default [
|
|
|
7
9
|
componentName: 'FormItemSelect',
|
|
8
10
|
props: {
|
|
9
11
|
allowClear: true,
|
|
12
|
+
placeholder: selectPlaceholder,
|
|
10
13
|
optionSourceType: 'default',
|
|
11
14
|
optionFilterProp: 'label',
|
|
12
15
|
styleType: "antd",
|
|
16
|
+
showSearch: true,
|
|
13
17
|
options: [
|
|
14
18
|
{
|
|
15
19
|
label: 'A',
|
|
@@ -36,6 +40,8 @@ export default [
|
|
|
36
40
|
props: {
|
|
37
41
|
allowClear: true,
|
|
38
42
|
mode: 'multiple',
|
|
43
|
+
showSearch: true,
|
|
44
|
+
placeholder: selectMultiplePlaceholder,
|
|
39
45
|
optionSourceType: 'default',
|
|
40
46
|
optionFilterProp: 'label',
|
|
41
47
|
styleType: "antd",
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import { timePickerPlaceholder } from "../_utils/defaultSchema";
|
|
2
|
+
|
|
1
3
|
export default [
|
|
2
4
|
{
|
|
3
5
|
title: '时间录入',
|
|
@@ -6,6 +8,7 @@ export default [
|
|
|
6
8
|
title: '时间录入',
|
|
7
9
|
componentName: 'FormItemTimePicker',
|
|
8
10
|
props: {
|
|
11
|
+
placeholder: timePickerPlaceholder,
|
|
9
12
|
format: 'HH:mm'
|
|
10
13
|
},
|
|
11
14
|
},
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import { inputPlaceholder } from "../_utils/defaultSchema";
|
|
2
|
+
|
|
1
3
|
export default [
|
|
2
4
|
{
|
|
3
5
|
title: '多语言文本',
|
|
@@ -5,7 +7,7 @@ export default [
|
|
|
5
7
|
componentName: 'FormItemTranslation',
|
|
6
8
|
title: '多语言文本',
|
|
7
9
|
props: {
|
|
8
|
-
placeholder:
|
|
10
|
+
placeholder: inputPlaceholder,
|
|
9
11
|
allowClear: true,
|
|
10
12
|
},
|
|
11
13
|
},
|