mirror of
https://github.com/MrXujiang/h5-Dooring.git
synced 2026-01-09 21:48:11 +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 {
|
||||
PieChartOutlined,
|
||||
@ -152,7 +152,7 @@ const Container = (props: {
|
||||
}
|
||||
}, [context.theme, curPoint, dispatch]);
|
||||
|
||||
const clearData = useMemo(() => {
|
||||
const clearData = useCallback(() => {
|
||||
if (context.theme === 'h5') {
|
||||
dispatch({ type: 'editorModal/clearAll' });
|
||||
} else {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user