|
- <!DOCTYPE html>
- <html>
- <head>
- <meta charset="utf-8">
- <title>分布表单</title>
- <link rel="stylesheet" href="../../component/pear/css/pear.css" />
- </head>
- <body class="pear-container">
- <div class="layui-row layui-col-space10">
- <div class="layui-col-md12">
- <div class="layui-card">
- <div class="layui-card">
- <div class="layui-card-body" style="padding-top: 40px;">
- <div class="layui-carousel" id="stepForm" lay-filter="stepForm" style="margin: 0 auto;">
- <div carousel-item>
- <div>
- <form class="layui-form" action="javascript:void(0);" style="margin: 0 auto;max-width: 460px;padding-top: 40px;">
- <div class="layui-form-item">
- <label class="layui-form-label">游戏编号:</label>
- <div class="layui-input-block">
- <input type="text" placeholder="请填写入款人游戏ID" class="layui-input" lay-verify="number" required />
-
- </div>
- </div>
- <div class="layui-form-item">
- <div class="layui-input-block">
- <button class="pear-btn pear-btn-success" lay-submit lay-filter="formStep">
-  下一步 
- </button>
- </div>
- </div>
- </form>
- </div>
- <div>
- <form class="layui-form" action="javascript:void(0);" style="margin: 0 auto;max-width: 460px;padding-top: 40px;">
- <div class="layui-form-item">
- <label class="layui-form-label">游戏编号:</label>
- <div class="layui-input-block">
- <div class="layui-form-mid layui-word-aux">639537</div>
- </div>
- </div>
- <div class="layui-form-item">
- <div class="layui-input-block">
- <button type="button" class="pear-btn pear-btn-success pre">上一步</button>
- <button class="pear-btn pear-btn-success" lay-submit lay-filter="formStep2">
-  确认入款 
- </button>
- </div>
- </div>
- </form>
- </div>
- <div>
- <div style="text-align: center;margin-top: 90px;">
- <i class="layui-icon layui-circle" style="color: white;font-size:30px;font-weight:bold;background: #52C41A;padding: 20px;line-height: 80px;"></i>
- <div style="font-size: 24px;color: #333;font-weight: 500;margin-top: 30px;">
- 入款成功
- </div>
- <div style="font-size: 14px;color: #666;margin-top: 20px;">预计两小时到账</div>
- </div>
- <div style="text-align: center;margin-top: 50px;">
- <button class="pear-btn pear-btn-success next">再入一笔</button>
- <button class="pear-btn pear-btn-success">查看账单</button>
- </div>
- </div>
- </div>
- </div>
- </div>
- </div>
- </div>
- </div>
- </div>
- <script src="../../component/layui/layui.js"></script>
- <script src="../../component/pear/pear.js"></script>
- <script>
- layui.use(['form', 'step','code','element'], function() {
- var $ = layui.$,
- form = layui.form,
- step = layui.step;
-
- layui.code();
- step.render({
- elem: '#stepForm',
- filter: 'stepForm',
- width: '100%',
- stepWidth: '600px',
- height: '500px',
- stepItems: [{
- title: '填写'
- }, {
- title: '确认'
- }, {
- title: '完成'
- }]
- });
- form.on('submit(formStep)', function(data) {
- step.next('#stepForm');
- return false;
- });
- form.on('submit(formStep2)', function(data) {
- step.next('#stepForm');
- return false;
- });
- $('.pre').click(function() {
- step.pre('#stepForm');
- return false;
- });
- $('.next').click(function() {
- step.next('#stepForm');
- return false;
- });
- })
- </script>
- </body>
- </html>
复制代码 以下代码分为:填写、确认、完成三个步骤,我需要改成四个步骤为:填写、验证、确认、完成。代码该如何修改?
|
|