Mock icon indicating copy to clipboard operation
Mock copied to clipboard

A simulation data generator

Results 116 Mock issues
Sort by recently updated
recently updated
newest added

使用的是vite2+vue3+cesium+ts+mock 这是使用了Mock.js ![QQ图片20220318161952](https://user-images.githubusercontent.com/32925530/158963506-3116bd09-e4fa-4782-98b5-f0383dc72327.png) 网络请求 ![image](https://user-images.githubusercontent.com/32925530/158963932-992e6cfc-0679-4756-aaf3-90c91efc81c3.png) 然后在mian.ts取消mock ![image](https://user-images.githubusercontent.com/32925530/158963616-35d8a21d-156d-4674-863e-2d74829af99c.png) 地球显示正常 ![image](https://user-images.githubusercontent.com/32925530/158963665-505169b4-3bd6-437e-a185-bf51de139d61.png) 网络请求 ![image](https://user-images.githubusercontent.com/32925530/158963876-38ded649-6179-452b-8b7d-5a86fdcdfcff.png)

例如 '@CAPITALIZE(@STRING(lower, 5, 10))' 输出结果错误

Hey there! I belong to an open source security research community, and a member (@sampaguitas) has found an issue, but doesn’t know the best way to disclose it. If not...

今天测试一下,get传参,包括使用了url正则的方式,来匹配。但是都一一失败。 请问一下,mock.js有办法支持参数匹配吗?

新增了个dateRange方法,用于生成一个区间内随机日期

在mock.js文件中的string方法这边,字符串替换的时候需要对$符号做特殊处理, 主要是result = result.replace(ph, phed);这一句用到了正则表达式, 而 $$ $& $` $' $n $这些组合是有特殊含义的

在mock.js文件中的string方法这边,字符串替换的时候需要对$符号做特殊处理, 主要是`result = result.replace(ph, [phed);`这一句用到了正则表达式, 而 $$ $& $` $' $n $这些组合是有特殊含义的,[可阅读这里](https://developer.mozilla.org/zh-CN/docs/Web/JavaScript/Reference/Global_Objects/String/replace) 因此,修改思路如下: 1. 替换前把$符号的组合拆掉,我是填充了个空格来处理; 2. 替换完后,再把空格处理掉就行了 修改后的代码[可参考](https://blog.csdn.net/LinBilin_/article/details/122260772),主要是加了 `if(phed.indexOf('$')>-1){ phed=phed.replace(/\$/g,'$ '); }` 和修改了 `return result.indexOf(' ')>-1?result.replace(/ /g,''):result;` 这两个地方

vite+vue3项目中mock怎么使用???

我的项目采用mock和服务端接口并存的方式, 当我请求数据的时候, 各自相互不会干扰. 一切都是正常的. but, 当我使用原生video标签嵌入视频时, .mp4可以正常播放,.m3u8格式的视频不能正常播放, then, 当我屏蔽mock请求数据部分, 只保留服务器接口请求时,m3u8又可以正常播放了. 从报错信息来看, 好像是video的src请求被mockjs给拦截了.??? 不知道怎么解决了, 毫无头绪... 控制台报错显示如下: video.es.js?b4fc:31574 Uncaught TypeError: Cannot read property 'aborted' of null ![image](https://user-images.githubusercontent.com/59011084/110413903-b5189100-80c9-11eb-98b5-ad588a669ddd.png) 补充: 已经排除了m3u8地址无法播放等问题了.

当前的mock支持,vue3.0吗?在最新版的vue3.0中如何引入?