🦀️ fix: 修复bug
This commit is contained in:
parent
25769fa66d
commit
933937036d
|
@ -82,10 +82,9 @@ const Combining = forwardRef((props, ref) => {
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
if (propsData && propsData !== "") {
|
if (propsData && propsData !== "") {
|
||||||
initProps()
|
initProps()
|
||||||
|
} else {
|
||||||
|
sessionStorage.setItem("knockGoldData", JSON.stringify([]))
|
||||||
}
|
}
|
||||||
|
|
||||||
console.log(sessionStorage.getItem("KeyPcType"))
|
|
||||||
sessionStorage.setItem("knockGoldData", JSON.stringify([]))
|
|
||||||
}, [])
|
}, [])
|
||||||
|
|
||||||
useImperativeHandle(ref, () => ({
|
useImperativeHandle(ref, () => ({
|
||||||
|
@ -144,7 +143,6 @@ const Combining = forwardRef((props, ref) => {
|
||||||
/* 商品提交 */
|
/* 商品提交 */
|
||||||
async function productSubmit() {
|
async function productSubmit() {
|
||||||
const validator = await knockGoldRef.current.submit()
|
const validator = await knockGoldRef.current.submit()
|
||||||
|
|
||||||
if (validator) {
|
if (validator) {
|
||||||
const list = JSON.parse(sessionStorage.getItem("knockGoldData"))
|
const list = JSON.parse(sessionStorage.getItem("knockGoldData"))
|
||||||
const tableData = list.map((item) => {
|
const tableData = list.map((item) => {
|
||||||
|
@ -181,6 +179,7 @@ const Combining = forwardRef((props, ref) => {
|
||||||
obj.checked = true
|
obj.checked = true
|
||||||
return obj
|
return obj
|
||||||
})
|
})
|
||||||
|
sessionStorage.setItem("knockGoldData", JSON.stringify(lj_arr.filter((item) => item.origin)))
|
||||||
|
|
||||||
let arr = map(lj_arr, (res) => {
|
let arr = map(lj_arr, (res) => {
|
||||||
let obj = {}
|
let obj = {}
|
||||||
|
|
Loading…
Reference in New Issue