Skip to content
On this page

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

PropertyDescriptionTypedefault
valueobject to be displayedObject
widthlist item widthnumber
modedisplay modeenumlist
disableModeSwitchWhether to disable mode switchingboolean