app/views/educode_sales/roles/new.html.erb in educode_sales-0.2.8 vs app/views/educode_sales/roles/new.html.erb in educode_sales-0.2.9
- old
+ new
@@ -2,11 +2,11 @@
<div class="layui-form layuimini-form">
<div class="layui-form-item">
<label class="layui-form-label required">角色名称</label>
<div class="layui-input-block">
- <input type="text" class="layui-input" lay-verify="required" lay-reqtext="名称不能为空" name="name" placeholder="">
+ <input type="text" id="inputFocus" class="layui-input" lay-verify="required" lay-reqtext="名称不能为空" name="name" placeholder="">
</div>
</div>
<hr>
<div class="layui-form-item">
<div class="layui-input-block">
@@ -15,10 +15,12 @@
</div>
</div>
</div>
<script>
- layui.use(['form', 'table', 'upload', 'laytpl', 'request', 'selectInput'], function () {
+ document.getElementById("inputFocus").focus();
+
+ layui.use(['form', 'table', 'upload', 'laytpl', 'request', 'selectInput'], function () {
var form = layui.form,
layer = layui.layer,
table = layui.table,
laytpl = layui.laytpl,
request = layui.request,
\ No newline at end of file