更新内容格式错误报错修复
This commit is contained in:
parent
0d50925d0b
commit
1b62f6a9ff
|
|
@ -7,6 +7,7 @@ import { forwardRef, useImperativeHandle, useState, memo } from "react";
|
||||||
const UpdateModal = forwardRef((props: any, ref: any) => {
|
const UpdateModal = forwardRef((props: any, ref: any) => {
|
||||||
useImperativeHandle(ref, () => ({
|
useImperativeHandle(ref, () => ({
|
||||||
changeModal: (data: any) => {
|
changeModal: (data: any) => {
|
||||||
|
try {
|
||||||
let dataJson = JSON.parse(data)
|
let dataJson = JSON.parse(data)
|
||||||
getContent()
|
getContent()
|
||||||
if (dataJson.type === '0') { // 打开弹窗
|
if (dataJson.type === '0') { // 打开弹窗
|
||||||
|
|
@ -16,6 +17,9 @@ const UpdateModal = forwardRef((props: any, ref: any) => {
|
||||||
} else if (dataJson.type === '2') { // 下载完成
|
} else if (dataJson.type === '2') { // 下载完成
|
||||||
setProgress(100)
|
setProgress(100)
|
||||||
}
|
}
|
||||||
|
} catch (error) {
|
||||||
|
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}))
|
}))
|
||||||
const [isUpdateModal, setIsUpdateModal] = useState(false);
|
const [isUpdateModal, setIsUpdateModal] = useState(false);
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue