GithubHelp home page GithubHelp logo

imouou / bui-guide Goto Github PK

View Code? Open in Web Editor NEW
77.0 7.0 19.0 44.81 MB

BUI 是一个跨平台UI开发框架,基于路径式的组件化开发和单页路由SPA,数据驱动,开箱零配置,简单上手,适合独立开发各种 Webapp,App,小程序……

Home Page: http://www.easybui.com

bui webapp cordova cross-platform dcloud miniprogram uniapp app component-library

bui-guide's Issues

Apicloud 打包编译问题

用apicloud编译测试包下载后打开,提示: bui.loader.execute Cannot read property 'open' of undefined: TypeError&&stack:TypeError: Cannot read property 'open'of undefined at Object.e.init(file:///android_asset/widget/dist/pages/main/main.js:1:196) 等... 能帮忙看下 是哪里没处理好吗

进入页面时bui.list发送了5次请求数据

首次进去列表页面时,不知道为什么了连续发送了5次请求
var uiList = bui.list({
id: "#scrolPlanList",
// 测试的接口及传参
url: serverUrl + "/main/test",
data: {
"id":1
},
pageSize:10,
height:0,
template: templateList,
method:"POST",
//如果分页的字段名不一样,通过field重新定义
field: {
page: "pageNum",
size: "pageSize",
data: "datas"
},
onRefresh: function (scroll) {
//刷新的时候执行
},
onLoad: function (scroll) {
// console.log( this.option("page") );
}
});

levelselect 增加ID 属性

levelselect 目前是文本,可否优化为 ID+ 文本,这样插入数据库可以插入对应的id。

文本内容

tab 的on 监听事件 除了to 以外的事件在1.5.0版本中都不能被监听到

bui.ready(function () {
    
    f();
    
    // var uiLoading = bui.loading({
    //     text: '加载中',
    //     autoClose: false,
    //     callback: function (argument) {
    //         console.log("clickloading")
    //     }
    // });

    // tab.on("to", function () {
    //     uiLoading.show();
    // });
});

var f = function () {
    var tab = bui.tab({
        id: "#tabFoot",
        menu: "#tabFootNav",
        animate: false
    })

    tab.lock();

    tab.on("last", function () {
        console.log(this);
    });
}

页面跳转问题

从页面点击跳转之前的页面,bui.load()方法,之前的页面点击按钮都失效了

你好,上一个问题解决了,谢谢。现在有个问题是,手机软键盘弹出的之后,$(window).height()获取的高度不准确,导致输入框还是会被遮住

// 为input绑定事件
$chatInput.on('focus', function () {
var target = this;
interval = setTimeout(function(){
var winHeight = window.innerHeight;
//我换了这种方法获取是一样的,屏幕高度822,弹出键盘后获取的height是744。
//所以还是会遮住footer中的输入框
bui.alert(winHeight);
bui.init({
id: $(".bui-page"),
height: winHeight ,
})
$(".bui-page")[0].scrollIntoView(true);
},500);
}).on('blur', function () {
if( interval ){
clearTimeout(interval);
}
// 使用定时器是为了延迟计算
interval = setTimeout(function(){
bui.init({
id: $(".bui-page"),
})
$(".bui-page")[0].scrollIntoView(true);
},500);
});

图片压缩修正后(已得到blob数据) 如何替换上传的文件数据

function formUpData(blobFiles){
console.log('before', uiUpload3.data()[uiUpload3.data().length-1])
console.log('before', URL.createObjectURL(uiUpload3.data()[uiUpload3.data().length-1].data))
uiUpload3.data()[uiUpload3.data().length-1].data = blobFiles;
console.log('after', uiUpload3.data()[uiUpload3.data().length-1])
console.log('after', URL.createObjectURL(uiUpload3.data()[uiUpload3.data().length-1].data))

            uiUpload3.start({
                url: localStorage.post + "drivermanger-server/api/driver/file/avatar",
                headers: { token: sessionStorage.token },
                onSuccess:function (data) {}

百度模板渲染问题

进入使用百度模板的页面后,需要刷新浏览器后html才有加进id容器里面,才有展示数据,我用的是你们的那套demo,请问这个问题要怎么处理哦?谢谢~

页面跳转后 数据重载问题

从一个页面跳到登录页面,登录成功后跳回来,数据都没有加载,用router.load 和 bui.load 都没有数据,没有执行到js里面的方法

同一个接口多次加载的问题

首页加载进来,获取轮播图,同一个接口连续加载了四次,请问一下怎么闭环这个问题
if( !uiSlide ){
// 初始化焦点图
bui.ajax({
url : apiUrl+"reqinfo",
data : {}, //接口请求的参数
// 可选参数
method : "GET"
}).then(function(result) {
// 初始化
uiSlide = bui.slide({
id : "#tabSlideImg",
height : 250,
autopage : true, //分页
loop : true, //
autoplay : true, //自动播放
interval : 2000, //滚动时间
template : function() {
var html ='

    "';
    $.each(result.dataList,function(index, ad) {
    if(ad.adType == 0){
    html +='
  • ';
    }
    });
    html+="
";
return html;
},
})
});
}

焦点图如何动态加载

我的代码如下:
pageview.fouceImg=function (){
bui.ajax({
url: "abc.json",
data: {}
}).then(function(res){
var html1="";
var html2="";
$.each(res,function(index,el){
html1+='

  • el.Title
  • ';
    html2+='
  • '+index+'
  • ';
    })

    		$("#fouceImg").html(html1);
    		$("#fouceImgNum").html(html2);
    	})
        
      };
    

    image
    虽然数据有了,但图片和文字显示的很小,不知道是怎么回事

    打扰了

    你好,感谢你提供的这个框架,我觉得很好用。但皮肤不是很好看,我在一个项目里,把bui.js 和 mdui.js 合用了,用了mdui的控件,用了bui的单页router框架,,,但两者好像配合的不是很好,有一个这样的问题:我用mdui做了复选框,但只有双击才会有效果,单击无效,然后我单独试了一个html文件,只有mdui.js,复选框单击有效,请问你有什么办法帮我解决吗,谢谢了!!!

    开发包

    官网教程里面的下载开发包,单页开发包和多页开发包的下载地址,是不是写反了?

    npm run dev 报错

    events.js:183
    throw er; // Unhandled 'error' event
    ^
    Error: ϵͳ�Ҳ���ָ����·����

    at notFoundError (D:\code\demo\node_modules\cross-spawn\lib\enoent.js:11:11)
    at verifyENOENT (D:\code\demo\node_modules\cross-spawn\lib\enoent.js:46:16)
    at ChildProcess.cp.emit (D:\code\demo\node_modules\cross-spawn\lib\enoent.js:33:19)
    at Process.ChildProcess._handle.onexit (internal/child_process.js:198:12)
    npm ERR! code ELIFECYCLE
    npm ERR! errno 1
    npm ERR! @ dev: gulp dev
    npm ERR! Exit status 1
    npm ERR!
    npm ERR! Failed at the @ dev script.
    npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

    npm ERR! A complete log of this run can be found in:
    npm ERR! C:\Users\Administrator\AppData\Roaming\npm-cache_logs\2018-12-14T01_01_29_677Z-debug.log

    ---------------------------log 文件内容-----------------------------------------

    0 info it worked if it ends with ok
    1 verbose cli [ 'D:\download\node\node.exe',
    1 verbose cli 'D:\download\node\node_modules\npm\bin\npm-cli.js',
    1 verbose cli 'run',
    1 verbose cli 'dev' ]
    2 info using [email protected]
    3 info using [email protected]
    4 verbose run-script [ 'predev', 'dev', 'postdev' ]
    5 info lifecycle @~predev: @
    6 info lifecycle @~dev: @
    7 verbose lifecycle @~dev: unsafe-perm in lifecycle true
    8 verbose lifecycle @~dev: PATH: D:\download\node\node_modules\npm\node_modules\npm-lifecycle\node-gyp-bin;D:\code\demo\node_modules.bin;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0;D:\download\node;D:\download\tortoiseGit\bin;D:\download\Git\cmd;C:\Go\bin;C:\Users\Administrator\AppData\Roaming\npm;%GOPATH%\bin
    9 verbose lifecycle @~dev: CWD: D:\code\demo
    10 silly lifecycle @~dev: Args: [ '/d /s /c', 'gulp dev' ]
    11 silly lifecycle @~dev: Returned: code: 1 signal: null
    12 info lifecycle @~dev: Failed to exec dev script
    13 verbose stack Error: @ dev: gulp dev
    13 verbose stack Exit status 1
    13 verbose stack at EventEmitter. (D:\download\node\node_modules\npm\node_modules\npm-lifecycle\index.js:285:16)
    13 verbose stack at emitTwo (events.js:126:13)
    13 verbose stack at EventEmitter.emit (events.js:214:7)
    13 verbose stack at ChildProcess. (D:\download\node\node_modules\npm\node_modules\npm-lifecycle\lib\spawn.js:55:14)
    13 verbose stack at emitTwo (events.js:126:13)
    13 verbose stack at ChildProcess.emit (events.js:214:7)
    13 verbose stack at maybeClose (internal/child_process.js:925:16)
    13 verbose stack at Process.ChildProcess._handle.onexit (internal/child_process.js:209:5)
    14 verbose pkgid @
    15 verbose cwd D:\code\demo
    16 verbose Windows_NT 6.3.9600
    17 verbose argv "D:\download\node\node.exe" "D:\download\node\node_modules\npm\bin\npm-cli.js" "run" "dev"
    18 verbose node v8.11.1
    19 verbose npm v5.6.0
    20 error code ELIFECYCLE
    21 error errno 1
    22 error @ dev: gulp dev
    22 error Exit status 1
    23 error Failed at the @ dev script.
    23 error This is probably not a problem with npm. There is likely additional logging output above.
    24 verbose exit [ 1, true ]

    Recommend Projects

    • React photo React

      A declarative, efficient, and flexible JavaScript library for building user interfaces.

    • Vue.js photo Vue.js

      🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

    • Typescript photo Typescript

      TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

    • TensorFlow photo TensorFlow

      An Open Source Machine Learning Framework for Everyone

    • Django photo Django

      The Web framework for perfectionists with deadlines.

    • D3 photo D3

      Bring data to life with SVG, Canvas and HTML. 📊📈🎉

    Recommend Topics

    • javascript

      JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

    • web

      Some thing interesting about web. New door for the world.

    • server

      A server is a program made to process requests and deliver data to clients.

    • Machine learning

      Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

    • Game

      Some thing interesting about game, make everyone happy.

    Recommend Org

    • Facebook photo Facebook

      We are working to build community through open source technology. NB: members must have two-factor auth.

    • Microsoft photo Microsoft

      Open source projects and samples from Microsoft.

    • Google photo Google

      Google ❤️ Open Source for everyone.

    • D3 photo D3

      Data-Driven Documents codes.