我正在使用 Nuxt.js(Nuxt 版本為 2)我的頁面上有查詢引數https://localhost:9000/applicant?period_manual[]=2022-10-09&period_manual[]=2022-10-19
我需要period_manual從查詢中獲取引數。
如果我想做
console.log(this.$route.query.period_manual) //- It is undefined
console.log(this.$route.query) //- this outputs {period_manual[]: ["2022-10-16", "2022-10-25"]}
console.log(this.$route.query.period_manual[]) //- ESLint error - ESLint: Parsing error: An element access expression should take an argument
如何從查詢請求中獲取 period_manual[] 的資料?
uj5u.com熱心網友回復:
試試那個
this.$route.query['period_manual[]']
轉載請註明出處,本文鏈接:https://www.uj5u.com/houduan/521074.html
