You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
layui/docs/upload/detail/demo.md

62 lines
1.9 KiB

2 years ago
<h3 lay-toc="{level: 2, id: 'examples', hot: true}" class="layui-hide">图片上传</h3>
<pre class="layui-code" lay-options="{preview: true, codeStyle: 'height: 535px;', text: {preview: ''}, layout: ['preview', 'code'], tools: ['full'], done: function(obj){
obj.render();
}}">
<textarea>
{{- d.include("/upload/examples/image.md") }}
2 years ago
</script>
</textarea>
</pre>
<h3 id="demo-files-table" lay-toc="{level: 2}">制作多文件上传表格</h3>
<pre class="layui-code" lay-options="{preview: true, codeStyle: 'height: 535px;', layout: ['preview', 'code'], tools: ['full']}">
<textarea>
{{- d.include("/upload/examples/files.table.md") }}
2 years ago
</textarea>
</pre>
<h3 id="demo-accept" lay-toc="{level: 2}">过滤文件类型</h3>
<pre class="layui-code" lay-options="{preview: true, codeStyle: 'height: 535px;', layout: ['preview', 'code'], tools: ['full']}">
<textarea>
{{- d.include("/upload/examples/accept.md") }}
2 years ago
</textarea>
</pre>
<h3 id="demo-size" lay-toc="{level: 2}">限制文件大小</h3>
<pre class="layui-code" lay-options="{preview: true, layout: ['preview', 'code'], tools: ['full']}">
<textarea>
{{- d.include("/upload/examples/size.md") }}
2 years ago
</textarea>
</pre>
<h3 id="demo-auto" lay-toc="{level: 2}">选择后手动上传</h3>
<pre class="layui-code" lay-options="{preview: true, layout: ['preview', 'code'], tools: ['full']}">
<textarea>
{{- d.include("/upload/examples/auto.md") }}
2 years ago
</textarea>
</pre>
<h3 id="demo-drag" lay-toc="{level: 2}">拖拽上传</h3>
<pre class="layui-code" lay-options="{preview: true, layout: ['preview', 'code'], tools: ['full']}">
<textarea>
{{- d.include("/upload/examples/drag.md") }}
2 years ago
</textarea>
</pre>
<h3 id="demo-form-file" lay-toc="{level: 2}">绑定原始文件域</h3>
<pre class="layui-code" lay-options="{preview: true, layout: ['preview', 'code'], tools: ['full']}">
<textarea>
{{- d.include("/upload/examples/form.file.md") }}
2 years ago
</textarea>
</pre>