Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

popup-picker组件选择选项后再将值置空,placeholder不显示 #1293

Closed
zackteng opened this issue Apr 21, 2017 · 8 comments
Closed

Comments

@zackteng
Copy link

版本:
"vue": "^2.2.6",
"vue-router": "^2.3.0",
"vuex": "^2.3.0",
"vux": "^2.2.1-rc.5",

问题:popup-picker组件选择选项后再将值置空,placeholder不显示

表现如下
image

dom结构如下
image

官网例子 点击将值置空后也有此问题
https://vux.li/demos/v2/?x-page=v2-doc-home#/component/popup-picker
image

尝试将源码里v-html 改为v-text可以解决

image

改为
image

image

@airyland
Copy link
Owner

理论上 v-html 和 v-text 并不会有差别。
测试了下无法重现,官网例子没有显示是因为例子并没有配置 placeholder。

@zackteng
Copy link
Author

我重新测试了下,感觉是兼容性问题,官网例子这个在PC端上是好的,但是手机端就不行了,我试了IOS9.3上的safair和Android6.0.1上安装的chrome都有此问题,你可以用手机浏览器试下:-)

@airyland
Copy link
Owner

iOS 10.3.1 Safari 测试没问题。
Android 6.0.1 Chrome 测试没问题。

Demo 是近几天更新的,确定你不是手机页面缓存?

@zackteng
Copy link
Author

我录了两个gif来说明遇到的问题:
这个是PC端chrome的效果是正常的(GIF地址:https://i1.piimg.com/4851/40e93d5d0675d1ef.gi )
img

这个是我用IOS模拟器得到的效果(GIF地址:https://i1.piimg.com/4851/a44b1ffb72344cb7.gif)
img

@zackteng
Copy link
Author

这个问题确认了么?或者说还需要更多repro :-)

@airyland
Copy link
Owner

重现不了,没有 iOS 9。最好你能 clone 源码本地帮忙排查下问题 😅

@gt333
Copy link

gt333 commented Jun 19, 2017

怎么把v-html改成了v-text。。。我的天 ,我这种写法placeholder="<span style='color:#ccc'>请选择<span>"就跪了。

@airyland
Copy link
Owner

@gt333 主要是修复 iOS 低版本下异常,现在可以直接使用 slot:title 来代替。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants