Authored by htoooth

Merge remote-tracking branch 'origin/master'

# Conflicts:
#	apps/pages/article/article.vue
1 import Layout from './layout'; 1 import Layout from './layout';
2 import LayoutHeader from './layout-header'; 2 import LayoutHeader from './layout-header';
3 -import LayoutFooter from './layout-footer';  
4 3
5 export default [ 4 export default [
6 Layout, 5 Layout,
7 LayoutHeader, 6 LayoutHeader,
8 - LayoutFooter,  
9 ]; 7 ];
1 -<template>  
2 - <div></div>  
3 -</template>  
4 -  
5 -<script>  
6 -export default {  
7 - name: 'LayoutFooter'  
8 -};  
9 -</script>  
1 <template> 1 <template>
2 - <div></div> 2 + <div class="layout-header">
  3 + <div class="back flex">
  4 + <slot name="back">
  5 + <i class="iconfont icon-back"></i>
  6 + </slot>
  7 + </div>
  8 + <div class="title flex">
  9 + {{title}}
  10 + </div>
  11 + <div class="opts flex">
  12 + <i class="iconfont icon-back"></i>
  13 + </div>
  14 + </div>
3 </template> 15 </template>
4 16
5 <script> 17 <script>
6 export default { 18 export default {
7 - name: 'LayoutHeader' 19 + name: 'LayoutHeader',
  20 + props: {
  21 + title: String
  22 + }
8 }; 23 };
9 </script> 24 </script>
  25 +
  26 +<style lang="scss" scoped>
  27 +.layout-header {
  28 + width: 100%;
  29 + height: 45PX;
  30 + overflow: hidden;
  31 + display: flex;
  32 +
  33 + .flex {
  34 + display: flex;
  35 + align-items: center;
  36 + }
  37 +
  38 + .iconfont {
  39 + width: 70px;
  40 + height: 100%;
  41 + display: flex;
  42 + justify-content: center;
  43 + align-items: center;
  44 + }
  45 +
  46 + .back {
  47 + width: 150px;
  48 + }
  49 +
  50 + .title {
  51 + flex: 1;
  52 + justify-content: center;
  53 + font-size: 30px;
  54 + }
  55 +
  56 + .opts {
  57 + width: 150px;
  58 + justify-content: flex-end;
  59 + }
  60 +}
  61 +</style>
1 <template> 1 <template>
2 - <div></div> 2 + <div class="layout">
  3 + <slot name="header" v-if="hasHeader"></slot>
  4 + <div class="layout-content">
  5 + <Scroll ref="scroll" :options="scrollOption" @pulling-up="onPullingUp" @pulling-down="onPullingDown">
  6 + <slot></slot>
  7 + </Scroll>
  8 + </div>
  9 + </div>
3 </template> 10 </template>
4 11
5 <script> 12 <script>
  13 +import {Scroll} from 'cube-ui';
  14 +
6 export default { 15 export default {
7 - name: 'Layout' 16 + name: 'Layout',
  17 + props: {
  18 + scrollOption: {
  19 + type: Object,
  20 + default() {
  21 + return {
  22 + pullDownRefresh: true,
  23 + observeDOM: false,
  24 + pullUpLoad: true
  25 + };
  26 + }
  27 + }
  28 + },
  29 + data() {
  30 + return {
  31 + hasHeader: false,
  32 + };
  33 + },
  34 + mounted() {
  35 + if (this.$slots.header) {
  36 + this.hasHeader = true;
  37 + }
  38 + },
  39 + methods: {
  40 + onPullingUp(evt) {
  41 + this.$emit('pulling-up', evt);
  42 + },
  43 + onPullingDown(evt) {
  44 + this.$emit('pulling-down', evt);
  45 + },
  46 + },
  47 + components: {Scroll}
8 }; 48 };
9 </script> 49 </script>
  50 +
  51 +<style lang="scss" scoped>
  52 +.layout {
  53 + width: 100%;
  54 + height: 100%;
  55 + overflow: hidden;
  56 + position: absolute;
  57 + top: 0;
  58 + left: 0;
  59 + right: 0;
  60 + bottom: 0;
  61 + display: flex;
  62 + flex-direction: column;
  63 +
  64 + .layout-content {
  65 + flex: 1;
  66 + overflow: hidden;
  67 + }
  68 +}
  69 +</style>
@@ -11,7 +11,6 @@ import yoho from 'common/yoho'; @@ -11,7 +11,6 @@ import yoho from 'common/yoho';
11 import sdk from 'yoho-activity-sdk'; 11 import sdk from 'yoho-activity-sdk';
12 import 'statics/scss/common.scss'; 12 import 'statics/scss/common.scss';
13 import 'statics/font/iconfont.css'; 13 import 'statics/font/iconfont.css';
14 -import 'statics/font/ufofont.css';  
15 14
16 const $app = document.getElementById('app'); 15 const $app = document.getElementById('app');
17 16
1 -@font-face {  
2 - font-family: "ufofont";  
3 - src: url("ufofont.ttf") format("truetype");  
4 -}  
5 -  
6 -.ufo-font {  
7 - font-family: "ufofont", "PingFang SC", Helvetica, Roboto, "Heiti SC", "黑体", Arial;  
8 -}  
No preview for this file type
@@ -530,6 +530,13 @@ body { @@ -530,6 +530,13 @@ body {
530 font-family: "PingFang SC", "HiraginoSansGB-W3", "SanFranciscoText-Regular", Helvetica, Roboto, "Heiti SC", "黑体", Arial; 530 font-family: "PingFang SC", "HiraginoSansGB-W3", "SanFranciscoText-Regular", Helvetica, Roboto, "Heiti SC", "黑体", Arial;
531 line-height: 1.4; 531 line-height: 1.4;
532 scroll-behavior: smooth; 532 scroll-behavior: smooth;
  533 + position: absolute;
  534 + top: 0;
  535 + left: 0;
  536 + right: 0;
  537 + bottom: 0;
  538 + width: 100%;
  539 + height: 100%;
533 } 540 }
534 541
535 body { 542 body {
@@ -588,19 +595,15 @@ ul { @@ -588,19 +595,15 @@ ul {
588 } 595 }
589 596
590 .right { 597 .right {
591 - float: right; 598 + float: right;
592 } 599 }
593 600
594 .left { 601 .left {
595 - float: right;  
596 -}  
597 -  
598 -.hide {  
599 - display: none; 602 + float: right;
600 } 603 }
601 604
602 .mr50 { 605 .mr50 {
603 - margin-right: 1.25rem; 606 + margin-right: 1.25rem;
604 } 607 }
605 608
606 .ellipsis { 609 .ellipsis {
@@ -671,8 +674,7 @@ img[lazy=loaded] { @@ -671,8 +674,7 @@ img[lazy=loaded] {
671 pointer-events: none; 674 pointer-events: none;
672 } 675 }
673 676
674 -  
675 .cube-toast-icon { 677 .cube-toast-icon {
676 display: flex; 678 display: flex;
677 align-items: center; 679 align-items: center;
678 -}  
  680 +}