AppImportCheckDialog.vue
964 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
<template>
<el-dialog
title="导入提示"
:visible.sync="dialogVisible"
width="30%"
:close-on-click-modal="false"
append-to-body
>
<div v-html="content"></div>
<div slot="footer" class="dialog-footer">
<el-button @click="dialogVisible = false">取消</el-button>
<el-button type="primary" @click="confirm('cover')">覆盖更新</el-button>
<el-button type="primary" @click="confirm('notCover')"
>不覆盖更新</el-button
>
</div>
</el-dialog>
</template>
<script>
export default {
name: 'AppImportCheckDialog',
data() {
return {
dialogVisible: false,
content: '',
fail: null,
}
},
methods: {
open(content, fail) {
this.dialogVisible = true
this.content = content
this.fail = fail
},
confirm(type) {
this.dialogVisible = false
this.$emit('confirm', type, this.fail)
},
},
}
</script>
<style scoped></style>