slice-messageBox.vue 1.59 KB
<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>