code: function genAssignmentCode (
    value,
    assignment
  ) {
    var modelRs = parseModel(value);
    if (modelRs.idx === null) {
      return (value + "=" + assignment)
    } else {
      return "var $$exp = " + (modelRs.exp) + ", $$idx = " + (modelRs.idx) + ";" +
        "if (!Array.isArray($$exp)){" +
          value + "=" + assignment + "}" +
        "else{$$exp.splice($$idx, 1, " + assignment + ")}"
    }
  }
docs: Cross-platform codegen helper for generating v-model value assignment code.