Authored by ccbikai

修改首页加载方式

<div id="channel">
<tab v-bind:page="page"></tab>
<resources v-bind:content-code.sync="contentCode"></resources>
<channel></channel>
</div>
... ...
const Vue = require('yoho-vue');
const lazyload = require('yoho-vue-lazyload');
const qs = require('yoho-qs');
const contentCode = require('content-code');
const tab = require('channel/tab.vue');
const resources = require('component/resources/index.vue');
const channel = require('channel/index.vue');
require('common/vue-filter');
... ... @@ -12,14 +9,7 @@ Vue.use(lazyload);
new Vue({
el: '#channel',
data() {
return {
page: 'channel',
contentCode: contentCode.channel[qs.channel || 'men']
};
},
components: {
tab: tab,
resources: resources
channel
}
});
... ...
<template>
<tab v-bind:page="page"></tab>
<resources v-bind:content-code.sync="contentCode"></resources>
</template>
<script>
const qs = require('yoho-qs');
const contentCode = require('content-code');
const tab = require('channel/tab.vue');
const resources = require('component/resources/index.vue');
module.exports = {
data() {
return {
page: 'channel',
contentCode: contentCode.channel[qs.channel || 'men']
};
},
components: {
tab: tab,
resources: resources
}
};
</script>
<style>
</style>
... ...