File tree Expand file tree Collapse file tree 2 files changed +19
-3
lines changed Expand file tree Collapse file tree 2 files changed +19
-3
lines changed Original file line number Diff line number Diff line change 11<template >
2- <ui-table :headers =" props.headers" >
2+ <ui-table
3+ :headers =" props.headers"
4+ :fixed =" fixed"
5+ >
36 <slot />
47 </ui-table >
58 <div class =" buttons-container" >
@@ -62,7 +65,11 @@ const props = defineProps({
6265 totalItems: {
6366 type: Number ,
6467 default: 1 ,
65- }
68+ },
69+ fixed: {
70+ type: Boolean ,
71+ default: false ,
72+ },
6673});
6774
6875const totalPages = computed (() => Math .ceil (props .totalItems / ITEMS_PER_PAGE ))
Original file line number Diff line number Diff line change 11<template >
22 <div class =" table" >
3- <table >
3+ <table :class = " { fixed: fixed } " >
44 <thead v-if =" headers.length" >
55 <tr >
66 <th
77 v-for =" header in headers"
88 :key =" header.name"
9+ :style =" { width: header.width }"
910 >
1011 <div >{{ header.text }}</div >
1112 <div class =" splitpane" />
@@ -26,6 +27,10 @@ defineProps({
2627 required: true ,
2728 default : () => [],
2829 },
30+ fixed: {
31+ type: Boolean ,
32+ default: false ,
33+ }
2934})
3035 </script >
3136
@@ -36,6 +41,10 @@ table {
3641 width : 100% ;
3742 max-width : 100% ;
3843
44+ & .fixed {
45+ table-layout : fixed ;
46+ }
47+
3948 thead {
4049 border-top : 1px solid #e0 e0 e0 ;
4150 border-bottom : 1px solid #e0 e0 e0 ;
You can’t perform that action at this time.
0 commit comments