form.html 2.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263
  1. <style>
  2. .uploadimage{
  3. width: 10pc !important;
  4. }
  5. .layui-layer{
  6. width: 990px !important;
  7. }
  8. </style>
  9. <link rel="stylesheet" href="/static/plugs/layui/css/layui.css" media="all">
  10. <script src="/static/plugs/layui/layui.all.js" charset="utf-8"></script>
  11. <div class="think-box-shadow" style="height: 85%">
  12. <form class="layui-form layui-card" action="{:request()->url()}" data-auto="true" method="post" autocomplete="off">
  13. <fieldset class="layui-elem-field layui-field-title" style="margin-top: 30px;">
  14. <legend>轮播图编辑</legend>
  15. </fieldset>
  16. <div class="layui-tab-content">
  17. <div class="layui-tab-item layui-show">
  18. <div class="layui-form-item">
  19. <label class="layui-form-label label-required">名称</label>
  20. <div class="layui-input-block">
  21. <input name="name" maxlength="20" value='{$vo.name|default=""}' placeholder="请输入名称" class="layui-input">
  22. </div>
  23. </div>
  24. <div class="layui-form-item">
  25. <label class="layui-form-label label-required">图片</label>
  26. <div class="layui-input-block">
  27. <input name="cover" type="hidden" value="{$vo.cover|default=''}">
  28. &nbsp; &nbsp;<span style="margin-right: 20px">建议尺寸宽700px 高330px </span>
  29. </div>
  30. </div>
  31. <div class="layui-form-item">
  32. <label class="layui-form-label label-required">排序</label>
  33. <div class="layui-input-block">
  34. <input type="number" name="sort" value='{$vo.sort|default=""}' placeholder="请输入排序号" class="layui-input">
  35. </div>
  36. </div>
  37. <div class="layui-form-item">
  38. <label class="layui-form-label label-required">内容</label>
  39. <div class="layui-input-block">
  40. <textarea name="content">{$vo.content|default=""}</textarea>
  41. </div>
  42. </div>
  43. {notempty name='vo.id'}<input type='hidden' value='{$vo.id}' name='id'>{/notempty}
  44. <div class="layui-form-item text-center">
  45. <button class="layui-btn" type='submit'>保 存</button>
  46. <button class="layui-btn layui-btn-danger" type='button' data-confirm="确定取消编辑吗?" data-close>取消编辑</button>
  47. </div>
  48. </div>
  49. </div>
  50. </form>
  51. <script>
  52. window.form.render();
  53. $('[name="cover"]').uploadOneImage();
  54. require(['ckeditor', 'angular'], function () {
  55. window.createEditor('[name="content"]', {
  56. height: 500,
  57. });
  58. })
  59. </script>
  60. </div>