feat(index): 样式调整
This commit is contained in:
		
							parent
							
								
									03af5fd69a
								
							
						
					
					
						commit
						7fba675e7f
					
				|  | @ -605,8 +605,17 @@ export default { | |||
|           }) | ||||
|         }) | ||||
|       } else { | ||||
|         if (item.specialArea == 30) { | ||||
|           this.goAreaUrl() | ||||
|         if (item.specialArea === 3) { | ||||
|           uni.navigateTo({ | ||||
|             url: | ||||
|               '/pages/specialArea/drawer-list?label=' + | ||||
|               item.specialAreaName + | ||||
|               '&specialArea=' + | ||||
|               item.specialArea + | ||||
|               '&children=' + | ||||
|               JSON.stringify(this.zoneList[tapx].children) + | ||||
|               '&diff=1', | ||||
|           }) | ||||
|         } else { | ||||
|           uni.navigateTo({ | ||||
|             url: | ||||
|  |  | |||
|  | @ -244,12 +244,12 @@ | |||
|           <!-- 一级分类 --> | ||||
|           <view | ||||
|             class="drawer-first-level" | ||||
|             :class="{ active: oneId == item.pkId }" | ||||
|             :class="{ active: currentCategory == item.pkId }" | ||||
|           > | ||||
|             <view class="drawer-menu-text" @click="selectFirstLevel(item)">{{ | ||||
|               truncateText(item.classifyName, 12) | ||||
|             }}</view> | ||||
|             <!-- <view | ||||
|             <view | ||||
|               v-if="item.children && item.children.length > 0" | ||||
|               class="drawer-expand-icon" | ||||
|               :class="{ expanded: expandedMenus.includes(item.pkId) }" | ||||
|  | @ -258,9 +258,9 @@ | |||
|               <u-icon | ||||
|                 name="arrow-right" | ||||
|                 size="16" | ||||
|                 :color="oneId == item.pkId ? '#fff' : '#666'" | ||||
|                 :color="currentCategory === item.pkId ? '#fff' : '#666'" | ||||
|               ></u-icon> | ||||
|             </view> --> | ||||
|             </view> | ||||
|           </view> | ||||
| 
 | ||||
|           <view | ||||
|  | @ -272,7 +272,7 @@ | |||
|               v-for="subItem in item.children" | ||||
|               :key="subItem.pkId" | ||||
|               class="drawer-second-level" | ||||
|               :class="{ active: twoId == subItem.pkId }" | ||||
|               :class="{ active: currentCategory === subItem.pkId }" | ||||
|               @click="selectSecondLevel(subItem)" | ||||
|             > | ||||
|               <view class="drawer-sub-menu-text">{{ | ||||
|  | @ -338,6 +338,7 @@ export default { | |||
|       waresName: '', | ||||
|       expandedMenus: [], // 存储展开的一级菜单ID | ||||
|       showCategoryDrawer: false, // 控制分类抽屉显示 | ||||
|       currentCategory: '', | ||||
|     } | ||||
|   }, | ||||
|   onLoad(options) { | ||||
|  | @ -444,7 +445,7 @@ export default { | |||
|               const children = item.children | ||||
|               if (children && children.length > 0) { | ||||
|                 item.children = [ | ||||
|                   { classifyName: '全部', pkId: item.pkId }, | ||||
|                   // { classifyName: '全部', pkId: item.pkId }, | ||||
|                   ...children, | ||||
|                 ] | ||||
|               } | ||||
|  | @ -460,7 +461,8 @@ export default { | |||
|             if (this.oneList[0]) { | ||||
|               this.oneId = this.oneList[0].pkId | ||||
|               this.twoId = this.oneList[0].pkId | ||||
|               this.getAllGoods(this.oneList[0].pkId) | ||||
|               this.currentCategory = this.oneId | ||||
|               this.getAllGoods(this.currentCategory) | ||||
|             } | ||||
|           } | ||||
|         }) | ||||
|  | @ -474,7 +476,8 @@ export default { | |||
|     selectFirstLevel(item) { | ||||
|       this.oneId = item.pkId | ||||
|       this.twoId = item.pkId | ||||
|       this.getAllGoods(item.pkId) | ||||
|       this.currentCategory = item.pkId | ||||
|       this.getAllGoods(this.currentCategory) | ||||
|     }, | ||||
|     // 切换展开状态(不影响选择状态) | ||||
|     toggleExpand(pkId) { | ||||
|  | @ -492,7 +495,8 @@ export default { | |||
|     // 选择二级分类 | ||||
|     selectSecondLevel(item) { | ||||
|       this.twoId = item.pkId | ||||
|       this.getAllGoods1(item.pkId) | ||||
|       this.currentCategory = item.pkId | ||||
|       this.getAllGoods1(this.currentCategory) | ||||
|       // 不自动关闭抽屉,让用户手动关闭 | ||||
|     }, | ||||
|     // 打开分类抽屉 | ||||
|  |  | |||
		Loading…
	
		Reference in New Issue