|
@ -21,13 +21,16 @@ function remarksModal (props) { |
|
|
//初始化 |
|
|
//初始化 |
|
|
useEffect(() => { |
|
|
useEffect(() => { |
|
|
let myScrollList=ScrollList |
|
|
let myScrollList=ScrollList |
|
|
for (let index = 0; index < cameraRemarks.length; index++) { |
|
|
let sortCameraRemarks =cameraRemarks//排序 |
|
|
myScrollList[index].value=cameraRemarks[index].remark |
|
|
sortCameraRemarks.sort((a,b)=>{return a.id-b.id}) |
|
|
|
|
|
|
|
|
|
|
|
for (let index = 0; index < sortCameraRemarks.length; index++) { |
|
|
|
|
|
myScrollList[index].value=sortCameraRemarks[index].remark |
|
|
} |
|
|
} |
|
|
setScrollList(myScrollList) |
|
|
setScrollList(myScrollList) |
|
|
let mycameraRemarks=[] |
|
|
let mycameraRemarks=[] |
|
|
for (let index = 0; index < cameraRemarks.length; index++) { |
|
|
for (let index = 0; index < sortCameraRemarks.length; index++) { |
|
|
mycameraRemarks.push(cameraRemarks[index].remark) |
|
|
mycameraRemarks.push(sortCameraRemarks[index].remark) |
|
|
} |
|
|
} |
|
|
setShowScrollList(mycameraRemarks) |
|
|
setShowScrollList(mycameraRemarks) |
|
|
}, []); |
|
|
}, []); |
|
|