lu-lowcode-package-form 0.9.65 → 0.9.66
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.cjs.js +3 -3
- package/dist/index.es.js +297 -295
- package/package.json +1 -1
- package/src/App.jsx +1 -0
- package/src/components/field/base.jsx +5 -2
package/package.json
CHANGED
package/src/App.jsx
CHANGED
@@ -136,6 +136,7 @@ function App() {
|
|
136
136
|
|
137
137
|
|
138
138
|
<FormContainerWrapper cols={cols} className="" ref={formRef} >
|
139
|
+
<Field.UserSelect label="选择用户" __id="userselect" defaultValue={ [{id:1,username: "十天"}]} />
|
139
140
|
<Layout.FormGroupTitle title={"基本信息"} />
|
140
141
|
<Layout.FormRow layout={'1'}>
|
141
142
|
<Field.Table label="子表格" __id="table" >
|
@@ -24,12 +24,15 @@ export const BaseWrapper = ({
|
|
24
24
|
hidePrompt = false,
|
25
25
|
subTableIndex,
|
26
26
|
addWrapper = true,
|
27
|
-
|
27
|
+
defaultValue,
|
28
|
+
onChange,
|
28
29
|
readonly,
|
29
30
|
isRequired,
|
30
31
|
...otherProps
|
31
32
|
}) => {
|
32
|
-
|
33
|
+
useEffect(()=>{
|
34
|
+
if (defaultValue && typeof onChange === "function") onChange(defaultValue)
|
35
|
+
},[defaultValue])
|
33
36
|
if (!addWrapper) return children;
|
34
37
|
// 不接管只读属性的组件
|
35
38
|
const ignoreReadonly = ["UploadImage", "UploadFile", "Table", "WithMultipleSelect", "WithSingleSelect"]
|