[O] Separate color picker test
This commit is contained in:
@@ -25,6 +25,11 @@ const routes: Array<RouteRecordRaw> = [
|
|||||||
name: 'Blog',
|
name: 'Blog',
|
||||||
component: () => import('../views/Blog.vue')
|
component: () => import('../views/Blog.vue')
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
path: '/color',
|
||||||
|
name: 'ColorPicker',
|
||||||
|
component: () => import('../views/color/ColorPickerTest.vue')
|
||||||
|
},
|
||||||
{
|
{
|
||||||
path: '/projects',
|
path: '/projects',
|
||||||
name: 'Projects',
|
name: 'Projects',
|
||||||
|
|||||||
+2
-10
@@ -1,24 +1,16 @@
|
|||||||
<template>
|
<template>
|
||||||
<div id="Projects">
|
<div id="Projects">
|
||||||
<ColorPicker v-model:color="color"></ColorPicker>
|
|
||||||
<button @click="log"></button>
|
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script lang="ts">
|
<script lang="ts">
|
||||||
import {Options, Vue} from 'vue-class-component';
|
import {Options, Vue} from 'vue-class-component';
|
||||||
import MyColorPicker from "@/views/color/ColorPicker.vue";
|
|
||||||
import {Color} from "three";
|
|
||||||
|
|
||||||
@Options({components: {ColorPicker: MyColorPicker}})
|
@Options({components: {}})
|
||||||
export default class Projects extends Vue
|
export default class Projects extends Vue
|
||||||
{
|
{
|
||||||
color = new Color('#ffffff')
|
|
||||||
|
|
||||||
log(): void
|
|
||||||
{
|
|
||||||
console.log(this.color)
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
|||||||
@@ -0,0 +1,27 @@
|
|||||||
|
<template>
|
||||||
|
<div id="Projects">
|
||||||
|
<ColorPicker v-model:color="color"></ColorPicker>
|
||||||
|
<button @click="log"></button>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script lang="ts">
|
||||||
|
import {Options, Vue} from 'vue-class-component';
|
||||||
|
import MyColorPicker from "@/views/color/ColorPicker.vue";
|
||||||
|
import {Color} from "three";
|
||||||
|
|
||||||
|
@Options({components: {ColorPicker: MyColorPicker}})
|
||||||
|
export default class Projects extends Vue
|
||||||
|
{
|
||||||
|
color = new Color('#ffffff')
|
||||||
|
|
||||||
|
log(): void
|
||||||
|
{
|
||||||
|
console.log(this.color)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style lang="sass" scoped>
|
||||||
|
|
||||||
|
</style>
|
||||||
Reference in New Issue
Block a user