perf: 替换licia为es-toolkit
This commit is contained in:
@@ -1,10 +1,10 @@
|
||||
import 'chart.js/auto'
|
||||
import {MermaidDiagram} from '@lightenna/react-mermaid-diagram'
|
||||
import EChartsReact from 'echarts-for-react'
|
||||
import {trim} from 'licia'
|
||||
import {Chart} from 'react-chartjs-2'
|
||||
import Markdown from 'react-markdown'
|
||||
import remarkGfm from 'remark-gfm'
|
||||
import {trim} from 'es-toolkit'
|
||||
|
||||
type MarkdownOptions = {
|
||||
content: string
|
||||
@@ -14,7 +14,7 @@ function MarkdownRender(options: MarkdownOptions) {
|
||||
return (
|
||||
<Markdown
|
||||
remarkPlugins={[
|
||||
remarkGfm
|
||||
remarkGfm,
|
||||
]}
|
||||
children={options.content}
|
||||
components={{
|
||||
@@ -45,7 +45,7 @@ function MarkdownRender(options: MarkdownOptions) {
|
||||
</code>
|
||||
)
|
||||
}
|
||||
}
|
||||
},
|
||||
}}
|
||||
/>
|
||||
)
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
import {Renderer, type RendererProps} from "amis";
|
||||
import {once} from "licia";
|
||||
import React from "react";
|
||||
import Markdown from "../Markdown.tsx";
|
||||
import {Renderer, type RendererProps} from "amis"
|
||||
import React from "react"
|
||||
import Markdown from "../Markdown.tsx"
|
||||
import './MarkdownEnhance.scss'
|
||||
import {once} from 'es-toolkit'
|
||||
|
||||
const MarkdownEnhance: React.FC<RendererProps> = props => {
|
||||
return (
|
||||
|
||||
Reference in New Issue
Block a user