|
|
@ -1,11 +1,13 @@ |
|
|
|
<template> |
|
|
|
<template> |
|
|
|
<teleport to="#app"> |
|
|
|
<teleport to="#app"> |
|
|
|
<div class="dialog" v-show="show" @contextmenu.prevent="console.log('禁用浏览器默认右键功能')"> |
|
|
|
<div class="dialog" v-show="show" @contextmenu.prevent="console.log('禁用浏览器默认右键功能')"> |
|
|
|
|
|
|
|
<div class="content" @click.native.stop> |
|
|
|
<div class="title" v-if="title"> |
|
|
|
<div class="title" v-if="title"> |
|
|
|
<span>{{ title }}</span> |
|
|
|
<span>{{ title }}</span> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
<slot /> |
|
|
|
<slot /> |
|
|
|
<img v-if="showHeader" :src="lock_close" class="close" @click="show = false; emit('close')"></img> |
|
|
|
<img v-if="showHeader" :src="close_icon" class="close" @click="show = false; emit('close')"></img> |
|
|
|
|
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</teleport> |
|
|
|
</teleport> |
|
|
|
</template> |
|
|
|
</template> |
|
|
@ -14,7 +16,7 @@ |
|
|
|
import { useStore } from "vuex"; |
|
|
|
import { useStore } from "vuex"; |
|
|
|
import { watch, onMounted, ref } from "vue"; |
|
|
|
import { watch, onMounted, ref } from "vue"; |
|
|
|
import { useI18n } from "vue3-i18n"; |
|
|
|
import { useI18n } from "vue3-i18n"; |
|
|
|
import { lock_close } from "@/config"; |
|
|
|
import { close_icon } from "@/config"; |
|
|
|
|
|
|
|
|
|
|
|
const { t } = useI18n(); |
|
|
|
const { t } = useI18n(); |
|
|
|
const { state, commit, dispatch } = useStore(); |
|
|
|
const { state, commit, dispatch } = useStore(); |
|
|
@ -76,19 +78,26 @@ onMounted(() => { |
|
|
|
</script> |
|
|
|
</script> |
|
|
|
<style lang="scss" scoped> |
|
|
|
<style lang="scss" scoped> |
|
|
|
.dialog { |
|
|
|
.dialog { |
|
|
|
|
|
|
|
width: 100%; |
|
|
|
|
|
|
|
height: 100%; |
|
|
|
|
|
|
|
position: absolute; |
|
|
|
|
|
|
|
z-index: v-bind('z'); |
|
|
|
|
|
|
|
background: rgba(0, 0, 0, 0.5); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
.content { |
|
|
|
top: v-bind('prop.top'); |
|
|
|
top: v-bind('prop.top'); |
|
|
|
left: v-bind('prop.left'); |
|
|
|
left: v-bind('prop.left'); |
|
|
|
right: v-bind('prop.right'); |
|
|
|
right: v-bind('prop.right'); |
|
|
|
bottom: v-bind('prop.bottom'); |
|
|
|
bottom: v-bind('prop.bottom'); |
|
|
|
padding: v-bind('prop.padding'); |
|
|
|
padding: v-bind('prop.padding'); |
|
|
|
position: absolute; |
|
|
|
position: absolute; |
|
|
|
z-index: v-bind('z'); |
|
|
|
|
|
|
|
border: 2px solid #fff; |
|
|
|
border: 2px solid #fff; |
|
|
|
border-radius: 6px; |
|
|
|
border-radius: 6px; |
|
|
|
box-shadow: 0 0 5px 5px rgba(0, 0, 0, 0.7); |
|
|
|
box-shadow: 0 0 5px 5px rgba(0, 0, 0, 0.7); |
|
|
|
background: rgba(0, 0, 0, 0.7); |
|
|
|
background: rgba(0, 0, 0, 0.7); |
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
.title { |
|
|
|
.title { |
|
|
|
display: flex; |
|
|
|
display: flex; |
|
|
|