Add auto-import guide

This commit is contained in:
Cagatay Civici 2024-01-24 15:49:48 +03:00
parent 0996e90188
commit c3d791be08
9 changed files with 154 additions and 8 deletions

View file

@ -0,0 +1,29 @@
<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>
<DocSectionCode :code="code" hideToggleCode importCode hideCodeSandbox hideStackBlitz />
</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>