Skip to content

Commit b328359

Browse files
committed
😎调整代码生成的表格宽度自适应
1 parent 52afa3f commit b328359

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

Admin.NET/Admin.NET.Web.Entry/wwwroot/Template/index.vue.vm

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,7 @@
120120
@foreach (var column in Model.TableField){
121121
if(@column.WhetherTable == "Y"){
122122
if(@column.EffectType == "Upload"||@column.EffectType == "fk"||@column.EffectType == "ApiTreeSelect"||@column.EffectType == "Switch"||@column.EffectType == "ConstSelector"){
123-
@:<el-table-column prop="@column.LowerPropertyName" label="@column.ColumnComment" width="@(column.ColumnComment!=null && column.ColumnComment.Length > 5 ? column.ColumnComment.Length * 15 : 120)" @(column.WhetherSortable == "Y" ? "sortable='custom'" : "") show-overflow-tooltip="">
123+
@:<el-table-column prop="@column.LowerPropertyName" label="@column.ColumnComment" @(column.WhetherSortable == "Y" ? "sortable='custom'" : "") show-overflow-tooltip="">
124124
@:<template #default="scope">
125125
if(@column.EffectType == "Upload"){
126126
@:<el-image
@@ -149,21 +149,21 @@
149149
</el-table-column>
150150
}
151151
else if(@column.EffectType == "Select"){
152-
@:<el-table-column prop="@column.LowerPropertyName" label="@column.ColumnComment" width="@(column.ColumnComment!=null && column.ColumnComment.Length > 5 ? column.ColumnComment.Length * 15 : 140)" @(column.WhetherSortable == "Y" ? "sortable='custom'" : "") show-overflow-tooltip="" >
152+
@:<el-table-column prop="@column.LowerPropertyName" label="@column.ColumnComment" @(column.WhetherSortable == "Y" ? "sortable='custom'" : "") show-overflow-tooltip="" >
153153
@:<template #default="scope">
154154
@:<el-tag :type="di('@(@column.DictTypeCode)', scope.row.@(@column.LowerPropertyName))?.tagType"> {{di("@(@column.DictTypeCode)", scope.row.@(@column.LowerPropertyName))?.value}} </el-tag>
155155
@:</template>
156156
@:</el-table-column>
157157
}
158158
else if(@column.EffectType == "EnumSelector"){
159-
@:<el-table-column prop="@column.LowerPropertyName" label="@column.ColumnComment" width="@(column.ColumnComment!=null && column.ColumnComment.Length > 5 ? column.ColumnComment.Length * 15 : 140)" @(column.WhetherSortable == "Y" ? "sortable='custom'" : "") show-overflow-tooltip="" >
159+
@:<el-table-column prop="@column.LowerPropertyName" label="@column.ColumnComment" @(column.WhetherSortable == "Y" ? "sortable='custom'" : "") show-overflow-tooltip="" >
160160
@:<template #default="scope">
161161
@:<el-tag>{{ getEnumDesc([email protected], getEnum@(@column.PropertyName)Data_Index)}}</el-tag>
162162
@:</template>
163163
@:</el-table-column>
164164
}
165165
else {
166-
@:<el-table-column prop="@column.LowerPropertyName" label="@column.ColumnComment" width="@(column.ColumnComment!=null && column.ColumnComment.Length > 5 ? column.ColumnComment.Length * 15 : 140)" @(column.WhetherSortable == "Y" ? "sortable='custom'" : "") show-overflow-tooltip="" />
166+
@:<el-table-column prop="@column.LowerPropertyName" label="@column.ColumnComment" @(column.WhetherSortable == "Y" ? "sortable='custom'" : "") show-overflow-tooltip="" />
167167
}
168168
}
169169
}

0 commit comments

Comments
 (0)