@pisell/materials 6.0.5 → 6.0.7

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 (181) 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 +7 -7
  6. package/build/lowcode/preview.js +8 -8
  7. package/build/lowcode/render/default/view.css +1 -1
  8. package/build/lowcode/render/default/view.js +21 -53
  9. package/build/lowcode/view.css +1 -1
  10. package/build/lowcode/view.js +18 -50
  11. package/es/components/config-provider/index.js +1 -1
  12. package/es/components/dataSourceComponents/dataSourceForm/BaseForm.js +20 -11
  13. package/es/components/dataSourceComponents/dataSourceForm/formItem.js +1 -1
  14. package/es/components/dataSourceComponents/dataSourceForm/group/index.less +2 -2
  15. package/es/components/dataSourceComponents/dataSourceForm/index.js +4 -2
  16. package/es/components/dataSourceComponents/dataSourceForm/provider/formSetting/FormSettingContext.d.ts +4 -0
  17. package/es/components/dataSourceComponents/dataSourceForm/provider/formSetting/FormSettingProvider.js +11 -3
  18. package/es/components/dataSourceComponents/dataSourceForm/provider/jsonWrapper/JsonWrapperProvider.js +10 -3
  19. package/es/components/dataSourceComponents/dataSourceForm/serve.d.ts +3 -2
  20. package/es/components/dataSourceComponents/dataSourceForm/serve.js +36 -20
  21. package/es/components/dataSourceComponents/dataSourceForm/submitButton/index.js +50 -35
  22. package/es/components/dataSourceComponents/dataSourceForm/type.d.ts +5 -0
  23. package/es/components/dataSourceComponents/dataSourceForm/utils.d.ts +3 -1
  24. package/es/components/dataSourceComponents/dataSourceForm/utils.js +38 -10
  25. package/es/components/dataSourceComponents/dataSourceTable/BaseTable.js +6 -1
  26. package/es/components/dataSourceComponents/dataSourceTable/filter/index.js +1 -1
  27. package/es/components/dataSourceComponents/dataSourceTable/hooks/useColumns.js +4 -1
  28. package/es/components/dataSourceComponents/dataSourceTable/hooks/useFormat.js +2 -2
  29. package/es/components/dataSourceComponents/dataSourceTable/hooks/useTableProps.d.ts +14 -0
  30. package/es/components/dataSourceComponents/dataSourceTable/hooks/useTableProps.js +48 -4
  31. package/es/components/dataSourceComponents/dataSourceTable/hooks/useTableQuery.js +2 -2
  32. package/es/components/dataSourceComponents/dataSourceTable/index.js +4 -2
  33. package/es/components/dataSourceComponents/dataSourceTable/type.d.ts +15 -1
  34. package/es/components/dataSourceComponents/fields/Input.Phone/WithMode.js +7 -1
  35. package/es/components/dataSourceComponents/fields/Input.Url/ReadPretty.d.ts +1 -0
  36. package/es/components/dataSourceComponents/fields/Input.Url/ReadPretty.js +16 -1
  37. package/es/components/dataSourceComponents/fields/Input.Url/ReadPretty.less +1 -1
  38. package/es/components/dataSourceComponents/fields/Select/index.js +7 -1
  39. package/es/components/dataSourceComponents/fields/Upload/serve.d.ts +4 -1
  40. package/es/components/dataSourceComponents/fields/Upload/serve.js +10 -31
  41. package/es/components/dataSourceComponents/hooks/useActions.d.ts +2 -1
  42. package/es/components/dataSourceComponents/hooks/useActions.js +73 -36
  43. package/es/components/dataSourceComponents/provider/dataSource/DataSourceContext.d.ts +7 -0
  44. package/es/components/dataSourceComponents/provider/dataSource/DataSourceProvider.js +3 -1
  45. package/es/components/dataSourceComponents/provider/variables/VariablesProvider.js +53 -6
  46. package/es/components/login-and-register/index.d.ts +82 -0
  47. package/es/components/login-and-register/index.js +360 -0
  48. package/es/components/login-and-register/index.less +211 -0
  49. package/es/components/organizationTenantSwitcher/defaultLogo.png +0 -0
  50. package/es/components/organizationTenantSwitcher/index.d.ts +17 -0
  51. package/es/components/organizationTenantSwitcher/index.js +96 -0
  52. package/es/components/organizationTenantSwitcher/index.less +88 -0
  53. package/es/components/page/index.js +8 -6
  54. package/es/components/page-header/index.d.ts +14 -0
  55. package/es/components/page-header/index.js +36 -0
  56. package/es/components/page-header/index.less +45 -0
  57. package/es/components/pisellAvatar/index.d.ts +19 -0
  58. package/es/components/pisellAvatar/index.js +89 -0
  59. package/es/components/pisellAvatar/index.less +26 -0
  60. package/es/components/pisellModal/components/PcModal/index.js +1 -1
  61. package/es/components/pisellTags/index.d.ts +13 -0
  62. package/es/components/pisellTags/index.js +83 -0
  63. package/es/components/pisellTags/index.less +17 -0
  64. package/es/components/pisellTags/utils.d.ts +1 -0
  65. package/es/components/pisellTags/utils.js +89 -0
  66. package/es/components/pisellText/components/Amount/index.js +1 -1
  67. package/es/components/profileMenu/index.d.ts +26 -0
  68. package/es/components/profileMenu/index.js +115 -0
  69. package/es/components/profileMenu/index.less +135 -0
  70. package/es/components/select/index.js +3 -2
  71. package/es/components/table/Header/index.js +8 -11
  72. package/es/index.d.ts +6 -0
  73. package/es/index.js +7 -1
  74. package/es/locales/en-US.d.ts +1 -0
  75. package/es/locales/en-US.js +1 -0
  76. package/es/locales/zh-CN.d.ts +1 -0
  77. package/es/locales/zh-CN.js +1 -0
  78. package/es/locales/zh-TW.d.ts +1 -0
  79. package/es/locales/zh-TW.js +1 -0
  80. package/lib/components/config-provider/index.js +1 -1
  81. package/lib/components/dataSourceComponents/dataSourceForm/BaseForm.js +22 -4
  82. package/lib/components/dataSourceComponents/dataSourceForm/formItem.js +1 -1
  83. package/lib/components/dataSourceComponents/dataSourceForm/group/index.less +2 -2
  84. package/lib/components/dataSourceComponents/dataSourceForm/index.js +3 -2
  85. package/lib/components/dataSourceComponents/dataSourceForm/provider/formSetting/FormSettingContext.d.ts +4 -0
  86. package/lib/components/dataSourceComponents/dataSourceForm/provider/formSetting/FormSettingProvider.js +17 -3
  87. package/lib/components/dataSourceComponents/dataSourceForm/provider/jsonWrapper/JsonWrapperProvider.js +16 -6
  88. package/lib/components/dataSourceComponents/dataSourceForm/serve.d.ts +3 -2
  89. package/lib/components/dataSourceComponents/dataSourceForm/serve.js +9 -5
  90. package/lib/components/dataSourceComponents/dataSourceForm/submitButton/index.js +19 -9
  91. package/lib/components/dataSourceComponents/dataSourceForm/type.d.ts +5 -0
  92. package/lib/components/dataSourceComponents/dataSourceForm/utils.d.ts +3 -1
  93. package/lib/components/dataSourceComponents/dataSourceForm/utils.js +51 -5
  94. package/lib/components/dataSourceComponents/dataSourceTable/BaseTable.js +6 -1
  95. package/lib/components/dataSourceComponents/dataSourceTable/filter/index.js +1 -1
  96. package/lib/components/dataSourceComponents/dataSourceTable/hooks/useColumns.js +4 -1
  97. package/lib/components/dataSourceComponents/dataSourceTable/hooks/useFormat.js +1 -1
  98. package/lib/components/dataSourceComponents/dataSourceTable/hooks/useTableProps.d.ts +14 -0
  99. package/lib/components/dataSourceComponents/dataSourceTable/hooks/useTableProps.js +46 -3
  100. package/lib/components/dataSourceComponents/dataSourceTable/hooks/useTableQuery.js +2 -2
  101. package/lib/components/dataSourceComponents/dataSourceTable/index.js +2 -2
  102. package/lib/components/dataSourceComponents/dataSourceTable/type.d.ts +15 -1
  103. package/lib/components/dataSourceComponents/fields/Input.Phone/WithMode.js +6 -1
  104. package/lib/components/dataSourceComponents/fields/Input.Url/ReadPretty.d.ts +1 -0
  105. package/lib/components/dataSourceComponents/fields/Input.Url/ReadPretty.js +17 -2
  106. package/lib/components/dataSourceComponents/fields/Input.Url/ReadPretty.less +1 -1
  107. package/lib/components/dataSourceComponents/fields/Select/index.js +5 -1
  108. package/lib/components/dataSourceComponents/fields/Upload/serve.d.ts +4 -1
  109. package/lib/components/dataSourceComponents/fields/Upload/serve.js +20 -12
  110. package/lib/components/dataSourceComponents/hooks/useActions.d.ts +2 -1
  111. package/lib/components/dataSourceComponents/hooks/useActions.js +25 -7
  112. package/lib/components/dataSourceComponents/provider/dataSource/DataSourceContext.d.ts +7 -0
  113. package/lib/components/dataSourceComponents/provider/dataSource/DataSourceProvider.js +3 -1
  114. package/lib/components/dataSourceComponents/provider/variables/VariablesProvider.js +48 -7
  115. package/lib/components/login-and-register/index.d.ts +82 -0
  116. package/lib/components/login-and-register/index.js +261 -0
  117. package/lib/components/login-and-register/index.less +211 -0
  118. package/lib/components/organizationTenantSwitcher/defaultLogo.png +0 -0
  119. package/lib/components/organizationTenantSwitcher/index.d.ts +17 -0
  120. package/lib/components/organizationTenantSwitcher/index.js +119 -0
  121. package/lib/components/organizationTenantSwitcher/index.less +88 -0
  122. package/lib/components/page/index.js +6 -6
  123. package/lib/components/page-header/index.d.ts +14 -0
  124. package/lib/components/page-header/index.js +63 -0
  125. package/lib/components/page-header/index.less +45 -0
  126. package/lib/components/pisellAvatar/index.d.ts +19 -0
  127. package/lib/components/pisellAvatar/index.js +108 -0
  128. package/lib/components/pisellAvatar/index.less +26 -0
  129. package/lib/components/pisellModal/components/PcModal/index.js +1 -1
  130. package/lib/components/pisellTags/index.d.ts +13 -0
  131. package/lib/components/pisellTags/index.js +113 -0
  132. package/lib/components/pisellTags/index.less +17 -0
  133. package/lib/components/pisellTags/utils.d.ts +1 -0
  134. package/lib/components/pisellTags/utils.js +86 -0
  135. package/lib/components/pisellText/components/Amount/index.js +2 -2
  136. package/lib/components/profileMenu/index.d.ts +26 -0
  137. package/lib/components/profileMenu/index.js +113 -0
  138. package/lib/components/profileMenu/index.less +135 -0
  139. package/lib/components/select/index.js +2 -1
  140. package/lib/components/table/Header/index.js +11 -1
  141. package/lib/index.d.ts +6 -0
  142. package/lib/index.js +18 -0
  143. package/lib/locales/en-US.d.ts +1 -0
  144. package/lib/locales/en-US.js +1 -0
  145. package/lib/locales/zh-CN.d.ts +1 -0
  146. package/lib/locales/zh-CN.js +1 -0
  147. package/lib/locales/zh-TW.d.ts +1 -0
  148. package/lib/locales/zh-TW.js +1 -0
  149. package/lowcode/_utils/defaultSchema.ts +64 -0
  150. package/lowcode/data-source-form/meta.ts +130 -0
  151. package/lowcode/data-source-form/utils.ts +33 -3
  152. package/lowcode/data-source-table/meta.ts +420 -3
  153. package/lowcode/data-source-table/utils.tsx +6 -0
  154. package/lowcode/form-item-date-picker/snippets.ts +3 -0
  155. package/lowcode/form-item-input/snippets.ts +3 -1
  156. package/lowcode/form-item-input-number/snippets.ts +4 -0
  157. package/lowcode/form-item-input.email/snippets.ts +3 -0
  158. package/lowcode/form-item-input.json/snippets.ts +4 -1
  159. package/lowcode/form-item-input.password/snippets.ts +3 -0
  160. package/lowcode/form-item-input.phone/snippets.ts +3 -0
  161. package/lowcode/form-item-input.text-area/snippets.ts +3 -1
  162. package/lowcode/form-item-input.url/snippets.ts +3 -0
  163. package/lowcode/form-item-select/meta.ts +2 -1
  164. package/lowcode/form-item-select/snippets.ts +6 -0
  165. package/lowcode/form-item-time-picker/snippets.ts +3 -0
  166. package/lowcode/form-item-translation/snippets.ts +3 -1
  167. package/lowcode/login-and-register/meta.ts +541 -0
  168. package/lowcode/login-and-register/snippets.ts +38 -0
  169. package/lowcode/organization-tenant-switch/meta.ts +127 -0
  170. package/lowcode/page-header/meta.ts +68 -124
  171. package/lowcode/page-header/snippets.ts +1 -1
  172. package/lowcode/pisell-avatar/__screenshots__/avatar-1.jpg +0 -0
  173. package/lowcode/pisell-avatar/meta.ts +111 -0
  174. package/lowcode/pisell-avatar/snippets.ts +14 -0
  175. package/lowcode/pisell-tags/__screenshots__/tag-1.png +0 -0
  176. package/lowcode/pisell-tags/meta.ts +123 -0
  177. package/lowcode/pisell-tags/snippets.ts +14 -0
  178. package/lowcode/profile-menu/meta.ts +175 -0
  179. package/lowcode/profile-menu/snippets.ts +71 -0
  180. package/lowcode/submit-button/meta.ts +6 -0
  181. package/package.json +3 -3
