You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
42 lines
925 B
42 lines
925 B
<template>
|
|
<div :class="[b(), inBox?m('inbox'):'']" v-if="isRenderShow" v-show="isDisplayShow" @click.stop="clickMask"></div>
|
|
</template>
|
|
|
|
<script lang="ts" setup>
|
|
import { useNamespace } from 'bolt-ui/utils/hooks/use-namespace';
|
|
import { computed } from 'vue';
|
|
const props = withDefaults(defineProps<{
|
|
show?: boolean
|
|
isRender?: boolean
|
|
canClose?: boolean
|
|
inBox?: boolean
|
|
}>(), {
|
|
show: false,
|
|
isRender: false,
|
|
canClose: true,
|
|
inBox: false,
|
|
})
|
|
const isDisplayShow = computed(() => {
|
|
if(props.isRender) {
|
|
return props.show
|
|
}
|
|
return true
|
|
})
|
|
const isRenderShow = computed(() => {
|
|
if(props.isRender) {
|
|
return true
|
|
}
|
|
return props.show
|
|
})
|
|
|
|
const { b, m } = useNamespace('mask')
|
|
|
|
const emits = defineEmits<{
|
|
(e: "update:show", isShow: boolean): void
|
|
}>()
|
|
|
|
function clickMask() {
|
|
if(!props.canClose) return
|
|
emits("update:show", false)
|
|
}
|
|
</script>
|