|
@@ -1,20 +1,19 @@
|
|
|
<template>
|
|
|
- <div class="dialog_confirm">
|
|
|
- <el-dialog
|
|
|
- title="提示"
|
|
|
- v-model="visible"
|
|
|
- :width="`${typeof width === 'number' ? width : parseInt(width)}px`"
|
|
|
- >
|
|
|
- <template v-if="footer" #footer>
|
|
|
- <div class="my-header">
|
|
|
- <el-button type="danger" @click="cancelHandler">{{ cancelButtonText }}</el-button>
|
|
|
- <el-button type="primary" @click="confirmHandler">{{ confirmButtonText }}</el-button>
|
|
|
- </div>
|
|
|
- </template>
|
|
|
- <p class="content" v-if="!$slots.content">{{ title }}</p>
|
|
|
- <slot v-else name="content"></slot>
|
|
|
- </el-dialog>
|
|
|
- </div>
|
|
|
+ <el-dialog
|
|
|
+ title="提示"
|
|
|
+ append-to-body
|
|
|
+ v-model="visible"
|
|
|
+ :width="`${typeof width === 'number' ? width : parseInt(width)}px`"
|
|
|
+ >
|
|
|
+ <template v-if="footer" #footer>
|
|
|
+ <div class="my-header">
|
|
|
+ <el-button type="danger" @click="cancelHandler">{{ cancelButtonText }}</el-button>
|
|
|
+ <el-button type="primary" @click="confirmHandler">{{ confirmButtonText }}</el-button>
|
|
|
+ </div>
|
|
|
+ </template>
|
|
|
+ <p class="content" v-if="!$slots.content">{{ title }}</p>
|
|
|
+ <slot v-else name="content"></slot>
|
|
|
+ </el-dialog>
|
|
|
<slotInstance name="reference" />
|
|
|
</template>
|
|
|
|
|
@@ -69,9 +68,7 @@ const slotInstance = createSlot(slots)
|
|
|
</script>
|
|
|
|
|
|
<style lang="scss" scoped>
|
|
|
-.dialog_confirm {
|
|
|
- .content {
|
|
|
- font-size: 18px;
|
|
|
- }
|
|
|
+.content {
|
|
|
+ font-size: 18px;
|
|
|
}
|
|
|
</style>
|