|
@@ -6,7 +6,7 @@
|
|
|
<template>
|
|
|
<el-dialog modal-class="penModalClass" class="penElDialog" :class="{ isWhite: isWhite }" v-bind="$attrs" :fullscreen="true" :show-close="false">
|
|
|
<iframe class="penIframe" frameborder="0" :src="URL_WHITEBOARD"></iframe>
|
|
|
- <div class="closeSvg" @click="close">
|
|
|
+ <div class="closeSvg" @click="handleClose">
|
|
|
<svg width="22px" height="20px" viewBox="0 0 22 20">
|
|
|
<path
|
|
|
transform="translate(-1.000000, -2.000000)"
|
|
@@ -20,10 +20,24 @@
|
|
|
|
|
|
<script setup lang="ts">
|
|
|
import { URL_WHITEBOARD } from "@/config/index"
|
|
|
-defineProps<{
|
|
|
+import useDialogConfirm from "@/hooks/useDialogConfirm"
|
|
|
+
|
|
|
+const props = defineProps<{
|
|
|
isWhite?: boolean
|
|
|
close: () => void
|
|
|
}>()
|
|
|
+
|
|
|
+function handleClose() {
|
|
|
+ useDialogConfirm({
|
|
|
+ headImg: require(`@/img/coursewarePlay/${props.isWhite ? "ts2" : "ts1"}.png`),
|
|
|
+ text: `请确认是否退出${props.isWhite ? "白板" : "批注"}?`,
|
|
|
+ btnShow: [true, true],
|
|
|
+ onOk(vm: any) {
|
|
|
+ props.close()
|
|
|
+ vm.remove()
|
|
|
+ }
|
|
|
+ })
|
|
|
+}
|
|
|
</script>
|
|
|
<style lang="scss">
|
|
|
.penElDialog.el-dialog {
|