mirror of https://github.com/nocodb/nocodb
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
32 lines
634 B
32 lines
634 B
2 years ago
|
<script setup lang="ts">
|
||
|
import type { ColumnType } from 'nocodb-sdk'
|
||
|
import { inject } from 'vue'
|
||
|
import { enumColor } from '~/composables/colors'
|
||
|
|
||
|
const colors = enumColor.light
|
||
|
|
||
|
const value = inject('value')
|
||
|
const column = inject<ColumnType>('column')
|
||
|
</script>
|
||
|
|
||
|
<template>
|
||
|
<div>
|
||
|
<span
|
||
|
v-for="v in [(value || '').replace(/\\'/g, '\'').replace(/^'|'$/g, '')]"
|
||
|
:key="v"
|
||
|
:style="{
|
||
|
background: colors[v],
|
||
|
}"
|
||
|
class="set-item ma-1 py-1 px-3"
|
||
|
>{{ v }}</span>
|
||
|
</div>
|
||
|
</template>
|
||
|
|
||
|
<style scoped>
|
||
|
.set-item {
|
||
|
display: inline-block;
|
||
|
border-radius: 25px;
|
||
|
white-space: nowrap;
|
||
|
}
|
||
|
</style>
|