|
@@ -159,12 +159,26 @@ export function ApiTester() {
|
|
|
<div className="space-y-2">
|
|
<div className="space-y-2">
|
|
|
<ApiTesterFileUpload onBase64Generated={(base64) => handleInputChange(base64)} />
|
|
<ApiTesterFileUpload onBase64Generated={(base64) => handleInputChange(base64)} />
|
|
|
<Divider plain>或</Divider>
|
|
<Divider plain>或</Divider>
|
|
|
- <Input
|
|
|
|
|
- placeholder="输入Excel文件URL"
|
|
|
|
|
- value={fileUrl}
|
|
|
|
|
- onChange={(e) => handleInputChange(e.target.value, true)}
|
|
|
|
|
- prefix={<FileExcelOutlined />}
|
|
|
|
|
- />
|
|
|
|
|
|
|
+ <div className="flex gap-2">
|
|
|
|
|
+ <Input
|
|
|
|
|
+ placeholder="输入Excel文件URL"
|
|
|
|
|
+ value={fileUrl}
|
|
|
|
|
+ onChange={(e) => handleInputChange(e.target.value, true)}
|
|
|
|
|
+ prefix={<FileExcelOutlined />}
|
|
|
|
|
+ allowClear
|
|
|
|
|
+ className="flex-1"
|
|
|
|
|
+ />
|
|
|
|
|
+ <Button
|
|
|
|
|
+ onClick={() => {
|
|
|
|
|
+ const exampleUrl = 'https://ai-oss.d8d.fun/excel2json/240529040%E6%9D%90%E6%96%99%E5%8D%95%EF%BC%88%E5%8E%9F%E5%A7%8B%E5%AF%BC%E5%87%BA%EF%BC%89.xls';
|
|
|
|
|
+ setFileUrl(exampleUrl);
|
|
|
|
|
+ handleInputChange(exampleUrl, true);
|
|
|
|
|
+ }}
|
|
|
|
|
+ icon={<FileOutlined />}
|
|
|
|
|
+ >
|
|
|
|
|
+ 填入示例
|
|
|
|
|
+ </Button>
|
|
|
|
|
+ </div>
|
|
|
</div>
|
|
</div>
|
|
|
</Form.Item>
|
|
</Form.Item>
|
|
|
</div>
|
|
</div>
|