-
Notifications
You must be signed in to change notification settings - Fork 0
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
Showing
34 changed files
with
85 additions
and
703 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
// ./src/app/{path}/shared | ||
export const RootDirs: string[] = ['dashboard', 'examples/full', 'examples/minimal'].map( | ||
export const RootDirs: string[] = ['examples/full', 'examples/minimal'].map( | ||
(dir) => `./src/app/${dir}/shared` | ||
) |
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 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
<script setup lang="ts"> | ||
import Add from '@vicons/fluent/Add12Filled' | ||
import Minus from '@vicons/fluent/Subtract12Filled' | ||
import { useExampleStore } from '../stores/example' | ||
const exampleStore = useExampleStore() | ||
</script> | ||
|
||
<template> | ||
<div | ||
class="w-full h-screen flex flex-col items-center justify-center gap-10 bg-slate-100 select-none" | ||
> | ||
<slot /> | ||
<div class="max-w-4xl flex items-center justify-around bg-white rounded-md shadow-md p-4"> | ||
<ElButton @click="exampleStore.increase()" size="large" type="success" class="w-44 shadow-md"> | ||
<NIcon size="20"> <Add /> </NIcon> | ||
<span>Add</span> | ||
</ElButton> | ||
<div class="min-w-[170px] px-8 text-7xl font-bold text-slate-400 text-center"> | ||
{{ exampleStore.counter_square }} | ||
</div> | ||
<ElButton @click="exampleStore.decrease()" size="large" type="danger" class="w-44 shadow-md"> | ||
<NIcon size="20"> <Minus /> </NIcon> | ||
<span>Minus</span> | ||
</ElButton> | ||
</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 |
---|---|---|
@@ -1,3 +1,17 @@ | ||
<script setup lang="ts"> | ||
import Counter from './components/counter.vue' | ||
import { useExampleStore } from './stores/example' | ||
const exampleStore = useExampleStore() | ||
</script> | ||
|
||
<template> | ||
<div>Example template</div> | ||
</template> | ||
<Counter> | ||
<div class="text-center flex flex-col gap-2 text-slate-500"> | ||
<span class="text-6xl font-bold">Counter Example</span> | ||
<span class="text-lg font-semibold italic" | ||
>Number converting to scuare real number is {{ exampleStore.count }}</span | ||
> | ||
</div> | ||
</Counter> | ||
</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,20 @@ | ||
export const useExampleStore = defineStore('example', { | ||
state() { | ||
return {} | ||
return { | ||
count: 0 | ||
} | ||
}, | ||
getters: {}, | ||
actions: {} | ||
getters: { | ||
counter_square(state) { | ||
return state.count * state.count | ||
} | ||
}, | ||
actions: { | ||
increase(num: number = 1) { | ||
return (this.count += num) | ||
}, | ||
decrease(num: number = 1) { | ||
return (this.count -= num) | ||
} | ||
} | ||
}) |
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,9 +1,9 @@ | ||
import { DashboardRouter } from '@/app/dashboard' | ||
import { RouteName } from '@/app/examples/minimal/router' | ||
import { createRouter, createWebHistory } from 'vue-router' | ||
|
||
const router = createRouter({ | ||
history: createWebHistory(import.meta.env.BASE_URL), | ||
routes: [...DashboardRouter] | ||
routes: [...RouteName] | ||
}) | ||
|
||
export default router |
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.
Oops, something went wrong.