lu-lowcode-package-form 0.11.75 → 0.11.77

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.11.75",
3
+ "version": "0.11.77",
4
4
  "dependencies": {
5
5
  "@ant-design/icons": "^4.8.1",
6
6
  "@dnd-kit/core": "^6.1.0",
package/src/App.jsx CHANGED
@@ -608,7 +608,7 @@ function App() {
608
608
 
609
609
  ]} label="子表填充数据源" __id="fill_datasource1" />
610
610
  <Layout.FormRow layout={'1'}>
611
- <Field.Table label="测试主子表填充" __id="table_fill" isAllowAdd={true} isAllowCopy={true} columnsWidth={[100,200,300,400,500,600,700,800,900,1000]}>
611
+ <Field.Table label="测试主子表填充" __id="table_fill" isAllowAdd={true} hideNoData={true} isAllowCopy={true} columnsWidth={[100,200,300,400,500,600,700,800,900,1000]}>
612
612
  <Field.Number label="税率" __id="fill_shuilv"
613
613
  />
614
614
  <Field.Input label="含税单价代理中转" __id="fill_xianghu4"
@@ -44,7 +44,7 @@ const TableCol = ({ children, width, hidden, ...props }) => {
44
44
  </div>
45
45
  }
46
46
 
47
- const Table = ({ children, onTableAddRow, disabled, readonly, onTableRemoveRow, form, fieldName, initializeFormRender, recordFieldsChange, getTableWithIds, removeLastFieldsValues, mode, isAllowCopy = false, isAllowAdd = true, getDependencyMapItem, ...props }) => {
47
+ const Table = ({ children, onTableAddRow, disabled, readonly, onTableRemoveRow, form, fieldName, hideNoData, initializeFormRender, recordFieldsChange, getTableWithIds, removeLastFieldsValues, mode, isAllowCopy = false, isAllowAdd = true, getDependencyMapItem, ...props }) => {
48
48
 
49
49
  const [initialWidth, setInitialWidth] = useState([])
50
50
  const [headWidths, setHeadWidths] = useState([])
@@ -145,11 +145,11 @@ const Table = ({ children, onTableAddRow, disabled, readonly, onTableRemoveRow,
145
145
  })
146
146
  if (props.isRequired)
147
147
  rules.push({ required: true, message: `子表[${props.label}]必须填写` });
148
- return <div className="fw-full fflex fflex-col fgap-2">
148
+ return <div className={"fw-full fflex fflex-col fgap-2"}>
149
149
  <Form.List name={name} rules={rules}>
150
150
  {(fields, { add, remove }) => {
151
- if (fields.length === 0 && !init) handleAdd();
152
- return <div className="fw-full ">
151
+ if (fields.length === 0 && !hideNoData && !init) handleAdd();
152
+ return <div className={"fw-full " + (hideNoData && fields.length == 0 ? " fhidden" : "")}>
153
153
 
154
154
  <div className="fw-full frelative fmin-h-20 foverflow-x-auto" style={{ position: 'relative' }}>
155
155
  <DragHead changeWidth={handleChangeWidth} initialWidth={initialWidth} showAction={disabled != true && readonly != true} childrenDesc={childrenDesc}/>
@@ -17,7 +17,7 @@ const evalFormula = memoizee((formula) => {
17
17
  })()
18
18
  `;
19
19
  const func = new Function('Decimal', funcCode);
20
- result = func()
20
+ result = func(Decimal);
21
21
  // result = eval(formula.join(""));
22
22
  if (!(typeof result === "object" && result !== null))
23
23
  result = result.toString();