<template> <div> <el-dialog v-if="visible" v-dialogDrag :visible="visible" :modal-append-to-body="false" :close-on-click-modal="false" title="新增" destroy-on-close width="50%"> <div> <el-upload action="#" :before-upload="beforeUpload" :show-file-list="false" accept=".xml"> <c-button slot="trigger" size="small" type="primary">导入</c-button> </el-upload> </div> <span slot="footer" class="dialog-footer"> <el-button v-if="!isDispaly" type="primary" @click="handleSubmit()">确 定</el-button> <el-button @click="handleCancel()">取 消</el-button> </span> </el-dialog> </div> </template> <script> export default { mixins: [], props: { }, computed: { }, data() { return { visible: false, }; }, watch: { }, methods: { beforeUpload(file) { }, handleSubmit() { this.visible = false; }, handleCancel() { this.visible = false; } } }; </script> <style scoped lang="less"></style>