generated from sonofmagic/monorepo-template
-
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
92e7a42
commit dfac7f7
Showing
16 changed files
with
115 additions
and
62 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,6 +5,7 @@ | |
<template> | ||
<div> | ||
bar | ||
<input type="range"> | ||
</div> | ||
</template> | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,6 +5,7 @@ | |
<template> | ||
<div> | ||
foo | ||
<input type="range"> | ||
</div> | ||
</template> | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,6 +5,7 @@ | |
<template> | ||
<div> | ||
index | ||
<input type="range"> | ||
</div> | ||
</template> | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,29 @@ | ||
<script setup lang="ts"> | ||
</script> | ||
|
||
<template> | ||
<transition> | ||
<keep-alive> | ||
<RouterView /> | ||
</keep-alive> | ||
</transition> | ||
<div> | ||
<h1>Vue2</h1> | ||
<div> | ||
<transition> | ||
<keep-alive> | ||
<router-view /> | ||
</keep-alive> | ||
</transition> | ||
</div> | ||
<div class="border-t"> | ||
<RouterLink to="/"> | ||
Index | ||
</RouterLink> | ||
<RouterLink to="/foo"> | ||
Foo | ||
</RouterLink> | ||
<RouterLink to="/bar"> | ||
Bar | ||
</RouterLink> | ||
</div> | ||
</div> | ||
</template> | ||
|
||
<style scoped></style> |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,25 @@ | ||
import Vue from 'vue' | ||
import './style.css' | ||
import { PiniaVuePlugin, createPinia } from 'pinia' | ||
import VueRouter from 'vue-router' | ||
import App from './App.vue' | ||
import router from './router' | ||
import { routes } from './router' | ||
|
||
Vue.use(PiniaVuePlugin) | ||
Vue.config.productionTip = false | ||
|
||
const pinia = createPinia() | ||
/* eslint-disable no-new */ | ||
new Vue({ | ||
el: '#app', | ||
router, | ||
render: h => h(App), | ||
pinia, | ||
}) | ||
|
||
if (window.__POWERED_BY_WUJIE__) { | ||
let instance | ||
window.__WUJIE_MOUNT = () => { | ||
const router = new VueRouter({ routes }) | ||
instance = new Vue({ router, render: h => h(App), pinia }).$mount('#app') | ||
} | ||
window.__WUJIE_UNMOUNT = () => { | ||
instance.$destroy() | ||
} | ||
} | ||
else { | ||
new Vue({ router: new VueRouter({ routes }), render: h => h(App), pinia }).$mount('#app') | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
<script setup lang="ts"> | ||
</script> | ||
|
||
<template> | ||
<div> | ||
bar | ||
<input type="range"> | ||
</div> | ||
</template> | ||
|
||
<style scoped> | ||
</style> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
<script setup lang="ts"> | ||
</script> | ||
|
||
<template> | ||
<div> | ||
foo | ||
<input type="range"> | ||
</div> | ||
</template> | ||
|
||
<style scoped> | ||
</style> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
<script setup lang="ts"> | ||
</script> | ||
|
||
<template> | ||
<div> | ||
index | ||
<input type="range"> | ||
</div> | ||
</template> | ||
|
||
<style scoped></style> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,18 +1,15 @@ | ||
import Vue from 'vue' | ||
import type { RouteConfig } from 'vue-router' | ||
import VueRouter from 'vue-router' | ||
import HelloWorld from './components/HelloWorld.vue' | ||
|
||
Vue.use(VueRouter) | ||
import Index from './pages/index.vue' | ||
import Bar from './pages/bar.vue' | ||
import Foo from './pages/foo.vue' | ||
|
||
export const routes: RouteConfig[] = [ | ||
{ path: '/', component: HelloWorld, props: { msg: 'Home' } }, | ||
{ path: '/bar', component: HelloWorld, props: { msg: 'Bar' } }, | ||
{ path: '/', component: Index }, | ||
{ path: '/foo', component: Foo }, | ||
{ path: '/Bar', component: Bar }, | ||
] | ||
|
||
const router = new VueRouter({ | ||
mode: 'history', | ||
routes, | ||
}) | ||
|
||
export default router | ||
Vue.use(VueRouter) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,11 @@ | ||
@tailwind base; | ||
@tailwind components; | ||
@tailwind utilities; | ||
@tailwind utilities; | ||
|
||
a { | ||
@apply block text-slate-400 border-current font-semibold underline; | ||
|
||
&.router-link-exact-active { | ||
@apply text-sky-500; | ||
} | ||
} |