Skip to content

Commit

Permalink
Merge pull request CloudOrc#199 from xjm11/dev
Browse files Browse the repository at this point in the history
fix: echo  Background Image url
  • Loading branch information
dlimeng authored Oct 10, 2023
2 parents e152301 + 923eb16 commit c10fefe
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions solidui-web/src/pages/Project/_components/ProjectCard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ export default function ProjectCard(props: ProjectCardProps) {

const navigate = useNavigate();
const [form] = Form.useForm();
const [bgImageform] = Form.useForm();
const [editOpen, setEditOpen] = useState<boolean>(false);
const [picOpen, setPicOpen] = useState<boolean>(false);

Expand Down Expand Up @@ -221,7 +222,7 @@ export default function ProjectCard(props: ProjectCardProps) {
strokeLinecap="square"
onClick={() => {
setPicOpen(true);
// form.setFieldValue("name", item.projectName);
bgImageform.setFieldValue("backgroundImage", item.image);
}}
/>
{/* <Editor
Expand Down Expand Up @@ -458,7 +459,7 @@ export default function ProjectCard(props: ProjectCardProps) {
<div className="modal-content__form">
<Form
layout="vertical"
form={form}
form={bgImageform}
initialValues={{ layout: "vertical" }}
onFinish={async (values) => {
const res = await Apis.project.changeBgImage(
Expand Down Expand Up @@ -497,7 +498,11 @@ export default function ProjectCard(props: ProjectCardProps) {
>
Cancel
</Button>
<Button type="primary" size="small" onClick={() => form.submit()}>
<Button
type="primary"
size="small"
onClick={() => bgImageform.submit()}
>
Save
</Button>
</div>
Expand Down

0 comments on commit c10fefe

Please sign in to comment.