使用layui上传控件问题

正常layui-upload控件只需要在html中定义一个button,在js中渲染即可正常使用

在开发中遇到一种在html页面用script调用接口的方式,但是在script里包含了uoload,导致了layui的上传控件不生效

<script type="text/html" template lay-url="/admin/marketstore/index">
  <div>
     .........
    //上传控件
  </div>
</script>

最后改为了在Js中调接口获取数据进行页面渲染

by:ph 

猜你喜欢

转载自www.cnblogs.com/widgetbox/p/12384844.html