search

Home  >  Q&A  >  body text

javascript - Why does the input box input nothing but the value is undefined? ?

代言代言2760 days ago746

reply all(3)I'll reply

  • 为情所困

    为情所困2017-07-05 10:57:29

    You have two-way binding and you have not input anything. Then your printSingle.szLat is undefined.

    If you need an empty string for "", you can initialize it

    reply
    0
  • 世界只因有你

    世界只因有你2017-07-05 10:57:29

    data () {
      return {
        printSingle: {
          szLat: ''
        }
      }
    }

    reply
    0
  • 漂亮男人

    漂亮男人2017-07-05 10:57:29

    The variable is defined, but when there is no value, the value is undefined

    reply
    0
  • Cancelreply