-
Notifications
You must be signed in to change notification settings - Fork 21
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(highlight): migrate highlight component to composition API
- Loading branch information
1 parent
1bffd7c
commit 0c19082
Showing
4 changed files
with
154 additions
and
95 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
33 changes: 33 additions & 0 deletions
33
packages/_vue3-migration-test/src/components/test-highlight.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 |
---|---|---|
@@ -0,0 +1,33 @@ | ||
<template> | ||
<Highlight | ||
:text="'Almendra garrapiñada'" | ||
:highlight="'men'" | ||
match-class="match-class" | ||
no-match-class="no-match-class" | ||
matching-part-class="matching-part-class" | ||
/> | ||
<br /> | ||
<Highlight | ||
:text="'Almendra garrapiñada'" | ||
:highlight="'tar'" | ||
match-class="match-class" | ||
no-match-class="no-match-class" | ||
matching-part-class="matching-part-class" | ||
/> | ||
</template> | ||
|
||
<script setup lang="ts"> | ||
import Highlight from '../../../x-components/src/components/highlight.vue'; | ||
</script> | ||
|
||
<style> | ||
.match-class { | ||
color: red; | ||
} | ||
.matching-part-class { | ||
color: greenyellow; | ||
} | ||
.no-match-class { | ||
color: blue; | ||
} | ||
</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