@@ -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
  },
@@ -853,6 +929,287 @@ const dataSourceTable = {
853
929
  },
854
930
  ],
855
931
  },
932
+ {
933
+ title: "表格按钮",
934
+ display: 'entry',
935
+ type: 'group',
936
+ name: '_tableButtons',
937
+ items: [
938
+ {
939
+ name: 'tableButtons.show',
940
+ title: {
941
+ label: {
942
+ type: 'i18n',
943
+ 'en-US': 'Show Table Buttons',
944
+ 'zh-CN': '开启表格按钮组',
945
+ },
946
+ tip: {
947
+ type: 'i18n',
948
+ 'en-US': 'tableButtons.show | Whether to display the table button group',
949
+ 'zh-CN': 'tableButtons.show | 是否显示表格按钮组',
950
+ },
951
+ },
952
+ propType: 'bool',
953
+ setter: 'BoolSetter',
954
+ defaultValue: false,
955
+ },
956
+ {
957
+ name: 'tableButtons.items',
958
+ title: {
959
+ label: {
960
+ type: 'i18n',
961
+ 'en-US': 'Table Buttons',
962
+ 'zh-CN': '表格按钮组',
963
+ },
964
+ tip: {
965
+ type: 'i18n',
966
+ 'en-US': 'tableButtons.items | Table buttons on the right',
967
+ 'zh-CN': 'tableButtons.items | 表格右侧按钮项',
968
+ },
969
+ },
970
+ condition: {
971
+ type: 'JSFunction',
972
+ value:
973
+ 'target => !!target.getProps().getPropValue("tableButtons.show")',
974
+ },
975
+ setter: {
976
+ componentName: 'ArraySetter',
977
+ props: {
978
+ itemSetter: {
979
+ componentName: 'ObjectSetter',
980
+ props: {
981
+ config: {
982
+ items: [
983
+ {
984
+ name: 'label',
985
+ title: {
986
+ label: {
987
+ type: 'i18n',
988
+ 'en-US': 'Button Text',
989
+ 'zh-CN': '按钮文案',
990
+ },
991
+ tip: {
992
+ type: 'i18n',
993
+ 'en-US': 'buttonText | Button text',
994
+ 'zh-CN': 'buttonText | 按钮文案',
995
+ },
996
+ },
997
+ propType: 'string',
998
+ setter: 'PisellI18nSetter',
999
+ isRequired: true,
1000
+ },
1001
+ {
1002
+ name: 'openMode',
1003
+ condition: (target: any) => {
1004
+ const actionType =
1005
+ target.parent.getPropValue('actionType');
1006
+ return actionType === 'add';
1007
+ },
1008
+ title: {
1009
+ label: {
1010
+ type: 'i18n',
1011
+ 'en-US': 'Open Mode',
1012
+ 'zh-CN': '打开方式',
1013
+ },
1014
+ tip: {
1015
+ type: 'i18n',
1016
+ 'en-US': 'openMode | Open mode',
1017
+ 'zh-CN': 'openMode | 打开方式',
1018
+ },
1019
+ },
1020
+ propType: {
1021
+ type: 'oneOf',
1022
+ value: ['modal', 'drawer'],
1023
+ },
1024
+ setter: {
1025
+ componentName: 'RadioGroupSetter',
1026
+ props: {
1027
+ options: [
1028
+ {
1029
+ title: '对话框',
1030
+ value: 'modal',
1031
+ },
1032
+ {
1033
+ title: '抽屉',
1034
+ value: 'drawer',
1035
+ },
1036
+ ],
1037
+ },
1038
+ },
1039
+ defaultValue: 'drawer',
1040
+ },
1041
+ {
1042
+ name: 'openContentSize',
1043
+ condition: (target: any) => {
1044
+ const actionType =
1045
+ target.parent.getPropValue('actionType');
1046
+ return actionType === 'add';
1047
+ },
1048
+ title: {
1049
+ label: {
1050
+ type: 'i18n',
1051
+ 'en-US': 'Dialog Size',
1052
+ 'zh-CN': '弹窗尺寸',
1053
+ },
1054
+ tip: {
1055
+ type: 'i18n',
1056
+ 'en-US': 'dialogSize | Dialog size',
1057
+ 'zh-CN': 'dialogSize | 弹窗尺寸',
1058
+ },
1059
+ },
1060
+ propType: {
1061
+ type: 'oneOf',
1062
+ value: ['small', 'middle', 'large'],
1063
+ },
1064
+ setter: {
1065
+ componentName: 'RadioGroupSetter',
1066
+ props: {
1067
+ options: [
1068
+ {
1069
+ title: '较窄',
1070
+ value: 'small',
1071
+ },
1072
+ {
1073
+ title: '中等',
1074
+ value: 'middle',
1075
+ },
1076
+ {
1077
+ title: '较宽',
1078
+ value: 'large',
1079
+ },
1080
+ ],
1081
+ },
1082
+ },
1083
+ defaultValue: 'middle',
1084
+ },
1085
+ {
1086
+ name: 'openTitle',
1087
+ title: {
1088
+ label: {
1089
+ type: 'i18n',
1090
+ 'en-US': 'Dialog Title',
1091
+ 'zh-CN': '弹窗标题',
1092
+ },
1093
+ tip: {
1094
+ type: 'i18n',
1095
+ 'en-US': 'dialogTitle | Dialog title',
1096
+ 'zh-CN': 'dialogTitle | 弹窗标题',
1097
+ },
1098
+ },
1099
+ propType: 'string',
1100
+ setter: 'PisellI18nSetter',
1101
+ isRequired: true,
1102
+ condition: (target: any) => {
1103
+ const actionType =
1104
+ target.parent.getPropValue('actionType');
1105
+ return actionType === 'add';
1106
+ },
1107
+ },
1108
+ {
1109
+ name: 'actionType',
1110
+ title: {
1111
+ label: {
1112
+ type: 'i18n',
1113
+ 'en-US': 'Action Type',
1114
+ 'zh-CN': '操作类型',
1115
+ },
1116
+ tip: {
1117
+ type: 'i18n',
1118
+ 'en-US': 'actionType | Action type',
1119
+ 'zh-CN': 'actionType | 操作类型',
1120
+ },
1121
+ },
1122
+ propType: {
1123
+ type: 'oneOf',
1124
+ value: ['add', 'custom'],
1125
+ },
1126
+ extraProps: {
1127
+ setValue(target: any, value: any) {
1128
+ const key = target.parent.getPropValue('key');
1129
+ if (['add', 'custom'].includes(value)) {
1130
+ let content: any = getJsSlot();
1131
+ if (value !== 'custom') {
1132
+ content = getFormContent(target, value);
1133
+ }
1134
+ target.node.setPropValue('operationContent', {
1135
+ ...(target.node.getPropValue(
1136
+ 'operationContent'
1137
+ ) || {}),
1138
+ [key]: content,
1139
+ });
1140
+ }
1141
+
1142
+ return target.parent.setPropValue(
1143
+ 'actionType',
1144
+ value
1145
+ );
1146
+ },
1147
+ },
1148
+ setter: {
1149
+ componentName: 'RadioGroupSetter',
1150
+ props: {
1151
+ options: [
1152
+ {
1153
+ title: '添加',
1154
+ value: 'add',
1155
+ },
1156
+ {
1157
+ title: '自定义',
1158
+ value: 'custom',
1159
+ },
1160
+ ],
1161
+ },
1162
+ },
1163
+ },
1164
+ {
1165
+ name: 'buttonProps',
1166
+ title: {
1167
+ label: {
1168
+ type: 'i18n',
1169
+ 'en-US': 'Button Style',
1170
+ 'zh-CN': '按钮样式',
1171
+ },
1172
+ },
1173
+ propType: 'object',
1174
+ setter: 'JsonSetter',
1175
+ },
1176
+ ],
1177
+ },
1178
+ },
1179
+ initialValue: () => {
1180
+ return {
1181
+ key: uuid(),
1182
+ title: '操作',
1183
+ };
1184
+ },
1185
+ },
1186
+ },
1187
+ },
1188
+ },
1189
+ {
1190
+ name: 'tableButtons.maxCount',
1191
+ title: {
1192
+ label: {
1193
+ type: 'i18n',
1194
+ 'en-US': 'Max Count',
1195
+ 'zh-CN': '最大展示数量',
1196
+ },
1197
+ tip: {
1198
+ type: 'i18n',
1199
+ 'en-US': 'maxCount | Maximum display count',
1200
+ 'zh-CN': 'maxCount | 最大展示数量',
1201
+ },
1202
+ },
1203
+ propType: 'number',
1204
+ condition: {
1205
+ type: 'JSFunction',
1206
+ value:
1207
+ 'target => !!target.getProps().getPropValue("tableButtons.show")',
1208
+ },
1209
+ setter: 'NumberSetter',
1210
+ }
1211
+ ],
1212
+ },
856
1213
  {
857
1214
  title: "标签页",
858
1215
  display: 'entry',
@@ -2094,13 +2451,13 @@ const dataSourceTable = {
2094
2451
  },
2095
2452
  tip: {
2096
2453
  type: 'i18n',
2097
- 'en-US': 'Open mode | Dialog(modal)、Drawer(drawer)',
2098
- 'zh-CN': '打开方式 | 对话框(modal)、抽屉(drawer)',
2454
+ 'en-US': 'Open mode | Dialog(modal)、Drawer(drawer) | Custom(custom)',
2455
+ 'zh-CN': '打开方式 | 对话框(modal)、抽屉(drawer) | 自定义(custom)',
2099
2456
  },
2100
2457
  },
