Authored by 陈峰

commit

... ... @@ -14,7 +14,7 @@ function getPredata(key) {
function fetch($api) {
return function(url, params, options) {
if (Vue.$isServer) {
if (process.env.VUE_ENV === 'server') {
return $api.get(url, params, options);
}
let ispredata = {
... ... @@ -68,7 +68,7 @@ function init() {
}
export default ($api) => {
if (!Vue.$isServer) {
if (process.env.VUE_ENV !== 'server') {
init();
}
return {
... ...
... ... @@ -28,15 +28,12 @@ export default {
};
},
created() {
console.log('created')
this.id = +this.$route.params.id;
this.loadPreData();
},
activated() {
console.log('activated')
if (+this.$route.params.id !== this.id) {
this.loadPreData();
this.init();
}
},
... ...
... ... @@ -611,16 +611,12 @@ ul {
white-space: nowrap;
}
img[lazy] {
-webkit-transition: opacity 500ms;
transition: opacity 500ms;
opacity: 0.2;
}
img[lazy=loading] {
opacity: 0.2;
}
img[lazy=error] {
opacity: 0;
}
img[lazy=loaded] {
... ...
... ... @@ -89,7 +89,7 @@ function setArticleList(state, data, type, thumb) {
if (thumb) {
state[articlefield(type, thumb)] = data;
} else {
state[articlefield(type, thumb)] = state[articlefield(type, thumb)].concat(data);
state[articlefield(type)] = state[articlefield(type)].concat(data);
}
}
... ...