Toggle navigation
Toggle navigation
This project
Loading...
Sign in
fe
/
yoho-community-web
·
Commits
Go to a project
GitLab
Go to group
Project
Activity
Files
Commits
Pipelines
0
Builds
0
Graphs
Milestones
Issues
1
Merge Requests
0
Members
Labels
Wiki
Forks
Network
Create a new issue
Download as
Email Patches
Plain Diff
Browse Files
Authored by
htoooth
6 years ago
Commit
3a004dd0719ad22956c41ab9fac9f88c2e9d1235
1 parent
5b69a2b1
add productlist
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
59 additions
and
30 deletions
.npmrc
apps/pages/showorder/components/desc-footer.vue
apps/pages/showorder/components/order-slide-item.vue
apps/pages/showorder/components/product-item.vue
apps/pages/showorder/components/products.vue
apps/pages/showorder/index.js
apps/pages/showorder/order.vue
.npmrc
View file @
3a004dd
phantomjs_cdnurl=http://npm.taobao.org/mirrors/phantomjs
sass_binary_site=https://npm.taobao.org/mirrors/node-sass/
\ No newline at end of file
sass_binary_site=https://npm.taobao.org/mirrors/node-sass/
registry=http://npm.yohops.com
...
...
apps/pages/showorder/components/desc-footer.vue
View file @
3a004dd
<template>
<div class="footer">
<TextEllipsis :text="text" class="desc" :isLimitHeight="isLimitHeight" :height="
68
">
<TextEllipsis :text="text" class="desc" :isLimitHeight="isLimitHeight" :height="
75
">
<template slot="more"><span>...</span><span class="link" @click="onClick">展开</span></template>
<span slot="after" v-if="!isLimitHeight" @click="isLimitHeight=true"></span>
</TextEllipsis>
...
...
@@ -16,12 +16,12 @@
<script>
import Products from './products'
import Products from './products'
;
export default {
name: 'DescFooter',
components: {
Products
Products
,
},
data() {
return {
...
...
@@ -31,6 +31,7 @@ export default {
},
methods: {
onClick() {
console.log('展开');
this.isLimitHeight = false;
}
},
...
...
@@ -62,7 +63,6 @@ export default {
display: inline-block;
width: 290px;
height: 100px;
background-color: white;
margin-top: 36px;
}
...
...
apps/pages/showorder/components/order-slide-item.vue
View file @
3a004dd
...
...
@@ -33,7 +33,6 @@
import {Slide} from 'cube-ui';
import AvatarHeader from './avatar-header';
import DescFooter from './desc-footer';
import Test from './test'
const img = require('statics/image/showorder/test.png')
...
...
@@ -43,8 +42,7 @@ export default {
AvatarHeader,
DescFooter,
Slide,
SlideItem: Slide.Item,
Test
SlideItem: Slide.Item
},
data() {
return {
...
...
apps/pages/showorder/components/product-item.vue
View file @
3a004dd
<template>
<div class="product-wrapper">
<img :src="url" alt="" srcset="">
<div class="product-wrapper" @click="onclick">
<img class="image-cls" :src="url" alt="" srcset="">
<div class="price">{{price}}</div>
</div>
</template>
...
...
@@ -9,10 +9,10 @@
export default {
name: 'ProductItem',
props: {
pid:{
pid:
{
type: String,
default() {
return '1212'
return '1212'
;
}
},
url: {
...
...
@@ -27,8 +27,13 @@ export default {
return '¥121314';
}
}
}
}
},
methods: {
onclick() {
console.log('click product')
}
},
};
</script>
<style lang="scss" scoped>
...
...
@@ -39,6 +44,11 @@ export default {
height: 100px;
}
.image-cls {
width: 100px;
height: 100px;
}
.price {
width: 100%;
height: 28px;
...
...
@@ -47,7 +57,7 @@ export default {
position: absolute;
bottom: 0;
text-align: center;
background: rgba(0,
0,0,0.50
);
background: rgba(0,
0, 0, 0.5
);
color: white;
}
...
...
apps/pages/showorder/components/products.vue
View file @
3a004dd
<template>
<div class="products-wrapper">
<ProductItem class="item" v-for="i in 3"></ProductItem>
</div>
<Scroll class="product-list-wrapper" direction="horizontal" :options="scrollOpts">
<ul class="list-wrapper">
<ProductItem v-for="item in 3" class="list-item"></ProductItem>
</ul>
</Scroll>
</template>
<script>
import ProductItem from './product-item'
import {Scroll} from 'cube-ui';
import ProductItem from './product-item';
export default {
name: 'Products',
props: {
list: {
type: Array,
default() {
return [];
name: 'Test',
data() {
return {
scrollOpts: {
click: false
}
}
}
;
},
components: {
Scroll,
ProductItem
}
}
}
;
</script>
<style lang="scss" scoped>
.products-wrapper {
overflow: scroll;
.product-list-wrapper {
width: 290px;
height: 100px;
overflow: hidden;
/deep/ .cube-scroll-content {
display: inline-block;
}
}
.item {
.list-wrapper {
padding: 0 10px;
line-height: 60px;
white-space: nowrap;
}
.list-item {
display: inline-block;
margin-right: 20px;
}
</style>
...
...
apps/pages/showorder/index.js
View file @
3a004dd
export
default
[{
path
:
'/order/:id'
,
name
:
'order'
,
...
...
apps/pages/showorder/order.vue
View file @
3a004dd
...
...
@@ -53,6 +53,7 @@ export default {
probeType: 3,
click: true,
directionLockThreshold: 0,
stopPropagation: true
}
};
},
...
...
Please
register
or
login
to post a comment