mirror of
https://github.com/element-plus/element-plus.git
synced 2024-11-21 01:02:59 +08:00
update
This commit is contained in:
parent
70995def26
commit
1e981eadc9
5
package-lock.json
generated
5
package-lock.json
generated
@ -2498,6 +2498,11 @@
|
||||
"@vue/shared": "3.0.0-rc.2"
|
||||
}
|
||||
},
|
||||
"vue-router": {
|
||||
"version": "4.0.0-beta.2",
|
||||
"resolved": "https://registry.npmjs.org/vue-router/-/vue-router-4.0.0-beta.2.tgz",
|
||||
"integrity": "sha512-+TvUCpxEhgSCssMTXdX4qei/YZN1kEt4nZoOySPLLUlAeEIlY3K1ps3hyCOeC1qYGCuSwaWuDmK/yi2d7W0sSg=="
|
||||
},
|
||||
"wcwidth": {
|
||||
"version": "1.0.1",
|
||||
"resolved": "https://registry.npmjs.org/wcwidth/-/wcwidth-1.0.1.tgz",
|
||||
|
@ -6,7 +6,8 @@
|
||||
"build": "vite build"
|
||||
},
|
||||
"dependencies": {
|
||||
"vue": "^3.0.0-rc.1"
|
||||
"vue": "^3.0.0-rc.1",
|
||||
"vue-router": "^4.0.0-beta.2"
|
||||
},
|
||||
"devDependencies": {
|
||||
"vite": "^1.0.0-rc.1",
|
||||
|
@ -1,5 +1,11 @@
|
||||
<template>
|
||||
<el-button>Button</el-button>
|
||||
<div id="app">
|
||||
<router-view />
|
||||
<div id="nav">
|
||||
<router-link to="/">Home</router-link> |
|
||||
<router-link to="/button">Button</router-link>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
|
9
src/components/button/doc/index.vue
Normal file
9
src/components/button/doc/index.vue
Normal file
@ -0,0 +1,9 @@
|
||||
<template>
|
||||
<el-button>button text</el-button>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
|
||||
}
|
||||
</script>
|
@ -1,8 +1,10 @@
|
||||
import { createApp } from 'vue'
|
||||
import { installAll } from './component.js'
|
||||
import { installAll } from './component.ts'
|
||||
import router from "./router.ts";
|
||||
import './style/element-ui@2.13.2.css'
|
||||
import App from './App.vue'
|
||||
|
||||
const app = createApp(App)
|
||||
installAll(app)
|
||||
app.use(router)
|
||||
app.mount('#app')
|
||||
|
16
src/router.ts
Normal file
16
src/router.ts
Normal file
@ -0,0 +1,16 @@
|
||||
import { RouteRecordRaw, createRouter, createWebHistory } from "vue-router";
|
||||
import Button from "./components/button/doc/index.vue";
|
||||
|
||||
const routes: Array<RouteRecordRaw> = [
|
||||
{
|
||||
path: "/button",
|
||||
component: Button
|
||||
}
|
||||
];
|
||||
|
||||
const router = createRouter({
|
||||
history: createWebHistory(process.env.BASE_URL),
|
||||
routes
|
||||
});
|
||||
|
||||
export default router;
|
Loading…
Reference in New Issue
Block a user