Update from Vibe Studio

This commit is contained in:
Vibe Studio
2026-01-16 06:05:34 +00:00
parent f33e9727f2
commit 64e97daf22

View File

@@ -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',