mirror of
https://github.com/ChatGPTNextWeb/ChatGPT-Next-Web.git
synced 2025-10-01 23:56:39 +08:00
优化模型选择ui
This commit is contained in:
parent
15ddb5fe8c
commit
424199a697
@ -114,7 +114,6 @@ interface ModalProps {
|
|||||||
defaultMax?: boolean;
|
defaultMax?: boolean;
|
||||||
footer?: React.ReactNode;
|
footer?: React.ReactNode;
|
||||||
onClose?: () => void;
|
onClose?: () => void;
|
||||||
maskClosable?: boolean;
|
|
||||||
is_cus?: boolean;
|
is_cus?: boolean;
|
||||||
}
|
}
|
||||||
export function Modal(props: ModalProps) {
|
export function Modal(props: ModalProps) {
|
||||||
@ -514,7 +513,7 @@ export function ModalSelector<T extends CheckGroupValueType>(props: {
|
|||||||
onClose?: () => void;
|
onClose?: () => void;
|
||||||
multiple?: boolean;
|
multiple?: boolean;
|
||||||
}) {
|
}) {
|
||||||
console.log("-----", props);
|
// console.log("-----", props);
|
||||||
|
|
||||||
const getCheckCardAvatar = (value: string): React.ReactNode => {
|
const getCheckCardAvatar = (value: string): React.ReactNode => {
|
||||||
if (value.startsWith("gpt")) {
|
if (value.startsWith("gpt")) {
|
||||||
@ -526,8 +525,18 @@ export function ModalSelector<T extends CheckGroupValueType>(props: {
|
|||||||
return <></>;
|
return <></>;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
const clickMaskEvent = (event: React.MouseEvent) => {
|
||||||
|
const div = document.getElementById("modal-mask");
|
||||||
|
// console.log('-----', event.target)
|
||||||
|
if (event.target === div) {
|
||||||
|
props.onClose?.();
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div
|
<div
|
||||||
|
onClick={(event) => clickMaskEvent(event)}
|
||||||
|
id="modal-mask"
|
||||||
className={styles["modal-mask"] + " " + styles["modal-mask-container"]}
|
className={styles["modal-mask"] + " " + styles["modal-mask-container"]}
|
||||||
>
|
>
|
||||||
<Modal
|
<Modal
|
||||||
@ -535,7 +544,6 @@ export function ModalSelector<T extends CheckGroupValueType>(props: {
|
|||||||
onClose={() => props.onClose?.()}
|
onClose={() => props.onClose?.()}
|
||||||
footer={null}
|
footer={null}
|
||||||
is_cus={true}
|
is_cus={true}
|
||||||
maskClosable={true}
|
|
||||||
>
|
>
|
||||||
<AntList grid={{ gutter: 16 }}>
|
<AntList grid={{ gutter: 16 }}>
|
||||||
<CheckCard.Group
|
<CheckCard.Group
|
||||||
|
Loading…
Reference in New Issue
Block a user