lu-lowcode-package-form 0.10.46 → 0.10.47

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lu-lowcode-package-form",
3
- "version": "0.10.46",
3
+ "version": "0.10.47",
4
4
  "dependencies": {
5
5
  "@ant-design/icons": "^4.8.1",
6
6
  "@dnd-kit/core": "^6.1.0",
package/src/App.jsx CHANGED
@@ -79,6 +79,8 @@ function App() {
79
79
  const formRef = React.createRef();
80
80
  const testRef = React.useRef()
81
81
  const [testCalcHidden, setTestCalcHidden] = useState(false);
82
+ const [readonly, setReadonly] = useState(true);
83
+
82
84
  useEffect(() => {
83
85
  // console.log("testRef //////", testRef.current)
84
86
  }, [testRef.current])
@@ -113,6 +115,9 @@ function App() {
113
115
 
114
116
  const [items, setItems] = useState(['Item 1', 'Item 2', 'Item 3', 'Item 4']);
115
117
 
118
+ const handleUpdateReadonly = () => {
119
+ setReadonly(!readonly)
120
+ }
116
121
 
117
122
  const [sortItems, setSortItems] = useState([{ id: 1, content: "sdfsfd" }, { id: 2, content: "sdfsfd2" }, { id: 3, content: "sdfsfd3" }]);
118
123
  return (
@@ -128,7 +133,9 @@ function App() {
128
133
  console.log("testRef.current", testRef.current)
129
134
  testRef.current?.handleChange({ label: '选项1', value: '1', name: "1111", table: "[{\"price\":1,\"num\":2},{\"price\":2,\"num\":2}]" })
130
135
  }}>testwithref</Button>
131
- <Button type="primary" onClick={handleCols}>UpdateCol</Button></div>
136
+ <Button type="primary" onClick={handleCols}>UpdateCol</Button>
137
+ <Button type="primary" onClick={handleUpdateReadonly}>UpdateReadonly</Button>
138
+ </div>
132
139
 
133
140
  <div className=" fflex fflex-col fitems-center fflex-1 foverflow-y-auto">
134
141
  <DraggableBtn />
@@ -179,7 +186,11 @@ function App() {
179
186
 
180
187
 
181
188
  <FormContainerWrapper cols={cols} className="" ref={formRef} >
189
+ <Field.MultipleSelect mode="multiple" option_label={"label"} option_value={"value"} label="测试过滤条件" __id="selecta1" request={async (params) => {
190
+ return { code: 0, data: { list: [{ label: '选项1', value: '1' }, { label: '选项2', value: '2' }] } }
191
+ }}></Field.MultipleSelect>
182
192
  <Layout.FormRow layout={'1'}>
193
+
183
194
  <Show.WithTable label="测试关联子表" __id="withtable1"
184
195
  filterRules={[
185
196
  {
@@ -199,11 +210,11 @@ function App() {
199
210
  }
200
211
  ]} />
201
212
  </Layout.FormRow>
202
- <Field.Number label="测试" __id="aa2" />
203
- <Field.Number label="测试" __id="aa3" />
204
- <Field.Number label="测试" __id="aa1" isRequired={true} calcHidden={true} />
205
- <Field.Number label="测试" __id="aa4" />
206
- <Field.UserSelect label="选择用户" __id="userselect" defaultValue={[{ id: 1, username: "十天" }]} />
213
+ <Field.Number label="测试" __id="aa2" readonly={readonly} />
214
+ <Field.Number label="测试" __id="aa3" readonly={readonly} />
215
+ <Field.Number label="测试" __id="aa1" isRequired={true} calcHidden={true} readonly={readonly} />
216
+ <Field.Number label="测试" __id="aa4" readonly={readonly} />
217
+ <Field.UserSelect label="选择用户" __id="userselect" defaultValue={[{ id: 1, username: "十天" }]} readonly={readonly} />
207
218
  <Layout.FormGroupTitle title={"基本信息"} />
208
219
  <Field.WithSingleSelect
209
220
  rightIconRender={({ form, fieldName }) => {
@@ -545,7 +545,11 @@ const FormContainer = forwardRef(({ cols = 1, children, mode = "view" }, ref) =>
545
545
  }
546
546
  }
547
547
  }
548
-
548
+ console.log(" ")
549
+ console.log("prevValues",prevValues)
550
+ console.log("curValues",curValues)
551
+ console.log("result",result)
552
+ console.log(" ")
549
553
  return result;
550
554
  }}
551
555
  >