primevue-mirror/doc/installation/UsageDoc.vue

47 lines
1.0 KiB
Vue
Raw Normal View History

2023-02-28 08:29:30 +00:00
<template>
<DocSectionText v-bind="$attrs">
<p>Each component can be imported individually so that you only bundle what you use. Import path is available in the documentation of the corresponding component.</p>
</DocSectionText>
<div class="card flex justify-content-center">
<Button label="Check" icon="pi pi-check" />
</div>
2023-03-02 12:23:54 +00:00
<DocSectionCode :code="code" importCode />
2023-02-28 08:29:30 +00:00
</template>
<script>
export default {
data() {
return {
code: {
2023-09-22 12:54:14 +00:00
basic: `
import Button from "primevue/button"
2023-02-28 08:29:30 +00:00
const app = createApp(App);
2023-09-22 12:54:14 +00:00
app.component('Button', Button);
`,
options: `
<template>
2023-02-28 08:29:30 +00:00
<div class="card flex justify-content-center">
<Button label="Check" icon="pi pi-check" />
</div>
2023-10-15 09:38:39 +00:00
</template>
<script>
<\/script>
`,
2023-09-22 12:54:14 +00:00
composition: `
<template>
2023-02-28 08:29:30 +00:00
<div class="card flex justify-content-center">
<Button label="Check" icon="pi pi-check" />
</div>
2023-10-15 09:38:39 +00:00
</template>
<script setup>
<\/script>
`
2023-02-28 08:29:30 +00:00
}
};
}
};
</script>