类 ThumbDirective

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

@Component public class ThumbDirective extends AbstractTemplateDirective
thumb 缩略图指令

参数列表

  • path:文件路径
  • width:宽度
  • height:高度

打印结果文件路径

使用示例

<@tools.thumb path='images/logo.jpg' width=100 height=100/>

<script>
 fetch('${site.dynamicPath}api/directive/tools/thumb?path=images/logo.jpg&width=100&height=100',{"headers":{"appToken":"接口访问授权Token"}}).then(res => res.json()).then(data=>{
   console.log(data.deviceType);
 });
 </script>
 
  • 构造器详细资料

    • ThumbDirective

      public ThumbDirective()
  • 方法详细资料