# demo **Repository Path**: hazelnuttt/demo ## Basic Information - **Project Name**: demo - **Description**: No description available - **Primary Language**: Unknown - **License**: Not specified - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2021-03-23 - **Last Updated**: 2021-11-03 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # demo 细节 - 路由切换 - `Router`容器组件传入`history` - 子组件拿到`history`,通过 history.push("/route1") - 原理是 h5 api `window.location.history.pushState({page:'1'},"title1","/route1")` - Modal 组件 - 首先,分析组件的需求,比如`title`,`visible`,`onOk`,`onCancel`,样式,颜色等。 - 其次,根据需求对传入接口进行定义。 - 然后,编写样式。 - 用组件对其渲染并定义默认传参。