导致问题的主要因素是:overflow : auto;改成overflow : visible;
----css自定义样式
<style>
body .myskin .layui-layer-content {
overflow: visible;
}
</style>
-----js代码
function addStaff() {
//$("#formStaff")[0].reset();
layer.open({
type: 1,
area: '700px',
title: '新增卡号',
content: $("#formStaff"),
shade: 0,
maxmin: false,
shadeClose: false,
closeBtn: 1,
skin: "myskin",//自定义弹框样式
resize: false,
btn: ['确定', '取消'],
yes: function (index, layero) {
}
})
}
----html(弹框部分代码)
<form class="layui-form" action="" id="formStaff" lay-filter="form-data" style="display: none;">
<div class="layui-row layui-col-space10">
<div class="layui-row layui-col-space10">
<div class="layui-col-md8 layui-col-xs8">
<div class="layui-form-item">
<label class="layui-form-label">员工卡号<span style="color:red;"> * </span></label>
<div class="layui-input-block">
<input type="text" id="cardId" name="cardId" placeholder="请输入卡号" required lay-verify="required|cardId" autocomplete="off" class="layui-input">
</div>
</div>
</div>
</div>
<div class="layui-row layui-col-space10">
<div class="layui-col-md8 layui-col-xs8">
<div class="layui-form-item">
<label class="layui-form-label">部门<span style="color:red;"> * </span></label>
<div class="layui-input-inline" style="width: 180px;">
<div id="deptName" class="xm-select-demo"></div>
</div>
</div>
</div>
</div>
</div>
</form>