Kv
When To Use
When you need to use objects or json key-value pairs to display, this component can display them well
Examples
key1:
key2:
key3:
Including two display modes, json display and list display
<template>
<h-kv :value="outputValue" />
</template>
<script setup lang="ts">
import { ref } from 'vue';
const outputValue = ref({
key1: 'He3',
key2: 'Development',
key3: 'Tool'
});
</script>
API
Props
Property | Description | Type | default |
---|---|---|---|
value | object to be displayed | Object | |
width | list item width | number | |
mode | display mode | enum | list |
disableModeSwitch | Whether to disable mode switching | boolean |