Эх сурвалжийг харах

AI: 调试会友列表显示问题

D8D AI 1 жил өмнө
parent
commit
4a5324e382

+ 2 - 2
src/api/deviceApi.js

@@ -15,7 +15,7 @@ let mockData = [
     baptismDate: '2010-05-15',
     contact: '13800138000',
     photo: null,
-    servicePosition: '主日学老师'
+    servicePosition: ['主日学老师', '敬拜团成员']
   },
   {
     personId: '2',
@@ -28,7 +28,7 @@ let mockData = [
     baptismDate: null,
     contact: '13900139000',
     photo: null,
-    servicePosition: '敬拜团成员'
+    servicePosition: ['接待员']
   }
 ];
 

+ 1 - 1
src/components/MemberList.jsx

@@ -171,7 +171,7 @@ const MemberList = () => {
       ...getColumnSearchProps('servicePosition'),
       render: (positions) => (
         <>
-          {positions && positions.map((position) => (
+          {Array.isArray(positions) && positions.map((position) => (
             <Tag color="blue" key={position}>
               {position}
             </Tag>