FEAT => 本次更新项目为:
设备选择构建完成
This commit is contained in:
@@ -41,9 +41,9 @@ const DeviceSelection: React.FC<DeviceSelectionProps> = ({
|
||||
};
|
||||
|
||||
// 删除已选设备
|
||||
const handleRemoveDevice = (id: string) => {
|
||||
const handleRemoveDevice = (id: number) => {
|
||||
if (readonly) return;
|
||||
onSelect(selectedOptions.filter(d => d !== id));
|
||||
onSelect(selectedOptions.filter(v => v.id !== id));
|
||||
};
|
||||
|
||||
return (
|
||||
@@ -79,9 +79,9 @@ const DeviceSelection: React.FC<DeviceSelectionProps> = ({
|
||||
background: "#fff",
|
||||
}}
|
||||
>
|
||||
{selectedOptions.map(deviceId => (
|
||||
{selectedOptions.map(device => (
|
||||
<div
|
||||
key={deviceId}
|
||||
key={device.id}
|
||||
className={style.selectedListRow}
|
||||
style={{
|
||||
display: "flex",
|
||||
@@ -100,7 +100,7 @@ const DeviceSelection: React.FC<DeviceSelectionProps> = ({
|
||||
textOverflow: "ellipsis",
|
||||
}}
|
||||
>
|
||||
{deviceId}
|
||||
【 {device.name}】 - {device.wechatId}
|
||||
</div>
|
||||
{!readonly && (
|
||||
<Button
|
||||
@@ -118,7 +118,7 @@ const DeviceSelection: React.FC<DeviceSelectionProps> = ({
|
||||
alignItems: "center",
|
||||
justifyContent: "center",
|
||||
}}
|
||||
onClick={() => handleRemoveDevice(deviceId)}
|
||||
onClick={() => handleRemoveDevice(device.id)}
|
||||
/>
|
||||
)}
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user