primevue-mirror/doc/card/AdvancedDoc.vue

108 lines
4.2 KiB
Vue
Raw Normal View History

2023-02-28 08:29:30 +00:00
<template>
<DocSectionText v-bind="$attrs">
<p>Card provides <i>header</i>, <i>title</i>, <i>subtitle</i>, <i>content</i> and <i>footer</i> as the named templates to place content.</p>
</DocSectionText>
<div class="card flex align-items-center justify-content-center">
<Card style="width: 25em">
<template #header>
2023-05-30 08:30:17 +00:00
<img alt="user header" class="w-full" src="https://primefaces.org/cdn/primevue/images/usercard.png" />
2023-02-28 08:29:30 +00:00
</template>
<template #title> Advanced Card </template>
<template #subtitle> Card subtitle </template>
<template #content>
<p>
Lorem ipsum dolor sit amet, consectetur adipisicing elit. Inventore sed consequuntur error repudiandae numquam deserunt quisquam repellat libero asperiores earum nam nobis, culpa ratione quam perferendis esse, cupiditate neque
quas!
</p>
</template>
<template #footer>
<Button icon="pi pi-check" label="Save" />
2023-03-03 12:15:20 +00:00
<Button icon="pi pi-times" label="Cancel" severity="secondary" style="margin-left: 0.5em" />
2023-02-28 08:29:30 +00:00
</template>
</Card>
</div>
<DocSectionCode :code="code" />
</template>
<script>
export default {
data() {
return {
code: {
2023-09-22 12:54:14 +00:00
basic: `
<Card style="width: 25em">
2023-02-28 08:29:30 +00:00
<template #header>
<img alt="user header" src="/images/usercard.png" />
</template>
<template #title> Advanced Card </template>
<template #subtitle> Card subtitle </template>
<template #content>
<p>
Lorem ipsum dolor sit amet, consectetur adipisicing elit. Inventore sed consequuntur error repudiandae numquam deserunt quisquam repellat libero asperiores earum nam nobis, culpa ratione quam perferendis esse, cupiditate neque
quas!
</p>
</template>
<template #footer>
<Button icon="pi pi-check" label="Save" />
2023-03-03 12:15:20 +00:00
<Button icon="pi pi-times" label="Cancel" severity="secondary" style="margin-left: 0.5em" />
2023-02-28 08:29:30 +00:00
</template>
2023-10-15 09:38:39 +00:00
</Card>
`,
2023-09-22 12:54:14 +00:00
options: `
<template>
2023-02-28 08:29:30 +00:00
<div class="card flex align-items-center justify-content-center">
<Card style="width: 25em">
<template #header>
2023-03-20 08:09:34 +00:00
<img alt="user header" src="https://primefaces.org/cdn/primevue/images/usercard.png" />
2023-02-28 08:29:30 +00:00
</template>
<template #title> Advanced Card </template>
<template #subtitle> Card subtitle </template>
<template #content>
<p>
Lorem ipsum dolor sit amet, consectetur adipisicing elit. Inventore sed consequuntur error repudiandae numquam deserunt quisquam repellat libero asperiores earum nam nobis, culpa ratione quam perferendis esse, cupiditate neque
quas!
</p>
</template>
<template #footer>
<Button icon="pi pi-check" label="Save" />
2023-03-03 12:15:20 +00:00
<Button icon="pi pi-times" label="Cancel" severity="secondary" style="margin-left: 0.5em" />
2023-02-28 08:29:30 +00:00
</template>
</Card>
</div>
</template>
<script>
2023-10-15 09:38:39 +00:00
<\/script>
`,
2023-09-22 12:54:14 +00:00
composition: `
<template>
2023-02-28 08:29:30 +00:00
<div class="card flex align-items-center justify-content-center">
<Card style="width: 25em">
<template #header>
2023-03-20 08:09:34 +00:00
<img alt="user header" src="https://primefaces.org/cdn/primevue/images/usercard.png" />
2023-02-28 08:29:30 +00:00
</template>
<template #title> Advanced Card </template>
<template #subtitle> Card subtitle </template>
<template #content>
<p>
Lorem ipsum dolor sit amet, consectetur adipisicing elit. Inventore sed consequuntur error repudiandae numquam deserunt quisquam repellat libero asperiores earum nam nobis, culpa ratione quam perferendis esse, cupiditate neque
quas!
</p>
</template>
<template #footer>
<Button icon="pi pi-check" label="Save" />
2023-03-03 12:15:20 +00:00
<Button icon="pi pi-times" label="Cancel" severity="secondary" style="margin-left: 0.5em" />
2023-02-28 08:29:30 +00:00
</template>
</Card>
</div>
</template>
<script setup>
2023-10-15 09:38:39 +00:00
<\/script>
`
2023-02-28 08:29:30 +00:00
}
};
}
};
</script>