mirror of
https://github.com/chaitin/SafeLine.git
synced 2026-02-13 12:13:28 +08:00
fix: search panel disappear
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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);
|
||||
};
|
||||
|
||||
|
||||
@@ -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 = () => {
|
||||
|
||||
Reference in New Issue
Block a user