🔥码云GVP开源项目 12k star Uniapp+ElementUI 功能强大 支持多语言、二开方便! 广告
1.您需要在页面使用requireJS语法包含Fast模块 ~~~ define(['jquery', 'bootstrap', 'backend', 'table', 'fast'], function ($, undefined, Backend, Table, Fast) {}); ~~~ 2.在控制器对应的JS中调用人员选择的弹窗 ~~~ $('#select-user').click(function () { Fast.api.selectUser(function(data){ if(data){ data.forEach(function(value,index){ console.log(value); }); } }); ~~~ 回调函数中返回的参数data为1个数组,格式如下: ~~~ [ {"uid":"10001","username":"张三丰"}, {"uid":"用户编号","username":"真实姓名"} ] ~~~ 如果要选择单个用户,请调用组件 ``` $('selector').on('click',function(){ Fast.api.selectOneUser(function(data){ if(data){ data.forEach(function(value,index){ console.log(value); }); } }); }); ```