1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859 |
- <script setup>
- import Close from '../icons/Close.vue';
- import { ref } from 'vue';
- const props = defineProps({
- // 提示文字
- tips: {
- type: String,
- default: ''
- },
- // 是否显示
- visible: {
- type: Boolean,
- default: false,
- required: true
- }
- });
- const emits = defineEmits(['update:visible']);
- const close = () => {
- emits('update:visible', false);
- };
- </script>
- <template>
- <div class="popup">
- <Close @click="close" class="icon" />
- <span>{{ tips }}</span>
- </div>
- </template>
- <style scoped>
- .popup {
- background-color: var(--sider-bg);
- border: 1px solid #241917;
- box-shadow: 0 5px 8px var(--button-normal-shadow);
- position: absolute;
- bottom: 0;
- right: 0;
- padding: 1.2vw 8vw;
- margin: 1.25vw;
- border-radius: 8px;
- }
- .icon {
- position: absolute;
- top: .4vw;
- right: .4vw;
- cursor: pointer;
- color: #241917;
- }
- .icon:hover {
- transform: rotate(180deg);
- transition: all 0.5s ease-out;
- }
- </style>
|