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

请问如何设置第一次打开默认值 #3

Closed
riaas opened this issue Apr 12, 2016 · 5 comments
Closed

请问如何设置第一次打开默认值 #3

riaas opened this issue Apr 12, 2016 · 5 comments

Comments

@riaas
Copy link

riaas commented Apr 12, 2016

如题

@xfhxbb
Copy link
Owner

xfhxbb commented Apr 12, 2016

直接在input标签中写value值即可,如果数据源存在与value值匹配的字符串,则插件弹出后会自动调整到对应位置

@riaas
Copy link
Author

riaas commented Apr 13, 2016

不好意思,我先前试过这样操作,但是没有效果,今天再试了下,还是没有:
qq 20160413114846
这样没有效果。

@xfhxbb
Copy link
Owner

xfhxbb commented Apr 13, 2016

哦,不好意思,我忘记了,这个版本需要用实例化对象中的value去控制,比如:
var area1 = new LArea();
area1.init(...);
area1.value=[0,2,0];
则插件弹出的默认位置为,第一个省,第3个市,第1个区;具体的位置寻找我暂时没有封装,需要你自己去控制了

@xfhxbb
Copy link
Owner

xfhxbb commented Apr 13, 2016

area1.value=[0,2,0];这句仅仅是控制了省市县弹出时的位置,不影响input真实的value,所以初始化的时候还是需要额外设置好input的value值与其对应

@riaas
Copy link
Author

riaas commented Apr 14, 2016

非常感谢,我的js也不是很精通。

@xfhxbb xfhxbb closed this as completed Apr 15, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants