slice-messageBox.vue
1.59 KB
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
46
47
48
49
50
51
52
53
<template>
<section class="slice-message">
<MessageBox :isVisible="isSliceMessageBoxVisible" :onClose="onCancel" info="">
<template v-slot:img>
<img class="title-img" :src="SUCCESSIMAGE" alt="" />
</template>
<template v-slot:title>
<span v-text="$t('sliceMessageTitle')" />
</template>
<template v-slot:content>
<div>
{{ $t('sliceMessageContent') }}
<span class="highlight" v-text="$t('sliceMessageContent3')" />
<span v-text="$t('sliceMessageContent2')" />
</div>
</template>
</MessageBox>
</section>
</template>
<script setup>
import { defineComponent, watch } from 'vue';
import MessageBox from '@/views/viewer/components/common/messageBox.vue';
import SUCCESSIMAGE from '@/views/assets/images/common/success.png';
import { useApplicationSettingIndexStore } from '@/views/stores/applications/useApplicationSettingIndexStore';
import { storeToRefs } from 'pinia';
const store = useApplicationSettingIndexStore();
const { setSliceMessageBoxVisible } = store;
const { isSliceMessageBoxVisible } = storeToRefs(store);
const onCancel = () => {
setSliceMessageBoxVisible(false);
};
defineComponent({ MessageBox });
</script>
<style lang="less" scoped>
.slice-message {
.title-img {
position: absolute;
width: 80px;
height: 80px;
left: 50%;
top: -40px;
margin-left: -40px;
}
.highlight {
color: @main-color !important;
}
}
</style>