element-plus/docs/.vitepress/vitepress/components/globals/vp-api-enum.vue
Jeremy dd65c73870
docs(components): [affix] (#10345)
docs(components): [affix]

* Add lost exposed API to documentation.
* Refine code.
* Add descriptions for APIs.
* Refine implementation for `FunctionType` and `EnumType`.
* Update affix documentation based on the changes above.

Co-authored-by: JeremyWuuuuu <15975785+JeremyWuuuuu@users.noreply.github.com>
2022-11-01 21:52:16 +08:00

21 lines
452 B
Vue

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