当前位置:网站首页>Personal component - message prompt
Personal component - message prompt
2022-07-05 13:27:00 【Rotten Bobby】
<script lang="ts" setup name="XtxMessage">
import {
PropType } from 'vue'
defineProps({
type: {
type: String as PropType<'success' | 'error' | 'warning'>,
default: 'success',
},
})
// Define an object , A style that contains three cases , object key Is the type string
const style = {
warning: {
icon: 'icon-warning',
color: '#E6A23C',
backgroundColor: 'rgb(253, 246, 236)',
borderColor: 'rgb(250, 236, 216)',
},
error: {
icon: 'icon-shanchu',
color: '#F56C6C',
backgroundColor: 'rgb(254, 240, 240)',
borderColor: 'rgb(253, 226, 226)',
},
success: {
icon: 'icon-queren2',
color: '#67C23A',
backgroundColor: 'rgb(240, 249, 235)',
borderColor: 'rgb(225, 243, 216)',
},
}
</script>
<template>
<div class="xtx-message" :style="style[type]">
<i class="iconfont" :class="style[type].icon"></i>
<span class="text"><slot></slot></span>
</div>
</template>
<style scoped lang="less">
.xtx-message {
width: 300px;
height: 50px;
position: fixed;
z-index: 9999;
left: 50%;
margin-left: -150px;
top: 25px;
line-height: 50px;
padding: 0 25px;
border: 1px solid #e4e4e4;
background: #f5f5f5;
color: #999;
border-radius: 4px;
i {
margin-right: 4px;
vertical-align: middle;
}
.text {
vertical-align: middle;
}
}
</style>
边栏推荐
- Principle and configuration of RSTP protocol
- MMSeg——Mutli-view时序数据检查与可视化
- MySQL --- 数据库查询 - 排序查询、分页查询
- go map
- Reflection and imagination on the notation like tool
- 53. Maximum subarray sum: give you an integer array num, please find a continuous subarray with the maximum sum (the subarray contains at least one element) and return its maximum sum.
- The "Baidu Cup" CTF competition was held in February 2017, Web: explosion-2
- DataPipeline双料入选中国信通院2022数智化图谱、数据库发展报告
- Simple page request and parsing cases
- 49. 字母异位词分组:给你一个字符串数组,请你将 字母异位词 组合在一起。可以按任意顺序返回结果列表。 字母异位词 是由重新排列源单词的字母得到的一个新单词,所有源单词中的字母通常恰好只用一次。
猜你喜欢
华为推送服务内容,阅读笔记
Go array and slice
FPGA 学习笔记:Vivado 2019.1 添加 IP MicroBlaze
[notes of in-depth study paper]transbtsv2: wider instead of deep transformer for medical image segmentation
What are the private addresses
CloudCompare——点云切片
Put functions in modules
Fragmented knowledge management tool memos
Asemi rectifier bridge hd06 parameters, hd06 pictures, hd06 applications
Backup and restore of Android local SQLite database
随机推荐
什么是网络端口
stm32逆向入门
TortoiseSVN使用情形、安装与使用
Shu tianmeng map × Weiyan technology - Dream map database circle of friends + 1
Win10 - lightweight gadget
FPGA learning notes: vivado 2019.1 add IP MicroBlaze
JPA规范总结和整理
手把手带你入门Apache伪静态的配置
APICloud Studio3 WiFi真机同步和WiFi真机预览使用说明
Datapipeline was selected into the 2022 digital intelligence atlas and database development report of China Academy of communications and communications
49. Grouping of alphabetic ectopic words: give you a string array, please combine the alphabetic ectopic words together. You can return a list of results in any order. An alphabetic ectopic word is a
Simple page request and parsing cases
C object storage
How to protect user privacy without password authentication?
Principle and configuration of RSTP protocol
真正的缓存之王,Google Guava 只是弟弟
"Baidu Cup" CTF competition in September, web:sql
记录一下在深度学习-一些bug处理
一网打尽异步神器CompletableFuture
Can and can FD