mirror of
https://github.com/MrXujiang/h5-Dooring.git
synced 2026-01-19 03:58:12 +00:00
🐛 修复localstorage无法自动保存的bug
This commit is contained in:
parent
c9616fc6a5
commit
4655f0cbac
@ -1,4 +1,4 @@
|
|||||||
import React, { useState, useEffect, useMemo, useContext, useRef } from 'react';
|
import React, { useState, useEffect, useMemo, useCallback, useContext, useRef } from 'react';
|
||||||
import { Result, Tabs } from 'antd';
|
import { Result, Tabs } from 'antd';
|
||||||
import {
|
import {
|
||||||
PieChartOutlined,
|
PieChartOutlined,
|
||||||
@ -152,7 +152,7 @@ const Container = (props: {
|
|||||||
}
|
}
|
||||||
}, [context.theme, curPoint, dispatch]);
|
}, [context.theme, curPoint, dispatch]);
|
||||||
|
|
||||||
const clearData = useMemo(() => {
|
const clearData = useCallback(() => {
|
||||||
if (context.theme === 'h5') {
|
if (context.theme === 'h5') {
|
||||||
dispatch({ type: 'editorModal/clearAll' });
|
dispatch({ type: 'editorModal/clearAll' });
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user