Toggle navigation
Toggle navigation
This project
Loading...
Sign in
fe
/
yohoblk-wap
·
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
郭成尧
9 years ago
Commit
ab6d804d1a3ff73b72f806d6d4e6e864d731c991
1 parent
f64d45a6
resouces-vue-trans
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
47 additions
and
28 deletions
config/content-code.js
public/js/channel/brand.page.js
public/vue/channel/brand-list-box.vue
public/vue/channel/brand-shop-top.vue
config/content-code.js
View file @
ab6d804
...
...
@@ -12,6 +12,20 @@ const channel = {
lifestyle
:
'3ad8826fc89fb0d023a4cd06a6991219'
};
const
brand
=
{
men
:
'9ee58aadd9559d07207fe4a98843eaac'
,
women
:
'aa8d34c85934c2ccc16e2babd3eb5e47'
,
lifestyle
:
'3ad8826fc89fb0d023a4cd06a6991219'
};
const
cate
=
{
men
:
'9ee58aadd9559d07207fe4a98843eaac'
,
women
:
'aa8d34c85934c2ccc16e2babd3eb5e47'
,
lifestyle
:
'3ad8826fc89fb0d023a4cd06a6991219'
};
module
.
exports
=
{
channel
channel
,
brand
,
cate
};
...
...
public/js/channel/brand.page.js
View file @
ab6d804
...
...
@@ -4,14 +4,21 @@
* Date: 2016/7/19
* Time: 16:05
*/
const
$
=
require
(
'yoho-jquery'
);
const
Vue
=
require
(
'yoho-vue'
);
const
lazyload
=
require
(
'yoho-vue-lazyload'
);
const
contentCode
=
require
(
'content-code'
);
const
qs
=
require
(
'yoho-qs'
);
const
brandBox
=
require
(
'channel/brand-box.vue'
);
new
Vue
({
el
:
'#brand'
,
data
()
{
return
{
page
:
'brand'
,
contentCode
:
contentCode
.
brand
[
qs
.
brand
||
'men'
]
}
},
components
:
{
brandBox
}
...
...
@@ -19,20 +26,3 @@ new Vue({
Vue
.
use
(
lazyload
);
const
$expand
=
$
(
'.expand'
),
$collapse
=
$
(
'.collapse'
),
$brandIntro
=
$
(
'.brand-intro'
),
exCoTm
=
4
;
// 展开隐藏的倍数
$expand
.
on
(
'click'
,
function
()
{
$brandIntro
.
removeClass
(
'line-clamp'
).
animate
({
height
:
$brandIntro
.
height
()
*
exCoTm
});
$expand
.
hide
();
$collapse
.
show
();
});
$collapse
.
on
(
'click'
,
function
()
{
$brandIntro
.
addClass
(
'line-clamp'
).
animate
({
height
:
$brandIntro
.
height
()
/
exCoTm
});
$collapse
.
hide
();
$expand
.
show
();
});
...
...
public/vue/channel/brand-list-box.vue
View file @
ab6d804
<template>
<div>
<resources v-bind:content
="'111'
"></resources>
<resources v-bind:content
-code.sync="contentCode
"></resources>
<letter-list></letter-list>
<brand-list v-bind:channel="'boys'"></brand-list>
</div>
...
...
public/vue/channel/brand-shop-top.vue
View file @
ab6d804
...
...
@@ -4,9 +4,9 @@
<img v-if="brandIntro.showBrandLogo" v-lazy="brandIntro.brandLogo" alt="{{ brandIntro.brandName }}">
<div v-else class="brand-title">{{ brandIntro.brandName }}</div>
<hr>
<div
class="brand-intro line-clamp
">{{ brandIntro.brandIntro }}</div>
<div
v-show="showMore" transition="brand-intro" v-bind:class="{ 'brand-short': !showMore }
">{{ brandIntro.brandIntro }}</div>
</div>
<div class="expand"></div>
<div class="expand"
@click="introTrans()"
></div>
<div class="collapse"></div>
</div>
</template>
...
...
@@ -34,18 +34,29 @@
border-top: none;
}
.brand-intro {
.brand-intro-transition {
transition: all 0.3s ease;
margin-left: 5%;
width: 90%;
height: 60px;
font-size: 16px;
line-height: 32px;
width: 90%;
height: 220px;
overflow-y: auto;
text-overflow: ellipsis;
}
.line-clamp {
.brand-intro-enter,
.brand-intro-leave {
height: 60px;
}
.brand-short {
height: 60px !important;
display: -webkit-box !important;
margin-left: 5%;
font-size: 16px;
line-height: 32px;
width: 82%;
text-overflow: ellipsis;
overflow-y: hidden;
display: -webkit-box;
-webkit-line-clamp: 2;
...
...
@@ -82,7 +93,8 @@
props: ['domain'],
data() {
return {
brandIntro: {}
brandIntro: {},
showMore: false
};
},
watch: {
...
...
@@ -104,6 +116,9 @@
}).fail(() => {
tip('网络错误');
});
},
introTrans() {
this.showMore = this.showMore !== true;
}
},
created() {
...
...
Please
register
or
login
to post a comment