1.通过axios获取后台数据。
submitForm () {
return
axios({
method:
'get',
url:
'
http://
链接',
withCredentials:
true
})
.
then((
response)
=> {
return
response.
data
})
.
catch((
error)
=> {
console.
log(
error)
})
}
2.vux的panel属性可以在html中只写一行,具体数值从js中获取数据,并通过多组数据自动渲染出多行列表。
<
panel
header=
"标题"
:list="
list"
:type="
type"
></
panel
>
3.而在demo中,script返回的数据中,具体数据仍然需要自己填充而不是后台数据获取,仍然是写死的。如下。
data () {
return {
type: '1',
list