Merge pull request #424 from GizmoOAO/dev

fix🐛 修复vue模板的条件判断 #423
This commit is contained in:
wenjianzhang
2021-05-15 17:55:13 +08:00
committed by GitHub
+3 -3
View File
@@ -6,7 +6,7 @@
<el-form ref="queryForm" :model="queryParams" :inline="true" label-width="68px">
{{range .Columns}}
{{- $x := .IsQuery -}}
{{- if ($x) -}}
{{- if (eq $x "1") -}}
<el-form-item label="{{.ColumnComment}}" prop="{{.JsonField}}">
{{- if ne .FkTableName "" -}}
<el-select v-model="form.{{.JsonField}}"
@@ -287,7 +287,7 @@
rules: {
{{- range .Columns -}}
{{- $x := .IsQuery -}}
{{- if ($x) -}}
{{- if (eq $x "1") -}}
{{.JsonField}}:
[
{required: true, message: '{{.ColumnComment}}不能为空', trigger: 'blur'}
@@ -334,7 +334,7 @@
this.form = {
{{ range .Columns}}
{{- $x := .IsInsert -}}
{{- if ($x) -}}
{{- if (eq $x "1") -}}
{{- if eq .GoField "CreatedAt" -}}
{{- else if eq .GoField "UpdatedAt" -}}
{{- else if eq .GoField "DeletedAt" -}}