TipsBox.vue 777 Bytes
<template>
	<div class="tips-box-container">
		<i class="el-icon-warning"></i>
		<div class="tips-content">
			<div v-for="(tip, index) in tips" :key="index" class="tip-item">
				<span class="tip-text">{{ tip }}</span>
			</div>
		</div>
	</div>
</template>

<script>
export default {
	name: "TipsBox",
	props: {
		tips: {
			type: Array,
			default: () => [],
		},
	},
};
</script>

<style lang="scss" scoped>
.tips-box-container {
	background: #fff3e8;
	padding: 8px 20px;
	display: flex;
	align-items: flex-start; /* 顶部对齐 */
	.el-icon-warning {
		color: #ff8d1a;
		margin: 2px 6px 0 0;
	}
	.tips-content {
		.tip-item {
			margin: 0;
			font-size: 13px;
			color: #ff8d1a;

			.tip-text {
				flex: 1; /* 让文字部分占据剩余空间 */
			}
		}
	}
}
</style>