New file |
| | |
| | | /** |
| | | * drawer |
| | | * @author Tevin |
| | | */ |
| | | |
| | | @import "../../common/sassMixin"; |
| | | |
| | | .c-description { |
| | | @include flexbox(flex, flext-start flex-start, nowrap); |
| | | padding: 20px 0 20px 20px; |
| | | &.c-description-bordered { |
| | | border-bottom: #e2e2e2 1PX solid; |
| | | } |
| | | .c-description-label { |
| | | width: 180px; |
| | | margin-right: 20px; |
| | | line-height: 1.5; |
| | | vertical-align: middle; |
| | | &.c-description-label-left { |
| | | text-align: left; |
| | | } |
| | | &.c-description-label-right { |
| | | text-align: right; |
| | | } |
| | | } |
| | | .c-desctiption-content { |
| | | flex: 1; |
| | | display: inline-block; |
| | | padding-right: 18px; |
| | | line-height: 1.5; |
| | | vertical-align: middle; |
| | | } |
| | | } |
New file |
| | |
| | | /** |
| | | * CDescription - 描述 |
| | | * @author Tevin |
| | | */ |
| | | |
| | | <template> |
| | | <view |
| | | class="c-description" |
| | | :class="hasBorder?'c-description-bordered':''" |
| | | > |
| | | <view |
| | | class="c-description-label" |
| | | :class="'c-description-label-' + labelAlign" |
| | | >{{label}}</view> |
| | | <view class="c-desctiption-content"> |
| | | <slot /> |
| | | </view> |
| | | </view> |
| | | </template> |
| | | |
| | | <script> |
| | | import Taro from '@tarojs/taro'; |
| | | import {} from 'taro-ui-vue'; |
| | | import './CDescription.scss'; |
| | | |
| | | export default { |
| | | name: 'CDescription', |
| | | components: {}, |
| | | props: { |
| | | label: String, |
| | | labelAlign: { |
| | | type: String, |
| | | default: 'left', // left、right |
| | | }, |
| | | hasBorder: { |
| | | type: Boolean, |
| | | default: true, |
| | | }, |
| | | }, |
| | | data() { |
| | | return {}; |
| | | }, |
| | | methods: {}, |
| | | }; |
| | | </script> |
New file |
| | |
| | | /** |
| | | * CDescription |
| | | * @author Tevin |
| | | */ |
| | | |
| | | import CDescription from '@components/layout/description/CDescription.vue'; |
| | | |
| | | export { |
| | | CDescription, |
| | | } |