| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990 |
- <template>
- <view class="set-2" :class="{ active: active }">
- <view class="set-title">
- <slot name="header"></slot>
- </view>
- <view class="set-content" v-if="hideContent">
- <slot name="content"></slot>
- </view>
- </view>
- </template>
- <script>
- export default {
- name: 'stepItem',
- props: {
- active: {
- type: Boolean,
- default: false
- },
- hideContent: {
- type: Boolean,
- default: true
- }
- },
- data () {
- return {}
- }
- }
- </script>
- <style lang="scss" scoped>
- .set-2 {
- padding-left: 30px;
- position: relative;
- .set-content {
- background-color: rgba(242, 242, 242, 1);
- min-height: 100upx;
- border-radius: 10upx;
- padding: 10px;
- }
- .set-title {
- font-size: 32rpx;
- margin-bottom: 10px;
- }
- & + .set-2 {
- margin-top: 20px;
- }
- &.active {
- &::before {
- background: #157a2c;
- }
- }
- }
- .set-2::after {
- content: '';
- /* 必须存在如果没有图标就留空 */
- top: 10rpx;
- /* 定位 距离*/
- border-left: #c6c6c6 1px solid;
- /* 横线颜色 */
- left: 5px;
- /* 定位 距离*/
- height: calc(100% + 20px);
- /* 高度 */
- position: absolute;
- /* 定位 */
- }
- .set-2::before {
- content: '';
- display: block;
- width: 10px;
- height: 10px;
- position: absolute;
- left: 0;
- top: 10rpx;
- background: #fff;
- border-radius: 50%;
- z-index: 1;
- border: 1px solid #157a2c;
- }
- .set-2:last-child::after {
- display: none;
- }
- </style>
|