feat: 自定义矩阵列表长度
- MatrixCheckbox 和 MatrixText 可以支持设置宽度
This commit is contained in:
@@ -1,6 +1,6 @@
|
|||||||
<template>
|
<template>
|
||||||
<el-table :data="rows" style="width: 100%">
|
<el-table :data="rows" style="width: 100%">
|
||||||
<el-table-column width="140">
|
<el-table-column :width="tableWidth">
|
||||||
<template #header></template>
|
<template #header></template>
|
||||||
<template #default="{ row /*, column, $index*/ }">
|
<template #default="{ row /*, column, $index*/ }">
|
||||||
<el-text truncated :style="{ width: `${tableWidth}px` }">
|
<el-text truncated :style="{ width: `${tableWidth}px` }">
|
||||||
@@ -8,7 +8,7 @@
|
|||||||
</el-text>
|
</el-text>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column v-for="(col, colIndex) in cols" :key="col.option" width="100">
|
<el-table-column v-for="(col, colIndex) in cols" :key="col.option" :width="tableWidth">
|
||||||
<template #header>
|
<template #header>
|
||||||
<el-text truncated :style="{ width: `${tableWidth}px` }">
|
<el-text truncated :style="{ width: `${tableWidth}px` }">
|
||||||
<contenteditable v-model="col.option" :active="active" @blur="emitValue" />
|
<contenteditable v-model="col.option" :active="active" @blur="emitValue" />
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
<template>
|
<template>
|
||||||
<el-table :data="rows" style="width: 100%">
|
<el-table :data="rows" style="width: 100%">
|
||||||
<el-table-column width="140">
|
<el-table-column :width="tableWidth">
|
||||||
<template #header></template>
|
<template #header></template>
|
||||||
<template #default="{ row /*, column, $index*/ }">
|
<template #default="{ row /*, column, $index*/ }">
|
||||||
<el-text truncated :style="{ width: `${tableWidth}px` }">
|
<el-text truncated :style="{ width: `${tableWidth}px` }">
|
||||||
@@ -8,7 +8,7 @@
|
|||||||
</el-text>
|
</el-text>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column v-for="(col, colIndex) in cols" :key="col.option" width="100">
|
<el-table-column v-for="(col, colIndex) in cols" :key="col.option" :width="tableWidth">
|
||||||
<template #header>
|
<template #header>
|
||||||
<el-text truncated :style="{ width: `${tableWidth}px` }">
|
<el-text truncated :style="{ width: `${tableWidth}px` }">
|
||||||
<contenteditable
|
<contenteditable
|
||||||
|
|||||||
Reference in New Issue
Block a user