Chips pt demo added

pull/3938/head
Tuğçe Küçükoğlu 2023-05-05 12:37:42 +03:00
parent 8285192303
commit 46f8eca9f3
5 changed files with 133 additions and 3 deletions

View File

@ -21,12 +21,14 @@
</template>
<script>
import BaseComponent from 'primevue/basecomponent';
import OverlayEventBus from 'primevue/overlayeventbus';
import Portal from 'primevue/portal';
import { ConnectedOverlayScrollHandler, DomHandler, ZIndexUtils } from 'primevue/utils';
export default {
name: 'ColorPicker',
extends: BaseComponent,
emits: ['update:modelValue', 'change', 'show', 'hide'],
props: {
modelValue: {

77
doc/chips/pt/PTDoc.vue Normal file
View File

@ -0,0 +1,77 @@
<template>
<DocSectionText v-bind="$attrs"></DocSectionText>
<div class="card">
<Chips
v-model="value"
:pt="{
root: { class: 'flex' },
container: { class: 'flex-1' },
token: { class: 'bg-primary' }
}"
/>
</div>
<DocSectionCode :code="code" />
</template>
<script>
export default {
data() {
return {
value: null,
code: {
basic: `
<Chips
v-model="value"
:pt="{
root: { class: 'flex' },
container: { class: 'flex-1' },
token: { class: 'bg-primary' }
}"
/>`,
options: `
<template>
<div class="card">
<Chips
v-model="value"
:pt="{
root: { class: 'flex' },
container: { class: 'flex-1' },
token: { class: 'bg-primary' }
}"
/>
</div>
</template>
<script>
export default {
data() {
return {
value: null
};
}
};
<\/script>`,
composition: `
<template>
<div class="card">
<Chips
v-model="value"
:pt="{
root: { class: 'flex' },
container: { class: 'flex-1' },
token: { class: 'bg-primary' }
}"
/>
</div>
</template>
<script setup>
import { ref } from "vue";
const value = ref();
<\/script>`
}
};
}
};
</script>

8
doc/chips/pt/PTImage.vue Normal file
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/chips/pt/index.vue Normal file
View File

@ -0,0 +1,41 @@
<template>
<div class="doc-main">
<div class="doc-intro">
<h1>Chips 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.chips',
label: 'Chips PT Options',
component: DocApiTable,
data: getPTOption('Chips')
},
{
id: 'pt.demo',
label: 'Demo',
component: PtDoc
}
]
};
}
};
</script>

View File

@ -1,5 +1,5 @@
<template>
<DocComponent title="Vue Chips Component" header="Chips" description="Chips is used to enter multiple values on an input field." :componentDocs="docs" :apiDocs="['Chips']" />
<DocComponent title="Vue Chips Component" header="Chips" description="Chips is used to enter multiple values on an input field." :componentDocs="docs" :apiDocs="['Chips']" :ptTabComponent="ptComponent" />
</template>
<script>
@ -7,12 +7,13 @@ import AccessibilityDoc from '@/doc/chips/AccessibilityDoc';
import BasicDoc from '@/doc/chips/BasicDoc';
import DisabledDoc from '@/doc/chips/DisabledDoc';
import FloatLabelDoc from '@/doc/chips/FloatLabelDoc';
import VeeValidateDoc from '@/doc/chips/form/VeeValidateDoc';
import ImportDoc from '@/doc/chips/ImportDoc';
import InvalidDoc from '@/doc/chips/InvalidDoc';
import SeparatorDoc from '@/doc/chips/SeparatorDoc';
import StyleDoc from '@/doc/chips/StyleDoc';
import TemplateDoc from '@/doc/chips/TemplateDoc';
import VeeValidateDoc from '@/doc/chips/form/VeeValidateDoc';
import PTComponent from '@/doc/chips/pt/index.vue';
export default {
data() {
@ -75,7 +76,8 @@ export default {
label: 'Accessibility',
component: AccessibilityDoc
}
]
],
ptComponent: PTComponent
};
}
};