diff --git a/apps/web/src/App.tsx b/apps/web/src/App.tsx index 9e6304c..3ae08aa 100755 --- a/apps/web/src/App.tsx +++ b/apps/web/src/App.tsx @@ -11,11 +11,12 @@ import dayjs from "dayjs"; import "dayjs/locale/zh-cn"; import { AuthProvider } from './providers/auth-provider'; import { Toaster } from 'react-hot-toast'; - +// import PostForm from './components/models/post/PostSelect/PostSelect'; dayjs.locale("zh-cn"); function App() { return ( <> + {/* */} - + + ); } diff --git a/apps/web/src/app/main/course/preview/components/coursePreviewAllmsg.tsx b/apps/web/src/app/main/course/preview/components/coursePreviewAllmsg.tsx old mode 100644 new mode 100755 diff --git a/apps/web/src/app/main/course/preview/page.tsx b/apps/web/src/app/main/course/preview/page.tsx old mode 100644 new mode 100755 diff --git a/apps/web/src/components/common/container/CollapsibleContent.tsx b/apps/web/src/components/common/container/CollapsibleContent.tsx old mode 100644 new mode 100755 diff --git a/apps/web/src/components/common/input/InputList.tsx b/apps/web/src/components/common/input/InputList.tsx old mode 100644 new mode 100755 diff --git a/apps/web/src/components/models/post/PostSelect/PostSelect.tsx b/apps/web/src/components/models/post/PostSelect/PostSelect.tsx new file mode 100644 index 0000000..d564424 --- /dev/null +++ b/apps/web/src/components/models/post/PostSelect/PostSelect.tsx @@ -0,0 +1,96 @@ +// import React, { useState } from 'react'; +// import { Form, Select, Input } from 'antd'; +// import axios from 'axios'; + +// const { Option } = Select; + +// // 假数据 +// const fakePostsData = Array.from({ length: 15 }, (_, index) => ({ +// id: index + 1, +// type: 'Lecture', +// name: `Lecture ${index + 1}`, +// description: `This is lecture number ${index + 1}`, +// })); + +// // 模拟获取数据的函数 +// async function fetchPosts(query = '') { +// // 在实际应用中,这里应该是一个真实的API调用 +// return fakePostsData.filter(post => +// post.name.toLowerCase().includes(query.toLowerCase()) || +// post.description.toLowerCase().includes(query.toLowerCase()) +// ); +// } + +// const PostSelector = ({ value, onChange }) => { +// const [posts, setPosts] = useState([]); +// const [searchValue, setSearchValue] = useState(''); + +// const handleSearch = async (query) => { +// setSearchValue(query); +// const result = await fetchPosts(query); +// setPosts(result); +// }; + +// const handlePostChange = (selectedIds) => { +// onChange(selectedIds); // 更新父组件的状态 +// }; + +// const renderOption = (post) => ( +// +// ); + +// return ( +// +// ); +// }; + +// const PostForm = () => { +// const [form] = Form.useForm(); + +// const onFinish = (values) => { +// console.log('Received values of form: ', values); +// }; + +// return ( +//
+// +// form.setFieldsValue({ postIds: selectedIds })} +// /> +// + +// +// +// +//
+// ); +// }; + +// export default PostForm; \ No newline at end of file diff --git a/apps/web/src/hooks/useGetTaxonomy.ts b/apps/web/src/hooks/useGetTaxonomy.ts old mode 100644 new mode 100755