linkageselect 该插件封装了二级联动选择;
依赖第三方插件:
Vue.js实现数据渲染
YonBuilder移动开发 API对象:
api.sendEvent 发送广播事件;
api.addEventListener 监听广播;
api.openFrame;
json数据格式请参照下面示例:(转换成对应格式才能使用此封装,否则无法使用,当然你也可以根据自己需求去改变里面源码)
[{ "id": 1, "name": "暻秀苑", "tung": [{ "id": 11, "name": "1栋" }, { "id": 12, "name": "2栋" }, { "id": 13, "name": "3栋" }, { "id": 14, "name": "4栋" }, { "id": 15, "name": "5栋" }, { "id": 16, "name": "6栋" }, { "id": 17, "name": "7栋" }, { "id": 18, "name": "8栋" }] }, { "id": 2, "name": "飞航苑", "tung": [{ "id": 21, "name": "1栋" }, { "id": 22, "name": "2栋" }, { "id": 23, "name": "3栋" }, { "id": 25, "name": "4栋" }] }];
数据数据交互操作请看:
linkageselect.html 首页 linkageselect_frm.html 弹出二级联动选择界面
使用此插件把需要把下面页面:
linkageselect linkageselect_frm
放入到app源码里面html文档里面;
vuejs放入到源码里面script文件夹里面;
css放入到源码里面css文件夹里面;