primevue-mirror/apps/showcase/doc/autoimport/OverviewDoc.vue

30 lines
758 B
Vue
Raw Normal View History

2024-01-24 12:49:48 +00:00
<template>
<DocSectionText v-bind="$attrs">
<p>PrimeVue components need to be imported and configured individually. In the next section, we'll cleanup the code using auto imports.</p>
</DocSectionText>
2024-01-30 08:16:35 +00:00
<DocSectionCode :code="code" hideToggleCode importCode hideStackBlitz />
2024-01-24 12:49:48 +00:00
</template>
<script>
export default {
data() {
return {
code: {
basic: `
import { createApp } from "vue";
import PrimeVue from "primevue/config";
import InputText from 'primevue/inputtext';
import Button from 'primevue/button';
import App from './App.vue'
const app = createApp(App);
app.use(PrimeVue);
app.component('InputText', InputText);
app.component('Button', Button);
`
}
};
}
};
</script>