Yansen преди 5 години
родител
ревизия
cd7c0778f6
променени са 2 файла, в които са добавени 4 реда и са изтрити 3 реда
  1. 2
    1
      src/components/ActionList/index.jsx
  2. 2
    2
      src/components/EditIcon/index.jsx

+ 2
- 1
src/components/ActionList/index.jsx Целия файл

@@ -11,9 +11,10 @@ export default function withActions(actionsRender) {
11 11
 
12 12
     const menus = (
13 13
       <Menu className="actlist-menu">
14
-        {(leftActs || []).concat(Act2).filter(Boolean).map((Act, index) => (<Menu.Item key={`dm-${index}`}>{Act}</Menu.Item>))}
14
+        {[Act2].concat(leftActs).filter(Boolean).map((Act, index) => (<Menu.Item key={`dm-${index}`}>{Act}</Menu.Item>))}
15 15
       </Menu>
16 16
     );
17
+    console.log('---------->', record, menus)
17 18
 
18 19
     return (
19 20
       <div className="action-list">

+ 2
- 2
src/components/EditIcon/index.jsx Целия файл

@@ -89,8 +89,8 @@ const EditIcon = ({ text, type, color, position, onClick }) => {
89 89
     const color2 = color || icon.color || '#ff925c';
90 90
     const position2 = position || icon.pos;
91 91
 
92
-    const wrappedStyle = useMemo(() => ({ color: `${color2}`, display: 'flex', alignItems: 'center', cursor: 'pointer' }), [color]);
93
-    const iconStyle = useMemo(() => ({ display: 'inline-block', marginLeft: '6px', background: `url(${spriteImg}) 0 ${position2}px / 100% 1300% no-repeat`, width: '18px', height: '18px' }), [position])
92
+    const wrappedStyle = useMemo(() => ({ color: `${color2}`, display: 'flex', alignItems: 'center', cursor: 'pointer' }), [type, color]);
93
+    const iconStyle = useMemo(() => ({ display: 'inline-block', marginLeft: '6px', background: `url(${spriteImg}) 0 ${position2}px / 100% 1300% no-repeat`, width: '18px', height: '18px' }), [type, position])
94 94
 
95 95
     return (
96 96
         <span style={wrappedStyle} onClick={onClick || noop} >