Files
aurora-admin/site/sources/fixedcolumntable/vue2.txt
T
aurora-admin c65a69c34e
Deploy to GitHub Pages / deploy (push) Failing after 16s
Regression / regression (push) Failing after 15m2s
feat(P4): precompute移植+app.js sources双向回填+回归1003/1003+验收体积/文件/data.json
2026-09-12 14:18:41 +08:00

44 lines
942 B
Plaintext

<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>
export default {
name: 'AaFixedColumnTable',
props: {
data: { type: Array, default: () => [] },
columns: { type: Array, default: () => [] }
},
methods: {
fixCls(c) {
return c.fixed ? 'aa-fixed aa-fixed-' + c.fixed : '';
}
}
};
</script>
<style src="./FixedColumnTable.css"></style>