File tree 2 files changed +19
-3
lines changed
2 files changed +19
-3
lines changed Original file line number Diff line number Diff line change 1
1
<template >
2
- <ui-table :headers =" props.headers" >
2
+ <ui-table
3
+ :headers =" props.headers"
4
+ :fixed =" fixed"
5
+ >
3
6
<slot />
4
7
</ui-table >
5
8
<div class =" buttons-container" >
@@ -62,7 +65,11 @@ const props = defineProps({
62
65
totalItems: {
63
66
type: Number ,
64
67
default: 1 ,
65
- }
68
+ },
69
+ fixed: {
70
+ type: Boolean ,
71
+ default: false ,
72
+ },
66
73
});
67
74
68
75
const totalPages = computed (() => Math .ceil (props .totalItems / ITEMS_PER_PAGE ))
Original file line number Diff line number Diff line change 1
1
<template >
2
2
<div class =" table" >
3
- <table >
3
+ <table :class = " { fixed: fixed } " >
4
4
<thead v-if =" headers.length" >
5
5
<tr >
6
6
<th
7
7
v-for =" header in headers"
8
8
:key =" header.name"
9
+ :style =" { width: header.width }"
9
10
>
10
11
<div >{{ header.text }}</div >
11
12
<div class =" splitpane" />
@@ -26,6 +27,10 @@ defineProps({
26
27
required: true ,
27
28
default : () => [],
28
29
},
30
+ fixed: {
31
+ type: Boolean ,
32
+ default: false ,
33
+ }
29
34
})
30
35
</script >
31
36
@@ -36,6 +41,10 @@ table {
36
41
width : 100% ;
37
42
max-width : 100% ;
38
43
44
+ & .fixed {
45
+ table-layout : fixed ;
46
+ }
47
+
39
48
thead {
40
49
border-top : 1px solid #e0 e0 e0 ;
41
50
border-bottom : 1px solid #e0 e0 e0 ;
You can’t perform that action at this time.
0 commit comments