fix(ai-web): 升级部份依赖版本

This commit is contained in:
v-zhangjc9
2025-06-18 14:53:45 +08:00
parent 0914b458d3
commit 48e42ee99a
3 changed files with 488 additions and 1778 deletions

View File

@@ -1,128 +1,18 @@
import MarkdownRender from '../util/Markdown.tsx'
import {useState} from 'react'
// language=Markdown
const markdownText = `### Hello
world
tony
jenny
\`\`\`javascript
console.log('hello')
\`\`\`
\`\`\`mermaid
graph TD
a-->b;
\`\`\`
\`\`\`mermaid
graph TD
c-->d;
\`\`\`
\`\`\`chartjs
{
type: 'bar',
data: {
labels: ['苹果', '香蕉', '橙子', '葡萄', '菠萝'],
datasets: [{
label: '水果销量',
data: [43, 32, 56, 29, 38],
}]
},
options: {
plugins: {
legend: {
position: 'top',
},
title: {
display: true,
text: '水果店周销量数据'
}
}
}
}
\`\`\`
\`\`\`chartjs
{
type: 'bar',
data: {
labels: ['苹果', '香蕉', '橙子', '葡萄', '菠萝'],
datasets: [{
label: '水果销量',
data: [43, 32, 56, 29, 38],
}]
},
options: {
plugins: {
legend: {
position: 'top',
},
title: {
display: true,
text: '水果店周销量数据'
}
}
}
}
\`\`\`
\`\`\`echart
{
grid: { top: 8, right: 8, bottom: 24, left: 36 },
xAxis: {
type: 'category',
data: ['Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat', 'Sun'],
},
yAxis: {
type: 'value',
},
series: [
{
data: [820, 932, 901, 934, 1290, 1330, 1320],
type: 'line',
smooth: true,
},
],
tooltip: {
trigger: 'axis',
},
}
\`\`\`
\`\`\`echart
{
grid: { top: 8, right: 8, bottom: 24, left: 36 },
xAxis: {
type: 'category',
data: ['Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat', 'Sun'],
},
yAxis: {
type: 'value',
},
series: [
{
data: [820, 932, 901, 934, 1290, 1330, 1320],
type: 'line',
smooth: true,
},
],
tooltip: {
trigger: 'axis',
},
}
\`\`\``
import {Tinyflow} from '@tinyflow-ai/react'
import '@tinyflow-ai/react/dist/index.css'
function Test() {
const [value, setValue] = useState<string>(markdownText)
return (
<>
<button onClick={() => setValue('hahaha\n' + markdownText)}>Button</button>
<MarkdownRender content={value}/>
</>
<div className="flowable">
<Tinyflow
className="tinyflow-instance"
style={{height: '95vh'}}
onDataChange={(value) => {
console.log(value)
console.log(JSON.stringify(value))
}}
/>
</div>
)
}