airyland / airyland/vux

[Bug Report] Selector 中使用 getFullValue 会有一个选项的滞后问题

Open
#3,132 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
Vue
Stars
17.5k
Forks
3.6k
PR merge metrics
No merged PRs in 30d

Description

### VUX version
2.9.2

### OS/Browsers version
win10

### Vue version
2.5.17

### Code

```html
https://jsfiddle.net/yorzgpfs/
```

### Steps to reproduce
选择动作时 value值是实时的 正确的
但是打印 this.$refs.refName.getFullValue() 却是之前选择的value对应的item的
因而第一次选择的时候 对应的会是null
这是我第一次选择时 对应的console值:
![image](https://user-images.githubusercontent.com/6224010/46130413-d83d8600-c26b-11e8-8574-a58019932d63.png)
![image](https://user-images.githubusercontent.com/6224010/46130437-e5f30b80-c26b-11e8-8856-b78491504391.png)

再次选择 可以看到 选中的值是对的 但是打印的值是之前的
![image](https://user-images.githubusercontent.com/6224010/46130493-0de26f00-c26c-11e8-94e3-32ff088fb989.png)

我的解决方法是 获取当前的value然后在列表中遍历找对应的 item值

### What is Expected?
this.$refs.refName.getFullValue()获取的是当前选中的项

### What is actually happening?
this.$refs.refName.getFullValue()获取的是之前选中的项

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.