init
This commit is contained in:
10
src/App.vue
10
src/App.vue
@@ -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 |
15
src/main.ts
15
src/main.ts
@@ -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
17
src/router/index.ts
Normal 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
8
src/store/index.ts
Executable file
@@ -0,0 +1,8 @@
|
||||
import { createStore } from "vuex";
|
||||
|
||||
export default createStore({
|
||||
state: {},
|
||||
mutations: {},
|
||||
actions: {},
|
||||
modules: {},
|
||||
});
|
10
src/views/Home.vue
Normal file
10
src/views/Home.vue
Normal file
@@ -0,0 +1,10 @@
|
||||
<template>
|
||||
<div><el-button type="primary">ElementUI</el-button></div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {};
|
||||
</script>
|
||||
|
||||
<style>
|
||||
</style>
|
Reference in New Issue
Block a user