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