本文整理汇总了TypeScript中lodash.move函数的典型用法代码示例。如果您正苦于以下问题:TypeScript move函数的具体用法?TypeScript move怎么用?TypeScript move使用的例子?那么, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了move函数的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的TypeScript代码示例。
示例1: moveRow
moveRow(direction) {
var rowsList = this.dashboard.rows;
var rowIndex = _.indexOf(rowsList, this.row);
var newIndex = rowIndex + direction;
if (newIndex >= 0 && newIndex <= (rowsList.length - 1)) {
_.move(rowsList, rowIndex, newIndex);
}
}
示例2: moveQuery
moveQuery(target, direction) {
var index = _.indexOf(this.panel.targets, target);
_.move(this.panel.targets, index, index + direction);
}
示例3: moveQuery
moveQuery(direction) {
var index = _.indexOf(this.dashboard.targets, this.target);
_.move(this.dashboard.targets, index, index + direction);
}
示例4: moveLink
moveLink(index, dir) {
_.move(this.dashboard.links, index, index + dir);
}
示例5: moveFunction
moveFunction(func, offset) {
const index = this.functions.indexOf(func);
// @ts-ignore
_.move(this.functions, index, index + offset);
}
示例6:
$scope.$apply(() => {
_.move(ctrl.queryModel.functions, $scope.$index, $scope.$index + 1);
ctrl.targetChanged();
});