Explorar el Código

去掉加载中提示

valentichu hace 1 año
padre
commit
0261eb22c6
Se han modificado 3 ficheros con 10 adiciones y 13 borrados
  1. 0 0
      lib/index.js
  2. 1 1
      src/App.jsx
  3. 9 12
      src/utils/theme/ThemeWrapper.jsx

La diferencia del archivo ha sido suprimido porque es demasiado grande
+ 0 - 0
lib/index.js


+ 1 - 1
src/App.jsx

@@ -14,7 +14,7 @@ function Home(props) {
         open={open}
         onCancel={() => setOpen(false)}
         options={{
-          group: null,
+          group: null?.filter((item) => item !== "diagram") ?? null,
         }}
         noSettings
         // options={{

+ 9 - 12
src/utils/theme/ThemeWrapper.jsx

@@ -1,25 +1,22 @@
-import { useTheme, useLocalStorageThemeName } from './index.js';
-import { useEffect } from 'react';
+import { useTheme, useLocalStorageThemeName } from "./index.js";
+import { useEffect } from "react";
 
 export default (props) => {
-  const { setThemeName } = props
+  const { setThemeName } = props;
   const [] = useTheme();
   // const [themeName] = useThemeKey()
-  const [themeNameInLC] = useLocalStorageThemeName()
+  const [themeNameInLC] = useLocalStorageThemeName();
 
   // useEffect(() => {
   //   setThemeName(themeName)
   // }, [themeName])
 
   useEffect(() => {
-    setThemeName(themeNameInLC)
-  }, [themeNameInLC])
-  console.log(11,props)
-  if(props.children){
+    setThemeName(themeNameInLC);
+  }, [themeNameInLC]);
+  if (props.children) {
     return props.children;
-  }else{
-    return (
-        <>加载中...</>
-    );
+  } else {
+    return false;
   }
 };

Algunos archivos no se mostraron porque demasiados archivos cambiaron en este cambio