diff --git a/src/views/uikit/ListDoc.vue b/src/views/uikit/ListDoc.vue index 7f9b705..44dc51b 100644 --- a/src/views/uikit/ListDoc.vue +++ b/src/views/uikit/ListDoc.vue @@ -2,35 +2,18 @@ import { ProductService } from '@/service/ProductService'; import { onMounted, ref } from 'vue'; -const picklistValue = ref([ - [ - { name: 'San Francisco', code: 'SF' }, - { name: 'London', code: 'LDN' }, - { name: 'Paris', code: 'PRS' }, - { name: 'Istanbul', code: 'IST' }, - { name: 'Berlin', code: 'BRL' }, - { name: 'Barcelona', code: 'BRC' }, - { name: 'Rome', code: 'RM' } - ], - [] -]); - -const orderlistValue = ref([ - { name: 'San Francisco', code: 'SF' }, - { name: 'London', code: 'LDN' }, - { name: 'Paris', code: 'PRS' }, - { name: 'Istanbul', code: 'IST' }, - { name: 'Berlin', code: 'BRL' }, - { name: 'Barcelona', code: 'BRC' }, - { name: 'Rome', code: 'RM' } -]); - const products = ref(null); +const picklistProducts = ref(null); +const orderlistProducts = ref(null); const options = ref(['list', 'grid']); -const layout = ref('grid'); +const layout = ref('list'); onMounted(() => { - ProductService.getProductsSmall().then((data) => (products.value = data)); + ProductService.getProductsSmall().then((data) => { + products.value = data.slice(0, 6); + picklistProducts.value = [data, []]; + orderlistProducts.value = data; + }); }); const getSeverity = (product) => { @@ -157,7 +140,7 @@ const getSeverity = (product) => {
PickList
- + @@ -168,7 +151,7 @@ const getSeverity = (product) => {
OrderList
- +