-
-
Notifications
You must be signed in to change notification settings - Fork 123
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
6246779
commit 2f8594d
Showing
67 changed files
with
564 additions
and
1,141 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
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,13 @@ | ||
<!doctype html> | ||
<html lang="en"> | ||
<head> | ||
<meta charset="UTF-8" /> | ||
<link rel="icon" type="image/svg+xml" href="/vite.svg" /> | ||
<meta name="viewport" content="width=device-width, initial-scale=1.0" /> | ||
<title>Vue DevTools Basic Playground</title> | ||
</head> | ||
<body> | ||
<div id="app"></div> | ||
<script type="module" src="/src/main.ts"></script> | ||
</body> | ||
</html> |
13 changes: 3 additions & 10 deletions
13
packages/playground/package.json → packages/playground/basic/package.json
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
File renamed without changes
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,25 @@ | ||
<script setup lang="ts"> | ||
</script> | ||
|
||
<template> | ||
<div class="flex flex-col justify-center"> | ||
<div class="text-center"> | ||
<RouterView /> | ||
</div> | ||
<div class="text-center"> | ||
Router Navgation: | ||
<RouterLink to="/"> | ||
<span> | ||
/ | ||
</span> | ||
</RouterLink> | ||
| | ||
<RouterLink to="/hello"> | ||
<span> | ||
/hello | ||
</span> | ||
</RouterLink> | ||
</div> | ||
</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 |
---|---|---|
|
@@ -4,6 +4,6 @@ | |
|
||
<template> | ||
<div> | ||
Foo | ||
Foo Component | ||
</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 |
---|---|---|
@@ -0,0 +1,44 @@ | ||
import { createPinia } from 'pinia' | ||
import type { RouteRecordRaw } from 'vue-router' | ||
import { createRouter, createWebHistory } from 'vue-router' | ||
|
||
import App from './App.vue' | ||
|
||
import Home from './pages/Home.vue' | ||
import Hey from './pages/Hey.vue' | ||
import './style.css' | ||
import 'uno.css' | ||
|
||
const pinia = createPinia() | ||
|
||
const app = createApp(App) | ||
|
||
const routes: RouteRecordRaw[] = [ | ||
{ | ||
path: '/', | ||
component: Home, | ||
name: 'home', | ||
alias: '/index', | ||
}, | ||
{ | ||
path: '/hello', | ||
// component: Hello, | ||
component: () => import('./pages/Hello.vue'), | ||
name: 'hello', | ||
}, | ||
{ | ||
path: '/hey/:id', | ||
component: Hey, | ||
name: 'hey', | ||
}, | ||
] | ||
|
||
const router = createRouter({ | ||
history: createWebHistory(), | ||
routes, | ||
}) | ||
|
||
app.use(router) | ||
app.use(pinia) | ||
|
||
app.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,23 @@ | ||
<script setup lang="ts"> | ||
import { useAppStore } from '../stores' | ||
const app = useAppStore() | ||
</script> | ||
|
||
<template> | ||
<div class="m-auto mt-3 h-80 w-120 flex flex-col items-center justify-center rounded bg-[#363636]"> | ||
Hello {{ app.count }} | ||
<button class="w-30 cursor-pointer" @click="app.increment()"> | ||
Increment count | ||
</button> | ||
</div> | ||
</template> | ||
|
||
<style lang="scss" scoped> | ||
.container { | ||
width: 250px; | ||
height: 150px; | ||
background: #363636; | ||
border-radius: 4px; | ||
} | ||
</style> |
2 changes: 0 additions & 2 deletions
2
packages/playground/src/pages/Hey.vue → packages/playground/basic/src/pages/Hey.vue
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,6 +1,4 @@ | ||
<script setup lang="ts"> | ||
import { useRoute } from 'vue-router' | ||
const route = useRoute() | ||
</script> | ||
|
||
|
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,19 @@ | ||
<script setup lang="ts"> | ||
import Foo from '../components/Foo.vue' | ||
const visible = ref(false) | ||
</script> | ||
|
||
<template> | ||
<div class="m-auto mt-3 h-80 w-120 flex flex-col items-center justify-center rounded bg-[#363636]"> | ||
Home | ||
<Foo v-if="visible" /> | ||
<button class="w-30 cursor-pointer" @click="visible = !visible"> | ||
Toggle Foo | ||
</button> | ||
</div> | ||
</template> | ||
|
||
<style lang="scss" scoped> | ||
</style> |
File renamed without changes.
File renamed without changes.
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,20 @@ | ||
import { | ||
defineConfig, | ||
presetAttributify, | ||
presetTypography, | ||
presetUno, | ||
transformerDirectives, | ||
transformerVariantGroup, | ||
} from 'unocss' | ||
|
||
export default defineConfig({ | ||
presets: [ | ||
presetUno(), | ||
presetAttributify(), | ||
presetTypography(), | ||
], | ||
transformers: [ | ||
transformerDirectives(), | ||
transformerVariantGroup(), | ||
], | ||
}) |
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,25 @@ | ||
import { defineConfig } from 'vite' | ||
import vue from '@vitejs/plugin-vue' | ||
|
||
import VueDevtools from 'vite-plugin-vue-devtools' | ||
import Unocss from 'unocss/vite' | ||
import AutoImport from 'unplugin-auto-import/vite' | ||
|
||
// https://vitejs.dev/config/ | ||
export default defineConfig({ | ||
plugins: [ | ||
vue(), | ||
VueDevtools(), | ||
Unocss(), | ||
AutoImport({ | ||
imports: [ | ||
'vue', | ||
'vue-router', | ||
'@vueuse/core', | ||
], | ||
}), | ||
], | ||
server: { | ||
port: 3000, | ||
}, | ||
}) |
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 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
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,24 @@ | ||
{ | ||
"name": "playground-basic", | ||
"type": "module", | ||
"private": true, | ||
"scripts": { | ||
"dev": "vite" | ||
}, | ||
"dependencies": { | ||
"@vueuse/core": "^10.7.2", | ||
"pinia": "^2.1.7", | ||
"unplugin-auto-import": "^0.17.5", | ||
"vue": "^3.4.15", | ||
"vue-router": "^4.2.5" | ||
}, | ||
"devDependencies": { | ||
"@vitejs/plugin-vue": "^5.0.3", | ||
"sass": "^1.70.0", | ||
"serve": "^14.2.1", | ||
"typescript": "^5.3.3", | ||
"vite": "^5.0.12", | ||
"vite-plugin-inspect": "^0.8.3", | ||
"vite-plugin-vue-devtools": "workspace:*" | ||
} | ||
} |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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,13 @@ | ||
<script setup lang="ts"> | ||
const count = ref(0) | ||
</script> | ||
|
||
<template> | ||
<div class="m-auto mt-3 h-30 w-60 flex flex-col items-center justify-center rounded bg-[#363636]"> | ||
App | ||
<div>Count: {{ count }}</div> | ||
<button @click="count++"> | ||
++ | ||
</button> | ||
</div> | ||
</template> |
Oops, something went wrong.