lu-lowcode-package-form 0.11.77 → 0.11.79

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.77",
3
+ "version": "0.11.79",
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} hideNoData={true} isAllowCopy={true} columnsWidth={[100,200,300,400,500,600,700,800,900,1000]}>
611
+ <Field.Table label="测试主子表填充" __id="table_fill" isAllowAdd={true} isAllowCopy={true} hideEditMode={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"
@@ -182,7 +182,7 @@ const SearchSelect = forwardRef(({ addWrapper = true, form, fieldName, fieldsVal
182
182
  if (nOptions.length > 0 && !isEqual(nOptions, list)) {
183
183
  console.log(`[${props?.label}]handleOptions onChange(undefined)`)
184
184
  // 忘记这行有啥用了,但他会造成debounceFetchOptions之后下拉框置空,暂时弃用
185
- // typeof onChange === 'function' && onChange(undefined)
185
+ typeof onChange === 'function' && onChange(undefined)
186
186
  }
187
187
  }
188
188
  return list
@@ -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, hideNoData, initializeFormRender, recordFieldsChange, getTableWithIds, removeLastFieldsValues, mode, isAllowCopy = false, isAllowAdd = true, getDependencyMapItem, ...props }) => {
47
+ const Table = ({ children, onTableAddRow, disabled, readonly, onTableRemoveRow, form, fieldName, hideNoData, hideEditMode,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([])
@@ -148,8 +148,8 @@ const Table = ({ children, onTableAddRow, disabled, readonly, onTableRemoveRow,
148
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 && !hideNoData && !init) handleAdd();
152
- return <div className={"fw-full " + (hideNoData && fields.length == 0 ? " fhidden" : "")}>
151
+ if (fields.length === 0 && !hideNoData && !hideEditMode && !init) handleAdd();
152
+ return <div className={"fw-full " + ((hideNoData && fields.length == 0 ) || (hideEditMode && !readonly) ? " 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}/>