2022-11-01 20:31:39 +08:00
|
|
|
<script setup lang="ts">
|
|
|
|
import { computed } from 'vue'
|
2022-11-01 21:52:16 +08:00
|
|
|
import { isString } from '@vue/shared'
|
2022-11-01 20:31:39 +08:00
|
|
|
import ApiTyping from './vp-api-typing.vue'
|
|
|
|
|
|
|
|
const props = defineProps({
|
|
|
|
values: {
|
|
|
|
type: Array,
|
|
|
|
required: true,
|
|
|
|
},
|
|
|
|
})
|
|
|
|
|
2022-11-01 21:52:16 +08:00
|
|
|
const processString = (s: unknown) => (isString(s) ? `'${s}'` : s)
|
|
|
|
|
|
|
|
const details = computed(() => props.values.map(processString).join(' | '))
|
2022-11-01 20:31:39 +08:00
|
|
|
</script>
|
|
|
|
|
|
|
|
<template>
|
|
|
|
<api-typing type="enum" :details="details" />
|
|
|
|
</template>
|