Textarea pt demo added

pull/3938/head
Tuğçe Küçükoğlu 2023-05-07 09:30:18 +03:00
parent a4b86619ac
commit 0f6803631f
4 changed files with 142 additions and 3 deletions

81
doc/textarea/pt/PTDoc.vue Normal file
View File

@ -0,0 +1,81 @@
<template>
<DocSectionText v-bind="$attrs"></DocSectionText>
<div class="card flex justify-content-center">
<Textarea
v-model="value"
:pt="{
root: {
rows: 5,
cols: 30
}
}"
/>
</div>
<DocSectionCode :code="code" />
</template>
<script>
export default {
data() {
return {
value: '',
code: {
basic: `
<Textarea
v-model="value"
:pt="{
root: {
rows: 5,
cols: 30
}
}"
/>`,
options: `
<template>
<div class="card flex justify-content-center">
<Textarea
v-model="value"
:pt="{
root: {
rows: 5,
cols: 30
}
}"
/>
</div>
</template>
<script>
export default {
data() {
return {
value: ''
}
}
};
<\/script>`,
composition: `
<template>
<div class="card flex justify-content-center">
<Textarea
v-model="value"
:pt="{
root: {
rows: 5,
cols: 30
}
}"
/>
</div>
</template>
<script setup>
import { ref } from 'vue';
const value = ref('');
<\/script>`
}
};
}
};
</script>

View File

@ -0,0 +1,8 @@
<template>
<DocSectionText v-bind="$attrs">
<p>{{ $attrs.description }}</p>
</DocSectionText>
<div class="card">
<img class="w-full" src="https://primefaces.org/cdn/primevue/images/pt/wireframe-placeholder.jpg" />
</div>
</template>

41
doc/textarea/pt/index.vue Normal file
View File

@ -0,0 +1,41 @@
<template>
<div class="doc-main">
<div class="doc-intro">
<h1>Textarea Pass Through</h1>
</div>
<DocSections :docs="docs" />
</div>
<DocSectionNav :docs="docs" />
</template>
<script>
import DocApiTable from '@/components/doc/DocApiTable.vue';
import { getPTOption } from '@/components/doc/helpers/PTHelper.js';
import PtDoc from './PTDoc.vue';
import PTImage from './PTImage.vue';
export default {
data() {
return {
docs: [
{
id: 'pt.image',
label: 'Wireframe',
component: PTImage
},
{
id: 'pt.doc.textarea',
label: 'Textarea PT Options',
component: DocApiTable,
data: getPTOption('Textarea')
},
{
id: 'pt.demo',
label: 'Demo',
component: PtDoc
}
]
};
}
};
</script>

View File

@ -1,5 +1,12 @@
<template>
<DocComponent title="Vue Textarea Component" header="Textarea" description="Textarea adds styling, key filtering and autoResize functionality to standard textarea element." :componentDocs="docs" :apiDocs="['Textarea']" />
<DocComponent
title="Vue Textarea Component"
header="Textarea"
description="Textarea adds styling, key filtering and autoResize functionality to standard textarea element."
:componentDocs="docs"
:apiDocs="['Textarea']"
:ptTabComponent="ptComponent"
/>
</template>
<script>
@ -8,10 +15,11 @@ import AutoResizeDoc from '@/doc/textarea/AutoResizeDoc';
import BasicDoc from '@/doc/textarea/BasicDoc';
import DisabledDoc from '@/doc/textarea/DisabledDoc';
import FloatLabelDoc from '@/doc/textarea/FloatLabelDoc';
import VeeValidateDoc from '@/doc/textarea/form/VeeValidateDoc.vue';
import ImportDoc from '@/doc/textarea/ImportDoc';
import InvalidDoc from '@/doc/textarea/InvalidDoc';
import StyleDoc from '@/doc/textarea/StyleDoc';
import VeeValidateDoc from '@/doc/textarea/form/VeeValidateDoc.vue';
import PTComponent from '@/doc/textarea/pt/index.vue';
export default {
data() {
@ -69,7 +77,8 @@ export default {
label: 'Accessibility',
component: AccessibilityDoc
}
]
],
ptComponent: PTComponent
};
}
};