primevue-mirror/doc/passthrough/GlobalDoc.vue

40 lines
1.1 KiB
Vue
Raw Normal View History

2023-07-09 21:13:49 +00:00
<template>
<DocSectionText v-bind="$attrs">
<p>
Defines the shared pass through properties per component type. For example, with the configuration below all panel headers have the <i>bg-primary</i> style class and the all autocomplete components have a fixed width. These settings can
be overriden by a particular component as components <i>pt</i> property has higher precedence over global <i>pt</i>.
</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";
const app = createApp(App);
app.use(PrimeVue, {
pt: {
panel: {
2023-07-11 23:14:34 +00:00
header: {
class: 'bg-primary'
}
2023-07-09 21:13:49 +00:00
},
autocomplete: {
2023-07-11 23:14:34 +00:00
input: {
root: 'w-16rem' // OR { class: 'w-16rem' }
}
2023-07-09 21:13:49 +00:00
}
}
});`
}
};
}
};
</script>