Authored by 陈峰

commit

{
"eslint.enable": true
}
\ No newline at end of file
... ...
<template>
<button class="btn" :class="classes" type="button" @touchstart="onTouchstart" @touchend.prevent.stop="onTouchend">
<span>
<slot></slot>
</span>
</button>
</template>
<script>
export default {
name: 'Button',
data() {
return {
classes: {}
};
},
methods: {
onTouchstart() {
this.classes = {
active: true
};
},
onTouchend() {
this.clearActive();
this.$emit('click');
},
clearActive() {
this.classes = {};
}
}
};
</script>
<style lang="scss">
.btn {
display: inline-block;
margin-bottom: 0;
font-weight: normal;
text-align: center;
vertical-align: middle;
touch-action: none;
background: none;
white-space: nowrap;
line-height: 1.5;
user-select: none;
font-size: 30px;
outline: 0;
border: none;
color: #000;
transition: opacity 0.1s linear, background-color 0.1s linear, border 0.1s linear, box-shadow 0.1s linear;
background-color: #eee;
height: 60px;
padding-left: 40px;
padding-right: 40px;
&:active,
&.active {
opacity: 0.5;
// color: #eee !important;
}
}
</style>
<template>
<div></div>
</template>
<script>
export default {
name: 'ButtonFav'
};
</script>
... ...
<template>
<div></div>
</template>
<script>
export default {
name: 'ButtonLike'
};
</script>
... ...
<template>
<div></div>
</template>
<script>
export default {
name: 'ButtonShare'
};
</script>
... ...
<template>
<div></div>
</template>
<script>
export default {
name: 'ButtonTopic'
};
</script>
... ...
import ButtonFav from './button-fav';
import ButtonLike from './button-like';
import ButtonShare from './button-share';
import ButtonTopic from './button-topic';
export default [
ButtonFav,
ButtonLike,
ButtonShare,
ButtonTopic
];
... ...
<template>
<div></div>
</template>
<script>
export default {
name: 'CommentList'
};
</script>
... ...
import CommentList from './comment-list';
export default [
CommentList,
];
... ...
... ... @@ -4,7 +4,7 @@
<script>
export default {
name: 'ImgSize',
name: 'ImageFormat',
props: {
src: String,
width: Number,
... ... @@ -33,7 +33,3 @@ export default {
}
};
</script>
<style>
</style>
... ...
import ImageFormat from './image-format';
export default [
ImageFormat,
];
... ...
import Buttons from './buttons';
import Images from './images';
import Layouts from './layouts';
import Products from './products';
import Comments from './comments';
export default [
...Buttons,
...Images,
...Layouts,
...Products,
...Comments
];
... ...
import Layout from './layout';
import LayoutHeader from './layout-header';
import LayoutFooter from './layout-footer';
export default [
Layout,
LayoutHeader,
LayoutFooter,
];
... ...
<template>
<div></div>
</template>
<script>
export default {
name: 'LayoutFooter'
};
</script>
... ...
<template>
<div></div>
</template>
<script>
export default {
name: 'LayoutHeader'
};
</script>
... ...
<template>
<div></div>
</template>
<script>
export default {
name: 'Layout'
};
</script>
... ...
import ProductGroup from './product-group';
export default [
ProductGroup,
];
... ...
<template>
<div></div>
</template>
<script>
export default {
name: 'ProductGroup'
};
</script>
... ...
<template>
<div>
ArticlePage
</div>
</template>
<script>
export default {
name: 'ArticlePage'
};
</script>
<style>
</style>
... ...
export default [{
path: '/',
name: 'article',
component: () => import(/* webpackChunkName: "article" */ './article')
}];
... ...
import Order from './order';
export default [...Order];
export default [{
path: '/xxx',
name: 'xxx',
// component: () => import(/* webpackChunkName: "xxx" */ './xxx')
}];
... ...
import Single from './single';
import Article from './article';
import Common from './common';
import Fashion from './fashion';
import ShowOrder from './showorder';
import Sneaker from './sneaker';
import Topic from './topic';
import UserPage from './userpage';
export default [...Single, ...Common];
export default [...Article, ...Fashion, ...ShowOrder, ...Sneaker, ...Topic, ...UserPage, ...Common];
... ...
export default [{
path: '/xxx',
name: 'xxx',
// component: () => import(/* webpackChunkName: "xxx" */ './xxx')
}];
... ...
export default [{
path: '/xxx',
name: 'xxx',
// component: () => import(/* webpackChunkName: "xxx" */ './xxx')
}];
... ...
export default [{
path: '/xxx',
name: 'xxx',
// component: () => import(/* webpackChunkName: "xxx" */ './xxx')
}];
... ...
export default [{
path: '/xxx',
name: 'xxx',
// component: () => import(/* webpackChunkName: "xxx" */ './xxx')
}];
... ...
... ... @@ -3,17 +3,28 @@
*/
import store from 'yoho-store';
import cookie from 'yoho-cookie';
import components from '../components';
import {each} from 'lodash';
export default {
loadGlobalComponents(Vue) {
each(components, component => {
Vue.component(component.name, component);
});
},
defineVueProp(Vue) {
Vue.prop = (key, value) => {
Vue[`$${key}`] = Vue.prototype[`$${key}`] = value;
};
},
install(Vue) {
// 定义Vue全局属性
this.defineVueProp(Vue);
// 注册全局components
this.loadGlobalComponents(Vue);
// 附加Vue原型属性
Vue.prop('store', store);
Vue.prop('cookie', cookie);
... ...
This diff could not be displayed because it is too large.