Commit aa39a48c by fanyj

修改打标签bug

parent cad4cb27
......@@ -351,17 +351,18 @@ const AssetAction = React.forwardRef(function (props, ref) {
width: 360,
className: 'table-tag-cell',
render: (_, record) => {
const id = record?.id?record.id:record._id
return(
<div onClick={(e) => e.stopPropagation()}>
<TagCell
id={record.id}
id={id}
did={record.dirId}
type={record?.columnType}
tags={resoureTagMap?.[record.id]}
tags={resoureTagMap?.[id]}
onChange={(val) => {
setResourceTagMap((prevResourceTagMap) => {
return produce(prevResourceTagMap||{}, (draft) => {
draft[record.id] = val
draft[id] = val
})
})
}}
......@@ -372,7 +373,10 @@ const AssetAction = React.forwardRef(function (props, ref) {
}
const getResourceTag = () => {
const ids = (tableData??[]).map(item => item.id)
console.log(tableData)
const ids = (tableData??[]).map(item =>{
return item.id?item.id:item._id
})
if (ids.length > 0) {
dispatch({
type: 'tag.getResourceTagIn',
......
......@@ -60,8 +60,6 @@ const VersionCompareTable = (props) => {
const newTableData = [];
let columnValue = (direction==='left') ? data?.leftValue?.columnValue : data?.rightValue?.columnValue;
console.log(columnValue)
for (const item of columnValue??[]) {
let newItem = {};
for (const [index, _item] of item.entries()) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment