forked from star-history/star-history
-
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.
Merge pull request star-history#123 from bytebase/refactor/vue-code-s…
…tyle refactor: vue code style with setup
- Loading branch information
Showing
17 changed files
with
846 additions
and
1,031 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 |
---|---|---|
@@ -1,11 +1,3 @@ | ||
<template> | ||
<router-view /> | ||
</template> | ||
|
||
<script lang="ts"> | ||
import { defineComponent } from "vue"; | ||
export default defineComponent({ | ||
name: "App", | ||
}); | ||
</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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,33 +1,27 @@ | ||
<template> | ||
<div | ||
class="fixed w-full px-3 md:px-0 h-full flex flex-col justify-center items-center bg-black bg-opacity-60 z-50 top-0 left-0" | ||
:class="classname" | ||
:class="props.classname" | ||
> | ||
<slot></slot> | ||
</div> | ||
</template> | ||
|
||
<script lang="ts"> | ||
import { defineComponent, onMounted, onUnmounted } from "vue"; | ||
<script lang="ts" setup> | ||
import { onMounted, onUnmounted } from "vue"; | ||
export default defineComponent({ | ||
name: "Dialog", | ||
props: { | ||
classname: { | ||
type: String, | ||
default: "", | ||
}, | ||
const props = defineProps({ | ||
classname: { | ||
type: String, | ||
default: "", | ||
}, | ||
setup() { | ||
onMounted(() => { | ||
document.body.classList.add("overflow-hidden"); | ||
}); | ||
}); | ||
onUnmounted(() => { | ||
document.body.classList.remove("overflow-hidden"); | ||
}); | ||
onMounted(() => { | ||
document.body.classList.add("overflow-hidden"); | ||
}); | ||
return {}; | ||
}, | ||
onUnmounted(() => { | ||
document.body.classList.remove("overflow-hidden"); | ||
}); | ||
</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
Oops, something went wrong.