Nuxt server API

How it works

world
vue
<template>
  <c-input
    state-src="api://hello"
    state-path="hello"
  />
  <c-label
    state-src="api://hello"
    state-path="hello"
  />
</template>

<script setup>

</script> 

List

  • abc
  • def
vue
<template>
  <ul>
    <c-list-item
      v-slot="{ item }"
      state-src="api://sample/list"
    >
      <span> {{ item }}</span>
    </c-list-item>
  </ul>
</template>

<script setup>

</script> 
  • あいうえお
  • かきくけこ
vue
<template>
  <ul>
    <c-list-item
      v-slot="{ item }"
      state-src="api://sample/list"
    >
      <c-data
        v-slot="{ data }"
        :state-src="`api://sample/${item}`"
      >
        <span>{{ data }}</span>
      </c-data>
    </c-list-item>
  </ul>
</template>

<script setup>

</script> 

Bind

vue
<template>
  <c-input state-src="api-bind://memory/demo-key" />
  <c-label state-src="api-bind://memory/demo-key" />
</template>

<script setup>

</script>