列表页时间字段美化

This commit is contained in:
ninstein authored and GitHub committed 2021-05-28 22:09:43 +08:00
1 parent c1b0e9ab8b
commit a02f01453d
1 file changed
+9 -1
+9 -1
View File
@@ -101,9 +101,17 @@
{{- end -}}
{{- if eq .DictType "" -}}
{{- if eq .HtmlType "datetime" -}}
<el-table-column label="{{.ColumnComment}}" align="center" prop="{{.JsonField}}"
:show-overflow-tooltip="true">
<template slot-scope="scope">
<span>{{ "{{" }} parseTime(scope.row.{{.JsonField}}) {{"}}"}}</span>
</template>
</el-table-column>
{{- else -}}
<el-table-column label="{{.ColumnComment}}" align="center" prop="{{.JsonField}}"
:show-overflow-tooltip="true"/>
{{- end -}}
{{- end -}}
{{- end -}}
{{- end }}