Using const to define method in vue

clipboard.png
/ / get a list of roles

const request = {
  p: ["get,/roles"],
  r: cid => {
    return instance.get(`${preUrlPath}/${cid}/period_times`, {
      cid
    })
  }
}

as shown in the picture, a method of writing the definition r can be understood in r, p: what"s in it? what"s the use of p and r? what"s in English? I really can"t understand the beginner"s advice

.
Mar.24,2021

p and r are the key values of the object, and the letters themselves have no meaning. You can learn about json.

Menu