function genAssignmentCode(value: string, assignment: string): string {
  const 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})}`
    )
  }
}
Cross-platform codegen helper for generating v-model value assignment code.