A dialog box is made with element. The visible.sync property value that pops up in the dialog box is controlled by props to receive the value from the parent component. It functions normally at first, but it will give a warning when you click to close the dialog box. The reason is that the close button that comes with elemen changes the method of using variable to replace props, but finds that it cannot be switched normally.
<template>
<el-dialog title="" :visible.sync="visible">
<el-table :data="gridData">
<el-table-column property="date" label=""></el-table-column>
<el-table-column property="name" label=""></el-table-column>
<el-table-column property="detail" label=""></el-table-column>
</el-table>
</el-dialog>
</template>
<script>
export default{
props:["dialogTableVisible","gridData"],
data(){
return {
visible:this.dialogTableVisible
}
}
}
</script>