layui.use(['form', 'step','element'], function() {
var $ = layui.$,
form = layui.form,
step = layui.step;
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;
});
})