YNUtdPlatform/pages/workPlan/index/components/home-notice-bar.vue

64 lines
1.3 KiB
Vue
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<template>
<view class="notice-container">
<!-- <uni-notice-bar :showClose="showClose" :showIcon="showIcon" scrollable :text="noticeContent" /> -->
<image class="warning-img" src="../../../../static/images/img-phase-two/index_news.png" mode=""></image>
<text>今日风险</text>
<view class="uni-notice-bar">
<uni-notice-bar
style="height: 100%"
:speed="30"
scrollable
:text="noticeContent"
:showClose="showClose"
:showIcon="showIcon"
></uni-notice-bar>
</view>
</view>
</template>
<script>
export default {
props: {
/* 提示内容 */
noticeContent: {
type: String,
default: '中风险35 低风险153 可接收风险153 高风险126'
},
/* 是否显示关闭按钮 */
showClose: {
type: Boolean,
default: false
},
/* 是否显示提示图标 */
showIcon: {
type: Boolean,
default: false
}
}
}
</script>
<style lang="scss" scoped>
.notice-container {
height: 56rpx;
margin: 20rpx 0;
display: flex;
align-items: center;
box-shadow: 6rpx -8rpx 0 8rpx #f0f4f7;
.warning-img {
width: 48rpx;
height: 48rpx;
}
.uni-notice-bar {
flex: 1;
height: 56rpx;
}
text {
margin: 0 10rpx;
}
}
</style>