Commit 3f53f8e9 authored by qinhaitao's avatar qinhaitao

fix: 🐛 格式优化

parent 87d5af83
......@@ -58,4 +58,4 @@ gulp.task('format', () => {
.pipe(gulp.dest(nunjucksRenderConfig.ServerFullPath + '/'))
})
gulp.task('code', gulp.series('build', 'format'))
gulp.task('code', gulp.series('build'))
......@@ -21,9 +21,8 @@ import { {%for service, service_item in type_item %}{{type|capitalize}}{{service
{# 生成装饰器 #}
{% macro genPreDecorator(decorators) %}
{%- for decorator in decorators %}
{%- if decorator.name == 'preCheck' or decorator.name == 'preUpdate' -%}
@{{ decorator.name }}
([{%- for param in decorator.params -%}{{param.name}}{%- if param.params %}({%- for utilParam in param.params -%}{{utilParam}}{%- if loop.last %}{% else %}, {% endif %}{%- endfor -%}){% endif %}{%- if loop.last %}{% else %}, {% endif %}{%- endfor -%}])
{%- if decorator.name == 'preCheck' or decorator.name == 'preUpdate' %}
@{{ decorator.name }}([{%- for param in decorator.params -%}{{param.name}}{%- if param.params %}({%- for utilParam in param.params -%}{{utilParam}}{%- if loop.last %}{% else %}, {% endif %}{%- endfor -%}){% endif %}{%- if loop.last %}{% else %}, {% endif %}{%- endfor -%}])
{%- endif -%}
{%- endfor -%}
{% endmacro %}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment