ElemeFE / mint-ui

Mobile UI elements for Vue.js
http://mint-ui.github.io/#!/en
MIT License
16.56k stars 3.56k forks source link

[Bug Report] $listeners is readonly and $attrs is readonly #1176

Open tangshengzhi opened 7 years ago

tangshengzhi commented 7 years ago

Mint UI version

2.2.10

OS/Browsers version

mac/chrome62

Vue version

2.5.3

Reproduction Link

https://jsfiddle.net/pj71jkyw/

Steps to reproduce

当我在vue2.0项目中使用Mint-ui组件时候,我试图去改变一个变量的值,这个变量就是一个普通变量,不是Mint-ui组件的props,此时会报 vue.runtime.common.js?da27:569 [Vue warn]: $attrs is readonly. found in

--->

at /Users/tsz/Desktop/speech_project/web-robot/src/pages/config/child/set_photo.vue at /Users/tsz/Desktop/speech_project/web-robot/src/pages/config/index.vue vue.runtime.common.js?da27:569 [Vue warn]: $listeners is readonly. found in ---> at /Users/tsz/Desktop/speech_project/web-robot/src/pages/config/child/set_photo.vue at /Users/tsz/Desktop/speech_project/web-robot/src/pages/config/index.vue ### What is Expected? 不报警告 ### What is actually happening? 报警告
cloudfroster commented 7 years ago

此警告只会在生成环境出现。请检查你开发的 vue 模块方式是否和 mint-ui 方式一致。并不是 mint-ui 引起的。

tangshengzhi commented 7 years ago

什么叫生成环境,你指的是环境变量吗,开发的 vue 模块方式是啥意思,

GreatBoy commented 6 years ago

我也遇到这个问题了