MockJs.mock(/PROJECT/,{'data|0-100':[
{ 'id':'@guid()', 'projectname':'@ctitle(3, 5)', 'describe|0-1':'@cparagraph(1)', 'user|1':'@cname', 'startdate':'@date()', 'enddate':'@date()', 'fileList': [
{ 'name': '@ctitle(3, 10).word',
'url': '@url'
}
]
}
]})我想現(xiàn)在當(dāng)項(xiàng)目啟動(dòng)之后,mockjs模擬的數(shù)據(jù)不在改變;因?yàn)槊看螌?duì)localhost:9090/PROJECT進(jìn)行增刪改查時(shí)都會(huì)觸發(fā)這個(gè)操作刷新數(shù)據(jù),導(dǎo)致每次增刪改查模擬的數(shù)據(jù)都不一樣新增:this.axios({ method:'post',
url:url,
data:data
}).then().catch()修改:this.axios({ method:'put',
url:url+id,
data:data
})......
vue使用mock之后項(xiàng)目每次重啟mockjs可以不再刷新了嗎
幕布斯7119047
2018-07-21 07:50:00