Skip to content

Commit

Permalink
fix: 修复子表单宽度自适应bug
Browse files Browse the repository at this point in the history
  • Loading branch information
BoBoooooo committed Mar 18, 2021
1 parent 3fc26a5 commit 27e2e36
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "element-pro-crud",
"version": "0.9.1-8",
"version": "0.9.1-9",
"author": "BoBo<[email protected]>",
"main": "lib/ProCrud.umd.min.js",
"files": [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
<div class="table_box">
<!-- 如果不想展示错误提示信息,可以加上show-message参数 -->
<el-form status-icon :model="inlineFormData" ref="tableForm" class="subTableForm">
<el-table :data="subTableForm.tableData" border>
<el-table :data="subTableForm.tableData" border fit style="width: 100%">
<el-table-column type="index" align="center" label="#" header-align="center" width="50"> </el-table-column>
<el-table-column v-for="(row, index) in widget.tableColumns" :key="index" :min-width="row.options.width" :prop="row.model" :label="row.name">
<template slot-scope="scope">
Expand All @@ -22,7 +22,7 @@
<GenerateFormItem v-else :remote="remote" :models="inlineFormData" :widget="row" :readOnly="readOnly || row._mode === 'DETAIL' ? {} : null" />
</template>
</el-table-column>
<el-table-column label="操作" header-align="center" :width="100">
<el-table-column label="操作" header-align="center" width="100">
<template slot="header">
<span class="add-button" @click="addRow"><i type="primary" size="mini" class="el-icon el-icon-plus" v-if="!readOnly"></i>添加</span>
</template>
Expand Down Expand Up @@ -354,7 +354,11 @@ export default class GenerateSubForm extends Vue {
}
}
}
.table_box{
width: 100%;
}
.subTableForm {
width: 100%;
/deep/.el-form-item__error {
top: 23px;
right: 28px;
Expand Down

0 comments on commit 27e2e36

Please sign in to comment.