Authored by yyq

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

... ... @@ -22,10 +22,10 @@ export default context => {
store.commit(ROUTE_CHANGE, {to: router.currentRoute});
console.log(matched, url)
if (matched.some(m => !m)) {
reportError(new Error('导航组件为空'));
router.push({name: 'error.500'});
return resolve(app);
return reject({code: 500, message: ''});
}
if (!matched.length) {
return reject({code: 404, message: ''});
... ... @@ -38,8 +38,7 @@ export default context => {
router.onError(e => {
reportError(e);
router.push({name: 'error.500'});
return resolve(app);
return reject({code: 500, message: ''});
});
});
};
... ...
... ... @@ -28,7 +28,6 @@
</template>
<script>
import anime from 'animejs';
import {createNamespacedHelpers} from 'vuex';
const {mapMutations, mapState} = createNamespacedHelpers('article');
... ... @@ -116,6 +115,9 @@ export default {
type: this.type
});
}
import('animejs').then(({default: anime}) => {
this.anime = anime;
});
},
methods: {
...mapMutations(['CHANGE_ARTICLE_LIST_INTRO_HEIGHT', 'CHANGE_ARTICLE_LIST_INTRO']),
... ... @@ -144,13 +146,16 @@ export default {
if (!this.isEllipsis) {
return;
}
if (!this.anime) {
return;
}
const isExpand = !this.data.isExpand;
const height = isExpand ? this.data.introHeight : this.introCollapseHeight;
this.$emit('on-expanding');
this.isPreExpand = isExpand;
anime({
this.anime({
targets: this.$refs.intro,
height,
easing: 'cubicBezier(0.165, 0.84, 0.44, 1)',
... ...
<template>
<div class="err-500">
500
<NotFound></NotFound>
</div>
</template>
... ...