Toggle navigation
Toggle navigation
This project
Loading...
Sign in
fe
/
yohobuywap-node
·
Commits
Go to a project
GitLab
Go to group
Project
Activity
Files
Commits
Pipelines
0
Builds
0
Graphs
Milestones
Issues
0
Merge Requests
0
Members
Labels
Wiki
Forks
Network
Create a new issue
Download as
Email Patches
Plain Diff
Browse Files
Authored by
郭成尧
7 years ago
Commit
538639fb0b53047324cf112c5a4559009a3b575e
1 parent
5ca6ffe0
tapChange
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
21 additions
and
0 deletions
public/js/home/coupon-new/controller.js
public/js/home/coupon-new/controller.js
View file @
538639f
import
$
from
'yoho-jquery'
;
import
Page
from
'yoho-page'
;
class
ConponController
extends
Page
{
constructor
()
{
super
();
this
.
view
=
{
filterBtn
:
$
(
'.filter-btn'
)
};
this
.
view
.
filterBtn
.
on
(
'click'
,
this
.
tapChange
.
bind
(
this
));
}
/**
* tab 切换
*/
tapChange
(
event
)
{
let
itemClicked
=
$
(
event
.
currentTarget
);
if
(
itemClicked
.
hasClass
(
'active'
))
{
itemClicked
.
removeClass
(
'active'
);
}
else
{
this
.
view
.
filterBtn
.
removeClass
(
'active'
);
itemClicked
.
addClass
(
'active'
);
}
}
}
...
...
Please
register
or
login
to post a comment