2020-09-14 22:57:11 +08:00
|
|
|
<template>
|
2020-09-15 16:07:57 +08:00
|
|
|
<div class="app">
|
|
|
|
<ul class="navbar">
|
|
|
|
<li v-for="t in tests" :key="t" @click="test=t">{{ t }}</li>
|
|
|
|
</ul>
|
|
|
|
<component :is="test" />
|
|
|
|
</div>
|
2020-09-14 22:57:11 +08:00
|
|
|
</template>
|
|
|
|
|
|
|
|
<script>
|
2020-09-19 18:42:06 +08:00
|
|
|
import Demo1 from './components/demos/Demo1.vue';
|
|
|
|
import Demo2 from './components/demos/Demo2.vue';
|
|
|
|
import Demo3 from './components/demos/Demo3.vue';
|
2020-10-01 00:10:17 +08:00
|
|
|
import Demo4 from './components/demos/Demo4.vue';
|
2020-09-29 03:03:35 +08:00
|
|
|
import Slider1 from './components/demos/Slider1.vue';
|
2020-10-08 05:52:53 +08:00
|
|
|
import Slider2 from './components/demos/Slider2.vue';
|
2020-10-15 04:14:13 +08:00
|
|
|
import Textures from './components/demos/Textures.vue';
|
2020-09-14 22:57:11 +08:00
|
|
|
|
|
|
|
export default {
|
|
|
|
name: 'App',
|
|
|
|
components: {
|
2020-10-15 04:14:13 +08:00
|
|
|
Demo1, Demo2, Demo3, Demo4, Slider1, Slider2, Textures,
|
2020-09-15 16:07:57 +08:00
|
|
|
},
|
|
|
|
data() {
|
|
|
|
return {
|
2020-10-15 04:14:13 +08:00
|
|
|
tests: ['Demo1', 'Demo2', 'Demo3', 'Demo4', 'Textures', 'Slider1', 'Slider2'],
|
2020-09-19 18:42:06 +08:00
|
|
|
test: 'Demo1',
|
2020-09-15 16:07:57 +08:00
|
|
|
};
|
2020-09-14 22:57:11 +08:00
|
|
|
},
|
|
|
|
};
|
|
|
|
</script>
|
2020-09-15 16:07:57 +08:00
|
|
|
|
|
|
|
<style lang="scss">
|
|
|
|
.app {
|
|
|
|
.navbar {
|
|
|
|
position: fixed;
|
|
|
|
margin: 0;
|
|
|
|
padding: 0;
|
|
|
|
width: 100%;
|
|
|
|
color: #fff;
|
|
|
|
text-align: center;
|
|
|
|
font-size: 14px;
|
|
|
|
|
|
|
|
li {
|
|
|
|
display: inline-block;
|
|
|
|
margin: 1em;
|
2020-09-16 21:50:31 +08:00
|
|
|
padding: 5px;
|
|
|
|
background: rgba(255, 255, 255, 0.5);
|
|
|
|
color: #000;
|
|
|
|
border-radius: 5px;;
|
2020-09-15 16:07:57 +08:00
|
|
|
cursor: pointer;
|
2020-09-16 21:50:31 +08:00
|
|
|
transition: background-color 0.4s;
|
|
|
|
&:hover {
|
|
|
|
background: rgba(255, 255, 255, 1);
|
|
|
|
}
|
2020-09-15 16:07:57 +08:00
|
|
|
}
|
|
|
|
}
|
2020-09-16 21:50:31 +08:00
|
|
|
|
|
|
|
canvas {
|
|
|
|
display: block;
|
|
|
|
}
|
2020-09-15 16:07:57 +08:00
|
|
|
}
|
|
|
|
</style>
|