vue でモーダルウィンドウに複数の種類のコメントを表示する
postItem変数を介して、親から子へと情報をやり取りする。
コードサンプル
親js
new Vue({
data:{postItem},
methods:{
openModal: function (item) {
console.log("openModal "+item)
this.showContent = true
this.postItem = item
console.log("this.postItem "+this.postItem)
},
closeModal: function () {
console.log("closeModal")
this.showContent = false
},
}
})
子js
[Read More]