2023-08-06 15:12:36 +00:00
|
|
|
<template>
|
|
|
|
<DocSectionText v-bind="$attrs">
|
|
|
|
<p>
|
2024-10-27 09:46:57 +00:00
|
|
|
The <i>global</i> property has a <i>css</i> option to define custom css that belongs to a global <i>pt</i> configuration. Common use case of this feature is defining global styles and animations related to the pass through configuration.
|
2023-08-06 15:12:36 +00:00
|
|
|
</p>
|
|
|
|
</DocSectionText>
|
|
|
|
|
2024-01-30 08:16:35 +00:00
|
|
|
<DocSectionCode :code="code" hideToggleCode importCode hideStackBlitz />
|
2023-08-06 15:12:36 +00:00
|
|
|
</template>
|
|
|
|
|
|
|
|
<script>
|
|
|
|
export default {
|
|
|
|
data() {
|
|
|
|
return {
|
|
|
|
code: {
|
2023-09-22 12:54:14 +00:00
|
|
|
basic: `
|
|
|
|
import { createApp } from "vue";
|
2023-08-06 15:12:36 +00:00
|
|
|
import PrimeVue from "primevue/config";
|
|
|
|
const app = createApp(App);
|
|
|
|
|
2024-01-30 08:16:35 +00:00
|
|
|
app.use(PrimeVue, {
|
2023-08-06 15:12:36 +00:00
|
|
|
pt: {
|
|
|
|
global: {
|
|
|
|
css: \`
|
2024-10-27 09:46:57 +00:00
|
|
|
.my-button {
|
|
|
|
border-width: 2px;
|
2023-08-06 15:12:36 +00:00
|
|
|
}
|
|
|
|
\`
|
2024-10-27 09:46:57 +00:00
|
|
|
},
|
|
|
|
button: {
|
|
|
|
root: 'my-button'
|
2023-08-06 15:12:36 +00:00
|
|
|
}
|
2024-01-30 08:16:35 +00:00
|
|
|
}
|
2023-09-22 12:54:14 +00:00
|
|
|
});
|
|
|
|
`
|
2023-08-06 15:12:36 +00:00
|
|
|
}
|
|
|
|
};
|
|
|
|
}
|
|
|
|
};
|
|
|
|
</script>
|