Aurora Admin v1.2.0: 79 components x 5 ends, doc site, contracts batch 1, playground, regression, deploy ready
This commit is contained in:
@@ -0,0 +1,38 @@
|
||||
<template>
|
||||
<div class="aa-fixtable-wrap">
|
||||
<table class="aa-fixtable">
|
||||
<thead>
|
||||
<tr>
|
||||
<th
|
||||
v-for="c in columns"
|
||||
:key="c.key"
|
||||
:class="fixCls(c)"
|
||||
:style="{ minWidth: c.w + 'px' }"
|
||||
>{{ c.title }}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr v-for="(row, i) in data" :key="i">
|
||||
<td
|
||||
v-for="c in columns"
|
||||
:key="c.key"
|
||||
:class="fixCls(c)"
|
||||
:style="{ minWidth: c.w + 'px' }"
|
||||
>{{ row[c.key] }}</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
const props = defineProps({
|
||||
data: { type: Array, default: () => [] },
|
||||
columns: { type: Array, default: () => [] }
|
||||
});
|
||||
function fixCls(c) {
|
||||
return c.fixed ? 'aa-fixed aa-fixed-' + c.fixed : '';
|
||||
}
|
||||
</script>
|
||||
|
||||
<style src="./FixedColumnTable.css"></style>
|
||||
Reference in New Issue
Block a user