@yorha2b-lab/autodev 7.7.7 → 7.7.8

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": "@yorha2b-lab/autodev",
3
- "version": "7.7.7",
3
+ "version": "7.7.8",
4
4
  "description": "基于 AI 视觉与语义协议的前端 (React+Antd) 代码构筑与旧系统重构引擎",
5
5
  "bin": {
6
6
  "bunker": "bin/bunker.js"
@@ -20,7 +20,7 @@ const SortableItem = SortableElement((props) => <tr {...props} />)
20
20
  * @param {Object} props.record - 初始物资包(当前行数据)
21
21
  * @param {Function} [props.onValuesChange] - 联动传感:监听行内任何零部件的值变动
22
22
  */
23
- export const EditableRow = ({ index, record, ...props }) => {
23
+ export const EditableRow = ({ index, record, draggable, ...props }) => {
24
24
 
25
25
  const [form] = Form.useForm()
26
26
 
@@ -36,7 +36,7 @@ export const EditableRow = ({ index, record, ...props }) => {
36
36
  return (
37
37
  <Form form={form} component={false} onValuesChange={(changedValue, allValue) => props?.onValuesChange?.({ changedValue, allValue, form })}>
38
38
  <EditableContext.Provider value={form}>
39
- <SortableItem index={index} {...props} />
39
+ {draggable ? <SortableItem index={index} {...props} /> : <tr {...props} />}
40
40
  </EditableContext.Provider>
41
41
  </Form>
42
42
  )
@@ -222,7 +222,7 @@ export const MyTable = ({ size, query, total, search, options, autoScroll, onCha
222
222
  rowSelection={rowSelection}
223
223
  pagination={paginationConfig}
224
224
  // 💡 信号注入:将行监听协议绑定至底层 tr
225
- onRow={(record, index) => ({ record, index, ...(typeof lineFormChange === 'function' ? { onValuesChange: lineFormChange } : {}) })}
225
+ onRow={(record, index) => ({ record, index, draggable, ...(typeof lineFormChange === 'function' ? { onValuesChange: lineFormChange } : {}) })}
226
226
  rowClassName={(record, index) => {
227
227
  const externalClass = typeof rowClassName === 'function' ? rowClassName(record, index) : rowClassName
228
228
  const classes = [externalClass]