diff --git a/src/components/drawer/index.scss b/src/components/drawer/index.scss index d0e48b8fe..c0dbc4197 100644 --- a/src/components/drawer/index.scss +++ b/src/components/drawer/index.scss @@ -1,5 +1,7 @@ @import '../../style/theme/default.scss'; +$drawer-content-width: 460px; + .at-drawer { position: relative; z-index: $zindex-drawer; @@ -12,42 +14,20 @@ bottom: 0; background-color: rgba(0, 0, 0, 0.3); opacity: 0; - transition: opacity 225ms $ease-in-out-quart; + transition: opacity 300ms $timing-func; } &__content { position: fixed; top: 0; bottom: 0; - width: 460px; - background-color: #fff; - z-index: 1; + width: $drawer-content-width; text-align: left; + background-color: $color-bg; opacity: 0; + z-index: 1; } - // &__list { - // margin: 0 0 0 18px; - // max-height: 100%; - // overflow-y: scroll; - - // &-icon { - // position: absolute; - // right: 20px; - // top: 50%; - // transform: translateY(-50%); - // } - - // &-item { - // height: 90px; - // line-height: 90px; - // font-size: 34px; - // color: $color-black-0; - // border-bottom: 1px solid #ddd; - // position: relative; - // } - // } - &.at-drawer--left { .at-drawer__content { left: 0; diff --git a/src/components/nav-bar/index.scss b/src/components/nav-bar/index.scss index 54d1a45c1..b0ee85f56 100644 --- a/src/components/nav-bar/index.scss +++ b/src/components/nav-bar/index.scss @@ -3,12 +3,12 @@ .at-nav-bar { display: flex; - width: 100%; - padding: $spacing-v-sm; - background-color: #fff; - box-sizing: border-box; align-items: center; justify-content: center; + width: 100%; + padding: $spacing-v-md $spacing-h-md; + background-color: $color-bg; + box-sizing: border-box; white-space: nowrap; overflow: hidden; @include border-thin-bottom; @@ -27,12 +27,6 @@ overflow: hidden; } - &__left_text { - font-size: $font-size-lg; - vertical-align: middle; - display: inline-block; - } - &__right_view { flex: 2; overflow: hidden; @@ -41,18 +35,19 @@ &__title { flex: 5; - font-size: $font-size-base; color: $color-text-base; + font-size: $font-size-xl; + line-height: $line-height-zh; text-align: center; + text-overflow: ellipsis; vertical-align: middle; overflow: hidden; - text-overflow: ellipsis; white-space: nowrap; } &__text { display: inline-block; - font-size: $font-size-base; + font-size: $font-size-lg; } &__container { diff --git a/src/components/pagination/index.scss b/src/components/pagination/index.scss index 0a1e14fe1..80a5c7f4a 100644 --- a/src/components/pagination/index.scss +++ b/src/components/pagination/index.scss @@ -1,12 +1,13 @@ @import "../../style/theme/default.scss"; +$pagination-margin: 40px; +$pagination-height: 60px; + .at-pagination { + position: relative; + margin: 0 $pagination-margin; font-size: 0; - width: 670px; - height: 60px; overflow: hidden; - margin: 0 auto; - position: relative; &__btns { display: flex; @@ -23,15 +24,16 @@ } &__number { - font-size: 28px; - color: #354052; position: absolute; + top: 0; + left: 50%; width: 100px; + height: $pagination-height; + color: $color-text-base; + font-size: $font-size-base; + text-align: center; + line-height: $pagination-height; overflow: hidden; - left: 50%; - top: 0; - height: 100%; - line-height: 60px; transform: translateX(-50%); &-current { diff --git a/src/components/segmented-control/index.scss b/src/components/segmented-control/index.scss index 8ab3dc29b..963b646ce 100644 --- a/src/components/segmented-control/index.scss +++ b/src/components/segmented-control/index.scss @@ -10,25 +10,25 @@ box-sizing: border-box; white-space: nowrap; overflow: hidden; - @include border-thin(#6190E8); + @include border-thin($color: $color-brand, $width: 1PX); &__item { flex: 1; box-sizing: border-box; - min-width: 50px; - min-height: 10px; - font-size: $font-size-base; - line-height: $line-height-base; - padding: $spacing-v-sm; + padding: $spacing-v-xs $spacing-h-sm; + min-width: 120px; + min-height: 40px; color: $color-text-base; - overflow: hidden; + font-size: $font-size-base; + line-height: $line-height-zh; white-space: nowrap; text-overflow: ellipsis; - background-color: #fff; + background-color: $color-bg; + overflow: hidden; } &__item + &__item { - @include border-thin-left(#6190E8); + @include border-thin-left($color: $color-brand, $width: 1PX); } &--disabled { diff --git a/src/components/tab-bar/index.scss b/src/components/tab-bar/index.scss index 626ea1967..1aa5a0315 100644 --- a/src/components/tab-bar/index.scss +++ b/src/components/tab-bar/index.scss @@ -5,7 +5,7 @@ display: flex; width: 100%; min-height: 50px; - padding: $spacing-v-sm 0; + padding: $spacing-v-sm 0 $spacing-v-xs; text-align: center; box-sizing: border-box; justify-content: center; @@ -15,16 +15,16 @@ &__item { flex: 1; - font-size: $font-size-base; - padding: $spacing-v-xs; - color: $color-black-1; + padding: $spacing-v-sm $spacing-v-sm 0; + color: $color-text-base; + font-size: $font-size-xs; } &__title { display: block; - max-width: 200px; - font-size: $font-size-base; padding: $spacing-v-xs 0; + max-width: 200px; + font-size: $font-size-xs; line-height: $line-height-base; white-space: nowrap; overflow: hidden; diff --git a/src/components/tabs/index.scss b/src/components/tabs/index.scss index 210a724b8..0c0f702b0 100644 --- a/src/components/tabs/index.scss +++ b/src/components/tabs/index.scss @@ -7,11 +7,11 @@ &__item { position: relative; flex: 1; - font-size: 30px; - padding: 20px; + padding: $spacing-v-lg $spacing-h-lg; + font-size: $font-size-base; color: $color-text-base; - overflow: hidden; text-overflow: ellipsis; + overflow: hidden; &::after { content: ''; @@ -36,12 +36,12 @@ &__header { position: relative; - background-color: $color-bg; display: flex; - text-align: center; width: 100%; box-sizing: border-box; + text-align: center; white-space: nowrap; + background-color: $color-bg; overflow: -moz-scrollbars-none; &--scroll { diff --git a/src/components/timeline/index.scss b/src/components/timeline/index.scss index 76e8f8844..457f59ce9 100644 --- a/src/components/timeline/index.scss +++ b/src/components/timeline/index.scss @@ -1,42 +1,47 @@ @import '../../style/theme/default.scss'; +$timeline-margin-left: 40px; +$timeline-dot-size: 24px; + .at-timelineitem { position: relative; - padding: 0 0 12px; + padding: 0 0 $spacing-v-sm; &__content { + margin-left: $timeline-margin-left; + min-height: 56px; + color: $color-text-base; font-size: $font-size-base; - color: $color-black-1; + line-height: $line-height-zh; text-align: left; - margin-left: 36px; - height: 50px; } &__dot, &__icon { - font-size: 0; position: absolute; left: 0; - top: 8px; - width: 36px; - height: 30px; + top: 5px; + width: 32px; + height: 32px; + font-size: 0; + text-align: left; + vertical-align: middle; box-sizing: border-box; - background-color: #fff; + background-color: $color-bg; z-index: 1; - text-align: left; } &__dot { &::after { content: ''; - width: 20px; - height: 20px; + margin-top: 5px; display: inline-block; box-sizing: border-box; - border: 2px solid transparent; - border-radius: 50%; + width: $timeline-dot-size; + height: $timeline-dot-size; + border: 1PX solid transparent; + border-radius: $border-radius-circle; border-color: $color-info; - margin-top: 5px; } &.at-timelineitem__icon { @@ -47,44 +52,42 @@ } &__icon { - left: -5px; - // top: 7px; + left: -6px; color: $color-info; - // padding-top: 2px; } &--green { .at-timelineitem__icon { - color: #00D06D; + color: $color-success; } .at-timelineitem__dot { &::after { - border-color: #00D06D; + border-color: $color-success; } } } &--red { .at-timelineitem__icon { - color: #FF4849; + color: $color-error; } .at-timelineitem__dot { &::after { - border-color: #FF4849; + border-color: $color-error; } } } &--yellow { .at-timelineitem__icon { - color: #FFCA3E; + color: $color-warning; } .at-timelineitem__dot { &::after { - border-color: #FFCA3E; + border-color: $color-warning; } } } @@ -93,8 +96,8 @@ position: absolute; top: 20px; bottom: -10px; - left: 8px; - border-left: 2px solid #ececec; + left: 10px; + border-left: 2px solid $color-border-lighter; } } diff --git a/src/pages/navigation/drawer/index.js b/src/pages/navigation/drawer/index.js index 463c35e9f..ce2914c07 100644 --- a/src/pages/navigation/drawer/index.js +++ b/src/pages/navigation/drawer/index.js @@ -59,7 +59,7 @@ export default class DrawerPage extends Taro.Component { 左边滑出 - 显示drawer + 显示 Drawer {this.state.leftDrawerShow && } @@ -70,7 +70,7 @@ export default class DrawerPage extends Taro.Component { 右边滑出 - 显示drawer + 显示 Drawer {this.state.rightDrawerShow && } diff --git a/src/pages/navigation/navbar/index.js b/src/pages/navigation/navbar/index.js index 197ba0264..9ebf99a78 100644 --- a/src/pages/navigation/navbar/index.js +++ b/src/pages/navigation/navbar/index.js @@ -42,25 +42,72 @@ export default class Index extends Taro.Component { + {/* 基础用法 */} 基础用法 - + + + + + + + + + + + + + {/* 自定义左上角文案 */} + + 自定义左上角文案 + + + + + + + + {/* 自定义颜色 */} - 自定义图标、文字、颜色 + 自定义颜色 @@ -32,17 +18,19 @@ export default class PaginationPage extends Taro.Component { {/* E Header */} + {/* 基础用法 */} - 文本按钮 + 页码 - + 基础用法 + + {/* 图标类型 */} - 图标按钮 + 页码 + 图标类型 diff --git a/src/pages/navigation/segmented-control/index.js b/src/pages/navigation/segmented-control/index.js index b51fc0bf7..dc2db1df9 100644 --- a/src/pages/navigation/segmented-control/index.js +++ b/src/pages/navigation/segmented-control/index.js @@ -32,10 +32,10 @@ export default class Index extends Taro.Component { {/* S Body */} - {/* 基础 */} + {/* 基础用法 */} - 基础 - + 基础用法 + {current === 0 ? 标签1的内容 : null} @@ -44,6 +44,7 @@ export default class Index extends Taro.Component { + {/* 自定义 */} 自定义颜色、字体大小 @@ -56,6 +57,7 @@ export default class Index extends Taro.Component { + {/* 禁用 */} 禁用 diff --git a/src/pages/navigation/tabbar/index.js b/src/pages/navigation/tabbar/index.js index 63991ad5b..17a2456da 100644 --- a/src/pages/navigation/tabbar/index.js +++ b/src/pages/navigation/tabbar/index.js @@ -47,12 +47,14 @@ export default class Index extends Taro.Component { 自定义图标颜色、字体颜色、背景颜色 - + 固定底部 - + + + diff --git a/src/pages/navigation/tabbar/index.scss b/src/pages/navigation/tabbar/index.scss index 721ac58c0..5bf914898 100644 --- a/src/pages/navigation/tabbar/index.scss +++ b/src/pages/navigation/tabbar/index.scss @@ -1,7 +1,7 @@ .example__body { background-color: #f8f8f8; min-height: 100px; - padding: 30px 10px; + padding: 30px 10px 80px; .item { margin-bottom: 10px; diff --git a/src/pages/navigation/timeline/index.js b/src/pages/navigation/timeline/index.js index 62f681fcb..1aac3511c 100644 --- a/src/pages/navigation/timeline/index.js +++ b/src/pages/navigation/timeline/index.js @@ -17,8 +17,24 @@ export default class TimelinePage extends Taro.Component { + {/* 基础用法 */} - 基础 + 基础用法 + + + + 刷牙洗脸 + 吃早餐 + 上班 + 睡觉 + + + + + + {/* 自定义颜色 */} + + 自定义颜色 @@ -31,8 +47,9 @@ export default class TimelinePage extends Taro.Component { + {/* 自定义图标 */} - 带icon + 自定义图标