Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
C
community_vote
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
JIRA
JIRA
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
hanfeng zhang
community_vote
Commits
5130d47b
Commit
5130d47b
authored
Jun 09, 2021
by
xhx
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
时间框架
parent
9f8c3b01
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
1 deletion
+4
-1
timebox.vue
src/components/timebox.vue
+4
-1
No files found.
src/components/timebox.vue
View file @
5130d47b
...
@@ -35,7 +35,10 @@ export default Vue.extend({
...
@@ -35,7 +35,10 @@ export default Vue.extend({
methods
:
{
methods
:
{
getTimes
()
{
getTimes
()
{
const
r
=
+
this
.
time
-
Date
.
now
()
const
r
=
+
this
.
time
-
Date
.
now
()
if
(
r
<
0
)
throw
Error
(
'已超出截至时间'
)
if
(
r
<
0
)
{
if
(
this
.
timer
)
clearInterval
(
this
.
timer
)
throw
Error
(
'已超出截至时间'
)
}
const
day
=
+
parseInt
(
r
/
(
1000
*
60
*
60
*
24
)
+
''
)
const
day
=
+
parseInt
(
r
/
(
1000
*
60
*
60
*
24
)
+
''
)
this
.
day
=
day
>=
10
?
day
+
''
:
'0'
+
day
this
.
day
=
day
>=
10
?
day
+
''
:
'0'
+
day
const
hour
=
+
parseInt
(
r
/
(
1000
*
60
*
60
)
%
24
+
''
)
const
hour
=
+
parseInt
(
r
/
(
1000
*
60
*
60
)
%
24
+
''
)
...
...
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