Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
J
jinfa-platform
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
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
黄庭坚
jinfa-platform
Commits
e925e345
Commit
e925e345
authored
Sep 24, 2021
by
XieZhiXiong
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
chore: 添加不可选择过去时间
parent
84b13a31
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
21 additions
and
1 deletion
+21
-1
schema.tsx
...Coupon/merchantCouponQuery/components/EditForm/schema.tsx
+21
-1
No files found.
src/pages/transaction/marketingAbility/merchantCoupon/merchantCouponQuery/components/EditForm/schema.tsx
View file @
e925e345
...
...
@@ -2,12 +2,21 @@
* @Author: XieZhiXiong
* @Date: 2021-07-02 17:53:48
* @LastEditors: XieZhiXiong
* @LastEditTime: 2021-0
7-02 17:53:48
* @LastEditTime: 2021-0
9-24 11:52:11
* @Description:
*/
import
{
ISchema
}
from
'@formily/antd'
;
import
moment
from
'moment'
;
import
{
PATTERN_MAPS
}
from
'@/constants/regExp'
;
function
range
(
start
,
end
)
{
const
result
=
[];
for
(
let
i
=
start
;
i
<
end
;
i
++
)
{
result
.
push
(
i
);
}
return
result
;
}
const
schema
:
ISchema
=
{
type
:
'object'
,
properties
:
{
...
...
@@ -29,6 +38,17 @@ const schema: ISchema = {
style
:
{
width
:
'100%'
,
},
disabledDate
:
(
current
)
=>
current
&&
current
<
moment
().
startOf
(
'day'
),
disabledTime
:
(
_
,
type
)
=>
{
if
(
type
===
'start'
)
{
return
{
disabledHours
:
()
=>
range
(
0
,
24
).
splice
(
0
,
moment
().
get
(
'hour'
)),
disabledMinutes
:
()
=>
range
(
0
,
60
).
splice
(
0
,
moment
().
get
(
'minute'
)),
disabledSeconds
:
()
=>
range
(
0
,
60
).
splice
(
0
,
moment
().
get
(
'second'
)),
};
}
return
{};
},
},
},
quantity
:
{
...
...
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