<!-- Do not edit this file. It is automatically generated by API Documenter. -->

[Home](./index.md) &gt; [com-tools](./com-tools.md) &gt; [array\_moveItemsTo](./com-tools.array_moveitemsto.md)

## array\_moveItemsTo() function

moveItemsTo(toIndex, ...items) 批量移动数组的指定元素

**Signature:**

```typescript
export declare function array_moveItemsTo<T>(array: T[], toIndex: number, ...items: T[]): number[];
```

## Parameters

<table><thead><tr><th>

Parameter


</th><th>

Type


</th><th>

Description


</th></tr></thead>
<tbody><tr><td>

array


</td><td>

T\[\]


</td><td>


</td></tr>
<tr><td>

toIndex


</td><td>

number


</td><td>

: number 元素被移动到的新位置的索引


</td></tr>
<tr><td>

items


</td><td>

T\[\]


</td><td>


</td></tr>
</tbody></table>
**Returns:**

number\[\]

Array<number> 被移动的元素的索引的数组

