fix: search panel disappear

This commit is contained in:
delong.wang
2023-08-04 16:56:45 +08:00
parent 366a64530e
commit bd6ee24eb1
32 changed files with 602 additions and 1191 deletions

View File

@@ -186,8 +186,8 @@ const FunctionTable = () => {
}}
style={{ marginTop: "48px" }}
>
<TableHead>
<TableRow>
<TableHead sx={{ background: "transparent" }}>
<TableRow sx={{ border: "0" }}>
<TableCell sx={{ width: "33%" }} />
<TableCell align="center" sx={{ width: "33%", fontSize: "16px" }}>
<Box

View File

@@ -1,6 +1,6 @@
import React from "react";
import { useState } from "react";
import hljs from "highlight.js";
// import hljs from "highlight.js";
import {
Box,
@@ -48,10 +48,11 @@ function SampleList({ value, onSetIdChange }: SampleListProps) {
}
const text = document.createElement("textarea");
text.innerHTML = res.data.content;
const highlighted = hljs.highlight(text.value, {
language: "http",
});
setDetail(highlighted.value);
// const highlighted = hljs.highlight(text.value, {
// language: "http",
// });
// setDetail(highlighted.value);
setDetail(text.value)
setOpen(true);
};

View File

@@ -1,5 +1,5 @@
import React, { useEffect, useState } from "react";
import hljs from "highlight.js";
// import hljs from "highlight.js";
import {
Box,
Button,
@@ -181,8 +181,9 @@ function SampleMarkable({
});
useEffect(() => {
const highlighted = hljs.highlight(sampleDetail, { language: "http" });
setCode(highlighted.value);
// const highlighted = hljs.highlight(sampleDetail, { language: "http" });
// setCode(highlighted.value);
setCode(sampleDetail)
}, [sampleDetail]);
const handle = () => {