百科.dev
全部条目在线工具AI 编程趋势榜开源项目技术资讯提交条目
登录
< 返回工具列表
H

hello-weex

> 前端框架
开源

hello-weex 包括一个 Weex App(GitHub 类第三方 App),以及自定义扩展的 WeexiOSKit(iOS 上常用的组件和模块)。

190 stars0 点赞3 次浏览
访问官网GitHub

工具介绍

hello-weex 包括一个 Weex App(GitHub 类第三方 App),以及自定义扩展的 WeexiOSKit(iOS 上常用的组件和模块)。

Hello Weex

简介

hello-weex包括一个Weex App,和自己扩展的WeexiOSKit。

weex version为 v0.7.0 - 10月16日的版本

Weex App 的代码位于 examples目录下

WeexiOSKit的代码位于 ios/playground/WeexDemo/WeexiOSKit目录下

运行

  1. 环境
    1. 安装 Node.js 4.0+
    2. 在根目录下
      1. npm install, 安装工程
      2. ./start 到这里web版已经运行起来,浏览器输入http://localhost:12580/ 就能看到了。
    3. Install iOS Environment
    4. Install CocoaPods
  2. 运行 iOS playground
    1. cd ios/playground
    2. pod install
    3. 在 Xcode里打开 WeexDemo.xcworkspace
    4. 点击Xcode的 (Run 按钮) 或者用快捷键 cmd + r
    5. 如果你想在真机上运行. 在 DemoDefine.h, 修改 CURRENT_IP 为你自己的IP

Weex App: Monkey for GitHub

Monkey主要是用来展示GitHub上的开发者的排名,以及仓库的排名。

WeexiOSKit

WeexiOSKit主要是扩展了一些iOS的Component和Module,这样在weex端就可以很好的使用了。

Component 包括segmented-control(UISegmentedControl),stepper(UIStepper),seek-bar(UISeekBar),search-bar(UISearchBar),date-picker(UIDatePicker)。

Module主要包括actionSheet(UIActionSheet),MBProgressHUD(MBProgressHUD,loading视图),geolocation(CLLocationManager坐标),vibration(震动)。

Component

Module

WeexiOSKit使用

Component

segmented-control:支持iOS & web

属性:items(segmented-control里的项目,以分号隔开),momentary(是否设置选中状态),tint-color(颜色)

event:onchange

stepper
属性: value(当前的值),step-value(默认为1),minimum-value(最小值),maximum-value="100(最大值),tint-color(颜色)

event:onchange

seek-bar
属性: value(当前的值),minimum-value(最小值),maximum-value="100(最大值),minimum-track-tint-color,maximum-track-tint-color, thumb-tint-color, minimum-track-image-src,maximum-track-image-src,thumb-image-src

event:onchange

 

 

search-bar
属性: tint-color(颜色)

event:onclick

date-picker
属性: tint-color(颜色)

event:onchange

Module

MBProgressHUD为loading模块 函数:showHUD(显示HUD,参数为title,detail,mode[枚举值indicator/text],cancelTitle,contentColor),hideHUD隐藏HUD()

  toast: function() {
    var MBProgressHUD = require('@weex-module/MBProgressHUD');
    MBProgressHUD.showHUD({title:"loading",contentColor:"red",mode:"indicator"});
    setTimeout(function () {
      MBProgressHUD.hideHUD();
    }, 2000)
  }

actionSheet 函数:actionSheetShow(参数为cancelButtonTitle,destructiveButtonTitle,otherButtonTitles(数组),以及一个回调)

  actionSheet: function() {
    var me= this;
    var actionSheet = require('@weex-module/actionSheet');
    actionSheet.actionSheetShow({
      'cancelButtonTitle': 'cancel',
      'destructiveButtonTitle': 'destructive',
      'otherButtonTitles': me.buttons
    }, function(result) {
    });
  }

geolocation 定位模块

函数getCurrentPosition(参数accuracy,distanceFilter)

  geolocationAction: function() {
    var me= this;
    var geolocation = require('@weex-module/geolocation');
    geolocation.getCurrentPosition({
      'accuracy': '1000',
      'distanceFilter': '10'
    }, function(result) {
      me.geolocationValue = JSON.stringify(result);
    }, function(result) {
    });
  }

vibration 函数:vibrate(真机震动)

  vibrate: function() {
    var vibration = require('@weex-module/vibration');
    vibration.vibrate()
  }

weex-web-kit

weex-web-kit代码位于html5/browser/weex-web-kit目录下

Licenses

All source code is licensed under the MIT License.

Issues· 0 开放

查看全部 Issues在 GitHub 打开

暂无开放 Issues,或尚未同步最近议题。

> 标签

Javaandroidcross-platformgithubios

暂无评论,来聊聊你的看法吧

> 工具信息

发布日期2026年8月1日
最后更新2026年9月18日
分类前端框架
定价开源

> 相关工具

R
React
用于构建用户界面的 JavaScript 库
V
Vue.js
渐进式 JavaScript 框架
N
Next.js
基于 React 的全栈 Web 框架