lu-lowcode-package-form 0.10.64 → 0.10.65

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.64",
3
+ "version": "0.10.65",
4
4
  "dependencies": {
5
5
  "@ant-design/icons": "^4.8.1",
6
6
  "@dnd-kit/core": "^6.1.0",
package/src/App.jsx CHANGED
@@ -330,7 +330,7 @@ function App() {
330
330
  label="测试请求" __id="ceshirequest" />
331
331
 
332
332
  <Layout.FormRow layout={'1'}>
333
- <Field.Table label="子表格" __id="table" isAllowAdd={false} isAllowCopy={true} >
333
+ <Field.Table label="子表格" __id="table" isAllowAdd={true} isAllowCopy={false} >
334
334
 
335
335
  <Field.WithSingleSelect
336
336
  isRequired={true} ref={testRef}
@@ -2,16 +2,19 @@ import React, { useEffect, useRef, useState } from "react";
2
2
  import { Button, Form, Input,Popconfirm } from "antd";
3
3
  import { CopyOutlined, DeleteOutlined } from "@ant-design/icons";
4
4
  import { BaseWrapper } from "../base.jsx"
5
- import { type } from "@testing-library/user-event/dist/type/index.js";
6
5
  import { nanoid } from "nanoid";
7
6
  import { eventEmitter } from '../../../utils/events'
8
7
 
9
8
  const TableAction = ({ label, subTableIndex, children, subTableHead = false, ...props }) => {
10
9
  //fsticky fright-0
11
- return <div className="fw-12 ">
10
+ return <div className="fsticky fright-0 fbg-white" style={{
11
+ boxShadow: '-6px 0 6px -6px rgba(50,50,50,0.15)',
12
+ flex: '0 0 50px',
13
+ width: '50px'
14
+ }}>
12
15
  <div className="frelative fw-full fh-full fflex fflex-col foverflow-hidden">
13
16
  {label && subTableHead && <div className='fh-12 ffont-semibold fbg-[#fafafa] ftext-sm fflex fflex-nowrap ftext-nowrap fjustify-between fitems-center fpx-2 fborder-b'>{label}</div>}
14
- <div className="fw-full fflex-1 fflex fitems-center fjustify-center fp-2 fbox-border fgap-2 ">
17
+ <div className="fw-full fflex-1 fflex fitems-center fjustify-center fp-2 fbox-border fgap-2">
15
18
  {children}
16
19
  </div>
17
20
  </div>
@@ -25,7 +28,7 @@ const TableCol = ({ children, width, hidden, ...props }) => {
25
28
  setSWidth(width);
26
29
  }, [width]);
27
30
  if (hidden) return children;
28
- return <div className="fflex-1 fpx-1" style={{ minWidth: `${sWidth}px` }} {...props}>
31
+ return <div className="fflex-1 fpx-1 fborder-b" style={{ minWidth: `${sWidth}px` }} {...props}>
29
32
  {children}
30
33
  </div>
31
34
  }
@@ -65,7 +68,7 @@ const Table = ({ children, onTableAddRow, disabled, readonly, onTableRemoveRow,
65
68
  {(fields, { add, remove }) => {
66
69
  if (fields.length === 0 && !init) handleAdd();
67
70
  return <div className="fw-full ">
68
- <div className="fw-full frelative fmin-h-20 foverflow-x-auto">
71
+ <div className="fw-full frelative fmin-h-20 foverflow-x-auto" style={{ position: 'relative' }}>
69
72
  {fields.length === 0 && <div key={`tableHead`} className="fborder-b fflex flex-nowrap fmin-w-full ">
70
73
  {React.Children.map(children, (child, childIndex) => {
71
74
  const hidden = child?.props?.calcHidden;
@@ -76,13 +79,13 @@ const Table = ({ children, onTableAddRow, disabled, readonly, onTableRemoveRow,
76
79
  subTableHead: true,
77
80
  subTableContent: false,
78
81
  })}
79
- </TableCol>
82
+ </TableCol>
80
83
  })}
81
84
  {disabled != true && readonly != true && <TableAction subTableHead={true} key={`row_${0}_action`} subTable={true} subTableIndex={0} label={"操作"}>
82
85
  </TableAction>}
83
- </div>}
86
+ </div>}
84
87
  {fields.map((field, index) => (
85
- <div key={`${tableId}.${field.key}`} className="fborder-b fflex flex-nowrap fmin-w-full ">
88
+ <div key={`${tableId}.${field.key}`} className=" fflex flex-nowrap fmin-w-full ">
86
89
 
87
90
  {React.Children.map(children, (child, childIndex) => {
88
91
  let { props } = child;