About liangyongfei

该作者尚未填入任何详情
So far liangyongfei has created 485 blog entries.

mac 版本的WeX5如果进行数据库的管理!

原因:因为mac 版本的WeX5中没有提供“数据库管理工具”,所以经常用windows 版本的好多开发者不知道如何管理数据库! 解决方案: 1.在studio中 切换到数据库视图,可以通过sql语句操作数据库!也可以直接修改数据库表中的数据! 2.在windows上 的数据库管理工具也可以远程 连接mac版本的mysql 3.可以上网搜下其他的数据库管理工具!在mac机器上安装下就行了!

tree组件点击面包屑标题栏的时候获取点击的数据

通过 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>

添加滚动调的监听事件

1.如果是scrollView 组件 可以在onScrollMove 事件中接管!可以在event上获取一些这个组件相关的数据,用法可以参考:http://docs.wex5.com/comps-scrollview/ 2.自定义的滚动条,需要获取滚动节点对象,然后使用jQuery 进行封装,比如: var dom = this.getElementByXid('content1'); $(dom).scroll(function() { &nbsp;&nbsp;debugger; });

3.5版本attachmentSimple组件图片只能预览不能下载

原因: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"); 即可

设计器中ul标签下不能添加li标签

是平台的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" [...]

在windows上打包苹果应用cordova插件不能正常使用

原因:在windows上,连接打包服务器,打包苹果应用cordova插件不能正常使用 解决方案: 可能是打包服务器的版本和windows上wex5版本不一致导致的!可以在mac环境中下载个相同版本的WeX5,解压并启动服务后,就可以充当打包服务器!这个时候再次打包应该就可以了!