-
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
19 changed files
with
183 additions
and
170 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,11 @@ | ||
<script setup lang="ts"> | ||
</script> | ||
|
||
<template> | ||
|
||
<RouterView /> | ||
</template> | ||
|
||
<script setup lang="ts"> | ||
</script> | ||
|
||
<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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,14 @@ | ||
<script setup lang='ts' name="oneComponent"> | ||
</script> | ||
|
||
<template> | ||
<div style="font-size: 24px;color:aqua;"> | ||
one | ||
</div> | ||
</template> | ||
|
||
<script setup lang='ts' name="oneComponent"> | ||
</script> | ||
|
||
<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
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,12 +1,13 @@ | ||
<script setup lang='ts' name="twoComponent"> | ||
</script> | ||
|
||
<template> | ||
<div style="font-size: 24px; color: blue;"> | ||
two | ||
</div> | ||
</template> | ||
|
||
<script setup lang='ts' name="twoComponent"> | ||
</script> | ||
|
||
|
||
<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,19 @@ | ||
import type {App, Directive} from 'vue' | ||
import myText from "./modules/text"; | ||
import height from "./modules/height"; | ||
|
||
|
||
const directiveList: {[key:string] : Directive} = { | ||
myText, | ||
height | ||
} | ||
|
||
const directives = { | ||
install(app:App<Element>) { | ||
Object.keys(directiveList).forEach((key) => { | ||
app.directive(key, directiveList[key]) | ||
}) | ||
} | ||
} | ||
|
||
export default directives; |
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,15 @@ | ||
import type { Directive,DirectiveBinding } from 'vue' | ||
|
||
const height:Directive = { | ||
mounted(el:HTMLElement, binding:DirectiveBinding, vnode, preVnode) { | ||
console.log('123'); | ||
console.log(binding, 'binding11111111'); | ||
|
||
el.style.height = binding.value + 'px' | ||
el.style.width = binding.value + 'px' | ||
el.innerText = binding.value + 'px' | ||
el.style.border = 'dashed red' | ||
} | ||
} | ||
|
||
export default height; |
Oops, something went wrong.