06 2021 档案

摘要:预备知识: //箭头函数一个参数时可以去掉箭头,返回语句只有一行的话,可以省略return (x)=>{return x*2} 等价于 x => x*2 //catch((e)=>console.log(e)) //或者 //catch(failueCallBack) 等价于 then(null,f 阅读全文
posted @ 2021-06-30 17:42 留下成长的足迹 阅读(33) 评论(0) 推荐(0) 编辑
摘要:1.exact为true或false的区别 exact:一般而言,react路由会匹配所有匹配到的路由组件,exact能够使得路由的匹配更严格一些。exact的值为bool型,为true是表示严格匹配,要求路径与location.pathname必须完全匹配,且会比较匹配过的路由是否和正匹配的路由一 阅读全文
posted @ 2021-06-28 14:19 留下成长的足迹 阅读(806) 评论(0) 推荐(0) 编辑
摘要:1.Asp.net MVC 2.web页面展示(前端) 2.1 html (页面框架) 2.2 css (样式) 2.3 javascript,简称js (向后端发送请求,保存数据,或者从后端获取数据) 参考:https://www.w3school.com.cn/ 3.数据库存储(sqlserve 阅读全文
posted @ 2021-06-27 16:20 留下成长的足迹 阅读(451) 评论(0) 推荐(0) 编辑
摘要:1.安装Microsoft.AspNetCore.Mvc.Cors; 2.在startup.cs中配置 3.然后localhost:3002就可以跨域请求了。如果想所有的网站都可以请求,把allowanyoriginas替换withorigins 阅读全文
posted @ 2021-06-25 18:13 留下成长的足迹 阅读(99) 评论(0) 推荐(0) 编辑
摘要:1.安装axios npm install axios2.引用axiosimport axios from 'axios'3.发送get请求 参考地址 GitHub - axios/axios: Promise based HTTP client for the browser and node.j 阅读全文
posted @ 2021-06-25 18:09 留下成长的足迹 阅读(529) 评论(0) 推荐(0) 编辑
摘要:1.下载程序包Swashbuckle.AspNetCore 2.在startup.cs中配置 注意:v1版本号和“swagger/v1/swagger.json”要对应上,否则报 “Not Found /swagger/v1/swagger.json” 3.在project property中勾选X 阅读全文
posted @ 2021-06-25 17:55 留下成长的足迹 阅读(217) 评论(0) 推荐(0) 编辑
摘要:1.安装nodejs和npm (node -v 查看nodejs版本 npm -v 查看npm版本) 2.安装react脚手架包 npm install -g create-react-app 3.创建新项目 (npx) create-react-app my-app 4.启动 cd my-app 阅读全文
posted @ 2021-06-21 17:51 留下成长的足迹 阅读(142) 评论(0) 推荐(0) 编辑
摘要:1.React.createElement(arg1, arg2, arg3) 前三个参数分别为类型,props,children 参考地址: Introducing JSX – React (reactjs.org) 2.继承React.Component的Class必须有render方法,每次调 阅读全文
posted @ 2021-06-15 16:54 留下成长的足迹 阅读(34) 评论(0) 推荐(0) 编辑

点击右上角即可分享
微信分享提示