Refactor on nuxt doc

pull/4126/head
mertsincan 2023-10-16 09:10:39 +01:00
parent 80aab2f90c
commit 2d66c39da4
3 changed files with 11 additions and 11 deletions

View File

@ -1,6 +1,6 @@
<template>
<DocSectionText v-bind="$attrs">
<p>The <a href="https://www.npmjs.com/package/nuxt-primevue" target="_blank" rel="noopener noreferrer">nuxt-prime</a> package is the official module by PrimeTek.</p>
<p>The <a href="https://www.npmjs.com/package/nuxt-primevue" target="_blank" rel="noopener noreferrer">nuxt-primevue</a> package is the official module by PrimeTek.</p>
</DocSectionText>
<DocSectionCode :code="code" hideToggleCode hideCodeSandbox hideStackBlitz />
</template>

View File

@ -20,7 +20,7 @@ export default {
return {
code1: {
basic: `
primevue: {
primevue: {
components: {
include: ['Button', 'DataTable']
}
@ -29,7 +29,7 @@ primevue: {
},
code2: {
basic: `
primevue: {
primevue: {
components: {
include: '*',
exclude: ['Galleria', 'Carousel']
@ -39,19 +39,19 @@ primevue: {
},
code3: {
basic: `
primevue: {
primevue: {
components: {
prefix: 'Prime'
include: ['Button', 'DataTable'] /* Used as <PrimeButton /> and <DataTable /> */
include: ['Button', 'DataTable'] /* Used as <PrimeButton /> and <PrimeDataTable /> */
}
}
`
},
code4: {
basic: `
primevue: {
primevue: {
components: {
name: ({ name: string, as: string, from: string }) => {
name: ({ name, as, from }) => {
return name === 'Button' ? \`My\${name}\` : name;
}
include: ['Button', 'DataTable'] /* Used as <MyButton /> and <DataTable /> */

View File

@ -1,6 +1,6 @@
<template>
<DocSectionText v-bind="$attrs">
<p>The names of the directives to import and register are provided using the <i>include</i> property. When the value is ignored or set using the * alias, all of the directives are registered.</p>
<p>The names of the directives to import and register are provided using the <i>include</i> property. When the value is ignored or set using the <i>*</i> alias, all of the directives are registered.</p>
<DocSectionCode :code="code1" importCode hideToggleCode hideCodeSandbox hideStackBlitz />
<p>Similar to components, certain directives can be excluded and name registration can be customized.</p>
<DocSectionCode :code="code2" importCode hideToggleCode hideCodeSandbox hideStackBlitz />
@ -14,7 +14,7 @@ export default {
return {
code1: {
basic: `
primevue: {
primevue: {
directives: {
include: ['Ripple', 'Tooltip']
}
@ -23,7 +23,7 @@ primevue: {
},
code2: {
basic: `
primevue: {
primevue: {
directives: {
include: '*',
exclude: ['Ripple']
@ -33,7 +33,7 @@ primevue: {
},
code3: {
basic: `
primevue: {
primevue: {
directives: {
prefix: 'p'
include: ['Ripple', 'Tooltip'] /* Used as v-pripple and v-ptooltip */