feat: add refresh route

This commit is contained in:
xiaoxian521
2021-04-19 19:22:24 +08:00
parent fdff569de9
commit f9ff87c708
5 changed files with 304 additions and 208 deletions

View File

@@ -1,10 +1,9 @@
interface ProxyAlgorithm {
increaseIndexes<T>(val: Array<T>): Array<T>
increaseIndexes<T>(val: Array<T>): Array<T>;
}
class algorithmProxy implements ProxyAlgorithm {
constructor() { }
constructor() {}
// 数组每一项添加索引字段
public increaseIndexes<T>(val: Array<T>): Array<T> {
@@ -13,12 +12,11 @@ class algorithmProxy implements ProxyAlgorithm {
return {
// @ts-ignore
...val[v],
key: v
}
key: v,
};
})
.filter(v => v.meta.showLink)
.filter((v) => v.meta && v.meta.showLink);
}
}
export const algorithm = new algorithmProxy()
export const algorithm = new algorithmProxy();