Added test page for stuff
This commit is contained in:
@@ -8,6 +8,11 @@ export default createRouter({
|
||||
name: 'Home',
|
||||
component: () => import('./views/home.vue'),
|
||||
},
|
||||
{
|
||||
path: '/test',
|
||||
name: 'test',
|
||||
component: () => import('./views/test.vue')
|
||||
},
|
||||
{
|
||||
path: '/profile/:name',
|
||||
name: 'profile',
|
||||
|
||||
60
17th Website/src/views/test.vue
Normal file
60
17th Website/src/views/test.vue
Normal file
@@ -0,0 +1,60 @@
|
||||
<template>
|
||||
<div class="my-5 flex flex-row items-center justify-between">
|
||||
<Dropdown :values="items" :currentIndex="currentIndex" display="name"
|
||||
@changeSelection="(index) => currentIndex = index" class="w-52">
|
||||
</Dropdown>
|
||||
<p>The current value is {{ items[currentIndex] }}</p>
|
||||
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import Dropdown from '../components/dropdown/Dropdown.vue';
|
||||
import { ref } from 'vue';
|
||||
|
||||
const items = [
|
||||
{
|
||||
"id": 1,
|
||||
"name": "John",
|
||||
"age": 27,
|
||||
"email": "john@example.com",
|
||||
"city": "New York"
|
||||
},
|
||||
{
|
||||
"id": 2,
|
||||
"name": "Emily",
|
||||
"age": 32,
|
||||
"email": "emily@example.com",
|
||||
"city": "London"
|
||||
},
|
||||
{
|
||||
"id": 3,
|
||||
"name": "Michael",
|
||||
"age": 45,
|
||||
"email": "michael@example.com",
|
||||
"city": "Los Angeles"
|
||||
},
|
||||
{
|
||||
"id": 4,
|
||||
"name": "Sarah",
|
||||
"age": 29,
|
||||
"email": "sarah@example.com",
|
||||
"city": "Paris"
|
||||
},
|
||||
{
|
||||
"id": 5,
|
||||
"name": "David",
|
||||
"age": 52,
|
||||
"email": "david@example.com",
|
||||
"city": "Tokyo"
|
||||
}
|
||||
];
|
||||
|
||||
// const items = ref([
|
||||
// "abby",
|
||||
// "john",
|
||||
// "jacob",
|
||||
// "johnny appleseed"
|
||||
// ])
|
||||
var currentIndex = ref(0);
|
||||
</script>
|
||||
Reference in New Issue
Block a user