Skip to content

超级大BUG vue3 input 组件有问题 #485

@tesla-cat

Description

@tesla-cat
<script setup>
const val = defineModel()
</script>

<template>
  <div class="f1 col">
    <div>{{ { type: typeof val, val: val.slice(0, 10) } }}</div>
    <input
      class="input1"
      :value="String(val)"
      @input="(e) => (val = e.target.value)"
    />
  </div>
</template>
  • 有时候正常工作: valhello, 输入框也显示 hello

image

  • 有时候不能: valhello, 但输入框为空 !!!!

image

  • 版本:
"vue": "^3.5.13"
"webpack": "^5.96.1"
"mp-webpack-plugin": "^1.6.6"

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions