feat: models list
This commit is contained in:
@@ -1,6 +1,11 @@
|
||||
import avatar from '@/assets/images/avatar.png';
|
||||
import logo from '@/assets/images/logo.png';
|
||||
import { CopyOutlined, DislikeOutlined, EditOutlined, SyncOutlined } from '@ant-design/icons';
|
||||
import {
|
||||
CopyOutlined,
|
||||
DislikeOutlined,
|
||||
EditOutlined,
|
||||
SyncOutlined
|
||||
} from '@ant-design/icons';
|
||||
import { Button, Space, Tooltip } from 'antd';
|
||||
import chatStyle from './chat-style.less';
|
||||
import ChatEmpty from './chatEmpty';
|
||||
|
||||
@@ -1,26 +1,43 @@
|
||||
import { Input,Button} from 'antd';
|
||||
import { useState } from 'react';
|
||||
import { SendOutlined } from '@ant-design/icons';
|
||||
import './message-input.less'
|
||||
import { Button, Input } from 'antd';
|
||||
import { useState } from 'react';
|
||||
import './message-input.less';
|
||||
|
||||
const MessageInput: React.FC = () => {
|
||||
const { TextArea } = Input;
|
||||
const [message, setMessage] = useState('')
|
||||
const handleInputChange = (value:string) => {
|
||||
setMessage(value)
|
||||
}
|
||||
const [message, setMessage] = useState('');
|
||||
const handleInputChange = (value: string) => {
|
||||
setMessage(value);
|
||||
};
|
||||
const handleSendMessage = () => {
|
||||
console.log('send message:', message)
|
||||
}
|
||||
console.log('send message:', message);
|
||||
};
|
||||
const SendButton: React.FC = () => {
|
||||
return <Button type="primary" shape="circle" size="middle" icon={<SendOutlined />} onClick={() => handleSendMessage()}></Button>
|
||||
}
|
||||
return (
|
||||
<Button
|
||||
type="primary"
|
||||
shape="circle"
|
||||
size="middle"
|
||||
icon={<SendOutlined />}
|
||||
onClick={() => handleSendMessage()}
|
||||
></Button>
|
||||
);
|
||||
};
|
||||
return (
|
||||
<div className="messageInput">
|
||||
<TextArea placeholder='send your message' autoSize={{minRows: 1,maxRows: 6}} onChange={e => handleInputChange(e.target.value)} value={message} size="large" variant='borderless'></TextArea>
|
||||
<span className="send-btn"><SendButton/></span>
|
||||
<TextArea
|
||||
placeholder="send your message"
|
||||
autoSize={{ minRows: 1, maxRows: 6 }}
|
||||
onChange={(e) => handleInputChange(e.target.value)}
|
||||
value={message}
|
||||
size="large"
|
||||
variant="borderless"
|
||||
></TextArea>
|
||||
<span className="send-btn">
|
||||
<SendButton />
|
||||
</span>
|
||||
</div>
|
||||
);
|
||||
};
|
||||
|
||||
export default MessageInput;
|
||||
export default MessageInput;
|
||||
|
||||
Reference in New Issue
Block a user