lu-lowcode-package-form 0.9.90 → 0.9.92
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/dist/index.es.js
CHANGED
@@ -40732,7 +40732,7 @@ const TreeSelect = (e1e) => {
|
|
40732
40732
|
return React__default.useEffect(() => {
|
40733
40733
|
if (l1e && typeof l1e == "string")
|
40734
40734
|
try {
|
40735
|
-
l1e = JSON.parse(l1e), s1e == null || s1e.setFieldValue(u1e, l1e), console.log("WithSingleSelect useEffect onChange////// form", s1e), console.log("WithSingleSelect useEffect onChange//////
|
40735
|
+
l1e = JSON.parse(l1e), s1e == null || s1e.setFieldValue(u1e, l1e), console.log("WithSingleSelect useEffect onChange////// form", s1e), console.log("WithSingleSelect useEffect onChange////// fieldName", u1e), console.log("WithSingleSelect useEffect onChange////// value", l1e);
|
40736
40736
|
} catch (f1e) {
|
40737
40737
|
console.log("WithSingleSelect useEffect error", f1e);
|
40738
40738
|
}
|
@@ -41046,7 +41046,7 @@ const FormContainer = /* @__PURE__ */ forwardRef((e1e, t1e) => {
|
|
41046
41046
|
if (Array.isArray(A1e) && (T1e = [...A1e.slice(0, -1)], A1e = A1e.filter((P1e) => typeof P1e == "string").join(".")), s1e.current.has(A1e)) {
|
41047
41047
|
const P1e = s1e.current.get(A1e), _1e = P1e.children;
|
41048
41048
|
!w1e && P1e !== null && P1e !== void 0 && P1e.fillRules && Array.isArray(P1e == null ? void 0 : P1e.fillRules) && (P1e == null ? void 0 : P1e.fillRules.length) > 0 && g1e(A1e, T1e, O1e, P1e == null ? void 0 : P1e.fillRules), _1e.forEach((N1e) => {
|
41049
|
-
N1e.component.props.withFunc && typeof N1e.component.props.withFunc == "function" && (R1e = $1e(O1e, N1e)), N1e.component.props.withFill && v1e(O1e, N1e, T1e, P1e == null ? void 0 : P1e.componentName);
|
41049
|
+
N1e.component.props.withFunc && typeof N1e.component.props.withFunc == "function" && (R1e = $1e(O1e, N1e)), !w1e && N1e.component.props.withFill && v1e(O1e, N1e, T1e, P1e == null ? void 0 : P1e.componentName);
|
41050
41050
|
});
|
41051
41051
|
}
|
41052
41052
|
return R1e;
|
@@ -49164,21 +49164,27 @@ var doEval = function e1e(t1e) {
|
|
49164
49164
|
}
|
49165
49165
|
}
|
49166
49166
|
return l1e;
|
49167
|
-
},
|
49168
|
-
|
49169
|
-
|
49170
|
-
|
49171
|
-
|
49172
|
-
|
49173
|
-
|
49174
|
-
|
49167
|
+
}, esDefineProperty, hasRequiredEsDefineProperty;
|
49168
|
+
function requireEsDefineProperty() {
|
49169
|
+
if (hasRequiredEsDefineProperty) return esDefineProperty;
|
49170
|
+
hasRequiredEsDefineProperty = 1;
|
49171
|
+
var e1e = getIntrinsic, t1e = e1e("%Object.defineProperty%", !0) || !1;
|
49172
|
+
if (t1e)
|
49173
|
+
try {
|
49174
|
+
t1e({}, "a", { value: 1 });
|
49175
|
+
} catch {
|
49176
|
+
t1e = !1;
|
49177
|
+
}
|
49178
|
+
return esDefineProperty = t1e, esDefineProperty;
|
49179
|
+
}
|
49180
|
+
var GetIntrinsic$7 = getIntrinsic, $gOPD$1 = GetIntrinsic$7("%Object.getOwnPropertyDescriptor%", !0);
|
49175
49181
|
if ($gOPD$1)
|
49176
49182
|
try {
|
49177
49183
|
$gOPD$1([], "length");
|
49178
49184
|
} catch {
|
49179
49185
|
$gOPD$1 = null;
|
49180
49186
|
}
|
49181
|
-
var gopd$1 = $gOPD$1, $defineProperty$1 =
|
49187
|
+
var gopd$1 = $gOPD$1, $defineProperty$1 = requireEsDefineProperty(), $SyntaxError$1 = syntax, $TypeError$5 = type$1, gopd = gopd$1, defineDataProperty$1 = function e1e(t1e, n1e, r1e) {
|
49182
49188
|
if (!t1e || typeof t1e != "object" && typeof t1e != "function")
|
49183
49189
|
throw new $TypeError$5("`obj` must be an object or a function`");
|
49184
49190
|
if (typeof n1e != "string" && typeof n1e != "symbol")
|
@@ -49203,7 +49209,7 @@ var gopd$1 = $gOPD$1, $defineProperty$1 = esDefineProperty, $SyntaxError$1 = syn
|
|
49203
49209
|
t1e[n1e] = r1e;
|
49204
49210
|
else
|
49205
49211
|
throw new $SyntaxError$1("This environment does not support defining a property as non-configurable, non-writable, or non-enumerable.");
|
49206
|
-
}, $defineProperty =
|
49212
|
+
}, $defineProperty = requireEsDefineProperty(), hasPropertyDescriptors = function e1e() {
|
49207
49213
|
return !!$defineProperty;
|
49208
49214
|
};
|
49209
49215
|
hasPropertyDescriptors.hasArrayLengthDefineBug = function e1e() {
|
@@ -49258,7 +49264,7 @@ var defineProperties_1 = defineProperties$1, callBind$6 = { exports: {} }, GetIn
|
|
49258
49264
|
)), t1e;
|
49259
49265
|
};
|
49260
49266
|
(function(e1e) {
|
49261
|
-
var t1e = functionBind, n1e = getIntrinsic, r1e = setFunctionLength, o1e = type$1, i1e = n1e("%Function.prototype.apply%"), a1e = n1e("%Function.prototype.call%"), l1e = n1e("%Reflect.apply%", !0) || t1e.call(a1e, i1e), s1e =
|
49267
|
+
var t1e = functionBind, n1e = getIntrinsic, r1e = setFunctionLength, o1e = type$1, i1e = n1e("%Function.prototype.apply%"), a1e = n1e("%Function.prototype.call%"), l1e = n1e("%Reflect.apply%", !0) || t1e.call(a1e, i1e), s1e = requireEsDefineProperty(), u1e = n1e("%Math.max%");
|
49262
49268
|
e1e.exports = function(d1e) {
|
49263
49269
|
if (typeof d1e != "function")
|
49264
49270
|
throw new o1e("a function is required");
|
@@ -54991,7 +54997,7 @@ const TableAction = (e1e) => {
|
|
54991
54997
|
subTableIndex: b1e,
|
54992
54998
|
subTableHead: b1e == 0,
|
54993
54999
|
form: a1e,
|
54994
|
-
fieldName: [y1e.name, w1e]
|
55000
|
+
fieldName: [l1e, y1e.name, w1e]
|
54995
55001
|
})
|
54996
55002
|
})
|
54997
55003
|
}, "row_".concat(y1e.key, "_col_").concat(S1e));
|
package/package.json
CHANGED
package/src/App.jsx
CHANGED
@@ -99,15 +99,7 @@ function App() {
|
|
99
99
|
}
|
100
100
|
}
|
101
101
|
const setFormFields = () => {
|
102
|
-
formRef?.current?.formRef?.setFieldsValue({
|
103
|
-
datetime: "2024-08-25", datetime2: "2024-08-25", datetime3: "",
|
104
|
-
"remark11": { label: '选项1', value: '1', name: "1111", table: "[{\"price\":1,\"num\":2},{\"price\":2,\"num\":2},{\"price\":3,\"num\":3},{\"price\":3,\"num\":3}]" },
|
105
|
-
"remark12": [{ "label": "选项1", "value": "1" }, { "label": "选项2", "value": "2" }],
|
106
|
-
"userselect": "1213131", "DeptSelect": ["leaf11"],
|
107
|
-
"searchuser": [{ "id": 2, "name": "2222", "label": "2222", "value": 2 }, { "id": 4, "name": "4444", "label": "4444", "value": 4 }],
|
108
|
-
"PostSelect": '["parent 1-1","leaf11"]', "table": [{ "product_price1": "12", "product_num1": "123", "product_sum1": "1476", "node_oclxmzswzti": "", "select2": "" }, { "product_price1": "123", "product_num1": "213", "product_sum1": "26199", "node_oclxmzswzti": "", "select2": "" }],
|
109
|
-
"product_total_price": "0.00", "product_price": "213", "product_num": "21", "product_num_range": [1, 22], "product_sum": "4473", "switch": false
|
110
|
-
})
|
102
|
+
formRef?.current?.formRef?.setFieldsValue({"userselect":"1213131","remark11":{"label":"选项1","value":"1","name":"1111","table":"[{\"price\":1,\"num\":2, \"remark11\":\"{ label: '选项3', value: '3' }\"},{\"price\":2,\"num\":2},{\"price\":3,\"num\":3},{\"price\":3,\"num\":3}]"},"table":[{"product_num1":"123","product_sum1":"","node_oclxmzswzti":"","select2":"","switch_table":false,"remark11":{"label":"选项2","value":"2"},"product_price12":""},{"product_num1":"213","product_sum1":"","node_oclxmzswzti":"","select2":"","switch_table":false,"datetime2":"2024-08-22 11:09:07","product_price13":1,"product_price14":2,"product_price12":"","remark11":{"label":"选项3","value":"3"}}],"product_total_price":"0.00","DeptSelect":["leaf11"],"PostSelect":["parent 1-1","leaf11"],"searchuser":[{"id":2,"name":"2222","label":"2222","value":2},{"id":4,"name":"4444","label":"4444","value":4}],"product_price":"213","product_num":"21","product_num_range":[1,22],"product_sum":"4473","switch":false,"datetime":"2024-08-25","datetime2":"2024-08-25","datetime3":"","datetime4":"2024-08-22 11:09:04","remark12":[{"label":"选项1","value":"1"},{"label":"选项2","value":"2"}]})
|
111
103
|
}
|
112
104
|
const handleCols = () => {
|
113
105
|
setCols(cols - 1)
|
@@ -81,8 +81,8 @@ const WithSingleSelect = ({ readItemRender, readonly, onChange, onCustomChange,v
|
|
81
81
|
// onChange(value)
|
82
82
|
form?.setFieldValue(fieldName, value )
|
83
83
|
console.log("WithSingleSelect useEffect onChange////// form",form)
|
84
|
+
console.log("WithSingleSelect useEffect onChange////// fieldName",fieldName)
|
84
85
|
console.log("WithSingleSelect useEffect onChange////// value",value)
|
85
|
-
console.log("WithSingleSelect useEffect onChange////// props",props)
|
86
86
|
} catch (error) {
|
87
87
|
console.log("WithSingleSelect useEffect error",error)
|
88
88
|
}
|
@@ -61,7 +61,7 @@ const Table = ({ children, onTableAddRow,disabled,readonly,onTableRemoveRow, for
|
|
61
61
|
</div>}
|
62
62
|
{fields.map((field, index) => (
|
63
63
|
<div key={field.key} className="fborder-b fflex flex-nowrap fmin-w-full ">
|
64
|
-
|
64
|
+
|
65
65
|
{React.Children.map(children, (child, childIndex) => {
|
66
66
|
let { props } = child;
|
67
67
|
const col_id = child?.props?.componentId || child?.props?.__id || childIndex;
|
@@ -92,7 +92,7 @@ const Table = ({ children, onTableAddRow,disabled,readonly,onTableRemoveRow, for
|
|
92
92
|
subTableIndex: index,
|
93
93
|
subTableHead: index == 0,
|
94
94
|
form,
|
95
|
-
fieldName: [field.name, col_id],
|
95
|
+
fieldName: [fieldName,field.name, col_id],
|
96
96
|
})}
|
97
97
|
</Form.Item>
|
98
98
|
</TableCol>
|
@@ -149,7 +149,7 @@ const FormContainer = forwardRef(({ cols = 1, children, mode = "view" }, ref) =>
|
|
149
149
|
needRefresh = handleFieldsVisible(fieldValues, child, parentIdentifier)
|
150
150
|
}
|
151
151
|
|
152
|
-
if (child.component.props.withFill)
|
152
|
+
if (!init && child.component.props.withFill)
|
153
153
|
handleFieldsWithFill(fieldValues, child, parentIdentifier, dependent?.componentName)
|
154
154
|
|
155
155
|
});
|