abtract label line component

This commit is contained in:
jiaming
2018-12-20 18:25:49 +08:00
parent 4ea8a84ba4
commit f8c2ada869
7 changed files with 444 additions and 31 deletions

View File

@ -7,14 +7,7 @@
<canvas :ref="ref" />
</div>
<div class="label-line">
<div class="label-item"
v-for="(label, i) in data.labelLine"
:key="label">
<div :style="`background-color: ${drawColors[i % drawColors.length]};`"></div>
<div>{{ label }}</div>
</div>
</div>
<label-line :label="data.labelLine" :colors="drawColors" />
</div>
</template>
@ -539,27 +532,5 @@ export default {
width: 100%;
height: 100%;
}
.label-line {
display: flex;
flex-direction: row;
flex-wrap: wrap;
justify-content: center;
font-size: 10px;
.label-item {
height: 20px;
display: flex;
flex-direction: row;
align-items: center;
margin: 0px 5px 5px 5px;
:nth-child(1) {
width: 10px;
height: 10px;
margin-right: 5px;
}
}
}
}
</style>