form.html 2.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  1. <style>
  2. .uploadimage{
  3. width: 10pc !important;
  4. }
  5. </style>
  6. <div class="think-box-shadow">
  7. <form class="layui-form layui-card" action="{:request()->url()}" data-auto="true" method="post" autocomplete="off">
  8. <div class="layui-card-body">
  9. <div class="layui-form-item">
  10. <label class="layui-form-label label-required">名称</label>
  11. <div class="layui-input-block">
  12. <input name="name" maxlength="20" value='{$vo.name|default=""}' placeholder="请输入名称" class="layui-input">
  13. </div>
  14. </div>
  15. <div class="layui-form-item">
  16. <label class="layui-form-label label-required">图片</label>
  17. <div class="layui-input-block">
  18. <input name="cover" type="hidden" value="{$vo.cover|default=''}">
  19. &nbsp; &nbsp;<span style="margin-right: 20px">建议尺寸宽700px 高330px </span>
  20. </div>
  21. </div>
  22. <div class="layui-form-item">
  23. <label class="layui-form-label">链接</label>
  24. <div class="layui-input-block">
  25. <input type="" name="link" value='{$vo.link|default=""}' placeholder="" class="layui-input">
  26. </div>
  27. </div>
  28. <div class="layui-form-item">
  29. <label class="layui-form-label label-required">排序</label>
  30. <div class="layui-input-block">
  31. <input type="number" name="sort" value='{$vo.sort|default=""}' placeholder="请输入排序号" class="layui-input">
  32. </div>
  33. </div>
  34. {notempty name='vo.id'}<input type='hidden' value='{$vo.id}' name='id'>{/notempty}
  35. <div class="layui-form-item text-center">
  36. <button class="layui-btn" type='submit'>保 存</button>
  37. <button class="layui-btn layui-btn-danger" type='button' data-confirm="确定取消编辑吗?" data-close>取消编辑</button>
  38. </div>
  39. </div>
  40. </form>
  41. <script>
  42. window.form.render();
  43. $('[name="cover"]').uploadOneImage();
  44. </script>
  45. </div>