Authored by yyq

Merge branch 'master' of git.yoho.cn:fe/yoho-community-web

... ... @@ -2,7 +2,7 @@
<div v-transfer-dom :data-transfer="transfer">
<transition name="action-sheet-fade">
<div class="yoho-popup" :class="actionCls" v-show="isVisible" :style="{'z-index': zIndex}">
<div class="yoho-popup-mask" @click="maskClick"></div>
<div class="yoho-popup-mask" @click="maskClick" v-if="mask"></div>
<div class="yoho-popup-container">
<div class="yoho-popup-content">
<transition name="action-sheet-move">
... ... @@ -25,10 +25,14 @@ export default {
type: Boolean,
default: true
},
mask: {
type: Boolean,
default: true
},
transfer: Boolean,
zIndex: {
type: Number,
default: 5
default: 100
},
visible: {
type: Boolean,
... ... @@ -85,12 +89,11 @@ export default {
<style lang="scss" scoped>
.action-sheet-fade-enter,
.action-sheet-fade-leave-active {
opacity: 0;
}
.action-sheet-fade-enter-active,
.action-sheet-fade-leave-active {
transition: all 0.7s ease-in-out;
transition: all 0.3s ease-in-out;
}
.action-sheet-move-enter,
... ... @@ -100,7 +103,7 @@ export default {
.action-sheet-move-enter-active,
.action-sheet-move-leave-active {
transition: all 0.7s ease-in-out;
transition: all 0.3s ease-in-out;
}
.yoho-popup {
... ... @@ -109,7 +112,7 @@ export default {
right: 0;
top: 0;
bottom: 0;
z-index: 5;
z-index: 100;
.yoho-popup-mask {
display: block;
... ... @@ -117,7 +120,7 @@ export default {
.yoho-popup-mask,
.yoho-popup-container {
background-color: #fff;
background-color: rgba(0, 0, 0, 0);
position: absolute;
width: 100%;
height: 100%;
... ...
<template>
<div class="comment-list">
<div class="comment-content">
<Scroll ref="scroll" :data="commentList" :options="scrollOption" @pulling-up="onPullingUp">
<CommentItem
v-for="(comment, index) in commentList"
:key="index"
:parent-comment="comment.parentComment"
:children-comments="comment.childrenComments"
:column-type="columnType"
@on-reply="onReply">
</CommentItem>
</Scroll>
<div class="comment-content-flex">
<div class="comment-content">
<Scroll ref="scroll" :data="commentList" :options="scrollOption" @pulling-up="onPullingUp">
<CommentItem
v-for="(comment, index) in commentList"
:key="index"
:parent-comment="comment.parentComment"
:children-comments="comment.childrenComments"
:column-type="columnType"
@on-reply="onReply">
</CommentItem>
</Scroll>
</div>
</div>
<div class="comment-footer">
<CommentPlaceholder
... ... @@ -149,16 +151,25 @@ export default {
display: flex;
flex-direction: column;
.comment-content {
.comment-content-flex {
flex: 1;
padding-top: 40px;
padding-left: 30px;
padding-right: 30px;
overflow: hidden;
position: relative;
/deep/ .before-trigger {
color: #b0b0b0;
}
.comment-content {
position: absolute;
top: 0;
left: 0;
right: 0;
bottom: 0;
padding-top: 40px;
padding-left: 30px;
padding-right: 30px;
}
}
.comment-footer {
... ...
<template>
<div class="layout" :class="{'header-fixed': headerFixed}">
<slot name="header" v-if="hasHeader"></slot>
<div class="layout-content">
<slot></slot>
<div class="layout-content-flex">
<div class="layout-content">
<slot></slot>
</div>
</div>
</div>
</template>
... ... @@ -64,12 +66,21 @@ export default {
}
}
.layout-content {
.layout-content-flex {
width: 100%;
height: 100%;
flex: 1;
position: relative;
overflow: hidden;
-webkit-overflow-scrolling: touch;
.layout-content {
position: absolute;
top: 0;
left: 0;
right: 0;
bottom: 0;
}
}
}
</style>
... ...
... ... @@ -19,7 +19,7 @@
<script>
import {createNamespacedHelpers} from 'vuex';
const {mapActions} = createNamespacedHelpers('product');
const {mapActions, mapGetters} = createNamespacedHelpers('product');
export default {
name: 'ProductGroupItem',
... ... @@ -45,14 +45,21 @@ export default {
},
favText() {
return this.favorite ? '已收藏' : '收藏';
}
},
...mapGetters(['getLogin']),
},
methods: {
...mapActions(['postProductFav']),
async onFav() {
if (!this.isLogin) {
this.$yoho.goLogin();
return;
}
if (this.posting) {
return;
}
this.posting = true;
const favorite = !this.favorite;
... ...
... ... @@ -142,27 +142,8 @@ export default {
}
},
onExpand(params) {
const toast = this.$createToast({
time: 0,
txt: '加载中',
mask: true,
type: 'loading'
});
toast.show();
this.showArticleDetailAction = true;
this.$nextTick(() => {
this.$refs.actionSheet.show(params).then(() => {
toast.hide();
}).catch(() => {
this.$createToast && this.$createToast({
txt: '服务器开小差了',
type: 'warn',
time: 1000
}).show();
});
});
this.$refs.actionSheet.show(params);
}
},
components: {
... ...
<template>
<YohoActionSheet ref="actionSheet" :full="true">
<YohoActionSheet ref="actionSheet" :full="true" :mask="false">
<ArticleDetail ref="detail" @on-close="onClose"></ArticleDetail>
</YohoActionSheet>
</template>
... ... @@ -19,8 +19,8 @@ export default {
},
methods: {
async show(params) {
await this.$refs.detail.fetch(params);
this.$refs.actionSheet.show();
await this.$refs.detail.fetch(params);
},
hide() {
this.$refs.actionSheet.hide();
... ...
... ... @@ -62,6 +62,11 @@ export default function() {
state.window.supportsPassive = supportsPassive;
}
},
getters: {
getLogin(state) {
return state.context.isLogin;
}
},
actions: {
reportYas(params, {params: {appop, param}, asyncindx = false}) {
document.addEventListener('deviceready', () => {
... ...