Skip to content

Commit

Permalink
feat(result-images): migrate result images components to composition API
Browse files Browse the repository at this point in the history
  • Loading branch information
victorcg88 committed May 30, 2024
1 parent 89850fa commit 9edf0b3
Show file tree
Hide file tree
Showing 5 changed files with 31 additions and 13 deletions.
1 change: 1 addition & 0 deletions packages/_vue3-migration-test/src/components/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,4 @@ export { default as TestSlidingPanel } from './test-sliding-panel.vue';
export { default as TestUseLayouts } from './test-use-layouts.vue';
export { default as TestBaseSuggestions } from './suggestions/test-base-suggestions.vue';
export { default as TestHighlight } from './test-highlight.vue';
export { default as TestBaseResultImages } from './result/test-base-result-images.vue';
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
<template>
<h1>BasePlaceholderImage</h1>
<BasePlaceholderImage class="staticClass" :class="{ class: true }" />
<h1>BaseFallbackImage</h1>
<BaseFallbackImage class="staticClass" :class="{ class: true }" />
</template>

<script setup lang="ts">
import BasePlaceholderImage from '../../../../x-components/src/components/result/base-result-placeholder-image.vue';
import BaseFallbackImage from '../../../../x-components/src/components/result/base-result-fallback-image.vue';
</script>

<style scoped>
.staticClass {
height: 300px;
width: 300px;
}
.class {
border: 1px solid green;
}
</style>
8 changes: 7 additions & 1 deletion packages/_vue3-migration-test/src/router.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,8 @@ import {
TestUseLayouts,
TestSlidingPanel,
TestBaseSuggestions,
TestHighlight
TestHighlight,
TestBaseResultImages
} from './';

const routes = [
Expand Down Expand Up @@ -146,6 +147,11 @@ const routes = [
path: '/highlight',
name: 'Highlight',
component: TestHighlight
},
{
path: '/base-result-images',
name: 'BaseResultImages',
component: TestBaseResultImages
}
];

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
<template functional>
<template>
<svg
:class="[].concat(data.staticClass, data.class)"
version="1.1"
viewBox="0 0 256 371"
xmlns="http://www.w3.org/2000/svg"
Expand Down Expand Up @@ -34,7 +33,3 @@
></path>
</svg>
</template>

<script lang="ts">
export default {};
</script>
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
<template functional>
<template>
<svg
:class="[].concat(data.staticClass, data.class)"
version="1.1"
viewBox="0 0 256 371"
xmlns="http://www.w3.org/2000/svg"
Expand Down Expand Up @@ -47,7 +46,3 @@
></path>
</svg>
</template>

<script lang="ts">
export default {};
</script>

0 comments on commit 9edf0b3

Please sign in to comment.