mint-ui icon indicating copy to clipboard operation
mint-ui copied to clipboard

[Vue warn]: Computed property "values" was assigned to but it has no setter.

Open openks opened this issue 9 years ago • 21 comments

Mint UI version

2.2.7

OS/Browsers version

macos 10.12.5 /61.0.3159.5(正式版本)dev (64 位)

Vue version

2.4.2

Reproduction Link

https://jsfiddle.net/pj71jkyw/397/

Steps to reproduce

打开jsfiddle 并打开控制台 控制台上会显示

[Vue warn]: Computed property "values" was assigned to but it has no setter.

found in

---> <MtPicker>
       <Root>
       	warn	@	vue.js:485
sharedPropertyDefinition.set	@	vue.js:3251
created	@	index.js:2
callHook	@	vue.js:2669
Vue._init	@	vue.js:4217
VueComponent	@	vue.js:4387
createComponentInstanceForVnode	@	vue.js:3676
init	@	vue.js:3493
createComponent	@	vue.js:5138
createElm	@	vue.js:5081
createChildren	@	vue.js:5209
createElm	@	vue.js:5114
patch	@	vue.js:5597
Vue._update	@	vue.js:2418
updateComponent	@	vue.js:2542
get	@	vue.js:2883
Watcher	@	vue.js:2872
mountComponent	@	vue.js:2546
Vue$3.$mount	@	vue.js:7854
Vue$3.$mount	@	vue.js:10057
(anonymous)	@	Inline Babel script:41
run	@	babel.js:60802
check	@	babel.js:60868
loadScripts	@	babel.js:60909
runScripts	@	babel.js:60936
transformScriptTags	@	babel.js:324

What is Expected?

不提示warn 信息(对mtpicker的计算属性values添加setter方法)

What is actually happening?

提示warn 信息

openks avatar Jul 24 '17 04:07 openks

我也遇到了这个问题,mint-ui与vue2.4版本的兼容问题,先退回vue2.3.4

win5do avatar Jul 24 '17 09:07 win5do

第一次用vue就碰到这个问题,纠结了两天,原来是兼容问题。。。。。。。。。。。

sadmark avatar Jul 25 '17 02:07 sadmark

坑

lzt9977 avatar Jul 26 '17 06:07 lzt9977

element 也有这个问题啊

whatwg6 avatar Jul 27 '17 01:07 whatwg6

@win5do 我就是2.3.4版本,同样这个问题

Levyhehh avatar Jul 27 '17 06:07 Levyhehh

@win5do 错了,2.3.4版本确实没问题

Levyhehh avatar Jul 27 '17 07:07 Levyhehh

是吗 我昨天回退了 还有这个问题呢

发自网易邮箱大师 在2017年07月27日 15:07,undefined 写道:

@win5do 错了,2.3.4版本确实没问题

— You are receiving this because you commented. Reply to this email directly, view it on GitHub, or mute the thread.

lzt9977 avatar Jul 27 '17 07:07 lzt9977

@FrozenByzz 那你回退到2.3.4 解决了没啊

lzt9977 avatar Jul 27 '17 07:07 lzt9977

@lzt9977 解决了

Levyhehh avatar Jul 27 '17 07:07 Levyhehh

@FrozenByzz 只回退vue版本号就好了撒? 非常感谢

lzt9977 avatar Jul 27 '17 07:07 lzt9977

Please reply in English

radislaw avatar Jul 27 '17 07:07 radislaw

@radislaw

This a compatibility issue between mint-ui and vue2.4, you can go back to vue2.3.4 to resolve this.

jerryni avatar Jul 27 '17 07:07 jerryni

打包就不会报错了

Yicoding avatar Jul 27 '17 08:07 Yicoding

这个组件库已经有好几个月没更新了,那么多issues也不修正。

yuzhigang avatar Jul 28 '17 01:07 yuzhigang

后悔引入 mint-ui 刚开始接触 vue 用的就是这个,现在看来就是个坑。专注移动端,样式还是 px 最起码考虑到 rem 之类的吧。修修补补 勉强能用,这个bug 到现在没解决,看来自己都放弃了

xiaogaofudao avatar Jul 29 '17 02:07 xiaogaofudao

官方不解决吗。贴个粗暴解决办法 tim 20170729142745 应该是 vue 升级到 2.4.2 后,会检测到当修改 computed 声明的值时候,报出warning。添加 set 方法即可。

xiaogaofudao avatar Jul 29 '17 06:07 xiaogaofudao

Fixed in 2.2.8

Leopoldthecoder avatar Jul 30 '17 03:07 Leopoldthecoder

我说哥 我都2.2.9版本了 这个问题还没修复

NickBoomBoom avatar Sep 08 '17 03:09 NickBoomBoom

V2.2.13 still has warning

EliazTray avatar Jan 16 '18 03:01 EliazTray

2.2.7 觉得自己很委屈

xiaosi-ss avatar Mar 08 '18 14:03 xiaosi-ss