This commit is contained in:
2022-04-27 14:02:52 +08:00
parent eac55b28c8
commit 81decc9a63
10 changed files with 1722 additions and 292 deletions

View File

@@ -1,12 +1,10 @@
<script setup lang="ts">
// This starter template is using Vue 3 <script setup> SFCs
// Check out https://vuejs.org/api/sfc-script-setup.html#script-setup
import HelloWorld from './components/HelloWorld.vue'
<script lang="ts">
import { defineComponent } from "vue";
export default defineComponent({});
</script>
<template>
<img alt="Vue logo" src="./assets/logo.png" />
<HelloWorld msg="Hello Vue 3 + TypeScript + Vite" />
<router-view></router-view>
</template>
<style>

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.7 KiB

View File

@@ -1,4 +1,13 @@
import { createApp } from 'vue'
import App from './App.vue'
import { createApp } from "vue";
import App from "./App.vue";
import ElementPlus from "element-plus";
import "element-plus/dist/index.css";
import "normalize.css";
import Router from "./router/index";
import Store from "./store";
createApp(App).mount('#app')
let app = createApp(App);
app.use(ElementPlus);
app.use(Router);
app.use(Store);
app.mount("#app");

17
src/router/index.ts Normal file
View File

@@ -0,0 +1,17 @@
import { createRouter, createWebHistory } from "vue-router";
import Home from "../views/Home.vue";
const routes = [
{
path: "/",
name: "Home",
component: Home,
},
];
// createRouter
const router = createRouter({
history: createWebHistory(),
routes,
});
export default router;

8
src/store/index.ts Executable file
View File

@@ -0,0 +1,8 @@
import { createStore } from "vuex";
export default createStore({
state: {},
mutations: {},
actions: {},
modules: {},
});

10
src/views/Home.vue Normal file
View File

@@ -0,0 +1,10 @@
<template>
<div><el-button type="primary">ElementUI</el-button></div>
</template>
<script>
export default {};
</script>
<style>
</style>