Update from Vibe Studio
This commit is contained in:
@@ -1,6 +1,5 @@
|
|||||||
import { useState } from 'react'
|
import { useState } from 'react'
|
||||||
import { Button, Card, Form, Input, message, Space, Switch } from 'antd'
|
import { Button, Card, Form, Input, message, Space, Switch } from 'antd'
|
||||||
import { PageHeader } from '@ant-design/pro-components'
|
|
||||||
import { checkAndCorrectSpelling } from '@/api/spellCheck'
|
import { checkAndCorrectSpelling } from '@/api/spellCheck'
|
||||||
|
|
||||||
interface CorrectionResult {
|
interface CorrectionResult {
|
||||||
@@ -224,13 +223,15 @@ const SpellCheck = () => {
|
|||||||
|
|
||||||
return (
|
return (
|
||||||
<div style={{ maxWidth: '900px', margin: '0 auto', padding: '20px' }}>
|
<div style={{ maxWidth: '900px', margin: '0 auto', padding: '20px' }}>
|
||||||
<div style={{ textAlign: 'center', marginBottom: '30px' }}>
|
{/* 页面标题区 */}
|
||||||
<h1 style={{ color: '#1890ff', fontSize: '28px', fontWeight: 'bold', margin: 0 }}>
|
<div style={{ textAlign: 'center', marginBottom: '40px' }}>
|
||||||
|
<h1 style={{ color: '#1890ff', fontSize: '32px', fontWeight: 'bold', margin: 0 }}>
|
||||||
错别字检测与纠正系统
|
错别字检测与纠正系统
|
||||||
</h1>
|
</h1>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<Space direction="vertical" style={{ width: '100%' }} size="large">
|
<Space direction="vertical" style={{ width: '100%' }} size="large">
|
||||||
|
{/* 参数输入区 */}
|
||||||
<Card title="参数输入区">
|
<Card title="参数输入区">
|
||||||
<Form form={form} layout="vertical">
|
<Form form={form} layout="vertical">
|
||||||
<Form.Item
|
<Form.Item
|
||||||
@@ -258,21 +259,20 @@ const SpellCheck = () => {
|
|||||||
name="custom_vocab"
|
name="custom_vocab"
|
||||||
label="自定义词汇库(可选)"
|
label="自定义词汇库(可选)"
|
||||||
rules={[{ validator: validateCustomVocab }]}
|
rules={[{ validator: validateCustomVocab }]}
|
||||||
extra={
|
|
||||||
<div style={{ fontSize: '12px', color: '#666', marginTop: '4px' }}>
|
|
||||||
格式要求:合法的JSON数组,元素为字符串
|
|
||||||
</div>
|
|
||||||
}
|
|
||||||
>
|
>
|
||||||
<Input.TextArea
|
<Input.TextArea
|
||||||
rows={4}
|
rows={4}
|
||||||
placeholder='请输入JSON格式词汇库,如:["正确词1", "正确词2"]'
|
placeholder='请输入JSON格式词汇库,如:["正确词1", "正确词2"]'
|
||||||
style={{ fontSize: '14px' }}
|
style={{ fontSize: '14px' }}
|
||||||
/>
|
/>
|
||||||
|
<div className="form-helper-text" style={{ fontSize: '12px', color: '#666', marginTop: '4px' }}>
|
||||||
|
格式要求:合法的JSON数组,元素为字符串
|
||||||
|
</div>
|
||||||
</Form.Item>
|
</Form.Item>
|
||||||
</Form>
|
</Form>
|
||||||
</Card>
|
</Card>
|
||||||
|
|
||||||
|
{/* 操作按钮区 */}
|
||||||
<div className="button-group" style={{ display: 'flex', justifyContent: 'center', gap: '16px' }}>
|
<div className="button-group" style={{ display: 'flex', justifyContent: 'center', gap: '16px' }}>
|
||||||
<Button
|
<Button
|
||||||
type="primary"
|
type="primary"
|
||||||
@@ -293,7 +293,13 @@ const SpellCheck = () => {
|
|||||||
</Button>
|
</Button>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<Card title="检测结果">
|
{/* 内容展示区 */}
|
||||||
|
<Card
|
||||||
|
title="检测结果"
|
||||||
|
style={{
|
||||||
|
display: correctionResults.length > 0 || isGenerating ? 'block' : 'none'
|
||||||
|
}}
|
||||||
|
>
|
||||||
<div
|
<div
|
||||||
style={{
|
style={{
|
||||||
minHeight: '150px',
|
minHeight: '150px',
|
||||||
|
|||||||
Reference in New Issue
Block a user