Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
T
teddi
Project
Project
Details
Activity
Releases
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
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
wildfirecode13
teddi
Commits
966e6425
Commit
966e6425
authored
Dec 09, 2020
by
wildfirecode13
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1
parent
fc4f6656
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
16 additions
and
35 deletions
+16
-35
pagecountdown.jsx
examples/src/pages/pagecountdown/pagecountdown.jsx
+0
-25
pagecountdown.less
examples/src/pages/pagecountdown/pagecountdown.less
+0
-8
pageindex.jsx
examples/src/pages/pageindex/pageindex.jsx
+16
-2
No files found.
examples/src/pages/pagecountdown/pagecountdown.jsx
deleted
100644 → 0
View file @
fc4f6656
'use strict'
;
import
React
,
{
Component
}
from
'react'
;
import
resList
from
'../../resconfig/resList'
;
//import API from '../../api';
import
{
Countdown
}
from
'teddi'
import
'./pageindex.less'
;
class
Pageindex
extends
Component
{
constructor
(
props
)
{
super
(
props
);
this
.
state
=
{
resList
:
resList
};
}
componentDidMount
(){
}
render
()
{
return
<
div
className=
"index "
>
</
div
>;
}
}
export
default
Pageindex
;
examples/src/pages/pagecountdown/pagecountdown.less
deleted
100644 → 0
View file @
fc4f6656
.index {
top: 0px;
left: 0px;
width: 750px;
height: 1624px;
display: block;
position: absolute;
}
examples/src/pages/pageindex/pageindex.jsx
View file @
966e6425
...
...
@@ -10,7 +10,7 @@ import { Countdown } from 'teddi'
class
Pageindex
extends
Component
{
constructor
(
props
)
{
super
(
props
);
this
.
state
=
{
resList
:
resList
,
countdown1
:{},
countdown2
:{}};
this
.
state
=
{
resList
:
resList
,
countdown1
:{},
countdown2
:{}
,
countdown3
:{}
};
}
componentDidMount
()
{
...
...
@@ -25,14 +25,28 @@ class Pageindex extends Component {
this
.
setState
({
countdown2
:
data
})
},
this
);
countdown2
.
start
();
const
countdown3
=
new
Countdown
(
0
*
1
+
60
*
0
+
10
,
'mmss'
);
countdown3
.
on
(
'update'
,
(
data
)
=>
{
this
.
setState
({
countdown3
:
data
})
},
this
);
countdown3
.
on
(
'complete'
,
(
data
)
=>
{
this
.
setState
({
countdown3Complete
:
1
})
},
this
);
countdown3
.
start
();
}
render
()
{
const
{
countdown1
,
countdown2
}
=
this
.
state
;
const
{
countdown1
,
countdown2
,
countdown3
}
=
this
.
state
;
return
<
div
className=
"index "
>
<
h5
>
倒计时
</
h5
>
<
div
>
{
countdown1
.
dd
}
:
{
countdown1
.
hh
}
:
{
countdown1
.
mm
}
:
{
countdown1
.
ss
}
</
div
>
<
div
>
{
countdown1
.
dd
}
天
{
countdown1
.
hh
}
小时
{
countdown1
.
mm
}
分钟
{
countdown1
.
ss
}
秒
</
div
>
<
div
>
{
countdown2
.
hh
}
小时
{
countdown2
.
mm
}
分钟
{
countdown2
.
ss
}
秒
</
div
>
{
this
.
state
.
countdown3Complete
?
<
div
>
吃饭时间到
</
div
>
:
<
div
>
还有
{
countdown3
.
mm
}
分钟
{
countdown3
.
ss
}
秒吃饭
</
div
>
}
</
div
>;
}
}
...
...
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