自己实现页面加载的进度条
引用 var loadinbBar = require("$UI/system/components/justep/loadingBar/loadingBar"); 然后在需要的地方调用 loadinbBar.start();开始 调用loadinbBar.stop();结束
引用 var loadinbBar = require("$UI/system/components/justep/loadingBar/loadingBar"); 然后在需要的地方调用 loadinbBar.start();开始 调用loadinbBar.stop();结束
原因:因为mac 版本的WeX5中没有提供“数据库管理工具”,所以经常用windows 版本的好多开发者不知道如何管理数据库! 解决方案: 1.在studio中 切换到数据库视图,可以通过sql语句操作数据库!也可以直接修改数据库表中的数据! 2.在windows上 的数据库管理工具也可以远程 连接mac版本的mysql 3.可以上网搜下其他的数据库管理工具!在mac机器上安装下就行了!
通过 this.comp('breadcrumb')获取tree下的 $UI/system/components/bootstrap/breadcrumb/breadcrumb 组件 通过on('onClick',function(evt){evt.data....}) bind事件后通过evt.data可以获得相关的数据 方法1. this.comp('tree1').getBar().on('onClick',function(evt){ debugger; evt.data }) 方法2. </pre> <pre> var tree = this.getIDByXID("tree1"); var xid = $("#"+tree).find(".breadcrumb").attr("xid"); this.comp(xid).on('onClick',function(evt){var label = evt.data.label;});</pre> <pre>
原因:在浏览器输入IP 端口后,回车,直接跳转到自定义的首页位置!! 解决方法: 修改配置文件runtime\UIServer\WEB-INF\web.xml 不同设备环境跳转到不同的首页路径的定义!都在这个配置文件中!相信您一定能看得懂。 修改后,重启服务
1.如果是scrollView 组件 可以在onScrollMove 事件中接管!可以在event上获取一些这个组件相关的数据,用法可以参考:http://docs.wex5.com/comps-scrollview/ 2.自定义的滚动条,需要获取滚动节点对象,然后使用jQuery 进行封装,比如: var dom = this.getElementByXid('content1'); $(dom).scroll(function() { debugger; });
原因:3.5 版本的 attachmentSimple 组件上传的图片和txt文件,点击的时候只能预览,不能下载!如果想改回以前版本实现下载!如下修改 解决方案:目前可以修改组件代码/UI2/system/components/justep/attachment/attachmentSimple.js 修改后执行\tools\dist\dist.bat合并资源! downloadFile:function(realFileName,storeFileName,ownerID){ var url = this.getFileUrl(realFileName,storeFileName,ownerID,"browse"); fileApi.browse(url); }, 修改代码: this.getFileUrl(realFileName,storeFileName,ownerID,"browse"); 改成 this.getFileUrl(realFileName,storeFileName,ownerID,"download"); 即可
1.参考:http://doc.wex5.com/js-module-02/ 在js中引入css资源,比如: require("css!./innerCss1").load(); 2.在w页面,window组件上右键,引入css资源!或者修改源码,添加引入,比如: <resource xid="resource2"><require xid="require1" url="css!$UI/timeFlow/animation"></require></resource>
是平台的bug, 后续版本将解决。当前版本你可以这么做: 修改/UI2/system/components/html/designer/html.xml文件中关于ul和li的定义, 改为下面的格式: <element name="ul(html)" tag-name="ul" icon="span.gif" text="ul" canAddChild="true" component-class="UL" child-range="li(html)" component-type="layout-container" > <properties> <property name="xid" text="编号" /> <property name="class" text="class" editor-extend-data="xui-ul:ul"/> <property name="dir" editor-ref="edit-dir" text="文本方向" /> <property name="lang" text="语言代码" /> <property name="style" [...]
代码比较多,请直接参考原贴:http://bbs.wex5.com/forum.php?mod=viewthread&tid=88234 把代码复制本地!直接运行就可以了!
原因:在windows上,连接打包服务器,打包苹果应用cordova插件不能正常使用 解决方案: 可能是打包服务器的版本和windows上wex5版本不一致导致的!可以在mac环境中下载个相同版本的WeX5,解压并启动服务后,就可以充当打包服务器!这个时候再次打包应该就可以了!