export function isFixedOrderValid(columns) {
  var leftStart = -1;
  var leftEnd = -1;
  var rightStart = -1;
  for (var i = 0; i < columns.length; i++) {
    var column = columns[i];
    if (column.fixed === true || column.fixed === "left") {
      // 设置left开始位置
      if (leftStart === -1) {
        leftStart = i;
      }
      // left结束位置后又出现了left 返回false
      if (leftEnd !== -1 || rightStart !== -1) {
        return false;
      }
    } else if (column.fixed === "right") {
      if (rightStart === -1) {
        rightStart = i;
      }
      if (leftEnd === -1 && leftStart !== -1) {
        leftEnd = i - 1;
      }
    } else {
      if (leftEnd === -1 && leftStart !== -1) {
        leftEnd = i - 1;
      }
      if (rightStart !== -1) {
        return false;
      }
    }
  }
  return leftStart === -1 || leftStart === 0;
}