ソースを参照

增加锁图标

tanxue 5 ヶ月 前
コミット
bebc71427d
2 ファイル変更12 行追加9 行削除
  1. 6 6
      common/styles/global/pages.scss
  2. 6 3
      components/catalogue/catalogue.vue

+ 6 - 6
common/styles/global/pages.scss

@@ -308,10 +308,10 @@
 	.ezy-catalogue-collapse{
 		background-color: transparent!important;flex: 1;overflow-y: auto;
 		.collapse-item-box{
-			display: flex;flex-direction: column;padding: 24rpx 10rpx;box-sizing: border-box;
-			border-bottom: 2rpx dashed #9dc0f6;
+			display: flex;flex-direction: column;padding: 24rpx 40rpx 24rpx 10rpx;box-sizing: border-box;
+			border-bottom: 2rpx dashed #9dc0f6;position: relative;
 			.uni-collapse-item__wrap{background-color: transparent!important;}
-			.collapse-title{display: flex;font-size: 30rpx;font-weight: 700;color: #0a549d;position: relative;}
+			.collapse-title{display: flex;font-size: 30rpx;font-weight: 700;color: #0a549d;}
 			.collapse-num-box{
 				width: 46rpx;height: 46rpx;line-height: 46rpx;font-size: 30rpx;font-weight: 700;color: #fff;text-align: center;
 				background-image: url("@/static/images/catalog/num-bj.png");@include ezy-no-repeat-cover;
@@ -322,10 +322,10 @@
 				background-image: url("@/static/images/catalog/jt-btn.png");@include ezy-no-repeat-cover;
 				&::before{display: none;}
 			}
-			/* .collapse-lock{
-				width: 31rpx;height: 37rpx;position: absolute;right: 0rpx;
+			.collapse-lock{
+				width: 35rpx;height: 41rpx;position: absolute;right: 0rpx;top: 24rpx;right: 12rpx;
 				background-image: url("@/static/images/catalog/catalog-lock.png");@include ezy-no-repeat-cover;
-			} */
+			}
 		}
 		.collapse-item-box.collapse-active{
 			border: 0;

+ 6 - 3
components/catalogue/catalogue.vue

@@ -8,13 +8,13 @@
 				<uni-collapse-item title-border="none" :border="false" :name="index" v-for="(item,index) in list" 
 				class="collapse-item-box" :class="{ 'collapse-active': activeCollapse === index}">
 					<template v-slot:title>
-							<view @click.stop="handleSelectZhang(item)" class="collapse-title">
+							<view @click.stop="handleSelectZhang(item,index)" class="collapse-title">
 								<view class="collapse-num-box">{{index+1}}</view>
 								<!-- 章名 -->
 								<text>{{item.zhangName}}</text>
 							</view>
 							<!-- 锁 -->
-							<!-- <view class="collapse-lock"></view> -->
+							<view class="collapse-lock" v-if="index!=0"></view>
 					</template>
 					<view class="collapse-content-box">
 						<view v-for="(jie,cindex) in item.jieList" class="collapse-content-item">
@@ -99,7 +99,10 @@
 	 * @summary 选中
 	 * @param({zhangId:string}) data
 	 */
-	function handleSelectZhang(data) {
+	function handleSelectZhang(data,index) {
+		if(index!=0){
+			return;
+		}
 		$emit('change-zhang', Object.assign({}, data));
 		handleClose();
 	}