csb service props must be array
parent
a4f3c9a4a0
commit
98dbb467d7
|
@ -47,14 +47,21 @@ export default {
|
||||||
}
|
}
|
||||||
|
|
||||||
if (this.service) {
|
if (this.service) {
|
||||||
|
let serviceArr = [];
|
||||||
|
|
||||||
|
this.service.forEach(el => {
|
||||||
|
serviceArr.push(el.split(','))
|
||||||
|
})
|
||||||
/* eslint-disable */
|
/* eslint-disable */
|
||||||
|
serviceArr.forEach((el, i) => {
|
||||||
tabs.push(
|
tabs.push(
|
||||||
<TabPanel key="service" header={`${this.service}.js`}>
|
<TabPanel key="service" header={`${el}.js`}>
|
||||||
<pre v-code="script"><code>
|
<pre v-code="script"><code>
|
||||||
{services[this.service]}
|
{services[el]}
|
||||||
</code></pre>
|
</code></pre>
|
||||||
</TabPanel>
|
</TabPanel>
|
||||||
);
|
);
|
||||||
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
if (this.data) {
|
if (this.data) {
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
<template>
|
<template>
|
||||||
<AppDoc name="AutoCompleteDemo" :sources="sources" service="CountryService" :data="['countries']">
|
<AppDoc name="AutoCompleteDemo" :sources="sources" :service="['CountryService']" :data="['countries']">
|
||||||
<h5>Import</h5>
|
<h5>Import</h5>
|
||||||
<pre v-code.script><code>
|
<pre v-code.script><code>
|
||||||
import AutoComplete from 'primevue/autocomplete';
|
import AutoComplete from 'primevue/autocomplete';
|
||||||
|
@ -544,8 +544,6 @@ export default {
|
||||||
const filteredCountries = ref();
|
const filteredCountries = ref();
|
||||||
const selectedCountries = ref([]);
|
const selectedCountries = ref([]);
|
||||||
const groupedCities = ref ([{
|
const groupedCities = ref ([{
|
||||||
label: 'Germany', code: 'DE',
|
|
||||||
label: 'Germany', code: 'DE',
|
|
||||||
label: 'Germany', code: 'DE',
|
label: 'Germany', code: 'DE',
|
||||||
items: [
|
items: [
|
||||||
{label: 'Berlin', value: 'Berlin'},
|
{label: 'Berlin', value: 'Berlin'},
|
||||||
|
@ -555,8 +553,6 @@ export default {
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: 'USA', code: 'US',
|
|
||||||
label: 'USA', code: 'US',
|
|
||||||
label: 'USA', code: 'US',
|
label: 'USA', code: 'US',
|
||||||
items: [
|
items: [
|
||||||
{label: 'Chicago', value: 'Chicago'},
|
{label: 'Chicago', value: 'Chicago'},
|
||||||
|
@ -566,8 +562,6 @@ export default {
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: 'Japan', code: 'JP',
|
|
||||||
label: 'Japan', code: 'JP',
|
|
||||||
label: 'Japan', code: 'JP',
|
label: 'Japan', code: 'JP',
|
||||||
items: [
|
items: [
|
||||||
{label: 'Kyoto', value: 'Kyoto'},
|
{label: 'Kyoto', value: 'Kyoto'},
|
||||||
|
@ -590,16 +584,16 @@ export default {
|
||||||
};
|
};
|
||||||
const searchCity = (event) => {
|
const searchCity = (event) => {
|
||||||
let query = event.query;
|
let query = event.query;
|
||||||
let filteredCities = [];
|
let newFilteredCities = [];
|
||||||
|
|
||||||
for (let country of groupedCities.value) {
|
for (let country of groupedCities.value) {
|
||||||
let filteredItems = FilterService.filter(country.items, ['label'], query, FilterMatchMode.CONTAINS);
|
let filteredItems = FilterService.filter(country.items, ['label'], query, FilterMatchMode.CONTAINS);
|
||||||
if (filteredItems && filteredItems.length) {
|
if (filteredItems && filteredItems.length) {
|
||||||
filteredCities.push({...country, ...{items: filteredItems}});
|
newFilteredCities.push({...country, ...{items: filteredItems}});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
filteredCities.value = filteredCities;
|
filteredCities.value = newFilteredCities;
|
||||||
}
|
}
|
||||||
return { countries, countryService, selectedCountry1, selectedCountry2, selectedCity, filteredCities, filteredCountries, selectedCountries, groupedCities, searchCountry, searchCity }
|
return { countries, countryService, selectedCountry1, selectedCountry2, selectedCity, filteredCities, filteredCountries, selectedCountries, groupedCities, searchCountry, searchCity }
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
<template>
|
<template>
|
||||||
<AppDoc name="CarouselDemo" :sources="sources" service="ProductService" :data="['products-small']">
|
<AppDoc name="CarouselDemo" :sources="sources" :service="['ProductService']" :data="['products-small']">
|
||||||
<h5>Import</h5>
|
<h5>Import</h5>
|
||||||
<pre v-code.script><code>
|
<pre v-code.script><code>
|
||||||
import Carousel from 'primevue/carousel';
|
import Carousel from 'primevue/carousel';
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
<template>
|
<template>
|
||||||
<AppDoc name="DataTableDemo" :sources="sources" service="ProductService" :data="['products-small']" />
|
<AppDoc name="DataTableDemo" :sources="sources" :service="['ProductService']" :data="['products-small']" />
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
|
|
|
@ -30,7 +30,7 @@
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<AppDoc name="DataTableColResizeDemo" :sources="sources" service="ProductService" :data="['products-small']" />
|
<AppDoc name="DataTableColResizeDemo" :sources="sources" :service="['ProductService']" :data="['products-small']" />
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
|
|
|
@ -22,7 +22,7 @@
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<AppDoc name="DataTableColToggleDemo" :sources="sources" service="ProductService" :data="['products-small']" />
|
<AppDoc name="DataTableColToggleDemo" :sources="sources" :service="['ProductService']" :data="['products-small']" />
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
|
|
|
@ -24,7 +24,7 @@
|
||||||
<ContextMenu :model="menuModel" ref="cm" />
|
<ContextMenu :model="menuModel" ref="cm" />
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<AppDoc name="DataTableContextMenuDemo" :sources="sources" service="ProductService" :data="['products-small']" />
|
<AppDoc name="DataTableContextMenuDemo" :sources="sources" :service="['ProductService']" :data="['products-small']" />
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
|
@ -46,7 +46,8 @@ export default {
|
||||||
content: `
|
content: `
|
||||||
<template>
|
<template>
|
||||||
<div>
|
<div>
|
||||||
<DataTable :value="products" contextMenu v-model:contextMenuSelection="selectedProduct" @row-contextmenu="onRowContextMenu" responsiveLayout="scroll">
|
<Toast />
|
||||||
|
<DataTable :value="products" contextMenu v-model:contextMenuSelection="selectedProduct" @rowContextmenu="onRowContextMenu" responsiveLayout="scroll">
|
||||||
<Column field="code" header="Code"></Column>
|
<Column field="code" header="Code"></Column>
|
||||||
<Column field="name" header="Name"></Column>
|
<Column field="name" header="Name"></Column>
|
||||||
<Column field="category" header="Category"></Column>
|
<Column field="category" header="Category"></Column>
|
||||||
|
@ -91,7 +92,7 @@ export default {
|
||||||
},
|
},
|
||||||
deleteProduct(product) {
|
deleteProduct(product) {
|
||||||
this.products = this.products.filter((p) => p.id !== product.id);
|
this.products = this.products.filter((p) => p.id !== product.id);
|
||||||
this.$toast.add({severity: 'info', summary: 'Product Deleted', detail: product.name});
|
this.$toast.add({severity: 'error', summary: 'Product Deleted', detail: product.name});
|
||||||
this.selectedProduct = null;
|
this.selectedProduct = null;
|
||||||
},
|
},
|
||||||
formatCurrency(value) {
|
formatCurrency(value) {
|
||||||
|
@ -107,7 +108,8 @@ export default {
|
||||||
content: `
|
content: `
|
||||||
<template>
|
<template>
|
||||||
<div>
|
<div>
|
||||||
<DataTable :value="products" contextMenu v-model:contextMenuSelection="selectedProduct" @row-contextmenu="onRowContextMenu" responsiveLayout="scroll">
|
<Toast />
|
||||||
|
<DataTable :value="products" contextMenu v-model:contextMenuSelection="selectedProduct" @rowContextmenu="onRowContextMenu" responsiveLayout="scroll">
|
||||||
<Column field="code" header="Code"></Column>
|
<Column field="code" header="Code"></Column>
|
||||||
<Column field="name" header="Name"></Column>
|
<Column field="name" header="Name"></Column>
|
||||||
<Column field="category" header="Category"></Column>
|
<Column field="category" header="Category"></Column>
|
||||||
|
@ -139,8 +141,8 @@ export default {
|
||||||
const productService = ref(new ProductService());
|
const productService = ref(new ProductService());
|
||||||
const selectedProduct = ref();
|
const selectedProduct = ref();
|
||||||
const menuModel = ref([
|
const menuModel = ref([
|
||||||
{label: 'View', icon: 'pi pi-fw pi-search', command: () => this.viewProduct(this.selectedProduct)},
|
{label: 'View', icon: 'pi pi-fw pi-search', command: () => viewProduct(selectedProduct)},
|
||||||
{label: 'Delete', icon: 'pi pi-fw pi-times', command: () => this.deleteProduct(this.selectedProduct)}
|
{label: 'Delete', icon: 'pi pi-fw pi-times', command: () => deleteProduct(selectedProduct)}
|
||||||
]);
|
]);
|
||||||
const onRowContextMenu = (event) => {
|
const onRowContextMenu = (event) => {
|
||||||
cm.value.show(event.originalEvent);
|
cm.value.show(event.originalEvent);
|
||||||
|
@ -149,8 +151,8 @@ export default {
|
||||||
toast.add({severity: 'info', summary: 'Product Selected', detail: product.name});
|
toast.add({severity: 'info', summary: 'Product Selected', detail: product.name});
|
||||||
};
|
};
|
||||||
const deleteProduct = (product) => {
|
const deleteProduct = (product) => {
|
||||||
products.value = products.value.filter((p) => p.id !== product.id);
|
products.value = products.value.filter((p) => p.id !== product.value.id);
|
||||||
toast.add({severity: 'info', summary: 'Product Deleted', detail: product.name});
|
toast.add({severity: 'error', summary: 'Product Deleted', detail: product.name});
|
||||||
selectedProduct.value = null;
|
selectedProduct.value = null;
|
||||||
};
|
};
|
||||||
const formatCurrency = (value) => {
|
const formatCurrency = (value) => {
|
||||||
|
@ -182,7 +184,7 @@ export default {
|
||||||
},
|
},
|
||||||
deleteProduct(product) {
|
deleteProduct(product) {
|
||||||
this.products = this.products.filter((p) => p.id !== product.id);
|
this.products = this.products.filter((p) => p.id !== product.id);
|
||||||
this.$toast.add({severity: 'info', summary: 'Product Deleted', detail: product.name});
|
this.$toast.add({severity: 'error', summary: 'Product Deleted', detail: product.name});
|
||||||
this.selectedProduct = null;
|
this.selectedProduct = null;
|
||||||
},
|
},
|
||||||
formatCurrency(value) {
|
formatCurrency(value) {
|
||||||
|
|
|
@ -158,7 +158,7 @@
|
||||||
</Dialog>
|
</Dialog>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<AppDoc name="DataTableCrudDemo" :sources="sources" service="ProductService" :data="['products']" />
|
<AppDoc name="DataTableCrudDemo" :sources="sources" :service="['ProductService']" :data="['products']" />
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
<template>
|
<template>
|
||||||
<div class="content-section documentation">
|
<div class="content-section documentation">
|
||||||
<AppDoc name="DataTableDemo" :sources="sources" service="CustomerService" :data="['customers-large']">
|
<AppDoc name="DataTableDemo" :sources="sources" :service="['CustomerService']" :data="['customers-large']">
|
||||||
<h5>Import</h5>
|
<h5>Import</h5>
|
||||||
<pre v-code.script><code>
|
<pre v-code.script><code>
|
||||||
import DataTable from 'primevue/datatable';
|
import DataTable from 'primevue/datatable';
|
||||||
|
|
|
@ -15,7 +15,7 @@
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<AppDoc name="DataTableDynamicColumnsDemo" :sources="sources" service="ProductService" :data="['products-small']" />
|
<AppDoc name="DataTableDynamicColumnsDemo" :sources="sources" :service="['ProductService']" :data="['products-small']" />
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
|
@ -92,7 +92,7 @@
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<AppDoc name="DataTableEditDemo" :sources="sources" service="ProductService" :data="['products-small']" />
|
<AppDoc name="DataTableEditDemo" :sources="sources" :service="['ProductService']" :data="['products-small']" />
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
|
|
|
@ -23,7 +23,7 @@
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<AppDoc name="DataTableExportDemo" :sources="sources" service="ProductService" :data="['products-small']" />
|
<AppDoc name="DataTableExportDemo" :sources="sources" :service="['ProductService']" :data="['products-small']" />
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
|
|
|
@ -208,7 +208,7 @@
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<AppDoc name="DataTableFilterDemo" :sources="sources" service="CustomerService" :data="['customers-large']" />
|
<AppDoc name="DataTableFilterDemo" :sources="sources" :service="['CustomerService']" :data="['customers-large']" />
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
|
|
|
@ -11,7 +11,7 @@
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<AppDoc name="DataTableFlexScrollDemo" :sources="sources" service="CustomerService" :data="['customers-large']" />
|
<AppDoc name="DataTableFlexScrollDemo" :sources="sources" :service="['CustomerService']" :data="['customers-large']" />
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
|
|
|
@ -24,7 +24,7 @@
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<AppDoc name="DataTableGridLinesDemo" :sources="sources" service="ProductService" :data="['products-small']" />
|
<AppDoc name="DataTableGridLinesDemo" :sources="sources" :service="['ProductService']" :data="['products-small']" />
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
|
|
|
@ -39,7 +39,7 @@
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<AppDoc name="DataTableLazyDemo" :sources="sources" service="CustomerService" />
|
<AppDoc name="DataTableLazyDemo" :sources="sources" :service="['CustomerService']" />
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
|
|
|
@ -27,7 +27,7 @@
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<AppDoc name="DataTablePaginatorDemo" :sources="sources" service="CustomerService" :data="['customers-large']" />
|
<AppDoc name="DataTablePaginatorDemo" :sources="sources" :service="['CustomerService']" :data="['customers-large']" />
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
|
@ -16,7 +16,7 @@
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<AppDoc name="DataTableReorderDemo" :sources="sources" service="ProductService" :data="['products-small']" />
|
<AppDoc name="DataTableReorderDemo" :sources="sources" :service="['ProductService']" :data="['products-small']" />
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
|
@ -54,7 +54,7 @@
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<AppDoc name="DataTableResponsiveDemo" :sources="sources" service="ProductService" :data="['products-small']" />
|
<AppDoc name="DataTableResponsiveDemo" :sources="sources" :service="['ProductService']" :data="['products-small']" />
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
|
@ -69,7 +69,7 @@
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<AppDoc name="DataTableRowExpandDemo" :sources="sources" service="ProductService" :data="['products-orders-small']" />
|
<AppDoc name="DataTableRowExpandDemo" :sources="sources" :service="['ProductService']" :data="['products-orders-small']" />
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
|
@ -105,7 +105,7 @@
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<AppDoc name="DataTableRowGroupDemo" :sources="sources" service="CustomerService" :data="['customers-medium']" />
|
<AppDoc name="DataTableRowGroupDemo" :sources="sources" :service="['CustomerService']" :data="['customers-medium']" />
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
|
@ -125,7 +125,7 @@
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<AppDoc name="DataTableScrollDemo" :sources="sources" service="CustomerService" :data="['customers-medium', 'customers-large']" />
|
<AppDoc name="DataTableScrollDemo" :sources="sources" :service="['CustomerService']" :data="['customers-medium', 'customers-large']" />
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
|
|
|
@ -81,7 +81,7 @@
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<AppDoc name="DataTableSelectionDemo" :sources="sources" service="ProductService" :data="['products-small']" />
|
<AppDoc name="DataTableSelectionDemo" :sources="sources" :service="['ProductService']" :data="['products-small']" />
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
|
@ -45,7 +45,7 @@
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<AppDoc name="DataTableSizeDemo" :sources="sources" service="ProductService" :data="['products-small']" />
|
<AppDoc name="DataTableSizeDemo" :sources="sources" :service="['ProductService']" :data="['products-small']" />
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
|
@ -70,7 +70,7 @@
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<AppDoc name="DataTableSortDemo" :sources="sources" service="ProductService" :data="['products-small']" />
|
<AppDoc name="DataTableSortDemo" :sources="sources" :service="['ProductService']" :data="['products-small']" />
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
|
@ -127,7 +127,7 @@
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<AppDoc name="DataTableStateDemo" :sources="sources" service="CustomerService" :data="['customers-medium']" />
|
<AppDoc name="DataTableStateDemo" :sources="sources" :service="['CustomerService']" :data="['customers-medium']" />
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
|
@ -18,7 +18,7 @@
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<AppDoc name="DataTableStripedDemo" :sources="sources" service="ProductService" :data="['products-small']" />
|
<AppDoc name="DataTableStripedDemo" :sources="sources" :service="['ProductService']" :data="['products-small']" />
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
|
@ -24,7 +24,7 @@
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<AppDoc name="DataTableStyleDemo" :sources="sources" service="ProductService" :data="['products-small']" />
|
<AppDoc name="DataTableStyleDemo" :sources="sources" :service="['ProductService']" :data="['products-small']" />
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
|
|
|
@ -44,7 +44,7 @@
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<AppDoc name="DataTableTemplatingDemo" :sources="sources" service="ProductService" :data="['products-small']" />
|
<AppDoc name="DataTableTemplatingDemo" :sources="sources" :service="['ProductService']" :data="['products-small']" />
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
<template>
|
<template>
|
||||||
<AppDoc name="DataViewDemo" :sources="sources" service="ProductService" :data="['products']">
|
<AppDoc name="DataViewDemo" :sources="sources" :service="['ProductService']" :data="['products']">
|
||||||
<h5>Import</h5>
|
<h5>Import</h5>
|
||||||
|
|
||||||
<pre v-code.script><code>
|
<pre v-code.script><code>
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
<template>
|
<template>
|
||||||
<AppDoc name="DeferredContentDemo" :sources="sources" service="ProductService" :data="['products-small']">
|
<AppDoc name="DeferredContentDemo" :sources="sources" :service="['ProductService']" :data="['products-small']">
|
||||||
<h5>Import</h5>
|
<h5>Import</h5>
|
||||||
<pre v-code.script><code>
|
<pre v-code.script><code>
|
||||||
import DeferredContent from 'primevue/deferredcontent';
|
import DeferredContent from 'primevue/deferredcontent';
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
<template>
|
<template>
|
||||||
<AppDoc name="FilterServiceDemo" :sources="sources" service="CustomerService" :data="['customers-large']">
|
<AppDoc name="FilterServiceDemo" :sources="sources" :service="['CustomerService']" :data="['customers-large']">
|
||||||
<h5>Import</h5>
|
<h5>Import</h5>
|
||||||
<pre v-code.script><code>
|
<pre v-code.script><code>
|
||||||
import {FilterService} from 'primevue/api';
|
import {FilterService} from 'primevue/api';
|
||||||
|
|
|
@ -107,7 +107,7 @@
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<AppDoc name="FloatLabelDemo" :sources="sources" service="CountryService" :data="['countries']" />
|
<AppDoc name="FloatLabelDemo" :sources="sources" :service="['CountryService']" :data="['countries']" />
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
|
|
|
@ -1,7 +1,5 @@
|
||||||
<template>
|
<template>
|
||||||
<div class="content-section documentation">
|
<AppDoc name="FormLayoutDemo" :sources="sources">
|
||||||
<TabView>
|
|
||||||
<TabPanel header="Documentation">
|
|
||||||
<h5>Getting Started</h5>
|
<h5>Getting Started</h5>
|
||||||
<p>Core member of the FormLayout is the <i>.p-field</i> class that wraps the input field and the associated label.</p>
|
<p>Core member of the FormLayout is the <i>.p-field</i> class that wraps the input field and the associated label.</p>
|
||||||
<pre v-code><code>
|
<pre v-code><code>
|
||||||
|
@ -222,201 +220,19 @@
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
</div>
|
</div>
|
||||||
|
</AppDoc>
|
||||||
</TabPanel>
|
|
||||||
|
|
||||||
<TabPanel header="Source">
|
|
||||||
<div class="p-d-flex p-jc-between">
|
|
||||||
<a href="https://github.com/primefaces/primevue/tree/master/src/views/formlayout" class="btn-viewsource" target="_blank" rel="noopener noreferrer">
|
|
||||||
<span>View on GitHub</span>
|
|
||||||
</a>
|
|
||||||
<LiveEditor name="FormLayoutDemo" :sources="sources" :components="['InputText', 'Button', 'Checkbox', 'RadioButton', 'Textarea', 'Dropdown']" />
|
|
||||||
</div>
|
|
||||||
<pre v-code><code><template v-pre>
|
|
||||||
<h3>Vertical</h3>
|
|
||||||
<div class="p-fluid">
|
|
||||||
<div class="p-field">
|
|
||||||
<label for="firstname1">Firstname</label>
|
|
||||||
<InputText id="firstname1" type="text" />
|
|
||||||
</div>
|
|
||||||
<div class="p-field">
|
|
||||||
<label for="lastname1">Lastname</label>
|
|
||||||
<InputText id="lastname1" type="text" />
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<h3>Vertical and Grid</h3>
|
|
||||||
<div class="p-fluid p-formgrid p-grid">
|
|
||||||
<div class="p-field p-col">
|
|
||||||
<label for="firstname2">Firstname</label>
|
|
||||||
<InputText id="firstname2" type="text" />
|
|
||||||
</div>
|
|
||||||
<div class="p-field p-col">
|
|
||||||
<label for="lastname2">Lastname</label>
|
|
||||||
<InputText id="lastname2" type="text" />
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<h3>Horizontal and Fixed Width</h3>
|
|
||||||
<div class="p-field p-grid">
|
|
||||||
<label for="firstname3" class="p-col-fixed" style="width:100px">Firstname</label>
|
|
||||||
<div class="p-col">
|
|
||||||
<InputText id="firstname3" type="text" />
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="p-field p-grid">
|
|
||||||
<label for="lastname3" class="p-col-fixed" style="width:100px">Lastname</label>
|
|
||||||
<div class="p-col">
|
|
||||||
<InputText id="lastname3" type="text" />
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<h3>Horizontal and Fluid</h3>
|
|
||||||
<div class="p-fluid">
|
|
||||||
<div class="p-field p-grid">
|
|
||||||
<label for="firstname4" class="p-col-12 p-mb-2 p-md-2 p-mb-md-0">Firstname</label>
|
|
||||||
<div class="p-col-12 p-md-10">
|
|
||||||
<InputText id="firstname4" type="text" />
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="p-field p-grid">
|
|
||||||
<label for="lastname4" class="p-col-12 p-mb-2 p-md-2 p-mb-md-0">Lastname</label>
|
|
||||||
<div class="p-col-12 p-md-10">
|
|
||||||
<InputText id="lastname4" type="text" />
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<h3>Inline</h3>
|
|
||||||
<div class="p-formgroup-inline">
|
|
||||||
<div class="p-field">
|
|
||||||
<label for="firstname5" class="p-sr-only">Firstname</label>
|
|
||||||
<InputText id="firstname5" type="text" placeholder="Firstname" />
|
|
||||||
</div>
|
|
||||||
<div class="p-field">
|
|
||||||
<label for="lastname5" class="p-sr-only">Lastname</label>
|
|
||||||
<InputText id="lastname5" type="text" placeholder="Lastname" />
|
|
||||||
</div>
|
|
||||||
<Button type="button" label="Submit" />
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<h3>Vertical Checkbox</h3>
|
|
||||||
<div class="p-field-checkbox">
|
|
||||||
<Checkbox id="city1" name="city1" value="Chicago" v-model="cities1" />
|
|
||||||
<label for="city1">Chicago</label>
|
|
||||||
</div>
|
|
||||||
<div class="p-field-checkbox">
|
|
||||||
<Checkbox id="city2" name="city1" value="Los Angeles" v-model="cities1" />
|
|
||||||
<label for="city2">Los Angeles</label>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<h3>Horizontal Checkbox</h3>
|
|
||||||
<div class="p-formgroup-inline">
|
|
||||||
<div class="p-field-checkbox">
|
|
||||||
<Checkbox id="city3" name="city2" value="Chicago" v-model="cities2" />
|
|
||||||
<label for="city3">Chicago</label>
|
|
||||||
</div>
|
|
||||||
<div class="p-field-checkbox">
|
|
||||||
<Checkbox id="city4" name="city2" value="Los Angeles" v-model="cities2" />
|
|
||||||
<label for="city4">Los Angeles</label>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<h3>Vertical RadioButton</h3>
|
|
||||||
<div class="p-field-radiobutton">
|
|
||||||
<RadioButton id="city5" name="city1" value="Chicago" v-model="city1" />
|
|
||||||
<label for="city5">Chicago</label>
|
|
||||||
</div>
|
|
||||||
<div class="p-field-radiobutton">
|
|
||||||
<RadioButton id="city6" name="city1" value="Los Angeles" v-model="city1" />
|
|
||||||
<label for="city6">Los Angeles</label>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<h3>Horizontal RadioButton</h3>
|
|
||||||
<div class="p-formgroup-inline">
|
|
||||||
<div class="p-field-radiobutton">
|
|
||||||
<RadioButton id="city7" name="city2" value="Chicago" v-model="city2" />
|
|
||||||
<label for="city7">Chicago</label>
|
|
||||||
</div>
|
|
||||||
<div class="p-field-radiobutton">
|
|
||||||
<RadioButton id="city8" name="city2" value="Los Angeles" v-model="city2" />
|
|
||||||
<label for="city8">Los Angeles</label>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<h3>Help Text</h3>
|
|
||||||
<div class="p-field p-fluid">
|
|
||||||
<label for="username">Username</label>
|
|
||||||
<InputText id="username" type="username" aria-describedby="username-help" />
|
|
||||||
<small id="username-help">Enter your username to reset your password.</small>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<h3>Advanced</h3>
|
|
||||||
<div class="p-fluid p-formgrid p-grid">
|
|
||||||
<div class="p-field p-col-12 p-md-6">
|
|
||||||
<label for="firstname6">Firstname</label>
|
|
||||||
<InputText id="firstname6" type="text" />
|
|
||||||
</div>
|
|
||||||
<div class="p-field p-col-12 p-md-6">
|
|
||||||
<label for="lastname6">Lastname</label>
|
|
||||||
<InputText id="lastname6" type="text" />
|
|
||||||
</div>
|
|
||||||
<div class="p-field p-col-12">
|
|
||||||
<label for="address">Address</label>
|
|
||||||
<Textarea id="address" rows="4" />
|
|
||||||
</div>
|
|
||||||
<div class="p-field p-col-12 p-md-6">
|
|
||||||
<label for="city">City</label>
|
|
||||||
<InputText id="city" type="text" />
|
|
||||||
</div>
|
|
||||||
<div class="p-field p-col-12 p-md-3">
|
|
||||||
<label for="state">State</label>
|
|
||||||
<Dropdown inputId="state" v-model="selectedState" :options="states" optionLabel="name" placeholder="Select" />
|
|
||||||
</div>
|
|
||||||
<div class="p-field p-col-12 p-md-3">
|
|
||||||
<label for="zip">Zip</label>
|
|
||||||
<InputText id="zip" type="text" />
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</template>
|
|
||||||
</code></pre>
|
|
||||||
|
|
||||||
<pre v-code.script><code>
|
|
||||||
export default {
|
|
||||||
data() {
|
|
||||||
return {
|
|
||||||
selectedState: null,
|
|
||||||
states: [
|
|
||||||
{name: 'Arizona', code: 'Arizona'},
|
|
||||||
{name: 'California', value: 'California'},
|
|
||||||
{name: 'Florida', code: 'Florida'},
|
|
||||||
{name: 'Ohio', code: 'Ohio'},
|
|
||||||
{name: 'Washington', code: 'Washington'}
|
|
||||||
],
|
|
||||||
cities1: [],
|
|
||||||
cities2: [],
|
|
||||||
city1: null,
|
|
||||||
city2: null
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
</code></pre>
|
|
||||||
</TabPanel>
|
|
||||||
</TabView>
|
|
||||||
</div>
|
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import LiveEditor from '../liveeditor/LiveEditor';
|
|
||||||
export default {
|
export default {
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
sources: {
|
sources: {
|
||||||
'template': {
|
'options-api': {
|
||||||
content: `<template>
|
tabName: 'Source',
|
||||||
<div class="layout-content">
|
content: `
|
||||||
<div class="content-section implementation">
|
<template>
|
||||||
|
<div>
|
||||||
<div class="card">
|
<div class="card">
|
||||||
<h5>Vertical</h5>
|
<h5>Vertical</h5>
|
||||||
<div class="p-fluid">
|
<div class="p-fluid">
|
||||||
|
@ -581,7 +397,6 @@ export default {
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
|
@ -602,8 +417,10 @@ export default {
|
||||||
city2: null
|
city2: null
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}`,
|
}
|
||||||
style: `<style lang="scss" scoped>
|
<\\/script>
|
||||||
|
|
||||||
|
<style lang="scss" scoped>
|
||||||
@media screen and (max-width: 489px) {
|
@media screen and (max-width: 489px) {
|
||||||
.p-formgroup-inline {
|
.p-formgroup-inline {
|
||||||
.p-field {
|
.p-field {
|
||||||
|
@ -619,13 +436,224 @@ export default {
|
||||||
textarea {
|
textarea {
|
||||||
resize: none;
|
resize: none;
|
||||||
}
|
}
|
||||||
</style>`
|
</style>
|
||||||
}
|
`
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
components: {
|
'composition-api': {
|
||||||
LiveEditor
|
tabName: 'Composition API',
|
||||||
|
content: `
|
||||||
|
<template>
|
||||||
|
<div>
|
||||||
|
<div class="card">
|
||||||
|
<h5>Vertical</h5>
|
||||||
|
<div class="p-fluid">
|
||||||
|
<div class="p-field">
|
||||||
|
<label for="firstname1">Firstname</label>
|
||||||
|
<InputText id="firstname1" type="text" />
|
||||||
|
</div>
|
||||||
|
<div class="p-field">
|
||||||
|
<label for="lastname1">Lastname</label>
|
||||||
|
<InputText id="lastname1" type="text" />
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="card">
|
||||||
|
<h5>Vertical and Grid</h5>
|
||||||
|
<div class="p-fluid p-formgrid p-grid">
|
||||||
|
<div class="p-field p-col">
|
||||||
|
<label for="firstname2">Firstname</label>
|
||||||
|
<InputText id="firstname2" type="text" />
|
||||||
|
</div>
|
||||||
|
<div class="p-field p-col">
|
||||||
|
<label for="lastname2">Lastname</label>
|
||||||
|
<InputText id="lastname2" type="text" />
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="card">
|
||||||
|
<h5>Horizontal and Fixed Width</h5>
|
||||||
|
<div class="p-field p-grid">
|
||||||
|
<label for="firstname3" class="p-col-fixed" style="width:100px">Firstname</label>
|
||||||
|
<div class="p-col">
|
||||||
|
<InputText id="firstname3" type="text" />
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="p-field p-grid">
|
||||||
|
<label for="lastname3" class="p-col-fixed" style="width:100px">Lastname</label>
|
||||||
|
<div class="p-col">
|
||||||
|
<InputText id="lastname3" type="text" />
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="card">
|
||||||
|
<h5>Horizontal and Fluid</h5>
|
||||||
|
<div class="p-fluid">
|
||||||
|
<div class="p-field p-grid">
|
||||||
|
<label for="firstname4" class="p-col-12 p-mb-2 p-md-2 p-mb-md-0">Firstname</label>
|
||||||
|
<div class="p-col-12 p-md-10">
|
||||||
|
<InputText id="firstname4" type="text" />
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="p-field p-grid">
|
||||||
|
<label for="lastname4" class="p-col-12 p-mb-2 p-md-2 p-mb-md-0">Lastname</label>
|
||||||
|
<div class="p-col-12 p-md-10">
|
||||||
|
<InputText id="lastname4" type="text" />
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="card">
|
||||||
|
<h5>Inline</h5>
|
||||||
|
<div class="p-formgroup-inline">
|
||||||
|
<div class="p-field">
|
||||||
|
<label for="firstname5" class="p-sr-only">Firstname</label>
|
||||||
|
<InputText id="firstname5" type="text" placeholder="Firstname" />
|
||||||
|
</div>
|
||||||
|
<div class="p-field">
|
||||||
|
<label for="lastname5" class="p-sr-only">Lastname</label>
|
||||||
|
<InputText id="lastname5" type="text" placeholder="Lastname" />
|
||||||
|
</div>
|
||||||
|
<Button type="button" label="Submit" />
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="card">
|
||||||
|
<h5>Vertical Checkbox</h5>
|
||||||
|
<div class="p-field-checkbox">
|
||||||
|
<Checkbox id="city1" name="city1" value="Chicago" v-model="cities1" />
|
||||||
|
<label for="city1">Chicago</label>
|
||||||
|
</div>
|
||||||
|
<div class="p-field-checkbox">
|
||||||
|
<Checkbox id="city2" name="city1" value="Los Angeles" v-model="cities1" />
|
||||||
|
<label for="city2">Los Angeles</label>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<h5>Horizontal Checkbox</h5>
|
||||||
|
<div class="p-formgroup-inline">
|
||||||
|
<div class="p-field-checkbox">
|
||||||
|
<Checkbox id="city3" name="city2" value="Chicago" v-model="cities2" />
|
||||||
|
<label for="city3">Chicago</label>
|
||||||
|
</div>
|
||||||
|
<div class="p-field-checkbox">
|
||||||
|
<Checkbox id="city4" name="city2" value="Los Angeles" v-model="cities2" />
|
||||||
|
<label for="city4">Los Angeles</label>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="card">
|
||||||
|
<h5>Vertical RadioButton</h5>
|
||||||
|
<div class="p-field-radiobutton">
|
||||||
|
<RadioButton id="city5" name="city1" value="Chicago" v-model="city1" />
|
||||||
|
<label for="city5">Chicago</label>
|
||||||
|
</div>
|
||||||
|
<div class="p-field-radiobutton">
|
||||||
|
<RadioButton id="city6" name="city1" value="Los Angeles" v-model="city1" />
|
||||||
|
<label for="city6">Los Angeles</label>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<h5>Horizontal RadioButton</h5>
|
||||||
|
<div class="p-formgroup-inline">
|
||||||
|
<div class="p-field-radiobutton">
|
||||||
|
<RadioButton id="city7" name="city2" value="Chicago" v-model="city2" />
|
||||||
|
<label for="city7">Chicago</label>
|
||||||
|
</div>
|
||||||
|
<div class="p-field-radiobutton">
|
||||||
|
<RadioButton id="city8" name="city2" value="Los Angeles" v-model="city2" />
|
||||||
|
<label for="city8">Los Angeles</label>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="card">
|
||||||
|
<h5>Help Text</h5>
|
||||||
|
<div class="p-field p-fluid">
|
||||||
|
<label for="username">Username</label>
|
||||||
|
<InputText id="username" type="username" aria-describedby="username-help" />
|
||||||
|
<small id="username-help">Enter your username to reset your password.</small>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="card">
|
||||||
|
<h5>Advanced</h5>
|
||||||
|
<div class="p-fluid p-formgrid p-grid">
|
||||||
|
<div class="p-field p-col-12 p-md-6">
|
||||||
|
<label for="firstname6">Firstname</label>
|
||||||
|
<InputText id="firstname6" type="text" />
|
||||||
|
</div>
|
||||||
|
<div class="p-field p-col-12 p-md-6">
|
||||||
|
<label for="lastname6">Lastname</label>
|
||||||
|
<InputText id="lastname6" type="text" />
|
||||||
|
</div>
|
||||||
|
<div class="p-field p-col-12">
|
||||||
|
<label for="address">Address</label>
|
||||||
|
<Textarea id="address" rows="4" />
|
||||||
|
</div>
|
||||||
|
<div class="p-field p-col-12 p-md-6">
|
||||||
|
<label for="city">City</label>
|
||||||
|
<InputText id="city" type="text" />
|
||||||
|
</div>
|
||||||
|
<div class="p-field p-col-12 p-md-3">
|
||||||
|
<label for="state">State</label>
|
||||||
|
<Dropdown inputId="state" v-model="selectedState" :options="states" optionLabel="name" placeholder="Select" />
|
||||||
|
</div>
|
||||||
|
<div class="p-field p-col-12 p-md-3">
|
||||||
|
<label for="zip">Zip</label>
|
||||||
|
<InputText id="zip" type="text" />
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import { ref } from 'vue';
|
||||||
|
|
||||||
|
export default {
|
||||||
|
setup() {
|
||||||
|
const selectedState = ref(null);
|
||||||
|
const states = ref([
|
||||||
|
{name: 'Arizona', code: 'Arizona'},
|
||||||
|
{name: 'California', value: 'California'},
|
||||||
|
{name: 'Florida', code: 'Florida'},
|
||||||
|
{name: 'Ohio', code: 'Ohio'},
|
||||||
|
{name: 'Washington', code: 'Washington'}
|
||||||
|
]);
|
||||||
|
const cities1 = ref([]);
|
||||||
|
const cities2 = ref([]);
|
||||||
|
const city1 = ref(null);
|
||||||
|
const city2 = ref(null);
|
||||||
|
|
||||||
|
return { selectedState, states, cities1, cities2, city1, city2 }
|
||||||
|
}
|
||||||
|
}
|
||||||
|
<\\/script>
|
||||||
|
|
||||||
|
<style lang="scss" scoped>
|
||||||
|
@media screen and (max-width: 489px) {
|
||||||
|
.p-formgroup-inline {
|
||||||
|
.p-field {
|
||||||
|
margin-bottom: 1em !important;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.layout-content .content-section.implementation > h3 {
|
||||||
|
font-weight: 600;
|
||||||
|
}
|
||||||
|
|
||||||
|
textarea {
|
||||||
|
resize: none;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
`
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
|
@ -1,5 +1,5 @@
|
||||||
<template>
|
<template>
|
||||||
<AppDoc name="FullCalendarDemo" :sources="sources" service="EventService" :data="['events']">
|
<AppDoc name="FullCalendarDemo" :sources="sources" :service="['EventService']" :data="['events']">
|
||||||
<h5>Import</h5>
|
<h5>Import</h5>
|
||||||
<pre v-code.script><code>
|
<pre v-code.script><code>
|
||||||
import FullCalendar from 'primevue/fullcalendar';
|
import FullCalendar from 'primevue/fullcalendar';
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
<template>
|
<template>
|
||||||
<AppDoc name="InplaceDemo" :sources="sources" service="ProductService" :data="['products-small']" >
|
<AppDoc name="InplaceDemo" :sources="sources" :service="['ProductService']" :data="['products-small']" >
|
||||||
<h5>Import</h5>
|
<h5>Import</h5>
|
||||||
<pre v-code.script><code>
|
<pre v-code.script><code>
|
||||||
import Inplace from 'primevue/inplace';
|
import Inplace from 'primevue/inplace';
|
||||||
|
|
|
@ -49,7 +49,7 @@
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<AppDoc name="InvalidDemo" :sources="sources" service="CountryService" :data="['countries']" />
|
<AppDoc name="InvalidDemo" :sources="sources" :service="['CountryService']" :data="['countries']" />
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
|
|
|
@ -27,7 +27,7 @@ export default {
|
||||||
default: null
|
default: null
|
||||||
},
|
},
|
||||||
service: {
|
service: {
|
||||||
type: String,
|
type: Array,
|
||||||
default: null
|
default: null
|
||||||
},
|
},
|
||||||
data: {
|
data: {
|
||||||
|
@ -142,7 +142,11 @@ export default {
|
||||||
}
|
}
|
||||||
|
|
||||||
if (this.service) {
|
if (this.service) {
|
||||||
let dataArr = [];
|
let dataArr = [], serviceArr = [];
|
||||||
|
|
||||||
|
this.service.forEach(el => {
|
||||||
|
serviceArr.push(el.split(','))
|
||||||
|
})
|
||||||
|
|
||||||
this.data.forEach(el => {
|
this.data.forEach(el => {
|
||||||
dataArr.push(el.split(','))
|
dataArr.push(el.split(','))
|
||||||
|
@ -153,18 +157,14 @@ export default {
|
||||||
_files[`public/data/${el}.json`] = {
|
_files[`public/data/${el}.json`] = {
|
||||||
content: data[el]
|
content: data[el]
|
||||||
};
|
};
|
||||||
|
|
||||||
_files[`src/service/${this.service}.js`] = {
|
|
||||||
content: `${services[this.service]}`
|
|
||||||
};
|
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
else {
|
serviceArr.forEach(serv => {
|
||||||
_files[`src/service/${this.service}.js`] = {
|
_files[`src/service/${serv}.js`] = {
|
||||||
content: `${services[this.service]}`
|
content: `${services[serv]}`
|
||||||
};
|
};
|
||||||
}
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
element += `import ${name} from "./${name}.vue"`;
|
element += `import ${name} from "./${name}.vue"`;
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
<template>
|
<template>
|
||||||
<AppDoc name="OrderListDemo" :sources="sources" service="ProductService" :data="['products-small']">
|
<AppDoc name="OrderListDemo" :sources="sources" :service="['ProductService']" :data="['products-small']">
|
||||||
<h5>Import</h5>
|
<h5>Import</h5>
|
||||||
<pre v-code.script><code>
|
<pre v-code.script><code>
|
||||||
import OrderList from 'primevue/orderlist';
|
import OrderList from 'primevue/orderlist';
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
<template>
|
<template>
|
||||||
<AppDoc name="OverlayPanelDemo" :sources="sources" service="ProductService" :data="['products-small']">
|
<AppDoc name="OverlayPanelDemo" :sources="sources" :service="['ProductService']" :data="['products-small']">
|
||||||
<h5>Import</h5>
|
<h5>Import</h5>
|
||||||
<pre v-code.script><code>
|
<pre v-code.script><code>
|
||||||
import OverlayPanel from 'primevue/overlaypanel';
|
import OverlayPanel from 'primevue/overlaypanel';
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
<template>
|
<template>
|
||||||
<AppDoc name="PickListDemo" :sources="sources" service="ProductService" :data="['products-small']">
|
<AppDoc name="PickListDemo" :sources="sources" :service="['ProductService']" :data="['products-small']">
|
||||||
<h5>Import</h5>
|
<h5>Import</h5>
|
||||||
<pre v-code.script><code>
|
<pre v-code.script><code>
|
||||||
import PickList from 'primevue/picklist';
|
import PickList from 'primevue/picklist';
|
||||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -1,5 +1,5 @@
|
||||||
<template>
|
<template>
|
||||||
<AppDoc name="TreeDemo" :sources="sources" service="NodeService" :data="['treenodes']">
|
<AppDoc name="TreeDemo" :sources="sources" :service="['NodeService']" :data="['treenodes']">
|
||||||
<h5>Import</h5>
|
<h5>Import</h5>
|
||||||
<pre v-code.script><code>
|
<pre v-code.script><code>
|
||||||
import Tree from 'primevue/tree';
|
import Tree from 'primevue/tree';
|
||||||
|
|
|
@ -17,7 +17,7 @@
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<AppDoc name="TreeFilterDemo" :sources="sources" service="NodeService" :data="['treenodes']" />
|
<AppDoc name="TreeFilterDemo" :sources="sources" :service="['NodeService']" :data="['treenodes']" />
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
|
|
|
@ -13,7 +13,7 @@
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<AppDoc name="TreeLazyDemo" :sources="sources" service="NodeService" :data="['treenodes']" />
|
<AppDoc name="TreeLazyDemo" :sources="sources" :service="['NodeService']" :data="['treenodes']" />
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
|
|
|
@ -27,7 +27,7 @@
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<AppDoc name="TreeSelectionDemo" :sources="sources" service="NodeService" :data="['treenodes']" />
|
<AppDoc name="TreeSelectionDemo" :sources="sources" :service="['NodeService']" :data="['treenodes']" />
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
|
|
|
@ -20,7 +20,7 @@
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<AppDoc name="TreeTemplatingDemo" :sources="sources" service="NodeService" :data="['treenodes']" />
|
<AppDoc name="TreeTemplatingDemo" :sources="sources" :service="['NodeService']" :data="['treenodes']" />
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
|
|
|
@ -28,7 +28,7 @@
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<AppDoc name="TreeTableColResizeDemo" :sources="sources" service="NodeService" :data="['treetablenodes']" />
|
<AppDoc name="TreeTableColResizeDemo" :sources="sources" :service="['NodeService']" :data="['treetablenodes']" />
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
|
@ -21,7 +21,7 @@
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<AppDoc name="TreetableColToggleDemo" :sources="sources" service="NodeService" :data="['treetablenodes']" />
|
<AppDoc name="TreetableColToggleDemo" :sources="sources" :service="['NodeService']" :data="['treetablenodes']" />
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
<template>
|
<template>
|
||||||
<AppDoc name="TreeTableDemo" :sources="sources" service="NodeService" :data="['treetablenodes']" >
|
<AppDoc name="TreeTableDemo" :sources="sources" :service="['NodeService']" :data="['treetablenodes']" >
|
||||||
<h5>Import</h5>
|
<h5>Import</h5>
|
||||||
<pre v-code.script><code>
|
<pre v-code.script><code>
|
||||||
import TreeTable from 'primevue/treetable';
|
import TreeTable from 'primevue/treetable';
|
||||||
|
|
|
@ -67,7 +67,7 @@
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<AppDoc name="TreeTableFilterDemo" :sources="sources" service="NodeService" :data="['treetablenodes']" />
|
<AppDoc name="TreeTableFilterDemo" :sources="sources" :service="['NodeService']" :data="['treetablenodes']" />
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
|
|
|
@ -19,7 +19,7 @@
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<AppDoc name="TreeTableLazyDemo" :sources="sources" service="NodeService" :data="['treetablenodes']" />
|
<AppDoc name="TreeTableLazyDemo" :sources="sources" :service="['NodeService']" :data="['treetablenodes']" />
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
|
|
|
@ -17,7 +17,7 @@
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<AppDoc name="TreeTablePaginatorDemo" :sources="sources" service="NodeService" :data="['treetablenodes']" />
|
<AppDoc name="TreeTablePaginatorDemo" :sources="sources" :service="['NodeService']" :data="['treetablenodes']" />
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
|
|
|
@ -26,7 +26,7 @@
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<AppDoc name="TreeTableResponsiveDemo" :sources="sources" service="NodeService" :data="['treetablenodes']" />
|
<AppDoc name="TreeTableResponsiveDemo" :sources="sources" :service="['NodeService']" :data="['treetablenodes']" />
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
|
|
|
@ -55,7 +55,7 @@
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<AppDoc name="TreeTableSelectionDemo" :sources="sources" service="NodeService" :data="['treetablenodes']" />
|
<AppDoc name="TreeTableSelectionDemo" :sources="sources" :service="['NodeService']" :data="['treetablenodes']" />
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
|
|
|
@ -42,7 +42,7 @@
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<AppDoc name="TreeTableSizeDemo" :sources="sources" service="NodeService" :data="['treetablenodes']" />
|
<AppDoc name="TreeTableSizeDemo" :sources="sources" :service="['NodeService']" :data="['treetablenodes']" />
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
|
|
|
@ -36,7 +36,7 @@
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<AppDoc name="TreeTableSortDemo" :sources="sources" service="NodeService" :data="['treetablenodes']" />
|
<AppDoc name="TreeTableSortDemo" :sources="sources" :service="['NodeService']" :data="['treetablenodes']" />
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
|
|
|
@ -34,7 +34,7 @@
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<AppDoc name="TreeTableTemplatingDemo" :sources="sources" service="NodeService" :data="['treetablenodes']" />
|
<AppDoc name="TreeTableTemplatingDemo" :sources="sources" :service="['NodeService']" :data="['treetablenodes']" />
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
Loading…
Reference in New Issue