@openli1115/lowcode-edit-pro-table 1.0.54 → 1.0.55
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/docs/404.html +3 -3
- package/build/docs/_demos/:uuid +3 -3
- package/build/docs/colorful-button.html +3 -3
- package/build/docs/colorful-input.html +3 -3
- package/build/docs/index.html +3 -3
- package/build/docs/umi.f54e4184.js +1 -0
- package/build/docs/~demos/:uuid.html +3 -3
- package/build/docs/~demos/colorful-button-demo.html +3 -3
- package/build/docs/~demos/colorful-input-demo.html +3 -3
- package/build/lowcode/assets-daily.json +13 -13
- package/build/lowcode/assets-dev.json +2 -2
- package/build/lowcode/assets-prod.json +13 -13
- package/build/lowcode/meta.design.js +1 -1
- package/build/lowcode/meta.js +1 -1
- package/build/lowcode/render/default/view.js +2 -2
- package/build/lowcode/view.js +2 -2
- package/dist/BizComps.js +7 -7
- package/dist/BizComps.js.map +1 -1
- package/es/components/ProCascaderSelect/index.js +29 -32
- package/es/components/ProCheckbox/index.d.ts +1 -9
- package/es/components/ProCheckbox/index.js +27 -40
- package/es/components/ProDatePicker/index.js +23 -29
- package/es/components/ProInput/index.d.ts +0 -3
- package/es/components/ProInput/index.js +23 -44
- package/es/components/ProRadio/index.d.ts +1 -9
- package/es/components/ProRadio/index.js +26 -40
- package/es/components/ProSelect/index.js +27 -32
- package/es/components/ProTextArea/index.d.ts +2 -2
- package/es/components/ProTextArea/index.js +23 -29
- package/es/components/ProTimePicker/index.js +24 -33
- package/es/components/utils/index.d.ts +15 -1
- package/es/components/utils/index.js +39 -9
- package/es/context/useComponentContext.d.ts +3 -1
- package/es/context/useComponentContext.js +17 -17
- package/es/context/useProBoundValue.d.ts +6 -0
- package/es/context/useProBoundValue.js +34 -0
- package/es/index.d.ts +2 -1
- package/es/index.js +2 -1
- package/lib/components/ProCascaderSelect/index.js +28 -31
- package/lib/components/ProCheckbox/index.d.ts +1 -9
- package/lib/components/ProCheckbox/index.js +26 -39
- package/lib/components/ProDatePicker/index.js +22 -28
- package/lib/components/ProInput/index.d.ts +0 -3
- package/lib/components/ProInput/index.js +22 -43
- package/lib/components/ProRadio/index.d.ts +1 -9
- package/lib/components/ProRadio/index.js +25 -39
- package/lib/components/ProSelect/index.js +26 -31
- package/lib/components/ProTextArea/index.d.ts +2 -2
- package/lib/components/ProTextArea/index.js +22 -28
- package/lib/components/ProTimePicker/index.js +23 -32
- package/lib/components/utils/index.d.ts +15 -1
- package/lib/components/utils/index.js +40 -10
- package/lib/context/useComponentContext.d.ts +3 -1
- package/lib/context/useComponentContext.js +18 -18
- package/lib/context/useProBoundValue.d.ts +6 -0
- package/lib/context/useProBoundValue.js +39 -0
- package/lib/index.d.ts +2 -1
- package/lib/index.js +5 -2
- package/lowcode_es/meta.js +1 -1
- package/lowcode_lib/meta.js +1 -1
- package/package.json +3 -3
- package/build/docs/umi.6ff0a30e.js +0 -1
|
@@ -1,49 +1,46 @@
|
|
|
1
1
|
import _CascaderSelect from "@alifd/next/es/cascader-select";
|
|
2
2
|
import _extends from "@babel/runtime/helpers/extends";
|
|
3
|
-
import
|
|
4
|
-
|
|
5
|
-
import {
|
|
6
|
-
|
|
7
|
-
var React = window.React;
|
|
8
|
-
var createElement = React.createElement,
|
|
9
|
-
useEffect = React.useEffect,
|
|
10
|
-
useRef = React.useRef,
|
|
11
|
-
useState = React.useState;
|
|
3
|
+
import { resolveProScreenBinding } from "../utils";
|
|
4
|
+
import { useProBoundValue } from "../../context/useProBoundValue";
|
|
5
|
+
import { FORM_EMPTY_ARRAY } from "../../context/useComponentContext";
|
|
6
|
+
var createElement = window.React.createElement;
|
|
12
7
|
var ProCascaderSelect = function ProCascaderSelect(props) {
|
|
13
8
|
var screen_structure = props.screen_structure,
|
|
14
9
|
screen_structure_field = props.screen_structure_field,
|
|
15
10
|
screen_inner_id = props.screen_inner_id,
|
|
16
11
|
range_inner_table = props.range_inner_table,
|
|
17
12
|
dataSource = props.dataSource,
|
|
18
|
-
defaultValue = props.defaultValue,
|
|
19
13
|
disableEdit = props.disableEdit,
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
var
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
14
|
+
readOnlyProp = props.readOnly,
|
|
15
|
+
disabledProp = props.disabled,
|
|
16
|
+
_v = props.value,
|
|
17
|
+
schemaOnChange = props.onChange,
|
|
18
|
+
defaultValue = props.defaultValue;
|
|
19
|
+
var _resolveProScreenBind = resolveProScreenBinding({
|
|
20
|
+
screen_structure: screen_structure,
|
|
21
|
+
screen_structure_field: screen_structure_field,
|
|
22
|
+
range_inner_table: range_inner_table
|
|
23
|
+
}),
|
|
24
|
+
structureName = _resolveProScreenBind.structureName,
|
|
25
|
+
structureField = _resolveProScreenBind.structureField,
|
|
26
|
+
fieldPath = _resolveProScreenBind.fieldPath;
|
|
27
|
+
var unboundInit = defaultValue != null && Array.isArray(defaultValue) ? defaultValue : FORM_EMPTY_ARRAY;
|
|
28
|
+
var _useProBoundValue = useProBoundValue(fieldPath, unboundInit, FORM_EMPTY_ARRAY),
|
|
29
|
+
value = _useProBoundValue.value,
|
|
30
|
+
commit = _useProBoundValue.commit;
|
|
31
31
|
var handleChange = function handleChange(newValue) {
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
onValueChange(newValue);
|
|
35
|
-
}
|
|
36
|
-
// 触发标准 onChange
|
|
37
|
-
if (props.onChange) {
|
|
38
|
-
props.onChange(newValue, structureName, structureField);
|
|
39
|
-
}
|
|
32
|
+
commit(newValue);
|
|
33
|
+
schemaOnChange === null || schemaOnChange === void 0 ? void 0 : schemaOnChange(newValue, structureName, structureField);
|
|
40
34
|
};
|
|
35
|
+
var displayValue = Array.isArray(value) ? value : FORM_EMPTY_ARRAY;
|
|
41
36
|
return /*#__PURE__*/React.createElement("span", {
|
|
42
37
|
className: "field-wrapper " + (disableEdit ? 'disable-edit' : 'enable-edit')
|
|
43
38
|
}, /*#__PURE__*/React.createElement(_CascaderSelect, _extends({}, props, {
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
dataSource: dataSource
|
|
39
|
+
readOnly: disableEdit ? true : readOnlyProp,
|
|
40
|
+
disabled: disabledProp,
|
|
41
|
+
dataSource: dataSource,
|
|
42
|
+
value: displayValue,
|
|
43
|
+
onChange: handleChange
|
|
47
44
|
})));
|
|
48
45
|
};
|
|
49
46
|
export default ProCascaderSelect;
|
|
@@ -1,14 +1,6 @@
|
|
|
1
1
|
import { Checkbox } from '@alifd/next';
|
|
2
2
|
/**
|
|
3
|
-
* ProCheckbox
|
|
4
|
-
* @description 复选按钮
|
|
5
|
-
* @param {string} screen_structure_field 屏幕结构字段
|
|
6
|
-
* @param {string} screen_inner_id 屏幕内部id
|
|
7
|
-
* @param {string} screen_structure 屏幕结构
|
|
8
|
-
* @param {string} dataSource 数据源
|
|
9
|
-
* @param {string} checkedValue 选中值
|
|
10
|
-
* @param {string} defaultChecked 默认选中
|
|
11
|
-
* @param {string} checked 是否选中
|
|
3
|
+
* ProCheckbox — 复选框(单框 checked)
|
|
12
4
|
*/
|
|
13
5
|
declare const ProCheckbox: typeof Checkbox;
|
|
14
6
|
export default ProCheckbox;
|
|
@@ -1,25 +1,11 @@
|
|
|
1
1
|
import _Checkbox from "@alifd/next/es/checkbox";
|
|
2
2
|
import _extends from "@babel/runtime/helpers/extends";
|
|
3
|
-
import
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
import { useComponentContext } from "../../context/useComponentContext";
|
|
7
|
-
var React = window.React;
|
|
8
|
-
var createElement = React.createElement,
|
|
9
|
-
useEffect = React.useEffect,
|
|
10
|
-
useRef = React.useRef,
|
|
11
|
-
useState = React.useState;
|
|
3
|
+
import { resolveProScreenBinding } from "../utils";
|
|
4
|
+
import { useProBoundValue } from "../../context/useProBoundValue";
|
|
5
|
+
var createElement = window.React.createElement;
|
|
12
6
|
|
|
13
7
|
/**
|
|
14
|
-
* ProCheckbox
|
|
15
|
-
* @description 复选按钮
|
|
16
|
-
* @param {string} screen_structure_field 屏幕结构字段
|
|
17
|
-
* @param {string} screen_inner_id 屏幕内部id
|
|
18
|
-
* @param {string} screen_structure 屏幕结构
|
|
19
|
-
* @param {string} dataSource 数据源
|
|
20
|
-
* @param {string} checkedValue 选中值
|
|
21
|
-
* @param {string} defaultChecked 默认选中
|
|
22
|
-
* @param {string} checked 是否选中
|
|
8
|
+
* ProCheckbox — 复选框(单框 checked)
|
|
23
9
|
*/
|
|
24
10
|
var ProCheckbox = function ProCheckbox(props) {
|
|
25
11
|
var screen_structure = props.screen_structure,
|
|
@@ -27,33 +13,34 @@ var ProCheckbox = function ProCheckbox(props) {
|
|
|
27
13
|
screen_inner_id = props.screen_inner_id,
|
|
28
14
|
range_inner_table = props.range_inner_table,
|
|
29
15
|
checkedValue = props.checkedValue,
|
|
30
|
-
|
|
16
|
+
_checkedProp = props.checked,
|
|
31
17
|
disableEdit = props.disableEdit,
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
var
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
props.onChange(newValue, structureName, structureField);
|
|
51
|
-
}
|
|
18
|
+
readOnlyProp = props.readOnly,
|
|
19
|
+
disabledProp = props.disabled,
|
|
20
|
+
_v = props.value,
|
|
21
|
+
schemaOnChange = props.onChange;
|
|
22
|
+
var _resolveProScreenBind = resolveProScreenBinding({
|
|
23
|
+
screen_structure: screen_structure,
|
|
24
|
+
screen_structure_field: screen_structure_field,
|
|
25
|
+
range_inner_table: range_inner_table
|
|
26
|
+
}),
|
|
27
|
+
structureName = _resolveProScreenBind.structureName,
|
|
28
|
+
structureField = _resolveProScreenBind.structureField,
|
|
29
|
+
fieldPath = _resolveProScreenBind.fieldPath;
|
|
30
|
+
var _useProBoundValue = useProBoundValue(fieldPath, false, false),
|
|
31
|
+
value = _useProBoundValue.value,
|
|
32
|
+
commit = _useProBoundValue.commit;
|
|
33
|
+
var handleChange = function handleChange(checked) {
|
|
34
|
+
commit(checked);
|
|
35
|
+
schemaOnChange === null || schemaOnChange === void 0 ? void 0 : schemaOnChange(checked, structureName, structureField);
|
|
52
36
|
};
|
|
53
37
|
return /*#__PURE__*/React.createElement("span", {
|
|
54
38
|
className: "field-wrapper " + (disableEdit ? 'disable-edit' : 'enable-edit')
|
|
55
39
|
}, /*#__PURE__*/React.createElement(_Checkbox, _extends({}, props, {
|
|
56
|
-
|
|
40
|
+
readOnly: disableEdit ? true : readOnlyProp,
|
|
41
|
+
disabled: disabledProp,
|
|
42
|
+
checkedValue: checkedValue,
|
|
43
|
+
checked: Boolean(value),
|
|
57
44
|
onChange: handleChange
|
|
58
45
|
})));
|
|
59
46
|
};
|
|
@@ -1,45 +1,39 @@
|
|
|
1
1
|
import _DatePicker from "@alifd/next/es/date-picker";
|
|
2
2
|
import _extends from "@babel/runtime/helpers/extends";
|
|
3
|
-
import
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
import { useComponentContext } from "../../context/useComponentContext";
|
|
7
|
-
var React = window.React;
|
|
8
|
-
var createElement = React.createElement,
|
|
9
|
-
useEffect = React.useEffect,
|
|
10
|
-
useRef = React.useRef,
|
|
11
|
-
useState = React.useState;
|
|
3
|
+
import { resolveProScreenBinding } from "../utils";
|
|
4
|
+
import { useProBoundValue } from "../../context/useProBoundValue";
|
|
5
|
+
var createElement = window.React.createElement;
|
|
12
6
|
var ProDatePicker = function ProDatePicker(props) {
|
|
13
7
|
var screen_structure = props.screen_structure,
|
|
14
8
|
screen_structure_field = props.screen_structure_field,
|
|
15
9
|
screen_inner_id = props.screen_inner_id,
|
|
16
10
|
range_inner_table = props.range_inner_table,
|
|
17
|
-
defaultValue = props.defaultValue,
|
|
18
11
|
disableEdit = props.disableEdit,
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
var
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
12
|
+
readOnlyProp = props.readOnly,
|
|
13
|
+
disabledProp = props.disabled,
|
|
14
|
+
_v = props.value,
|
|
15
|
+
schemaOnChange = props.onChange,
|
|
16
|
+
defaultValue = props.defaultValue;
|
|
17
|
+
var _resolveProScreenBind = resolveProScreenBinding({
|
|
18
|
+
screen_structure: screen_structure,
|
|
19
|
+
screen_structure_field: screen_structure_field,
|
|
20
|
+
range_inner_table: range_inner_table
|
|
21
|
+
}),
|
|
22
|
+
structureName = _resolveProScreenBind.structureName,
|
|
23
|
+
structureField = _resolveProScreenBind.structureField,
|
|
24
|
+
fieldPath = _resolveProScreenBind.fieldPath;
|
|
25
|
+
var _useProBoundValue = useProBoundValue(fieldPath, defaultValue, ''),
|
|
26
|
+
value = _useProBoundValue.value,
|
|
27
|
+
commit = _useProBoundValue.commit;
|
|
30
28
|
var handleChange = function handleChange(newValue) {
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
onValueChange(newValue);
|
|
34
|
-
}
|
|
35
|
-
// 触发标准 onChange
|
|
36
|
-
if (props.onChange) {
|
|
37
|
-
props.onChange(newValue, structureName, structureField);
|
|
38
|
-
}
|
|
29
|
+
commit(newValue);
|
|
30
|
+
schemaOnChange === null || schemaOnChange === void 0 ? void 0 : schemaOnChange(newValue, structureName, structureField);
|
|
39
31
|
};
|
|
40
32
|
return /*#__PURE__*/React.createElement("span", {
|
|
41
33
|
className: "field-wrapper " + (disableEdit ? 'disable-edit' : 'enable-edit')
|
|
42
34
|
}, /*#__PURE__*/React.createElement(_DatePicker, _extends({}, props, {
|
|
35
|
+
readOnly: disableEdit ? true : readOnlyProp,
|
|
36
|
+
disabled: disabledProp,
|
|
43
37
|
value: value,
|
|
44
38
|
onChange: handleChange
|
|
45
39
|
})));
|
|
@@ -2,9 +2,6 @@ import { Input } from '@alifd/next';
|
|
|
2
2
|
/**
|
|
3
3
|
* ProInput
|
|
4
4
|
* @description 输入框组件
|
|
5
|
-
* @param {string} screen_structure_field 屏幕结构字段
|
|
6
|
-
* @param {string} screen_inner_id 屏幕内部id
|
|
7
|
-
* @param {string} screen_structure 屏幕结构
|
|
8
5
|
*/
|
|
9
6
|
declare const ProInput: typeof Input;
|
|
10
7
|
export default ProInput;
|
|
@@ -1,21 +1,12 @@
|
|
|
1
1
|
import _Input from "@alifd/next/es/input";
|
|
2
2
|
import _extends from "@babel/runtime/helpers/extends";
|
|
3
|
-
import
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
import { useComponentContext } from "../../context/useComponentContext";
|
|
7
|
-
var React = window.React;
|
|
8
|
-
var createElement = React.createElement,
|
|
9
|
-
useEffect = React.useEffect,
|
|
10
|
-
useRef = React.useRef,
|
|
11
|
-
useState = React.useState;
|
|
3
|
+
import { resolveProScreenBinding } from "../utils";
|
|
4
|
+
import { useProBoundValue } from "../../context/useProBoundValue";
|
|
5
|
+
var createElement = window.React.createElement;
|
|
12
6
|
|
|
13
7
|
/**
|
|
14
8
|
* ProInput
|
|
15
9
|
* @description 输入框组件
|
|
16
|
-
* @param {string} screen_structure_field 屏幕结构字段
|
|
17
|
-
* @param {string} screen_inner_id 屏幕内部id
|
|
18
|
-
* @param {string} screen_structure 屏幕结构
|
|
19
10
|
*/
|
|
20
11
|
var ProInput = function ProInput(props) {
|
|
21
12
|
var screen_structure = props.screen_structure,
|
|
@@ -23,43 +14,31 @@ var ProInput = function ProInput(props) {
|
|
|
23
14
|
screen_inner_id = props.screen_inner_id,
|
|
24
15
|
range_inner_table = props.range_inner_table,
|
|
25
16
|
disableEdit = props.disableEdit,
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
var
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
}
|
|
43
|
-
var fieldPath = structureName + "." + structureField;
|
|
44
|
-
var _useComponentContext = useComponentContext(fieldPath),
|
|
45
|
-
value = _useComponentContext.value,
|
|
46
|
-
onValueChange = _useComponentContext.onValueChange;
|
|
47
|
-
console.log('ProInput useComponentContext value', value, fieldPath);
|
|
48
|
-
// console.log('otherProps', otherProps);
|
|
49
|
-
|
|
17
|
+
readOnlyProp = props.readOnly,
|
|
18
|
+
disabledProp = props.disabled,
|
|
19
|
+
_schemaValue = props.value,
|
|
20
|
+
schemaOnChange = props.onChange,
|
|
21
|
+
schemaDefaultValue = props.defaultValue;
|
|
22
|
+
var _resolveProScreenBind = resolveProScreenBinding({
|
|
23
|
+
screen_structure: screen_structure,
|
|
24
|
+
screen_structure_field: screen_structure_field,
|
|
25
|
+
range_inner_table: range_inner_table
|
|
26
|
+
}),
|
|
27
|
+
structureName = _resolveProScreenBind.structureName,
|
|
28
|
+
structureField = _resolveProScreenBind.structureField,
|
|
29
|
+
fieldPath = _resolveProScreenBind.fieldPath;
|
|
30
|
+
var _useProBoundValue = useProBoundValue(fieldPath, schemaDefaultValue != null ? String(schemaDefaultValue) : '', ''),
|
|
31
|
+
value = _useProBoundValue.value,
|
|
32
|
+
commit = _useProBoundValue.commit;
|
|
50
33
|
var handleChange = function handleChange(newValue) {
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
onValueChange(newValue);
|
|
54
|
-
}
|
|
55
|
-
// 触发标准 onChange
|
|
56
|
-
if (props.onChange) {
|
|
57
|
-
props.onChange(newValue, structureName, structureField);
|
|
58
|
-
}
|
|
34
|
+
commit(newValue);
|
|
35
|
+
schemaOnChange === null || schemaOnChange === void 0 ? void 0 : schemaOnChange(newValue, structureName, structureField);
|
|
59
36
|
};
|
|
60
37
|
return /*#__PURE__*/React.createElement("span", {
|
|
61
38
|
className: "field-wrapper " + (disableEdit ? 'disable-edit' : 'enable-edit')
|
|
62
39
|
}, /*#__PURE__*/React.createElement(_Input, _extends({}, props, {
|
|
40
|
+
readOnly: disableEdit ? true : readOnlyProp,
|
|
41
|
+
disabled: disabledProp,
|
|
63
42
|
value: value,
|
|
64
43
|
onChange: handleChange
|
|
65
44
|
})));
|
|
@@ -1,14 +1,6 @@
|
|
|
1
1
|
import { Radio } from '@alifd/next';
|
|
2
2
|
/**
|
|
3
|
-
* ProRadio
|
|
4
|
-
* @description 单选按钮组
|
|
5
|
-
* @param {string} defaultValue 默认值(radio.group才有的字段)
|
|
6
|
-
* @param {string} screen_structure_field 屏幕结构字段
|
|
7
|
-
* @param {string} screen_inner_id 屏幕内部id
|
|
8
|
-
* @param {string} screen_structure 屏幕结构
|
|
9
|
-
* @param {string} dataSource 数据源
|
|
10
|
-
* @param {string} checkedValue 选中值
|
|
11
|
-
* @param {string} checked 默认选中
|
|
3
|
+
* ProRadio — 单选按钮组
|
|
12
4
|
*/
|
|
13
5
|
declare const ProRadio: typeof Radio;
|
|
14
6
|
export default ProRadio;
|
|
@@ -1,25 +1,11 @@
|
|
|
1
1
|
import _Radio from "@alifd/next/es/radio";
|
|
2
2
|
import _extends from "@babel/runtime/helpers/extends";
|
|
3
|
-
import
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
import { useComponentContext } from "../../context/useComponentContext";
|
|
7
|
-
var React = window.React;
|
|
8
|
-
var createElement = React.createElement,
|
|
9
|
-
useEffect = React.useEffect,
|
|
10
|
-
useRef = React.useRef,
|
|
11
|
-
useState = React.useState;
|
|
3
|
+
import { resolveProScreenBinding } from "../utils";
|
|
4
|
+
import { useProBoundValue } from "../../context/useProBoundValue";
|
|
5
|
+
var createElement = window.React.createElement;
|
|
12
6
|
|
|
13
7
|
/**
|
|
14
|
-
* ProRadio
|
|
15
|
-
* @description 单选按钮组
|
|
16
|
-
* @param {string} defaultValue 默认值(radio.group才有的字段)
|
|
17
|
-
* @param {string} screen_structure_field 屏幕结构字段
|
|
18
|
-
* @param {string} screen_inner_id 屏幕内部id
|
|
19
|
-
* @param {string} screen_structure 屏幕结构
|
|
20
|
-
* @param {string} dataSource 数据源
|
|
21
|
-
* @param {string} checkedValue 选中值
|
|
22
|
-
* @param {string} checked 默认选中
|
|
8
|
+
* ProRadio — 单选按钮组
|
|
23
9
|
*/
|
|
24
10
|
var ProRadio = function ProRadio(props) {
|
|
25
11
|
var dataSource = props.dataSource,
|
|
@@ -27,35 +13,35 @@ var ProRadio = function ProRadio(props) {
|
|
|
27
13
|
screen_structure_field = props.screen_structure_field,
|
|
28
14
|
screen_inner_id = props.screen_inner_id,
|
|
29
15
|
range_inner_table = props.range_inner_table,
|
|
30
|
-
defaultValue = props.defaultValue,
|
|
31
16
|
disableEdit = props.disableEdit,
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
var
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
17
|
+
readOnlyProp = props.readOnly,
|
|
18
|
+
disabledProp = props.disabled,
|
|
19
|
+
_v = props.value,
|
|
20
|
+
schemaOnChange = props.onChange,
|
|
21
|
+
defaultValue = props.defaultValue;
|
|
22
|
+
var _resolveProScreenBind = resolveProScreenBinding({
|
|
23
|
+
screen_structure: screen_structure,
|
|
24
|
+
screen_structure_field: screen_structure_field,
|
|
25
|
+
range_inner_table: range_inner_table
|
|
26
|
+
}),
|
|
27
|
+
structureName = _resolveProScreenBind.structureName,
|
|
28
|
+
structureField = _resolveProScreenBind.structureField,
|
|
29
|
+
fieldPath = _resolveProScreenBind.fieldPath;
|
|
30
|
+
var _useProBoundValue = useProBoundValue(fieldPath, defaultValue, ''),
|
|
31
|
+
value = _useProBoundValue.value,
|
|
32
|
+
commit = _useProBoundValue.commit;
|
|
43
33
|
var handleChange = function handleChange(newValue) {
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
onValueChange(newValue);
|
|
47
|
-
}
|
|
48
|
-
// 触发标准 onChange
|
|
49
|
-
if (props.onChange) {
|
|
50
|
-
props.onChange(newValue, structureName, structureField);
|
|
51
|
-
}
|
|
34
|
+
commit(newValue);
|
|
35
|
+
schemaOnChange === null || schemaOnChange === void 0 ? void 0 : schemaOnChange(newValue, structureName, structureField);
|
|
52
36
|
};
|
|
53
37
|
return /*#__PURE__*/React.createElement("span", {
|
|
54
38
|
className: "field-wrapper " + (disableEdit ? 'disable-edit' : 'enable-edit')
|
|
55
39
|
}, /*#__PURE__*/React.createElement(_Radio.Group, _extends({}, props, {
|
|
40
|
+
readOnly: disableEdit ? true : readOnlyProp,
|
|
41
|
+
disabled: disabledProp,
|
|
42
|
+
dataSource: dataSource,
|
|
56
43
|
value: value,
|
|
57
|
-
onChange: handleChange
|
|
58
|
-
dataSource: dataSource
|
|
44
|
+
onChange: handleChange
|
|
59
45
|
})));
|
|
60
46
|
};
|
|
61
47
|
export default ProRadio;
|
|
@@ -1,49 +1,44 @@
|
|
|
1
1
|
import _Select from "@alifd/next/es/select";
|
|
2
2
|
import _extends from "@babel/runtime/helpers/extends";
|
|
3
|
-
import
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
import { useComponentContext } from "../../context/useComponentContext";
|
|
7
|
-
var React = window.React;
|
|
8
|
-
var createElement = React.createElement,
|
|
9
|
-
useEffect = React.useEffect,
|
|
10
|
-
useRef = React.useRef,
|
|
11
|
-
useState = React.useState;
|
|
3
|
+
import { resolveProScreenBinding } from "../utils";
|
|
4
|
+
import { useProBoundValue } from "../../context/useProBoundValue";
|
|
5
|
+
var createElement = window.React.createElement;
|
|
12
6
|
var ProSelect = function ProSelect(props) {
|
|
13
7
|
var dataSource = props.dataSource,
|
|
14
8
|
screen_structure = props.screen_structure,
|
|
15
9
|
screen_structure_field = props.screen_structure_field,
|
|
16
10
|
screen_inner_id = props.screen_inner_id,
|
|
17
11
|
range_inner_table = props.range_inner_table,
|
|
18
|
-
defaultValue = props.defaultValue,
|
|
19
12
|
disableEdit = props.disableEdit,
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
var
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
13
|
+
readOnlyProp = props.readOnly,
|
|
14
|
+
disabledProp = props.disabled,
|
|
15
|
+
_v = props.value,
|
|
16
|
+
schemaOnChange = props.onChange,
|
|
17
|
+
defaultValue = props.defaultValue;
|
|
18
|
+
var _resolveProScreenBind = resolveProScreenBinding({
|
|
19
|
+
screen_structure: screen_structure,
|
|
20
|
+
screen_structure_field: screen_structure_field,
|
|
21
|
+
range_inner_table: range_inner_table
|
|
22
|
+
}),
|
|
23
|
+
structureName = _resolveProScreenBind.structureName,
|
|
24
|
+
structureField = _resolveProScreenBind.structureField,
|
|
25
|
+
fieldPath = _resolveProScreenBind.fieldPath;
|
|
26
|
+
var _useProBoundValue = useProBoundValue(fieldPath, defaultValue, undefined),
|
|
27
|
+
value = _useProBoundValue.value,
|
|
28
|
+
commit = _useProBoundValue.commit;
|
|
31
29
|
var handleChange = function handleChange(newValue) {
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
onValueChange(newValue);
|
|
35
|
-
}
|
|
36
|
-
// 触发标准 onChange
|
|
37
|
-
if (props.onChange) {
|
|
38
|
-
props.onChange(newValue, structureName, structureField);
|
|
39
|
-
}
|
|
30
|
+
commit(newValue);
|
|
31
|
+
schemaOnChange === null || schemaOnChange === void 0 ? void 0 : schemaOnChange(newValue, structureName, structureField);
|
|
40
32
|
};
|
|
33
|
+
var displayValue = value === '' ? undefined : value;
|
|
41
34
|
return /*#__PURE__*/React.createElement("span", {
|
|
42
35
|
className: "field-wrapper " + (disableEdit ? 'disable-edit' : 'enable-edit')
|
|
43
36
|
}, /*#__PURE__*/React.createElement(_Select, _extends({}, props, {
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
dataSource: dataSource
|
|
37
|
+
readOnly: disableEdit ? true : readOnlyProp,
|
|
38
|
+
disabled: disabledProp,
|
|
39
|
+
dataSource: dataSource,
|
|
40
|
+
value: displayValue,
|
|
41
|
+
onChange: handleChange
|
|
47
42
|
})));
|
|
48
43
|
};
|
|
49
44
|
export default ProSelect;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { Input as
|
|
2
|
-
declare const ProTextArea: typeof
|
|
1
|
+
import { Input as OriginalInput } from '@alifd/next';
|
|
2
|
+
declare const ProTextArea: typeof OriginalInput;
|
|
3
3
|
export default ProTextArea;
|
|
@@ -1,45 +1,39 @@
|
|
|
1
1
|
import _Input from "@alifd/next/es/input";
|
|
2
2
|
import _extends from "@babel/runtime/helpers/extends";
|
|
3
|
-
import
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
import { useComponentContext } from "../../context/useComponentContext";
|
|
7
|
-
var React = window.React;
|
|
8
|
-
var createElement = React.createElement,
|
|
9
|
-
useEffect = React.useEffect,
|
|
10
|
-
useRef = React.useRef,
|
|
11
|
-
useState = React.useState;
|
|
3
|
+
import { resolveProScreenBinding } from "../utils";
|
|
4
|
+
import { useProBoundValue } from "../../context/useProBoundValue";
|
|
5
|
+
var createElement = window.React.createElement;
|
|
12
6
|
var ProTextArea = function ProTextArea(props) {
|
|
13
7
|
var screen_structure = props.screen_structure,
|
|
14
8
|
screen_structure_field = props.screen_structure_field,
|
|
15
9
|
screen_inner_id = props.screen_inner_id,
|
|
16
10
|
range_inner_table = props.range_inner_table,
|
|
17
|
-
defaultValue = props.defaultValue,
|
|
18
11
|
disableEdit = props.disableEdit,
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
var
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
12
|
+
readOnlyProp = props.readOnly,
|
|
13
|
+
disabledProp = props.disabled,
|
|
14
|
+
_v = props.value,
|
|
15
|
+
schemaOnChange = props.onChange,
|
|
16
|
+
defaultValue = props.defaultValue;
|
|
17
|
+
var _resolveProScreenBind = resolveProScreenBinding({
|
|
18
|
+
screen_structure: screen_structure,
|
|
19
|
+
screen_structure_field: screen_structure_field,
|
|
20
|
+
range_inner_table: range_inner_table
|
|
21
|
+
}),
|
|
22
|
+
structureName = _resolveProScreenBind.structureName,
|
|
23
|
+
structureField = _resolveProScreenBind.structureField,
|
|
24
|
+
fieldPath = _resolveProScreenBind.fieldPath;
|
|
25
|
+
var _useProBoundValue = useProBoundValue(fieldPath, defaultValue != null ? String(defaultValue) : '', ''),
|
|
26
|
+
value = _useProBoundValue.value,
|
|
27
|
+
commit = _useProBoundValue.commit;
|
|
30
28
|
var handleChange = function handleChange(newValue) {
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
onValueChange(newValue);
|
|
34
|
-
}
|
|
35
|
-
// 触发标准 onChange
|
|
36
|
-
if (props.onChange) {
|
|
37
|
-
props.onChange(newValue, structureName, structureField);
|
|
38
|
-
}
|
|
29
|
+
commit(newValue);
|
|
30
|
+
schemaOnChange === null || schemaOnChange === void 0 ? void 0 : schemaOnChange(newValue, structureName, structureField);
|
|
39
31
|
};
|
|
40
32
|
return /*#__PURE__*/React.createElement("span", {
|
|
41
33
|
className: "field-wrapper " + (disableEdit ? 'disable-edit' : 'enable-edit')
|
|
42
34
|
}, /*#__PURE__*/React.createElement(_Input.TextArea, _extends({}, props, {
|
|
35
|
+
readOnly: disableEdit ? true : readOnlyProp,
|
|
36
|
+
disabled: disabledProp,
|
|
43
37
|
value: value,
|
|
44
38
|
onChange: handleChange
|
|
45
39
|
})));
|