From da76a284d0e2bd462843c6b9ae9daeec15576c48 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=A2=81=E7=81=8F?= Date: Wed, 20 Jun 2018 16:56:54 +0800 Subject: [PATCH] update Cell --- examples/routers/cell.vue | 25 +++++++-- src/components/cell/cell-item.vue | 34 ++++++++++++ src/components/cell/cell.vue | 88 +++++++++++++++++++++++++++++-- src/styles/components/cell.less | 60 ++++++++++++++++++++- 4 files changed, 199 insertions(+), 8 deletions(-) create mode 100644 src/components/cell/cell-item.vue diff --git a/examples/routers/cell.vue b/examples/routers/cell.vue index fb8956f1..e66e24a7 100644 --- a/examples/routers/cell.vue +++ b/examples/routers/cell.vue @@ -1,7 +1,26 @@ \ No newline at end of file diff --git a/src/components/cell/cell.vue b/src/components/cell/cell.vue index 7cc468d5..a8690b55 100644 --- a/src/components/cell/cell.vue +++ b/src/components/cell/cell.vue @@ -1,11 +1,93 @@ \ No newline at end of file diff --git a/src/styles/components/cell.less b/src/styles/components/cell.less index 9edbbf92..446805cb 100644 --- a/src/styles/components/cell.less +++ b/src/styles/components/cell.less @@ -1,5 +1,61 @@ @cell-prefix-cls: ~"@{css-prefix}cell"; -.@{cell-prefix-cls} { -} \ No newline at end of file +.@{cell-prefix-cls} { + position: relative; + overflow: hidden; + + &-link, &-link:hover, &-link:active{ + color: inherit; + } + + &-icon{ + display: inline-block; + margin-right: 4px; + font-size: @font-size-base; + vertical-align: middle; + &:empty{ + display: none + } + } + &-main{ + display: inline-block; + vertical-align: middle; + } + &-title{ + line-height: 24px; + font-size: @font-size-base; + } + &-label{ + line-height: 1.2; + font-size: @font-size-small; + color: @subsidiary-color; + } + &-selected &-label{ + color: inherit; + } + &-footer{ + display: inline-block; + position: absolute; + transform: translateY(-50%); + top: 50%; + right: 16px; + color: @text-color; + } + &-with-link &-footer{ + right: 32px; + } + &-selected &-footer{ + color: inherit; + } + + &-arrow{ + display: inline-block; + position: absolute; + transform: translateY(-50%); + top: 50%; + right: 16px; + font-size: @font-size-base; + } +} +.select-item(@cell-prefix-cls, @cell-prefix-cls); \ No newline at end of file