Skip to content

Instantly share code, notes, and snippets.

View senorpatricio's full-sized avatar

Patrick Harding senorpatricio

  • Arizona
  • 02:33 (UTC -07:00)
View GitHub Profile
@mdlincoln
mdlincoln / Nested.vue
Created October 5, 2019 14:08
Recursive nested list Vue component
<template>
<span>
<ol v-if="Array.isArray(value)">
<li v-for="(item, index) in value" :key="index">
<Nested :value="item" />
</li>
</ol>
<ul v-else-if="typeof value == 'object' && !!value">
<li v-for="(val, name) in value" :key="name">
{{ name }}: