Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
M
merchant-manage-ui
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
ui
merchant-manage-ui
Commits
b576b109
Commit
b576b109
authored
Dec 30, 2022
by
武广
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'feature/validator-stock' into 'master'
Feature/validator stock See merge request
!71
parents
7e858c5b
f94d3062
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
41 additions
and
3 deletions
+41
-3
CommonTemplate.jsx
src/pages/ServiceGoods/components/CommonTemplate.jsx
+4
-2
config.js
src/pages/ServiceGoods/config.js
+22
-1
utils.js
src/utils/utils.js
+15
-0
No files found.
src/pages/ServiceGoods/components/CommonTemplate.jsx
View file @
b576b109
...
@@ -130,7 +130,6 @@ export const CreateFormInput = props => {
...
@@ -130,7 +130,6 @@ export const CreateFormInput = props => {
</>
</>
);
);
}
}
return
(
return
(
<
InputNumber
<
InputNumber
{
...
roleProps
}
{
...
roleProps
}
...
@@ -138,7 +137,10 @@ export const CreateFormInput = props => {
...
@@ -138,7 +137,10 @@ export const CreateFormInput = props => {
style=
{
{
width
:
'
100%
'
}
}
style=
{
{
width
:
'
100%
'
}
}
placeholder=
{
`请输入${title}`
}
placeholder=
{
`请输入${title}`
}
onBlur=
{
e
=>
{
onBlur=
{
e
=>
{
onBlurEvent
(
e
.
target
.
value
,
dataIndex
,
rowIndex
);
const
inputTarget
=
e
.
target
;
setTimeout
(()
=>
{
onBlurEvent
(
inputTarget
.
value
,
dataIndex
,
rowIndex
);
},
10
);
}
}
}
}
/>
/>
);
);
...
...
src/pages/ServiceGoods/config.js
View file @
b576b109
...
@@ -137,6 +137,10 @@ export const StaticColumns = customer => [
...
@@ -137,6 +137,10 @@ export const StaticColumns = customer => [
precision
:
2
,
precision
:
2
,
min
:
0
,
min
:
0
,
},
},
batchProps
:
{
precision
:
2
,
min
:
0
,
},
roleRules
:
{
required
:
true
},
roleRules
:
{
required
:
true
},
disabeldRender
:
()
=>
customer
.
isDisabled
,
disabeldRender
:
()
=>
customer
.
isDisabled
,
},
},
...
@@ -148,8 +152,10 @@ export const StaticColumns = customer => [
...
@@ -148,8 +152,10 @@ export const StaticColumns = customer => [
roleRules
:
{
required
:
false
},
roleRules
:
{
required
:
false
},
roleProps
:
{
roleProps
:
{
min
:
0
,
min
:
0
,
// max: 100,
},
},
// batchProps: {
// min: 0,
// },
},
},
{
{
title
:
'
市场价
'
,
title
:
'
市场价
'
,
...
@@ -160,6 +166,10 @@ export const StaticColumns = customer => [
...
@@ -160,6 +166,10 @@ export const StaticColumns = customer => [
precision
:
2
,
precision
:
2
,
min
:
0
,
min
:
0
,
},
},
batchProps
:
{
precision
:
2
,
min
:
0
,
},
roleRules
:
{
required
:
true
},
roleRules
:
{
required
:
true
},
disabeldRender
:
()
=>
customer
.
isDisabled
,
disabeldRender
:
()
=>
customer
.
isDisabled
,
},
},
...
@@ -174,6 +184,10 @@ export const StaticColumns = customer => [
...
@@ -174,6 +184,10 @@ export const StaticColumns = customer => [
precision
:
2
,
precision
:
2
,
min
:
0
,
min
:
0
,
},
},
batchProps
:
{
precision
:
2
,
min
:
0
,
},
disabeldRender
:
()
=>
customer
.
isDisabled
,
disabeldRender
:
()
=>
customer
.
isDisabled
,
},
},
{
{
...
@@ -208,6 +222,8 @@ export const StaticColumns = customer => [
...
@@ -208,6 +222,8 @@ export const StaticColumns = customer => [
},
},
roleProps
:
{
roleProps
:
{
min
:
0
,
min
:
0
,
step
:
1
,
precision
:
0
,
},
},
roleRules
:
{
required
:
true
},
roleRules
:
{
required
:
true
},
disabeldRender
:
record
=>
{
disabeldRender
:
record
=>
{
...
@@ -226,6 +242,11 @@ export const StaticColumns = customer => [
...
@@ -226,6 +242,11 @@ export const StaticColumns = customer => [
precision
:
0
,
precision
:
0
,
maxLength
:
5
,
maxLength
:
5
,
},
},
batchProps
:
{
min
:
0
,
precision
:
0
,
maxLength
:
5
,
},
disabeldRender
:
()
=>
customer
.
isDisabled
,
disabeldRender
:
()
=>
customer
.
isDisabled
,
},
},
{
{
...
...
src/utils/utils.js
View file @
b576b109
...
@@ -64,6 +64,21 @@ export function isClass(o) {
...
@@ -64,6 +64,21 @@ export function isClass(o) {
return
Object
.
prototype
.
toString
.
call
(
o
).
slice
(
8
,
-
1
);
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
)
{
export
function
deepClone
(
obj
)
{
let
result
;
let
result
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment