daikins/.svn/pristine/61/618239fd9e738e6540c01a0815b...

49 lines
1.3 KiB
Plaintext

<script setup lang="ts">
const props = defineProps({
message: String,
cate:String
})
const slots = useSlots()
// const attrs = useAttrs()
// console.log("--------------------"+props.cate)
const tty = props.cate
</script>
<template>
<div class="wrapper" v-if="tty === '1'">
<component :is="slots.default" v-if="slots.default" />
<span class="flex-1 text-ellipsis" v-else>{{ props.message }}</span>
</div>
<div class="wrapper2" v-else>
<component :is="slots.default" v-if="slots.default" />
<span class="flex-1 text-ellipsis" v-else>{{ props.message }}</span>
</div>
</template>
<style scoped lang="less">
.wrapper {
display: flex;
align-items: center;
padding:0 5px 0 21px;
font-size: 18px;
color: #fff;
font-weight: 600;
cursor: pointer;
border-radius: 10px;
// bg-gradient-to-r from-#466ccd/40 to-#5c87f5/70
background-image: linear-gradient(to bottom, rgba(70, 108, 205, 0.4), rgba(92, 135, 245, 0.7));
}
.wrapper2 {
display: flex;
align-items: center;
padding:12px 21px;
font-size: 18px;
color: #fff;
font-weight: 600;
cursor: pointer;
border-radius: 10px;
// bg-gradient-to-r from-#466ccd/40 to-#5c87f5/70
background-image: linear-gradient(to bottom, rgba(70, 108, 205, 0.4), rgba(92, 135, 245, 0.7));
}
</style>