2101
2458
  propType: {
2102
2459
  type: 'oneOf',
2103
- value: ['modal', 'drawer'],
2460
+ value: ['modal', 'drawer', 'custom'],
2104
2461
  },
2105
2462
  setter: {
2106
2463
  componentName: 'RadioGroupSetter',
@@ -2114,11 +2471,40 @@ const dataSourceTable = {
2114
2471
  title: '抽屉',
2115
2472
  value: 'drawer',
2116
2473
  },
2474
+ {
2475
+ title: '自定义',
2476
+ value: 'custom',
2477
+ },
2117
2478
  ],
2118
2479
  },
2119
2480
  },
2120
2481
  defaultValue: 'drawer',
2121
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
+ },
2122
2508
  {
2123
2509
  name: 'openContentSize',
2124
2510
  title: {
@@ -2246,6 +2632,37 @@ const dataSourceTable = {
2246
2632
  },
2247
2633
  },
2248
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
+ }
2249
2666
  ],
2250
2667
  },
2251
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: '密码输入',
@@ -8,6 +10,7 @@ export default [
8
10
  props: {
9
11
  // defaultValue: '123456',
10
12
  allowClear: true,
13
+ placeholder: inputPlaceholder,
11
14
  },
12
15
  },
13
16
  },
@@ -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
- // generalItemMap['defaultValue'],
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
  },