【发布时间】:2021-03-14 05:06:54
【问题描述】:
这就是我的 json 的样子。我想在模式中显示我单击的元素中的数据。
[{
"id": 1,
"companyName": "test",
"image": "https://mmelektronik.com.pl/wp-content/uploads/2017/10/Insert-logo.jpg.png",
"location": "Warsaw",
"salary": "10000",
"skill": "Junior",
"tags": "test",
"jobDescription": "test",
"title": "UI Designer"
}
]
Now I want to access only jobDescription and display it in the modal.
b-modal(hide-footer="", :id="id")
template(#modal-title="")
| Information
.d-block.text-center
p {{ want the jobDescription here }}
b-button(variant="primary") Apply
这就是我打开模式的方式。
openModal(item) {
this.offer = item;
this.$bvModal.show(this.id);
}
【问题讨论】:
-
你的offers json的内容是什么?
-
findit-b484b.firebaseio.com/offer.json ,它不是只显示一个jobDescription,而是在模态中显示所有它们。我想根据我点击的元素显示 jobDescription。
标签: javascript vue.js vuejs2 vue-component v-for