- 移除 AppHeader 组件 - 调整页面主体的样式和布局refactor(components): 优化 XMessage 组件样式 - 调整样式属性顺序 - 优化模板结构 refactor(pages):重构首页布局 - 添加新的 LiveBroadcast 组件 - 实现拍品列表的瀑布流布局 - 优化拍品卡片样式 refactor(config): 更新项目配置 - 移除 pages:extend钩子 - 更新兼容性日期
57 lines
1.1 KiB
Vue
57 lines
1.1 KiB
Vue
<script setup>
|
|
import error from '../images/error.png'
|
|
import success from '../images/success.png'
|
|
import warning from '../images/warning.png'
|
|
|
|
const props = defineProps({
|
|
type: {
|
|
type: String,
|
|
default: 'success',
|
|
validator: value => ['success', 'error', 'warning'].includes(value),
|
|
},
|
|
text: {
|
|
type: String,
|
|
default: '',
|
|
},
|
|
})
|
|
|
|
const typeConfig = {
|
|
success: {
|
|
imgSrc: success,
|
|
borderColor: '#C5E7D5',
|
|
bgColor: '#EDF7F2',
|
|
},
|
|
error: {
|
|
imgSrc: error,
|
|
borderColor: '#F3CBD3',
|
|
bgColor: '#FBEEF1',
|
|
},
|
|
warning: {
|
|
imgSrc: warning,
|
|
borderColor: '#FAE0B5',
|
|
bgColor: '#FEF7ED',
|
|
},
|
|
}
|
|
</script>
|
|
|
|
<template>
|
|
<div
|
|
class="box-border min-h-[46px] w-[343px] flex items-center border rounded-[4px] px-[15px] shadow-sm"
|
|
:style="{
|
|
borderColor: typeConfig[type].borderColor,
|
|
backgroundColor: typeConfig[type].bgColor,
|
|
}"
|
|
>
|
|
<div class="mr-[9px] h-[20px] w-[20px]">
|
|
<img
|
|
:src="typeConfig[type].imgSrc"
|
|
class="h-full w-full"
|
|
alt=""
|
|
>
|
|
</div>
|
|
<div class="text-[14px] text-black leading-normal">
|
|
{{ text }}
|
|
</div>
|
|
</div>
|
|
</template>
|