表格组件优化固定列属性,商品新增编辑后跳转主页面
This commit is contained in:
		
							parent
							
								
									ed6dcdeaef
								
							
						
					
					
						commit
						8ed4518be4
					
				| @ -218,6 +218,7 @@ | ||||
|   height: 100%; | ||||
|   left: 0; | ||||
|   right: 0; | ||||
|   min-width: 1000px; | ||||
| } | ||||
| // 表格组件中的各插槽元素自定义样式 | ||||
| .custom-tooltip-content { | ||||
|  | ||||
| @ -59,6 +59,7 @@ | ||||
|           :label="column.label" | ||||
|           :width="column.width" | ||||
|           :align="column.align || 'center'" | ||||
|           :fixed="column.fixed ?? false" | ||||
|           :sortable="column.sortable" | ||||
|           :header-class-name="column.headerClassName" | ||||
|         > | ||||
| @ -340,7 +341,7 @@ onBeforeUnmount(() => { | ||||
| 
 | ||||
|   /* 自定义鼠标悬停颜色 */ | ||||
|   :deep(.el-table__body tr:hover > td) { | ||||
|     background-color: rgba(37, 191, 130, 0.1) !important; | ||||
|     background-color: rgba(237 255 248) !important; | ||||
|   } | ||||
| 
 | ||||
|   /* 自定义表头样式 */ | ||||
|  | ||||
| @ -171,7 +171,7 @@ const columns1 = ref([ | ||||
|   { prop: "level", label: "分类级别", slotName: "level" }, | ||||
|   { prop: "createTime", label: "添加时间" }, | ||||
|   { prop: "status", label: "状态", slotName: "status" }, | ||||
|   { prop: "action", label: "操作", slotName: "action", width: 150 }, | ||||
|   { prop: "action", label: "操作", slotName: "action", width: 150,fixed: "right" }, | ||||
| ]); | ||||
| 
 | ||||
| // 生成食物主题昵称 | ||||
|  | ||||
| @ -564,6 +564,7 @@ const onGoodSave = async (params) => { | ||||
|   if (response.code === 200) { | ||||
|     ElMessage.success("新增成功!"); | ||||
|     formRef.value.resetFields(); | ||||
|     router.go(-1); | ||||
|   } else { | ||||
|     ElMessage.error(response.message); | ||||
|   } | ||||
|  | ||||
| @ -554,6 +554,7 @@ const onGoodSave = async (params) => { | ||||
|   if (response.code === 200) { | ||||
|     ElMessage.success("编辑成功!"); | ||||
|     formRef.value.resetFields(); | ||||
|     router.go(-1); | ||||
|   } else { | ||||
|     ElMessage.error(response.message); | ||||
|   } | ||||
|  | ||||
| @ -209,7 +209,7 @@ | ||||
|         </el-form-item> | ||||
| 
 | ||||
|       </el-form> | ||||
|       <el-button type="primary" @click="approved" style="margin: 10px 0 0 80px;width: 150px;">返回</el-button> | ||||
|       <el-button type="primary" @click="goBack" style="margin: 10px 0 0 80px;width: 150px;">返回</el-button> | ||||
|     </div> | ||||
|   </div> | ||||
| </template> | ||||
| @ -530,8 +530,7 @@ const changeCategory3 = (id) => { | ||||
|   formInline.categoryId = id; | ||||
| }; | ||||
| 
 | ||||
| //审核/驳回 | ||||
| const approved = async () => { | ||||
| const goBack = async () => { | ||||
|   router.go(-1); | ||||
| }; | ||||
| 
 | ||||
|  | ||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user
	 2090205686@qq.com
						2090205686@qq.com