mirror of
https://github.com/wavetermdev/waveterm.git
synced 2025-01-06 19:18:22 +01:00
reload terminal when styel block is unmounted and mounted
This commit is contained in:
parent
6b5d2833eb
commit
567e5b662c
@ -35,10 +35,20 @@ class TermStyleBlock extends React.Component<{
|
|||||||
themeName: string;
|
themeName: string;
|
||||||
selector: string;
|
selector: string;
|
||||||
}> {
|
}> {
|
||||||
componentDidUpdate(): void {
|
componentDidMount() {
|
||||||
GlobalModel.bumpTermRenderVersion();
|
GlobalModel.bumpTermRenderVersion();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
componentWillUnmount() {
|
||||||
|
GlobalModel.bumpTermRenderVersion();
|
||||||
|
}
|
||||||
|
|
||||||
|
componentDidUpdate(prevProps) {
|
||||||
|
if (prevProps.themeName !== this.props.themeName || prevProps.selector !== this.props.selector) {
|
||||||
|
GlobalModel.bumpTermRenderVersion();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
isValidCSSColor(color) {
|
isValidCSSColor(color) {
|
||||||
const element = document.createElement("div");
|
const element = document.createElement("div");
|
||||||
element.style.color = color;
|
element.style.color = color;
|
||||||
|
Loading…
Reference in New Issue
Block a user