Commit b576b109 authored by 武广's avatar 武广

Merge branch 'feature/validator-stock' into 'master'

Feature/validator stock

See merge request !71
parents 7e858c5b f94d3062
......@@ -130,7 +130,6 @@ export const CreateFormInput = props => {
</>
);
}
return (
<InputNumber
{...roleProps}
......@@ -138,7 +137,10 @@ export const CreateFormInput = props => {
style={{ width: '100%' }}
placeholder={`请输入${title}`}
onBlur={e => {
onBlurEvent(e.target.value, dataIndex, rowIndex);
const inputTarget = e.target;
setTimeout(() => {
onBlurEvent(inputTarget.value, dataIndex, rowIndex);
}, 10);
}}
/>
);
......
......@@ -137,6 +137,10 @@ export const StaticColumns = customer => [
precision: 2,
min: 0,
},
batchProps: {
precision: 2,
min: 0,
},
roleRules: { required: true },
disabeldRender: () => customer.isDisabled,
},
......@@ -148,8 +152,10 @@ export const StaticColumns = customer => [
roleRules: { required: false },
roleProps: {
min: 0,
// max: 100,
},
// batchProps: {
// min: 0,
// },
},
{
title: '市场价',
......@@ -160,6 +166,10 @@ export const StaticColumns = customer => [
precision: 2,
min: 0,
},
batchProps: {
precision: 2,
min: 0,
},
roleRules: { required: true },
disabeldRender: () => customer.isDisabled,
},
......@@ -174,6 +184,10 @@ export const StaticColumns = customer => [
precision: 2,
min: 0,
},
batchProps: {
precision: 2,
min: 0,
},
disabeldRender: () => customer.isDisabled,
},
{
......@@ -208,6 +222,8 @@ export const StaticColumns = customer => [
},
roleProps: {
min: 0,
step: 1,
precision: 0,
},
roleRules: { required: true },
disabeldRender: record => {
......@@ -226,6 +242,11 @@ export const StaticColumns = customer => [
precision: 0,
maxLength: 5,
},
batchProps: {
min: 0,
precision: 0,
maxLength: 5,
},
disabeldRender: () => customer.isDisabled,
},
{
......
......@@ -64,6 +64,21 @@ export function isClass(o) {
return Object.prototype.toString.call(o).slice(8, -1);
}
export function debounce(fn, delay = 500) {
let timer = null;
return function fun(...args) {
if (timer) {
clearTimeout(timer);
}
timer = setTimeout(() => {
timer = null;
fn.apply(this, args);
}, delay);
};
}
// 深拷贝
export function deepClone(obj) {
let result;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment