diff --git a/public/demo/data/products-small.json b/public/demo/data/products-small.json new file mode 100644 index 000000000..0daf2ccf2 --- /dev/null +++ b/public/demo/data/products-small.json @@ -0,0 +1,124 @@ +{ + "data": [ + { + "id": "1000", + "code": "f230fh0g3", + "name": "Bamboo Watch", + "description": "Product Description", + "image": "bamboo-watch.jpg", + "price": 65, + "category": "Accessories", + "quantity": 24, + "inventoryStatus": "INSTOCK", + "rating": 5 + }, + { + "id": "1001", + "code": "nvklal433", + "name": "Black Watch", + "description": "Product Description", + "image": "black-watch.jpg", + "price": 72, + "category": "Accessories", + "quantity": 61, + "inventoryStatus": "INSTOCK", + "rating": 4 + }, + { + "id": "1002", + "code": "zz21cz3c1", + "name": "Blue Band", + "description": "Product Description", + "image": "blue-band.jpg", + "price": 79, + "category": "Fitness", + "quantity": 2, + "inventoryStatus": "LOWSTOCK", + "rating": 3 + }, + { + "id": "1003", + "code": "244wgerg2", + "name": "Blue T-Shirt", + "description": "Product Description", + "image": "blue-t-shirt.jpg", + "price": 29, + "category": "Clothing", + "quantity": 25, + "inventoryStatus": "INSTOCK", + "rating": 5 + }, + { + "id": "1004", + "code": "h456wer53", + "name": "Bracelet", + "description": "Product Description", + "image": "bracelet.jpg", + "price": 15, + "category": "Accessories", + "quantity": 73, + "inventoryStatus": "INSTOCK", + "rating": 4 + }, + { + "id": "1005", + "code": "av2231fwg", + "name": "Brown Purse", + "description": "Product Description", + "image": "brown-purse.jpg", + "price": 120, + "category": "Accessories", + "quantity": 0, + "inventoryStatus": "OUTOFSTOCK", + "rating": 4 + }, + { + "id": "1006", + "code": "bib36pfvm", + "name": "Chakra Bracelet", + "description": "Product Description", + "image": "chakra-bracelet.jpg", + "price": 32, + "category": "Accessories", + "quantity": 5, + "inventoryStatus": "LOWSTOCK", + "rating": 3 + }, + { + "id": "1007", + "code": "mbvjkgip5", + "name": "Galaxy Earrings", + "description": "Product Description", + "image": "galaxy-earrings.jpg", + "price": 34, + "category": "Accessories", + "quantity": 23, + "inventoryStatus": "INSTOCK", + "rating": 5 + }, + { + "id": "1008", + "code": "vbb124btr", + "name": "Game Controller", + "description": "Product Description", + "image": "game-controller.jpg", + "price": 99, + "category": "Electronics", + "quantity": 2, + "inventoryStatus": "LOWSTOCK", + "rating": 4 + }, + { + "id": "1009", + "code": "cm230f032", + "name": "Gaming Set", + "description": "Product Description", + "image": "gaming-set.jpg", + "price": 299, + "category": "Electronics", + "quantity": 63, + "inventoryStatus": "INSTOCK", + "rating": 3 + } + ] +} \ No newline at end of file diff --git a/public/demo/data/products.json b/public/demo/data/products.json new file mode 100644 index 000000000..c3dad4d02 --- /dev/null +++ b/public/demo/data/products.json @@ -0,0 +1,364 @@ +{ + "data": [ + { + "id": "1000", + "code": "f230fh0g3", + "name": "Bamboo Watch", + "description": "Product Description", + "image": "bamboo-watch.jpg", + "price": 65, + "category": "Accessories", + "quantity": 24, + "inventoryStatus": "INSTOCK", + "rating": 5 + }, + { + "id": "1001", + "code": "nvklal433", + "name": "Black Watch", + "description": "Product Description", + "image": "black-watch.jpg", + "price": 72, + "category": "Accessories", + "quantity": 61, + "inventoryStatus": "INSTOCK", + "rating": 4 + }, + { + "id": "1002", + "code": "zz21cz3c1", + "name": "Blue Band", + "description": "Product Description", + "image": "blue-band.jpg", + "price": 79, + "category": "Fitness", + "quantity": 2, + "inventoryStatus": "LOWSTOCK", + "rating": 3 + }, + { + "id": "1003", + "code": "244wgerg2", + "name": "Blue T-Shirt", + "description": "Product Description", + "image": "blue-t-shirt.jpg", + "price": 29, + "category": "Clothing", + "quantity": 25, + "inventoryStatus": "INSTOCK", + "rating": 5 + }, + { + "id": "1004", + "code": "h456wer53", + "name": "Bracelet", + "description": "Product Description", + "image": "bracelet.jpg", + "price": 15, + "category": "Accessories", + "quantity": 73, + "inventoryStatus": "INSTOCK", + "rating": 4 + }, + { + "id": "1005", + "code": "av2231fwg", + "name": "Brown Purse", + "description": "Product Description", + "image": "brown-purse.jpg", + "price": 120, + "category": "Accessories", + "quantity": 0, + "inventoryStatus": "OUTOFSTOCK", + "rating": 4 + }, + { + "id": "1006", + "code": "bib36pfvm", + "name": "Chakra Bracelet", + "description": "Product Description", + "image": "chakra-bracelet.jpg", + "price": 32, + "category": "Accessories", + "quantity": 5, + "inventoryStatus": "LOWSTOCK", + "rating": 3 + }, + { + "id": "1007", + "code": "mbvjkgip5", + "name": "Galaxy Earrings", + "description": "Product Description", + "image": "galaxy-earrings.jpg", + "price": 34, + "category": "Accessories", + "quantity": 23, + "inventoryStatus": "INSTOCK", + "rating": 5 + }, + { + "id": "1008", + "code": "vbb124btr", + "name": "Game Controller", + "description": "Product Description", + "image": "game-controller.jpg", + "price": 99, + "category": "Electronics", + "quantity": 2, + "inventoryStatus": "LOWSTOCK", + "rating": 4 + }, + { + "id": "1009", + "code": "cm230f032", + "name": "Gaming Set", + "description": "Product Description", + "image": "gaming-set.jpg", + "price": 299, + "category": "Electronics", + "quantity": 63, + "inventoryStatus": "INSTOCK", + "rating": 3 + }, + { + "id": "1010", + "code": "plb34234v", + "name": "Gold Phone Case", + "description": "Product Description", + "image": "gold-phone-case.jpg", + "price": 24, + "category": "Accessories", + "quantity": 0, + "inventoryStatus": "OUTOFSTOCK", + "rating": 4 + }, + { + "id": "1011", + "code": "4920nnc2d", + "name": "Green Earbuds", + "description": "Product Description", + "image": "green-earbuds.jpg", + "price": 89, + "category": "Electronics", + "quantity": 23, + "inventoryStatus": "INSTOCK", + "rating": 4 + }, + { + "id": "1012", + "code": "250vm23cc", + "name": "Green T-Shirt", + "description": "Product Description", + "image": "green-t-shirt.jpg", + "price": 49, + "category": "Clothing", + "quantity": 74, + "inventoryStatus": "INSTOCK", + "rating": 5 + }, + { + "id": "1013", + "code": "fldsmn31b", + "name": "Grey T-Shirt", + "description": "Product Description", + "image": "grey-t-shirt.jpg", + "price": 48, + "category": "Clothing", + "quantity": 0, + "inventoryStatus": "OUTOFSTOCK", + "rating": 3 + }, + { + "id": "1014", + "code": "waas1x2as", + "name": "Headphones", + "description": "Product Description", + "image": "headphones.jpg", + "price": 175, + "category": "Electronics", + "quantity": 8, + "inventoryStatus": "LOWSTOCK", + "rating": 5 + }, + { + "id": "1015", + "code": "vb34btbg5", + "name": "Light Green T-Shirt", + "description": "Product Description", + "image": "light-green-t-shirt.jpg", + "price": 49, + "category": "Clothing", + "quantity": 34, + "inventoryStatus": "INSTOCK", + "rating": 4 + }, + { + "id": "1016", + "code": "k8l6j58jl", + "name": "Lime Band", + "description": "Product Description", + "image": "lime-band.jpg", + "price": 79, + "category": "Fitness", + "quantity": 12, + "inventoryStatus": "INSTOCK", + "rating": 3 + }, + { + "id": "1017", + "code": "v435nn85n", + "name": "Mini Speakers", + "description": "Product Description", + "image": "mini-speakers.jpg", + "price": 85, + "category": "Clothing", + "quantity": 42, + "inventoryStatus": "INSTOCK", + "rating": 4 + }, + { + "id": "1018", + "code": "09zx9c0zc", + "name": "Painted Phone Case", + "description": "Product Description", + "image": "painted-phone-case.jpg", + "price": 56, + "category": "Accessories", + "quantity": 41, + "inventoryStatus": "INSTOCK", + "rating": 5 + }, + { + "id": "1019", + "code": "mnb5mb2m5", + "name": "Pink Band", + "description": "Product Description", + "image": "pink-band.jpg", + "price": 79, + "category": "Fitness", + "quantity": 63, + "inventoryStatus": "INSTOCK", + "rating": 4 + }, + { + "id": "1020", + "code": "r23fwf2w3", + "name": "Pink Purse", + "description": "Product Description", + "image": "pink-purse.jpg", + "price": 110, + "category": "Accessories", + "quantity": 0, + "inventoryStatus": "OUTOFSTOCK", + "rating": 4 + }, + { + "id": "1021", + "code": "pxpzczo23", + "name": "Purple Band", + "description": "Product Description", + "image": "purple-band.jpg", + "price": 79, + "category": "Fitness", + "quantity": 6, + "inventoryStatus": "LOWSTOCK", + "rating": 3 + }, + { + "id": "1022", + "code": "2c42cb5cb", + "name": "Purple Gemstone Necklace", + "description": "Product Description", + "image": "purple-gemstone-necklace.jpg", + "price": 45, + "category": "Accessories", + "quantity": 62, + "inventoryStatus": "INSTOCK", + "rating": 4 + }, + { + "id": "1023", + "code": "5k43kkk23", + "name": "Purple T-Shirt", + "description": "Product Description", + "image": "purple-t-shirt.jpg", + "price": 49, + "category": "Clothing", + "quantity": 2, + "inventoryStatus": "LOWSTOCK", + "rating": 5 + }, + { + "id": "1024", + "code": "lm2tny2k4", + "name": "Shoes", + "description": "Product Description", + "image": "shoes.jpg", + "price": 64, + "category": "Clothing", + "quantity": 0, + "inventoryStatus": "INSTOCK", + "rating": 4 + }, + { + "id": "1025", + "code": "nbm5mv45n", + "name": "Sneakers", + "description": "Product Description", + "image": "sneakers.jpg", + "price": 78, + "category": "Clothing", + "quantity": 52, + "inventoryStatus": "INSTOCK", + "rating": 4 + }, + { + "id": "1026", + "code": "zx23zc42c", + "name": "Teal T-Shirt", + "description": "Product Description", + "image": "teal-t-shirt.jpg", + "price": 49, + "category": "Clothing", + "quantity": 3, + "inventoryStatus": "LOWSTOCK", + "rating": 3 + }, + { + "id": "1027", + "code": "acvx872gc", + "name": "Yellow Earbuds", + "description": "Product Description", + "image": "yellow-earbuds.jpg", + "price": 89, + "category": "Electronics", + "quantity": 35, + "inventoryStatus": "INSTOCK", + "rating": 3 + }, + { + "id": "1028", + "code": "tx125ck42", + "name": "Yoga Mat", + "description": "Product Description", + "image": "yoga-mat.jpg", + "price": 20, + "category": "Fitness", + "quantity": 15, + "inventoryStatus": "INSTOCK", + "rating": 5 + }, + { + "id": "1029", + "code": "gwuby345v", + "name": "Yoga Set", + "description": "Product Description", + "image": "yoga-set.jpg", + "price": 20, + "category": "Fitness", + "quantity": 25, + "inventoryStatus": "INSTOCK", + "rating": 8 + } + ] +} diff --git a/public/demo/images/product/bamboo-watch.jpg b/public/demo/images/product/bamboo-watch.jpg new file mode 100644 index 000000000..dbff9ed44 Binary files /dev/null and b/public/demo/images/product/bamboo-watch.jpg differ diff --git a/public/demo/images/product/black-watch.jpg b/public/demo/images/product/black-watch.jpg new file mode 100644 index 000000000..03f8bd44d Binary files /dev/null and b/public/demo/images/product/black-watch.jpg differ diff --git a/public/demo/images/product/blue-band.jpg b/public/demo/images/product/blue-band.jpg new file mode 100644 index 000000000..3b84a9a34 Binary files /dev/null and b/public/demo/images/product/blue-band.jpg differ diff --git a/public/demo/images/product/blue-t-shirt.jpg b/public/demo/images/product/blue-t-shirt.jpg new file mode 100644 index 000000000..3287ead69 Binary files /dev/null and b/public/demo/images/product/blue-t-shirt.jpg differ diff --git a/public/demo/images/product/bracelet.jpg b/public/demo/images/product/bracelet.jpg new file mode 100644 index 000000000..61776652e Binary files /dev/null and b/public/demo/images/product/bracelet.jpg differ diff --git a/public/demo/images/product/brown-purse.jpg b/public/demo/images/product/brown-purse.jpg new file mode 100644 index 000000000..04115718d Binary files /dev/null and b/public/demo/images/product/brown-purse.jpg differ diff --git a/public/demo/images/product/chakra-bracelet.jpg b/public/demo/images/product/chakra-bracelet.jpg new file mode 100644 index 000000000..29f4771b2 Binary files /dev/null and b/public/demo/images/product/chakra-bracelet.jpg differ diff --git a/public/demo/images/product/galaxy-earrings.jpg b/public/demo/images/product/galaxy-earrings.jpg new file mode 100644 index 000000000..ad0b1b1bb Binary files /dev/null and b/public/demo/images/product/galaxy-earrings.jpg differ diff --git a/public/demo/images/product/game-controller.jpg b/public/demo/images/product/game-controller.jpg new file mode 100644 index 000000000..6d309ee52 Binary files /dev/null and b/public/demo/images/product/game-controller.jpg differ diff --git a/public/demo/images/product/gaming-set.jpg b/public/demo/images/product/gaming-set.jpg new file mode 100644 index 000000000..9fdbe6c51 Binary files /dev/null and b/public/demo/images/product/gaming-set.jpg differ diff --git a/public/demo/images/product/gold-phone-case.jpg b/public/demo/images/product/gold-phone-case.jpg new file mode 100644 index 000000000..76719685f Binary files /dev/null and b/public/demo/images/product/gold-phone-case.jpg differ diff --git a/public/demo/images/product/green-earbuds.jpg b/public/demo/images/product/green-earbuds.jpg new file mode 100644 index 000000000..781310500 Binary files /dev/null and b/public/demo/images/product/green-earbuds.jpg differ diff --git a/public/demo/images/product/green-t-shirt.jpg b/public/demo/images/product/green-t-shirt.jpg new file mode 100644 index 000000000..fdb70a736 Binary files /dev/null and b/public/demo/images/product/green-t-shirt.jpg differ diff --git a/public/demo/images/product/grey-t-shirt.jpg b/public/demo/images/product/grey-t-shirt.jpg new file mode 100644 index 000000000..5b6d78ace Binary files /dev/null and b/public/demo/images/product/grey-t-shirt.jpg differ diff --git a/public/demo/images/product/headphones.jpg b/public/demo/images/product/headphones.jpg new file mode 100644 index 000000000..5f9f31dee Binary files /dev/null and b/public/demo/images/product/headphones.jpg differ diff --git a/public/demo/images/product/light-green-t-shirt.jpg b/public/demo/images/product/light-green-t-shirt.jpg new file mode 100644 index 000000000..2fb621979 Binary files /dev/null and b/public/demo/images/product/light-green-t-shirt.jpg differ diff --git a/public/demo/images/product/lime-band.jpg b/public/demo/images/product/lime-band.jpg new file mode 100644 index 000000000..5627c6b8b Binary files /dev/null and b/public/demo/images/product/lime-band.jpg differ diff --git a/public/demo/images/product/mini-speakers.jpg b/public/demo/images/product/mini-speakers.jpg new file mode 100644 index 000000000..8883aa24a Binary files /dev/null and b/public/demo/images/product/mini-speakers.jpg differ diff --git a/public/demo/images/product/painted-phone-case.jpg b/public/demo/images/product/painted-phone-case.jpg new file mode 100644 index 000000000..5da5f002d Binary files /dev/null and b/public/demo/images/product/painted-phone-case.jpg differ diff --git a/public/demo/images/product/pink-band.jpg b/public/demo/images/product/pink-band.jpg new file mode 100644 index 000000000..50124ad17 Binary files /dev/null and b/public/demo/images/product/pink-band.jpg differ diff --git a/public/demo/images/product/pink-purse.jpg b/public/demo/images/product/pink-purse.jpg new file mode 100644 index 000000000..a5e864fe8 Binary files /dev/null and b/public/demo/images/product/pink-purse.jpg differ diff --git a/public/demo/images/product/purple-band.jpg b/public/demo/images/product/purple-band.jpg new file mode 100644 index 000000000..17523fecd Binary files /dev/null and b/public/demo/images/product/purple-band.jpg differ diff --git a/public/demo/images/product/purple-gemstone-necklace.jpg b/public/demo/images/product/purple-gemstone-necklace.jpg new file mode 100644 index 000000000..a40d4b3a5 Binary files /dev/null and b/public/demo/images/product/purple-gemstone-necklace.jpg differ diff --git a/public/demo/images/product/purple-t-shirt.jpg b/public/demo/images/product/purple-t-shirt.jpg new file mode 100644 index 000000000..12d75f184 Binary files /dev/null and b/public/demo/images/product/purple-t-shirt.jpg differ diff --git a/public/demo/images/product/shoes.jpg b/public/demo/images/product/shoes.jpg new file mode 100644 index 000000000..efc7aca00 Binary files /dev/null and b/public/demo/images/product/shoes.jpg differ diff --git a/public/demo/images/product/sneakers.jpg b/public/demo/images/product/sneakers.jpg new file mode 100644 index 000000000..53f66dce9 Binary files /dev/null and b/public/demo/images/product/sneakers.jpg differ diff --git a/public/demo/images/product/teal-t-shirt.jpg b/public/demo/images/product/teal-t-shirt.jpg new file mode 100644 index 000000000..749ae9d58 Binary files /dev/null and b/public/demo/images/product/teal-t-shirt.jpg differ diff --git a/public/demo/images/product/yellow-earbuds.jpg b/public/demo/images/product/yellow-earbuds.jpg new file mode 100644 index 000000000..1bfc87ab5 Binary files /dev/null and b/public/demo/images/product/yellow-earbuds.jpg differ diff --git a/public/demo/images/product/yoga-mat.jpg b/public/demo/images/product/yoga-mat.jpg new file mode 100644 index 000000000..18d956487 Binary files /dev/null and b/public/demo/images/product/yoga-mat.jpg differ diff --git a/public/demo/images/product/yoga-set.jpg b/public/demo/images/product/yoga-set.jpg new file mode 100644 index 000000000..734ba5839 Binary files /dev/null and b/public/demo/images/product/yoga-set.jpg differ diff --git a/src/service/ProductService.js b/src/service/ProductService.js new file mode 100644 index 000000000..2ae3079b0 --- /dev/null +++ b/src/service/ProductService.js @@ -0,0 +1,12 @@ +import axios from 'axios'; + +export default class ProductService { + + getProductsSmall() { + return axios.get('demo/data/products-small.json').then(res => res.data.data); + } + + getProducts() { + return axios.get('demo/data/products.json').then(res => res.data.data); + } +} diff --git a/src/views/datatable/DataTableBasicDemo.vue b/src/views/datatable/DataTableBasicDemo.vue index 922d5602c..5a68bc8b3 100755 --- a/src/views/datatable/DataTableBasicDemo.vue +++ b/src/views/datatable/DataTableBasicDemo.vue @@ -9,11 +9,11 @@
- - - - - + + + + +
@@ -23,30 +23,30 @@ -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); + this.productService.getProductsSmall().then(data => this.products = data); } } @@ -57,19 +57,20 @@ export default { \ No newline at end of file diff --git a/src/views/datatable/DataTableColGroupDemo.vue b/src/views/datatable/DataTableColGroupDemo.vue index e865a04a3..c2f70b877 100755 --- a/src/views/datatable/DataTableColGroupDemo.vue +++ b/src/views/datatable/DataTableColGroupDemo.vue @@ -12,7 +12,7 @@ - + @@ -26,7 +26,7 @@ - + \ No newline at end of file diff --git a/src/views/datatable/DataTableGridLinesDemo.vue b/src/views/datatable/DataTableGridLinesDemo.vue index 0f01bfa34..90c96c080 100644 --- a/src/views/datatable/DataTableGridLinesDemo.vue +++ b/src/views/datatable/DataTableGridLinesDemo.vue @@ -3,20 +3,20 @@

DataTable GridLines

-

Adding p-datatable-gridlines displays borders between cells. Note: Some themes may always displays gridlines by design.

+

Adding p-datatable-gridlines displays borders between cells. Note: Some themes may always displays gridlines by design.

- + - - - - + + + + @@ -29,30 +29,36 @@ -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); + this.productService.getProductsSmall().then(data => this.products = data); } } @@ -63,19 +69,20 @@ export default { \ No newline at end of file diff --git a/src/views/datatable/DataTablePaginatorDemo.vue b/src/views/datatable/DataTablePaginatorDemo.vue index 98e345e7c..814c5cfa4 100755 --- a/src/views/datatable/DataTablePaginatorDemo.vue +++ b/src/views/datatable/DataTablePaginatorDemo.vue @@ -9,16 +9,19 @@
- - - - - + + + + +
@@ -29,36 +32,39 @@ -import CarService from '../../service/CarService'; +import CustomerService from '../../service/CustomerService'; export default { data() { return { - cars: null + customers: null } }, - carService: null, + customerService: null, created() { - this.carService = new CarService(); + this.customerService = new CustomerService(); }, mounted() { - this.carService.getCarsLarge().then(data => this.cars = data); + this.customerService.getCustomersLarge().then(data => this.customers = data); } } @@ -69,20 +75,20 @@ export default { \ No newline at end of file diff --git a/src/views/datatable/DataTableSizeDemo.vue b/src/views/datatable/DataTableSizeDemo.vue index d97ba3e9d..36f7eacd4 100644 --- a/src/views/datatable/DataTableSizeDemo.vue +++ b/src/views/datatable/DataTableSizeDemo.vue @@ -3,44 +3,44 @@

DataTable Size

-

In addition to a regular table, a smaller and a larger alternatives available.

+

In addition to a regular table, alternatives with alternative sizes are available.

- + - - - - + + + +
- + - - - - + + + +
- + - - - - + + + +
@@ -50,53 +50,53 @@ -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); + this.productService.getProductsSmall().then(data => this.products = data); } } @@ -107,20 +107,20 @@ export default { \ No newline at end of file diff --git a/src/views/datatable/DataTableSortDemo.vue b/src/views/datatable/DataTableSortDemo.vue index e1ec92f2a..eb90b6905 100755 --- a/src/views/datatable/DataTableSortDemo.vue +++ b/src/views/datatable/DataTableSortDemo.vue @@ -10,41 +10,62 @@
Single Column
- - - - - + + + + + + + +
Multiple Columns
- - - - - +

Use metakey to add a column to the sort selection.

+ + + + + + + +
Presort
- - - - - + + + + + + + +
Removable Sort
- - - - - + + + + + + + +
@@ -54,55 +75,89 @@ -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); + this.productService.getProductsSmall().then(data => this.products = data); + }, + methods: { + formatCurrency(value) { + return value.toLocaleString('en-US', {style: 'currency', currency: 'USD'}); + } } } @@ -113,20 +168,25 @@ export default { \ No newline at end of file diff --git a/src/views/datatable/DataTableStripedDemo.vue b/src/views/datatable/DataTableStripedDemo.vue index ff74c4655..455c3d124 100644 --- a/src/views/datatable/DataTableStripedDemo.vue +++ b/src/views/datatable/DataTableStripedDemo.vue @@ -9,17 +9,11 @@
- - - - - - - + + + + +
@@ -29,30 +23,30 @@ -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); + this.productService.getProductsSmall().then(data => this.products = data); } } @@ -63,19 +57,20 @@ export default { \ No newline at end of file