@pisell/materials 1.0.472 → 1.0.474
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 +7 -7
- package/build/lowcode/render/default/view.css +1 -1
- package/build/lowcode/render/default/view.js +18 -18
- package/build/lowcode/view.css +1 -1
- package/build/lowcode/view.js +17 -17
- package/es/components/cardMetricItem/index.less +1 -0
- package/es/components/dataSourceComponents/dataSourceForm/index.less +1 -1
- package/es/components/dataSourceComponents/dataSourceForm/serve.d.ts +1 -0
- package/es/components/dataSourceComponents/dataSourceForm/serve.js +4 -3
- package/es/components/dataSourceComponents/dataSourceForm/utils.d.ts +2 -2
- package/es/components/dataSourceComponents/dataSourceForm/utils.js +41 -17
- package/es/components/dataSourceComponents/dataSourceShow/dataSourceImage/index.d.ts +3 -0
- package/es/components/dataSourceComponents/dataSourceShow/dataSourceImage/index.js +4 -0
- package/es/components/dataSourceComponents/dataSourceShow/dataSourceQRCode/index.d.ts +3 -0
- package/es/components/dataSourceComponents/dataSourceShow/dataSourceQRCode/index.js +4 -0
- package/es/components/dataSourceComponents/dataSourceShow/dataSourceTypography/index.d.ts +10 -0
- package/es/components/dataSourceComponents/dataSourceShow/dataSourceTypography/index.js +15 -0
- package/es/components/dataSourceComponents/dataSourceShow/utils.d.ts +6 -0
- package/es/components/dataSourceComponents/dataSourceShow/utils.js +82 -0
- package/es/components/dataSourceComponents/dataSourceTable/BaseTable.js +33 -139
- package/es/components/dataSourceComponents/dataSourceTable/filter/index.d.ts +25 -0
- package/es/components/dataSourceComponents/dataSourceTable/filter/index.js +162 -0
- package/es/components/dataSourceComponents/dataSourceTable/filter/utils.d.ts +8 -0
- package/es/components/dataSourceComponents/dataSourceTable/filter/utils.js +135 -0
- package/es/components/dataSourceComponents/dataSourceTable/hooks/useDataSourceKey.d.ts +2 -2
- package/es/components/dataSourceComponents/dataSourceTable/hooks/useDataSourceKey.js +1 -1
- package/es/components/dataSourceComponents/dataSourceTable/hooks/useDesignMode.js +35 -39
- package/es/components/dataSourceComponents/dataSourceTable/hooks/useDrawerState.d.ts +20 -4
- package/es/components/dataSourceComponents/dataSourceTable/hooks/useDrawerState.js +65 -11
- package/es/components/dataSourceComponents/dataSourceTable/hooks/useFormat.d.ts +17 -1
- package/es/components/dataSourceComponents/dataSourceTable/hooks/useFormat.js +105 -6
- package/es/components/dataSourceComponents/dataSourceTable/hooks/useTableProps.d.ts +77 -0
- package/es/components/dataSourceComponents/dataSourceTable/hooks/useTableProps.js +245 -0
- package/es/components/dataSourceComponents/dataSourceTable/hooks/useTableQuery.d.ts +20 -7
- package/es/components/dataSourceComponents/dataSourceTable/hooks/useTableQuery.js +41 -12
- package/es/components/dataSourceComponents/dataSourceTable/index.d.ts +1 -0
- package/es/components/dataSourceComponents/dataSourceTable/index.js +1 -0
- package/es/components/dataSourceComponents/dataSourceTable/index.less +5 -0
- package/es/components/dataSourceComponents/dataSourceTable/type.d.ts +57 -9
- package/es/components/dataSourceComponents/dataSourceWrapper/BaseWrapper.d.ts +7 -0
- package/es/components/dataSourceComponents/dataSourceWrapper/BaseWrapper.js +23 -0
- package/es/components/dataSourceComponents/dataSourceWrapper/index.d.ts +2 -4
- package/es/components/dataSourceComponents/dataSourceWrapper/index.js +17 -2
- package/es/components/dataSourceComponents/fields/Checkbox/ReadPretty.js +7 -1
- package/es/components/dataSourceComponents/fields/Checkbox/index.js +3 -1
- package/es/components/dataSourceComponents/fields/DatePicker/index.js +5 -1
- package/es/components/dataSourceComponents/fields/DateRangePicker/ReadPretty.d.ts +4 -0
- package/es/components/dataSourceComponents/fields/DateRangePicker/ReadPretty.js +7 -0
- package/es/components/dataSourceComponents/fields/DateRangePicker/WithMode.d.ts +4 -0
- package/es/components/dataSourceComponents/fields/DateRangePicker/WithMode.js +5 -0
- package/es/components/dataSourceComponents/fields/DateRangePicker/index.d.ts +4 -0
- package/es/components/dataSourceComponents/fields/DateRangePicker/index.js +5 -0
- package/es/components/dataSourceComponents/fields/DateRangePicker/index.less +14 -0
- package/es/components/dataSourceComponents/fields/DateRangePicker/type.d.ts +4 -0
- package/es/components/dataSourceComponents/fields/DateRangePicker/type.js +1 -0
- package/es/components/dataSourceComponents/fields/Input/index.d.ts +6 -1
- package/es/components/dataSourceComponents/fields/Input/index.js +4 -0
- package/es/components/dataSourceComponents/fields/Input.Email/ReadPretty.d.ts +4 -0
- package/es/components/dataSourceComponents/fields/Input.Email/ReadPretty.js +5 -0
- package/es/components/dataSourceComponents/fields/Input.Email/WithMode.d.ts +4 -0
- package/es/components/dataSourceComponents/fields/Input.Email/WithMode.js +17 -0
- package/es/components/dataSourceComponents/fields/Input.Email/index.d.ts +3 -0
- package/es/components/dataSourceComponents/fields/Input.Email/index.js +4 -0
- package/es/components/dataSourceComponents/fields/Input.Email/type.d.ts +5 -0
- package/es/components/dataSourceComponents/fields/Input.Email/type.js +1 -0
- package/es/components/dataSourceComponents/fields/Input.Json/ReadPretty.js +2 -2
- package/es/components/dataSourceComponents/fields/Input.Json/WithMode.d.ts +2 -2
- package/es/components/dataSourceComponents/fields/Input.Json/WithMode.js +41 -1
- package/es/components/dataSourceComponents/fields/Input.Json/index.d.ts +1 -1
- package/es/components/dataSourceComponents/fields/Input.Phone/ReadPretty.d.ts +4 -0
- package/es/components/dataSourceComponents/fields/Input.Phone/ReadPretty.js +5 -0
- package/es/components/dataSourceComponents/fields/Input.Phone/WithMode.d.ts +4 -0
- package/es/components/dataSourceComponents/fields/Input.Phone/WithMode.js +12 -0
- package/es/components/dataSourceComponents/fields/Input.Phone/index.d.ts +3 -0
- package/es/components/dataSourceComponents/fields/Input.Phone/index.js +4 -0
- package/es/components/dataSourceComponents/fields/Input.Phone/type.d.ts +5 -0
- package/es/components/dataSourceComponents/fields/Input.Phone/type.js +1 -0
- package/es/components/dataSourceComponents/fields/InputNumber/index.js +5 -1
- package/es/components/dataSourceComponents/fields/Select/index.d.ts +1 -1
- package/es/components/dataSourceComponents/fields/index.d.ts +46 -5
- package/es/components/dataSourceComponents/fields/index.js +7 -2
- package/es/components/dataSourceComponents/fields/type.d.ts +18 -0
- package/es/components/dataSourceComponents/fields/type.js +1 -0
- package/es/components/dataSourceComponents/fields/utils.d.ts +3 -0
- package/es/components/dataSourceComponents/fields/utils.js +111 -0
- package/es/components/dataSourceComponents/hooks/useActions.js +22 -7
- package/es/components/dataSourceComponents/hooks/useComponentId.d.ts +2 -0
- package/es/components/dataSourceComponents/hooks/useComponentId.js +9 -0
- package/es/components/dataSourceComponents/provider/dataSource/DataSourceContext.d.ts +19 -2
- package/es/components/dataSourceComponents/provider/dataSource/DataSourceProvider.d.ts +1 -1
- package/es/components/dataSourceComponents/provider/dataSource/DataSourceProvider.js +37 -27
- package/es/components/dataSourceComponents/provider/variables/VariablesContext.d.ts +3 -2
- package/es/components/dataSourceComponents/provider/variables/VariablesProvider.js +19 -13
- package/es/components/dataSourceComponents/provider/variables/utils.d.ts +2 -0
- package/es/components/dataSourceComponents/provider/variables/utils.js +9 -0
- package/es/components/filter/components/Dropdown/index.d.ts +1 -0
- package/es/components/filter/components/Dropdown/index.js +6 -2
- package/es/components/filter/components/FilterButton/index.js +5 -3
- package/es/components/filter/components/FilterButton/types.d.ts +2 -0
- package/es/components/pisellAnchor/index.less +77 -77
- package/es/components/pisellStatisticList/index.less +1 -1
- package/es/components/pisellWalletPassCard/index.js +3 -1
- package/es/components/pisellWalletPassCard/index.less +23 -9
- package/es/components/table/Actions/index.js +16 -7
- package/es/components/table/Gallery/index.d.ts +3 -3
- package/es/components/table/Gallery/index.js +25 -7
- package/es/components/table/Gallery/index.less +1 -0
- package/es/components/table/Header/index.d.ts +10 -3
- package/es/components/table/Header/index.js +37 -11
- package/es/components/table/Header/index.less +10 -2
- package/es/components/table/Table/utils.js +4 -0
- package/es/components/table/Tabs/index.d.ts +14 -0
- package/es/components/table/Tabs/index.js +37 -0
- package/es/components/table/hooks/useTriggerValuesChange.js +3 -0
- package/es/components/table/index.js +16 -3
- package/es/components/table/types.d.ts +14 -2
- package/es/components/typography/index.d.ts +2 -2
- package/es/components/typography/index.js +4 -3
- package/es/components/walletCard/index.d.ts +6 -4
- package/es/components/walletCard/index.js +34 -15
- package/es/index.d.ts +4 -0
- package/es/index.js +5 -1
- package/es/locales/en-US.d.ts +7 -0
- package/es/locales/en-US.js +16 -1
- package/es/locales/zh-CN.d.ts +7 -0
- package/es/locales/zh-CN.js +16 -1
- package/es/locales/zh-TW.d.ts +7 -0
- package/es/locales/zh-TW.js +16 -1
- package/lib/components/cardMetricItem/index.less +1 -0
- package/lib/components/dataSourceComponents/dataSourceForm/index.less +1 -1
- package/lib/components/dataSourceComponents/dataSourceForm/serve.d.ts +1 -0
- package/lib/components/dataSourceComponents/dataSourceForm/serve.js +3 -2
- package/lib/components/dataSourceComponents/dataSourceForm/utils.d.ts +2 -2
- package/lib/components/dataSourceComponents/dataSourceForm/utils.js +58 -11
- package/lib/components/dataSourceComponents/dataSourceShow/dataSourceImage/index.d.ts +3 -0
- package/lib/components/dataSourceComponents/dataSourceShow/dataSourceImage/index.js +38 -0
- package/lib/components/dataSourceComponents/dataSourceShow/dataSourceQRCode/index.d.ts +3 -0
- package/lib/components/dataSourceComponents/dataSourceShow/dataSourceQRCode/index.js +38 -0
- package/lib/components/dataSourceComponents/dataSourceShow/dataSourceTypography/index.d.ts +10 -0
- package/lib/components/dataSourceComponents/dataSourceShow/dataSourceTypography/index.js +44 -0
- package/lib/components/dataSourceComponents/dataSourceShow/utils.d.ts +6 -0
- package/lib/components/dataSourceComponents/dataSourceShow/utils.js +95 -0
- package/lib/components/dataSourceComponents/dataSourceTable/BaseTable.js +29 -90
- package/lib/components/dataSourceComponents/dataSourceTable/filter/index.d.ts +25 -0
- package/lib/components/dataSourceComponents/dataSourceTable/filter/index.js +176 -0
- package/lib/components/dataSourceComponents/dataSourceTable/filter/utils.d.ts +8 -0
- package/lib/components/dataSourceComponents/dataSourceTable/filter/utils.js +176 -0
- package/lib/components/dataSourceComponents/dataSourceTable/hooks/useDataSourceKey.d.ts +2 -2
- package/lib/components/dataSourceComponents/dataSourceTable/hooks/useDataSourceKey.js +1 -1
- package/lib/components/dataSourceComponents/dataSourceTable/hooks/useDesignMode.js +24 -37
- package/lib/components/dataSourceComponents/dataSourceTable/hooks/useDrawerState.d.ts +20 -4
- package/lib/components/dataSourceComponents/dataSourceTable/hooks/useDrawerState.js +53 -7
- package/lib/components/dataSourceComponents/dataSourceTable/hooks/useFormat.d.ts +17 -1
- package/lib/components/dataSourceComponents/dataSourceTable/hooks/useFormat.js +73 -3
- package/lib/components/dataSourceComponents/dataSourceTable/hooks/useTableProps.d.ts +77 -0
- package/lib/components/dataSourceComponents/dataSourceTable/hooks/useTableProps.js +236 -0
- package/lib/components/dataSourceComponents/dataSourceTable/hooks/useTableQuery.d.ts +20 -7
- package/lib/components/dataSourceComponents/dataSourceTable/hooks/useTableQuery.js +38 -11
- package/lib/components/dataSourceComponents/dataSourceTable/index.d.ts +1 -0
- package/lib/components/dataSourceComponents/dataSourceTable/index.js +1 -0
- package/lib/components/dataSourceComponents/dataSourceTable/index.less +5 -0
- package/lib/components/dataSourceComponents/dataSourceTable/type.d.ts +57 -9
- package/lib/components/dataSourceComponents/dataSourceWrapper/BaseWrapper.d.ts +7 -0
- package/lib/components/dataSourceComponents/dataSourceWrapper/BaseWrapper.js +51 -0
- package/lib/components/dataSourceComponents/dataSourceWrapper/index.d.ts +2 -4
- package/lib/components/dataSourceComponents/dataSourceWrapper/index.js +14 -2
- package/lib/components/dataSourceComponents/fields/Checkbox/ReadPretty.js +3 -1
- package/lib/components/dataSourceComponents/fields/Checkbox/index.js +3 -1
- package/lib/components/dataSourceComponents/fields/DatePicker/index.js +5 -1
- package/lib/components/dataSourceComponents/fields/DateRangePicker/ReadPretty.d.ts +4 -0
- package/lib/components/dataSourceComponents/fields/DateRangePicker/ReadPretty.js +41 -0
- package/lib/components/dataSourceComponents/fields/DateRangePicker/WithMode.d.ts +4 -0
- package/lib/components/dataSourceComponents/fields/DateRangePicker/WithMode.js +42 -0
- package/lib/components/dataSourceComponents/fields/DateRangePicker/index.d.ts +4 -0
- package/lib/components/dataSourceComponents/fields/DateRangePicker/index.js +39 -0
- package/lib/components/dataSourceComponents/fields/DateRangePicker/index.less +14 -0
- package/lib/components/dataSourceComponents/fields/DateRangePicker/type.d.ts +4 -0
- package/lib/components/dataSourceComponents/fields/DateRangePicker/type.js +17 -0
- package/lib/components/dataSourceComponents/fields/Input/index.d.ts +6 -1
- package/lib/components/dataSourceComponents/fields/Input/index.js +4 -0
- package/lib/components/dataSourceComponents/fields/Input.Email/ReadPretty.d.ts +4 -0
- package/lib/components/dataSourceComponents/fields/Input.Email/ReadPretty.js +39 -0
- package/lib/components/dataSourceComponents/fields/Input.Email/WithMode.d.ts +4 -0
- package/lib/components/dataSourceComponents/fields/Input.Email/WithMode.js +57 -0
- package/lib/components/dataSourceComponents/fields/Input.Email/index.d.ts +3 -0
- package/lib/components/dataSourceComponents/fields/Input.Email/index.js +38 -0
- package/lib/components/dataSourceComponents/fields/Input.Email/type.d.ts +5 -0
- package/lib/components/dataSourceComponents/fields/Input.Email/type.js +17 -0
- package/lib/components/dataSourceComponents/fields/Input.Json/ReadPretty.js +2 -2
- package/lib/components/dataSourceComponents/fields/Input.Json/WithMode.d.ts +2 -2
- package/lib/components/dataSourceComponents/fields/Input.Json/WithMode.js +30 -2
- package/lib/components/dataSourceComponents/fields/Input.Json/index.d.ts +1 -1
- package/lib/components/dataSourceComponents/fields/Input.Phone/ReadPretty.d.ts +4 -0
- package/lib/components/dataSourceComponents/fields/Input.Phone/ReadPretty.js +39 -0
- package/lib/components/dataSourceComponents/fields/Input.Phone/WithMode.d.ts +4 -0
- package/lib/components/dataSourceComponents/fields/Input.Phone/WithMode.js +43 -0
- package/lib/components/dataSourceComponents/fields/Input.Phone/index.d.ts +3 -0
- package/lib/components/dataSourceComponents/fields/Input.Phone/index.js +38 -0
- package/lib/components/dataSourceComponents/fields/Input.Phone/type.d.ts +5 -0
- package/lib/components/dataSourceComponents/fields/Input.Phone/type.js +17 -0
- package/lib/components/dataSourceComponents/fields/InputNumber/index.js +5 -1
- package/lib/components/dataSourceComponents/fields/Select/index.d.ts +1 -1
- package/lib/components/dataSourceComponents/fields/index.d.ts +46 -5
- package/lib/components/dataSourceComponents/fields/index.js +6 -1
- package/lib/components/dataSourceComponents/fields/type.d.ts +18 -0
- package/lib/components/dataSourceComponents/fields/type.js +17 -0
- package/lib/components/dataSourceComponents/fields/utils.d.ts +3 -0
- package/lib/components/dataSourceComponents/fields/utils.js +134 -0
- package/lib/components/dataSourceComponents/hooks/useActions.js +14 -5
- package/lib/components/dataSourceComponents/hooks/useComponentId.d.ts +2 -0
- package/lib/components/dataSourceComponents/hooks/useComponentId.js +32 -0
- package/lib/components/dataSourceComponents/provider/dataSource/DataSourceContext.d.ts +19 -2
- package/lib/components/dataSourceComponents/provider/dataSource/DataSourceProvider.d.ts +1 -1
- package/lib/components/dataSourceComponents/provider/dataSource/DataSourceProvider.js +29 -16
- package/lib/components/dataSourceComponents/provider/variables/VariablesContext.d.ts +3 -2
- package/lib/components/dataSourceComponents/provider/variables/VariablesProvider.js +17 -8
- package/lib/components/dataSourceComponents/provider/variables/utils.d.ts +2 -0
- package/lib/components/dataSourceComponents/provider/variables/utils.js +15 -2
- package/lib/components/filter/components/Dropdown/index.d.ts +1 -0
- package/lib/components/filter/components/Dropdown/index.js +6 -2
- package/lib/components/filter/components/FilterButton/index.js +5 -3
- package/lib/components/filter/components/FilterButton/types.d.ts +2 -0
- package/lib/components/pisellAnchor/index.less +77 -77
- package/lib/components/pisellStatisticList/index.less +1 -1
- package/lib/components/pisellWalletPassCard/index.js +1 -1
- package/lib/components/pisellWalletPassCard/index.less +23 -9
- package/lib/components/table/Actions/index.js +18 -9
- package/lib/components/table/Gallery/index.d.ts +3 -3
- package/lib/components/table/Gallery/index.js +17 -0
- package/lib/components/table/Gallery/index.less +1 -0
- package/lib/components/table/Header/index.d.ts +10 -3
- package/lib/components/table/Header/index.js +29 -4
- package/lib/components/table/Header/index.less +10 -2
- package/lib/components/table/Table/utils.js +4 -0
- package/lib/components/table/Tabs/index.d.ts +14 -0
- package/lib/components/table/Tabs/index.js +70 -0
- package/lib/components/table/hooks/useTriggerValuesChange.js +3 -0
- package/lib/components/table/index.js +17 -2
- package/lib/components/table/types.d.ts +14 -2
- package/lib/components/typography/index.d.ts +2 -2
- package/lib/components/typography/index.js +4 -3
- package/lib/components/walletCard/index.d.ts +6 -4
- package/lib/components/walletCard/index.js +24 -13
- package/lib/index.d.ts +4 -0
- package/lib/index.js +12 -0
- package/lib/locales/en-US.d.ts +7 -0
- package/lib/locales/en-US.js +8 -1
- package/lib/locales/zh-CN.d.ts +7 -0
- package/lib/locales/zh-CN.js +8 -1
- package/lib/locales/zh-TW.d.ts +7 -0
- package/lib/locales/zh-TW.js +8 -1
- package/lowcode/_utils/defaultSchema.ts +452 -83
- package/lowcode/_utils/type.ts +5 -0
- package/lowcode/_utils/utils.ts +1 -0
- package/lowcode/button/meta.ts +1 -2
- package/lowcode/data-source-form/constants.ts +5 -0
- package/lowcode/data-source-form/meta.ts +259 -273
- package/lowcode/data-source-form/snippets.ts +9 -0
- package/lowcode/data-source-form/utils.ts +80 -15
- package/lowcode/data-source-image/meta.ts +74 -0
- package/lowcode/data-source-image/snippets.ts +14 -0
- package/lowcode/data-source-qrcode/meta.ts +158 -0
- package/lowcode/data-source-qrcode/snippets.ts +20 -0
- package/lowcode/data-source-table/meta.ts +4577 -2285
- package/lowcode/data-source-table/snippets.ts +10 -4
- package/lowcode/data-source-table/utils.tsx +254 -0
- package/lowcode/data-source-typography/meta.ts +54 -0
- package/lowcode/data-source-typography.text/meta.ts +212 -0
- package/lowcode/data-source-typography.text/snippets.ts +12 -0
- package/lowcode/data-source-wrapper/meta.ts +243 -0
- package/lowcode/data-source-wrapper/snippets.ts +11 -0
- package/lowcode/data-source-wrapper/utils.ts +45 -0
- package/lowcode/form-item-color-picker/snippets.ts +1 -0
- package/lowcode/form-item-input/meta.ts +2 -1
- package/lowcode/form-item-input/snippets.ts +2 -1
- package/lowcode/form-item-input.email/meta.ts +284 -0
- package/lowcode/form-item-input.email/snippets.ts +35 -0
- package/lowcode/form-item-input.phone/meta.ts +295 -0
- package/lowcode/form-item-input.phone/snippets.ts +16 -0
- package/lowcode/form-item-input.text-area/meta.ts +243 -32
- package/lowcode/form-item-input.text-area/snippets.ts +2 -1
- package/lowcode/form-item-input.url/meta.ts +44 -20
- package/lowcode/form-item-input.url/snippets.ts +5 -5
- package/lowcode/table/snippets.ts +6 -0
- package/lowcode/test/meta.ts +1 -2
- package/package.json +4 -4
|
@@ -11,8 +11,9 @@ import {
|
|
|
11
11
|
getCurrentValueVariables,
|
|
12
12
|
setBatchVariables,
|
|
13
13
|
} from './utils';
|
|
14
|
+
import { MetaType } from '../_utils/type';
|
|
14
15
|
|
|
15
|
-
|
|
16
|
+
const dataSourceForm: MetaType = {
|
|
16
17
|
snippets,
|
|
17
18
|
componentName: 'DataSourceForm',
|
|
18
19
|
title: '表单',
|
|
@@ -50,7 +51,6 @@ export default {
|
|
|
50
51
|
tip: '表单标题',
|
|
51
52
|
},
|
|
52
53
|
// display: 'block',
|
|
53
|
-
propType: 'string',
|
|
54
54
|
setter: 'PisellI18nSetter',
|
|
55
55
|
},
|
|
56
56
|
{
|
|
@@ -64,7 +64,6 @@ export default {
|
|
|
64
64
|
tip: '表单描述',
|
|
65
65
|
},
|
|
66
66
|
// display: 'block',
|
|
67
|
-
propType: 'string',
|
|
68
67
|
setter: 'PisellI18nSetter',
|
|
69
68
|
},
|
|
70
69
|
],
|
|
@@ -176,7 +175,6 @@ export default {
|
|
|
176
175
|
'zh-CN': '字段',
|
|
177
176
|
},
|
|
178
177
|
name: '_fields',
|
|
179
|
-
propType: 'object',
|
|
180
178
|
display: 'block',
|
|
181
179
|
setter: {
|
|
182
180
|
componentName: 'PisellFieldSetter',
|
|
@@ -247,7 +245,7 @@ export default {
|
|
|
247
245
|
);
|
|
248
246
|
},
|
|
249
247
|
extraProps: {
|
|
250
|
-
setValue(target
|
|
248
|
+
setValue(target, value) {
|
|
251
249
|
if (!value.value) {
|
|
252
250
|
return target.getProps().setPropValue('currentValue', '');
|
|
253
251
|
}
|
|
@@ -297,7 +295,6 @@ export default {
|
|
|
297
295
|
},
|
|
298
296
|
tip: '',
|
|
299
297
|
},
|
|
300
|
-
propType: 'bool',
|
|
301
298
|
defaultValue: true,
|
|
302
299
|
setter: 'BoolSetter',
|
|
303
300
|
},
|
|
@@ -311,7 +308,6 @@ export default {
|
|
|
311
308
|
},
|
|
312
309
|
tip: '',
|
|
313
310
|
},
|
|
314
|
-
propType: 'bool',
|
|
315
311
|
defaultValue: true,
|
|
316
312
|
setter: 'BoolSetter',
|
|
317
313
|
},
|
|
@@ -341,7 +337,9 @@ export default {
|
|
|
341
337
|
],
|
|
342
338
|
},
|
|
343
339
|
},
|
|
344
|
-
|
|
340
|
+
{
|
|
341
|
+
componentName: 'VariableSetter',
|
|
342
|
+
},
|
|
345
343
|
],
|
|
346
344
|
},
|
|
347
345
|
{
|
|
@@ -370,7 +368,9 @@ export default {
|
|
|
370
368
|
],
|
|
371
369
|
},
|
|
372
370
|
},
|
|
373
|
-
|
|
371
|
+
{
|
|
372
|
+
componentName: 'VariableSetter',
|
|
373
|
+
},
|
|
374
374
|
],
|
|
375
375
|
extraProps: {
|
|
376
376
|
setValue(target: any, value: any) {
|
|
@@ -403,7 +403,6 @@ export default {
|
|
|
403
403
|
},
|
|
404
404
|
tip: '尺寸',
|
|
405
405
|
},
|
|
406
|
-
propType: 'string',
|
|
407
406
|
defaultValue: 'default',
|
|
408
407
|
setter: {
|
|
409
408
|
componentName: 'RadioGroupSetter',
|
|
@@ -428,70 +427,82 @@ export default {
|
|
|
428
427
|
],
|
|
429
428
|
},
|
|
430
429
|
],
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
430
|
+
configure: {
|
|
431
|
+
props: [
|
|
432
|
+
{
|
|
433
|
+
name: 'ref',
|
|
434
|
+
title: {
|
|
435
|
+
label: 'ref',
|
|
436
|
+
tip: "ref | 通过 this.$('xxx') 获取到组件实例",
|
|
437
|
+
},
|
|
438
|
+
defaultValue: () => {
|
|
439
|
+
return `form_${uuid()}`;
|
|
440
|
+
},
|
|
441
|
+
setter: 'StringSetter',
|
|
442
|
+
supportVariable: true,
|
|
437
443
|
},
|
|
438
|
-
|
|
439
|
-
|
|
444
|
+
{
|
|
445
|
+
name: 'values',
|
|
446
|
+
title: { label: '表单数据源', tip: '表单数据源' },
|
|
447
|
+
setter: 'JsonSetter',
|
|
448
|
+
supportVariable: true,
|
|
440
449
|
},
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
props: {
|
|
479
|
-
config: {
|
|
480
|
-
items: [
|
|
481
|
-
{
|
|
482
|
-
name: 'span',
|
|
483
|
-
title: '宽度',
|
|
484
|
-
setter: {
|
|
485
|
-
componentName: 'NumberSetter',
|
|
486
|
-
props: {
|
|
487
|
-
min: 0,
|
|
488
|
-
max: 24,
|
|
450
|
+
{
|
|
451
|
+
name: 'colon',
|
|
452
|
+
title: { label: '展示冒号', tip: '' },
|
|
453
|
+
defaultValue: true,
|
|
454
|
+
setter: 'BoolSetter',
|
|
455
|
+
supportVariable: true,
|
|
456
|
+
},
|
|
457
|
+
{
|
|
458
|
+
name: 'hideRequiredMark',
|
|
459
|
+
title: { label: '隐藏必填标记', tip: '隐藏必填标记' },
|
|
460
|
+
defaultValue: false,
|
|
461
|
+
setter: 'BoolSetter',
|
|
462
|
+
supportVariable: true,
|
|
463
|
+
},
|
|
464
|
+
{
|
|
465
|
+
type: 'group',
|
|
466
|
+
title: '布局',
|
|
467
|
+
display: 'accordion',
|
|
468
|
+
items: [
|
|
469
|
+
{
|
|
470
|
+
name: 'labelCol',
|
|
471
|
+
title: '标签栅格布局设置',
|
|
472
|
+
display: 'inline',
|
|
473
|
+
setter: {
|
|
474
|
+
componentName: 'ObjectSetter',
|
|
475
|
+
props: {
|
|
476
|
+
config: {
|
|
477
|
+
items: [
|
|
478
|
+
{
|
|
479
|
+
name: 'span',
|
|
480
|
+
title: '宽度',
|
|
481
|
+
setter: {
|
|
482
|
+
componentName: 'NumberSetter',
|
|
483
|
+
props: {
|
|
484
|
+
min: 0,
|
|
485
|
+
max: 24,
|
|
486
|
+
},
|
|
489
487
|
},
|
|
490
488
|
},
|
|
491
|
-
|
|
489
|
+
{
|
|
490
|
+
name: 'offset',
|
|
491
|
+
title: '偏移',
|
|
492
|
+
setter: {
|
|
493
|
+
componentName: 'NumberSetter',
|
|
494
|
+
props: {
|
|
495
|
+
min: 0,
|
|
496
|
+
max: 24,
|
|
497
|
+
},
|
|
498
|
+
},
|
|
499
|
+
},
|
|
500
|
+
],
|
|
501
|
+
},
|
|
502
|
+
extraSetter: [
|
|
492
503
|
{
|
|
493
|
-
name: '
|
|
494
|
-
title: '
|
|
504
|
+
name: 'span',
|
|
505
|
+
title: '宽度',
|
|
495
506
|
setter: {
|
|
496
507
|
componentName: 'NumberSetter',
|
|
497
508
|
props: {
|
|
@@ -502,232 +513,206 @@ export default {
|
|
|
502
513
|
},
|
|
503
514
|
],
|
|
504
515
|
},
|
|
505
|
-
extraSetter: [
|
|
506
|
-
{
|
|
507
|
-
name: 'span',
|
|
508
|
-
title: '宽度',
|
|
509
|
-
setter: {
|
|
510
|
-
componentName: 'NumberSetter',
|
|
511
|
-
props: {
|
|
512
|
-
min: 0,
|
|
513
|
-
max: 24,
|
|
514
|
-
},
|
|
515
|
-
},
|
|
516
|
-
},
|
|
517
|
-
],
|
|
518
516
|
},
|
|
517
|
+
description:
|
|
518
|
+
'label 标签布局,同 `<Col>` 组件,设置 span offset 值,如 {span: 8, offset: 16},该项仅在垂直表单有效',
|
|
519
519
|
},
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
|
|
525
|
-
|
|
526
|
-
|
|
527
|
-
|
|
528
|
-
|
|
529
|
-
|
|
530
|
-
|
|
531
|
-
|
|
532
|
-
|
|
533
|
-
|
|
534
|
-
|
|
535
|
-
|
|
536
|
-
|
|
537
|
-
|
|
538
|
-
min: 0,
|
|
539
|
-
max: 24,
|
|
520
|
+
{
|
|
521
|
+
name: 'wrapperCol',
|
|
522
|
+
title: '内容栅格布局设置',
|
|
523
|
+
display: 'inline',
|
|
524
|
+
setter: {
|
|
525
|
+
componentName: 'ObjectSetter',
|
|
526
|
+
props: {
|
|
527
|
+
config: {
|
|
528
|
+
items: [
|
|
529
|
+
{
|
|
530
|
+
name: 'span',
|
|
531
|
+
title: '宽度',
|
|
532
|
+
setter: {
|
|
533
|
+
componentName: 'NumberSetter',
|
|
534
|
+
props: {
|
|
535
|
+
min: 0,
|
|
536
|
+
max: 24,
|
|
537
|
+
},
|
|
540
538
|
},
|
|
541
539
|
},
|
|
542
|
-
|
|
543
|
-
|
|
544
|
-
|
|
545
|
-
|
|
546
|
-
|
|
547
|
-
|
|
548
|
-
|
|
549
|
-
|
|
550
|
-
|
|
540
|
+
{
|
|
541
|
+
name: 'offset',
|
|
542
|
+
title: '偏移',
|
|
543
|
+
setter: {
|
|
544
|
+
componentName: 'NumberSetter',
|
|
545
|
+
props: {
|
|
546
|
+
min: 0,
|
|
547
|
+
max: 24,
|
|
548
|
+
},
|
|
551
549
|
},
|
|
552
550
|
},
|
|
553
|
-
|
|
554
|
-
|
|
551
|
+
],
|
|
552
|
+
},
|
|
555
553
|
},
|
|
556
554
|
},
|
|
555
|
+
description:
|
|
556
|
+
'需要为输入控件设置布局样式时,使用该属性,用法同 labelCol',
|
|
557
557
|
},
|
|
558
|
-
|
|
559
|
-
|
|
558
|
+
],
|
|
559
|
+
},
|
|
560
|
+
{
|
|
561
|
+
name: 'labelAlign',
|
|
562
|
+
title: {
|
|
563
|
+
label: '标签对齐',
|
|
564
|
+
tip: 'label 标签的文本对齐方式',
|
|
560
565
|
},
|
|
561
|
-
|
|
562
|
-
|
|
563
|
-
|
|
564
|
-
|
|
565
|
-
|
|
566
|
-
|
|
567
|
-
|
|
566
|
+
setter: {
|
|
567
|
+
componentName: 'RadioGroupSetter',
|
|
568
|
+
props: {
|
|
569
|
+
options: [
|
|
570
|
+
{
|
|
571
|
+
title: '左',
|
|
572
|
+
value: 'left',
|
|
573
|
+
},
|
|
574
|
+
{
|
|
575
|
+
title: '右',
|
|
576
|
+
value: 'right',
|
|
577
|
+
},
|
|
578
|
+
],
|
|
579
|
+
},
|
|
580
|
+
},
|
|
581
|
+
defaultValue: 'right',
|
|
568
582
|
},
|
|
569
|
-
|
|
570
|
-
|
|
571
|
-
|
|
572
|
-
|
|
573
|
-
|
|
574
|
-
|
|
575
|
-
|
|
576
|
-
|
|
577
|
-
|
|
578
|
-
|
|
579
|
-
|
|
580
|
-
|
|
581
|
-
|
|
583
|
+
{
|
|
584
|
+
name: 'layout',
|
|
585
|
+
title: { label: '表单布局', tip: '表单布局' },
|
|
586
|
+
setter: {
|
|
587
|
+
componentName: 'RadioGroupSetter',
|
|
588
|
+
props: {
|
|
589
|
+
options: [
|
|
590
|
+
{
|
|
591
|
+
title: '水平',
|
|
592
|
+
value: 'horizontal',
|
|
593
|
+
},
|
|
594
|
+
{
|
|
595
|
+
title: '垂直',
|
|
596
|
+
value: 'vertical',
|
|
597
|
+
},
|
|
598
|
+
{
|
|
599
|
+
title: '行内',
|
|
600
|
+
value: 'inline',
|
|
601
|
+
},
|
|
602
|
+
],
|
|
603
|
+
},
|
|
582
604
|
},
|
|
605
|
+
defaultValue: 'horizontal',
|
|
583
606
|
},
|
|
584
|
-
|
|
585
|
-
|
|
586
|
-
|
|
587
|
-
|
|
588
|
-
|
|
589
|
-
title: { label: '表单布局', tip: '表单布局' },
|
|
590
|
-
setter: {
|
|
591
|
-
componentName: 'RadioGroupSetter',
|
|
592
|
-
props: {
|
|
593
|
-
options: [
|
|
594
|
-
{
|
|
595
|
-
title: '水平',
|
|
596
|
-
value: 'horizontal',
|
|
597
|
-
},
|
|
598
|
-
{
|
|
599
|
-
title: '垂直',
|
|
600
|
-
value: 'vertical',
|
|
601
|
-
},
|
|
602
|
-
{
|
|
603
|
-
title: '行内',
|
|
604
|
-
value: 'inline',
|
|
605
|
-
},
|
|
606
|
-
],
|
|
607
|
+
{
|
|
608
|
+
name: 'name',
|
|
609
|
+
title: {
|
|
610
|
+
label: '表单名称',
|
|
611
|
+
tip: '表单名称,会作为表单字段 `id` 前缀使用',
|
|
607
612
|
},
|
|
613
|
+
setter: 'StringSetter',
|
|
614
|
+
supportVariable: true,
|
|
608
615
|
},
|
|
609
|
-
|
|
610
|
-
|
|
611
|
-
|
|
612
|
-
|
|
613
|
-
|
|
614
|
-
|
|
615
|
-
|
|
616
|
-
|
|
616
|
+
{
|
|
617
|
+
name: 'preserve',
|
|
618
|
+
title: {
|
|
619
|
+
label: '删除时保留值',
|
|
620
|
+
tip: '当字段被删除时保留字段值',
|
|
621
|
+
},
|
|
622
|
+
defaultValue: true,
|
|
623
|
+
setter: 'BoolSetter',
|
|
624
|
+
supportVariable: true,
|
|
617
625
|
},
|
|
618
|
-
|
|
619
|
-
|
|
620
|
-
|
|
621
|
-
|
|
622
|
-
|
|
623
|
-
|
|
624
|
-
|
|
625
|
-
|
|
626
|
-
|
|
626
|
+
{
|
|
627
|
+
name: 'scrollToFirstError',
|
|
628
|
+
title: {
|
|
629
|
+
label: '滚至错误',
|
|
630
|
+
tip: '提交失败自动滚动到第一个错误字段',
|
|
631
|
+
},
|
|
632
|
+
defaultValue: true,
|
|
633
|
+
setter: 'BoolSetter',
|
|
634
|
+
supportVariable: true,
|
|
627
635
|
},
|
|
628
|
-
|
|
629
|
-
|
|
630
|
-
|
|
631
|
-
|
|
632
|
-
|
|
633
|
-
|
|
634
|
-
|
|
635
|
-
|
|
636
|
-
|
|
637
|
-
|
|
636
|
+
{
|
|
637
|
+
name: 'size',
|
|
638
|
+
title: {
|
|
639
|
+
label: '字段组件尺寸',
|
|
640
|
+
tip: '设置字段组件的尺寸(仅限 antd 组件)',
|
|
641
|
+
},
|
|
642
|
+
setter: {
|
|
643
|
+
componentName: 'RadioGroupSetter',
|
|
644
|
+
props: {
|
|
645
|
+
options: [
|
|
646
|
+
{
|
|
647
|
+
title: '大',
|
|
648
|
+
value: 'large',
|
|
649
|
+
},
|
|
650
|
+
{
|
|
651
|
+
title: '中',
|
|
652
|
+
value: 'middle',
|
|
653
|
+
},
|
|
654
|
+
{
|
|
655
|
+
title: '小',
|
|
656
|
+
value: 'small',
|
|
657
|
+
},
|
|
658
|
+
],
|
|
659
|
+
},
|
|
660
|
+
},
|
|
661
|
+
defaultValue: 'middle',
|
|
638
662
|
},
|
|
639
|
-
|
|
640
|
-
|
|
641
|
-
|
|
642
|
-
|
|
643
|
-
},
|
|
644
|
-
{
|
|
645
|
-
name: 'size',
|
|
646
|
-
title: {
|
|
647
|
-
label: '字段组件尺寸',
|
|
648
|
-
tip: '设置字段组件的尺寸(仅限 antd 组件)',
|
|
663
|
+
{
|
|
664
|
+
name: 'validateMessages',
|
|
665
|
+
title: { label: '验证提示模板', tip: '验证提示模板' },
|
|
666
|
+
setter: 'JsonSetter',
|
|
649
667
|
},
|
|
650
|
-
|
|
651
|
-
|
|
652
|
-
|
|
653
|
-
|
|
654
|
-
|
|
655
|
-
|
|
656
|
-
|
|
657
|
-
|
|
658
|
-
|
|
659
|
-
|
|
660
|
-
|
|
661
|
-
|
|
662
|
-
|
|
663
|
-
|
|
664
|
-
|
|
665
|
-
|
|
666
|
-
|
|
667
|
-
],
|
|
668
|
+
{
|
|
669
|
+
name: 'validateTrigger',
|
|
670
|
+
title: { label: '校验时机', tip: '所有字段校验触发时机' },
|
|
671
|
+
setter: {
|
|
672
|
+
componentName: 'RadioGroupSetter',
|
|
673
|
+
props: {
|
|
674
|
+
options: [
|
|
675
|
+
{
|
|
676
|
+
title: '当前值变化时',
|
|
677
|
+
value: 'onChange',
|
|
678
|
+
},
|
|
679
|
+
{
|
|
680
|
+
title: '失去焦点时',
|
|
681
|
+
value: 'onBlur',
|
|
682
|
+
},
|
|
683
|
+
],
|
|
684
|
+
},
|
|
668
685
|
},
|
|
669
686
|
},
|
|
670
|
-
|
|
671
|
-
|
|
672
|
-
|
|
673
|
-
|
|
674
|
-
|
|
675
|
-
setter: 'JsonSetter',
|
|
676
|
-
},
|
|
677
|
-
{
|
|
678
|
-
name: 'validateTrigger',
|
|
679
|
-
title: { label: '校验时机', tip: '所有字段校验触发时机' },
|
|
680
|
-
propType: {
|
|
681
|
-
type: 'oneOf',
|
|
682
|
-
value: ['onChange', 'onBlur'],
|
|
683
|
-
},
|
|
684
|
-
setter: {
|
|
685
|
-
componentName: 'RadioGroupSetter',
|
|
686
|
-
props: {
|
|
687
|
-
options: [
|
|
688
|
-
{
|
|
689
|
-
title: '当前值变化时',
|
|
690
|
-
value: 'onChange',
|
|
691
|
-
},
|
|
692
|
-
{
|
|
693
|
-
title: '失去焦点时',
|
|
694
|
-
value: 'onBlur',
|
|
695
|
-
},
|
|
696
|
-
],
|
|
687
|
+
{
|
|
688
|
+
name: 'onFinish',
|
|
689
|
+
title: {
|
|
690
|
+
label: '提交表单且数据验证成功后回调事件',
|
|
691
|
+
tip: '提交表单且数据验证成功后回调事件',
|
|
697
692
|
},
|
|
698
693
|
},
|
|
699
|
-
|
|
700
|
-
|
|
701
|
-
|
|
702
|
-
|
|
703
|
-
|
|
704
|
-
|
|
694
|
+
{
|
|
695
|
+
name: 'onFinishFailed',
|
|
696
|
+
title: {
|
|
697
|
+
label: '提交表单且数据验证失败后回调事件',
|
|
698
|
+
tip: '提交表单且数据验证失败后回调事件',
|
|
699
|
+
},
|
|
705
700
|
},
|
|
706
|
-
|
|
707
|
-
|
|
708
|
-
|
|
709
|
-
|
|
710
|
-
|
|
711
|
-
|
|
712
|
-
tip: '提交表单且数据验证失败后回调事件',
|
|
701
|
+
{
|
|
702
|
+
name: 'onFieldsChange',
|
|
703
|
+
title: {
|
|
704
|
+
label: '字段更新时触发回调事件',
|
|
705
|
+
tip: '字段更新时触发回调事件',
|
|
706
|
+
},
|
|
713
707
|
},
|
|
714
|
-
|
|
715
|
-
|
|
716
|
-
|
|
717
|
-
|
|
718
|
-
|
|
719
|
-
|
|
720
|
-
},
|
|
721
|
-
{
|
|
722
|
-
name: 'onValuesChange',
|
|
723
|
-
title: {
|
|
724
|
-
label: '字段值更新时触发回调事件',
|
|
725
|
-
tip: '字段值更新时触发回调事件',
|
|
708
|
+
{
|
|
709
|
+
name: 'onValuesChange',
|
|
710
|
+
title: {
|
|
711
|
+
label: '字段值更新时触发回调事件',
|
|
712
|
+
tip: '字段值更新时触发回调事件',
|
|
713
|
+
},
|
|
726
714
|
},
|
|
727
|
-
|
|
728
|
-
},
|
|
729
|
-
],
|
|
730
|
-
configure: {
|
|
715
|
+
],
|
|
731
716
|
component: { isContainer: true },
|
|
732
717
|
supports: {
|
|
733
718
|
style: true,
|
|
@@ -783,18 +768,18 @@ export default {
|
|
|
783
768
|
}
|
|
784
769
|
|
|
785
770
|
// 为目标元素包裹一层P
|
|
786
|
-
const layoutPNode = currentNode
|
|
771
|
+
const layoutPNode = currentNode?.document?.createNode({
|
|
787
772
|
componentName: 'Form.Item',
|
|
788
773
|
props: {
|
|
789
774
|
label: '表单项: ',
|
|
790
775
|
},
|
|
791
|
-
children: [dragment.exportSchema()],
|
|
776
|
+
children: [(dragment as any).exportSchema()],
|
|
792
777
|
});
|
|
793
778
|
// 当前dragment还未添加入node子节点,需要setTimeout处理
|
|
794
779
|
setTimeout(() => {
|
|
795
|
-
currentNode
|
|
780
|
+
(currentNode?.replaceChild as any)(
|
|
796
781
|
dragment,
|
|
797
|
-
layoutPNode.exportSchema(),
|
|
782
|
+
(layoutPNode as any).exportSchema(),
|
|
798
783
|
// 避免生成新的 nodeId
|
|
799
784
|
{ reserveSchemaNodeId: true }
|
|
800
785
|
);
|
|
@@ -804,3 +789,4 @@ export default {
|
|
|
804
789
|
},
|
|
805
790
|
},
|
|
806
791
|
};
|
|
792
|
+
export default dataSourceForm;
|