How to put the file name uploaded by upload in the value of input?

  1. has obtained the file name uploaded by upload, but I don"t know where to put the value of the file name in the value of the data type input

clipboard.png

html


js



clipboard.png

Mar.04,2021

<el-input v-model="input" :value="this.file.name"></el-input>
//inputv-model="input"inputthis.file.nameinput;
//v-modelel-inputinput

v-model


this should be very simple, is it what kind of pit you ran into?

  1. the onChange event of the el-upload component is triggered when the file is selected.
  2. After the
  3. event is triggered, you can get the file.name and bind it directly to the value of the el-input component
  4. you have a problem with the value writing of input binding. Try rewriting a variable.
Menu