Toggle navigation
Toggle navigation
This project
Loading...
Sign in
fe
/
yoho-blk
·
Commits
Go to a project
GitLab
Go to group
Project
Activity
Files
Commits
Pipelines
0
Builds
0
Graphs
Milestones
Issues
0
Merge Requests
1
Members
Labels
Wiki
Forks
Network
Create a new issue
Download as
Email Patches
Plain Diff
Browse Files
Authored by
姜枫
9 years ago
Commit
7e962fe5d36e76a3bd09866dd859f38eba5ff12c
1 parent
9f42eb94
添加div滚动条
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
95 additions
and
35 deletions
apps/product/views/partial/list/filter.hbs
package.json
public/js/product/list/list-search.js
public/scss/plugin/_index.css
public/scss/plugin/_nanoscroller.css
public/scss/product/_list.css
public/webpack.config.js
apps/product/views/partial/list/filter.hbs
View file @
7e962fe
...
...
@@ -17,13 +17,15 @@
{{#
each
sortData
}}
<h3>
{{
categoryName
}}
</h3>
<div
class=
"body"
data-value=
"
{{
relationParameter
.
sort
}}
"
>
<div
class=
"list-body"
>
{{#
each
sub
}}
<div
class=
"input-radio"
data-value=
"
{{
relationParameter
.
sort
}}
"
>
{{>
icon
/
radio
}}
<label>
{{
categoryName
}}
</label>
</div>
{{/
each
}}
<div
class=
"list-body nano"
>
<div
class=
"nano-content"
>
{{#
each
sub
}}
<div
class=
"input-radio"
data-value=
"
{{
relationParameter
.
sort
}}
"
>
{{>
icon
/
radio
}}
<label>
{{
categoryName
}}
</label>
</div>
{{/
each
}}
</div>
</div>
</div>
{{/
each
}}
...
...
@@ -46,17 +48,19 @@
多选 +
</span>
</div>
<div
class=
"brand-list"
>
{{#
each
brandData
}}
<div
class=
"input-radio"
data-value=
"
{{
id
}}
"
>
{{>
icon
/
radio
}}
{{#if
brandNameEn
}}
<label>
{{
brandNameEn
}}
</label>
{{^}}
<label>
{{
brandName
}}
</label>
{{/if}}
</div>
{{/
each
}}
<div
class=
"brand-list nano"
>
<div
class=
"nano-content"
>
{{#
each
brandData
}}
<div
class=
"input-radio"
data-value=
"
{{
id
}}
"
>
{{>
icon
/
radio
}}
{{#if
brandNameEn
}}
<label>
{{
brandNameEn
}}
</label>
{{^}}
<label>
{{
brandName
}}
</label>
{{/if}}
</div>
{{/
each
}}
</div>
</div>
<div
class=
"brand-btns hide"
>
<span
class=
"btn disable large confirm"
>
确定
</span>
...
...
@@ -69,10 +73,10 @@
<h3>
价格
</h3>
<div
class=
"body price-body"
>
{{#
each
priceRange
}}
<div
class=
"input-radio"
data-value=
"
{{
lower
}}
,
{{
higher
}}
"
>
{{>
icon
/
radio
}}
<label>
¥
{{
lower
}}
-¥
{{
higher
}}
</label>
</div>
<div
class=
"input-radio"
data-value=
"
{{
lower
}}
,
{{
higher
}}
"
>
{{>
icon
/
radio
}}
<label>
¥
{{
lower
}}
-¥
{{
higher
}}
</label>
</div>
{{/
each
}}
<div
class=
"price-btns"
>
<div
class=
"price-input inline-block"
>
...
...
@@ -92,13 +96,15 @@
<div
class=
"yoho-ui-accordion"
>
<h3>
尺码
</h3>
<div
class=
"body"
>
<div
class=
"size-body"
>
{{#
each
size
}}
<div
class=
"input-radio"
data-value=
"
{{
sizeId
}}
"
>
{{>
icon
/
radio
}}
<label>
{{
sizeName
}}
</label>
<div
class=
"size-body nano"
>
<div
class=
"nano-content"
>
{{#
each
size
}}
<div
class=
"input-radio"
data-value=
"
{{
sizeId
}}
"
>
{{>
icon
/
radio
}}
<label>
{{
sizeName
}}
</label>
</div>
{{/
each
}}
</div>
{{/
each
}}
</div>
</div>
</div>
...
...
@@ -106,13 +112,15 @@
<div
class=
"yoho-ui-accordion"
>
<h3>
颜色
</h3>
<div
class=
"body"
>
<div
class=
"color-body"
>
{{#
each
colors
}}
<div
class=
"input-radio"
data-value=
"
{{
id
}}
"
>
{{>
round-color
}}
<label>
{{
title
}}
</label>
<div
class=
"color-body nano"
>
<div
class=
"nano-content"
>
{{#
each
colors
}}
<div
class=
"input-radio"
data-value=
"
{{
id
}}
"
>
{{>
round-color
}}
<label>
{{
title
}}
</label>
</div>
{{/
each
}}
</div>
{{/
each
}}
</div>
</div>
</div>
...
...
package.json
View file @
7e962fe
...
...
@@ -101,6 +101,7 @@
"yoho-jquery"
:
"^1.12.4"
,
"yoho-jquery-accordion"
:
"0.0.2"
,
"yoho-jquery-lazyload"
:
"^1.9.7"
,
"yoho-jquery-nanoscroller"
:
"0.0.1"
,
"yoho-jquery-placeholder"
:
"^2.3.1"
,
"yoho-jquery-qrcode"
:
"0.0.3"
,
"yoho-slider"
:
"0.0.2"
...
...
public/js/product/list/list-search.js
View file @
7e962fe
...
...
@@ -12,7 +12,9 @@ var YohoListPage = {
page
:
query
.
page
||
1
,
init
:
function
()
{
require
(
'yoho-jquery-accordion'
);
require
(
'yoho-jquery-nanoscroller'
);
require
(
'../../plugins/check'
);
$
(
'.nano'
).
nanoScroller
();
$
(
'.yoho-ui-accordion'
,
this
.
rootDoc
).
each
(
function
()
{
var
opts
=
{
collapsible
:
true
,
...
...
public/scss/plugin/_index.css
View file @
7e962fe
@import
"slider"
;
@import
"tips"
;
@import
"avatar"
;
@import
"nanoscroller"
;
...
...
public/scss/plugin/_nanoscroller.css
0 → 100644
View file @
7e962fe
/** initial setup **/
.nano
{
position
:
relative
;
width
:
100%
;
height
:
100%
;
overflow
:
hidden
;
}
.nano
>
.nano-content
{
position
:
absolute
;
overflow
:
scroll
;
overflow-x
:
hidden
;
top
:
0
;
right
:
0
;
bottom
:
0
;
left
:
0
;
}
.nano
>
.nano-content
:focus
{
outline
:
thin
dotted
;
}
.nano
>
.nano-content
::-webkit-scrollbar
{
display
:
none
;
}
.has-scrollbar
>
.nano-content
::-webkit-scrollbar
{
display
:
block
;
}
.nano
>
.nano-pane
{
background
:
#eee
;
position
:
absolute
;
width
:
5px
;
right
:
0
;
top
:
0
;
bottom
:
0
;
}
.nano
>
.nano-pane
>
.nano-slider
{
background
:
#111
;
position
:
relative
;
margin
:
0
;
}
...
...
public/scss/product/_list.css
View file @
7e962fe
...
...
@@ -405,3 +405,5 @@
}
}
}
...
...
public/webpack.config.js
View file @
7e962fe
...
...
@@ -24,7 +24,8 @@ shelljs.ls(path.join(__dirname, '/js/**/*.page.js')).forEach((f) => {
'yoho-jquery'
,
'yoho-jquery-lazyload'
,
'yoho-slider'
,
'yoho-jquery-accordion'
'yoho-jquery-accordion'
,
'yoho-jquery-nanoscroller'
];
});
...
...
Please
register
or
login
to post a comment