debian-mirror-gitlab/app/assets/javascripts/jobs/components/log/line.vue

41 lines
701 B
Vue
Raw Normal View History

2019-12-04 20:38:33 +05:30
<script>
import LineNumber from './line_number.vue';
export default {
2020-07-28 23:09:34 +05:30
functional: true,
2019-12-04 20:38:33 +05:30
props: {
line: {
type: Object,
required: true,
},
path: {
type: String,
required: true,
},
},
2020-07-28 23:09:34 +05:30
render(h, { props }) {
const { line, path } = props;
const chars = line.content.map(content => {
return h(
'span',
{
2020-11-24 15:15:51 +05:30
class: ['gl-white-space-pre-wrap', content.style],
2020-07-28 23:09:34 +05:30
},
content.text,
);
});
return h('div', { class: 'js-line log-line' }, [
h(LineNumber, {
props: {
lineNumber: line.lineNumber,
path,
},
}),
...chars,
]);
},
2019-12-04 20:38:33 +05:30
};
</script>