Skip to content

Commit

Permalink
markRaw updates
Browse files Browse the repository at this point in the history
  • Loading branch information
tugcekucukoglu committed Oct 11, 2024
1 parent 848d033 commit a745ec7
Show file tree
Hide file tree
Showing 11 changed files with 80 additions and 72 deletions.
10 changes: 4 additions & 6 deletions apps/showcase/components/template/TemplateContainer.vue
Original file line number Diff line number Diff line change
Expand Up @@ -21,12 +21,10 @@ export default {
},
computed: {
components() {
return this.templateData.components.map((component) => {
return {
...component,
name: markRaw(component.name)
};
});
return this.templateData?.components?.map(({ name, ...rest }) => ({
...rest,
name
}));
}
}
};
Expand Down
2 changes: 1 addition & 1 deletion apps/showcase/components/template/TemplateHero.vue
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ export default {
props: {
templateHeroData: {
type: null,
templateHeroData: null
default: null
}
}
};
Expand Down
17 changes: 9 additions & 8 deletions apps/showcase/pages/templates/apollo/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -13,17 +13,18 @@ import TemplateFeaturesAnimation from '@/components/template/TemplateFeaturesAni
import TemplateHero from '@/components/template/TemplateHero.vue';
import TemplateLicense from '@/components/template/TemplateLicense.vue';
import ApolloLogo from '@/components/template/logo/ApolloLogo.vue';
import { markRaw } from 'vue';
export default {
data() {
return {
apolloData: {
components: [
{
name: TemplateHero,
name: markRaw(TemplateHero),
props: {
templateHeroData: {
logo: ApolloLogo,
logo: markRaw(ApolloLogo),
pattern: 'https://primefaces.org/cdn/primevue/images/templates/apollo/apollo-hero-pattern.png',
dashboard1: 'https://primefaces.org/cdn/primevue/images/templates/apollo/apollo-hero-dashboard1.png',
dashboard2: 'https://primefaces.org/cdn/primevue/images/templates/apollo/apollo-hero-dashboard2.png',
Expand All @@ -38,7 +39,7 @@ export default {
}
},
{
name: TemplateLicense,
name: markRaw(TemplateLicense),
props: {
license: {
documentLink: 'https://apollo.primevue.org/documentation/',
Expand All @@ -62,7 +63,7 @@ export default {
}
},
{
name: TemplateFeaturesAnimation,
name: markRaw(TemplateFeaturesAnimation),
props: {
title: 'Features',
featuresData: [
Expand Down Expand Up @@ -132,7 +133,7 @@ export default {
}
},
{
name: TemplateFeatures,
name: markRaw(TemplateFeatures),
props: {
featuresData: [
{
Expand All @@ -155,7 +156,7 @@ export default {
}
},
{
name: TemplateConfiguration,
name: markRaw(TemplateConfiguration),
props: {
configurationData: {
title: 'Vue based on Vite and Nuxt',
Expand All @@ -164,7 +165,7 @@ export default {
}
},
{
name: TemplateFeaturesAnimation,
name: markRaw(TemplateFeaturesAnimation),
props: {
featuresData: [
{
Expand Down Expand Up @@ -205,7 +206,7 @@ export default {
}
},
{
name: TemplateFeatures,
name: markRaw(TemplateFeatures),
props: {
featuresData: [
{
Expand Down
16 changes: 9 additions & 7 deletions apps/showcase/pages/templates/atlantis/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -13,16 +13,18 @@ import TemplateFeaturesAnimation from '@/components/template/TemplateFeaturesAni
import TemplateHero from '@/components/template/TemplateHero.vue';
import TemplateLicense from '@/components/template/TemplateLicense.vue';
import AtlantisLogo from '@/components/template/logo/AtlantisLogo.vue';
import { markRaw } from 'vue';
export default {
data() {
return {
atlantisData: {
components: [
{
name: TemplateHero,
name: markRaw(TemplateHero),
props: {
templateHeroData: {
logo: AtlantisLogo,
logo: markRaw(AtlantisLogo),
pattern: 'https://primefaces.org/cdn/primevue/images/templates/atlantis/atlantis-hero-pattern.png',
dashboard1: 'https://primefaces.org/cdn/primevue/images/templates/atlantis/atlantis-hero-dashboard1.png',
dashboard2: 'https://primefaces.org/cdn/primevue/images/templates/atlantis/atlantis-hero-dashboard2.png',
Expand All @@ -37,7 +39,7 @@ export default {
}
},
{
name: TemplateLicense,
name: markRaw(TemplateLicense),
props: {
license: {
documentLink: 'https://atlantis.primevue.org/documentation',
Expand All @@ -61,7 +63,7 @@ export default {
}
},
{
name: TemplateFeaturesAnimation,
name: markRaw(TemplateFeaturesAnimation),
props: {
title: 'Features',
featuresData: [
Expand Down Expand Up @@ -125,7 +127,7 @@ export default {
}
},
{
name: TemplateConfiguration,
name: markRaw(TemplateConfiguration),
props: {
configurationData: {
title: 'Vue based on Vite',
Expand All @@ -134,7 +136,7 @@ export default {
}
},
{
name: TemplateFeaturesAnimation,
name: markRaw(TemplateFeaturesAnimation),
props: {
featuresData: [
{
Expand Down Expand Up @@ -174,7 +176,7 @@ export default {
}
},
{
name: TemplateFeatures,
name: markRaw(TemplateFeatures),
props: {
featuresData: [
{
Expand Down
17 changes: 9 additions & 8 deletions apps/showcase/pages/templates/avalon/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -13,17 +13,18 @@ import TemplateFeaturesAnimation from '@/components/template/TemplateFeaturesAni
import TemplateHero from '@/components/template/TemplateHero.vue';
import TemplateLicense from '@/components/template/TemplateLicense.vue';
import AvalonLogo from '@/components/template/logo/AvalonLogo.vue';
import { markRaw } from 'vue';
export default {
data() {
return {
avalonData: {
components: [
{
name: TemplateHero,
name: markRaw(TemplateHero),
props: {
templateHeroData: {
logo: AvalonLogo,
logo: markRaw(AvalonLogo),
pattern: 'https://primefaces.org/cdn/primevue/images/templates/avalon/avalon-hero-pattern.png',
rectangle: false,
dashboard1: 'https://primefaces.org/cdn/primevue/images/templates/avalon/avalon-hero-dashboard1.png',
Expand All @@ -39,7 +40,7 @@ export default {
}
},
{
name: TemplateLicense,
name: markRaw(TemplateLicense),
props: {
license: {
documentLink: 'https://avalon.primevue.org/documentation',
Expand All @@ -63,7 +64,7 @@ export default {
}
},
{
name: TemplateFeaturesAnimation,
name: markRaw(TemplateFeaturesAnimation),
props: {
title: 'Features',
featuresData: [
Expand Down Expand Up @@ -133,7 +134,7 @@ export default {
}
},
{
name: TemplateConfiguration,
name: markRaw(TemplateConfiguration),
props: {
configurationData: {
title: 'Vue App with No Configuration',
Expand All @@ -142,7 +143,7 @@ export default {
}
},
{
name: TemplateFeatures,
name: markRaw(TemplateFeatures),
props: {
featuresData: [
{
Expand All @@ -165,7 +166,7 @@ export default {
}
},
{
name: TemplateFeaturesAnimation,
name: markRaw(TemplateFeaturesAnimation),
props: {
featuresData: [
{
Expand Down Expand Up @@ -205,7 +206,7 @@ export default {
}
},
{
name: TemplateFeatures,
name: markRaw(TemplateFeatures),
props: {
featuresData: [
{
Expand Down
15 changes: 8 additions & 7 deletions apps/showcase/pages/templates/diamond/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -13,17 +13,18 @@ import TemplateFeaturesAnimation from '@/components/template/TemplateFeaturesAni
import TemplateHero from '@/components/template/TemplateHero.vue';
import TemplateLicense from '@/components/template/TemplateLicense.vue';
import DiamondLogo from '@/components/template/logo/DiamondLogo.vue';
import { markRaw } from 'vue';
export default {
data() {
return {
diamondData: {
components: [
{
name: TemplateHero,
name: markRaw(TemplateHero),
props: {
templateHeroData: {
logo: DiamondLogo,
logo: markRaw(DiamondLogo),
pattern: 'https://primefaces.org/cdn/primevue/images/templates/diamond/diamond-hero-pattern.png',
dashboard1: 'https://primefaces.org/cdn/primevue/images/templates/diamond/diamond-remastered-hero-dashboard-1.png',
dashboard2: 'https://primefaces.org/cdn/primevue/images/templates/diamond/diamond-remastered-hero-dashboard-2.png',
Expand All @@ -38,7 +39,7 @@ export default {
}
},
{
name: TemplateLicense,
name: markRaw(TemplateLicense),
props: {
license: {
documentLink: 'https://diamond.primevue.org/documentation/',
Expand All @@ -62,7 +63,7 @@ export default {
}
},
{
name: TemplateFeaturesAnimation,
name: markRaw(TemplateFeaturesAnimation),
props: {
title: 'Features',
featuresData: [
Expand Down Expand Up @@ -132,7 +133,7 @@ export default {
}
},
{
name: TemplateConfiguration,
name: markRaw(TemplateConfiguration),
props: {
configurationData: {
title: 'Vue App with No Configuration',
Expand All @@ -141,7 +142,7 @@ export default {
}
},
{
name: TemplateFeaturesAnimation,
name: markRaw(TemplateFeaturesAnimation),
props: {
featuresData: [
{
Expand Down Expand Up @@ -181,7 +182,7 @@ export default {
}
},
{
name: TemplateFeatures,
name: markRaw(TemplateFeatures),
props: {
featuresData: [
{
Expand Down
15 changes: 8 additions & 7 deletions apps/showcase/pages/templates/freya/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -13,17 +13,18 @@ import TemplateFeaturesAnimation from '@/components/template/TemplateFeaturesAni
import TemplateHero from '@/components/template/TemplateHero.vue';
import TemplateLicense from '@/components/template/TemplateLicense.vue';
import FreyaLogo from '@/components/template/logo/FreyaLogo.vue';
import { markRaw } from 'vue';
export default {
data() {
return {
freyaData: {
components: [
{
name: TemplateHero,
name: markRaw(TemplateHero),
props: {
templateHeroData: {
logo: FreyaLogo,
logo: markRaw(FreyaLogo),
pattern: 'https://primefaces.org/cdn/primevue/images/templates/freya/freya-hero-pattern.png',
dashboard1: 'https://primefaces.org/cdn/primevue/images/templates/freya/freya-hero-dashboard1.png',
dashboard2: 'https://primefaces.org/cdn/primevue/images/templates/freya/freya-hero-dashboard2.png',
Expand All @@ -38,7 +39,7 @@ export default {
}
},
{
name: TemplateLicense,
name: markRaw(TemplateLicense),
props: {
license: {
documentLink: 'https://freya.primevue.org/documentation',
Expand All @@ -62,7 +63,7 @@ export default {
}
},
{
name: TemplateFeaturesAnimation,
name: markRaw(TemplateFeaturesAnimation),
props: {
title: 'Features',
featuresData: [
Expand Down Expand Up @@ -126,7 +127,7 @@ export default {
}
},
{
name: TemplateConfiguration,
name: markRaw(TemplateConfiguration),
props: {
configurationData: {
title: 'Vue based on Vite',
Expand All @@ -135,7 +136,7 @@ export default {
}
},
{
name: TemplateFeaturesAnimation,
name: markRaw(TemplateFeaturesAnimation),
props: {
featuresData: [
{
Expand Down Expand Up @@ -175,7 +176,7 @@ export default {
}
},
{
name: TemplateFeatures,
name: markRaw(TemplateFeatures),
props: {
featuresData: [
{
Expand Down
Loading

0 comments on commit a745ec7

Please sign in to comment.