59 lines
1.1 KiB
Vue

<template>
<el-dialog title="新增文档" :visible.sync="visible" width="85%" append-to-body>
<edit-document ref="editDocumentRef" :toolId="toolId" @submit="editDocumentSubmit"/>
<div slot="footer" class="dialog-footer">
<el-button type="primary" @click="$refs.editDocumentRef.submitForm()"> </el-button>
<el-button @click="cancel()"> </el-button>
</div>
</el-dialog>
</template>
<script>
import editDocument from "../document/editDocument";
export default {
components: {
editDocument
},
props: {
/**
* 控制显示/隐藏
*/
show: {
type: Boolean,
default: false
},
/**
* 工具id
*/
toolId: {
type: String,
default: true
}
},
computed: {
visible: {
get() {
return this.show
},
set(val) {
this.$emit('update:show', false)
}
}
},
data () {
return {
}
},
methods: {
editDocumentSubmit(){
this.$emit('callback')
this.visible = false
},
cancel() {
this.$refs.editDocumentRef.cancel()
this.visible = false
}
}
}
</script>