多维表格
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.
 
 
 
 
 
 

40 lines
1004 B

<script setup lang="ts">
import { ReadonlyInj } from '~/context'
import MdiCloseThickIcon from '~icons/mdi/close-thick'
interface Props {
value?: string | number | boolean
active?: boolean
item?: any
}
const { value, active, item } = defineProps<Props>()
const readonly = inject(ReadonlyInj, false)
</script>
<template>
<v-chip class="chip" :class="{ active }" small text-color="textColor">
<!--
:color="isDark ? '' : 'primary lighten-5'"
@click="!readonly && active && $emit('edit', item)" -->
<span class="name" :title="value">{{ value }}</span>
<!-- && _isUIAllowed('xcDatatableEditable') -->
<div v-show="active" v-if="!readonly" class="mr-n1 ml-2">
<MdiCloseThickIcon class="unlink-icon">
<!-- @click.stop="$emit('unlink', item)" -->
</MdiCloseThickIcon>
</div>
</v-chip>
</template>
<style scoped lang="scss">
.chip {
max-width: max(100%, 60px);
.name {
text-overflow: ellipsis;
overflow: hidden;
}
}
</style>