Update demos with new content
parent
820c9267be
commit
b2d9e1f189
|
@ -145,9 +145,7 @@ export default {
|
|||
}
|
||||
|
||||
.product-list-item {
|
||||
display: -ms-flexbox;
|
||||
display: flex;
|
||||
-ms-flex-align: center;
|
||||
align-items: center;
|
||||
padding: 1rem;
|
||||
width: 100%;
|
||||
|
|
|
@ -9,16 +9,23 @@
|
|||
|
||||
<div class="content-section implementation">
|
||||
<div class="card">
|
||||
<OrderList v-model="cars" listStyle="height:auto" dataKey="vin">
|
||||
<OrderList v-model="products" listStyle="height:auto" dataKey="id">
|
||||
<template #header>
|
||||
List of Cars
|
||||
List of Products
|
||||
</template>
|
||||
<template #item="slotProps">
|
||||
<div class="p-caritem">
|
||||
<img :src="'demo/images/car/' + slotProps.item.brand + '.png'">
|
||||
<div>
|
||||
<span class="p-caritem-vin">{{slotProps.item.vin}}</span>
|
||||
<span>{{slotProps.item.year}} - {{slotProps.item.color}}</span>
|
||||
<div class="product-item">
|
||||
<div class="image-container">
|
||||
<img :src="'demo/images/product/' + slotProps.item.image" :alt="slotProps.item.name" />
|
||||
</div>
|
||||
<div class="product-list-detail">
|
||||
<h5 class="p-mb-2">{{slotProps.item.name}}</h5>
|
||||
<i class="pi pi-tag product-category-icon"></i>
|
||||
<span class="product-category">{{slotProps.item.category}}</span>
|
||||
</div>
|
||||
<div class="product-list-action">
|
||||
<h6 class="p-mb-2">${{slotProps.item.price}}</h6>
|
||||
<span :class="'product-badge status-'+slotProps.item.inventoryStatus.toLowerCase()">{{slotProps.item.inventoryStatus}}</span>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
@ -29,22 +36,23 @@
|
|||
<OrderListDoc />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import OrderListDoc from './OrderListDoc';
|
||||
import CarService from '../../service/CarService';
|
||||
import ProductService from '../../service/ProductService';
|
||||
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
cars: null
|
||||
products: null
|
||||
}
|
||||
},
|
||||
carService: null,
|
||||
productService: null,
|
||||
created() {
|
||||
this.carService = new CarService();
|
||||
this.productService = new ProductService();
|
||||
},
|
||||
mounted() {
|
||||
this.carService.getCarsSmall().then(data => this.cars = data.slice(0,5));
|
||||
this.productService.getProductsSmall().then(data => this.products = data);
|
||||
},
|
||||
components: {
|
||||
'OrderListDoc': OrderListDoc
|
||||
|
@ -53,25 +61,52 @@ export default {
|
|||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.p-caritem {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
.product-item {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
padding: .5rem;
|
||||
width: 100%;
|
||||
|
||||
div {
|
||||
display: flex;
|
||||
img {
|
||||
width: 75px;
|
||||
box-shadow: 0 3px 6px rgba(0, 0, 0, 0.16), 0 3px 6px rgba(0, 0, 0, 0.23);
|
||||
margin-right: 1rem;
|
||||
}
|
||||
|
||||
.product-list-detail {
|
||||
flex: 1 1 0;
|
||||
}
|
||||
|
||||
.product-list-action {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: flex-end;
|
||||
}
|
||||
|
||||
.p-caritem-vin {
|
||||
font-weight: 600;
|
||||
display: block;
|
||||
margin-bottom: .25rem;
|
||||
}
|
||||
|
||||
img {
|
||||
width: 48px;
|
||||
height: 48px;
|
||||
|
||||
.product-category-icon {
|
||||
vertical-align: middle;
|
||||
margin-right: .5rem;
|
||||
}
|
||||
|
||||
.product-category {
|
||||
vertical-align: middle;
|
||||
line-height: 1;
|
||||
}
|
||||
}
|
||||
|
||||
@media screen and (max-width: 576px) {
|
||||
.product-item {
|
||||
flex-wrap: wrap;
|
||||
|
||||
.image-container {
|
||||
width: 100%;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
img {
|
||||
margin: 0 0 1rem 0;
|
||||
width: 100px;
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
|
@ -170,16 +170,23 @@ import OrderList from 'primevue/orderlist';
|
|||
</a>
|
||||
<CodeHighlight>
|
||||
<template v-pre>
|
||||
<OrderList v-model="cars" listStyle="height:auto" dataKey="vin">
|
||||
<OrderList v-model="products" listStyle="height:auto" dataKey="id">
|
||||
<template #header>
|
||||
List of Cars
|
||||
List of Products
|
||||
</template>
|
||||
<template #item="slotProps">
|
||||
<div class="p-caritem">
|
||||
<img :src="'demo/images/car/' + slotProps.item.brand + '.png'">
|
||||
<div>
|
||||
<span class="p-caritem-vin">{{slotProps.item.vin}}</span>
|
||||
<span>{{slotProps.item.year}} - {{slotProps.item.color}}</span>
|
||||
<div class="product-item">
|
||||
<div class="image-container">
|
||||
<img :src="'demo/images/product/' + slotProps.item.image" :alt="slotProps.item.name" />
|
||||
</div>
|
||||
<div class="product-list-detail">
|
||||
<h5 class="p-mb-2">{{slotProps.item.name}}</h5>
|
||||
<i class="pi pi-tag product-category-icon"></i>
|
||||
<span class="product-category">{{slotProps.item.category}}</span>
|
||||
</div>
|
||||
<div class="product-list-action">
|
||||
<h6 class="p-mb-2">${{slotProps.item.price}}</h6>
|
||||
<span :class="'product-badge status-'+slotProps.item.inventoryStatus.toLowerCase()">{{slotProps.item.inventoryStatus}}</span>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
@ -188,45 +195,72 @@ import OrderList from 'primevue/orderlist';
|
|||
</CodeHighlight>
|
||||
|
||||
<CodeHighlight lang="js">
|
||||
import CarService from '../../service/CarService';
|
||||
import ProductService from '../../service/ProductService';
|
||||
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
cars: null
|
||||
products: null
|
||||
}
|
||||
},
|
||||
carService: null,
|
||||
productService: null,
|
||||
created() {
|
||||
this.carService = new CarService();
|
||||
this.productService = new ProductService();
|
||||
},
|
||||
mounted() {
|
||||
this.carService.getCarsSmall().then(data => this.cars = data.slice(0,5));
|
||||
this.productService.getProductsSmall().then(data => this.products = data);
|
||||
}
|
||||
}
|
||||
</CodeHighlight>
|
||||
|
||||
<CodeHighlight lang="css">
|
||||
.p-caritem {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
.product-item {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
padding: .5rem;
|
||||
width: 100%;
|
||||
|
||||
div {
|
||||
display: flex;
|
||||
img {
|
||||
width: 75px;
|
||||
box-shadow: 0 3px 6px rgba(0, 0, 0, 0.16), 0 3px 6px rgba(0, 0, 0, 0.23);
|
||||
margin-right: 1rem;
|
||||
}
|
||||
|
||||
.product-list-detail {
|
||||
flex: 1 1 0;
|
||||
}
|
||||
|
||||
.product-list-action {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: flex-end;
|
||||
}
|
||||
|
||||
.p-caritem-vin {
|
||||
font-weight: 600;
|
||||
display: block;
|
||||
margin-bottom: .25rem;
|
||||
}
|
||||
|
||||
img {
|
||||
width: 48px;
|
||||
height: 48px;
|
||||
|
||||
.product-category-icon {
|
||||
vertical-align: middle;
|
||||
margin-right: .5rem;
|
||||
}
|
||||
|
||||
.product-category {
|
||||
vertical-align: middle;
|
||||
line-height: 1;
|
||||
}
|
||||
}
|
||||
|
||||
@media screen and (max-width: 576px) {
|
||||
.product-item {
|
||||
flex-wrap: wrap;
|
||||
|
||||
.image-container {
|
||||
width: 100%;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
img {
|
||||
margin: 0 0 1rem 0;
|
||||
width: 100px;
|
||||
}
|
||||
}
|
||||
}
|
||||
</CodeHighlight>
|
||||
</TabPanel>
|
||||
|
|
|
@ -9,7 +9,7 @@
|
|||
|
||||
<div class="content-section implementation">
|
||||
<div class="card">
|
||||
<PickList v-model="cars" listStyle="height:342px" dataKey="vin">
|
||||
<PickList v-model="products" listStyle="height:342px" dataKey="id">
|
||||
<template #sourceHeader>
|
||||
Available
|
||||
</template>
|
||||
|
@ -17,11 +17,18 @@
|
|||
Selected
|
||||
</template>
|
||||
<template #item="slotProps">
|
||||
<div class="p-caritem">
|
||||
<img :src="'demo/images/car/' + slotProps.item.brand + '.png'">
|
||||
<div>
|
||||
<span class="p-caritem-vin">{{slotProps.item.vin}}</span>
|
||||
<span>{{slotProps.item.year}} - {{slotProps.item.color}}</span>
|
||||
<div class="product-item">
|
||||
<div class="image-container">
|
||||
<img :src="'demo/images/product/' + slotProps.item.image" :alt="slotProps.item.name" />
|
||||
</div>
|
||||
<div class="product-list-detail">
|
||||
<h5 class="p-mb-2">{{slotProps.item.name}}</h5>
|
||||
<i class="pi pi-tag product-category-icon"></i>
|
||||
<span class="product-category">{{slotProps.item.category}}</span>
|
||||
</div>
|
||||
<div class="product-list-action">
|
||||
<h6 class="p-mb-2">${{slotProps.item.price}}</h6>
|
||||
<span :class="'product-badge status-'+slotProps.item.inventoryStatus.toLowerCase()">{{slotProps.item.inventoryStatus}}</span>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
@ -32,22 +39,23 @@
|
|||
<PickListDoc />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import PickListDoc from './PickListDoc';
|
||||
import CarService from '../../service/CarService';
|
||||
import ProductService from '../../service/ProductService';
|
||||
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
cars: null
|
||||
products: null
|
||||
}
|
||||
},
|
||||
carService: null,
|
||||
productService: null,
|
||||
created() {
|
||||
this.carService = new CarService();
|
||||
this.productService = new ProductService();
|
||||
},
|
||||
mounted() {
|
||||
this.carService.getCarsSmall().then(data => this.cars = [data.slice(0,5),[]]);
|
||||
this.productService.getProductsSmall().then(data => this.products = [data, []]);
|
||||
},
|
||||
components: {
|
||||
'PickListDoc': PickListDoc
|
||||
|
@ -56,25 +64,52 @@ export default {
|
|||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.p-caritem {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
.product-item {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
padding: .5rem;
|
||||
width: 100%;
|
||||
|
||||
div {
|
||||
display: flex;
|
||||
img {
|
||||
width: 75px;
|
||||
box-shadow: 0 3px 6px rgba(0, 0, 0, 0.16), 0 3px 6px rgba(0, 0, 0, 0.23);
|
||||
margin-right: 1rem;
|
||||
}
|
||||
|
||||
.product-list-detail {
|
||||
flex: 1 1 0;
|
||||
}
|
||||
|
||||
.product-list-action {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: flex-end;
|
||||
}
|
||||
|
||||
.p-caritem-vin {
|
||||
font-weight: 600;
|
||||
display: block;
|
||||
margin-bottom: .25rem;
|
||||
}
|
||||
|
||||
img {
|
||||
width: 48px;
|
||||
height: 48px;
|
||||
|
||||
.product-category-icon {
|
||||
vertical-align: middle;
|
||||
margin-right: .5rem;
|
||||
}
|
||||
|
||||
.product-category {
|
||||
vertical-align: middle;
|
||||
line-height: 1;
|
||||
}
|
||||
}
|
||||
|
||||
@media screen and (max-width: 576px) {
|
||||
.product-item {
|
||||
flex-wrap: wrap;
|
||||
|
||||
.image-container {
|
||||
width: 100%;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
img {
|
||||
margin: 0 0 1rem 0;
|
||||
width: 100px;
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
|
@ -229,7 +229,7 @@ import PickList from 'primevue/picklist';
|
|||
</a>
|
||||
<CodeHighlight>
|
||||
<template v-pre>
|
||||
<PickList v-model="cars" listStyle="height:342px" dataKey="vin">
|
||||
<PickList v-model="products" listStyle="height:342px" dataKey="id">
|
||||
<template #sourceHeader>
|
||||
Available
|
||||
</template>
|
||||
|
@ -237,11 +237,18 @@ import PickList from 'primevue/picklist';
|
|||
Selected
|
||||
</template>
|
||||
<template #item="slotProps">
|
||||
<div class="p-caritem">
|
||||
<img :src="'demo/images/car/' + slotProps.item.brand + '.png'">
|
||||
<div>
|
||||
<span class="p-caritem-vin">{{slotProps.item.vin}}</span>
|
||||
<span>{{slotProps.item.year}} - {{slotProps.item.color}}</span>
|
||||
<div class="product-item">
|
||||
<div class="image-container">
|
||||
<img :src="'demo/images/product/' + slotProps.item.image" :alt="slotProps.item.name" />
|
||||
</div>
|
||||
<div class="product-list-detail">
|
||||
<h5 class="p-mb-2">{{slotProps.item.name}}</h5>
|
||||
<i class="pi pi-tag product-category-icon"></i>
|
||||
<span class="product-category">{{slotProps.item.category}}</span>
|
||||
</div>
|
||||
<div class="product-list-action">
|
||||
<h6 class="p-mb-2">${{slotProps.item.price}}</h6>
|
||||
<span :class="'product-badge status-'+slotProps.item.inventoryStatus.toLowerCase()">{{slotProps.item.inventoryStatus}}</span>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
@ -250,45 +257,72 @@ import PickList from 'primevue/picklist';
|
|||
</CodeHighlight>
|
||||
|
||||
<CodeHighlight lang="js">
|
||||
import CarService from '../../service/CarService';
|
||||
import ProductService from '../../service/ProductService';
|
||||
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
cars: null
|
||||
products: null
|
||||
}
|
||||
},
|
||||
carService: null,
|
||||
productService: null,
|
||||
created() {
|
||||
this.carService = new CarService();
|
||||
this.productService = new ProductService();
|
||||
},
|
||||
mounted() {
|
||||
this.carService.getCarsSmall().then(data => this.cars = [data.slice(0,5),[]]);
|
||||
this.productService.getProductsSmall().then(data => this.products = [data, []]);
|
||||
}
|
||||
}
|
||||
</CodeHighlight>
|
||||
|
||||
<CodeHighlight lang="css">
|
||||
.p-caritem {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
product-item {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
padding: .5rem;
|
||||
width: 100%;
|
||||
|
||||
div {
|
||||
display: flex;
|
||||
img {
|
||||
width: 75px;
|
||||
box-shadow: 0 3px 6px rgba(0, 0, 0, 0.16), 0 3px 6px rgba(0, 0, 0, 0.23);
|
||||
margin-right: 1rem;
|
||||
}
|
||||
|
||||
.product-list-detail {
|
||||
flex: 1 1 0;
|
||||
}
|
||||
|
||||
.product-list-action {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: flex-end;
|
||||
}
|
||||
|
||||
.p-caritem-vin {
|
||||
font-weight: 600;
|
||||
display: block;
|
||||
margin-bottom: .25rem;
|
||||
}
|
||||
|
||||
img {
|
||||
width: 48px;
|
||||
height: 48px;
|
||||
|
||||
.product-category-icon {
|
||||
vertical-align: middle;
|
||||
margin-right: .5rem;
|
||||
}
|
||||
|
||||
.product-category {
|
||||
vertical-align: middle;
|
||||
line-height: 1;
|
||||
}
|
||||
}
|
||||
|
||||
@media screen and (max-width: 576px) {
|
||||
.product-item {
|
||||
flex-wrap: wrap;
|
||||
|
||||
.image-container {
|
||||
width: 100%;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
img {
|
||||
margin: 0 0 1rem 0;
|
||||
width: 100px;
|
||||
}
|
||||
}
|
||||
}
|
||||
</CodeHighlight>
|
||||
</TabPanel>
|
||||
|
|
|
@ -12,7 +12,7 @@
|
|||
<h5>Basic {{val1}}</h5>
|
||||
<Rating v-model="val1" />
|
||||
|
||||
<h5>No Cancel {{val2}}</h5>
|
||||
<h5>Without Cancel</h5>
|
||||
<Rating v-model="val2" :cancel="false" />
|
||||
|
||||
<h5>ReadOnly</h5>
|
||||
|
|
|
@ -142,7 +142,7 @@ import Rating from 'primevue/rating';
|
|||
<h3>Basic {{val1}}</h3>
|
||||
<Rating v-model="val1" />
|
||||
|
||||
<h3>No Cancel {{val2}}</h3>
|
||||
<h3>Without Cancel</h3>
|
||||
<Rating v-model="val2" :cancel="false" />
|
||||
|
||||
<h3>ReadOnly</h3>
|
||||
|
|
|
@ -31,7 +31,7 @@ import TextareaDoc from './TextareaDoc'
|
|||
export default {
|
||||
data() {
|
||||
return {
|
||||
value1: 'Welcome to PrimeVue',
|
||||
value1: '',
|
||||
value2: '',
|
||||
value3: ''
|
||||
}
|
||||
|
|
|
@ -95,7 +95,7 @@ import Textarea from 'primevue/textarea';
|
|||
export default {
|
||||
data() {
|
||||
return {
|
||||
value1: 'Welcome to PrimeVue',
|
||||
value1: '',
|
||||
value2: '',
|
||||
value3: ''
|
||||
}
|
||||
|
|
|
@ -11,11 +11,9 @@
|
|||
<div class="card">
|
||||
<h5>Basic</h5>
|
||||
<ToggleButton v-model="checked1" onIcon="pi pi-check" offIcon="pi pi-times" />
|
||||
<p>{{checked1}}</p>
|
||||
|
||||
<h5>Customized</h5>
|
||||
<ToggleButton v-model="checked2" onLabel="I confirm" offLabel="I reject" onIcon="pi pi-check" offIcon="pi pi-times" style="width: 10em" />
|
||||
<p>{{checked2}}</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
|
|
@ -168,11 +168,9 @@ export default {
|
|||
<template v-pre>
|
||||
<h3>Basic</h3>
|
||||
<ToggleButton v-model="checked1" onIcon="pi pi-check" offIcon="pi pi-times" />
|
||||
<p>{{checked1}}</p>
|
||||
|
||||
<h3>Customized</h3>
|
||||
<ToggleButton v-model="checked2" onLabel="I confirm" offLabel="I reject" onIcon="pi pi-check" offIcon="pi pi-times" style="width: 10em" />
|
||||
<p>{{checked2}}</p>
|
||||
</template>
|
||||
</CodeHighlight>
|
||||
|
||||
|
|
Loading…
Reference in New Issue