-
Notifications
You must be signed in to change notification settings - Fork 10
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
11 changed files
with
100 additions
and
3 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -58,7 +58,6 @@ | |
onMounted(() => { | ||
useInput().prevent(input.value) | ||
console.log('oieee') | ||
}) | ||
const cmp = computed({ | ||
|
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,37 @@ | ||
import { computed } from 'vue'; | ||
<template> | ||
<p | ||
class="w-full p-1 break-all pointer-events-none" | ||
:class="[ | ||
log.method === 'log' ? 'logger-log' : '', | ||
log.method === 'warn' ? 'logger-warn' : '', | ||
log.method === 'error' ? 'logger-error' : '', | ||
log.method === 'info' ? 'logger-info' : '', | ||
]" | ||
> | ||
{{ render }} | ||
</p> | ||
</template> | ||
|
||
<script setup lang="ts"> | ||
import { computed, watchEffect } from 'vue' | ||
import { useScroll } from '@/use/scroll' | ||
const props = defineProps({ | ||
log: { | ||
required: true, | ||
type: Object, | ||
}, | ||
}) | ||
watchEffect(() => { | ||
useScroll().force('#logger-absolute') | ||
}) | ||
const render = computed(() => | ||
'[ ' + props.log.method.toUpperCase() + ' ]: ' + props.log.arguments !== | ||
typeof String | ||
? props.log.arguments[0] | ||
: props.log.arguments + ' | ' + props.log.createdAt | ||
) | ||
</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
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,31 @@ | ||
<template> | ||
<div | ||
id="logger-absolute" | ||
class=" | ||
absolute | ||
top-1/4 | ||
right-1/4 | ||
transform | ||
duration-700 | ||
w-96 | ||
bg-white | ||
dark:bg-gray-700 | ||
transition | ||
flex flex-col | ||
z-max | ||
h-80 | ||
overflow-auto | ||
" | ||
> | ||
<LoggerItem v-for="(log, index) in logger" :hey="index" :log="log" /> | ||
</div> | ||
</template> | ||
|
||
<script setup lang="ts"> | ||
import { useStore } from 'vuex' | ||
import { computed } from 'vue' | ||
const store = useStore() | ||
const logger = computed(() => store.state.logger.content) | ||
</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
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
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