Skip to content

Commit

Permalink
perf:优化首页
Browse files Browse the repository at this point in the history
  • Loading branch information
shaobeichen committed Jun 25, 2018
1 parent 3390de2 commit f8b967a
Showing 1 changed file with 16 additions and 7 deletions.
23 changes: 16 additions & 7 deletions src/App.vue
Original file line number Diff line number Diff line change
@@ -1,23 +1,28 @@
<template>
<div id="app" v-cloak>
<!--<music></music>-->
<keep-alive>
<router-view v-if="$route.meta.keepAlive"/>
</keep-alive>
<router-view v-if="!$route.meta.keepAlive"/>

<loading v-if="loading"></loading>
<div v-else>
<keep-alive>
<router-view v-if="$route.meta.keepAlive"/>
</keep-alive>
<router-view v-if="!$route.meta.keepAlive"/>
</div>
</div>

</template>

<script>
// import music from './components/music';
import loading from './components/loading';
import {addScript} from './common/api/script';
export default {
name: 'App',
data() {
return {}
return {
loading: true
}
},
created() {
// 电商网站
Expand All @@ -31,8 +36,12 @@
// 超市
// addScript('//at.alicdn.com/t/font_689469_m3x6295wjfh41jor.js');
},
mounted() {
this.loading = false;
},
components: {
// music
// music,
loading
}
}
</script>
Expand Down

0 comments on commit f8b967a

Please sign in to comment.