feat: 添加 ts 支持

for/master
caorushizi 4 years ago
parent dec3e404bf
commit b775ae7810

@ -49,7 +49,7 @@ interface State {
}
class App extends React.Component<Props, State> {
view?: Electron.BrowserView;
view: Electron.BrowserView | null;
resizeObserver?: ResizeObserver;
@ -63,6 +63,8 @@ class App extends React.Component<Props, State> {
title: "",
isFav: false,
};
this.view = null;
}
async componentDidMount() {
@ -76,7 +78,7 @@ class App extends React.Component<Props, State> {
this.view?.setBounds({ x: 0, y: 0, height: 0, width: 0 });
this.view?.webContents.off("dom-ready", this.handleViewDOMReady);
ipcRenderer.removeListener("viewReady", this.handleViewReady);
this.view = undefined;
this.view = null;
this.resizeObserver?.disconnect();
}

@ -1,4 +1,4 @@
import React from "react";
import React, { ReactNode } from "react";
import WindowToolBar from "renderer/common/components/WindowToolBar";
interface Props {}
@ -10,7 +10,7 @@ class SettingWindow extends React.Component<Props, State> {
super(props);
}
render() {
render(): ReactNode {
return (
<div className="confirm-window">
<WindowToolBar onClose={() => {}}></WindowToolBar>

@ -18,7 +18,6 @@ import {
import { ReactNode } from "react";
import { EllipsisOutlined } from "@ant-design/icons";
import { ipcGetStore } from "./utils";
import FeedImage from "./assets/feed.png";
const {
remote,

Loading…
Cancel
Save