lu-lowcode-package-form 0.10.65 → 0.10.67

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.65",
3
+ "version": "0.10.67",
4
4
  "dependencies": {
5
5
  "@ant-design/icons": "^4.8.1",
6
6
  "@dnd-kit/core": "^6.1.0",
package/src/App.jsx CHANGED
@@ -105,7 +105,7 @@ function App() {
105
105
  }
106
106
  }
107
107
  const setFormFields = () => {
108
- formRef?.current?.setFieldsValue({ "id": 1, "userselect": "1213131", "tianchong1": { "label": "选项1", "value": "1" }, "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" }] })
108
+ formRef?.current?.setFieldsValue({"__id":1,"userselect":"1213131","remark11":{"label":"选项1","value":"1","name":"1111","table":"[{\"price\":1,\"num\":2},{\"price\":2,\"num\":2},{\"price\":3,\"num\":3},{\"price\":3,\"num\":3}]"},"table2":[{}],"table":[{"product_num1":"123","product_sum1":"","node_oclxmzswzti":"","select2":"","switch_table":false,"remark11":{"label":"选项2","value":"2"},"product_price12":"","tianchong1":{"label":"选项1","value":"1","tianchong2":{"label":"选项2","value":"2"},"tcinput1":"1111"},"tianchong2":{"label":"选项2","value":"2","tcinput1":"8989","tcinput2":"2222"},"tcinput1":"8989","tcinput2":"2222","tcinput3":"1111"},{"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_price11":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"}]})
109
109
  // formRef?.current?.setFieldsValue({"tianchong1":{"label":"选项1","value":"1"}, })
110
110
  }
111
111
  const handleCols = () => {
@@ -210,9 +210,9 @@ function App() {
210
210
  }
211
211
  ]} />
212
212
  </Layout.FormRow>
213
- <Field.Number label="测试" __id="aa2" readonly={readonly} />
213
+ <Field.Number label="测试" __id="aa2" isRequired={true} />
214
214
  <Field.Number label="测试" __id="aa3" readonly={readonly} />
215
- <Field.Number label="测试" __id="aa1" isRequired={true} calcHidden={true} readonly={readonly} />
215
+ <Field.Number label="测试" __id="aa1" calcHidden={true} readonly={readonly} />
216
216
  <Field.Number label="测试" __id="aa4" readonly={readonly} />
217
217
  <Field.UserSelect label="选择用户" __id="userselect" defaultValue={[{ id: 1, username: "十天" }]} readonly={readonly} />
218
218
  <Layout.FormGroupTitle title={"基本信息"} />
@@ -222,7 +222,7 @@ function App() {
222
222
  // console.log("rightIconRender fieldName", fieldName)
223
223
  return <><PrinterOutlined /></>
224
224
  }}
225
- isRequired={true} ref={testRef} fillRules={[
225
+ ref={testRef} fillRules={[
226
226
  {
227
227
  "id": "636d3924-0298-4e9b-809a-26d4a10d7b89",
228
228
  "type": 0,
@@ -236,7 +236,7 @@ function App() {
236
236
 
237
237
  <Field.Number label="税率(%)" __id="shuilv" calcHidden={true} />
238
238
 
239
- <Field.WithSingleSelect isRequired={true} ref={testRef} fillRules={[
239
+ <Field.WithSingleSelect ref={testRef} fillRules={[
240
240
  {
241
241
  "id": "636d3924-0298-4e9b-809a-26d4a10d7b89",
242
242
  "type": 0,
@@ -269,7 +269,7 @@ function App() {
269
269
  }
270
270
  ]} label="测试关联单选" options={[{ label: '选项1', value: '1', name: "1111", table: "[{\"price\":1,\"num\":2},{\"price\":2,\"num\":2},{\"price\":3,\"num\":3},{\"price\":3,\"num\":3}]" }, { label: '选项2', value: '2' }]} __id="remark11" />
271
271
  <Layout.FormRow layout={'1'}>
272
- <Field.Number label="测试规则" isRequired={true} __id="ceshi_rule1" />
272
+ <Field.Number label="测试规则" __id="ceshi_rule1" />
273
273
  </Layout.FormRow>
274
274
  <Layout.FormRow layout={'1'}>
275
275
  <Field.Table label="子表格" __id="table2" isAllowCopy={true} >
@@ -278,7 +278,7 @@ function App() {
278
278
  </Layout.FormRow>
279
279
 
280
280
  <Field.WithSingleSelect
281
- isRequired={true} ref={testRef}
281
+ ref={testRef}
282
282
  request={async (params) => {
283
283
  console.log("request params", params);
284
284
  const { page = 1 ,pageSize = 10} = params; // 获取当前页码,默认为1
@@ -333,7 +333,7 @@ function App() {
333
333
  <Field.Table label="子表格" __id="table" isAllowAdd={true} isAllowCopy={false} >
334
334
 
335
335
  <Field.WithSingleSelect
336
- isRequired={true} ref={testRef}
336
+ ref={testRef}
337
337
  request={async (params) => {
338
338
  console.log("request params", params)
339
339
  return { code: 0, data: { list: [{ label: '选项1', value: '1', tianchong2: { label: '选项2', value: '2' }, tcinput1: "1111", }, { label: '选项2', value: '2' }, { label: '选项3', value: '3' }] } }
@@ -360,7 +360,7 @@ function App() {
360
360
 
361
361
  ]} label="测试填充1" __id="tianchong1" />
362
362
  <Field.WithSingleSelect
363
- isRequired={true} ref={testRef}
363
+ ref={testRef}
364
364
  request={async (params) => {
365
365
  if (!params?.value) return { code: 0, data: { list: [{ label: '选项1', value: '1', }] } }
366
366
  await new Promise(resolve => setTimeout(resolve, 200))
@@ -419,7 +419,7 @@ function App() {
419
419
  }}
420
420
  />
421
421
 
422
- <Field.Number label="税率(%)" isRequired={true} calcHidden={true} __id="shuilv_table" withIds={[
422
+ <Field.Number label="税率(%)" calcHidden={true} __id="shuilv_table" withIds={[
423
423
  "shuilv"
424
424
  ]}
425
425
  withFill={{
@@ -493,8 +493,8 @@ function App() {
493
493
  ]} label="测试关联单选" __id="remark11" />
494
494
 
495
495
  <Field.Switch label="开关" __id="switch_table"></Field.Switch>
496
- <Field.Input defaultValue={3} isRequired={true} label="含税单价" __id="product_price11" />
497
- <Field.Input isRequired={true} label="未税单价" __id="product_price12"
496
+ <Field.Input defaultValue={3} label="含税单价" __id="product_price11" />
497
+ <Field.Input label="未税单价" __id="product_price12"
498
498
  withIds={[
499
499
  "table.product_price11",
500
500
  "shuilv"
@@ -539,10 +539,10 @@ function App() {
539
539
  ]
540
540
  }}
541
541
  />
542
- <Field.Input isRequired={true} defaultValue={1} label="商品价格" __id="product_price13" />
543
- <Field.Input isRequired={true} defaultValue={2} label="商品价格" __id="product_price14" />
544
- <Field.Input isRequired={true} label="商品价格" __id="product_price1" />
545
- <Field.Input isRequired={true} label="商品个数" __id="product_num1" />
542
+ <Field.Input defaultValue={1} label="商品价格" __id="product_price13" />
543
+ <Field.Input defaultValue={2} label="商品价格" __id="product_price14" />
544
+ <Field.Input label="商品价格" __id="product_price1" />
545
+ <Field.Input label="商品个数" __id="product_num1" />
546
546
  <Field.Input disabled={true} label="商品总价" __id="product_sum1"
547
547
  withIds={["table.product_price1", "table.product_num1"]}
548
548
  withFill={{
@@ -637,7 +637,7 @@ function App() {
637
637
  ],
638
638
  },]}></Field.PostSelect>
639
639
  <Field.SearchSelect mode='multiple' label="搜组件" __id="searchuser" request={searchSelectRequest} option_search={"name"} option_label="name" option_value="id"></Field.SearchSelect>
640
- <Field.Input isRequired={true} label="商品价格" __id="product_price" defaultValue={"12"} disabled={true} />
640
+ <Field.Input label="商品价格" __id="product_price" defaultValue={"12"} disabled={true} />
641
641
  <Field.Input label="商品数量" __id="product_num" rules={"^(1[3-9]\\d{9})$"} />
642
642
  <Field.NumberRange label="数量范围" __id="product_num_range" />
643
643
  <Field.Input rules={["^(1[3-9]\\d{9})$", "^\\d+$"]} label="商品总价" __id="product_sum"
@@ -702,7 +702,7 @@ function App() {
702
702
  }}>1111</div>
703
703
  <Field.DatePicker defaultNow={true} label="datetime" prompt="" datetype="month" value='2022-10-22' __id="datetime" />
704
704
  <Field.DatePicker label="datetime2" prompt="" datetype="date" __id="datetime2" />
705
- <Field.DatePicker isRequired={true} disabled={true} defaultNow={true} label="datetime3" prompt="" datetype="datetime" value={'2022-10-22'} __id="datetime3" />
705
+ <Field.DatePicker disabled={true} defaultNow={true} label="datetime3" prompt="" datetype="datetime" value={'2022-10-22'} __id="datetime3" />
706
706
  <Field.DatePicker defaultNow={true} label="datetime4" prompt="" datetype="year" value={'2022-10-22'} __id="datetime4" />
707
707
  <Field.Input label="角色名称" __id="name" />
708
708
  <Layout.FormRow layout={'1,1'}>
@@ -42,6 +42,7 @@ const SearchSelect = forwardRef(({ addWrapper = true, form, fieldName, fieldsVal
42
42
  console.log("SearchSelect useEffect requestParams", requestParams)
43
43
  initData(requestParams)
44
44
  }, [shouldUpdateKey, requestParams])
45
+ // }, [ requestParams])
45
46
 
46
47
  // useEffect(() => {
47
48
  // console.log("SearchSelect useEffect requestParams", requestParams)
@@ -7,7 +7,7 @@ import { eventEmitter } from '../../../utils/events'
7
7
 
8
8
  const TableAction = ({ label, subTableIndex, children, subTableHead = false, ...props }) => {
9
9
  //fsticky fright-0
10
- return <div className="fsticky fright-0 fbg-white" style={{
10
+ return <div className="fsticky fright-0 fbg-white fborder-b " style={{
11
11
  boxShadow: '-6px 0 6px -6px rgba(50,50,50,0.15)',
12
12
  flex: '0 0 50px',
13
13
  width: '50px'