소스 검색

修改样式及显示

yangg 2 달 전
부모
커밋
40dde142ec
3개의 변경된 파일42개의 추가작업 그리고 29개의 파일을 삭제
  1. 2 0
      src/theme/element.scss
  2. 2 2
      src/views/questionBank/classList/crud.tsx
  3. 38 27
      src/views/questionBank/labelList/crud.tsx

+ 2 - 0
src/theme/element.scss

@@ -80,10 +80,12 @@
 .el-menu-item {
 	height: 56px !important;
 	line-height: 56px !important;
+	margin: 0 5px;
 }
 .el-menu-item,
 .el-sub-menu__title {
 	color: rgba(var(--dark), 1);//var(--next-bg-menuBarColor);
+	margin: 0 5px;
 }
 // 修复点击左侧菜单折叠再展开时,宽度不跟随问题
 .el-menu--collapse {

+ 2 - 2
src/views/questionBank/classList/crud.tsx

@@ -149,7 +149,7 @@ export const createCrudOptions = function ({ crudExpose }: CreateCrudOptionsProp
 						}
 					}
 				}, */
-				color: {
+				/* color: {
 					title: '颜色',
 					type: 'colorpicker',
 					column: {
@@ -161,7 +161,7 @@ export const createCrudOptions = function ({ crudExpose }: CreateCrudOptionsProp
 					form: {
 						value: '#1890ff', // 默认颜色
 					},
-				},
+				}, */
 				sort: {
 					title: '排序',
 					type: 'number',

+ 38 - 27
src/views/questionBank/labelList/crud.tsx

@@ -81,7 +81,7 @@ export const createCrudOptions = function ({ crudExpose }: CreateCrudOptionsProp
 				layout: 'auto',
 			},
 			columns: {
-				_index: {
+				/* _index: {
 					title: '序号',
 					form: { show: false },
 					column: {
@@ -90,6 +90,13 @@ export const createCrudOptions = function ({ crudExpose }: CreateCrudOptionsProp
 						width: '70px',
 						columnSetDisabled: true, //禁止在列设置中选择
 					},
+				}, */
+				id: {
+					title: 'ID',
+					form: { show: false },
+					column: {
+						show: false,
+					},
 				},
 				name: {
 					title: '标签名称',
@@ -109,26 +116,6 @@ export const createCrudOptions = function ({ crudExpose }: CreateCrudOptionsProp
 						],
 					},
 				},
-				description: {
-					title: '描述',
-					search: {
-						show: true,
-						component: {
-							placeholder: '请输入描述',
-						},
-					},
-					type: 'textarea',
-					column: {
-						minWidth: 150,
-						showOverflowTooltip: true,
-					},
-					form: {
-						component: {
-							span: 24,
-							placeholder: '请输入标签描述',
-						},
-					},
-				},
 				category_id: {
 					title: '分类',
 					search: {
@@ -137,13 +124,16 @@ export const createCrudOptions = function ({ crudExpose }: CreateCrudOptionsProp
 					type: 'dict-select',
 					column: {
 						minWidth: 120,
+						show:false,
+						// component: {
+						// 	name: 'fs-dict-label',
+						// },
 					},
-					dict:dict({
-						url: '/api/categories', // 获取数据的接口
-						// 或者使用方法
+					dict: dict({
 						getData: async () => {
 							const res = await api.GetcategoryList({page:1,limit:1000,tenant_id:1});
-							return res.data.items;
+							console.log(res.data.items);
+							return res.data.items || [];
 						},
 						label: 'name',
 						value: 'id'
@@ -154,15 +144,16 @@ export const createCrudOptions = function ({ crudExpose }: CreateCrudOptionsProp
 						],
 					},
 				},
-			/* 	category_name: {
+				category_name: {
 					title: '分类名称',
 					column: {
 						minWidth: 120,
+						
 					},
 					form: {
 						show: false, // 表单中不显示,由category_id自动关联
 					},
-				}, */
+				},
 				/* color: {
 					title: '标签颜色',
 					type: 'colorpicker',
@@ -235,6 +226,26 @@ export const createCrudOptions = function ({ crudExpose }: CreateCrudOptionsProp
 						show: false, // 表单中不显示,由系统自动更新
 					},
 				},
+				description: {
+					title: '描述',
+					search: {
+						show: true,
+						component: {
+							placeholder: '请输入描述',
+						},
+					},
+					type: 'textarea',
+					column: {
+						minWidth: 150,
+						showOverflowTooltip: true,
+					},
+					form: {
+						component: {
+							span: 24,
+							placeholder: '请输入标签描述',
+						},
+					},
+				},
 			},
 		},
 	};