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

38 lines
530 B
Vue
Raw Normal View History

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">
<span v-if="hasKeys">
{{ type }} [{{ count }}]:
</span>
</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>