lu-lowcode-package-form 0.11.65 → 0.11.66
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 +243 -243
- package/dist/index.es.js +14631 -14624
- package/package.json +1 -1
- package/src/components/field/table/drag-head.jsx +5 -24
- package/src/components/field/table/index.jsx +4 -2
package/package.json
CHANGED
@@ -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,31 +89,12 @@ 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) => {
|
@@ -88,9 +88,11 @@ 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
|
})
|
95
|
+
childrenDesc = childrenDesc.filter(item=>!item.hidden)
|
94
96
|
console.log("Emit Table childrenDesc", childrenDesc)
|
95
97
|
eventEmitter.emit("tableChildrenDesc", childrenDesc)
|
96
98
|
setChildrenDesc(childrenDesc)
|