File tree 1 file changed +9
-2
lines changed
Admin.NET/Admin.NET.Web.Entry/wwwroot/Template
1 file changed +9
-2
lines changed Original file line number Diff line number Diff line change 1
1
@{
2
2
var pkField = Model.TableField.Where(c => c.ColumnKey == "True").FirstOrDefault();
3
- string pkFieldName = LowerFirstLetter(pkField.PropertyName);
3
+ string pkFieldName = null;
4
+ if(pkField != null && !string.IsNullOrEmpty(pkField.PropertyName))
5
+ {
6
+ pkFieldName = LowerFirstLetter(pkField.PropertyName);
7
+ }
4
8
Dictionary<string, int> definedObjects = new Dictionary<string, int>();
5
9
bool haveLikeCdt = false;
6
10
foreach (var column in Model.TableField){
113
117
style="width: 100%"
114
118
v-loading="loading"
115
119
tooltip-effect="light"
116
- row-key="@(@pkFieldName)"
120
+ @if(@pkFieldName != null)
121
+ {
122
+ @:row-key="@(@pkFieldName)"
123
+ }
117
124
@@sort-change="sortChange"
118
125
border="">
119
126
<el-table-column type="index" label="序号" width="55" align="center"/>
You can’t perform that action at this time.
0 commit comments