Commit 2814847a by 杨子

优化代码

parent d72527e0
...@@ -21,19 +21,7 @@ ...@@ -21,19 +21,7 @@
/> />
</template> </template>
<!-- <g-gantt-row
label="My row 1"
:bars="bars1"
highlight-on-hover
/> -->
</g-gantt-chart> </g-gantt-chart>
<!-- 选择开始日期: <input type="text" v-model="dateValueStart">
选择结束日期: <input type="text" v-model="dateValueEnd"> -->
<!-- 分钟间隔: <input type="text" v-model="minuteValue" />
<button @click="confirm()">确定</button> -->
</template> </template>
<script setup lang="ts"> <script setup lang="ts">
...@@ -137,5 +125,4 @@ const confirm = (type: number) => { ...@@ -137,5 +125,4 @@ const confirm = (type: number) => {
minuteInterval.value = minuteValue.value; minuteInterval.value = minuteValue.value;
} }
}; };
</script> </script>
import { createRouter, createWebHistory, RouteRecordRaw } from 'vue-router' import { createRouter, createWebHistory, RouteRecordRaw } from 'vue-router'
import HomeView from '../views/HomeView.vue' import Gantt from '../views/Gantt.vue'
const routes: Array<RouteRecordRaw> = [ const routes: Array<RouteRecordRaw> = [
{ {
path: '/', path: '/',
name: 'home', name: 'gantt',
component: HomeView component: Gantt
}, },
{ {
path: '/about', path: '/about',
......
<template> <template>
<div class="home"> <div class="home">
<h1>{{taskName}}</h1> <h1>{{taskName}}</h1>
<HelloWorld @updateTaskName="updateTaskName"/> <GanttView @updateTaskName="updateTaskName"/>
</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 HelloWorld from '@/components/HelloWorld.vue' // @ is an alias to /src import GanttView from '@/components/GanttView.vue' // @ is an alias to /src
@Options({ @Options({
components: { components: {
HelloWorld GanttView
}, },
data(){ data(){
return { return {
...@@ -24,5 +24,5 @@ import HelloWorld from '@/components/HelloWorld.vue' // @ is an alias to /src ...@@ -24,5 +24,5 @@ import HelloWorld from '@/components/HelloWorld.vue' // @ is an alias to /src
} }
} }
}) })
export default class HomeView extends Vue {} export default class Gantt extends Vue {}
</script> </script>
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment