- 博客(7)
- 收藏
- 关注
原创 路由跳转的两种模式 push与replace
push模式(默认模式,可以记录浏览记录,回退到上一次操作页面记录)this.props.history.push('路由地址')replace模式 会替换掉当前路由,回不到上一级路由this.props.history.replace('路由地址')
2022-03-15 17:12:21
1215
原创 npm WARN read-shrinkwrap This version of npm is compatible with lockfileVersion@1, but package-lock.
npm WARN read-shrinkwrap This version of npm is compatible with lockfileVersion@1, but package-lock.json这个报错信息是因为你的npm 版本现在只适用于lockfileVersion@1,但是现在你的package-lock.json是源于lockfileVersion@2的,所以需要升级npm版本就可以了npm install -g npm这样就解决啦!!欢迎阅读转载!...
2022-03-15 15:10:00
4246
1
原创 关于日期
getToday(){letdate=newDate();letyear=date.getFullYear();letmonth=date.getMonth()+1;letday=date.getDate();letdays=date.getDay();returnyear+"年"+month+"月"+day+"日"+this.getWeekda...
2020-09-14 14:34:39
203
原创 this.$confirm的用法
if(command=="logout"){this.$confirm("退出当前账号,是否继续?","提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then(()=>{this.$store.commit("CLEAR_DAT...
2020-09-14 13:25:19
30849
原创 javascript数组快速排序
var nums = [99,2,3,27,31,0]function quickSort(n1,n2){console.log(‘n1’,n1);console.log(‘n2’,n2);console.log(’=分割线’)if (n1<n2) {return -1;}else if (n1>n2) {return 1;}else{return 0;}}n...
2019-03-15 08:37:38
485
原创 如何利用nodejs创建基本服务器
NodeJS基础学习如何利用NodeJS创建基本服务器var http = requrie(“http”) //不用下载,node自带var guo = http.creatServer((req,res)=&gt;{//req request 浏览器传给服务器的信息//res response 服务器返回给浏览器的数据res.writeHead(200,{“Content-T...
2019-03-15 08:33:59
345
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人
RSS订阅