Profectus-Demo/src/components/features/MarkNode.vue

67 lines
1.2 KiB
Vue
Raw Normal View History

2021-06-12 04:38:16 +00:00
<template>
<div v-if="mark">
<div v-if="mark === true" class="mark star"></div>
<img v-else class="mark" :src="mark" />
</div>
</template>
<script>
export default {
name: 'mark-node',
props: {
mark: [ Boolean, String ]
}
};
</script>
<style scoped>
.mark {
position: absolute;
left: -25px;
top: -10px;
width: 30px;
height: 30px;
pointer-events: none;
margin-left: 0.9em;
margin-right: 0.9em;
margin-bottom: 1.2em;
border-right: 0.3em solid transparent;
border-bottom: 0.7em solid transparent;
border-left: 0.3em solid transparent;
font-size: 10px;
}
.star {
left: -10px;
width: 0;
height: 0;
z-index: 10000;
margin-left: 0.9em;
margin-right: 0.9em;
margin-bottom: 1.2em;
border-right: 0.3em solid transparent;
border-bottom: 0.7em solid #ffcc00;
border-left: 0.3em solid transparent;
font-size: 10px;
pointer-events: none;
}
.star::before,
.star::after {
content: "";
width: 0;
height: 0;
position: absolute;
top: .6em;
left: -1em;
border-right: 1em solid transparent;
border-bottom: 0.7em solid #ffcc00;
border-left: 1em solid transparent;
transform: rotate(-35deg);
}
.star::after {
transform: rotate(35deg);
}
</style>