Add column widths
parent
200c095944
commit
a8972fa01b
|
@ -13,13 +13,13 @@
|
||||||
|
|
||||||
<OverlayPanel ref="op" appendTo="body" :showCloseIcon="true" id="overlay_panel" style="width: 450px">
|
<OverlayPanel ref="op" appendTo="body" :showCloseIcon="true" id="overlay_panel" style="width: 450px">
|
||||||
<DataTable :value="products" v-model:selection="selectedProduct" selectionMode="single" :paginator="true" :rows="5" @row-select="onProductSelect" responsiveLayout="scroll">
|
<DataTable :value="products" v-model:selection="selectedProduct" selectionMode="single" :paginator="true" :rows="5" @row-select="onProductSelect" responsiveLayout="scroll">
|
||||||
<Column field="name" header="Name" sortable></Column>
|
<Column field="name" header="Name" sortable style="width: 50%"></Column>
|
||||||
<Column header="Image">
|
<Column header="Image" style="width: 20%">
|
||||||
<template #body="slotProps">
|
<template #body="slotProps">
|
||||||
<img :src="'demo/images/product/' + slotProps.data.image" :alt="slotProps.data.image" class="product-image" />
|
<img :src="'demo/images/product/' + slotProps.data.image" :alt="slotProps.data.image" class="product-image" />
|
||||||
</template>
|
</template>
|
||||||
</Column>
|
</Column>
|
||||||
<Column field="price" header="Price" sortable>
|
<Column field="price" header="Price" sortable style="width: 30%">
|
||||||
<template #body="slotProps">
|
<template #body="slotProps">
|
||||||
{{formatCurrency(slotProps.data.price)}}
|
{{formatCurrency(slotProps.data.price)}}
|
||||||
</template>
|
</template>
|
||||||
|
|
|
@ -162,13 +162,13 @@ toggle(event) {
|
||||||
|
|
||||||
<OverlayPanel ref="op" appendTo="body" :showCloseIcon="true" id="overlay_panel" style="width: 450px">
|
<OverlayPanel ref="op" appendTo="body" :showCloseIcon="true" id="overlay_panel" style="width: 450px">
|
||||||
<DataTable :value="products" v-model:selection="selectedProduct" selectionMode="single" :paginator="true" :rows="5" @row-select="onProductSelect" responsiveLayout="scroll">
|
<DataTable :value="products" v-model:selection="selectedProduct" selectionMode="single" :paginator="true" :rows="5" @row-select="onProductSelect" responsiveLayout="scroll">
|
||||||
<Column field="name" header="Name" sortable></Column>
|
<Column field="name" header="Name" sortable style="width: 50%"></Column>
|
||||||
<Column header="Image">
|
<Column header="Image" style="width: 20%">
|
||||||
<template #body="slotProps">
|
<template #body="slotProps">
|
||||||
<img :src="'demo/images/product/' + slotProps.data.image" :alt="slotProps.data.image" class="product-image" />
|
<img :src="'demo/images/product/' + slotProps.data.image" :alt="slotProps.data.image" class="product-image" />
|
||||||
</template>
|
</template>
|
||||||
</Column>
|
</Column>
|
||||||
<Column field="price" header="Price" sortable>
|
<Column field="price" header="Price" sortable style="width: 30%">
|
||||||
<template #body="slotProps">
|
<template #body="slotProps">
|
||||||
{{formatCurrency(slotProps.data.price)}}
|
{{formatCurrency(slotProps.data.price)}}
|
||||||
</template>
|
</template>
|
||||||
|
@ -231,13 +231,13 @@ export default {
|
||||||
|
|
||||||
<OverlayPanel ref="op" appendTo="body" :showCloseIcon="true" id="overlay_panel" style="width: 450px">
|
<OverlayPanel ref="op" appendTo="body" :showCloseIcon="true" id="overlay_panel" style="width: 450px">
|
||||||
<DataTable :value="products" v-model:selection="selectedProduct" selectionMode="single" :paginator="true" :rows="5" @rowSelect="onProductSelect">
|
<DataTable :value="products" v-model:selection="selectedProduct" selectionMode="single" :paginator="true" :rows="5" @rowSelect="onProductSelect">
|
||||||
<Column field="name" header="Name" sortable></Column>
|
<Column field="name" header="Name" sortable style="width: 50%"></Column>
|
||||||
<Column header="Image">
|
<Column header="Image"style="width: 20%">
|
||||||
<template #body="slotProps">
|
<template #body="slotProps">
|
||||||
<img src="https://www.primefaces.org/wp-content/uploads/2020/05/placeholder.png" :alt="slotProps.data.image" class="product-image" />
|
<img src="https://www.primefaces.org/wp-content/uploads/2020/05/placeholder.png" :alt="slotProps.data.image" class="product-image" />
|
||||||
</template>
|
</template>
|
||||||
</Column>
|
</Column>
|
||||||
<Column field="price" header="Price" sortable>
|
<Column field="price" header="Price" sortable style="width: 30%">
|
||||||
<template #body="slotProps">
|
<template #body="slotProps">
|
||||||
{{formatCurrency(slotProps.data.price)}}
|
{{formatCurrency(slotProps.data.price)}}
|
||||||
</template>
|
</template>
|
||||||
|
|
Loading…
Reference in New Issue