This commit is contained in:
2025-03-28 15:34:00 +08:00
parent c689574b2c
commit 156209f020
13 changed files with 339 additions and 8 deletions

View File

@@ -0,0 +1,60 @@
<script setup>
import {ref, onMounted} from "vue";
import warn from '../static/icons/warn.png';
const XNoticeBox = ref();
const Context = ref();
const roll = ref(false);
onMounted(() => {
if (
Context.value.$el.clientWidth
>
XNoticeBox.value.$el.clientWidth
) {
roll.value = true;
}
});
</script>
<template>
<view ref="XNoticeBox" class="x-notice-box">
<view ref="Context" :class="['context', roll ? 'roll' : '']">
<image class="!size-[26rpx] flex-shrink-0" :src="warn"></image>
<text class="!whitespace-nowrap flex-shrink-0">提示请在规定时间内按要求提交回填1以免影响收益哈哈哈哈哈哈哈哈哈哈</text>
</view>
</view>
</template>
<style scoped lang="scss">
.x-notice-box {
padding: 18rpx 24rpx;
background-color: #FFF7E8;
}
.context {
color: rgb(255, 87, 34);
font-size: 24rpx;
font-weight: 400;
line-height: 22px;
letter-spacing: 0;
text-align: left;
white-space: nowrap;
display: inline-flex;
align-items: center;
gap: 18rpx;
}
.roll {
animation: 10s Roll linear infinite forwards;
}
@keyframes Roll {
0% {
transform: translateX(100%);
}
100% {
transform: translateX(-100%);
}
}
</style>