com-tools
Version:
com-tools 提供了一些通用的工具函数;
84 lines (39 loc) • 961 B
Markdown
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
[Home](./index.md) > [com-tools](./com-tools.md) > [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> 被移动的元素的索引的数组