-
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.
test: add Sort components to Vue 3 migration test (#1454)
- Loading branch information
Showing
14 changed files
with
111 additions
and
7 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
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 +1,2 @@ | ||
export * from './components'; | ||
export * from './x-modules'; |
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 |
---|---|---|
@@ -0,0 +1 @@ | ||
export * from './search'; |
3 changes: 3 additions & 0 deletions
3
packages/_vue3-migration-test/src/x-modules/search/components/index.ts
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,3 @@ | ||
export { default as TestSortDropdown } from './test-sort-dropdown.vue'; | ||
export { default as TestSortList } from './test-sort-list.vue'; | ||
export { default as TestSortPickerList } from './test-sort-picker-list.vue'; |
17 changes: 17 additions & 0 deletions
17
packages/_vue3-migration-test/src/x-modules/search/components/test-sort-dropdown.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,17 @@ | ||
<template> | ||
<SortDropdown :items="sortValues"> | ||
<template #toggle="{ item, isOpen }">{{ item }} {{ isOpen ? '🔼' : '🔽' }}</template> | ||
<template #item="{ item, isHighlighted, isSelected }"> | ||
<span v-if="isSelected">✅</span> | ||
<span v-if="isHighlighted">🟢</span> | ||
{{ item }} | ||
</template> | ||
</SortDropdown> | ||
</template> | ||
|
||
<script setup lang="ts"> | ||
// eslint-disable-next-line max-len | ||
import SortDropdown from '../../../../../x-components/src/x-modules/search/components/sort-dropdown.vue'; | ||
const sortValues = ['Relevance', 'Price asc', 'Price desc']; | ||
</script> |
14 changes: 14 additions & 0 deletions
14
packages/_vue3-migration-test/src/x-modules/search/components/test-sort-list.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,14 @@ | ||
<template> | ||
<SortList :items="sortValues"> | ||
<template #default="{ item, isSelected }"> | ||
<span v-if="isSelected">✅</span> | ||
{{ item }} | ||
</template> | ||
</SortList> | ||
</template> | ||
|
||
<script setup lang="ts"> | ||
import SortList from '../../../../../x-components/src/x-modules/search/components/sort-list.vue'; | ||
const sortValues = ['Relevance', 'Price asc', 'Price desc']; | ||
</script> |
15 changes: 15 additions & 0 deletions
15
packages/_vue3-migration-test/src/x-modules/search/components/test-sort-picker-list.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,15 @@ | ||
<template> | ||
<SortPickerList :items="sortValues"> | ||
<template #default="{ item, isSelected }"> | ||
<span v-if="isSelected">✅</span> | ||
{{ item }} | ||
</template> | ||
</SortPickerList> | ||
</template> | ||
|
||
<script setup lang="ts"> | ||
// eslint-disable-next-line max-len | ||
import SortPickerList from '../../../../../x-components/src/x-modules/search/components/sort-picker-list.vue'; | ||
const sortValues = ['Relevance', 'Price asc', 'Price desc']; | ||
</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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
export * from './components'; |
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
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.