feat: 添加闪屏
This commit is contained in:
@@ -358,7 +358,7 @@ const App = () => {
|
||||
render: (text) => {
|
||||
return offsetHex ? `0x${text.toString(16).toUpperCase()}` : text;
|
||||
},
|
||||
onHeaderCell: (column) => ({
|
||||
onHeaderCell: () => ({
|
||||
onClick: () => {
|
||||
setOffsetHex(!offsetHex);
|
||||
}
|
||||
|
||||
@@ -157,7 +157,7 @@ const App = () => {
|
||||
render: (text) => {
|
||||
return offsetHex ? `0x${text.toString(16).toUpperCase()}` : text;
|
||||
},
|
||||
onHeaderCell: (column) => ({
|
||||
onHeaderCell: () => ({
|
||||
onClick: () => {
|
||||
setOffsetHex(!offsetHex);
|
||||
},
|
||||
|
||||
@@ -115,7 +115,7 @@ const App = () => {
|
||||
render: (text) => {
|
||||
return offsetHex ? `0x${text.toString(16).toUpperCase()}` : text;
|
||||
},
|
||||
onHeaderCell: (column) => ({
|
||||
onHeaderCell: () => ({
|
||||
onClick: () => {
|
||||
setOffsetHex(!offsetHex);
|
||||
},
|
||||
|
||||
@@ -16,7 +16,7 @@ export default function SiderTree({
|
||||
// 受控 选择的节点
|
||||
const [selectedKey, setSelectedKey] = useState<string>(defaultSelectedKey);
|
||||
|
||||
const onSelect: TreeProps["onSelect"] = (selectedKeys, info) => {
|
||||
const onSelect: TreeProps["onSelect"] = (_, info) => {
|
||||
let key = info.node.key as string;
|
||||
console.log("onSelect", key);
|
||||
setSelectedKey(key);
|
||||
|
||||
11
src/main.tsx
11
src/main.tsx
@@ -1,6 +1,17 @@
|
||||
import React from "react";
|
||||
import ReactDOM from "react-dom/client";
|
||||
import App from "./App";
|
||||
import { invoke } from "@tauri-apps/api/core";
|
||||
import { delay} from "lodash-es"
|
||||
|
||||
async function setup() {
|
||||
invoke('set_complete')
|
||||
}
|
||||
|
||||
window.addEventListener("DOMContentLoaded", () => {
|
||||
setup();
|
||||
})
|
||||
|
||||
|
||||
ReactDOM.createRoot(document.getElementById("root") as HTMLElement).render(
|
||||
<React.StrictMode>
|
||||
|
||||
Reference in New Issue
Block a user