feat: 暂存添加ai chat and prompt generate
This commit is contained in:
@@ -11,6 +11,8 @@ type Props = {
|
||||
style?: React.CSSProperties;
|
||||
language?: string;
|
||||
listen?: boolean;
|
||||
placeholder?: string;
|
||||
onBlur?: () => void;
|
||||
};
|
||||
export const TextArea = (props: Props) => {
|
||||
const [code, setCode] = useState<string>('');
|
||||
@@ -27,12 +29,13 @@ export const TextArea = (props: Props) => {
|
||||
<div className={clsx('min-h-16 max-h-52 overflow-scroll scrollbar p-1 ', props.className)}>
|
||||
<CodeEditor
|
||||
value={code}
|
||||
language='js'
|
||||
language={props.language || 'js'}
|
||||
className='border rounded-sm '
|
||||
readOnly={props.readonly}
|
||||
placeholder='Please enter JS code.'
|
||||
placeholder={props.placeholder || 'Please enter JS code.'}
|
||||
onChange={(evn) => _onChange(evn.target.value)}
|
||||
padding={10}
|
||||
onBlur={props.onBlur}
|
||||
style={{
|
||||
// backgroundColor: '#f5f5f5',
|
||||
fontFamily: 'ui-monospace,SFMono-Regular,SF Mono,Consolas,Liberation Mono,Menlo,monospace',
|
||||
|
||||
@@ -59,12 +59,7 @@ const FormModal = () => {
|
||||
<Input />
|
||||
</Form.Item>
|
||||
<Form.Item name='code' label='code'>
|
||||
<TextArea
|
||||
value={containerStore.formData.code}
|
||||
style={{
|
||||
height: '200px',
|
||||
}}
|
||||
/>
|
||||
<TextArea />
|
||||
</Form.Item>
|
||||
<Form.Item label=' ' colon={false}>
|
||||
<Button type='primary' htmlType='submit'>
|
||||
|
||||
Reference in New Issue
Block a user