2017-08-17 22:00:37 +05:30
|
|
|
<script>
|
2018-12-13 13:39:08 +05:30
|
|
|
export default {
|
|
|
|
props: {
|
|
|
|
type: {
|
|
|
|
type: String,
|
|
|
|
required: false,
|
|
|
|
default: '',
|
2018-03-17 18:26:18 +05:30
|
|
|
},
|
2018-12-13 13:39:08 +05:30
|
|
|
count: {
|
|
|
|
type: Number,
|
|
|
|
required: false,
|
|
|
|
default: 0,
|
2017-08-17 22:00:37 +05:30
|
|
|
},
|
2018-12-13 13:39:08 +05:30
|
|
|
},
|
|
|
|
computed: {
|
|
|
|
hasKeys() {
|
|
|
|
return this.type !== '' && this.count;
|
|
|
|
},
|
|
|
|
},
|
|
|
|
};
|
2017-08-17 22:00:37 +05:30
|
|
|
</script>
|
|
|
|
|
2018-03-17 18:26:18 +05:30
|
|
|
<template>
|
|
|
|
<div class="prompt">
|
2019-02-15 15:39:39 +05:30
|
|
|
<span v-if="hasKeys"> {{ type }} [{{ count }}]: </span>
|
2018-03-17 18:26:18 +05:30
|
|
|
</div>
|
|
|
|
</template>
|
|
|
|
|
2017-08-17 22:00:37 +05:30
|
|
|
<style scoped>
|
2018-12-13 13:39:08 +05:30
|
|
|
.prompt {
|
|
|
|
padding: 0 10px;
|
|
|
|
min-width: 7em;
|
|
|
|
font-family: monospace;
|
|
|
|
}
|
2017-08-17 22:00:37 +05:30
|
|
|
</style>
|