lu-lowcode-package-form 0.11.65 → 0.11.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/dist/index.cjs.js +194 -194
- package/dist/index.es.js +1959 -1954
- package/package.json +1 -1
- package/src/App.jsx +18 -1
- package/src/components/field/table/drag-head.jsx +6 -25
- package/src/components/field/table/index.jsx +3 -2
package/package.json
CHANGED
package/src/App.jsx
CHANGED
@@ -990,7 +990,24 @@ function App() {
|
|
990
990
|
|
991
991
|
</Field.Table>
|
992
992
|
</Layout.FormRow>
|
993
|
-
|
993
|
+
<Field.Input label="测试计算汇总" __id="huizong1"
|
994
|
+
withIds={["table_fill.fill_tcinput3"]}
|
995
|
+
withFill={{
|
996
|
+
"value": [
|
997
|
+
{
|
998
|
+
"insert": {
|
999
|
+
"span": true
|
1000
|
+
},
|
1001
|
+
"attributes": {
|
1002
|
+
"id": "table_fill.fill_tcinput3",
|
1003
|
+
"color": "blue",
|
1004
|
+
"tagKey": "fieldsValue",
|
1005
|
+
"content": "当前表单.测试被填充计算"
|
1006
|
+
}
|
1007
|
+
},
|
1008
|
+
]
|
1009
|
+
}}
|
1010
|
+
/>
|
994
1011
|
</FormContainerWrapper>
|
995
1012
|
<div className="fgroup">11111
|
996
1013
|
<div className="fbg-red-500 group-hover:fbg-blue-500">
|
@@ -33,7 +33,7 @@ const DragHead = ({ childrenDesc, initialWidth, changeWidth, showAction, showLab
|
|
33
33
|
left: var(--drag-position);
|
34
34
|
width: 2px;
|
35
35
|
height: 100vh;
|
36
|
-
background-color: #
|
36
|
+
background-color: #1290ff;
|
37
37
|
pointer-events: none;
|
38
38
|
z-index: 9999;
|
39
39
|
display: none;
|
@@ -54,8 +54,8 @@ const DragHead = ({ childrenDesc, initialWidth, changeWidth, showAction, showLab
|
|
54
54
|
return (e, data) => {
|
55
55
|
e.stopPropagation();
|
56
56
|
document.getElementById('column-drag-indicator').style.display = 'block';
|
57
|
-
setIsDragging(true);
|
58
|
-
setResizingColumn(index);
|
57
|
+
// setIsDragging(true);
|
58
|
+
// setResizingColumn(index);
|
59
59
|
document.documentElement.style.setProperty('--drag-position', `${e.clientX}px`);
|
60
60
|
startPositionRef.current = e.clientX;
|
61
61
|
}
|
@@ -89,37 +89,18 @@ const DragHead = ({ childrenDesc, initialWidth, changeWidth, showAction, showLab
|
|
89
89
|
typeof changeWidth === 'function' && changeWidth(newHeadWidths);
|
90
90
|
|
91
91
|
// 重置拖动状态
|
92
|
-
setIsDragging(false);
|
93
|
-
setResizingColumn(null);
|
92
|
+
// setIsDragging(false);
|
93
|
+
// setResizingColumn(null);
|
94
94
|
}
|
95
95
|
}
|
96
96
|
|
97
|
-
// 虚拟指示线组件
|
98
|
-
const DragIndicator = () => {
|
99
|
-
if (!isDragging) return null
|
100
97
|
|
101
|
-
const style = {
|
102
|
-
position: 'fixed',
|
103
|
-
top: 0,
|
104
|
-
left: `${dragPosition}px`,
|
105
|
-
width: '2px',
|
106
|
-
height: '100vh',
|
107
|
-
backgroundColor: '#1890ff',
|
108
|
-
pointerEvents: 'none',
|
109
|
-
zIndex: 9999
|
110
|
-
}
|
111
|
-
|
112
|
-
return createPortal(
|
113
|
-
<div style={style}></div>,
|
114
|
-
document.body
|
115
|
-
)
|
116
|
-
}
|
117
98
|
|
118
99
|
return <><div className="fflex flex-nowrap fmin-w-full fabsolute">
|
119
100
|
{childrenDesc.map((child, childIndex) => {
|
120
101
|
const width = getColumnWidth(childIndex)
|
121
102
|
|
122
|
-
return (
|
103
|
+
return child.hidden ? null : (
|
123
104
|
<Resizable
|
124
105
|
key={childIndex}
|
125
106
|
width={width}
|
@@ -88,8 +88,9 @@ const Table = ({ children, onTableAddRow, disabled, readonly, onTableRemoveRow,
|
|
88
88
|
},[headWidths])
|
89
89
|
|
90
90
|
useEffect(()=>{
|
91
|
-
|
92
|
-
|
91
|
+
let childrenDesc = React.Children.map(children, (child) => {
|
92
|
+
const hidden = (child?.props?.calcHidden || !getDependencyMapShow(child?.props?.componentId || child?.props?.__id)) && mode != "desgin";
|
93
|
+
return {id:child.props.componentId || child.props.__id,label:child.props.label, hidden }
|
93
94
|
})
|
94
95
|
console.log("Emit Table childrenDesc", childrenDesc)
|
95
96
|
eventEmitter.emit("tableChildrenDesc", childrenDesc)
|