debian-mirror-gitlab/app/assets/javascripts/notebook/cells/prompt.vue
2018-12-13 13:39:08 +05:30

37 lines
530 B
Vue

<script>
export default {
props: {
type: {
type: String,
required: false,
default: '',
},
count: {
type: Number,
required: false,
default: 0,
},
},
computed: {
hasKeys() {
return this.type !== '' && this.count;
},
},
};
</script>
<template>
<div class="prompt">
<span v-if="hasKeys">
{{ type }} [{{ count }}]:
</span>
</div>
</template>
<style scoped>
.prompt {
padding: 0 10px;
min-width: 7em;
font-family: monospace;
}
</style>