当前位置:网站首页>个人组件 - 消息提示
个人组件 - 消息提示
2022-07-05 13:13:00 【摆烂波比】
<script lang="ts" setup name="XtxMessage">
import {
PropType } from 'vue'
defineProps({
type: {
type: String as PropType<'success' | 'error' | 'warning'>,
default: 'success',
},
})
// 定义一个对象,包含三种情况的样式,对象key就是类型字符串
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>
边栏推荐
- 《2022年中国银行业RPA供应商实力矩阵分析》研究报告正式启动
- It's too convenient. You can complete the code release and approval by nailing it!
- 聊聊异步编程的 7 种实现方式
- Get you started with Apache pseudo static configuration
- 关于 Notion-Like 工具的反思和畅想
- Overflow toolbar control in SAP ui5 view
- The solution of outputting 64 bits from printf format%lld of cross platform (32bit and 64bit)
- SAP ui5 objectpagelayout control usage sharing
- 量价虽降,商业银行结构性存款为何受上市公司所偏爱?
- Yyds dry goods inventory # solve the real problem of famous enterprises: move the round table
猜你喜欢

Navigation property and entityset usage in SAP segw transaction code

Introduction aux contrôles de la page dynamique SAP ui5

阿里云SLB负载均衡产品基本概念与购买流程
![[notes of in-depth study paper]uctransnet: rethink the jumping connection in u-net from the perspective of transformer channel](/img/b6/f9da8a36167db10c9a92dabb166c81.png)
[notes of in-depth study paper]uctransnet: rethink the jumping connection in u-net from the perspective of transformer channel

Laravel document reading notes -mews/captcha use (verification code function)

UnicodeDecodeError: ‘utf-8‘ codec can‘t decode byte 0xe6 in position 76131: invalid continuation byt

LeetCode20.有效的括号

Talk about seven ways to realize asynchronous programming

SAP UI5 DynamicPage 控件介绍

Concurrent performance test of SAP Spartacus with JMeter
随机推荐
MATLAB论文图表标准格式输出(干货)
There is no monitoring and no operation and maintenance. The following is the commonly used script monitoring in monitoring
SAP SEGW 事物码里的导航属性(Navigation Property) 和 EntitySet 使用方法
APICloud Studio3 API管理与调试使用教程
OpenHarmony应用开发之Navigation组件详解
LB10S-ASEMI整流桥LB10S
从外卖点单浅谈伪需求
SAP ui5 objectpagelayout control usage sharing
Hiengine: comparable to the local cloud native memory database engine
百日完成国产数据库opengausss的开源任务--openGuass极简版3.0.0安装教程
关于 Notion-Like 工具的反思和畅想
Rocky基础知识1
国际自动机工程师学会(SAE International)战略投资几何伙伴
逆波兰表达式
Word document injection (tracking word documents) incomplete
解决 UnicodeDecodeError: ‘gbk‘ codec can‘t decode byte 0xa2 in position 107
mysql econnreset_ Nodejs socket error handling error: read econnreset
Talk about seven ways to realize asynchronous programming
"Baidu Cup" CTF competition in September, web:sql
mysql econnreset_Nodejs 套接字报错处理 Error: read ECONNRESET