Vue 请求封装 VueRequest
请求缓存
轮训
loading保持
防止重复请求
通过原型链添加的变量 方法 要设置为不可被枚举
if (!Array.prototype.at) {
Array.prototype.at = function(index) {
const len = this.length;
index = (index % len + len) % len; // 处理负索引和越界情况
return this[index];
};
Object.defineProperty(Array.prototype, 'at', {
enumerable: false, // 使属性不可枚举
});
}