blob: 12c0acdf010684f708338a2c8df9d6eb1e25708c (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
|
<template>
<span
class="code"
:title="source && `(${source.code}) ${source.description}`"
@click.stop="onSelect({ target: $event.target, codeIndex: index, code: value, param })"
>
<template v-if="source">
<span v-if="source.faIcon" class="['fa', `fa-${source.faIcon}" />
<template v-else>{{source.symbol || source.code}}</template>
</template>
<template v-else>⦸</template>
</span>
</template>
<script>
export default {
name: 'key-value',
props: ['param', 'index', 'value', 'source', 'onSelect']
}
</script>
<style>
.code {
cursor: pointer;
display: inline-block;
box-sizing: content-box;
min-width: 0.5em;
text-align: center;
border-radius: 4px;
}
.code.highlight {
background-color: white !important;
color: var(--dark-red) !important;
}
</style>
|