类 PublishPlaceDirective

所有已实现的接口:
Directive, HttpDirective, freemarker.template.TemplateDirectiveModel, freemarker.template.TemplateModel

@Component public class PublishPlaceDirective extends AbstractTaskDirective
publishPlace 页面片段静态化指令

参数列表

  • path:页面路径,默认值"/"

返回结果

  • mapmap类型,键值页面路径,值为生成结果

使用示例

<@task.publishPlace><#list map as k,v>${k}:${v}<#sep>,</#list></@task.publishPlace>

<script>
 fetch('${site.dynamicPath}api/directive/task/publishPlace?path=',{"headers":{"appToken":"接口访问授权Token"}}).then(res => res.json()).then(data=>{
   console.log(data);
 });
 </script>