feat(fetch): add requestHeaders option, fixed #336
This commit is contained in:
parent
f960c196bf
commit
54ab4c9ff7
3 changed files with 20 additions and 13 deletions
|
|
@ -165,9 +165,11 @@ export function init (config, vm) {
|
|||
paths.forEach(path => {
|
||||
if (INDEXS[path]) return count++
|
||||
|
||||
helper.get(vm.router.getFile(path)).then(result => {
|
||||
INDEXS[path] = genIndex(path, result, vm.router, config.depth)
|
||||
len === ++count && saveData(config.maxAge)
|
||||
})
|
||||
helper
|
||||
.get(vm.router.getFile(path), false, vm.config.requestHeaders)
|
||||
.then(result => {
|
||||
INDEXS[path] = genIndex(path, result, vm.router, config.depth)
|
||||
len === ++count && saveData(config.maxAge)
|
||||
})
|
||||
})
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue