element icon indicating copy to clipboard operation
element copied to clipboard

[Bug Report] 我在官网的帮助文档里发现 upload 组件可以绑定 file-list , 但是当我添加了文件后, 绑定到 file-list 对象的数据并没有变化。

Open iamnewsea opened this issue 9 years ago • 1 comments

Element UI version

1.2.7

OS/Browsers version

ubuntu16.04/Chrome57

Vue version

2.2.2

Reproduction Link

https://jsfiddle.net/pj71jkyw/52/

Steps to reproduce

  1. 上传文件
  2. 观察窗口标题是否变为: 触发了logos

What is Expected?

窗口标题变为 : 触发了logos

What is actually happening?

窗口标题没有变化


例子: HTML部分:

<el-upload
	class="avatar-uploader"
	action="http://192.168.1.179:1081/sys/fileUpload"
	:withCredentials="true"
	:show-file-list="true"
	:auto-upload="false"
	ref="logoImage"
	:file-list="logos"
	:multiple="true"
	:on-change="changedabc"
>
<img v-if="logo.url" :src="logo.url" class="avatar">
<i v-else class="el-icon-plus avatar-uploader-icon"></i>
</el-upload>

JS:

export default {
    data() {
      return {
        logos: [{name: 'food', url: 'abc.jpg'}],
        logo: {id: "", url: "", netUrl: ""}
      }
    },
    watch: {
      logos: {
        deep: true,
        handler: function () {
          console.log("OK----")
        }
      }
    }
}

iamnewsea avatar Apr 13 '17 10:04 iamnewsea

#4190

Leopoldthecoder avatar Apr 13 '17 10:04 Leopoldthecoder