课程名称:[React 17/18 系统精讲 结合TS打造旅游电商平台]
课程章节: 主页开发
主讲老师:阿莱克斯
npm install sass sass-loader
import y from "@/assets/images/y.png"; import f from "@/assets/images/f.png"; const data = [y, f, y, f]; const CooperativeEnterprise: React.FC = () => { return ( <div className={styles["content"]}> <Divider orientation={"left"}> <Typography.Title level={3}>合作企业</Typography.Title> </Divider> <Row> {data.map((m): JSX.Element => { return ( <Col span={6}> <img style={{ width: 250, height: "auto" }} src={m} alt="" /> </Col> ); })} </Row> </div> ); }; export default CooperativeEnterprise;
npm install react-router-dom @type/react-router-dom
<BrowserRouter> <Routes> <Route element={<HomePage />} path="/"></Route> </Routes> </BrowserRouter>
import ProductImage from "@/components/ProductImg.vue"; import { ref } from "vue"; import { productList1 } from "@/mock/2"; type DataProps = { size?: "mini" | "big"; id: string | number; price: number | string; title: string; touristRoutePictures?: any[]; }; const mocks = ref<DataProps[]>(productList1);