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
Plain Diff
Browse Files
Authored by
yyq
6 years ago
Commit
69db58829cf175ff81d9437189e54f4c77435fa7
2 parents
12303b06
ecea0ac1
Merge branch 'master' of git.yoho.cn:fe/yoho-community-web
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
10 additions
and
7 deletions
apps/entry-server.js
apps/pages/article/components/article/article-item-intro.vue
apps/pages/common/error/500.vue
apps/entry-server.js
View file @
69db588
...
...
@@ -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
:
''
});
});
});
};
...
...
apps/pages/article/components/article/article-item-intro.vue
View file @
69db588
...
...
@@ -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)',
...
...
apps/pages/common/error/500.vue
View file @
69db588
<template>
<div class="err-500">
500
<NotFound></NotFound>
</div>
</template>
...
...
Please
register
or
login
to post a comment