lesson 124: add a resource list
This commit is contained in:
parent
b6ccce3aff
commit
f3533827a2
|
@ -0,0 +1,40 @@
|
||||||
|
<template>
|
||||||
|
<ul>
|
||||||
|
<li v-for="resource in storedResources" :key="resource.id">
|
||||||
|
{{ resource.title }}
|
||||||
|
<ul>
|
||||||
|
<li>
|
||||||
|
{{ resource.description }}
|
||||||
|
</li>
|
||||||
|
<li>
|
||||||
|
<a :href="resource.link">{{ resource.link }}</a>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
export default {
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
storedResources: [
|
||||||
|
{
|
||||||
|
id: 'official-guide',
|
||||||
|
title: 'Oficial Guide',
|
||||||
|
description: 'The official documentation for Vue.js.',
|
||||||
|
link: 'https://vuejs.org'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
id: 'duckduckgo',
|
||||||
|
title: 'Duckduckgo',
|
||||||
|
description: 'A search engine that values privacy.',
|
||||||
|
link: 'https://duckduckgo.com'
|
||||||
|
}
|
||||||
|
]
|
||||||
|
};
|
||||||
|
}
|
||||||
|
};
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style></style>
|
|
@ -1,3 +1,7 @@
|
||||||
import { createApp } from 'vue';
|
import { createApp } from 'vue';
|
||||||
|
|
||||||
createApp({}).mount('#app');
|
import App from './App.vue';
|
||||||
|
|
||||||
|
const app = createApp(App);
|
||||||
|
|
||||||
|
app.mount('#app');
|
||||||
|
|
Reference in New Issue