debian-mirror-gitlab/app/assets/javascripts/notebook/cells/prompt.vue

38 lines
578 B
Vue
Raw Normal View History

2017-08-17 22:00:37 +05:30
<script>
export default {
props: {
type: {
type: String,
required: false,
2018-03-17 18:26:18 +05:30
default: '',
2017-08-17 22:00:37 +05:30
},
count: {
type: Number,
required: false,
2018-03-17 18:26:18 +05:30
default: 0,
},
},
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">
<span v-if="hasKeys">
{{ type }} [{{ count }}]:
</span>
</div>
</template>
2017-08-17 22:00:37 +05:30
<style scoped>
2018-03-17 18:26:18 +05:30
.prompt {
padding: 0 10px;
min-width: 7em;
font-family: monospace;
}
2017-08-17 22:00:37 +05:30
</style>