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> <template>
<DocSectionText v-bind="$attrs"> <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> </DocSectionText>
<DocSectionCode :code="code" hideToggleCode hideCodeSandbox hideStackBlitz /> <DocSectionCode :code="code" hideToggleCode hideCodeSandbox hideStackBlitz />
</template> </template>

View File

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

View File

@ -1,6 +1,6 @@
<template> <template>
<DocSectionText v-bind="$attrs"> <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 /> <DocSectionCode :code="code1" importCode hideToggleCode hideCodeSandbox hideStackBlitz />
<p>Similar to components, certain directives can be excluded and name registration can be customized.</p> <p>Similar to components, certain directives can be excluded and name registration can be customized.</p>
<DocSectionCode :code="code2" importCode hideToggleCode hideCodeSandbox hideStackBlitz /> <DocSectionCode :code="code2" importCode hideToggleCode hideCodeSandbox hideStackBlitz />
@ -14,7 +14,7 @@ export default {
return { return {
code1: { code1: {
basic: ` basic: `
primevue: { primevue: {
directives: { directives: {
include: ['Ripple', 'Tooltip'] include: ['Ripple', 'Tooltip']
} }
@ -23,7 +23,7 @@ primevue: {
}, },
code2: { code2: {
basic: ` basic: `
primevue: { primevue: {
directives: { directives: {
include: '*', include: '*',
exclude: ['Ripple'] exclude: ['Ripple']
@ -33,7 +33,7 @@ primevue: {
}, },
code3: { code3: {
basic: ` basic: `
primevue: { primevue: {
directives: { directives: {
prefix: 'p' prefix: 'p'
include: ['Ripple', 'Tooltip'] /* Used as v-pripple and v-ptooltip */ include: ['Ripple', 'Tooltip'] /* Used as v-pripple and v-ptooltip */