ui库和web端产品库合并版本(还需修复细节)
This commit is contained in:
30
ui/packages/basic/AiBadge.vue
Normal file
30
ui/packages/basic/AiBadge.vue
Normal file
@@ -0,0 +1,30 @@
|
||||
<template>
|
||||
<section class="AiBadge">
|
||||
<slot></slot>
|
||||
<sup v-if="isShow" class="badge">
|
||||
<span v-if="badge">{{badge}}</span>
|
||||
<slot v-else name="badge"></slot>
|
||||
</sup>
|
||||
</section>
|
||||
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
name: "AiBadge",
|
||||
props: {
|
||||
badge: String,
|
||||
isShow: {type: Boolean, default: true}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.AiBadge {
|
||||
.badge {
|
||||
position: absolute;
|
||||
margin-left: -10px;
|
||||
margin-top: -10px;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
Reference in New Issue
Block a user