限制单元格编辑时为数字类型
layui.$(document).on("focus", ".layui-table-edit", function () {
layui.$(this).attr("type", "number")
});
通常我们只是限制某个字段为数字类型
layui.$(document).on("focus", '[data-field="added_price"] .layui-table-edit', function () {
layui.$(this).attr("type", "number")
});