mirror of
https://gitee.com/element-plus/element-plus.git
synced 2024-12-15 09:50:58 +08:00
dd65c73870
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>
21 lines
452 B
Vue
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>
|