正文
html table 列:
<el-table-column prop="book" label="投放书籍" width="120px">
<template slot-scope="scope">
<a @click="showbook(scope.row)" style="color:black;cursor:pointer;font-size: 12px;">{{
scope.row.book
}}</a>
</template>
</el-table-column>
html 弹窗 :
<el-dialog title="所有书籍" :visible.sync="isshowbook" width="600px">
<el-table :data="booklist" style="width: 100%">
<el-table-column prop="wid" label="id" width="80px"></el-table-column>
<el-table-column prop="title" label="书名" width="150px"></el-table-column>
<el-table-column prop="num" label="数目" width="50px" v-if="0"></el-table-column>
</el-table>
</el-dialog>
js:
showbook(obj){
//console.log("obj.book:"+obj.bookjson)
this.booklist = JSON.parse(obj.bookjson);
this.isshowbook = true;
},
Beginning of dialog window.Escape will cancel and close the window.
End of dialog window.