feat: 优化矩阵显示

- 解决打开矩阵的时候字体太长会自动换行的问题
- title 和 下面的选项对齐
This commit is contained in:
Huangzhe
2025-03-20 13:16:26 +08:00
parent 131a0c11f8
commit 7b4832ee3e
3 changed files with 36 additions and 24 deletions

View File

@@ -3,18 +3,22 @@
<el-table-column width="140">
<template #header></template>
<template #default="{ row /*, column, $index*/ }">
<contenteditable v-model="row.option" :active="active" @blur="emitValue" />
<el-text truncated>
<contenteditable v-model="row.option" :active="active" @blur="emitValue" />
</el-text>
</template>
</el-table-column>
<el-table-column v-for="(col, colIndex) in cols" :key="col.option" width="100">
<template #header>
<contenteditable
v-if="col.option"
v-model="col.option"
:active="active"
@blur="emitValue"
/>
<van-field v-else v-model="col.option" placeholder="请输入"></van-field>
<el-text truncated>
<contenteditable
v-if="col.option"
v-model="col.option"
:active="active"
@blur="emitValue"
/>
<van-field v-else v-model="col.option" placeholder="请输入"></van-field>
</el-text>
</template>
<template #default="{ /*row, column, */ $index: rowIndex }">
<input