12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576 |
- <template>
- <div class="collection-box">
- <view class="header">
- <view class="title">
- <span :class="{ active: isType == 0 }" @click="isType = 0">做错题</span>
- <span :class="{ active: isType == 1 }" @click="isType = 1">收藏题</span>
- </view>
- </view>
- <swiper :current="isType" :duration="500">
- <swiper-item>
- <scroll-view :scroll-y="true"> </scroll-view>
- </swiper-item>
- <swiper-item>
- <scroll-view :scroll-y="true"> </scroll-view>
- </swiper-item>
- </swiper>
- </div>
- </template>
- <script >
- export default {
- data() {
- return {
- isType: 0,
- };
- },
- methods: {
- onClickLeft() {},
- },
- components: {},
- };
- </script>
- <style lang="scss" scoped>
- .collection-box {
- height: 100vh;
- display: flex;
- flex-direction: column;
- background: #fff;
- }
- .header {
- width: 100%;
- border-bottom: 2rpx solid #dddddd;
- padding-bottom: 15rpx;
- .title {
- display: flex;
- width: 260rpx;
- margin: 0 auto;
- justify-content: space-between;
- align-items: center;
- span {
- font-size: 15px;
- font-family: PingFang SC;
- font-weight: 400;
- line-height: 13px;
- color: #0a1a33;
- position: relative;
- padding: 8px;
- }
- .active {
- &:after {
- position: absolute;
- content: "";
- width: 20px;
- height: 4px;
- border-radius: 3px;
- background-color: #498ef5;
- bottom: 0;
- left: 50%;
- transform: translateX(-50%);
- z-index: 100;
- }
- }
- }
- }
- </style>
|