本文整理匯總了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();
});