ronds-metadata 1.1.77 → 1.1.79
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.
@@ -26,7 +26,7 @@ import _slicedToArray from "@babel/runtime/helpers/esm/slicedToArray";
|
|
26
26
|
/*
|
27
27
|
* @Author:wangxian
|
28
28
|
* @Date: 2021-09-18 14:15:04
|
29
|
-
* @LastEditTime:
|
29
|
+
* @LastEditTime: 2023-01-06 15:32:59
|
30
30
|
*/
|
31
31
|
import React from 'react';
|
32
32
|
import { MetadataFormContext, MetadataRefContext } from '../interface';
|
@@ -81,7 +81,7 @@ function Index(props) {
|
|
81
81
|
// 判断是否有 watch的扩展属性
|
82
82
|
var _watch = extraInfo === null || extraInfo === void 0 ? void 0 : (_extraInfo$http = extraInfo.http) === null || _extraInfo$http === void 0 ? void 0 : _extraInfo$http.watch;
|
83
83
|
|
84
|
-
if (_watch) {
|
84
|
+
if (_watch && (p === null || p === void 0 ? void 0 : p.type) === 'onSelectChange') {
|
85
85
|
var _value = p === null || p === void 0 ? void 0 : p.payload[_watch];
|
86
86
|
|
87
87
|
if (_value) {
|
@@ -24,6 +24,9 @@ var MetadataForm = function MetadataForm(props) {
|
|
24
24
|
refId = props.refId,
|
25
25
|
_props$colSpan = props.colSpan,
|
26
26
|
colSpan = _props$colSpan === void 0 ? 24 : _props$colSpan,
|
27
|
+
labelSpan = props.labelSpan,
|
28
|
+
_props$labelWrap = props.labelWrap,
|
29
|
+
labelWrap = _props$labelWrap === void 0 ? true : _props$labelWrap,
|
27
30
|
_props$layout = props.layout,
|
28
31
|
layout = _props$layout === void 0 ? 'vertical' : _props$layout,
|
29
32
|
_props$disabled = props.disabled,
|
@@ -200,10 +203,15 @@ var MetadataForm = function MetadataForm(props) {
|
|
200
203
|
}
|
201
204
|
}, /*#__PURE__*/React.createElement(_Form, {
|
202
205
|
className: "metadata-form",
|
203
|
-
wrapperCol: {
|
204
|
-
span: 24,
|
206
|
+
wrapperCol: labelSpan ? {
|
207
|
+
span: 24 - labelSpan,
|
205
208
|
offset: 0
|
206
|
-
},
|
209
|
+
} : undefined,
|
210
|
+
labelCol: labelSpan ? {
|
211
|
+
span: labelSpan,
|
212
|
+
offset: 0
|
213
|
+
} : undefined,
|
214
|
+
labelWrap: labelWrap,
|
207
215
|
layout: layout,
|
208
216
|
form: form,
|
209
217
|
name: "control-hooks",
|