123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960 |
- <template>
- <view>
- <view class="level-tips-wrap" @click="onClickNotice">
- <image class="icon" src="https://ld.726p.com/ldyx_static/imgs/icon-notice.png" />
- <text class="tips">{{text}}</text>
- <slot><u-icon class="iconClose" :name="name" color="#F10B00" size="24" @click.stop="closeEvent"></u-icon></slot>
- </view>
- </view>
- </template>
- <script>
- export default {
- props:{
- text:{
- type:String,
- default:''
- },
- name:{
- type:String,
- default:'close'
- }
- },
- data(){
- return{
- }
- },
- methods: {
- // 点击整个notice
- onClickNotice(){
- this.$emit('clickNotice')
- },
- //关闭提示
- closeEvent(){
- this.$emit('close')
- }
- },
- }
- </script>
- <style lang="scss" scoped>
- .level-tips-wrap {
- display: flex;
- align-items: center;
- background-color: #fff;
- margin: 10rpx 0;
- padding: 20rpx;
- .icon {
- width: 34rpx;
- height: 28rpx;
- }
- .tips {
- margin-left: 10rpx;
- font-size: 26rpx;
- color: #F10B00;
- }
- .iconClose{
- margin-left: auto;
- }
- }
- </style>
|