iblogc

JS笔记

2019-04-24 · 1 min read
js

js中要用变量作为key的话使用方括号括住
例:this.searchKeyword

this.$http({
    url: this.searchUrl,
    method: this.remoteRequestMethod,
    params: Object.assign({}, this.searchParams, this.pager),
    data: Object.assign({ [this.searchKeyword]: query }, this.searchBody, this.pager)
    })

全文完🙈

Powered by Gridea && Deployed by 部署状态