├── .babelrc ├── .eslintignore ├── .eslintrc ├── .gitignore ├── .npmignore ├── README.md ├── WeexPicker.podspec ├── android └── library │ ├── build.gradle │ ├── proguard-rules.pro │ └── src │ └── main │ ├── AndroidManifest.xml │ ├── java │ └── org │ │ └── weex │ │ └── plugin │ │ ├── example │ │ ├── AwesomeComponent.java │ │ ├── FooHttpAdapter.java │ │ ├── TestDomObject.java │ │ └── TestPluginModule.java │ │ └── weexpicker │ │ └── WRITING_YOUR_PLUGIN_HERE │ └── res │ └── values │ └── strings.xml ├── build ├── webpack.config.js ├── webpack.examples.js └── webpack.examples.web.config.js ├── doc ├── how-to-develop.md └── index.md ├── examples ├── build │ ├── index.js │ ├── vue-web │ │ └── index.js │ └── we │ │ └── index.js ├── index.vue ├── we │ └── index.we └── web-entry │ └── index.js ├── index.html ├── ios ├── Info.plist ├── Podfile ├── Sources │ ├── WeexPickerModule.h │ └── WeexPickerModule.m └── WeexPicker.xcodeproj │ └── project.pbxproj ├── js ├── build │ └── index.js └── src │ ├── Picker.js │ ├── TimePicker.js │ ├── index.js │ ├── picker.css │ ├── pluginstall.js │ └── pluginstall.js.js ├── package.json ├── playground ├── android │ ├── app │ │ ├── build.gradle │ │ ├── proguard-rules.pro │ │ └── src │ │ │ ├── androidTest │ │ │ └── java │ │ │ │ └── org │ │ │ │ └── weex │ │ │ │ └── demo │ │ │ │ └── ExampleInstrumentedTest.java │ │ │ ├── main │ │ │ ├── AndroidManifest.xml │ │ │ └── res │ │ │ │ ├── layout │ │ │ │ └── activity_main.xml │ │ │ │ ├── mipmap-hdpi │ │ │ │ └── ic_launcher.png │ │ │ │ ├── mipmap-mdpi │ │ │ │ └── ic_launcher.png │ │ │ │ ├── mipmap-xhdpi │ │ │ │ └── ic_launcher.png │ │ │ │ ├── mipmap-xxhdpi │ │ │ │ └── ic_launcher.png │ │ │ │ ├── mipmap-xxxhdpi │ │ │ │ └── ic_launcher.png │ │ │ │ ├── values-w820dp │ │ │ │ └── dimens.xml │ │ │ │ └── values │ │ │ │ ├── colors.xml │ │ │ │ ├── dimens.xml │ │ │ │ ├── strings.xml │ │ │ │ └── styles.xml │ │ │ └── test │ │ │ └── java │ │ │ └── org │ │ │ └── weex │ │ │ └── demo │ │ │ └── ExampleUnitTest.java │ ├── build.gradle │ ├── gradle.properties │ ├── gradle │ │ └── wrapper │ │ │ ├── gradle-wrapper.jar │ │ │ └── gradle-wrapper.properties │ ├── gradlew │ ├── gradlew.bat │ └── settings.gradle ├── browser │ ├── build │ │ └── pluginInstall.js │ ├── index-vue.html │ ├── index-we.html │ ├── lib │ │ └── browser.js │ ├── pluginInstall.js │ └── weex-vue-render │ │ ├── README.md │ │ ├── index.js │ │ └── package.json └── ios │ ├── Podfile │ ├── README.md │ ├── WeexDemo.xcodeproj │ └── project.pbxproj │ ├── WeexDemo │ ├── AppDelegate.h │ ├── AppDelegate.m │ ├── Assets.xcassets │ │ ├── AppIcon.appiconset │ │ │ ├── Contents.json │ │ │ ├── Icon-29.png │ │ │ ├── Icon-29@2x-1.png │ │ │ ├── Icon-29@2x.png │ │ │ ├── Icon-29@3x.png │ │ │ ├── Icon-40.png │ │ │ ├── Icon-40@2x-1.png │ │ │ ├── Icon-40@2x.png │ │ │ ├── Icon-40@3x.png │ │ │ ├── Icon-60@2x.png │ │ │ ├── Icon-60@3x.png │ │ │ ├── Icon-76.png │ │ │ ├── Icon-76@2x.png │ │ │ └── Icon-83.5@2x.png │ │ ├── Contents.json │ │ ├── LaunchImage.launchimage │ │ │ ├── Contents.json │ │ │ ├── Default-4.7@2x.png │ │ │ ├── Default-568h@2x-1.png │ │ │ ├── Default-568h@2x.png │ │ │ ├── Default.png │ │ │ ├── Default@2x-1.png │ │ │ ├── Default@2x.png │ │ │ ├── Default@3x-1.png │ │ │ └── Default@3x.png │ │ ├── back.imageset │ │ │ ├── Contents.json │ │ │ ├── back.png │ │ │ ├── back@2x.png │ │ │ └── back@3x.png │ │ ├── reload.imageset │ │ │ ├── Contents.json │ │ │ ├── reload.png │ │ │ ├── reload@2x.png │ │ │ └── reload@3x.png │ │ └── scan.imageset │ │ │ ├── Contents.json │ │ │ ├── scan.png │ │ │ ├── scan@2x.png │ │ │ └── scan@3x.png │ ├── DemoBaseViewController.h │ ├── DemoBaseViewController.m │ ├── DemoDefine.h │ ├── Images.xcassets │ │ └── Brand Assets.launchimage │ │ │ └── Contents.json │ ├── Info.plist │ ├── Scanner │ │ ├── WXScannerVC.h │ │ └── WXScannerVC.m │ ├── UIView+UIThreadCheck.h │ ├── UIView+UIThreadCheck.m │ ├── UIViewController+WXDemoNaviBar.h │ ├── UIViewController+WXDemoNaviBar.m │ ├── WXDemoViewController.h │ ├── WXDemoViewController.m │ ├── WXSyncTestModule.h │ ├── WXSyncTestModule.m │ ├── debug │ │ ├── WXATLoggerPlugin.h │ │ ├── WXATLoggerPlugin.m │ │ ├── WXATViewHierarchyPlugin.h │ │ └── WXATViewHierarchyPlugin.m │ ├── extend │ │ ├── component │ │ │ ├── WXSelectComponent.h │ │ │ └── WXSelectComponent.m │ │ ├── handler │ │ │ ├── WXImgLoaderDefaultImpl.h │ │ │ └── WXImgLoaderDefaultImpl.m │ │ └── module │ │ │ ├── WXEventModule.h │ │ │ └── WXEventModule.m │ ├── main.m │ └── weex-icon.png │ ├── WeexDemoTests │ ├── Info.plist │ └── WeexDemoTests.m │ ├── WeexUITestDemo-Info.plist │ ├── WeexUITestDemoUITests │ ├── Info.plist │ └── WeexUITestDemoUITests.m │ ├── bundlejs │ ├── actionsheet.js │ ├── animation.js │ ├── component │ │ ├── a-demo.js │ │ ├── countdown-demo.js │ │ ├── image-demo.js │ │ ├── input-demo.js │ │ ├── list │ │ │ ├── list-basic.js │ │ │ ├── list-demo-horizon.js │ │ │ └── list-demo.js │ │ ├── marquee-demo.js │ │ ├── navigator-demo.js │ │ ├── process-bar-demo.js │ │ ├── scroller-demo.js │ │ ├── slider-neighbor │ │ │ ├── index.js │ │ │ ├── slider-neighbor-item.js │ │ │ └── slider-neighbor-page.js │ │ ├── slider │ │ │ ├── index.js │ │ │ ├── slider-item.js │ │ │ └── slider-page.js │ │ ├── tabbar │ │ │ ├── tabbar-demo.js │ │ │ └── tabbar-item.js │ │ ├── text-demo.js │ │ ├── video-demo.js │ │ └── web-demo.js │ ├── error.js │ ├── geolocation.js │ ├── hello.js │ ├── iconfont.js │ ├── index.js │ ├── linear-gradient.js │ ├── module │ │ ├── clipboard.js │ │ ├── componentRect.js │ │ ├── instance-api.js │ │ ├── modal.js │ │ ├── picker-demo.js │ │ ├── storage-demo.js │ │ ├── stream-demo.js │ │ └── websocket-demo.js │ ├── showcase │ │ ├── calculator.js │ │ ├── dropdown │ │ │ ├── dropdown-demo.js │ │ │ └── we-dropdown.js │ │ ├── minesweeper.js │ │ ├── new-fashion │ │ │ ├── banner.js │ │ │ ├── banners.js │ │ │ ├── brand.js │ │ │ ├── category.js │ │ │ ├── coupon.js │ │ │ ├── fashion.js │ │ │ ├── goods.js │ │ │ ├── headlines.js │ │ │ ├── image-demo.js │ │ │ ├── index.js │ │ │ ├── link.js │ │ │ ├── list │ │ │ │ ├── list-basic.js │ │ │ │ ├── list-demo-horizon.js │ │ │ │ └── list-demo.js │ │ │ ├── main.js │ │ │ ├── match.js │ │ │ ├── resource.js │ │ │ └── scene.js │ │ ├── pseudo-class.js │ │ └── ui.js │ ├── style │ │ ├── index.js │ │ ├── style-box.js │ │ ├── style-flex.js │ │ └── style-item.js │ ├── syntax │ │ ├── hello-world-1.js │ │ ├── hello-world-2.js │ │ ├── hello-world-3.js │ │ ├── hello-world-4.js │ │ ├── hello-world-5.js │ │ ├── hello-world.js │ │ ├── index.js │ │ ├── script-component.js │ │ ├── script-data.js │ │ ├── script-events.js │ │ ├── script-instance.js │ │ ├── script-lifecycle.js │ │ ├── script-module.js │ │ ├── script-options.js │ │ ├── template-class.js │ │ ├── template-content.js │ │ ├── template-event.js │ │ ├── template-if.js │ │ ├── template-repeat-update.js │ │ ├── template-repeat.js │ │ └── template-style.js │ ├── template.js │ ├── test.js │ └── vue │ │ ├── animation.js │ │ ├── components │ │ ├── a.js │ │ ├── countdown.js │ │ ├── image.js │ │ ├── input.js │ │ ├── list.js │ │ ├── marquee.js │ │ ├── navigator.js │ │ ├── scroller.js │ │ ├── slider.js │ │ ├── tabbar.js │ │ ├── text.js │ │ ├── video.js │ │ └── web.js │ │ ├── hello.js │ │ ├── iconfont.js │ │ ├── index.js │ │ ├── modules │ │ ├── clipboard.js │ │ ├── instance-api.js │ │ ├── modal.js │ │ ├── storage.js │ │ └── stream.js │ │ ├── showcase │ │ ├── calculator.js │ │ ├── itemlist.js │ │ ├── new-fashion.js │ │ └── progress.js │ │ ├── style │ │ ├── index.js │ │ ├── style-box.js │ │ ├── style-flex.js │ │ └── style-item.js │ │ ├── syntax │ │ ├── hello-world-1.js │ │ ├── hello-world-2.js │ │ ├── hello-world-3.js │ │ ├── hello-world-4.js │ │ ├── hello-world-5.js │ │ ├── hello-world.js │ │ ├── script-component.js │ │ ├── script-data.js │ │ ├── script-events.js │ │ ├── script-instance.js │ │ ├── script-lifecycle.js │ │ ├── script-module.js │ │ ├── script-options.js │ │ ├── template-class.js │ │ ├── template-content.js │ │ ├── template-event.js │ │ ├── template-if.js │ │ ├── template-repeat-update.js │ │ ├── template-repeat.js │ │ └── template-style.js │ │ └── template.js │ ├── weex.png │ └── weex@2x.png ├── start └── start-web /.babelrc: -------------------------------------------------------------------------------- 1 | { "presets": ["es2015"] } 2 | -------------------------------------------------------------------------------- /.eslintignore: -------------------------------------------------------------------------------- 1 | # do not lint test case source files 2 | html5/test/case/*/*.source.js 3 | html5/test/case/*/*.output.js 4 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # Created by IDE 2 | .idea/ 3 | *.iml 4 | .DS_Store 5 | 6 | # Created by Builder 7 | test/build 8 | weex_tmp 9 | coverage 10 | # Node 11 | logs 12 | *.log 13 | npm-debug.log* 14 | node_modules 15 | .npm 16 | 17 | # Runtime data 18 | pids 19 | *.pid 20 | *.seed 21 | 22 | # e2e test 23 | html5/test/e2e/reports 24 | html5/test/e2e/screenshots 25 | html5/test/e2e/logs 26 | 27 | # Created by Weex Web Packer 28 | html5/browser/extend/packer.js 29 | html5/render/browser/extend/packer.js 30 | 31 | android/playground/app/gradlew 32 | android/playground/app/gradlew.bat 33 | android/playground/app/gradle/wrapper/gradle-wrapper.jar 34 | android/playground/app/gradle/wrapper/gradle-wrapper.properties 35 | -------------------------------------------------------------------------------- /.npmignore: -------------------------------------------------------------------------------- 1 | ios 2 | examples 3 | doc 4 | android 5 | playground -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # weex-picker 2 | weex-picker是一个weex插件,可以通过weexpack快速集成,可以丰富weex功能 3 | 4 | * 支持的weexpack版本: >= 0.2.0 5 | * 支持的WeexSDK版本: >= 0.14.0 6 | * 支持的Vue版本: 2.x 7 | 8 | weex-picker仅支持weex的web端的picker功能,如无需picker功能,无需引入. 9 | 10 | ## 示例 11 | 12 | - 编译例子 13 | ``` 14 | npm run build:examples 15 | ``` 16 | - 启动调试服务器 17 | ``` 18 | npm run serve 19 | ``` 20 | 打开 [localhost:12580]('localhost:12580/index.html') 查看例子. 21 | 22 | ## 如何使用 23 | 24 | - 步骤 1 25 | ``` 26 | npm install @weex-project/weex-picker --save-dev 27 | ``` 28 | - 步骤 2 29 | 30 | ~~你需要在引入`weex-vue-render`之后进行模块注册,具体可参考根目录下的`./playground/browser/plugininstall.js`~~ 31 | 32 | 目前模块的注册加入了源码中,请保证在weex环境加载之后引入 33 | 34 | ```html 35 | 36 | 37 | 38 | ``` 39 | 40 | - 步骤 3 41 | 42 | ```javascript 43 | const picker = weex.requireModule('picker'); 44 | picker.pick({ 45 | items: [1, 2, 3, 4], 46 | height: "500px" 47 | }, function(ret) { 48 | var result = ret.result; 49 | if (result == 'success') { 50 | self.normalpickData = ret.data; 51 | } 52 | }) 53 | ``` 54 | 55 | ## 概述 56 | 57 | 以下为 picker 相关的 API,用于数据选择,日期选择,时间选择。 58 | 59 | ## API 60 | 61 | ### `pick(options, callback[options])` 62 | 63 | 调用单选 picker 64 | 65 | #### 参数 66 | 67 | - `options {Object}`:调用单选 picker 选项 68 | - `index {number}`:默认选中的选项 69 | - `items {array}`:picker 数据源 70 | 71 | - `callback {function (ret)}`:执行完读取操作后的回调函数。`ret {Object}` 为 `callback` 函数的参数,有两个属性: 72 | - `result {string}`:结果三种类型 `success`, `cancel`, `error` 73 | - `data {number}`:选择的选项,仅成功确认时候存在。 74 | 75 | ### `pickDate(options, callback[options])` 76 | 77 | 调用 date picker 78 | 79 | #### 参数 80 | 81 | - `options {Object}`:调用 date picker 选项,更多选项可查看[Pickday Configuration](https://github.com/dbushell/Pikaday#configuration) 82 | - `value {string}`:必选,date picker 选中的值,date 的字符串格式为`yyyy-MM-dd` 83 | - `max {string}`:可选,date 的最大值 84 | - `min {string}`:可选,date 的最小值 85 | 86 | - `callback {function (ret)}`:执行完读取操作后的回调函数。`ret {Object}` 为 `callback` 函数的参数,有两个属性: 87 | - `result {string}`:结果三种类型 `success`, `cancel`, `error` 88 | - `data {string}`:选择的值 date 的字符,格式为 `yyyy-MM-dd`, 仅成功确认的时候存在。 89 | 90 | ### `pickTime(options, callback[options])` 91 | 92 | 调用 time picker 93 | 94 | #### 参数 95 | 96 | - `options {Object}`:调用 time picker 选项 97 | - `value {string}`:必选,time 格式为 `HH:mm` 98 | 99 | - `callback {function (ret)}`:执行完读取操作后的回调函数。`ret {Object}` 为 `callback` 函数的参数,有两个属性: 100 | - `result {string}`:结果三种类型 `success`, `cancel`, `error` 101 | - `data {string}`:time 格式为 `HH:mm`, 仅成功确认的时候存在。 102 | 103 | -------------------------------------------------------------------------------- /WeexPicker.podspec: -------------------------------------------------------------------------------- 1 | # coding: utf-8 2 | 3 | Pod::Spec.new do |s| 4 | s.name = "WeexPicker" 5 | s.version = "0.0.5" 6 | s.summary = "Weex Plugin" 7 | 8 | s.description = <<-DESC 9 | Weexplugin Source Description 10 | DESC 11 | 12 | s.homepage = "https://github.com" 13 | s.license = { 14 | :type => 'Copyright', 15 | :text => <<-LICENSE 16 | copyright 17 | LICENSE 18 | } 19 | s.authors = { 20 | "yourname" =>"youreamail" 21 | } 22 | s.platform = :ios 23 | s.ios.deployment_target = "7.0" 24 | 25 | s.source = { :git => 'please input the url of your code in github', :tag => 'please input you github tag' } 26 | s.source_files = "ios/Sources/*.{h,m,mm}" 27 | 28 | s.requires_arc = true 29 | s.dependency "WeexPluginLoader" 30 | s.dependency "WeexSDK" 31 | end 32 | -------------------------------------------------------------------------------- /android/library/build.gradle: -------------------------------------------------------------------------------- 1 | apply plugin: 'com.android.library' 2 | 3 | android { 4 | compileSdkVersion 25 5 | buildToolsVersion "25.0.2" 6 | 7 | defaultConfig { 8 | minSdkVersion 14 9 | targetSdkVersion 25 10 | versionCode 1 11 | versionName "1.0" 12 | 13 | testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner" 14 | 15 | } 16 | buildTypes { 17 | release { 18 | minifyEnabled false 19 | proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' 20 | } 21 | } 22 | } 23 | 24 | dependencies { 25 | compile fileTree(dir: 'libs', include: ['*.jar']) 26 | androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', { 27 | exclude group: 'com.android.support', module: 'support-annotations' 28 | }) 29 | compile 'com.android.support:appcompat-v7:25.1.1' 30 | compile 'com.taobao.android:weex_sdk:0.10.0' 31 | provided 'org.weex.plugin:processor:1.0.0' 32 | testCompile 'junit:junit:4.12' 33 | } 34 | -------------------------------------------------------------------------------- /android/library/proguard-rules.pro: -------------------------------------------------------------------------------- 1 | # Add project specific ProGuard rules here. 2 | # By default, the flags in this file are appended to flags specified 3 | # in /Users/moxun/Library/Android/sdk/tools/proguard/proguard-android.txt 4 | # You can edit the include path and order by changing the proguardFiles 5 | # directive in build.gradle. 6 | # 7 | # For more details, see 8 | # http://developer.android.com/guide/developing/tools/proguard.html 9 | 10 | # Add any project specific keep options here: 11 | 12 | # If your project uses WebView with JS, uncomment the following 13 | # and specify the fully qualified class name to the JavaScript interface 14 | # class: 15 | #-keepclassmembers class fqcn.of.javascript.interface.for.webview { 16 | # public *; 17 | #} 18 | -------------------------------------------------------------------------------- /android/library/src/main/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /android/library/src/main/java/org/weex/plugin/example/AwesomeComponent.java: -------------------------------------------------------------------------------- 1 | package org.weex.plugin.example; 2 | 3 | 4 | import android.view.View; 5 | 6 | import com.alibaba.weex.plugin.annotation.WeexComponent; 7 | import com.taobao.weex.WXSDKInstance; 8 | import com.taobao.weex.dom.WXDomObject; 9 | import com.taobao.weex.ui.component.WXComponent; 10 | import com.taobao.weex.ui.component.WXVContainer; 11 | 12 | 13 | @WeexComponent(names = {"awesome","amazing"}) 14 | public class AwesomeComponent extends WXComponent { 15 | public AwesomeComponent(WXSDKInstance instance, WXDomObject dom, WXVContainer parent) { 16 | super(instance, dom, parent); 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /android/library/src/main/java/org/weex/plugin/example/FooHttpAdapter.java: -------------------------------------------------------------------------------- 1 | package org.weex.plugin.example; 2 | 3 | 4 | import com.alibaba.weex.plugin.annotation.WeexAdapter; 5 | import com.taobao.weex.adapter.IWXHttpAdapter; 6 | import com.taobao.weex.common.WXRequest; 7 | 8 | 9 | @WeexAdapter(type = IWXHttpAdapter.class) 10 | public class FooHttpAdapter implements IWXHttpAdapter { 11 | @Override 12 | public void sendRequest(WXRequest request, OnHttpListener listener) { 13 | 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /android/library/src/main/java/org/weex/plugin/example/TestDomObject.java: -------------------------------------------------------------------------------- 1 | package org.weex.plugin.example; 2 | 3 | 4 | import com.alibaba.weex.plugin.annotation.WeexDomObject; 5 | import com.taobao.weex.dom.WXDomObject; 6 | 7 | 8 | @WeexDomObject(type = "test") 9 | public class TestDomObject extends WXDomObject { 10 | } 11 | -------------------------------------------------------------------------------- /android/library/src/main/java/org/weex/plugin/example/TestPluginModule.java: -------------------------------------------------------------------------------- 1 | package org.weex.plugin.example; 2 | 3 | import com.alibaba.weex.plugin.annotation.WeexModule; 4 | import com.taobao.weex.annotation.JSMethod; 5 | import com.taobao.weex.bridge.JSCallback; 6 | import com.taobao.weex.common.WXModule; 7 | 8 | @WeexModule(name = "testPlugin") 9 | public class TestPluginModule extends WXModule { 10 | @JSMethod 11 | public String syncRet(String param) { 12 | return param; 13 | } 14 | 15 | @JSMethod 16 | public void asyncRet(String param, JSCallback callback) { 17 | callback.invoke(param); 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /android/library/src/main/java/org/weex/plugin/weexpicker/WRITING_YOUR_PLUGIN_HERE: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/weexteam/picker-for-Apache-Weex/9c29f07cd221f6e83e0a0f05388e3a2b40d2010b/android/library/src/main/java/org/weex/plugin/weexpicker/WRITING_YOUR_PLUGIN_HERE -------------------------------------------------------------------------------- /android/library/src/main/res/values/strings.xml: -------------------------------------------------------------------------------- 1 | 2 | ActionSheet 3 | 4 | -------------------------------------------------------------------------------- /build/webpack.config.js: -------------------------------------------------------------------------------- 1 | var fs = require('fs'); 2 | var webpack = require('webpack'); 3 | var path = require('path'); 4 | 5 | 6 | var bannerExcludeFiles = []; 7 | 8 | var banner = '// NOTE: for vue2.0 and platform:web only.\n' 9 | 10 | var bannerPlugin = new webpack.BannerPlugin(banner, { 11 | raw: true, 12 | exclude: bannerExcludeFiles 13 | }) 14 | 15 | module.exports = { 16 | entry: "./js/src/pluginstall.js", 17 | output: { 18 | path: './js/build/', 19 | filename: 'index.js' 20 | }, 21 | resolve: { 22 | modules: [path.resolve(__dirname, 'node_modules')] 23 | }, 24 | module: { 25 | loaders: [{ 26 | test: /\.(we|vue)(\?[^?]+)?$/, 27 | loader: 'weex' 28 | }, 29 | { 30 | test: /\.js(\?[^?]+)?$/, 31 | exclude: /node_modules/, 32 | loader: 'babel-loader?presets[]=es2015', 33 | }, 34 | { 35 | test: /\.css(\?[^?]+)?$/, 36 | loader: 'style-loader!css-loader' 37 | } 38 | ] 39 | }, 40 | plugins: [ 41 | bannerPlugin, 42 | new webpack.optimize.UglifyJsPlugin({ 43 | // 最紧凑的输出 44 | beautify: false, 45 | // 删除所有的注释 46 | comments: false, 47 | compress: { 48 | // 在UglifyJs删除没有用到的代码时不输出警告 49 | warnings: false, 50 | // 删除所有的 `console` 语句 51 | // 还可以兼容ie浏览器 52 | drop_console: true, 53 | // 内嵌定义了但是只用到一次的变量 54 | collapse_vars: true, 55 | // 提取出出现多次但是没有定义成变量去引用的静态值 56 | reduce_vars: true, 57 | } 58 | }) 59 | ] 60 | } -------------------------------------------------------------------------------- /build/webpack.examples.js: -------------------------------------------------------------------------------- 1 | var path = require('path'); 2 | var fs = require('fs-extra'); 3 | var webpack = require('webpack'); 4 | 5 | var entry = {}; 6 | var bannerExcludeFiles = []; 7 | var webSrcDirectory = path.join(__dirname, '../examples/web-entry'); 8 | 9 | function getEntryFileContent(entryPath, vueFilePath) { 10 | const relativePath = path.relative(path.join(entryPath, '../'), vueFilePath); 11 | return 'var App = require(\'' + relativePath + '\')\n' + 12 | 'App.el = \'#root\'\n' + 13 | 'new Vue(App)\n' 14 | } 15 | 16 | function walk(dir) { 17 | dir = dir || '.'; 18 | var directory = path.join(__dirname, '../examples', dir); 19 | var entryDirectory = path.join(webSrcDirectory, dir); 20 | fs.readdirSync(directory) 21 | .forEach(function(file) { 22 | var fullpath = path.join(directory, file); 23 | var stat = fs.statSync(fullpath); 24 | var extname = path.extname(fullpath); 25 | if (stat.isFile() && extname === '.vue') { 26 | var entryFile = path.join(entryDirectory, path.basename(file, extname) + '.js'); 27 | fs.outputFileSync(entryFile, getEntryFileContent(entryFile, fullpath)); 28 | var name = path.join('examples', 'build/vue-web', /*path.relative('vue', dir)*/ dir, path.basename(file, extname)); 29 | entry[name] = entryFile + '?entry=true'; 30 | } 31 | if (stat.isFile() && extname === '.we') { 32 | var name = path.join('examples', 'build', dir, path.basename(file, extname)); 33 | entry[name] = fullpath + '?entry=true'; 34 | if (extname === '.we') { 35 | 36 | } 37 | } else if (stat.isDirectory() && file !== 'build' && file !== 'include') { 38 | var subdir = path.join(dir, file); 39 | walk(subdir); 40 | } 41 | }); 42 | } 43 | 44 | walk(); 45 | 46 | var buildBrowserPlugin = 'js/src/pluginstall.js' 47 | var browserPlugin = path.join(__dirname, '../js/src/pluginstall.js') 48 | entry[buildBrowserPlugin] = browserPlugin + '?entry=true'; 49 | 50 | 51 | var banner = '// NOTE: for vue2.0 and platform:web only.\n' 52 | 53 | var bannerPlugin = new webpack.BannerPlugin(banner, { 54 | raw: true, 55 | exclude: bannerExcludeFiles 56 | }) 57 | 58 | module.exports = { 59 | entry: entry, 60 | // entry: { 61 | // 'examples/build/web/vue-bundle': path.resolve('examples/vue', 'entry.js') 62 | // }, 63 | output: { 64 | path: '.', 65 | filename: '[name].js' 66 | }, 67 | module: { 68 | loaders: [{ 69 | test: /\.(we)(\?[^?]+)?$/, 70 | loader: 'weex' 71 | }, 72 | { 73 | test: /\.(js)(\?[^?]+)?$/, 74 | loader: 'babel-loader?presets[]=es2015', 75 | exclude: /node_modules/ 76 | 77 | }, { 78 | test: /\.vue(\?[^?]+)?$/, 79 | loaders: ['vue-loader'] 80 | }, 81 | { 82 | test: /\.css(\?[^?]+)?$/, 83 | loader: 'style-loader!css-loader' 84 | } 85 | ] 86 | }, 87 | plugins: [bannerPlugin] 88 | } -------------------------------------------------------------------------------- /build/webpack.examples.web.config.js: -------------------------------------------------------------------------------- 1 | var path = require('path'); 2 | var fs = require('fs-extra'); 3 | var webpack = require('webpack'); 4 | 5 | var entry = {}; 6 | var bannerExcludeFiles = []; 7 | var webSrcDirectory = path.join(__dirname, '../examples/web-entry'); 8 | 9 | function getEntryFileContent (entryPath, vueFilePath) { 10 | const relativePath = path.relative(path.join(entryPath, '../'), vueFilePath); 11 | return 'var App = require(\'' + relativePath + '\')\n' 12 | + 'App.el = \'#root\'\n' 13 | + 'new Vue(App)\n' 14 | } 15 | 16 | function walk(dir) { 17 | dir = dir || '.'; 18 | var directory = path.join(__dirname, '../examples', dir); 19 | var entryDirectory = path.join(webSrcDirectory, dir); 20 | fs.readdirSync(directory) 21 | .forEach(function(file) { 22 | var fullpath = path.join(directory, file); 23 | var stat = fs.statSync(fullpath); 24 | var extname = path.extname(fullpath); 25 | if (stat.isFile() && extname === '.vue') { 26 | var entryFile = path.join(entryDirectory, path.basename(file, extname) + '.js'); 27 | fs.outputFileSync(entryFile, getEntryFileContent(entryFile, fullpath)); 28 | var name = path.join('examples', 'build/vue-web', /*path.relative('vue', dir)*/dir, path.basename(file, extname)); 29 | entry[name] = entryFile + '?entry=true'; 30 | } 31 | if (stat.isFile() && extname === '.we' ) { 32 | var name = path.join('examples', 'build', dir, path.basename(file, extname)); 33 | entry[name] = fullpath + '?entry=true'; 34 | if (extname === '.we') { 35 | 36 | } 37 | } 38 | else if (stat.isDirectory() && file !== 'build' && file !== 'include') { 39 | var subdir = path.join(dir, file); 40 | walk(subdir); 41 | } 42 | }); 43 | } 44 | 45 | walk(); 46 | 47 | var buildBrowserPlugin = 'playground/browser/build/pluginInstall' 48 | var browserPlugin = path.join(__dirname, '../playground/browser/pluginInstall.js') 49 | entry[buildBrowserPlugin] = browserPlugin + '?entry=true'; 50 | 51 | 52 | var banner = '// NOTE: for vue2.0 and platform:web only.\n' 53 | 54 | var bannerPlugin = new webpack.BannerPlugin(banner, { 55 | raw: true, 56 | exclude: bannerExcludeFiles 57 | }) 58 | 59 | module.exports = { 60 | entry: entry, 61 | // entry: { 62 | // 'examples/build/web/vue-bundle': path.resolve('examples/vue', 'entry.js') 63 | // }, 64 | output: { 65 | path: '.', 66 | filename: '[name].js' 67 | }, 68 | module: { 69 | loaders: [ 70 | { 71 | test: /\.(we)(\?[^?]+)?$/, 72 | loader: 'weex' 73 | }, 74 | { 75 | test: /\.(js)(\?[^?]+)?$/, 76 | loader: 'babel-loader?presets[]=es2015', 77 | exclude: /node_modules/ 78 | 79 | }, { 80 | test: /\.vue(\?[^?]+)?$/, 81 | loaders: ['vue-loader'] 82 | }, 83 | { 84 | test: /\.css(\?[^?]+)?$/, 85 | loader: 'style-loader!css-loader' 86 | } 87 | ] 88 | }, 89 | plugins: [bannerPlugin] 90 | } 91 | -------------------------------------------------------------------------------- /doc/how-to-develop.md: -------------------------------------------------------------------------------- 1 | # weex 插件开发套件 2 | - weex 插件开发套件旨在帮助用户快速,方便开发插件,一键集成,无需更改任何业务代码 3 | 4 | ## iOS 5 | 6 | ### 如何开发插件 7 | - 通过weexpack初始化一个WeexPicker工程 8 | ``` 9 | weex create dev WeexPicker 10 | ``` 11 | - 工程目录如下 12 | ``` 13 | ├── android(Android插件工程) 14 | │ ├── buid.gradle(android发布文件) 15 | ├── ios(ios插件工程) 16 | ├── js(h5插件工程) 17 | ├── example(例子,开发者用来测试问题) 18 | │ ├── android(demo) 19 | │ ├── ios(demo) 20 | │ ├── js(demo) 21 | │ └── index.we 22 | ├── ****.podspec(ios发布文件) 23 | ├── start(weex编译命令) 24 | ├── package.json(js发布文件) 25 | ├── README.md 26 | ``` 27 | - 请在ios目录下用如下命令初始化ios工程 28 | ``` 29 | pod update 30 | ``` 31 | - 添加插件初测信息 32 | - component示例 33 | ``` 34 | WX_PlUGIN_EXPORT_MODULE(test, WPTestComponent) 35 | ``` 36 | - module示例 37 | ``` 38 | WX_PlUGIN_EXPORT_COMPONENT(test, WPTestModule) 39 | ``` 40 | - Handler示例 41 | ``` 42 | WX_PlUGIN_EXPORT_HANDLER(WPTestHandler, WXImgLoaderProtocol) 43 | ``` 44 | - 插件开发完成请在example/ios测试 45 | - 初始化测试工程 46 | ``` 47 | pod update 48 | ``` 49 | - 检验测试结果,demo运行起来会在控制台输入下面类似信息 50 | ``` 51 | 2017-03-24 16:54:52.934 WeexDemo[88059:2693902] WPTestComponent register 52 | 2017-03-24 16:54:52.936 WeexDemo[88059:2693902] WXImgLoaderProtocol register 53 | 2017-03-24 16:54:52.937 WeexDemo[88059:2693902] WPTestModule register 54 | ``` 55 | 56 | ### 如何发布插件 57 | - 发布插件到cocoapods 仓库 58 | - 已经默认创建好podspec,开发者在根目录通过如下命令检查iOS插件的正确性 59 | ``` 60 | pod spec lint --allow-warnings 61 | ``` 62 | - 发布插件到cocoapods 仓库 63 | ``` 64 | pod trunk push --allow-warnings 65 | ``` 66 | 67 | ### 如何发布插件到weex market 68 | - 通过weex命令发布 69 | ``` 70 | weex plugin publish 71 | ``` 72 | 73 | ### 如何集成插件WeexPicker 74 | - 命令行集成 75 | ``` 76 | weex plugin add WeexPicker 77 | ``` 78 | - 手动集成 79 | 在podfile 中添加 80 | ``` 81 | pod 'WeexPicker' 82 | ``` 83 | -------------------------------------------------------------------------------- /doc/index.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/weexteam/picker-for-Apache-Weex/9c29f07cd221f6e83e0a0f05388e3a2b40d2010b/doc/index.md -------------------------------------------------------------------------------- /examples/index.vue: -------------------------------------------------------------------------------- 1 | 9 | 10 | 15 | 16 | -------------------------------------------------------------------------------- /examples/we/index.we: -------------------------------------------------------------------------------- 1 | 10 | 11 | 29 | 30 | -------------------------------------------------------------------------------- /examples/web-entry/index.js: -------------------------------------------------------------------------------- 1 | var App = require('../index.vue') 2 | App.el = '#root' 3 | new Vue(App) 4 | -------------------------------------------------------------------------------- /index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | Weex Vue Demo 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 |
22 | 45 | 46 | 47 | -------------------------------------------------------------------------------- /ios/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIdentifier 10 | $(PRODUCT_BUNDLE_IDENTIFIER) 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | $(PRODUCT_NAME) 15 | CFBundlePackageType 16 | FMWK 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleVersion 20 | $(CURRENT_PROJECT_VERSION) 21 | NSPrincipalClass 22 | 23 | 24 | 25 | -------------------------------------------------------------------------------- /ios/Podfile: -------------------------------------------------------------------------------- 1 | source 'https://github.com/CocoaPods/Specs.git' 2 | platform :ios, '7.0' 3 | #inhibit_all_warnings! 4 | 5 | def common 6 | pod 'WeexSDK' 7 | pod 'WeexPluginLoader' 8 | end 9 | 10 | target 'WeexPicker' do 11 | common 12 | end 13 | 14 | 15 | -------------------------------------------------------------------------------- /ios/Sources/WeexPickerModule.h: -------------------------------------------------------------------------------- 1 | // 2 | // WeexPickerModule.h 3 | // WeexPluginTemp 4 | // 5 | // Created by 齐山 on 17/3/14. 6 | // Copyright © 2017年 taobao. All rights reserved. 7 | // 8 | 9 | #import 10 | #import 11 | 12 | @interface WeexPickerModule : NSObject 13 | 14 | @end 15 | -------------------------------------------------------------------------------- /ios/Sources/WeexPickerModule.m: -------------------------------------------------------------------------------- 1 | // 2 | // WeexPickerModule.m 3 | // WeexPluginTemp 4 | // 5 | // Created by on 17/3/14. 6 | // Copyright © 2017年 . All rights reserved. 7 | // 8 | 9 | #import "WeexPickerModule.h" 10 | #import 11 | 12 | @implementation WeexPickerModule 13 | 14 | WX_PlUGIN_EXPORT_MODULE(weexPicker, WeexPickerModule) 15 | WX_EXPORT_METHOD(@selector(show)) 16 | 17 | /** 18 | create actionsheet 19 | 20 | @param options items 21 | @param callback 22 | */ 23 | -(void)show 24 | { 25 | UIAlertView *alertview = [[UIAlertView alloc] initWithTitle:@"title" message:@"module weexPicker is created sucessfully" delegate:self cancelButtonTitle:@"cancel" otherButtonTitles:@"ok", nil]; 26 | [alertview show]; 27 | 28 | } 29 | 30 | @end 31 | -------------------------------------------------------------------------------- /js/src/TimePicker.js: -------------------------------------------------------------------------------- 1 | import Picker from './Picker' 2 | import moment from 'moment' 3 | const createData = function () { 4 | const hour = [] 5 | const moment = [] 6 | let i = 0 7 | for (i = 0; i < 24; i++) { 8 | if (i < 10) { 9 | hour.push('0' + i) 10 | } else { 11 | hour.push(i + '') 12 | } 13 | } 14 | for (i = 0; i < 60; i++) { 15 | if (i < 10) { 16 | moment.push('0' + i) 17 | } else { 18 | moment.push(i + '') 19 | } 20 | } 21 | return [hour, moment] 22 | } 23 | const inputData = createData(); 24 | const getDefaultIndexs = function (time) { 25 | const hour = time.format('HH') 26 | const moment = time.format('mm') 27 | const result = [0, 0] 28 | let i = 0 29 | for (i = 0; i < inputData[0].length; i++) { 30 | if (hour === inputData[0][i]) { 31 | result[0] = i 32 | } 33 | } 34 | for (i = 0; i < inputData[1].length; i++) { 35 | if (moment === inputData[1][i]) { 36 | result[1] = i 37 | } 38 | } 39 | return result 40 | } 41 | const formateResult = function (data, indexs) { 42 | const hour = data[0][indexs[0]] 43 | const moment = data[1][indexs[1]] 44 | return hour + ':' + moment 45 | } 46 | export default function (configs) { 47 | const time = moment(configs.value || new Date(), 'HH:mm') 48 | const value = getDefaultIndexs(time) 49 | configs.defaultIndexs = value 50 | configs.formateResult = formateResult 51 | configs.data = inputData 52 | return new Picker(configs) 53 | } 54 | -------------------------------------------------------------------------------- /js/src/index.js: -------------------------------------------------------------------------------- 1 | import Picker from './Picker' 2 | import moment from 'moment' 3 | import TimePicker from './TimePicker' 4 | import Pikaday from 'pikaday' 5 | const pickerModule = { 6 | pick: function (options, confirmCallback, cancelCallback) { 7 | options.height = weex && weex.config.env.scale && options.height ? +options.height.replace('px','') / weex.config.env.scale : options.height 8 | options.data = options.items 9 | options.defaultIndexs = options.index 10 | options.confirmCallback = confirmCallback 11 | options.cancelCallback = cancelCallback 12 | options.sender = this.sender 13 | new Picker(options) 14 | }, 15 | pickDate: function (options, confirmCallback) { 16 | const mask = document.createElement('div') 17 | mask.className = 'weex-picker-mask' 18 | const self = this 19 | const i18n = { 20 | previousMonth: 'Previous Month', 21 | nextMonth: 'Next Month', 22 | months: ['January', 'February', 'March', 'April', 'May', 'June', 'July', 'August', 'September', 'October', 'November', 'December'], 23 | weekdays: ['Sunday', 'Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday'], 24 | weekdaysShort: ['Sun', 'Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat'] 25 | } 26 | 27 | //options see https://github.com/dbushell/Pikaday#configuration. 28 | const picker = new Pikaday({ 29 | field: options.field, 30 | trigger: options.trigger, 31 | bound: options.bound, 32 | ariaLabel: options.ariaLabel, 33 | position: options.position, 34 | reposition: options.reposition, 35 | container: options.container, 36 | formatStrict: options.formatStrict, 37 | toString: options.toString, 38 | parse: options.parse, 39 | firstDay: options.firstDay || null, 40 | disableWeekends: options.disableWeekends || false, 41 | disableDayFn: options.disableDayFn, 42 | yearRange: options.yearRange || [1900, 2050], 43 | showWeekNumber: options.showWeekNumber || false, 44 | pickWholeWeek: options.pickWholeWeek || false, 45 | isRTL: options.isRTL, 46 | i18n: options.i18n || i18n, 47 | yearSuffix: options.yearSuffix || '', 48 | showMonthAfterYear: options.showMonthAfterYear, 49 | showDaysInNextAndPreviousMonths: options.showDaysInNextAndPreviousMonths, 50 | enableSelectionDaysInNextAndPreviousMonths: options.enableSelectionDaysInNextAndPreviousMonths, 51 | numberOfMonths: options.numberOfMonths, 52 | mainCalendar: options.mainCalendar, 53 | events: options.events || [], 54 | theme: options.theme || null, 55 | blurFieldOnSelect: options.blurFieldOnSelect, 56 | onOpen: options.onOpen, 57 | onClose: options.onClose, 58 | onDraw: options.onDraw, 59 | keyboardInput: options.keyboardInput, 60 | defaultDate: moment(options.value, 'YYYY-MM-DD').toDate(), 61 | setDefaultDate: moment(options.value, 'YYYY-MM-DD').toDate(), 62 | format: 'YYYY-MM-DD', 63 | minDate: moment(options.min, 'YYYY-MM-DD').toDate(), 64 | maxDate: moment(options.max, 'YYYY-MM-DD').toDate(), 65 | onSelect: function (date) { 66 | confirmCallback && self.sender.performCallback(confirmCallback, { 67 | result: 'success', 68 | data: moment(date).format('YYYY-MM-DD') 69 | }) 70 | picker.destroy() 71 | mask.parentNode.removeChild(mask) 72 | } 73 | }) 74 | mask.appendChild(picker.el) 75 | document.body.appendChild(mask) 76 | }, 77 | pickTime: function (options, confirmCallback) { 78 | options.height = weex && weex.config.env.scale && options.height ? +options.height.replace('px','') / weex.config.env.scale : options.height 79 | options.value = options.value; 80 | options.confirmCallback = confirmCallback; 81 | options.sender = this.sender; 82 | new TimePicker(options); 83 | } 84 | } 85 | const meta = { 86 | picker: [{ 87 | name: 'pick', 88 | args: ['object', 'function'] 89 | }, { 90 | name: 'pickDate', 91 | args: ['object', 'function'] 92 | }, { 93 | name: 'pickTime', 94 | args: ['object', 'function'] 95 | }] 96 | } 97 | export default { 98 | init: function (Weex) { 99 | Weex.registerApiModule('picker', pickerModule, meta) 100 | } 101 | } 102 | -------------------------------------------------------------------------------- /js/src/pluginstall.js: -------------------------------------------------------------------------------- 1 | import picker from "./index"; 2 | if (window.Weex) { 3 | Weex.install(picker); 4 | } else if (window.weex) { 5 | weex.install(picker); 6 | } 7 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "@weex-project/weex-picker", 3 | "version": "0.2.3", 4 | "description": "weex picker extend", 5 | "license": "Apache-2.0", 6 | "author": { 7 | "name": "erha19" 8 | }, 9 | "repository": { 10 | "type": "git", 11 | "url": "git@github.com:weexteam/weex-picker.git" 12 | }, 13 | "homepage": "http://weexteam.github.io/weex-picker/", 14 | "bugs": { 15 | "url": "https://github.com/weexteam/weex-picker/issues" 16 | }, 17 | "main": "js/build/index.js", 18 | "WeexSDKVersoin": "0.10.0", 19 | "//": "android工程安装配置", 20 | "ios": { 21 | "//": "安装类型为pod", 22 | "type": "pod", 23 | "name": "WeexPicker", 24 | "version:": "0.0.1" 25 | }, 26 | "android": { 27 | "//": "安装类型为maven", 28 | "type": "maven", 29 | "groupId": "org.weex.plugin", 30 | "name": "weexpicker", 31 | "version:": "0.0.1" 32 | }, 33 | "keywords": [ 34 | "weex", 35 | "hybrid", 36 | "webcomponent", 37 | "appframework", 38 | "mvvm", 39 | "javascript", 40 | "webkit", 41 | "v8", 42 | "jscore", 43 | "html5", 44 | "android", 45 | "ios", 46 | "yunos" 47 | ], 48 | "engines": { 49 | "node": ">=4" 50 | }, 51 | "scripts": { 52 | "dev": "webpack --watch --config build/webpack.config.js", 53 | "build": "webpack --config build/webpack.config.js", 54 | "dev:examples": "webpack --watch --config build/webpack.examples.js", 55 | "build:examples": "webpack --config build/webpack.examples.js", 56 | "copy:examples": "rm -rf .examples/android/app/src/main/assets/* && cp -vrf ./examples/build/* ./android/app/src/main/assets/ &&rm -rf .examples/ios/bundlejs/* && cp -vrf ./examples/build/* .examples/ios/bundles/", 57 | "lint": "eslint html5", 58 | "serve": "serve ./ -p 12580" 59 | }, 60 | "dependencies": { 61 | "animationjs": "^0.1.5", 62 | "core-js": "^2.4.0", 63 | "cubicbezier": "^0.1.1", 64 | "envd": "^0.1.1", 65 | "httpurl": "^0.1.1", 66 | "lazyimg": "^0.1.5", 67 | "modals": "^0.1.6", 68 | "query-string": "^4.2.3", 69 | "scroll-to": "0.0.2", 70 | "semver": "^5.1.0", 71 | "weex-components": "^0.2.0", 72 | "weex-picker": "^0.1.0", 73 | "weex-rax-framework": "0.0.10", 74 | "weex-vue-framework": "2.1.8-weex.1", 75 | "iscroll": "^5.2.0", 76 | "moment": "^2.17.1", 77 | "pikaday": "^1.5.1" 78 | }, 79 | "devDependencies": { 80 | "babel-core": "^6.17.0", 81 | "babel-istanbul": "^0.11.0", 82 | "babel-loader": "^6.2.5", 83 | "babel-preset-es2015": "^6.16.0", 84 | "babel-runtime": "^6.11.6", 85 | "babel-eslint": "^7.1.1", 86 | "cross-spawn": "^4.0.0", 87 | "eslint": "^2.11.1", 88 | "http-server": "^0.9.0", 89 | "json-loader": "^0.5.4", 90 | "reify": "^0.3.8", 91 | "rollup": "^0.36.0", 92 | "rollup-plugin-buble": "^0.14.0", 93 | "rollup-plugin-commonjs": "^5.0.4", 94 | "rollup-plugin-eslint": "^3.0.0", 95 | "rollup-plugin-json": "^2.0.2", 96 | "rollup-plugin-node-resolve": "^2.0.0", 97 | "rollup-plugin-postcss": "^0.2.0", 98 | "rollup-plugin-replace": "^1.1.1", 99 | "rollup-plugin-uglify": "^1.0.1", 100 | "rollup-watch": "^2.5.0", 101 | "serve": "^1.4.0", 102 | "sinon": "^1.17.4", 103 | "sinon-chai": "^2.8.0", 104 | "uglify-js": "^2.6.4", 105 | "webpack": "^1.13.1", 106 | "weex-loader": "^0.4.0", 107 | "weex-vdom-tester": "^0.2.0", 108 | "style-loader": "^0.13.1", 109 | "vue-loader": "^10.3.0", 110 | "css-loader": "^0.26.1", 111 | "vue": "^2.1.10", 112 | "vue-template-compiler": "^2.1.10" 113 | } 114 | } -------------------------------------------------------------------------------- /playground/android/app/build.gradle: -------------------------------------------------------------------------------- 1 | apply plugin: 'com.android.application' 2 | 3 | android { 4 | compileSdkVersion 25 5 | buildToolsVersion "25.0.2" 6 | defaultConfig { 7 | applicationId "org.weex.demo" 8 | minSdkVersion 14 9 | targetSdkVersion 25 10 | versionCode 1 11 | versionName "1.0" 12 | testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner" 13 | 14 | ndk{ 15 | abiFilters "x86" 16 | abiFilters "armeabi" 17 | } 18 | } 19 | buildTypes { 20 | release { 21 | minifyEnabled false 22 | proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' 23 | } 24 | } 25 | sourceSets { 26 | main { 27 | java { 28 | srcDirs = ["src/main/java", "src/main/java_zxing","src/main/java_commons"]; 29 | } 30 | } 31 | } 32 | } 33 | 34 | dependencies { 35 | compile fileTree(dir: 'libs', include: ['*.jar']) 36 | 37 | androidTestCompile "com.android.support:support-annotations:${rootProject.ext.androidSupportVersion}" 38 | androidTestCompile 'junit:junit:4.12' 39 | androidTestCompile 'com.android.support.test.espresso:espresso-core:2.2.2' 40 | androidTestCompile('com.android.support.test.espresso:espresso-contrib:2.2.2', { 41 | exclude group: 'com.android.support', module: 'support-annotations' 42 | exclude group: 'com.android.support', module: 'support-v4' 43 | exclude group: 'com.android.support', module: 'design' 44 | exclude group: 'com.android.support', module: 'appcompat-v7' 45 | exclude group: 'com.android.support', module: 'recyclerview-v7' 46 | }) 47 | androidTestCompile 'com.android.support.test:runner:0.5' 48 | androidTestCompile 'com.squareup.picasso:picasso:2.5.2' 49 | androidTestCompile 'org.hamcrest:hamcrest-library:1.3' 50 | 51 | debugCompile 'com.taobao.android:weex_analyzer:0.1.0.5' 52 | 53 | compile 'com.squareup.picasso:picasso:2.5.2' 54 | compile ('com.facebook.fresco:fresco:0.10.0') 55 | compile 'com.squareup.okhttp:okhttp:2.3.0' 56 | compile 'com.squareup.okhttp:okhttp-ws:2.3.0' 57 | compile 'com.squareup.okio:okio:1.0.1' 58 | compile 'com.alibaba:fastjson:1.1.46.android' 59 | compile "com.android.support:support-v4:${rootProject.ext.androidSupportVersion}" 60 | compile "com.android.support:appcompat-v7:${rootProject.ext.androidSupportVersion}" 61 | compile "com.android.support:design:${rootProject.ext.androidSupportVersion}" 62 | compile "com.android.support:support-annotations:${rootProject.ext.androidSupportVersion}" 63 | compile 'com.jakewharton.scalpel:scalpel:1.1.2' 64 | compile 'com.android.support.test.espresso:espresso-idling-resource:2.2.2' 65 | compile 'com.taobao.android.weex_inspection:urlconnection_interceptor:1.0.0@aar' 66 | compile 'com.taobao.android:weex_inspector:0.10.0.5@aar' 67 | 68 | compile ('com.taobao.android:weex_debug:0.0.1@aar') { 69 | transitive = false 70 | } 71 | compile "com.taobao.android:weex_sdk:${rootProject.ext.weex_sdk}" 72 | compile 'com.alibaba:fastjson:1.1.46.android' 73 | compile 'org.weex.plugin:plugin-loader:1.0.0' 74 | compile project(path: ':library') 75 | } 76 | -------------------------------------------------------------------------------- /playground/android/app/proguard-rules.pro: -------------------------------------------------------------------------------- 1 | # Add project specific ProGuard rules here. 2 | # By default, the flags in this file are appended to flags specified 3 | # in /Users/moxun/Library/Android/sdk/tools/proguard/proguard-android.txt 4 | # You can edit the include path and order by changing the proguardFiles 5 | # directive in build.gradle. 6 | # 7 | # For more details, see 8 | # http://developer.android.com/guide/developing/tools/proguard.html 9 | 10 | # Add any project specific keep options here: 11 | 12 | # If your project uses WebView with JS, uncomment the following 13 | # and specify the fully qualified class name to the JavaScript interface 14 | # class: 15 | #-keepclassmembers class fqcn.of.javascript.interface.for.webview { 16 | # public *; 17 | #} 18 | -------------------------------------------------------------------------------- /playground/android/app/src/androidTest/java/org/weex/demo/ExampleInstrumentedTest.java: -------------------------------------------------------------------------------- 1 | package com.taobao.weex.demo; 2 | 3 | import android.content.Context; 4 | import android.support.test.InstrumentationRegistry; 5 | import android.support.test.runner.AndroidJUnit4; 6 | 7 | import org.junit.Test; 8 | import org.junit.runner.RunWith; 9 | 10 | import static org.junit.Assert.*; 11 | 12 | /** 13 | * Instrumentation test, which will execute on an Android device. 14 | * 15 | * @see Testing documentation 16 | */ 17 | @RunWith(AndroidJUnit4.class) 18 | public class ExampleInstrumentedTest { 19 | @Test 20 | public void useAppContext() throws Exception { 21 | // Context of the app under test. 22 | Context appContext = InstrumentationRegistry.getTargetContext(); 23 | 24 | assertEquals("com.taobao.weex.actionsheet", appContext.getPackageName()); 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /playground/android/app/src/main/res/layout/activity_main.xml: -------------------------------------------------------------------------------- 1 | 2 | 13 | 14 | 19 | 20 | -------------------------------------------------------------------------------- /playground/android/app/src/main/res/mipmap-hdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/weexteam/picker-for-Apache-Weex/9c29f07cd221f6e83e0a0f05388e3a2b40d2010b/playground/android/app/src/main/res/mipmap-hdpi/ic_launcher.png -------------------------------------------------------------------------------- /playground/android/app/src/main/res/mipmap-mdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/weexteam/picker-for-Apache-Weex/9c29f07cd221f6e83e0a0f05388e3a2b40d2010b/playground/android/app/src/main/res/mipmap-mdpi/ic_launcher.png -------------------------------------------------------------------------------- /playground/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/weexteam/picker-for-Apache-Weex/9c29f07cd221f6e83e0a0f05388e3a2b40d2010b/playground/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png -------------------------------------------------------------------------------- /playground/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/weexteam/picker-for-Apache-Weex/9c29f07cd221f6e83e0a0f05388e3a2b40d2010b/playground/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /playground/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/weexteam/picker-for-Apache-Weex/9c29f07cd221f6e83e0a0f05388e3a2b40d2010b/playground/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /playground/android/app/src/main/res/values-w820dp/dimens.xml: -------------------------------------------------------------------------------- 1 | 2 | 5 | 64dp 6 | 7 | -------------------------------------------------------------------------------- /playground/android/app/src/main/res/values/colors.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | #3F51B5 4 | #303F9F 5 | #FF4081 6 | 7 | #66000000 8 | 9 | -------------------------------------------------------------------------------- /playground/android/app/src/main/res/values/dimens.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 16dp 4 | 160dp 5 | 6 | 16dp 7 | 16dp 8 | 16dp 9 | 16dp 10 | 11 | -------------------------------------------------------------------------------- /playground/android/app/src/main/res/values/strings.xml: -------------------------------------------------------------------------------- 1 | 2 | WEEX 3 | 4 | Open navigation drawer 5 | Close navigation drawer 6 | 7 | Settings 8 | Hello blank fragment 9 | Main2Activity 10 | WXMainActivity 11 | 12 | SplashActivity 13 | Dummy Button 14 | WEEX\nPLAYGROUND 15 | 16 | Sorry, your current device is x86 architecture.\n We only 17 | support arm architecture devices! 18 | 19 | 20 | Network Error!\n1.Make sure you use the command "npm run serve" 21 | launched local service\n2.Make sure you modify "your_current_ip" to your local IP in 22 | "WXMainActivity" 23 | 24 | DynamicActivity 25 | 26 | -------------------------------------------------------------------------------- /playground/android/app/src/main/res/values/styles.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 10 | 11 | 15 | 16 | 27 | 28 | 31 | 32 | 33 | -------------------------------------------------------------------------------- /playground/android/app/src/test/java/org/weex/demo/ExampleUnitTest.java: -------------------------------------------------------------------------------- 1 | package com.taobao.weex.demo; 2 | 3 | import org.junit.Test; 4 | 5 | import static org.junit.Assert.*; 6 | 7 | /** 8 | * Example local unit test, which will execute on the development machine (host). 9 | * 10 | * @see Testing documentation 11 | */ 12 | public class ExampleUnitTest { 13 | @Test 14 | public void addition_isCorrect() throws Exception { 15 | assertEquals(4, 2 + 2); 16 | } 17 | } -------------------------------------------------------------------------------- /playground/android/build.gradle: -------------------------------------------------------------------------------- 1 | // Top-level build file where you can add configuration options common to all sub-projects/modules. 2 | 3 | buildscript { 4 | repositories { 5 | jcenter() 6 | } 7 | dependencies { 8 | classpath 'com.android.tools.build:gradle:2.2.3' 9 | 10 | // NOTE: Do not place your application dependencies here; they belong 11 | // in the individual module build.gradle files 12 | } 13 | } 14 | 15 | allprojects { 16 | repositories { 17 | jcenter() 18 | maven { url 'http://mvnrepo.alibaba-inc.com/mvn/repository' } 19 | maven { url 'http://mvnrepo.alibaba-inc.com/mvn/snapshots'} 20 | } 21 | } 22 | 23 | task clean(type: Delete) { 24 | delete rootProject.buildDir 25 | } 26 | 27 | ext { 28 | androidSupportVersion = "25.2.0" 29 | weex_sdk = "0.10.0" 30 | } 31 | -------------------------------------------------------------------------------- /playground/android/gradle.properties: -------------------------------------------------------------------------------- 1 | # Project-wide Gradle settings. 2 | 3 | # IDE (e.g. Android Studio) users: 4 | # Gradle settings configured through the IDE *will override* 5 | # any settings specified in this file. 6 | 7 | # For more details on how to configure your build environment visit 8 | # http://www.gradle.org/docs/current/userguide/build_environment.html 9 | 10 | # Specifies the JVM arguments used for the daemon process. 11 | # The setting is particularly useful for tweaking memory settings. 12 | org.gradle.jvmargs=-Xmx1536m 13 | 14 | # When configured, Gradle will run in incubating parallel mode. 15 | # This option should only be used with decoupled projects. More details, visit 16 | # http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects 17 | # org.gradle.parallel=true 18 | -------------------------------------------------------------------------------- /playground/android/gradle/wrapper/gradle-wrapper.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/weexteam/picker-for-Apache-Weex/9c29f07cd221f6e83e0a0f05388e3a2b40d2010b/playground/android/gradle/wrapper/gradle-wrapper.jar -------------------------------------------------------------------------------- /playground/android/gradle/wrapper/gradle-wrapper.properties: -------------------------------------------------------------------------------- 1 | #Mon Dec 28 10:00:20 PST 2015 2 | distributionBase=GRADLE_USER_HOME 3 | distributionPath=wrapper/dists 4 | zipStoreBase=GRADLE_USER_HOME 5 | zipStorePath=wrapper/dists 6 | distributionUrl=https\://services.gradle.org/distributions/gradle-2.14.1-all.zip 7 | -------------------------------------------------------------------------------- /playground/android/gradlew.bat: -------------------------------------------------------------------------------- 1 | @if "%DEBUG%" == "" @echo off 2 | @rem ########################################################################## 3 | @rem 4 | @rem Gradle startup script for Windows 5 | @rem 6 | @rem ########################################################################## 7 | 8 | @rem Set local scope for the variables with windows NT shell 9 | if "%OS%"=="Windows_NT" setlocal 10 | 11 | @rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. 12 | set DEFAULT_JVM_OPTS= 13 | 14 | set DIRNAME=%~dp0 15 | if "%DIRNAME%" == "" set DIRNAME=. 16 | set APP_BASE_NAME=%~n0 17 | set APP_HOME=%DIRNAME% 18 | 19 | @rem Find java.exe 20 | if defined JAVA_HOME goto findJavaFromJavaHome 21 | 22 | set JAVA_EXE=java.exe 23 | %JAVA_EXE% -version >NUL 2>&1 24 | if "%ERRORLEVEL%" == "0" goto init 25 | 26 | echo. 27 | echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. 28 | echo. 29 | echo Please set the JAVA_HOME variable in your environment to match the 30 | echo location of your Java installation. 31 | 32 | goto fail 33 | 34 | :findJavaFromJavaHome 35 | set JAVA_HOME=%JAVA_HOME:"=% 36 | set JAVA_EXE=%JAVA_HOME%/bin/java.exe 37 | 38 | if exist "%JAVA_EXE%" goto init 39 | 40 | echo. 41 | echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% 42 | echo. 43 | echo Please set the JAVA_HOME variable in your environment to match the 44 | echo location of your Java installation. 45 | 46 | goto fail 47 | 48 | :init 49 | @rem Get command-line arguments, handling Windowz variants 50 | 51 | if not "%OS%" == "Windows_NT" goto win9xME_args 52 | if "%@eval[2+2]" == "4" goto 4NT_args 53 | 54 | :win9xME_args 55 | @rem Slurp the command line arguments. 56 | set CMD_LINE_ARGS= 57 | set _SKIP=2 58 | 59 | :win9xME_args_slurp 60 | if "x%~1" == "x" goto execute 61 | 62 | set CMD_LINE_ARGS=%* 63 | goto execute 64 | 65 | :4NT_args 66 | @rem Get arguments from the 4NT Shell from JP Software 67 | set CMD_LINE_ARGS=%$ 68 | 69 | :execute 70 | @rem Setup the command line 71 | 72 | set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar 73 | 74 | @rem Execute Gradle 75 | "%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS% 76 | 77 | :end 78 | @rem End local scope for the variables with windows NT shell 79 | if "%ERRORLEVEL%"=="0" goto mainEnd 80 | 81 | :fail 82 | rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of 83 | rem the _cmd.exe /c_ return code! 84 | if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1 85 | exit /b 1 86 | 87 | :mainEnd 88 | if "%OS%"=="Windows_NT" endlocal 89 | 90 | :omega 91 | -------------------------------------------------------------------------------- /playground/android/settings.gradle: -------------------------------------------------------------------------------- 1 | include ':app' 2 | 3 | include ":library" 4 | project (':library').projectDir = new File("../../android/library") -------------------------------------------------------------------------------- /playground/browser/index-vue.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Weex Vue Demo 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 |
20 | 43 | 44 | 45 | -------------------------------------------------------------------------------- /playground/browser/index-we.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | Weex HTML5 7 | 8 | 9 | 10 | 11 | 17 | 18 | 21 | 22 | 23 | 24 | 25 |
26 | 63 | 64 | 65 | 66 | -------------------------------------------------------------------------------- /playground/browser/pluginInstall.js: -------------------------------------------------------------------------------- 1 | import picker from "../../js/src" 2 | if (window.Weex) { 3 | Weex.install(picker); 4 | } else if (window.weex) { 5 | weex.install(picker); 6 | } -------------------------------------------------------------------------------- /playground/browser/weex-vue-render/README.md: -------------------------------------------------------------------------------- 1 | # Vue Components for Weex 2 | 3 | This is a group of Vue 2.x components for Weex, which have the same behavior with the Weex built-in components on the native. 4 | 5 | It can be run on browser only based on Vue 2.x (without Weex). 6 | -------------------------------------------------------------------------------- /playground/browser/weex-vue-render/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "weex-vue-render", 3 | "version": "0.2.0", 4 | "description": "Weex built-in components for Vue 2.x.", 5 | "license": "Apache-2.0", 6 | "main": "index.js", 7 | "repository": { 8 | "type": "git", 9 | "url": "git@github.com:alibaba/weex.git" 10 | }, 11 | "homepage": "http://alibaba.github.io/weex/", 12 | "bugs": { 13 | "url": "https://github.com/alibaba/weex/issues" 14 | }, 15 | "keywords": [ 16 | "weex", 17 | "vue", 18 | "web", 19 | "component" 20 | ], 21 | "peerDependencies": { 22 | "vue": "^2.1.5" 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /playground/ios/Podfile: -------------------------------------------------------------------------------- 1 | source 'https://github.com/CocoaPods/Specs.git' 2 | platform :ios, '7.0' 3 | #inhibit_all_warnings! 4 | 5 | def common 6 | pod 'WeexSDK' 7 | pod 'WXDevtool', '0.9.5' 8 | pod 'SDWebImage', '3.7.5' 9 | pod 'SocketRocket', '0.4.2' 10 | pod 'ATSDK-Weex', '0.0.1' 11 | pod 'WeexPicker', :path=>'../../' 12 | pod 'WeexPluginLoader' 13 | end 14 | 15 | target 'WeexDemo' do 16 | common 17 | end 18 | 19 | -------------------------------------------------------------------------------- /playground/ios/README.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/weexteam/picker-for-Apache-Weex/9c29f07cd221f6e83e0a0f05388e3a2b40d2010b/playground/ios/README.md -------------------------------------------------------------------------------- /playground/ios/WeexDemo/AppDelegate.h: -------------------------------------------------------------------------------- 1 | /** 2 | * Created by Weex. 3 | * Copyright (c) 2016, Alibaba, Inc. All rights reserved. 4 | * 5 | * This source code is licensed under the Apache Licence 2.0. 6 | * For the full copyright and license information,please view the LICENSE file in the root directory of this source tree. 7 | */ 8 | 9 | #import 10 | 11 | 12 | @interface AppDelegate : UIResponder 13 | 14 | @property (strong, nonatomic) UIWindow *window; 15 | @property (strong, nonatomic) NSString *latestVer; 16 | 17 | @end 18 | -------------------------------------------------------------------------------- /playground/ios/WeexDemo/Assets.xcassets/AppIcon.appiconset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "iphone", 5 | "size" : "20x20", 6 | "scale" : "2x" 7 | }, 8 | { 9 | "idiom" : "iphone", 10 | "size" : "20x20", 11 | "scale" : "3x" 12 | }, 13 | { 14 | "size" : "29x29", 15 | "idiom" : "iphone", 16 | "filename" : "Icon-29@2x.png", 17 | "scale" : "2x" 18 | }, 19 | { 20 | "size" : "29x29", 21 | "idiom" : "iphone", 22 | "filename" : "Icon-29@3x.png", 23 | "scale" : "3x" 24 | }, 25 | { 26 | "size" : "40x40", 27 | "idiom" : "iphone", 28 | "filename" : "Icon-40@2x-1.png", 29 | "scale" : "2x" 30 | }, 31 | { 32 | "size" : "40x40", 33 | "idiom" : "iphone", 34 | "filename" : "Icon-40@3x.png", 35 | "scale" : "3x" 36 | }, 37 | { 38 | "size" : "60x60", 39 | "idiom" : "iphone", 40 | "filename" : "Icon-60@2x.png", 41 | "scale" : "2x" 42 | }, 43 | { 44 | "size" : "60x60", 45 | "idiom" : "iphone", 46 | "filename" : "Icon-60@3x.png", 47 | "scale" : "3x" 48 | }, 49 | { 50 | "idiom" : "ipad", 51 | "size" : "20x20", 52 | "scale" : "1x" 53 | }, 54 | { 55 | "idiom" : "ipad", 56 | "size" : "20x20", 57 | "scale" : "2x" 58 | }, 59 | { 60 | "size" : "29x29", 61 | "idiom" : "ipad", 62 | "filename" : "Icon-29.png", 63 | "scale" : "1x" 64 | }, 65 | { 66 | "size" : "29x29", 67 | "idiom" : "ipad", 68 | "filename" : "Icon-29@2x-1.png", 69 | "scale" : "2x" 70 | }, 71 | { 72 | "size" : "40x40", 73 | "idiom" : "ipad", 74 | "filename" : "Icon-40.png", 75 | "scale" : "1x" 76 | }, 77 | { 78 | "size" : "40x40", 79 | "idiom" : "ipad", 80 | "filename" : "Icon-40@2x.png", 81 | "scale" : "2x" 82 | }, 83 | { 84 | "size" : "76x76", 85 | "idiom" : "ipad", 86 | "filename" : "Icon-76.png", 87 | "scale" : "1x" 88 | }, 89 | { 90 | "size" : "76x76", 91 | "idiom" : "ipad", 92 | "filename" : "Icon-76@2x.png", 93 | "scale" : "2x" 94 | }, 95 | { 96 | "size" : "83.5x83.5", 97 | "idiom" : "ipad", 98 | "filename" : "Icon-83.5@2x.png", 99 | "scale" : "2x" 100 | } 101 | ], 102 | "info" : { 103 | "version" : 1, 104 | "author" : "xcode" 105 | } 106 | } -------------------------------------------------------------------------------- /playground/ios/WeexDemo/Assets.xcassets/AppIcon.appiconset/Icon-29.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/weexteam/picker-for-Apache-Weex/9c29f07cd221f6e83e0a0f05388e3a2b40d2010b/playground/ios/WeexDemo/Assets.xcassets/AppIcon.appiconset/Icon-29.png -------------------------------------------------------------------------------- /playground/ios/WeexDemo/Assets.xcassets/AppIcon.appiconset/Icon-29@2x-1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/weexteam/picker-for-Apache-Weex/9c29f07cd221f6e83e0a0f05388e3a2b40d2010b/playground/ios/WeexDemo/Assets.xcassets/AppIcon.appiconset/Icon-29@2x-1.png -------------------------------------------------------------------------------- /playground/ios/WeexDemo/Assets.xcassets/AppIcon.appiconset/Icon-29@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/weexteam/picker-for-Apache-Weex/9c29f07cd221f6e83e0a0f05388e3a2b40d2010b/playground/ios/WeexDemo/Assets.xcassets/AppIcon.appiconset/Icon-29@2x.png -------------------------------------------------------------------------------- /playground/ios/WeexDemo/Assets.xcassets/AppIcon.appiconset/Icon-29@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/weexteam/picker-for-Apache-Weex/9c29f07cd221f6e83e0a0f05388e3a2b40d2010b/playground/ios/WeexDemo/Assets.xcassets/AppIcon.appiconset/Icon-29@3x.png -------------------------------------------------------------------------------- /playground/ios/WeexDemo/Assets.xcassets/AppIcon.appiconset/Icon-40.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/weexteam/picker-for-Apache-Weex/9c29f07cd221f6e83e0a0f05388e3a2b40d2010b/playground/ios/WeexDemo/Assets.xcassets/AppIcon.appiconset/Icon-40.png -------------------------------------------------------------------------------- /playground/ios/WeexDemo/Assets.xcassets/AppIcon.appiconset/Icon-40@2x-1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/weexteam/picker-for-Apache-Weex/9c29f07cd221f6e83e0a0f05388e3a2b40d2010b/playground/ios/WeexDemo/Assets.xcassets/AppIcon.appiconset/Icon-40@2x-1.png -------------------------------------------------------------------------------- /playground/ios/WeexDemo/Assets.xcassets/AppIcon.appiconset/Icon-40@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/weexteam/picker-for-Apache-Weex/9c29f07cd221f6e83e0a0f05388e3a2b40d2010b/playground/ios/WeexDemo/Assets.xcassets/AppIcon.appiconset/Icon-40@2x.png -------------------------------------------------------------------------------- /playground/ios/WeexDemo/Assets.xcassets/AppIcon.appiconset/Icon-40@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/weexteam/picker-for-Apache-Weex/9c29f07cd221f6e83e0a0f05388e3a2b40d2010b/playground/ios/WeexDemo/Assets.xcassets/AppIcon.appiconset/Icon-40@3x.png -------------------------------------------------------------------------------- /playground/ios/WeexDemo/Assets.xcassets/AppIcon.appiconset/Icon-60@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/weexteam/picker-for-Apache-Weex/9c29f07cd221f6e83e0a0f05388e3a2b40d2010b/playground/ios/WeexDemo/Assets.xcassets/AppIcon.appiconset/Icon-60@2x.png -------------------------------------------------------------------------------- /playground/ios/WeexDemo/Assets.xcassets/AppIcon.appiconset/Icon-60@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/weexteam/picker-for-Apache-Weex/9c29f07cd221f6e83e0a0f05388e3a2b40d2010b/playground/ios/WeexDemo/Assets.xcassets/AppIcon.appiconset/Icon-60@3x.png -------------------------------------------------------------------------------- /playground/ios/WeexDemo/Assets.xcassets/AppIcon.appiconset/Icon-76.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/weexteam/picker-for-Apache-Weex/9c29f07cd221f6e83e0a0f05388e3a2b40d2010b/playground/ios/WeexDemo/Assets.xcassets/AppIcon.appiconset/Icon-76.png -------------------------------------------------------------------------------- /playground/ios/WeexDemo/Assets.xcassets/AppIcon.appiconset/Icon-76@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/weexteam/picker-for-Apache-Weex/9c29f07cd221f6e83e0a0f05388e3a2b40d2010b/playground/ios/WeexDemo/Assets.xcassets/AppIcon.appiconset/Icon-76@2x.png -------------------------------------------------------------------------------- /playground/ios/WeexDemo/Assets.xcassets/AppIcon.appiconset/Icon-83.5@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/weexteam/picker-for-Apache-Weex/9c29f07cd221f6e83e0a0f05388e3a2b40d2010b/playground/ios/WeexDemo/Assets.xcassets/AppIcon.appiconset/Icon-83.5@2x.png -------------------------------------------------------------------------------- /playground/ios/WeexDemo/Assets.xcassets/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "info" : { 3 | "version" : 1, 4 | "author" : "xcode" 5 | } 6 | } -------------------------------------------------------------------------------- /playground/ios/WeexDemo/Assets.xcassets/LaunchImage.launchimage/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "extent" : "full-screen", 5 | "idiom" : "iphone", 6 | "subtype" : "736h", 7 | "filename" : "Default@3x.png", 8 | "minimum-system-version" : "8.0", 9 | "orientation" : "portrait", 10 | "scale" : "3x" 11 | }, 12 | { 13 | "extent" : "full-screen", 14 | "idiom" : "iphone", 15 | "subtype" : "736h", 16 | "filename" : "Default@3x-1.png", 17 | "minimum-system-version" : "8.0", 18 | "orientation" : "landscape", 19 | "scale" : "3x" 20 | }, 21 | { 22 | "extent" : "full-screen", 23 | "idiom" : "iphone", 24 | "subtype" : "667h", 25 | "filename" : "Default-4.7@2x.png", 26 | "minimum-system-version" : "8.0", 27 | "orientation" : "portrait", 28 | "scale" : "2x" 29 | }, 30 | { 31 | "orientation" : "portrait", 32 | "idiom" : "iphone", 33 | "filename" : "Default@2x.png", 34 | "extent" : "full-screen", 35 | "minimum-system-version" : "7.0", 36 | "scale" : "2x" 37 | }, 38 | { 39 | "extent" : "full-screen", 40 | "idiom" : "iphone", 41 | "subtype" : "retina4", 42 | "filename" : "Default-568h@2x.png", 43 | "minimum-system-version" : "7.0", 44 | "orientation" : "portrait", 45 | "scale" : "2x" 46 | }, 47 | { 48 | "orientation" : "portrait", 49 | "idiom" : "ipad", 50 | "extent" : "full-screen", 51 | "minimum-system-version" : "7.0", 52 | "scale" : "1x" 53 | }, 54 | { 55 | "orientation" : "landscape", 56 | "idiom" : "ipad", 57 | "extent" : "full-screen", 58 | "minimum-system-version" : "7.0", 59 | "scale" : "1x" 60 | }, 61 | { 62 | "orientation" : "portrait", 63 | "idiom" : "ipad", 64 | "extent" : "full-screen", 65 | "minimum-system-version" : "7.0", 66 | "scale" : "2x" 67 | }, 68 | { 69 | "orientation" : "landscape", 70 | "idiom" : "ipad", 71 | "extent" : "full-screen", 72 | "minimum-system-version" : "7.0", 73 | "scale" : "2x" 74 | }, 75 | { 76 | "orientation" : "portrait", 77 | "idiom" : "iphone", 78 | "filename" : "Default.png", 79 | "extent" : "full-screen", 80 | "scale" : "1x" 81 | }, 82 | { 83 | "orientation" : "portrait", 84 | "idiom" : "iphone", 85 | "filename" : "Default@2x-1.png", 86 | "extent" : "full-screen", 87 | "scale" : "2x" 88 | }, 89 | { 90 | "orientation" : "portrait", 91 | "idiom" : "iphone", 92 | "filename" : "Default-568h@2x-1.png", 93 | "extent" : "full-screen", 94 | "subtype" : "retina4", 95 | "scale" : "2x" 96 | }, 97 | { 98 | "orientation" : "portrait", 99 | "idiom" : "ipad", 100 | "extent" : "to-status-bar", 101 | "scale" : "1x" 102 | }, 103 | { 104 | "orientation" : "portrait", 105 | "idiom" : "ipad", 106 | "extent" : "full-screen", 107 | "scale" : "1x" 108 | }, 109 | { 110 | "orientation" : "landscape", 111 | "idiom" : "ipad", 112 | "extent" : "to-status-bar", 113 | "scale" : "1x" 114 | }, 115 | { 116 | "orientation" : "landscape", 117 | "idiom" : "ipad", 118 | "extent" : "full-screen", 119 | "scale" : "1x" 120 | }, 121 | { 122 | "orientation" : "portrait", 123 | "idiom" : "ipad", 124 | "extent" : "to-status-bar", 125 | "scale" : "2x" 126 | }, 127 | { 128 | "orientation" : "portrait", 129 | "idiom" : "ipad", 130 | "extent" : "full-screen", 131 | "scale" : "2x" 132 | }, 133 | { 134 | "orientation" : "landscape", 135 | "idiom" : "ipad", 136 | "extent" : "to-status-bar", 137 | "scale" : "2x" 138 | }, 139 | { 140 | "orientation" : "landscape", 141 | "idiom" : "ipad", 142 | "extent" : "full-screen", 143 | "scale" : "2x" 144 | } 145 | ], 146 | "info" : { 147 | "version" : 1, 148 | "author" : "xcode" 149 | } 150 | } -------------------------------------------------------------------------------- /playground/ios/WeexDemo/Assets.xcassets/LaunchImage.launchimage/Default-4.7@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/weexteam/picker-for-Apache-Weex/9c29f07cd221f6e83e0a0f05388e3a2b40d2010b/playground/ios/WeexDemo/Assets.xcassets/LaunchImage.launchimage/Default-4.7@2x.png -------------------------------------------------------------------------------- /playground/ios/WeexDemo/Assets.xcassets/LaunchImage.launchimage/Default-568h@2x-1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/weexteam/picker-for-Apache-Weex/9c29f07cd221f6e83e0a0f05388e3a2b40d2010b/playground/ios/WeexDemo/Assets.xcassets/LaunchImage.launchimage/Default-568h@2x-1.png -------------------------------------------------------------------------------- /playground/ios/WeexDemo/Assets.xcassets/LaunchImage.launchimage/Default-568h@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/weexteam/picker-for-Apache-Weex/9c29f07cd221f6e83e0a0f05388e3a2b40d2010b/playground/ios/WeexDemo/Assets.xcassets/LaunchImage.launchimage/Default-568h@2x.png -------------------------------------------------------------------------------- /playground/ios/WeexDemo/Assets.xcassets/LaunchImage.launchimage/Default.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/weexteam/picker-for-Apache-Weex/9c29f07cd221f6e83e0a0f05388e3a2b40d2010b/playground/ios/WeexDemo/Assets.xcassets/LaunchImage.launchimage/Default.png -------------------------------------------------------------------------------- /playground/ios/WeexDemo/Assets.xcassets/LaunchImage.launchimage/Default@2x-1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/weexteam/picker-for-Apache-Weex/9c29f07cd221f6e83e0a0f05388e3a2b40d2010b/playground/ios/WeexDemo/Assets.xcassets/LaunchImage.launchimage/Default@2x-1.png -------------------------------------------------------------------------------- /playground/ios/WeexDemo/Assets.xcassets/LaunchImage.launchimage/Default@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/weexteam/picker-for-Apache-Weex/9c29f07cd221f6e83e0a0f05388e3a2b40d2010b/playground/ios/WeexDemo/Assets.xcassets/LaunchImage.launchimage/Default@2x.png -------------------------------------------------------------------------------- /playground/ios/WeexDemo/Assets.xcassets/LaunchImage.launchimage/Default@3x-1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/weexteam/picker-for-Apache-Weex/9c29f07cd221f6e83e0a0f05388e3a2b40d2010b/playground/ios/WeexDemo/Assets.xcassets/LaunchImage.launchimage/Default@3x-1.png -------------------------------------------------------------------------------- /playground/ios/WeexDemo/Assets.xcassets/LaunchImage.launchimage/Default@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/weexteam/picker-for-Apache-Weex/9c29f07cd221f6e83e0a0f05388e3a2b40d2010b/playground/ios/WeexDemo/Assets.xcassets/LaunchImage.launchimage/Default@3x.png -------------------------------------------------------------------------------- /playground/ios/WeexDemo/Assets.xcassets/back.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "filename" : "back.png", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "filename" : "back@2x.png", 11 | "scale" : "2x" 12 | }, 13 | { 14 | "idiom" : "universal", 15 | "filename" : "back@3x.png", 16 | "scale" : "3x" 17 | } 18 | ], 19 | "info" : { 20 | "version" : 1, 21 | "author" : "xcode" 22 | } 23 | } -------------------------------------------------------------------------------- /playground/ios/WeexDemo/Assets.xcassets/back.imageset/back.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/weexteam/picker-for-Apache-Weex/9c29f07cd221f6e83e0a0f05388e3a2b40d2010b/playground/ios/WeexDemo/Assets.xcassets/back.imageset/back.png -------------------------------------------------------------------------------- /playground/ios/WeexDemo/Assets.xcassets/back.imageset/back@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/weexteam/picker-for-Apache-Weex/9c29f07cd221f6e83e0a0f05388e3a2b40d2010b/playground/ios/WeexDemo/Assets.xcassets/back.imageset/back@2x.png -------------------------------------------------------------------------------- /playground/ios/WeexDemo/Assets.xcassets/back.imageset/back@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/weexteam/picker-for-Apache-Weex/9c29f07cd221f6e83e0a0f05388e3a2b40d2010b/playground/ios/WeexDemo/Assets.xcassets/back.imageset/back@3x.png -------------------------------------------------------------------------------- /playground/ios/WeexDemo/Assets.xcassets/reload.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "filename" : "reload.png", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "filename" : "reload@2x.png", 11 | "scale" : "2x" 12 | }, 13 | { 14 | "idiom" : "universal", 15 | "filename" : "reload@3x.png", 16 | "scale" : "3x" 17 | } 18 | ], 19 | "info" : { 20 | "version" : 1, 21 | "author" : "xcode" 22 | } 23 | } -------------------------------------------------------------------------------- /playground/ios/WeexDemo/Assets.xcassets/reload.imageset/reload.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/weexteam/picker-for-Apache-Weex/9c29f07cd221f6e83e0a0f05388e3a2b40d2010b/playground/ios/WeexDemo/Assets.xcassets/reload.imageset/reload.png -------------------------------------------------------------------------------- /playground/ios/WeexDemo/Assets.xcassets/reload.imageset/reload@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/weexteam/picker-for-Apache-Weex/9c29f07cd221f6e83e0a0f05388e3a2b40d2010b/playground/ios/WeexDemo/Assets.xcassets/reload.imageset/reload@2x.png -------------------------------------------------------------------------------- /playground/ios/WeexDemo/Assets.xcassets/reload.imageset/reload@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/weexteam/picker-for-Apache-Weex/9c29f07cd221f6e83e0a0f05388e3a2b40d2010b/playground/ios/WeexDemo/Assets.xcassets/reload.imageset/reload@3x.png -------------------------------------------------------------------------------- /playground/ios/WeexDemo/Assets.xcassets/scan.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "filename" : "scan.png", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "filename" : "scan@2x.png", 11 | "scale" : "2x" 12 | }, 13 | { 14 | "idiom" : "universal", 15 | "filename" : "scan@3x.png", 16 | "scale" : "3x" 17 | } 18 | ], 19 | "info" : { 20 | "version" : 1, 21 | "author" : "xcode" 22 | } 23 | } -------------------------------------------------------------------------------- /playground/ios/WeexDemo/Assets.xcassets/scan.imageset/scan.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/weexteam/picker-for-Apache-Weex/9c29f07cd221f6e83e0a0f05388e3a2b40d2010b/playground/ios/WeexDemo/Assets.xcassets/scan.imageset/scan.png -------------------------------------------------------------------------------- /playground/ios/WeexDemo/Assets.xcassets/scan.imageset/scan@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/weexteam/picker-for-Apache-Weex/9c29f07cd221f6e83e0a0f05388e3a2b40d2010b/playground/ios/WeexDemo/Assets.xcassets/scan.imageset/scan@2x.png -------------------------------------------------------------------------------- /playground/ios/WeexDemo/Assets.xcassets/scan.imageset/scan@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/weexteam/picker-for-Apache-Weex/9c29f07cd221f6e83e0a0f05388e3a2b40d2010b/playground/ios/WeexDemo/Assets.xcassets/scan.imageset/scan@3x.png -------------------------------------------------------------------------------- /playground/ios/WeexDemo/DemoBaseViewController.h: -------------------------------------------------------------------------------- 1 | /** 2 | * Created by Weex. 3 | * Copyright (c) 2016, Alibaba, Inc. All rights reserved. 4 | * 5 | * This source code is licensed under the Apache Licence 2.0. 6 | * For the full copyright and license information,please view the LICENSE file in the root directory of this source tree. 7 | */ 8 | 9 | #import 10 | 11 | @interface DemoBaseViewController : UIViewController 12 | 13 | @end 14 | -------------------------------------------------------------------------------- /playground/ios/WeexDemo/DemoBaseViewController.m: -------------------------------------------------------------------------------- 1 | /** 2 | * Created by Weex. 3 | * Copyright (c) 2016, Alibaba, Inc. All rights reserved. 4 | * 5 | * This source code is licensed under the Apache Licence 2.0. 6 | * For the full copyright and license information,please view the LICENSE file in the root directory of this source tree. 7 | */ 8 | 9 | #import "DemoBaseViewController.h" 10 | #import "UIViewController+WXDemoNaviBar.h" 11 | 12 | @interface DemoBaseViewController () 13 | 14 | @end 15 | 16 | @implementation DemoBaseViewController 17 | 18 | - (instancetype)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil 19 | { 20 | return [super initWithNibName:nibNameOrNil bundle:nibBundleOrNil]; 21 | } 22 | 23 | - (void)viewDidLoad { 24 | [super viewDidLoad]; 25 | // Do any additional setup after loading the view. 26 | [self setupNaviBar]; 27 | } 28 | 29 | - (void)didReceiveMemoryWarning { 30 | [super didReceiveMemoryWarning]; 31 | // Dispose of any resources that can be recreated. 32 | } 33 | 34 | @end 35 | -------------------------------------------------------------------------------- /playground/ios/WeexDemo/DemoDefine.h: -------------------------------------------------------------------------------- 1 | /** 2 | * Created by Weex. 3 | * Copyright (c) 2016, Alibaba, Inc. All rights reserved. 4 | * 5 | * This source code is licensed under the Apache Licence 2.0. 6 | * For the full copyright and license information,please view the LICENSE file in the root directory of this source tree. 7 | */ 8 | 9 | #import 10 | 11 | #define CURRENT_IP [NSString stringWithContentsOfFile:[[NSBundle mainBundle] pathForResource:@"localServer-ip" ofType:@".txt"] encoding:NSUTF8StringEncoding error:nil] 12 | 13 | #if TARGET_IPHONE_SIMULATOR 14 | #define DEMO_HOST @"127.0.0.1" 15 | #else 16 | #define DEMO_HOST CURRENT_IP 17 | #endif 18 | 19 | #define DEMO_URL(path) [NSString stringWithFormat:@"http://%@:12580/%s", DEMO_HOST, #path] 20 | 21 | #define HOME_URL [NSString stringWithFormat:@"http://%@:12580/examples/build/index.js", DEMO_HOST] 22 | 23 | #define BUNDLE_URL [NSString stringWithFormat:@"file://%@/bundlejs/index.js",[NSBundle mainBundle].bundlePath] 24 | 25 | #define UITEST_HOME_URL @"http://test?_wx_tpl=http://localhost:12580/test/build/TC__Home.js" 26 | 27 | #define QRSCAN @"com.taobao.WeexDemo.scan" 28 | #define WEEX_COLOR [UIColor colorWithRed:0.27 green:0.71 blue:0.94 alpha:1] 29 | -------------------------------------------------------------------------------- /playground/ios/WeexDemo/Images.xcassets/Brand Assets.launchimage/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "orientation" : "portrait", 5 | "idiom" : "iphone", 6 | "minimum-system-version" : "7.0", 7 | "scale" : "2x" 8 | }, 9 | { 10 | "orientation" : "portrait", 11 | "idiom" : "iphone", 12 | "minimum-system-version" : "7.0", 13 | "subtype" : "retina4", 14 | "scale" : "2x" 15 | } 16 | ], 17 | "info" : { 18 | "version" : 1, 19 | "author" : "xcode" 20 | } 21 | } -------------------------------------------------------------------------------- /playground/ios/WeexDemo/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleURLTypes 6 | 7 | 8 | CFBundleURLSchemes 9 | 10 | wxpage 11 | 12 | 13 | 14 | CFBundleDevelopmentRegion 15 | en 16 | CFBundleDisplayName 17 | WeexPlayground 18 | CFBundleExecutable 19 | $(EXECUTABLE_NAME) 20 | CFBundleIdentifier 21 | $(PRODUCT_BUNDLE_IDENTIFIER) 22 | CFBundleInfoDictionaryVersion 23 | 6.0 24 | CFBundleName 25 | $(PRODUCT_NAME) 26 | CFBundlePackageType 27 | APPL 28 | CFBundleShortVersionString 29 | 1.4 30 | CFBundleSignature 31 | ???? 32 | CFBundleURLTypes 33 | 34 | 35 | CFBundleURLSchemes 36 | 37 | wxpage 38 | 39 | 40 | 41 | CFBundleVersion 42 | 1 43 | LSRequiresIPhoneOS 44 | 45 | NSAppTransportSecurity 46 | 47 | NSAllowsArbitraryLoads 48 | 49 | 50 | NSCameraUsageDescription 51 | 52 | NSLocationWhenInUseUsageDescription 53 | $(PRODUCT_NAME) will access your location 54 | UIApplicationShortcutItems 55 | 56 | 57 | UIApplicationShortcutItemIconFile 58 | scan 59 | UIApplicationShortcutItemSubtitle 60 | scan your QR code 61 | UIApplicationShortcutItemTitle 62 | Scan QR 63 | UIApplicationShortcutItemType 64 | com.taobao.WeexDemo.scan 65 | 66 | 67 | UIRequiredDeviceCapabilities 68 | 69 | armv7 70 | 71 | UIStatusBarStyle 72 | UIStatusBarStyleLightContent 73 | UISupportedInterfaceOrientations 74 | 75 | UIInterfaceOrientationPortrait 76 | 77 | UISupportedInterfaceOrientations~ipad 78 | 79 | UIInterfaceOrientationPortrait 80 | UIInterfaceOrientationPortraitUpsideDown 81 | UIInterfaceOrientationLandscapeLeft 82 | UIInterfaceOrientationLandscapeRight 83 | 84 | UIViewControllerBasedStatusBarAppearance 85 | 86 | 87 | 88 | -------------------------------------------------------------------------------- /playground/ios/WeexDemo/Scanner/WXScannerVC.h: -------------------------------------------------------------------------------- 1 | /** 2 | * Created by Weex. 3 | * Copyright (c) 2016, Alibaba, Inc. All rights reserved. 4 | * 5 | * This source code is licensed under the Apache Licence 2.0. 6 | * For the full copyright and license information,please view the LICENSE file in the root directory of this source tree. 7 | */ 8 | 9 | #import 10 | #import 11 | 12 | @interface WXScannerVC : UIViewController 13 | 14 | @end -------------------------------------------------------------------------------- /playground/ios/WeexDemo/UIView+UIThreadCheck.h: -------------------------------------------------------------------------------- 1 | /** 2 | * Created by Weex. 3 | * Copyright (c) 2016, Alibaba, Inc. All rights reserved. 4 | * 5 | * This source code is licensed under the Apache Licence 2.0. 6 | * For the full copyright and license information,please view the LICENSE file in the root directory of this source tree. 7 | */ 8 | 9 | #import 10 | 11 | @interface UIView (UIThreadCheck) 12 | 13 | + (void)wx_checkUIThread; 14 | 15 | @end 16 | -------------------------------------------------------------------------------- /playground/ios/WeexDemo/UIView+UIThreadCheck.m: -------------------------------------------------------------------------------- 1 | /** 2 | * Created by Weex. 3 | * Copyright (c) 2016, Alibaba, Inc. All rights reserved. 4 | * 5 | * This source code is licensed under the Apache Licence 2.0. 6 | * For the full copyright and license information,please view the LICENSE file in the root directory of this source tree. 7 | */ 8 | 9 | #import "UIView+UIThreadCheck.h" 10 | #import 11 | 12 | #define WXCheckUIThread() NSAssert([NSThread isMainThread], \ 13 | @"You can not change UI on main thread!") 14 | 15 | @implementation UIView (UIThreadCheck) 16 | 17 | + (void)wx_checkUIThread 18 | { 19 | [self weex_swizzle:[self class] Method:@selector(setNeedsLayout) withMethod:@selector(wx_setNeedsLayout)]; 20 | [self weex_swizzle:[self class] Method:@selector(setNeedsDisplay) withMethod:@selector(wx_setNeedsDisplay)]; 21 | [self weex_swizzle:[self class] Method:@selector(setNeedsDisplayInRect:) withMethod:@selector(wx_setNeedsDisplayInRect:)]; 22 | } 23 | 24 | - (void)wx_setNeedsLayout 25 | { 26 | WXCheckUIThread(); 27 | [self wx_setNeedsLayout]; 28 | } 29 | 30 | - (void)wx_setNeedsDisplay 31 | { 32 | WXCheckUIThread(); 33 | [self wx_setNeedsDisplay]; 34 | } 35 | 36 | - (void)wx_setNeedsDisplayInRect:(CGRect)rect 37 | { 38 | WXCheckUIThread(); 39 | [self wx_setNeedsDisplayInRect:rect]; 40 | } 41 | 42 | @end 43 | -------------------------------------------------------------------------------- /playground/ios/WeexDemo/UIViewController+WXDemoNaviBar.h: -------------------------------------------------------------------------------- 1 | /** 2 | * Created by Weex. 3 | * Copyright (c) 2016, Alibaba, Inc. All rights reserved. 4 | * 5 | * This source code is licensed under the Apache Licence 2.0. 6 | * For the full copyright and license information,please view the LICENSE file in the root directory of this source tree. 7 | */ 8 | 9 | #import 10 | #import "DemoDefine.h" 11 | 12 | @interface UIViewController (WXDemoNaviBar) 13 | 14 | /** 15 | * back button click action 16 | * @param sender responder 17 | */ 18 | - (void)backButtonClicked:(id)sender; 19 | 20 | - (void)setupNaviBar; 21 | 22 | @end 23 | 24 | -------------------------------------------------------------------------------- /playground/ios/WeexDemo/WXDemoViewController.h: -------------------------------------------------------------------------------- 1 | /** 2 | * Created by Weex. 3 | * Copyright (c) 2016, Alibaba, Inc. All rights reserved. 4 | * 5 | * This source code is licensed under the Apache Licence 2.0. 6 | * For the full copyright and license information,please view the LICENSE file in the root directory of this source tree. 7 | */ 8 | 9 | #import 10 | #import 11 | 12 | @interface WXDemoViewController : UIViewController 13 | 14 | @property (nonatomic, strong) NSString *script; 15 | @property (nonatomic, strong) NSURL *url; 16 | 17 | @property (nonatomic, strong) SRWebSocket *hotReloadSocket; 18 | @property (nonatomic, strong) NSString *source; 19 | 20 | @end 21 | 22 | -------------------------------------------------------------------------------- /playground/ios/WeexDemo/WXSyncTestModule.h: -------------------------------------------------------------------------------- 1 | /** 2 | * Created by Weex. 3 | * Copyright (c) 2016, Alibaba, Inc. All rights reserved. 4 | * 5 | * This source code is licensed under the Apache Licence 2.0. 6 | * For the full copyright and license information,please view the LICENSE file in the root directory of this source tree. 7 | */ 8 | 9 | #import 10 | #import 11 | 12 | @interface WXSyncTestModule : NSObject 13 | 14 | @end 15 | -------------------------------------------------------------------------------- /playground/ios/WeexDemo/WXSyncTestModule.m: -------------------------------------------------------------------------------- 1 | /** 2 | * Created by Weex. 3 | * Copyright (c) 2016, Alibaba, Inc. All rights reserved. 4 | * 5 | * This source code is licensed under the Apache Licence 2.0. 6 | * For the full copyright and license information,please view the LICENSE file in the root directory of this source tree. 7 | */ 8 | 9 | #import "WXSyncTestModule.h" 10 | 11 | @implementation WXSyncTestModule 12 | 13 | WX_EXPORT_METHOD_SYNC(@selector(getString)) 14 | WX_EXPORT_METHOD_SYNC(@selector(getNumber)) 15 | WX_EXPORT_METHOD_SYNC(@selector(getArray)) 16 | WX_EXPORT_METHOD_SYNC(@selector(getObject)) 17 | 18 | - (NSString *)getString 19 | { 20 | return @"testString"; 21 | } 22 | 23 | - (NSUInteger)getNumber 24 | { 25 | return 111111; 26 | } 27 | 28 | - (NSArray *)getArray 29 | { 30 | return @[@(111111),@"testString",@"testString2"]; 31 | } 32 | 33 | - (NSDictionary *)getObject 34 | { 35 | return @{@"number":@(111111), @"string1":@"testString",@"string2":@"testString2"}; 36 | } 37 | 38 | @end 39 | -------------------------------------------------------------------------------- /playground/ios/WeexDemo/debug/WXATLoggerPlugin.h: -------------------------------------------------------------------------------- 1 | /** 2 | * Created by Weex. 3 | * Copyright (c) 2016, Alibaba, Inc. All rights reserved. 4 | * 5 | * This source code is licensed under the Apache Licence 2.0. 6 | * For the full copyright and license information,please view the LICENSE file in the root directory of this source tree. 7 | */ 8 | 9 | #import 10 | #import 11 | 12 | @interface WXATLoggerPlugin : NSObject 13 | 14 | @end 15 | -------------------------------------------------------------------------------- /playground/ios/WeexDemo/debug/WXATLoggerPlugin.m: -------------------------------------------------------------------------------- 1 | /** 2 | * Created by Weex. 3 | * Copyright (c) 2016, Alibaba, Inc. All rights reserved. 4 | * 5 | * This source code is licensed under the Apache Licence 2.0. 6 | * For the full copyright and license information,please view the LICENSE file in the root directory of this source tree. 7 | */ 8 | 9 | #import "WXATLoggerPlugin.h" 10 | #import 11 | 12 | @implementation WXATLoggerPlugin 13 | 14 | - (void)pluginDidLoadWithArgs:(NSArray *)args 15 | { 16 | 17 | } 18 | 19 | - (void)pluginWillOpenInContainer:(UIViewController *)container withArg:(NSArray *)args 20 | { 21 | NSURL *URL = [NSURL URLWithString:@"http://127.0.0.1:8687/launchDebugger"]; 22 | NSURLRequest *request = [NSURLRequest requestWithURL:URL]; 23 | 24 | NSURLSession *session = [NSURLSession sharedSession]; 25 | NSURLSessionDataTask *task = [session dataTaskWithRequest:request 26 | completionHandler: 27 | ^(NSData *data, NSURLResponse *response, NSError *error) { 28 | // ... 29 | }]; 30 | 31 | [task resume]; 32 | 33 | dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(1 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{ 34 | [WXSDKEngine connectDebugServer:@"ws://127.0.0.1:8687/debugger/0/renderer"]; 35 | }); 36 | } 37 | 38 | - (void)pluginWillClose 39 | { 40 | 41 | } 42 | 43 | - (void)pluginDidUnload 44 | { 45 | 46 | } 47 | 48 | - (CGRect)wantReactArea 49 | { 50 | return CGRectZero; 51 | } 52 | 53 | 54 | @end 55 | -------------------------------------------------------------------------------- /playground/ios/WeexDemo/debug/WXATViewHierarchyPlugin.h: -------------------------------------------------------------------------------- 1 | /** 2 | * Created by Weex. 3 | * Copyright (c) 2016, Alibaba, Inc. All rights reserved. 4 | * 5 | * This source code is licensed under the Apache Licence 2.0. 6 | * For the full copyright and license information,please view the LICENSE file in the root directory of this source tree. 7 | */ 8 | 9 | //#import 10 | //#import 11 | // 12 | //@interface WXATViewHierarchyPlugin : NSObject 13 | // 14 | //@end 15 | -------------------------------------------------------------------------------- /playground/ios/WeexDemo/debug/WXATViewHierarchyPlugin.m: -------------------------------------------------------------------------------- 1 | /** 2 | * Created by Weex. 3 | * Copyright (c) 2016, Alibaba, Inc. All rights reserved. 4 | * 5 | * This source code is licensed under the Apache Licence 2.0. 6 | * For the full copyright and license information,please view the LICENSE file in the root directory of this source tree. 7 | */ 8 | 9 | //#import "WXATViewHierarchyPlugin.h" 10 | //#import 11 | // 12 | //@implementation WXATViewHierarchyPlugin 13 | //{ 14 | // WXViewHierarchy *_hierarchy; 15 | //} 16 | // 17 | //- (void)pluginDidLoadWithArgs:(NSArray *)args 18 | //{ 19 | // _hierarchy = [[WXViewHierarchy alloc] init]; 20 | // _hierarchy.hidden = YES; 21 | //} 22 | // 23 | //- (void)pluginWillOpenInContainer:(UIViewController *)container withArg:(NSArray *)args 24 | //{ 25 | // [_hierarchy show]; 26 | //} 27 | // 28 | //- (void)pluginWillClose 29 | //{ 30 | // [_hierarchy hide]; 31 | //} 32 | // 33 | //- (void)pluginDidUnload 34 | //{ 35 | // _hierarchy = nil; 36 | //} 37 | // 38 | //- (CGRect)wantReactArea 39 | //{ 40 | // return CGRectZero; 41 | //} 42 | // 43 | //@end 44 | -------------------------------------------------------------------------------- /playground/ios/WeexDemo/extend/component/WXSelectComponent.h: -------------------------------------------------------------------------------- 1 | /** 2 | * Created by Weex. 3 | * Copyright (c) 2016, Alibaba, Inc. All rights reserved. 4 | * 5 | * This source code is licensed under the Apache Licence 2.0. 6 | * For the full copyright and license information,please view the LICENSE file in the root directory of this source tree. 7 | */ 8 | 9 | #import 10 | #import 11 | 12 | @interface WXSelectComponent : WXComponent 13 | 14 | @end 15 | -------------------------------------------------------------------------------- /playground/ios/WeexDemo/extend/handler/WXImgLoaderDefaultImpl.h: -------------------------------------------------------------------------------- 1 | /** 2 | * Created by Weex. 3 | * Copyright (c) 2016, Alibaba, Inc. All rights reserved. 4 | * 5 | * This source code is licensed under the Apache Licence 2.0. 6 | * For the full copyright and license information,please view the LICENSE file in the root directory of this source tree. 7 | */ 8 | 9 | #import 10 | #import 11 | 12 | @interface WXImgLoaderDefaultImpl : NSObject 13 | @end 14 | -------------------------------------------------------------------------------- /playground/ios/WeexDemo/extend/handler/WXImgLoaderDefaultImpl.m: -------------------------------------------------------------------------------- 1 | /** 2 | * Created by Weex. 3 | * Copyright (c) 2016, Alibaba, Inc. All rights reserved. 4 | * 5 | * This source code is licensed under the Apache Licence 2.0. 6 | * For the full copyright and license information,please view the LICENSE file in the root directory of this source tree. 7 | */ 8 | 9 | #import "WXImgLoaderDefaultImpl.h" 10 | #import 11 | 12 | #define MIN_IMAGE_WIDTH 36 13 | #define MIN_IMAGE_HEIGHT 36 14 | 15 | #if OS_OBJECT_USE_OBJC 16 | #undef WXDispatchQueueRelease 17 | #undef WXDispatchQueueSetterSementics 18 | #define WXDispatchQueueRelease(q) 19 | #define WXDispatchQueueSetterSementics strong 20 | #else 21 | #undef WXDispatchQueueRelease 22 | #undef WXDispatchQueueSetterSementics 23 | #define WXDispatchQueueRelease(q) (dispatch_release(q)) 24 | #define WXDispatchQueueSetterSementics assign 25 | #endif 26 | 27 | @interface WXImgLoaderDefaultImpl() 28 | 29 | @property (WXDispatchQueueSetterSementics, nonatomic) dispatch_queue_t ioQueue; 30 | 31 | @end 32 | 33 | @implementation WXImgLoaderDefaultImpl 34 | 35 | #pragma mark - 36 | #pragma mark WXImgLoaderProtocol 37 | 38 | - (id)downloadImageWithURL:(NSString *)url imageFrame:(CGRect)imageFrame userInfo:(NSDictionary *)userInfo completed:(void(^)(UIImage *image, NSError *error, BOOL finished))completedBlock 39 | { 40 | if ([url hasPrefix:@"//"]) { 41 | url = [@"http:" stringByAppendingString:url]; 42 | } 43 | return (id)[[SDWebImageManager sharedManager] downloadImageWithURL:[NSURL URLWithString:url] options:0 progress:^(NSInteger receivedSize, NSInteger expectedSize) { 44 | 45 | } completed:^(UIImage *image, NSError *error, SDImageCacheType cacheType, BOOL finished, NSURL *imageURL) { 46 | if (completedBlock) { 47 | completedBlock(image, error, finished); 48 | } 49 | }]; 50 | } 51 | 52 | @end 53 | -------------------------------------------------------------------------------- /playground/ios/WeexDemo/extend/module/WXEventModule.h: -------------------------------------------------------------------------------- 1 | /** 2 | * Created by Weex. 3 | * Copyright (c) 2016, Alibaba, Inc. All rights reserved. 4 | * 5 | * This source code is licensed under the Apache Licence 2.0. 6 | * For the full copyright and license information,please view the LICENSE file in the root directory of this source tree. 7 | */ 8 | 9 | #import 10 | #import 11 | #import 12 | 13 | @interface WXEventModule : NSObject 14 | 15 | @end 16 | -------------------------------------------------------------------------------- /playground/ios/WeexDemo/extend/module/WXEventModule.m: -------------------------------------------------------------------------------- 1 | /** 2 | * Created by Weex. 3 | * Copyright (c) 2016, Alibaba, Inc. All rights reserved. 4 | * 5 | * This source code is licensed under the Apache Licence 2.0. 6 | * For the full copyright and license information,please view the LICENSE file in the root directory of this source tree. 7 | */ 8 | 9 | #import "WXEventModule.h" 10 | #import "WXDemoViewController.h" 11 | #import 12 | 13 | @implementation WXEventModule 14 | 15 | @synthesize weexInstance; 16 | 17 | WX_EXPORT_METHOD(@selector(openURL:)) 18 | 19 | - (void)openURL:(NSString *)url 20 | { 21 | NSString *newURL = url; 22 | if ([url hasPrefix:@"//"]) { 23 | newURL = [NSString stringWithFormat:@"http:%@", url]; 24 | } else if (![url hasPrefix:@"http"]) { 25 | // relative path 26 | newURL = [NSURL URLWithString:url relativeToURL:weexInstance.scriptURL].absoluteString; 27 | } 28 | 29 | UIViewController *controller = [[WXDemoViewController alloc] init]; 30 | ((WXDemoViewController *)controller).url = [NSURL URLWithString:newURL]; 31 | 32 | [[weexInstance.viewController navigationController] pushViewController:controller animated:YES]; 33 | } 34 | 35 | @end 36 | 37 | -------------------------------------------------------------------------------- /playground/ios/WeexDemo/main.m: -------------------------------------------------------------------------------- 1 | /** 2 | * Created by Weex. 3 | * Copyright (c) 2016, Alibaba, Inc. All rights reserved. 4 | * 5 | * This source code is licensed under the Apache Licence 2.0. 6 | * For the full copyright and license information,please view the LICENSE file in the root directory of this source tree. 7 | */ 8 | 9 | #import 10 | #import "AppDelegate.h" 11 | 12 | int main(int argc, char * argv[]) { 13 | @autoreleasepool { 14 | return UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class])); 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /playground/ios/WeexDemo/weex-icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/weexteam/picker-for-Apache-Weex/9c29f07cd221f6e83e0a0f05388e3a2b40d2010b/playground/ios/WeexDemo/weex-icon.png -------------------------------------------------------------------------------- /playground/ios/WeexDemoTests/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | NSLocationWhenInUseUsageDescription 6 | $(PRODUCT_NAME) will access your location 7 | NSCameraUsageDescription 8 | $(PRODUCT_NAME) will access your camera 9 | CFBundleDevelopmentRegion 10 | en 11 | CFBundleExecutable 12 | $(EXECUTABLE_NAME) 13 | CFBundleIdentifier 14 | $(PRODUCT_BUNDLE_IDENTIFIER) 15 | CFBundleInfoDictionaryVersion 16 | 6.0 17 | CFBundleName 18 | $(PRODUCT_NAME) 19 | CFBundlePackageType 20 | BNDL 21 | CFBundleShortVersionString 22 | 1.0 23 | CFBundleSignature 24 | ???? 25 | CFBundleVersion 26 | 1 27 | 28 | 29 | -------------------------------------------------------------------------------- /playground/ios/WeexDemoTests/WeexDemoTests.m: -------------------------------------------------------------------------------- 1 | /** 2 | * Created by Weex. 3 | * Copyright (c) 2016, Alibaba, Inc. All rights reserved. 4 | * 5 | * This source code is licensed under the Apache Licence 2.0. 6 | * For the full copyright and license information,please view the LICENSE file in the root directory of this source tree. 7 | */ 8 | 9 | #import 10 | 11 | @interface WeexDemoTests : XCTestCase 12 | 13 | @end 14 | 15 | @implementation WeexDemoTests 16 | 17 | - (void)setUp { 18 | [super setUp]; 19 | // Put setup code here. This method is called before the invocation of each test method in the class. 20 | } 21 | 22 | - (void)tearDown { 23 | // Put teardown code here. This method is called after the invocation of each test method in the class. 24 | [super tearDown]; 25 | } 26 | 27 | - (void)testExample { 28 | // This is an example of a functional test case. 29 | // Use XCTAssert and related functions to verify your tests produce the correct results. 30 | } 31 | 32 | - (void)testPerformanceExample { 33 | // This is an example of a performance test case. 34 | [self measureBlock:^{ 35 | // Put the code you want to measure the time of here. 36 | }]; 37 | } 38 | 39 | @end 40 | -------------------------------------------------------------------------------- /playground/ios/WeexUITestDemo-Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIdentifier 10 | $(PRODUCT_BUNDLE_IDENTIFIER) 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | $(PRODUCT_NAME) 15 | CFBundlePackageType 16 | APPL 17 | CFBundleShortVersionString 18 | 99.0 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | 10000 23 | LSRequiresIPhoneOS 24 | 25 | NSAppTransportSecurity 26 | 27 | NSAllowsArbitraryLoads 28 | 29 | 30 | UILaunchStoryboardName 31 | LaunchScreen 32 | UIRequiredDeviceCapabilities 33 | 34 | armv7 35 | 36 | UIStatusBarStyle 37 | UIStatusBarStyleLightContent 38 | UISupportedInterfaceOrientations 39 | 40 | UIInterfaceOrientationPortrait 41 | 42 | UISupportedInterfaceOrientations~ipad 43 | 44 | UIInterfaceOrientationPortrait 45 | UIInterfaceOrientationPortraitUpsideDown 46 | UIInterfaceOrientationLandscapeLeft 47 | UIInterfaceOrientationLandscapeRight 48 | 49 | UIViewControllerBasedStatusBarAppearance 50 | 51 | 52 | 53 | -------------------------------------------------------------------------------- /playground/ios/WeexUITestDemoUITests/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIdentifier 10 | $(PRODUCT_BUNDLE_IDENTIFIER) 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | $(PRODUCT_NAME) 15 | CFBundlePackageType 16 | BNDL 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | 1 23 | 24 | 25 | -------------------------------------------------------------------------------- /playground/ios/WeexUITestDemoUITests/WeexUITestDemoUITests.m: -------------------------------------------------------------------------------- 1 | /** 2 | * Created by Weex. 3 | * Copyright (c) 2016, Alibaba, Inc. All rights reserved. 4 | * 5 | * This source code is licensed under the Apache Licence 2.0. 6 | * For the full copyright and license information,please view the LICENSE file in the root directory of this source tree. 7 | */ 8 | 9 | #import 10 | 11 | @interface WeexUITestDemoUITests : XCTestCase 12 | 13 | @end 14 | 15 | @implementation WeexUITestDemoUITests 16 | 17 | - (void)setUp { 18 | [super setUp]; 19 | 20 | // Put setup code here. This method is called before the invocation of each test method in the class. 21 | 22 | // In UI tests it is usually best to stop immediately when a failure occurs. 23 | self.continueAfterFailure = NO; 24 | // UI tests must launch the application that they test. Doing this in setup will make sure it happens for each test method. 25 | [[[XCUIApplication alloc] init] launch]; 26 | 27 | // In UI tests it’s important to set the initial state - such as interface orientation - required for your tests before they run. The setUp method is a good place to do this. 28 | } 29 | 30 | - (void)tearDown { 31 | // Put teardown code here. This method is called after the invocation of each test method in the class. 32 | [super tearDown]; 33 | } 34 | 35 | - (void)testExample { 36 | // Use recording to get started writing UI tests. 37 | // Use XCTAssert and related functions to verify your tests produce the correct results. 38 | } 39 | 40 | @end 41 | -------------------------------------------------------------------------------- /playground/ios/bundlejs/component/slider-neighbor/slider-neighbor-item.js: -------------------------------------------------------------------------------- 1 | /******/ (function(modules) { // webpackBootstrap 2 | /******/ // The module cache 3 | /******/ var installedModules = {}; 4 | 5 | /******/ // The require function 6 | /******/ function __webpack_require__(moduleId) { 7 | 8 | /******/ // Check if module is in cache 9 | /******/ if(installedModules[moduleId]) 10 | /******/ return installedModules[moduleId].exports; 11 | 12 | /******/ // Create a new module (and put it into the cache) 13 | /******/ var module = installedModules[moduleId] = { 14 | /******/ exports: {}, 15 | /******/ id: moduleId, 16 | /******/ loaded: false 17 | /******/ }; 18 | 19 | /******/ // Execute the module function 20 | /******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__); 21 | 22 | /******/ // Flag the module as loaded 23 | /******/ module.loaded = true; 24 | 25 | /******/ // Return the exports of the module 26 | /******/ return module.exports; 27 | /******/ } 28 | 29 | 30 | /******/ // expose the modules object (__webpack_modules__) 31 | /******/ __webpack_require__.m = modules; 32 | 33 | /******/ // expose the module cache 34 | /******/ __webpack_require__.c = installedModules; 35 | 36 | /******/ // __webpack_public_path__ 37 | /******/ __webpack_require__.p = ""; 38 | 39 | /******/ // Load entry module and return exports 40 | /******/ return __webpack_require__(0); 41 | /******/ }) 42 | /************************************************************************/ 43 | /******/ ({ 44 | 45 | /***/ 0: 46 | /***/ function(module, exports, __webpack_require__) { 47 | 48 | var __weex_template__ = __webpack_require__(153) 49 | var __weex_style__ = __webpack_require__(154) 50 | var __weex_script__ = __webpack_require__(155) 51 | 52 | __weex_define__('@weex-component/d723bedd436352d63e4fa599317a8037', [], function(__weex_require__, __weex_exports__, __weex_module__) { 53 | 54 | __weex_script__(__weex_module__, __weex_exports__, __weex_require__) 55 | if (__weex_exports__.__esModule && __weex_exports__.default) { 56 | __weex_module__.exports = __weex_exports__.default 57 | } 58 | 59 | __weex_module__.exports.template = __weex_template__ 60 | 61 | __weex_module__.exports.style = __weex_style__ 62 | 63 | }) 64 | 65 | __weex_bootstrap__('@weex-component/d723bedd436352d63e4fa599317a8037',undefined,undefined) 66 | 67 | /***/ }, 68 | 69 | /***/ 153: 70 | /***/ function(module, exports) { 71 | 72 | module.exports = { 73 | "type": "div", 74 | "classList": [ 75 | "slider-item-container" 76 | ], 77 | "children": [ 78 | { 79 | "type": "image", 80 | "classList": [ 81 | "slider-item-image" 82 | ], 83 | "attr": { 84 | "src": function () {return this.image} 85 | } 86 | } 87 | ] 88 | } 89 | 90 | /***/ }, 91 | 92 | /***/ 154: 93 | /***/ function(module, exports) { 94 | 95 | module.exports = { 96 | "slider-item-container": { 97 | "width": 542, 98 | "height": 360, 99 | "justifyContent": "center", 100 | "flexDirection": "row", 101 | "padding": 10 102 | }, 103 | "slider-item-image": { 104 | "width": 542, 105 | "height": 360 106 | } 107 | } 108 | 109 | /***/ }, 110 | 111 | /***/ 155: 112 | /***/ function(module, exports) { 113 | 114 | module.exports = function(module, exports, __weex_require__){'use strict'; 115 | 116 | module.exports = { 117 | data: function () {return { 118 | image: '', 119 | link: '', 120 | href: '' 121 | }}, 122 | methods: { 123 | ready: function ready() { 124 | this.href = this.link; 125 | } 126 | } 127 | };} 128 | /* generated by weex-loader */ 129 | 130 | 131 | /***/ } 132 | 133 | /******/ }); -------------------------------------------------------------------------------- /playground/ios/bundlejs/component/slider/slider-item.js: -------------------------------------------------------------------------------- 1 | /******/ (function(modules) { // webpackBootstrap 2 | /******/ // The module cache 3 | /******/ var installedModules = {}; 4 | 5 | /******/ // The require function 6 | /******/ function __webpack_require__(moduleId) { 7 | 8 | /******/ // Check if module is in cache 9 | /******/ if(installedModules[moduleId]) 10 | /******/ return installedModules[moduleId].exports; 11 | 12 | /******/ // Create a new module (and put it into the cache) 13 | /******/ var module = installedModules[moduleId] = { 14 | /******/ exports: {}, 15 | /******/ id: moduleId, 16 | /******/ loaded: false 17 | /******/ }; 18 | 19 | /******/ // Execute the module function 20 | /******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__); 21 | 22 | /******/ // Flag the module as loaded 23 | /******/ module.loaded = true; 24 | 25 | /******/ // Return the exports of the module 26 | /******/ return module.exports; 27 | /******/ } 28 | 29 | 30 | /******/ // expose the modules object (__webpack_modules__) 31 | /******/ __webpack_require__.m = modules; 32 | 33 | /******/ // expose the module cache 34 | /******/ __webpack_require__.c = installedModules; 35 | 36 | /******/ // __webpack_public_path__ 37 | /******/ __webpack_require__.p = ""; 38 | 39 | /******/ // Load entry module and return exports 40 | /******/ return __webpack_require__(0); 41 | /******/ }) 42 | /************************************************************************/ 43 | /******/ ({ 44 | 45 | /***/ 0: 46 | /***/ function(module, exports, __webpack_require__) { 47 | 48 | var __weex_template__ = __webpack_require__(162) 49 | var __weex_style__ = __webpack_require__(163) 50 | var __weex_script__ = __webpack_require__(164) 51 | 52 | __weex_define__('@weex-component/acad2f79d78cffd36dfaedd0c65d980d', [], function(__weex_require__, __weex_exports__, __weex_module__) { 53 | 54 | __weex_script__(__weex_module__, __weex_exports__, __weex_require__) 55 | if (__weex_exports__.__esModule && __weex_exports__.default) { 56 | __weex_module__.exports = __weex_exports__.default 57 | } 58 | 59 | __weex_module__.exports.template = __weex_template__ 60 | 61 | __weex_module__.exports.style = __weex_style__ 62 | 63 | }) 64 | 65 | __weex_bootstrap__('@weex-component/acad2f79d78cffd36dfaedd0c65d980d',undefined,undefined) 66 | 67 | /***/ }, 68 | 69 | /***/ 162: 70 | /***/ function(module, exports) { 71 | 72 | module.exports = { 73 | "type": "image", 74 | "classList": [ 75 | "slider-item" 76 | ], 77 | "attr": { 78 | "src": function () {return this.image} 79 | } 80 | } 81 | 82 | /***/ }, 83 | 84 | /***/ 163: 85 | /***/ function(module, exports) { 86 | 87 | module.exports = { 88 | "slider-item": { 89 | "width": 348, 90 | "height": 400 91 | } 92 | } 93 | 94 | /***/ }, 95 | 96 | /***/ 164: 97 | /***/ function(module, exports) { 98 | 99 | module.exports = function(module, exports, __weex_require__){'use strict'; 100 | 101 | module.exports = { 102 | data: function () {return { 103 | image: '', 104 | link: '', 105 | href: '' 106 | }}, 107 | methods: { 108 | ready: function ready() { 109 | this.href = this.link; 110 | } 111 | } 112 | };} 113 | /* generated by weex-loader */ 114 | 115 | 116 | /***/ } 117 | 118 | /******/ }); -------------------------------------------------------------------------------- /playground/ios/bundlejs/hello.js: -------------------------------------------------------------------------------- 1 | /******/ (function(modules) { // webpackBootstrap 2 | /******/ // The module cache 3 | /******/ var installedModules = {}; 4 | 5 | /******/ // The require function 6 | /******/ function __webpack_require__(moduleId) { 7 | 8 | /******/ // Check if module is in cache 9 | /******/ if(installedModules[moduleId]) 10 | /******/ return installedModules[moduleId].exports; 11 | 12 | /******/ // Create a new module (and put it into the cache) 13 | /******/ var module = installedModules[moduleId] = { 14 | /******/ exports: {}, 15 | /******/ id: moduleId, 16 | /******/ loaded: false 17 | /******/ }; 18 | 19 | /******/ // Execute the module function 20 | /******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__); 21 | 22 | /******/ // Flag the module as loaded 23 | /******/ module.loaded = true; 24 | 25 | /******/ // Return the exports of the module 26 | /******/ return module.exports; 27 | /******/ } 28 | 29 | 30 | /******/ // expose the modules object (__webpack_modules__) 31 | /******/ __webpack_require__.m = modules; 32 | 33 | /******/ // expose the module cache 34 | /******/ __webpack_require__.c = installedModules; 35 | 36 | /******/ // __webpack_public_path__ 37 | /******/ __webpack_require__.p = ""; 38 | 39 | /******/ // Load entry module and return exports 40 | /******/ return __webpack_require__(0); 41 | /******/ }) 42 | /************************************************************************/ 43 | /******/ ({ 44 | 45 | /***/ 0: 46 | /***/ function(module, exports, __webpack_require__) { 47 | 48 | var __weex_template__ = __webpack_require__(191) 49 | 50 | __weex_define__('@weex-component/3bfdbb5ef29172e6db527e1bc85ec8fd', [], function(__weex_require__, __weex_exports__, __weex_module__) { 51 | 52 | __weex_module__.exports.template = __weex_template__ 53 | 54 | }) 55 | 56 | __weex_bootstrap__('@weex-component/3bfdbb5ef29172e6db527e1bc85ec8fd',undefined,undefined) 57 | 58 | /***/ }, 59 | 60 | /***/ 191: 61 | /***/ function(module, exports) { 62 | 63 | module.exports = { 64 | "type": "div", 65 | "children": [ 66 | { 67 | "type": "text", 68 | "style": { 69 | "fontSize": 100 70 | }, 71 | "attr": { 72 | "value": "Hello World." 73 | } 74 | } 75 | ] 76 | } 77 | 78 | /***/ } 79 | 80 | /******/ }); -------------------------------------------------------------------------------- /playground/ios/bundlejs/showcase/new-fashion/banner.js: -------------------------------------------------------------------------------- 1 | /******/ (function(modules) { // webpackBootstrap 2 | /******/ // The module cache 3 | /******/ var installedModules = {}; 4 | 5 | /******/ // The require function 6 | /******/ function __webpack_require__(moduleId) { 7 | 8 | /******/ // Check if module is in cache 9 | /******/ if(installedModules[moduleId]) 10 | /******/ return installedModules[moduleId].exports; 11 | 12 | /******/ // Create a new module (and put it into the cache) 13 | /******/ var module = installedModules[moduleId] = { 14 | /******/ exports: {}, 15 | /******/ id: moduleId, 16 | /******/ loaded: false 17 | /******/ }; 18 | 19 | /******/ // Execute the module function 20 | /******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__); 21 | 22 | /******/ // Flag the module as loaded 23 | /******/ module.loaded = true; 24 | 25 | /******/ // Return the exports of the module 26 | /******/ return module.exports; 27 | /******/ } 28 | 29 | 30 | /******/ // expose the modules object (__webpack_modules__) 31 | /******/ __webpack_require__.m = modules; 32 | 33 | /******/ // expose the module cache 34 | /******/ __webpack_require__.c = installedModules; 35 | 36 | /******/ // __webpack_public_path__ 37 | /******/ __webpack_require__.p = ""; 38 | 39 | /******/ // Load entry module and return exports 40 | /******/ return __webpack_require__(0); 41 | /******/ }) 42 | /************************************************************************/ 43 | /******/ ({ 44 | 45 | /***/ 0: 46 | /***/ function(module, exports, __webpack_require__) { 47 | 48 | var __weex_template__ = __webpack_require__(242) 49 | var __weex_script__ = __webpack_require__(243) 50 | 51 | __weex_define__('@weex-component/df4a1d587e74e64ad99011cd2bcf06b7', [], function(__weex_require__, __weex_exports__, __weex_module__) { 52 | 53 | __weex_script__(__weex_module__, __weex_exports__, __weex_require__) 54 | if (__weex_exports__.__esModule && __weex_exports__.default) { 55 | __weex_module__.exports = __weex_exports__.default 56 | } 57 | 58 | __weex_module__.exports.template = __weex_template__ 59 | 60 | }) 61 | 62 | __weex_bootstrap__('@weex-component/df4a1d587e74e64ad99011cd2bcf06b7',undefined,undefined) 63 | 64 | /***/ }, 65 | 66 | /***/ 242: 67 | /***/ function(module, exports) { 68 | 69 | module.exports = { 70 | "type": "image", 71 | "style": { 72 | "width": function () {return this.width}, 73 | "height": function () {return this.height} 74 | }, 75 | "attr": { 76 | "src": function () {return this.src}, 77 | "imageQuality": function () {return this.quality} 78 | }, 79 | "events": { 80 | "click": "_clickHandler" 81 | } 82 | } 83 | 84 | /***/ }, 85 | 86 | /***/ 243: 87 | /***/ function(module, exports) { 88 | 89 | module.exports = function(module, exports, __weex_require__){'use strict'; 90 | 91 | module.exports = { 92 | data: function () {return { 93 | quality: 'normal', 94 | width: 0, 95 | height: 0, 96 | src: '', 97 | href: '', 98 | spmc: 0, 99 | spmd: 0 100 | }}, 101 | methods: { 102 | ready: function ready() {}, 103 | _clickHandler: function _clickHandler() { 104 | this.$call('modal', 'toast', { 105 | message: 'click', 106 | duration: 1 107 | }); 108 | } 109 | } 110 | };} 111 | /* generated by weex-loader */ 112 | 113 | 114 | /***/ } 115 | 116 | /******/ }); -------------------------------------------------------------------------------- /playground/ios/bundlejs/showcase/new-fashion/link.js: -------------------------------------------------------------------------------- 1 | /******/ (function(modules) { // webpackBootstrap 2 | /******/ // The module cache 3 | /******/ var installedModules = {}; 4 | 5 | /******/ // The require function 6 | /******/ function __webpack_require__(moduleId) { 7 | 8 | /******/ // Check if module is in cache 9 | /******/ if(installedModules[moduleId]) 10 | /******/ return installedModules[moduleId].exports; 11 | 12 | /******/ // Create a new module (and put it into the cache) 13 | /******/ var module = installedModules[moduleId] = { 14 | /******/ exports: {}, 15 | /******/ id: moduleId, 16 | /******/ loaded: false 17 | /******/ }; 18 | 19 | /******/ // Execute the module function 20 | /******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__); 21 | 22 | /******/ // Flag the module as loaded 23 | /******/ module.loaded = true; 24 | 25 | /******/ // Return the exports of the module 26 | /******/ return module.exports; 27 | /******/ } 28 | 29 | 30 | /******/ // expose the modules object (__webpack_modules__) 31 | /******/ __webpack_require__.m = modules; 32 | 33 | /******/ // expose the module cache 34 | /******/ __webpack_require__.c = installedModules; 35 | 36 | /******/ // __webpack_public_path__ 37 | /******/ __webpack_require__.p = ""; 38 | 39 | /******/ // Load entry module and return exports 40 | /******/ return __webpack_require__(0); 41 | /******/ }) 42 | /************************************************************************/ 43 | /******/ ({ 44 | 45 | /***/ 0: 46 | /***/ function(module, exports, __webpack_require__) { 47 | 48 | var __weex_template__ = __webpack_require__(264) 49 | var __weex_script__ = __webpack_require__(265) 50 | 51 | __weex_define__('@weex-component/4921d4510db0a127687a84f88dda307c', [], function(__weex_require__, __weex_exports__, __weex_module__) { 52 | 53 | __weex_script__(__weex_module__, __weex_exports__, __weex_require__) 54 | if (__weex_exports__.__esModule && __weex_exports__.default) { 55 | __weex_module__.exports = __weex_exports__.default 56 | } 57 | 58 | __weex_module__.exports.template = __weex_template__ 59 | 60 | }) 61 | 62 | __weex_bootstrap__('@weex-component/4921d4510db0a127687a84f88dda307c',undefined,undefined) 63 | 64 | /***/ }, 65 | 66 | /***/ 264: 67 | /***/ function(module, exports) { 68 | 69 | module.exports = { 70 | "type": "text", 71 | "classList": [ 72 | "link" 73 | ], 74 | "shown": function () {return this.href}, 75 | "events": { 76 | "click": "_clickHandler" 77 | }, 78 | "attr": { 79 | "value": function () {return this.text} 80 | } 81 | } 82 | 83 | /***/ }, 84 | 85 | /***/ 265: 86 | /***/ function(module, exports) { 87 | 88 | module.exports = function(module, exports, __weex_require__){'use strict'; 89 | 90 | module.exports = { 91 | data: function () {return { 92 | text: '', 93 | href: '' 94 | }}, 95 | methods: { 96 | _clickHandler: function _clickHandler() { 97 | this.$call('modal', 'toast', { 98 | message: 'click', 99 | duration: 1 100 | }); 101 | } 102 | } 103 | };} 104 | /* generated by weex-loader */ 105 | 106 | 107 | /***/ } 108 | 109 | /******/ }); -------------------------------------------------------------------------------- /playground/ios/bundlejs/style/style-item.js: -------------------------------------------------------------------------------- 1 | /******/ (function(modules) { // webpackBootstrap 2 | /******/ // The module cache 3 | /******/ var installedModules = {}; 4 | 5 | /******/ // The require function 6 | /******/ function __webpack_require__(moduleId) { 7 | 8 | /******/ // Check if module is in cache 9 | /******/ if(installedModules[moduleId]) 10 | /******/ return installedModules[moduleId].exports; 11 | 12 | /******/ // Create a new module (and put it into the cache) 13 | /******/ var module = installedModules[moduleId] = { 14 | /******/ exports: {}, 15 | /******/ id: moduleId, 16 | /******/ loaded: false 17 | /******/ }; 18 | 19 | /******/ // Execute the module function 20 | /******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__); 21 | 22 | /******/ // Flag the module as loaded 23 | /******/ module.loaded = true; 24 | 25 | /******/ // Return the exports of the module 26 | /******/ return module.exports; 27 | /******/ } 28 | 29 | 30 | /******/ // expose the modules object (__webpack_modules__) 31 | /******/ __webpack_require__.m = modules; 32 | 33 | /******/ // expose the module cache 34 | /******/ __webpack_require__.c = installedModules; 35 | 36 | /******/ // __webpack_public_path__ 37 | /******/ __webpack_require__.p = ""; 38 | 39 | /******/ // Load entry module and return exports 40 | /******/ return __webpack_require__(0); 41 | /******/ }) 42 | /************************************************************************/ 43 | /******/ ({ 44 | 45 | /***/ 0: 46 | /***/ function(module, exports, __webpack_require__) { 47 | 48 | var __weex_template__ = __webpack_require__(300) 49 | var __weex_style__ = __webpack_require__(301) 50 | var __weex_script__ = __webpack_require__(302) 51 | 52 | __weex_define__('@weex-component/db2a20e3c65e67c0f449e29c05c9d644', [], function(__weex_require__, __weex_exports__, __weex_module__) { 53 | 54 | __weex_script__(__weex_module__, __weex_exports__, __weex_require__) 55 | if (__weex_exports__.__esModule && __weex_exports__.default) { 56 | __weex_module__.exports = __weex_exports__.default 57 | } 58 | 59 | __weex_module__.exports.template = __weex_template__ 60 | 61 | __weex_module__.exports.style = __weex_style__ 62 | 63 | }) 64 | 65 | __weex_bootstrap__('@weex-component/db2a20e3c65e67c0f449e29c05c9d644',undefined,undefined) 66 | 67 | /***/ }, 68 | 69 | /***/ 300: 70 | /***/ function(module, exports) { 71 | 72 | module.exports = { 73 | "type": "text", 74 | "classList": [ 75 | "item", 76 | "txt" 77 | ], 78 | "attr": { 79 | "value": function () {return this.value} 80 | }, 81 | "style": { 82 | "backgroundColor": function () {return this.bgColor()} 83 | } 84 | } 85 | 86 | /***/ }, 87 | 88 | /***/ 301: 89 | /***/ function(module, exports) { 90 | 91 | module.exports = { 92 | "item": { 93 | "marginRight": 10, 94 | "width": 160, 95 | "height": 75, 96 | "paddingLeft": 8, 97 | "paddingRight": 8, 98 | "paddingTop": 8, 99 | "paddingBottom": 8 100 | }, 101 | "txt": { 102 | "color": "#eeeeee" 103 | } 104 | } 105 | 106 | /***/ }, 107 | 108 | /***/ 302: 109 | /***/ function(module, exports) { 110 | 111 | module.exports = function(module, exports, __weex_require__){'use strict'; 112 | 113 | module.exports = { 114 | data: function () {return { 115 | value: '', 116 | type: '0' }}, 117 | methods: { 118 | bgColor: function bgColor() { 119 | return this.type == '1' ? '#7BA3A8' : '#BEAD92'; 120 | } 121 | } 122 | };} 123 | /* generated by weex-loader */ 124 | 125 | 126 | /***/ } 127 | 128 | /******/ }); -------------------------------------------------------------------------------- /playground/ios/bundlejs/syntax/hello-world-1.js: -------------------------------------------------------------------------------- 1 | /******/ (function(modules) { // webpackBootstrap 2 | /******/ // The module cache 3 | /******/ var installedModules = {}; 4 | 5 | /******/ // The require function 6 | /******/ function __webpack_require__(moduleId) { 7 | 8 | /******/ // Check if module is in cache 9 | /******/ if(installedModules[moduleId]) 10 | /******/ return installedModules[moduleId].exports; 11 | 12 | /******/ // Create a new module (and put it into the cache) 13 | /******/ var module = installedModules[moduleId] = { 14 | /******/ exports: {}, 15 | /******/ id: moduleId, 16 | /******/ loaded: false 17 | /******/ }; 18 | 19 | /******/ // Execute the module function 20 | /******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__); 21 | 22 | /******/ // Flag the module as loaded 23 | /******/ module.loaded = true; 24 | 25 | /******/ // Return the exports of the module 26 | /******/ return module.exports; 27 | /******/ } 28 | 29 | 30 | /******/ // expose the modules object (__webpack_modules__) 31 | /******/ __webpack_require__.m = modules; 32 | 33 | /******/ // expose the module cache 34 | /******/ __webpack_require__.c = installedModules; 35 | 36 | /******/ // __webpack_public_path__ 37 | /******/ __webpack_require__.p = ""; 38 | 39 | /******/ // Load entry module and return exports 40 | /******/ return __webpack_require__(0); 41 | /******/ }) 42 | /************************************************************************/ 43 | /******/ ({ 44 | 45 | /***/ 0: 46 | /***/ function(module, exports, __webpack_require__) { 47 | 48 | var __weex_template__ = __webpack_require__(316) 49 | 50 | __weex_define__('@weex-component/5e6bbced7515fc4165499153f5d8276a', [], function(__weex_require__, __weex_exports__, __weex_module__) { 51 | 52 | __weex_module__.exports.template = __weex_template__ 53 | 54 | }) 55 | 56 | __weex_bootstrap__('@weex-component/5e6bbced7515fc4165499153f5d8276a',undefined,undefined) 57 | 58 | /***/ }, 59 | 60 | /***/ 316: 61 | /***/ function(module, exports) { 62 | 63 | module.exports = { 64 | "type": "div", 65 | "children": [ 66 | { 67 | "type": "text", 68 | "attr": { 69 | "value": "Hello World" 70 | } 71 | } 72 | ] 73 | } 74 | 75 | /***/ } 76 | 77 | /******/ }); -------------------------------------------------------------------------------- /playground/ios/bundlejs/syntax/hello-world-2.js: -------------------------------------------------------------------------------- 1 | /******/ (function(modules) { // webpackBootstrap 2 | /******/ // The module cache 3 | /******/ var installedModules = {}; 4 | 5 | /******/ // The require function 6 | /******/ function __webpack_require__(moduleId) { 7 | 8 | /******/ // Check if module is in cache 9 | /******/ if(installedModules[moduleId]) 10 | /******/ return installedModules[moduleId].exports; 11 | 12 | /******/ // Create a new module (and put it into the cache) 13 | /******/ var module = installedModules[moduleId] = { 14 | /******/ exports: {}, 15 | /******/ id: moduleId, 16 | /******/ loaded: false 17 | /******/ }; 18 | 19 | /******/ // Execute the module function 20 | /******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__); 21 | 22 | /******/ // Flag the module as loaded 23 | /******/ module.loaded = true; 24 | 25 | /******/ // Return the exports of the module 26 | /******/ return module.exports; 27 | /******/ } 28 | 29 | 30 | /******/ // expose the modules object (__webpack_modules__) 31 | /******/ __webpack_require__.m = modules; 32 | 33 | /******/ // expose the module cache 34 | /******/ __webpack_require__.c = installedModules; 35 | 36 | /******/ // __webpack_public_path__ 37 | /******/ __webpack_require__.p = ""; 38 | 39 | /******/ // Load entry module and return exports 40 | /******/ return __webpack_require__(0); 41 | /******/ }) 42 | /************************************************************************/ 43 | /******/ ({ 44 | 45 | /***/ 0: 46 | /***/ function(module, exports, __webpack_require__) { 47 | 48 | var __weex_template__ = __webpack_require__(317) 49 | 50 | __weex_define__('@weex-component/25608f094c039b891a20c8161b9c650b', [], function(__weex_require__, __weex_exports__, __weex_module__) { 51 | 52 | __weex_module__.exports.template = __weex_template__ 53 | 54 | }) 55 | 56 | __weex_bootstrap__('@weex-component/25608f094c039b891a20c8161b9c650b',undefined,undefined) 57 | 58 | /***/ }, 59 | 60 | /***/ 317: 61 | /***/ function(module, exports) { 62 | 63 | module.exports = { 64 | "type": "div", 65 | "style": { 66 | "alignItems": "center", 67 | "marginTop": 120 68 | }, 69 | "children": [ 70 | { 71 | "type": "image", 72 | "attr": { 73 | "src": "https://alibaba.github.io/weex/img/weex_logo_blue@3x.png" 74 | }, 75 | "style": { 76 | "width": 360, 77 | "height": 82 78 | } 79 | }, 80 | { 81 | "type": "text", 82 | "style": { 83 | "fontSize": 48 84 | }, 85 | "attr": { 86 | "value": "Hello World" 87 | } 88 | } 89 | ] 90 | } 91 | 92 | /***/ } 93 | 94 | /******/ }); -------------------------------------------------------------------------------- /playground/ios/bundlejs/syntax/hello-world-3.js: -------------------------------------------------------------------------------- 1 | /******/ (function(modules) { // webpackBootstrap 2 | /******/ // The module cache 3 | /******/ var installedModules = {}; 4 | 5 | /******/ // The require function 6 | /******/ function __webpack_require__(moduleId) { 7 | 8 | /******/ // Check if module is in cache 9 | /******/ if(installedModules[moduleId]) 10 | /******/ return installedModules[moduleId].exports; 11 | 12 | /******/ // Create a new module (and put it into the cache) 13 | /******/ var module = installedModules[moduleId] = { 14 | /******/ exports: {}, 15 | /******/ id: moduleId, 16 | /******/ loaded: false 17 | /******/ }; 18 | 19 | /******/ // Execute the module function 20 | /******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__); 21 | 22 | /******/ // Flag the module as loaded 23 | /******/ module.loaded = true; 24 | 25 | /******/ // Return the exports of the module 26 | /******/ return module.exports; 27 | /******/ } 28 | 29 | 30 | /******/ // expose the modules object (__webpack_modules__) 31 | /******/ __webpack_require__.m = modules; 32 | 33 | /******/ // expose the module cache 34 | /******/ __webpack_require__.c = installedModules; 35 | 36 | /******/ // __webpack_public_path__ 37 | /******/ __webpack_require__.p = ""; 38 | 39 | /******/ // Load entry module and return exports 40 | /******/ return __webpack_require__(0); 41 | /******/ }) 42 | /************************************************************************/ 43 | /******/ ({ 44 | 45 | /***/ 0: 46 | /***/ function(module, exports, __webpack_require__) { 47 | 48 | var __weex_template__ = __webpack_require__(318) 49 | var __weex_style__ = __webpack_require__(319) 50 | 51 | __weex_define__('@weex-component/695862caffb746fa67bb70cbd1bb819e', [], function(__weex_require__, __weex_exports__, __weex_module__) { 52 | 53 | __weex_module__.exports.template = __weex_template__ 54 | 55 | __weex_module__.exports.style = __weex_style__ 56 | 57 | }) 58 | 59 | __weex_bootstrap__('@weex-component/695862caffb746fa67bb70cbd1bb819e',undefined,undefined) 60 | 61 | /***/ }, 62 | 63 | /***/ 318: 64 | /***/ function(module, exports) { 65 | 66 | module.exports = { 67 | "type": "div", 68 | "classList": [ 69 | "wrapper" 70 | ], 71 | "children": [ 72 | { 73 | "type": "image", 74 | "attr": { 75 | "src": "https://alibaba.github.io/weex/img/weex_logo_blue@3x.png" 76 | }, 77 | "classList": [ 78 | "logo" 79 | ] 80 | }, 81 | { 82 | "type": "text", 83 | "classList": [ 84 | "title" 85 | ], 86 | "attr": { 87 | "value": "Hello World" 88 | } 89 | } 90 | ] 91 | } 92 | 93 | /***/ }, 94 | 95 | /***/ 319: 96 | /***/ function(module, exports) { 97 | 98 | module.exports = { 99 | "wrapper": { 100 | "alignItems": "center", 101 | "marginTop": 120 102 | }, 103 | "title": { 104 | "fontSize": 48 105 | }, 106 | "logo": { 107 | "width": 360, 108 | "height": 82 109 | } 110 | } 111 | 112 | /***/ } 113 | 114 | /******/ }); -------------------------------------------------------------------------------- /playground/ios/bundlejs/syntax/hello-world-4.js: -------------------------------------------------------------------------------- 1 | /******/ (function(modules) { // webpackBootstrap 2 | /******/ // The module cache 3 | /******/ var installedModules = {}; 4 | 5 | /******/ // The require function 6 | /******/ function __webpack_require__(moduleId) { 7 | 8 | /******/ // Check if module is in cache 9 | /******/ if(installedModules[moduleId]) 10 | /******/ return installedModules[moduleId].exports; 11 | 12 | /******/ // Create a new module (and put it into the cache) 13 | /******/ var module = installedModules[moduleId] = { 14 | /******/ exports: {}, 15 | /******/ id: moduleId, 16 | /******/ loaded: false 17 | /******/ }; 18 | 19 | /******/ // Execute the module function 20 | /******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__); 21 | 22 | /******/ // Flag the module as loaded 23 | /******/ module.loaded = true; 24 | 25 | /******/ // Return the exports of the module 26 | /******/ return module.exports; 27 | /******/ } 28 | 29 | 30 | /******/ // expose the modules object (__webpack_modules__) 31 | /******/ __webpack_require__.m = modules; 32 | 33 | /******/ // expose the module cache 34 | /******/ __webpack_require__.c = installedModules; 35 | 36 | /******/ // __webpack_public_path__ 37 | /******/ __webpack_require__.p = ""; 38 | 39 | /******/ // Load entry module and return exports 40 | /******/ return __webpack_require__(0); 41 | /******/ }) 42 | /************************************************************************/ 43 | /******/ ({ 44 | 45 | /***/ 0: 46 | /***/ function(module, exports, __webpack_require__) { 47 | 48 | var __weex_template__ = __webpack_require__(320) 49 | var __weex_style__ = __webpack_require__(321) 50 | var __weex_script__ = __webpack_require__(322) 51 | 52 | __weex_define__('@weex-component/efbfb8ecf417c1cf14746fdf4099343d', [], function(__weex_require__, __weex_exports__, __weex_module__) { 53 | 54 | __weex_script__(__weex_module__, __weex_exports__, __weex_require__) 55 | if (__weex_exports__.__esModule && __weex_exports__.default) { 56 | __weex_module__.exports = __weex_exports__.default 57 | } 58 | 59 | __weex_module__.exports.template = __weex_template__ 60 | 61 | __weex_module__.exports.style = __weex_style__ 62 | 63 | }) 64 | 65 | __weex_bootstrap__('@weex-component/efbfb8ecf417c1cf14746fdf4099343d',undefined,undefined) 66 | 67 | /***/ }, 68 | 69 | /***/ 320: 70 | /***/ function(module, exports) { 71 | 72 | module.exports = { 73 | "type": "div", 74 | "classList": [ 75 | "wrapper" 76 | ], 77 | "children": [ 78 | { 79 | "type": "image", 80 | "attr": { 81 | "src": function () {return this.logoUrl} 82 | }, 83 | "classList": [ 84 | "logo" 85 | ] 86 | }, 87 | { 88 | "type": "text", 89 | "classList": [ 90 | "title" 91 | ], 92 | "attr": { 93 | "value": function () {return 'Hello ' + (this.target)} 94 | } 95 | } 96 | ] 97 | } 98 | 99 | /***/ }, 100 | 101 | /***/ 321: 102 | /***/ function(module, exports) { 103 | 104 | module.exports = { 105 | "wrapper": { 106 | "alignItems": "center", 107 | "marginTop": 120 108 | }, 109 | "title": { 110 | "fontSize": 48 111 | }, 112 | "logo": { 113 | "width": 360, 114 | "height": 82 115 | } 116 | } 117 | 118 | /***/ }, 119 | 120 | /***/ 322: 121 | /***/ function(module, exports) { 122 | 123 | module.exports = function(module, exports, __weex_require__){'use strict'; 124 | 125 | module.exports = { 126 | data: function () {return { 127 | logoUrl: 'https://alibaba.github.io/weex/img/weex_logo_blue@3x.png', 128 | target: 'World' 129 | }} 130 | };} 131 | /* generated by weex-loader */ 132 | 133 | 134 | /***/ } 135 | 136 | /******/ }); -------------------------------------------------------------------------------- /playground/ios/bundlejs/syntax/hello-world-5.js: -------------------------------------------------------------------------------- 1 | /******/ (function(modules) { // webpackBootstrap 2 | /******/ // The module cache 3 | /******/ var installedModules = {}; 4 | 5 | /******/ // The require function 6 | /******/ function __webpack_require__(moduleId) { 7 | 8 | /******/ // Check if module is in cache 9 | /******/ if(installedModules[moduleId]) 10 | /******/ return installedModules[moduleId].exports; 11 | 12 | /******/ // Create a new module (and put it into the cache) 13 | /******/ var module = installedModules[moduleId] = { 14 | /******/ exports: {}, 15 | /******/ id: moduleId, 16 | /******/ loaded: false 17 | /******/ }; 18 | 19 | /******/ // Execute the module function 20 | /******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__); 21 | 22 | /******/ // Flag the module as loaded 23 | /******/ module.loaded = true; 24 | 25 | /******/ // Return the exports of the module 26 | /******/ return module.exports; 27 | /******/ } 28 | 29 | 30 | /******/ // expose the modules object (__webpack_modules__) 31 | /******/ __webpack_require__.m = modules; 32 | 33 | /******/ // expose the module cache 34 | /******/ __webpack_require__.c = installedModules; 35 | 36 | /******/ // __webpack_public_path__ 37 | /******/ __webpack_require__.p = ""; 38 | 39 | /******/ // Load entry module and return exports 40 | /******/ return __webpack_require__(0); 41 | /******/ }) 42 | /************************************************************************/ 43 | /******/ ({ 44 | 45 | /***/ 0: 46 | /***/ function(module, exports, __webpack_require__) { 47 | 48 | var __weex_template__ = __webpack_require__(323) 49 | var __weex_style__ = __webpack_require__(324) 50 | var __weex_script__ = __webpack_require__(325) 51 | 52 | __weex_define__('@weex-component/06cb3b1cf32d7e68eb4f41a491128601', [], function(__weex_require__, __weex_exports__, __weex_module__) { 53 | 54 | __weex_script__(__weex_module__, __weex_exports__, __weex_require__) 55 | if (__weex_exports__.__esModule && __weex_exports__.default) { 56 | __weex_module__.exports = __weex_exports__.default 57 | } 58 | 59 | __weex_module__.exports.template = __weex_template__ 60 | 61 | __weex_module__.exports.style = __weex_style__ 62 | 63 | }) 64 | 65 | __weex_bootstrap__('@weex-component/06cb3b1cf32d7e68eb4f41a491128601',undefined,undefined) 66 | 67 | /***/ }, 68 | 69 | /***/ 323: 70 | /***/ function(module, exports) { 71 | 72 | module.exports = { 73 | "type": "div", 74 | "classList": [ 75 | "wrapper" 76 | ], 77 | "events": { 78 | "click": "update" 79 | }, 80 | "children": [ 81 | { 82 | "type": "image", 83 | "attr": { 84 | "src": function () {return this.logoUrl} 85 | }, 86 | "classList": [ 87 | "logo" 88 | ] 89 | }, 90 | { 91 | "type": "text", 92 | "classList": [ 93 | "title" 94 | ], 95 | "attr": { 96 | "value": function () {return 'Hello ' + (this.target)} 97 | } 98 | } 99 | ] 100 | } 101 | 102 | /***/ }, 103 | 104 | /***/ 324: 105 | /***/ function(module, exports) { 106 | 107 | module.exports = { 108 | "wrapper": { 109 | "alignItems": "center", 110 | "marginTop": 120 111 | }, 112 | "title": { 113 | "fontSize": 48 114 | }, 115 | "logo": { 116 | "width": 360, 117 | "height": 82 118 | } 119 | } 120 | 121 | /***/ }, 122 | 123 | /***/ 325: 124 | /***/ function(module, exports) { 125 | 126 | module.exports = function(module, exports, __weex_require__){'use strict'; 127 | 128 | module.exports = { 129 | data: function () {return { 130 | logoUrl: 'https://alibaba.github.io/weex/img/weex_logo_blue@3x.png', 131 | target: 'World' 132 | }}, 133 | methods: { 134 | update: function update(e) { 135 | this.target = 'Weex'; 136 | } 137 | } 138 | };} 139 | /* generated by weex-loader */ 140 | 141 | 142 | /***/ } 143 | 144 | /******/ }); -------------------------------------------------------------------------------- /playground/ios/bundlejs/syntax/hello-world.js: -------------------------------------------------------------------------------- 1 | /******/ (function(modules) { // webpackBootstrap 2 | /******/ // The module cache 3 | /******/ var installedModules = {}; 4 | 5 | /******/ // The require function 6 | /******/ function __webpack_require__(moduleId) { 7 | 8 | /******/ // Check if module is in cache 9 | /******/ if(installedModules[moduleId]) 10 | /******/ return installedModules[moduleId].exports; 11 | 12 | /******/ // Create a new module (and put it into the cache) 13 | /******/ var module = installedModules[moduleId] = { 14 | /******/ exports: {}, 15 | /******/ id: moduleId, 16 | /******/ loaded: false 17 | /******/ }; 18 | 19 | /******/ // Execute the module function 20 | /******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__); 21 | 22 | /******/ // Flag the module as loaded 23 | /******/ module.loaded = true; 24 | 25 | /******/ // Return the exports of the module 26 | /******/ return module.exports; 27 | /******/ } 28 | 29 | 30 | /******/ // expose the modules object (__webpack_modules__) 31 | /******/ __webpack_require__.m = modules; 32 | 33 | /******/ // expose the module cache 34 | /******/ __webpack_require__.c = installedModules; 35 | 36 | /******/ // __webpack_public_path__ 37 | /******/ __webpack_require__.p = ""; 38 | 39 | /******/ // Load entry module and return exports 40 | /******/ return __webpack_require__(0); 41 | /******/ }) 42 | /************************************************************************/ 43 | /******/ ({ 44 | 45 | /***/ 0: 46 | /***/ function(module, exports, __webpack_require__) { 47 | 48 | var __weex_template__ = __webpack_require__(313) 49 | var __weex_style__ = __webpack_require__(314) 50 | var __weex_script__ = __webpack_require__(315) 51 | 52 | __weex_define__('@weex-component/ca86dd7272942388d48952706d37e8a7', [], function(__weex_require__, __weex_exports__, __weex_module__) { 53 | 54 | __weex_script__(__weex_module__, __weex_exports__, __weex_require__) 55 | if (__weex_exports__.__esModule && __weex_exports__.default) { 56 | __weex_module__.exports = __weex_exports__.default 57 | } 58 | 59 | __weex_module__.exports.template = __weex_template__ 60 | 61 | __weex_module__.exports.style = __weex_style__ 62 | 63 | }) 64 | 65 | __weex_bootstrap__('@weex-component/ca86dd7272942388d48952706d37e8a7',undefined,undefined) 66 | 67 | /***/ }, 68 | 69 | /***/ 313: 70 | /***/ function(module, exports) { 71 | 72 | module.exports = { 73 | "type": "div", 74 | "classList": [ 75 | "wrapper" 76 | ], 77 | "events": { 78 | "click": "update" 79 | }, 80 | "children": [ 81 | { 82 | "type": "image", 83 | "attr": { 84 | "src": function () {return this.logoUrl} 85 | }, 86 | "classList": [ 87 | "logo" 88 | ] 89 | }, 90 | { 91 | "type": "text", 92 | "classList": [ 93 | "title" 94 | ], 95 | "attr": { 96 | "value": function () {return 'Hello ' + (this.target)} 97 | } 98 | } 99 | ] 100 | } 101 | 102 | /***/ }, 103 | 104 | /***/ 314: 105 | /***/ function(module, exports) { 106 | 107 | module.exports = { 108 | "wrapper": { 109 | "alignItems": "center", 110 | "marginTop": 120 111 | }, 112 | "title": { 113 | "fontSize": 48 114 | }, 115 | "logo": { 116 | "width": 360, 117 | "height": 82 118 | } 119 | } 120 | 121 | /***/ }, 122 | 123 | /***/ 315: 124 | /***/ function(module, exports) { 125 | 126 | module.exports = function(module, exports, __weex_require__){'use strict'; 127 | 128 | module.exports = { 129 | data: function () {return { 130 | logoUrl: 'https://alibaba.github.io/weex/img/weex_logo_blue@3x.png', 131 | target: 'World' 132 | }}, 133 | methods: { 134 | update: function update(e) { 135 | this.target = 'Weex'; 136 | } 137 | } 138 | };} 139 | /* generated by weex-loader */ 140 | 141 | 142 | /***/ } 143 | 144 | /******/ }); -------------------------------------------------------------------------------- /playground/ios/bundlejs/syntax/script-instance.js: -------------------------------------------------------------------------------- 1 | /******/ (function(modules) { // webpackBootstrap 2 | /******/ // The module cache 3 | /******/ var installedModules = {}; 4 | 5 | /******/ // The require function 6 | /******/ function __webpack_require__(moduleId) { 7 | 8 | /******/ // Check if module is in cache 9 | /******/ if(installedModules[moduleId]) 10 | /******/ return installedModules[moduleId].exports; 11 | 12 | /******/ // Create a new module (and put it into the cache) 13 | /******/ var module = installedModules[moduleId] = { 14 | /******/ exports: {}, 15 | /******/ id: moduleId, 16 | /******/ loaded: false 17 | /******/ }; 18 | 19 | /******/ // Execute the module function 20 | /******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__); 21 | 22 | /******/ // Flag the module as loaded 23 | /******/ module.loaded = true; 24 | 25 | /******/ // Return the exports of the module 26 | /******/ return module.exports; 27 | /******/ } 28 | 29 | 30 | /******/ // expose the modules object (__webpack_modules__) 31 | /******/ __webpack_require__.m = modules; 32 | 33 | /******/ // expose the module cache 34 | /******/ __webpack_require__.c = installedModules; 35 | 36 | /******/ // __webpack_public_path__ 37 | /******/ __webpack_require__.p = ""; 38 | 39 | /******/ // Load entry module and return exports 40 | /******/ return __webpack_require__(0); 41 | /******/ }) 42 | /************************************************************************/ 43 | /******/ ({ 44 | 45 | /***/ 0: 46 | /***/ function(module, exports, __webpack_require__) { 47 | 48 | var __weex_template__ = __webpack_require__(340) 49 | var __weex_style__ = __webpack_require__(341) 50 | var __weex_script__ = __webpack_require__(342) 51 | 52 | __weex_define__('@weex-component/e463d05fb45b7117577286bed2b723ab', [], function(__weex_require__, __weex_exports__, __weex_module__) { 53 | 54 | __weex_script__(__weex_module__, __weex_exports__, __weex_require__) 55 | if (__weex_exports__.__esModule && __weex_exports__.default) { 56 | __weex_module__.exports = __weex_exports__.default 57 | } 58 | 59 | __weex_module__.exports.template = __weex_template__ 60 | 61 | __weex_module__.exports.style = __weex_style__ 62 | 63 | }) 64 | 65 | __weex_bootstrap__('@weex-component/e463d05fb45b7117577286bed2b723ab',undefined,undefined) 66 | 67 | /***/ }, 68 | 69 | /***/ 340: 70 | /***/ function(module, exports) { 71 | 72 | module.exports = { 73 | "type": "div", 74 | "children": [ 75 | { 76 | "type": "text", 77 | "id": "title", 78 | "classList": [ 79 | "title" 80 | ], 81 | "attr": { 82 | "value": "Please check out the source code." 83 | } 84 | } 85 | ] 86 | } 87 | 88 | /***/ }, 89 | 90 | /***/ 341: 91 | /***/ function(module, exports) { 92 | 93 | module.exports = { 94 | "title": { 95 | "fontSize": 48 96 | } 97 | } 98 | 99 | /***/ }, 100 | 101 | /***/ 342: 102 | /***/ function(module, exports) { 103 | 104 | module.exports = function(module, exports, __weex_require__){'use strict'; 105 | 106 | module.exports = { 107 | data: function () {return { 108 | x: 1, 109 | y: 2 110 | }}, 111 | methods: { 112 | foo: function foo() { 113 | console.log('foo'); 114 | }, 115 | test: function test() { 116 | console.log(this.x); 117 | 118 | console.log(this.z); 119 | 120 | this.foo(); 121 | 122 | console.log(this.$getConfig()); 123 | 124 | this.$emit('custom'); 125 | this.$dispatch('custom'); 126 | this.$broadcast('custom'); 127 | this.$on('custom', this.foo); 128 | this.$off('custom', this.foo); 129 | } 130 | }, 131 | computed: { 132 | z: function z() { 133 | return this.x + this.y; 134 | } 135 | }, 136 | ready: function ready() { 137 | this.test(); 138 | } 139 | };} 140 | /* generated by weex-loader */ 141 | 142 | 143 | /***/ } 144 | 145 | /******/ }); -------------------------------------------------------------------------------- /playground/ios/bundlejs/syntax/script-lifecycle.js: -------------------------------------------------------------------------------- 1 | /******/ (function(modules) { // webpackBootstrap 2 | /******/ // The module cache 3 | /******/ var installedModules = {}; 4 | 5 | /******/ // The require function 6 | /******/ function __webpack_require__(moduleId) { 7 | 8 | /******/ // Check if module is in cache 9 | /******/ if(installedModules[moduleId]) 10 | /******/ return installedModules[moduleId].exports; 11 | 12 | /******/ // Create a new module (and put it into the cache) 13 | /******/ var module = installedModules[moduleId] = { 14 | /******/ exports: {}, 15 | /******/ id: moduleId, 16 | /******/ loaded: false 17 | /******/ }; 18 | 19 | /******/ // Execute the module function 20 | /******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__); 21 | 22 | /******/ // Flag the module as loaded 23 | /******/ module.loaded = true; 24 | 25 | /******/ // Return the exports of the module 26 | /******/ return module.exports; 27 | /******/ } 28 | 29 | 30 | /******/ // expose the modules object (__webpack_modules__) 31 | /******/ __webpack_require__.m = modules; 32 | 33 | /******/ // expose the module cache 34 | /******/ __webpack_require__.c = installedModules; 35 | 36 | /******/ // __webpack_public_path__ 37 | /******/ __webpack_require__.p = ""; 38 | 39 | /******/ // Load entry module and return exports 40 | /******/ return __webpack_require__(0); 41 | /******/ }) 42 | /************************************************************************/ 43 | /******/ ({ 44 | 45 | /***/ 0: 46 | /***/ function(module, exports, __webpack_require__) { 47 | 48 | var __weex_template__ = __webpack_require__(343) 49 | var __weex_style__ = __webpack_require__(344) 50 | var __weex_script__ = __webpack_require__(345) 51 | 52 | __weex_define__('@weex-component/bc7273b0d417cff1bb0a2e09e3cd1c92', [], function(__weex_require__, __weex_exports__, __weex_module__) { 53 | 54 | __weex_script__(__weex_module__, __weex_exports__, __weex_require__) 55 | if (__weex_exports__.__esModule && __weex_exports__.default) { 56 | __weex_module__.exports = __weex_exports__.default 57 | } 58 | 59 | __weex_module__.exports.template = __weex_template__ 60 | 61 | __weex_module__.exports.style = __weex_style__ 62 | 63 | }) 64 | 65 | __weex_bootstrap__('@weex-component/bc7273b0d417cff1bb0a2e09e3cd1c92',undefined,undefined) 66 | 67 | /***/ }, 68 | 69 | /***/ 343: 70 | /***/ function(module, exports) { 71 | 72 | module.exports = { 73 | "type": "div", 74 | "children": [ 75 | { 76 | "type": "text", 77 | "classList": [ 78 | "title" 79 | ], 80 | "repeat": { 81 | "expression": function () {return this.list}, 82 | "value": "value" 83 | }, 84 | "attr": { 85 | "value": function () {return this.value} 86 | } 87 | } 88 | ] 89 | } 90 | 91 | /***/ }, 92 | 93 | /***/ 344: 94 | /***/ function(module, exports) { 95 | 96 | module.exports = { 97 | "title": { 98 | "fontSize": 48 99 | } 100 | } 101 | 102 | /***/ }, 103 | 104 | /***/ 345: 105 | /***/ function(module, exports) { 106 | 107 | module.exports = function(module, exports, __weex_require__){'use strict'; 108 | 109 | var initMessage; 110 | module.exports = { 111 | data: function () {return { 112 | list: ['Lifecycle List'] 113 | }}, 114 | init: function init() { 115 | initMessage = 'component init: nothing more happen even the data initialization'; 116 | }, 117 | created: function created() { 118 | this.list.push(initMessage); 119 | this.list.push('component created: data init and observed'); 120 | }, 121 | ready: function ready() { 122 | this.list.push('component ready: virtual dom generated'); 123 | } 124 | };} 125 | /* generated by weex-loader */ 126 | 127 | 128 | /***/ } 129 | 130 | /******/ }); -------------------------------------------------------------------------------- /playground/ios/bundlejs/syntax/script-module.js: -------------------------------------------------------------------------------- 1 | /******/ (function(modules) { // webpackBootstrap 2 | /******/ // The module cache 3 | /******/ var installedModules = {}; 4 | 5 | /******/ // The require function 6 | /******/ function __webpack_require__(moduleId) { 7 | 8 | /******/ // Check if module is in cache 9 | /******/ if(installedModules[moduleId]) 10 | /******/ return installedModules[moduleId].exports; 11 | 12 | /******/ // Create a new module (and put it into the cache) 13 | /******/ var module = installedModules[moduleId] = { 14 | /******/ exports: {}, 15 | /******/ id: moduleId, 16 | /******/ loaded: false 17 | /******/ }; 18 | 19 | /******/ // Execute the module function 20 | /******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__); 21 | 22 | /******/ // Flag the module as loaded 23 | /******/ module.loaded = true; 24 | 25 | /******/ // Return the exports of the module 26 | /******/ return module.exports; 27 | /******/ } 28 | 29 | 30 | /******/ // expose the modules object (__webpack_modules__) 31 | /******/ __webpack_require__.m = modules; 32 | 33 | /******/ // expose the module cache 34 | /******/ __webpack_require__.c = installedModules; 35 | 36 | /******/ // __webpack_public_path__ 37 | /******/ __webpack_require__.p = ""; 38 | 39 | /******/ // Load entry module and return exports 40 | /******/ return __webpack_require__(0); 41 | /******/ }) 42 | /************************************************************************/ 43 | /******/ ({ 44 | 45 | /***/ 0: 46 | /***/ function(module, exports, __webpack_require__) { 47 | 48 | var __weex_template__ = __webpack_require__(346) 49 | var __weex_style__ = __webpack_require__(347) 50 | var __weex_script__ = __webpack_require__(348) 51 | 52 | __weex_define__('@weex-component/0c363fe819262ec8f8baf1e516e1d694', [], function(__weex_require__, __weex_exports__, __weex_module__) { 53 | 54 | __weex_script__(__weex_module__, __weex_exports__, __weex_require__) 55 | if (__weex_exports__.__esModule && __weex_exports__.default) { 56 | __weex_module__.exports = __weex_exports__.default 57 | } 58 | 59 | __weex_module__.exports.template = __weex_template__ 60 | 61 | __weex_module__.exports.style = __weex_style__ 62 | 63 | }) 64 | 65 | __weex_bootstrap__('@weex-component/0c363fe819262ec8f8baf1e516e1d694',undefined,undefined) 66 | 67 | /***/ }, 68 | 69 | /***/ 346: 70 | /***/ function(module, exports) { 71 | 72 | module.exports = { 73 | "type": "div", 74 | "children": [ 75 | { 76 | "type": "text", 77 | "classList": [ 78 | "btn" 79 | ], 80 | "events": { 81 | "click": "test" 82 | }, 83 | "attr": { 84 | "value": "Toast!" 85 | } 86 | } 87 | ] 88 | } 89 | 90 | /***/ }, 91 | 92 | /***/ 347: 93 | /***/ function(module, exports) { 94 | 95 | module.exports = { 96 | "btn": { 97 | "fontSize": 36, 98 | "textAlign": "center", 99 | "color": "#FFFFFF", 100 | "backgroundColor": "#808080", 101 | "padding": 20, 102 | "borderRadius": 5 103 | } 104 | } 105 | 106 | /***/ }, 107 | 108 | /***/ 348: 109 | /***/ function(module, exports) { 110 | 111 | module.exports = function(module, exports, __weex_require__){'use strict'; 112 | 113 | var modal = __weex_require__('@weex-module/modal'); 114 | module.exports = { 115 | methods: { 116 | test: function test() { 117 | modal.toast({ 118 | message: 'Toast!', 119 | duration: 3 120 | }); 121 | } 122 | } 123 | };} 124 | /* generated by weex-loader */ 125 | 126 | 127 | /***/ } 128 | 129 | /******/ }); -------------------------------------------------------------------------------- /playground/ios/bundlejs/syntax/script-options.js: -------------------------------------------------------------------------------- 1 | /******/ (function(modules) { // webpackBootstrap 2 | /******/ // The module cache 3 | /******/ var installedModules = {}; 4 | 5 | /******/ // The require function 6 | /******/ function __webpack_require__(moduleId) { 7 | 8 | /******/ // Check if module is in cache 9 | /******/ if(installedModules[moduleId]) 10 | /******/ return installedModules[moduleId].exports; 11 | 12 | /******/ // Create a new module (and put it into the cache) 13 | /******/ var module = installedModules[moduleId] = { 14 | /******/ exports: {}, 15 | /******/ id: moduleId, 16 | /******/ loaded: false 17 | /******/ }; 18 | 19 | /******/ // Execute the module function 20 | /******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__); 21 | 22 | /******/ // Flag the module as loaded 23 | /******/ module.loaded = true; 24 | 25 | /******/ // Return the exports of the module 26 | /******/ return module.exports; 27 | /******/ } 28 | 29 | 30 | /******/ // expose the modules object (__webpack_modules__) 31 | /******/ __webpack_require__.m = modules; 32 | 33 | /******/ // expose the module cache 34 | /******/ __webpack_require__.c = installedModules; 35 | 36 | /******/ // __webpack_public_path__ 37 | /******/ __webpack_require__.p = ""; 38 | 39 | /******/ // Load entry module and return exports 40 | /******/ return __webpack_require__(0); 41 | /******/ }) 42 | /************************************************************************/ 43 | /******/ ({ 44 | 45 | /***/ 0: 46 | /***/ function(module, exports, __webpack_require__) { 47 | 48 | var __weex_template__ = __webpack_require__(349) 49 | var __weex_style__ = __webpack_require__(350) 50 | var __weex_script__ = __webpack_require__(351) 51 | 52 | __weex_define__('@weex-component/d8cdc8a8832b252e92de2e6e8a50dd36', [], function(__weex_require__, __weex_exports__, __weex_module__) { 53 | 54 | __weex_script__(__weex_module__, __weex_exports__, __weex_require__) 55 | if (__weex_exports__.__esModule && __weex_exports__.default) { 56 | __weex_module__.exports = __weex_exports__.default 57 | } 58 | 59 | __weex_module__.exports.template = __weex_template__ 60 | 61 | __weex_module__.exports.style = __weex_style__ 62 | 63 | }) 64 | 65 | __weex_bootstrap__('@weex-component/d8cdc8a8832b252e92de2e6e8a50dd36',undefined,undefined) 66 | 67 | /***/ }, 68 | 69 | /***/ 349: 70 | /***/ function(module, exports) { 71 | 72 | module.exports = { 73 | "type": "div", 74 | "children": [ 75 | { 76 | "type": "text", 77 | "classList": [ 78 | "title" 79 | ], 80 | "attr": { 81 | "value": "Please check out the source code." 82 | } 83 | } 84 | ] 85 | } 86 | 87 | /***/ }, 88 | 89 | /***/ 350: 90 | /***/ function(module, exports) { 91 | 92 | module.exports = { 93 | "title": { 94 | "fontSize": 48 95 | } 96 | } 97 | 98 | /***/ }, 99 | 100 | /***/ 351: 101 | /***/ function(module, exports) { 102 | 103 | module.exports = function(module, exports, __weex_require__){'use strict'; 104 | 105 | module.exports = { 106 | data: function () {return { 107 | x: 1, 108 | y: 2 109 | }}, 110 | 111 | 112 | methods: { 113 | foo: function foo() { 114 | console.log('foo'); 115 | } 116 | }, 117 | 118 | computed: { 119 | z: function z() { 120 | return this.x + this.y; 121 | } 122 | }, 123 | 124 | events: { 125 | custom: function custom(e) { 126 | console.log(e); 127 | } 128 | }, 129 | 130 | init: function init() {}, 131 | created: function created() {}, 132 | ready: function ready() {} 133 | };} 134 | /* generated by weex-loader */ 135 | 136 | 137 | /***/ } 138 | 139 | /******/ }); -------------------------------------------------------------------------------- /playground/ios/bundlejs/syntax/template-class.js: -------------------------------------------------------------------------------- 1 | /******/ (function(modules) { // webpackBootstrap 2 | /******/ // The module cache 3 | /******/ var installedModules = {}; 4 | 5 | /******/ // The require function 6 | /******/ function __webpack_require__(moduleId) { 7 | 8 | /******/ // Check if module is in cache 9 | /******/ if(installedModules[moduleId]) 10 | /******/ return installedModules[moduleId].exports; 11 | 12 | /******/ // Create a new module (and put it into the cache) 13 | /******/ var module = installedModules[moduleId] = { 14 | /******/ exports: {}, 15 | /******/ id: moduleId, 16 | /******/ loaded: false 17 | /******/ }; 18 | 19 | /******/ // Execute the module function 20 | /******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__); 21 | 22 | /******/ // Flag the module as loaded 23 | /******/ module.loaded = true; 24 | 25 | /******/ // Return the exports of the module 26 | /******/ return module.exports; 27 | /******/ } 28 | 29 | 30 | /******/ // expose the modules object (__webpack_modules__) 31 | /******/ __webpack_require__.m = modules; 32 | 33 | /******/ // expose the module cache 34 | /******/ __webpack_require__.c = installedModules; 35 | 36 | /******/ // __webpack_public_path__ 37 | /******/ __webpack_require__.p = ""; 38 | 39 | /******/ // Load entry module and return exports 40 | /******/ return __webpack_require__(0); 41 | /******/ }) 42 | /************************************************************************/ 43 | /******/ ({ 44 | 45 | /***/ 0: 46 | /***/ function(module, exports, __webpack_require__) { 47 | 48 | var __weex_template__ = __webpack_require__(352) 49 | var __weex_style__ = __webpack_require__(353) 50 | var __weex_script__ = __webpack_require__(354) 51 | 52 | __weex_define__('@weex-component/14c303543be596aa2a969ac47565db7c', [], function(__weex_require__, __weex_exports__, __weex_module__) { 53 | 54 | __weex_script__(__weex_module__, __weex_exports__, __weex_require__) 55 | if (__weex_exports__.__esModule && __weex_exports__.default) { 56 | __weex_module__.exports = __weex_exports__.default 57 | } 58 | 59 | __weex_module__.exports.template = __weex_template__ 60 | 61 | __weex_module__.exports.style = __weex_style__ 62 | 63 | }) 64 | 65 | __weex_bootstrap__('@weex-component/14c303543be596aa2a969ac47565db7c',undefined,undefined) 66 | 67 | /***/ }, 68 | 69 | /***/ 352: 70 | /***/ function(module, exports) { 71 | 72 | module.exports = { 73 | "type": "div", 74 | "events": { 75 | "click": "update" 76 | }, 77 | "children": [ 78 | { 79 | "type": "text", 80 | "classList": [ 81 | "a" 82 | ], 83 | "attr": { 84 | "value": "Hello" 85 | } 86 | }, 87 | { 88 | "type": "text", 89 | "classList": [ 90 | "b" 91 | ], 92 | "attr": { 93 | "value": "Hello" 94 | } 95 | }, 96 | { 97 | "type": "text", 98 | "classList": function () {return ['a', this.x]}, 99 | "attr": { 100 | "value": "Hello" 101 | } 102 | } 103 | ] 104 | } 105 | 106 | /***/ }, 107 | 108 | /***/ 353: 109 | /***/ function(module, exports) { 110 | 111 | module.exports = { 112 | "a": { 113 | "fontSize": 48 114 | }, 115 | "b": { 116 | "color": "#ff0000" 117 | } 118 | } 119 | 120 | /***/ }, 121 | 122 | /***/ 354: 123 | /***/ function(module, exports) { 124 | 125 | module.exports = function(module, exports, __weex_require__){'use strict'; 126 | 127 | module.exports = { 128 | data: function () {return { 129 | x: '' 130 | }}, 131 | methods: { 132 | update: function update(e) { 133 | this.x = 'b'; 134 | } 135 | } 136 | };} 137 | /* generated by weex-loader */ 138 | 139 | 140 | /***/ } 141 | 142 | /******/ }); -------------------------------------------------------------------------------- /playground/ios/bundlejs/syntax/template-content.js: -------------------------------------------------------------------------------- 1 | /******/ (function(modules) { // webpackBootstrap 2 | /******/ // The module cache 3 | /******/ var installedModules = {}; 4 | 5 | /******/ // The require function 6 | /******/ function __webpack_require__(moduleId) { 7 | 8 | /******/ // Check if module is in cache 9 | /******/ if(installedModules[moduleId]) 10 | /******/ return installedModules[moduleId].exports; 11 | 12 | /******/ // Create a new module (and put it into the cache) 13 | /******/ var module = installedModules[moduleId] = { 14 | /******/ exports: {}, 15 | /******/ id: moduleId, 16 | /******/ loaded: false 17 | /******/ }; 18 | 19 | /******/ // Execute the module function 20 | /******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__); 21 | 22 | /******/ // Flag the module as loaded 23 | /******/ module.loaded = true; 24 | 25 | /******/ // Return the exports of the module 26 | /******/ return module.exports; 27 | /******/ } 28 | 29 | 30 | /******/ // expose the modules object (__webpack_modules__) 31 | /******/ __webpack_require__.m = modules; 32 | 33 | /******/ // expose the module cache 34 | /******/ __webpack_require__.c = installedModules; 35 | 36 | /******/ // __webpack_public_path__ 37 | /******/ __webpack_require__.p = ""; 38 | 39 | /******/ // Load entry module and return exports 40 | /******/ return __webpack_require__(0); 41 | /******/ }) 42 | /************************************************************************/ 43 | /******/ ({ 44 | 45 | /***/ 0: 46 | /***/ function(module, exports, __webpack_require__) { 47 | 48 | var __weex_template__ = __webpack_require__(355) 49 | var __weex_script__ = __webpack_require__(356) 50 | 51 | __weex_define__('@weex-component/2b26a2ba0096277f201ca0b657282838', [], function(__weex_require__, __weex_exports__, __weex_module__) { 52 | 53 | __weex_script__(__weex_module__, __weex_exports__, __weex_require__) 54 | if (__weex_exports__.__esModule && __weex_exports__.default) { 55 | __weex_module__.exports = __weex_exports__.default 56 | } 57 | 58 | __weex_module__.exports.template = __weex_template__ 59 | 60 | }) 61 | 62 | __weex_bootstrap__('@weex-component/2b26a2ba0096277f201ca0b657282838',undefined,undefined) 63 | 64 | /***/ }, 65 | 66 | /***/ 355: 67 | /***/ function(module, exports) { 68 | 69 | module.exports = { 70 | "type": "div", 71 | "children": [ 72 | { 73 | "type": "btn", 74 | "children": [ 75 | { 76 | "type": "text", 77 | "attr": { 78 | "value": "Click!" 79 | } 80 | } 81 | ] 82 | } 83 | ] 84 | } 85 | 86 | /***/ }, 87 | 88 | /***/ 356: 89 | /***/ function(module, exports, __webpack_require__) { 90 | 91 | module.exports = function(module, exports, __weex_require__){'use strict'; 92 | 93 | __webpack_require__(357);} 94 | /* generated by weex-loader */ 95 | 96 | 97 | /***/ }, 98 | 99 | /***/ 357: 100 | /***/ function(module, exports, __webpack_require__) { 101 | 102 | var __weex_template__ = __webpack_require__(358) 103 | var __weex_style__ = __webpack_require__(359) 104 | 105 | __weex_define__('@weex-component/btn', [], function(__weex_require__, __weex_exports__, __weex_module__) { 106 | 107 | __weex_module__.exports.template = __weex_template__ 108 | 109 | __weex_module__.exports.style = __weex_style__ 110 | 111 | }) 112 | 113 | 114 | /***/ }, 115 | 116 | /***/ 358: 117 | /***/ function(module, exports) { 118 | 119 | module.exports = { 120 | "type": "div", 121 | "classList": [ 122 | "btn" 123 | ], 124 | "children": [ 125 | { 126 | "type": "content" 127 | } 128 | ] 129 | } 130 | 131 | /***/ }, 132 | 133 | /***/ 359: 134 | /***/ function(module, exports) { 135 | 136 | module.exports = { 137 | "btn": { 138 | "fontSize": 36, 139 | "textAlign": "center", 140 | "color": "#FFFFFF", 141 | "backgroundColor": "#808080", 142 | "padding": 20, 143 | "borderRadius": 5 144 | } 145 | } 146 | 147 | /***/ } 148 | 149 | /******/ }); -------------------------------------------------------------------------------- /playground/ios/bundlejs/syntax/template-if.js: -------------------------------------------------------------------------------- 1 | /******/ (function(modules) { // webpackBootstrap 2 | /******/ // The module cache 3 | /******/ var installedModules = {}; 4 | 5 | /******/ // The require function 6 | /******/ function __webpack_require__(moduleId) { 7 | 8 | /******/ // Check if module is in cache 9 | /******/ if(installedModules[moduleId]) 10 | /******/ return installedModules[moduleId].exports; 11 | 12 | /******/ // Create a new module (and put it into the cache) 13 | /******/ var module = installedModules[moduleId] = { 14 | /******/ exports: {}, 15 | /******/ id: moduleId, 16 | /******/ loaded: false 17 | /******/ }; 18 | 19 | /******/ // Execute the module function 20 | /******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__); 21 | 22 | /******/ // Flag the module as loaded 23 | /******/ module.loaded = true; 24 | 25 | /******/ // Return the exports of the module 26 | /******/ return module.exports; 27 | /******/ } 28 | 29 | 30 | /******/ // expose the modules object (__webpack_modules__) 31 | /******/ __webpack_require__.m = modules; 32 | 33 | /******/ // expose the module cache 34 | /******/ __webpack_require__.c = installedModules; 35 | 36 | /******/ // __webpack_public_path__ 37 | /******/ __webpack_require__.p = ""; 38 | 39 | /******/ // Load entry module and return exports 40 | /******/ return __webpack_require__(0); 41 | /******/ }) 42 | /************************************************************************/ 43 | /******/ ({ 44 | 45 | /***/ 0: 46 | /***/ function(module, exports, __webpack_require__) { 47 | 48 | var __weex_template__ = __webpack_require__(363) 49 | var __weex_style__ = __webpack_require__(364) 50 | var __weex_script__ = __webpack_require__(365) 51 | 52 | __weex_define__('@weex-component/6019f2874c768d147034c91e003e5ba4', [], function(__weex_require__, __weex_exports__, __weex_module__) { 53 | 54 | __weex_script__(__weex_module__, __weex_exports__, __weex_require__) 55 | if (__weex_exports__.__esModule && __weex_exports__.default) { 56 | __weex_module__.exports = __weex_exports__.default 57 | } 58 | 59 | __weex_module__.exports.template = __weex_template__ 60 | 61 | __weex_module__.exports.style = __weex_style__ 62 | 63 | }) 64 | 65 | __weex_bootstrap__('@weex-component/6019f2874c768d147034c91e003e5ba4',undefined,undefined) 66 | 67 | /***/ }, 68 | 69 | /***/ 363: 70 | /***/ function(module, exports) { 71 | 72 | module.exports = { 73 | "type": "div", 74 | "children": [ 75 | { 76 | "type": "text", 77 | "classList": [ 78 | "btn" 79 | ], 80 | "events": { 81 | "click": "toggle" 82 | }, 83 | "attr": { 84 | "value": "Toggle" 85 | } 86 | }, 87 | { 88 | "type": "text", 89 | "shown": function () {return this.flag}, 90 | "classList": [ 91 | "title" 92 | ], 93 | "attr": { 94 | "value": "I'm ON" 95 | } 96 | }, 97 | { 98 | "type": "text", 99 | "shown": function () {return !this.flag}, 100 | "classList": [ 101 | "title" 102 | ], 103 | "attr": { 104 | "value": "I'm Off" 105 | } 106 | } 107 | ] 108 | } 109 | 110 | /***/ }, 111 | 112 | /***/ 364: 113 | /***/ function(module, exports) { 114 | 115 | module.exports = { 116 | "title": { 117 | "fontSize": 48 118 | }, 119 | "btn": { 120 | "fontSize": 36, 121 | "textAlign": "center", 122 | "color": "#FFFFFF", 123 | "backgroundColor": "#808080", 124 | "padding": 20, 125 | "borderRadius": 5 126 | } 127 | } 128 | 129 | /***/ }, 130 | 131 | /***/ 365: 132 | /***/ function(module, exports) { 133 | 134 | module.exports = function(module, exports, __weex_require__){"use strict"; 135 | 136 | module.exports = { 137 | data: function () {return { 138 | flag: true 139 | }}, 140 | methods: { 141 | toggle: function toggle(e) { 142 | this.flag = !this.flag; 143 | } 144 | } 145 | };} 146 | /* generated by weex-loader */ 147 | 148 | 149 | /***/ } 150 | 151 | /******/ }); -------------------------------------------------------------------------------- /playground/ios/bundlejs/syntax/template-style.js: -------------------------------------------------------------------------------- 1 | /******/ (function(modules) { // webpackBootstrap 2 | /******/ // The module cache 3 | /******/ var installedModules = {}; 4 | 5 | /******/ // The require function 6 | /******/ function __webpack_require__(moduleId) { 7 | 8 | /******/ // Check if module is in cache 9 | /******/ if(installedModules[moduleId]) 10 | /******/ return installedModules[moduleId].exports; 11 | 12 | /******/ // Create a new module (and put it into the cache) 13 | /******/ var module = installedModules[moduleId] = { 14 | /******/ exports: {}, 15 | /******/ id: moduleId, 16 | /******/ loaded: false 17 | /******/ }; 18 | 19 | /******/ // Execute the module function 20 | /******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__); 21 | 22 | /******/ // Flag the module as loaded 23 | /******/ module.loaded = true; 24 | 25 | /******/ // Return the exports of the module 26 | /******/ return module.exports; 27 | /******/ } 28 | 29 | 30 | /******/ // expose the modules object (__webpack_modules__) 31 | /******/ __webpack_require__.m = modules; 32 | 33 | /******/ // expose the module cache 34 | /******/ __webpack_require__.c = installedModules; 35 | 36 | /******/ // __webpack_public_path__ 37 | /******/ __webpack_require__.p = ""; 38 | 39 | /******/ // Load entry module and return exports 40 | /******/ return __webpack_require__(0); 41 | /******/ }) 42 | /************************************************************************/ 43 | /******/ ({ 44 | 45 | /***/ 0: 46 | /***/ function(module, exports, __webpack_require__) { 47 | 48 | var __weex_template__ = __webpack_require__(372) 49 | var __weex_script__ = __webpack_require__(373) 50 | 51 | __weex_define__('@weex-component/301fb11cc58bbe739f3ee7ecea123456', [], function(__weex_require__, __weex_exports__, __weex_module__) { 52 | 53 | __weex_script__(__weex_module__, __weex_exports__, __weex_require__) 54 | if (__weex_exports__.__esModule && __weex_exports__.default) { 55 | __weex_module__.exports = __weex_exports__.default 56 | } 57 | 58 | __weex_module__.exports.template = __weex_template__ 59 | 60 | }) 61 | 62 | __weex_bootstrap__('@weex-component/301fb11cc58bbe739f3ee7ecea123456',undefined,undefined) 63 | 64 | /***/ }, 65 | 66 | /***/ 372: 67 | /***/ function(module, exports) { 68 | 69 | module.exports = { 70 | "type": "div", 71 | "events": { 72 | "click": "update" 73 | }, 74 | "children": [ 75 | { 76 | "type": "text", 77 | "style": { 78 | "fontSize": 48, 79 | "color": "#0000ff" 80 | }, 81 | "attr": { 82 | "value": "Hello" 83 | } 84 | }, 85 | { 86 | "type": "text", 87 | "style": { 88 | "fontSize": function () {return this.size}, 89 | "color": function () {return this.color} 90 | }, 91 | "attr": { 92 | "value": "Hello" 93 | } 94 | } 95 | ] 96 | } 97 | 98 | /***/ }, 99 | 100 | /***/ 373: 101 | /***/ function(module, exports) { 102 | 103 | module.exports = function(module, exports, __weex_require__){'use strict'; 104 | 105 | module.exports = { 106 | data: function () {return { 107 | size: 32, 108 | color: '#ff0000' 109 | }}, 110 | methods: { 111 | update: function update(e) { 112 | this.size = 48; 113 | } 114 | } 115 | };} 116 | /* generated by weex-loader */ 117 | 118 | 119 | /***/ } 120 | 121 | /******/ }); -------------------------------------------------------------------------------- /playground/ios/bundlejs/test.js: -------------------------------------------------------------------------------- 1 | /******/ (function(modules) { // webpackBootstrap 2 | /******/ // The module cache 3 | /******/ var installedModules = {}; 4 | 5 | /******/ // The require function 6 | /******/ function __webpack_require__(moduleId) { 7 | 8 | /******/ // Check if module is in cache 9 | /******/ if(installedModules[moduleId]) 10 | /******/ return installedModules[moduleId].exports; 11 | 12 | /******/ // Create a new module (and put it into the cache) 13 | /******/ var module = installedModules[moduleId] = { 14 | /******/ exports: {}, 15 | /******/ id: moduleId, 16 | /******/ loaded: false 17 | /******/ }; 18 | 19 | /******/ // Execute the module function 20 | /******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__); 21 | 22 | /******/ // Flag the module as loaded 23 | /******/ module.loaded = true; 24 | 25 | /******/ // Return the exports of the module 26 | /******/ return module.exports; 27 | /******/ } 28 | 29 | 30 | /******/ // expose the modules object (__webpack_modules__) 31 | /******/ __webpack_require__.m = modules; 32 | 33 | /******/ // expose the module cache 34 | /******/ __webpack_require__.c = installedModules; 35 | 36 | /******/ // __webpack_public_path__ 37 | /******/ __webpack_require__.p = ""; 38 | 39 | /******/ // Load entry module and return exports 40 | /******/ return __webpack_require__(0); 41 | /******/ }) 42 | /************************************************************************/ 43 | /******/ ({ 44 | 45 | /***/ 0: 46 | /***/ function(module, exports, __webpack_require__) { 47 | 48 | var __weex_template__ = __webpack_require__(377) 49 | var __weex_script__ = __webpack_require__(378) 50 | 51 | __weex_define__('@weex-component/9305542c7d16b107fad92f56b2a08dab', [], function(__weex_require__, __weex_exports__, __weex_module__) { 52 | 53 | __weex_script__(__weex_module__, __weex_exports__, __weex_require__) 54 | if (__weex_exports__.__esModule && __weex_exports__.default) { 55 | __weex_module__.exports = __weex_exports__.default 56 | } 57 | 58 | __weex_module__.exports.template = __weex_template__ 59 | 60 | }) 61 | 62 | __weex_bootstrap__('@weex-component/9305542c7d16b107fad92f56b2a08dab',undefined,undefined) 63 | 64 | /***/ }, 65 | 66 | /***/ 377: 67 | /***/ function(module, exports) { 68 | 69 | module.exports = { 70 | "type": "scroller", 71 | "children": [ 72 | { 73 | "type": "div", 74 | "id": "r", 75 | "children": [ 76 | { 77 | "type": "text", 78 | "attr": { 79 | "value": function () {return this.x} 80 | } 81 | }, 82 | { 83 | "type": "div", 84 | "style": { 85 | "height": 2000, 86 | "backgroundColor": "#ff0000" 87 | } 88 | }, 89 | { 90 | "type": "text", 91 | "events": { 92 | "click": "foo" 93 | }, 94 | "attr": { 95 | "value": function () {return this.x} 96 | } 97 | } 98 | ] 99 | } 100 | ] 101 | } 102 | 103 | /***/ }, 104 | 105 | /***/ 378: 106 | /***/ function(module, exports) { 107 | 108 | module.exports = function(module, exports, __weex_require__){'use strict'; 109 | 110 | var dom = __weex_require__('@weex-module/dom'); 111 | module.exports = { 112 | data: function data() { 113 | return { 114 | x: 1 115 | }; 116 | }, 117 | methods: { 118 | foo: function foo(e) { 119 | dom.scrollToElement(this.$el('r'), { offset: 0 }); 120 | } 121 | } 122 | };} 123 | /* generated by weex-loader */ 124 | 125 | 126 | /***/ } 127 | 128 | /******/ }); -------------------------------------------------------------------------------- /playground/ios/bundlejs/vue/hello.js: -------------------------------------------------------------------------------- 1 | // { "framework": "Vue" } 2 | 3 | /******/ (function(modules) { // webpackBootstrap 4 | /******/ // The module cache 5 | /******/ var installedModules = {}; 6 | 7 | /******/ // The require function 8 | /******/ function __webpack_require__(moduleId) { 9 | 10 | /******/ // Check if module is in cache 11 | /******/ if(installedModules[moduleId]) 12 | /******/ return installedModules[moduleId].exports; 13 | 14 | /******/ // Create a new module (and put it into the cache) 15 | /******/ var module = installedModules[moduleId] = { 16 | /******/ exports: {}, 17 | /******/ id: moduleId, 18 | /******/ loaded: false 19 | /******/ }; 20 | 21 | /******/ // Execute the module function 22 | /******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__); 23 | 24 | /******/ // Flag the module as loaded 25 | /******/ module.loaded = true; 26 | 27 | /******/ // Return the exports of the module 28 | /******/ return module.exports; 29 | /******/ } 30 | 31 | 32 | /******/ // expose the modules object (__webpack_modules__) 33 | /******/ __webpack_require__.m = modules; 34 | 35 | /******/ // expose the module cache 36 | /******/ __webpack_require__.c = installedModules; 37 | 38 | /******/ // __webpack_public_path__ 39 | /******/ __webpack_require__.p = ""; 40 | 41 | /******/ // Load entry module and return exports 42 | /******/ return __webpack_require__(0); 43 | /******/ }) 44 | /************************************************************************/ 45 | /******/ ({ 46 | 47 | /***/ 0: 48 | /***/ function(module, exports, __webpack_require__) { 49 | 50 | var __vue_exports__, __vue_options__ 51 | var __vue_styles__ = [] 52 | 53 | /* template */ 54 | var __vue_template__ = __webpack_require__(462) 55 | __vue_options__ = __vue_exports__ = __vue_exports__ || {} 56 | if ( 57 | typeof __vue_exports__.default === "object" || 58 | typeof __vue_exports__.default === "function" 59 | ) { 60 | if (Object.keys(__vue_exports__).some(function (key) { return key !== "default" && key !== "__esModule" })) {console.error("named exports are not supported in *.vue files.")} 61 | __vue_options__ = __vue_exports__ = __vue_exports__.default 62 | } 63 | if (typeof __vue_options__ === "function") { 64 | __vue_options__ = __vue_options__.options 65 | } 66 | __vue_options__.__file = "/Users/bobning/work/source/weex_fork/examples/vue/hello.vue" 67 | __vue_options__.render = __vue_template__.render 68 | __vue_options__.staticRenderFns = __vue_template__.staticRenderFns 69 | __vue_options__.style = __vue_options__.style || {} 70 | __vue_styles__.forEach(function (module) { 71 | for (var name in module) { 72 | __vue_options__.style[name] = module[name] 73 | } 74 | }) 75 | 76 | module.exports = __vue_exports__ 77 | module.exports.el = 'true' 78 | new Vue(module.exports) 79 | 80 | 81 | /***/ }, 82 | 83 | /***/ 462: 84 | /***/ function(module, exports) { 85 | 86 | module.exports={render:function (){var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h; 87 | return _vm._m(0) 88 | },staticRenderFns: [function (){var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h; 89 | return _h('div', [_h('text', { 90 | staticStyle: { 91 | fontSize: "100px" 92 | } 93 | }, ["Hello World."])]) 94 | }]} 95 | module.exports.render._withStripped = true 96 | 97 | /***/ } 98 | 99 | /******/ }); -------------------------------------------------------------------------------- /playground/ios/bundlejs/vue/style/style-item.js: -------------------------------------------------------------------------------- 1 | // { "framework": "Vue" } 2 | 3 | /******/ (function(modules) { // webpackBootstrap 4 | /******/ // The module cache 5 | /******/ var installedModules = {}; 6 | 7 | /******/ // The require function 8 | /******/ function __webpack_require__(moduleId) { 9 | 10 | /******/ // Check if module is in cache 11 | /******/ if(installedModules[moduleId]) 12 | /******/ return installedModules[moduleId].exports; 13 | 14 | /******/ // Create a new module (and put it into the cache) 15 | /******/ var module = installedModules[moduleId] = { 16 | /******/ exports: {}, 17 | /******/ id: moduleId, 18 | /******/ loaded: false 19 | /******/ }; 20 | 21 | /******/ // Execute the module function 22 | /******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__); 23 | 24 | /******/ // Flag the module as loaded 25 | /******/ module.loaded = true; 26 | 27 | /******/ // Return the exports of the module 28 | /******/ return module.exports; 29 | /******/ } 30 | 31 | 32 | /******/ // expose the modules object (__webpack_modules__) 33 | /******/ __webpack_require__.m = modules; 34 | 35 | /******/ // expose the module cache 36 | /******/ __webpack_require__.c = installedModules; 37 | 38 | /******/ // __webpack_public_path__ 39 | /******/ __webpack_require__.p = ""; 40 | 41 | /******/ // Load entry module and return exports 42 | /******/ return __webpack_require__(0); 43 | /******/ }) 44 | /************************************************************************/ 45 | /******/ ({ 46 | 47 | /***/ 0: 48 | /***/ function(module, exports, __webpack_require__) { 49 | 50 | var __vue_exports__, __vue_options__ 51 | var __vue_styles__ = [] 52 | 53 | /* styles */ 54 | __vue_styles__.push(__webpack_require__(547) 55 | ) 56 | 57 | /* script */ 58 | __vue_exports__ = __webpack_require__(548) 59 | 60 | /* template */ 61 | var __vue_template__ = __webpack_require__(549) 62 | __vue_options__ = __vue_exports__ = __vue_exports__ || {} 63 | if ( 64 | typeof __vue_exports__.default === "object" || 65 | typeof __vue_exports__.default === "function" 66 | ) { 67 | if (Object.keys(__vue_exports__).some(function (key) { return key !== "default" && key !== "__esModule" })) {console.error("named exports are not supported in *.vue files.")} 68 | __vue_options__ = __vue_exports__ = __vue_exports__.default 69 | } 70 | if (typeof __vue_options__ === "function") { 71 | __vue_options__ = __vue_options__.options 72 | } 73 | __vue_options__.__file = "/Users/bobning/work/source/weex_fork/examples/vue/style/style-item.vue" 74 | __vue_options__.render = __vue_template__.render 75 | __vue_options__.staticRenderFns = __vue_template__.staticRenderFns 76 | __vue_options__.style = __vue_options__.style || {} 77 | __vue_styles__.forEach(function (module) { 78 | for (var name in module) { 79 | __vue_options__.style[name] = module[name] 80 | } 81 | }) 82 | 83 | module.exports = __vue_exports__ 84 | module.exports.el = 'true' 85 | new Vue(module.exports) 86 | 87 | 88 | /***/ }, 89 | 90 | /***/ 547: 91 | /***/ function(module, exports) { 92 | 93 | module.exports = { 94 | "item": { 95 | "marginRight": 10, 96 | "width": 160, 97 | "height": 75, 98 | "paddingLeft": 8, 99 | "paddingRight": 8, 100 | "paddingTop": 8, 101 | "paddingBottom": 8 102 | }, 103 | "txt": { 104 | "color": "#eeeeee" 105 | } 106 | } 107 | 108 | /***/ }, 109 | 110 | /***/ 548: 111 | /***/ function(module, exports) { 112 | 113 | 'use strict'; 114 | 115 | // 116 | // 117 | // 118 | // 119 | // 120 | // 121 | // 122 | 123 | module.exports = { 124 | props: { 125 | value: { default: '' }, 126 | type: { default: '0' } // 0, 1 127 | }, 128 | computed: { 129 | bgColor: function bgColor() { 130 | return this.type == '1' ? '#7BA3A8' : '#BEAD92'; 131 | } 132 | } 133 | }; 134 | 135 | /***/ }, 136 | 137 | /***/ 549: 138 | /***/ function(module, exports) { 139 | 140 | module.exports={render:function (){var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h; 141 | return _h('text', { 142 | staticClass: ["item", "txt"], 143 | style: { 144 | backgroundColor: _vm.bgColor 145 | }, 146 | attrs: { 147 | "value": _vm.value 148 | } 149 | }) 150 | },staticRenderFns: []} 151 | module.exports.render._withStripped = true 152 | 153 | /***/ } 154 | 155 | /******/ }); -------------------------------------------------------------------------------- /playground/ios/bundlejs/vue/syntax/hello-world-1.js: -------------------------------------------------------------------------------- 1 | // { "framework": "Vue" } 2 | 3 | /******/ (function(modules) { // webpackBootstrap 4 | /******/ // The module cache 5 | /******/ var installedModules = {}; 6 | 7 | /******/ // The require function 8 | /******/ function __webpack_require__(moduleId) { 9 | 10 | /******/ // Check if module is in cache 11 | /******/ if(installedModules[moduleId]) 12 | /******/ return installedModules[moduleId].exports; 13 | 14 | /******/ // Create a new module (and put it into the cache) 15 | /******/ var module = installedModules[moduleId] = { 16 | /******/ exports: {}, 17 | /******/ id: moduleId, 18 | /******/ loaded: false 19 | /******/ }; 20 | 21 | /******/ // Execute the module function 22 | /******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__); 23 | 24 | /******/ // Flag the module as loaded 25 | /******/ module.loaded = true; 26 | 27 | /******/ // Return the exports of the module 28 | /******/ return module.exports; 29 | /******/ } 30 | 31 | 32 | /******/ // expose the modules object (__webpack_modules__) 33 | /******/ __webpack_require__.m = modules; 34 | 35 | /******/ // expose the module cache 36 | /******/ __webpack_require__.c = installedModules; 37 | 38 | /******/ // __webpack_public_path__ 39 | /******/ __webpack_require__.p = ""; 40 | 41 | /******/ // Load entry module and return exports 42 | /******/ return __webpack_require__(0); 43 | /******/ }) 44 | /************************************************************************/ 45 | /******/ ({ 46 | 47 | /***/ 0: 48 | /***/ function(module, exports, __webpack_require__) { 49 | 50 | var __vue_exports__, __vue_options__ 51 | var __vue_styles__ = [] 52 | 53 | /* template */ 54 | var __vue_template__ = __webpack_require__(559) 55 | __vue_options__ = __vue_exports__ = __vue_exports__ || {} 56 | if ( 57 | typeof __vue_exports__.default === "object" || 58 | typeof __vue_exports__.default === "function" 59 | ) { 60 | if (Object.keys(__vue_exports__).some(function (key) { return key !== "default" && key !== "__esModule" })) {console.error("named exports are not supported in *.vue files.")} 61 | __vue_options__ = __vue_exports__ = __vue_exports__.default 62 | } 63 | if (typeof __vue_options__ === "function") { 64 | __vue_options__ = __vue_options__.options 65 | } 66 | __vue_options__.__file = "/Users/bobning/work/source/weex_fork/examples/vue/syntax/hello-world-1.vue" 67 | __vue_options__.render = __vue_template__.render 68 | __vue_options__.staticRenderFns = __vue_template__.staticRenderFns 69 | __vue_options__.style = __vue_options__.style || {} 70 | __vue_styles__.forEach(function (module) { 71 | for (var name in module) { 72 | __vue_options__.style[name] = module[name] 73 | } 74 | }) 75 | 76 | module.exports = __vue_exports__ 77 | module.exports.el = 'true' 78 | new Vue(module.exports) 79 | 80 | 81 | /***/ }, 82 | 83 | /***/ 559: 84 | /***/ function(module, exports) { 85 | 86 | module.exports={render:function (){var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h; 87 | return _vm._m(0) 88 | },staticRenderFns: [function (){var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h; 89 | return _h('div', [_h('text', ["Hello World"])]) 90 | }]} 91 | module.exports.render._withStripped = true 92 | 93 | /***/ } 94 | 95 | /******/ }); -------------------------------------------------------------------------------- /playground/ios/bundlejs/vue/syntax/hello-world-2.js: -------------------------------------------------------------------------------- 1 | // { "framework": "Vue" } 2 | 3 | /******/ (function(modules) { // webpackBootstrap 4 | /******/ // The module cache 5 | /******/ var installedModules = {}; 6 | 7 | /******/ // The require function 8 | /******/ function __webpack_require__(moduleId) { 9 | 10 | /******/ // Check if module is in cache 11 | /******/ if(installedModules[moduleId]) 12 | /******/ return installedModules[moduleId].exports; 13 | 14 | /******/ // Create a new module (and put it into the cache) 15 | /******/ var module = installedModules[moduleId] = { 16 | /******/ exports: {}, 17 | /******/ id: moduleId, 18 | /******/ loaded: false 19 | /******/ }; 20 | 21 | /******/ // Execute the module function 22 | /******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__); 23 | 24 | /******/ // Flag the module as loaded 25 | /******/ module.loaded = true; 26 | 27 | /******/ // Return the exports of the module 28 | /******/ return module.exports; 29 | /******/ } 30 | 31 | 32 | /******/ // expose the modules object (__webpack_modules__) 33 | /******/ __webpack_require__.m = modules; 34 | 35 | /******/ // expose the module cache 36 | /******/ __webpack_require__.c = installedModules; 37 | 38 | /******/ // __webpack_public_path__ 39 | /******/ __webpack_require__.p = ""; 40 | 41 | /******/ // Load entry module and return exports 42 | /******/ return __webpack_require__(0); 43 | /******/ }) 44 | /************************************************************************/ 45 | /******/ ({ 46 | 47 | /***/ 0: 48 | /***/ function(module, exports, __webpack_require__) { 49 | 50 | var __vue_exports__, __vue_options__ 51 | var __vue_styles__ = [] 52 | 53 | /* template */ 54 | var __vue_template__ = __webpack_require__(560) 55 | __vue_options__ = __vue_exports__ = __vue_exports__ || {} 56 | if ( 57 | typeof __vue_exports__.default === "object" || 58 | typeof __vue_exports__.default === "function" 59 | ) { 60 | if (Object.keys(__vue_exports__).some(function (key) { return key !== "default" && key !== "__esModule" })) {console.error("named exports are not supported in *.vue files.")} 61 | __vue_options__ = __vue_exports__ = __vue_exports__.default 62 | } 63 | if (typeof __vue_options__ === "function") { 64 | __vue_options__ = __vue_options__.options 65 | } 66 | __vue_options__.__file = "/Users/bobning/work/source/weex_fork/examples/vue/syntax/hello-world-2.vue" 67 | __vue_options__.render = __vue_template__.render 68 | __vue_options__.staticRenderFns = __vue_template__.staticRenderFns 69 | __vue_options__.style = __vue_options__.style || {} 70 | __vue_styles__.forEach(function (module) { 71 | for (var name in module) { 72 | __vue_options__.style[name] = module[name] 73 | } 74 | }) 75 | 76 | module.exports = __vue_exports__ 77 | module.exports.el = 'true' 78 | new Vue(module.exports) 79 | 80 | 81 | /***/ }, 82 | 83 | /***/ 560: 84 | /***/ function(module, exports) { 85 | 86 | module.exports={render:function (){var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h; 87 | return _vm._m(0) 88 | },staticRenderFns: [function (){var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h; 89 | return _h('div', { 90 | staticStyle: { 91 | alignItems: "center", 92 | marginTop: "120px" 93 | } 94 | }, [_h('image', { 95 | staticStyle: { 96 | width: "360px", 97 | height: "82px" 98 | }, 99 | attrs: { 100 | "src": "https://alibaba.github.io/weex/img/weex_logo_blue@3x.png" 101 | } 102 | }), _h('text', { 103 | staticStyle: { 104 | fontSize: "48px" 105 | } 106 | }, ["Hello World"])]) 107 | }]} 108 | module.exports.render._withStripped = true 109 | 110 | /***/ } 111 | 112 | /******/ }); -------------------------------------------------------------------------------- /playground/ios/bundlejs/vue/syntax/hello-world-3.js: -------------------------------------------------------------------------------- 1 | // { "framework": "Vue" } 2 | 3 | /******/ (function(modules) { // webpackBootstrap 4 | /******/ // The module cache 5 | /******/ var installedModules = {}; 6 | 7 | /******/ // The require function 8 | /******/ function __webpack_require__(moduleId) { 9 | 10 | /******/ // Check if module is in cache 11 | /******/ if(installedModules[moduleId]) 12 | /******/ return installedModules[moduleId].exports; 13 | 14 | /******/ // Create a new module (and put it into the cache) 15 | /******/ var module = installedModules[moduleId] = { 16 | /******/ exports: {}, 17 | /******/ id: moduleId, 18 | /******/ loaded: false 19 | /******/ }; 20 | 21 | /******/ // Execute the module function 22 | /******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__); 23 | 24 | /******/ // Flag the module as loaded 25 | /******/ module.loaded = true; 26 | 27 | /******/ // Return the exports of the module 28 | /******/ return module.exports; 29 | /******/ } 30 | 31 | 32 | /******/ // expose the modules object (__webpack_modules__) 33 | /******/ __webpack_require__.m = modules; 34 | 35 | /******/ // expose the module cache 36 | /******/ __webpack_require__.c = installedModules; 37 | 38 | /******/ // __webpack_public_path__ 39 | /******/ __webpack_require__.p = ""; 40 | 41 | /******/ // Load entry module and return exports 42 | /******/ return __webpack_require__(0); 43 | /******/ }) 44 | /************************************************************************/ 45 | /******/ ({ 46 | 47 | /***/ 0: 48 | /***/ function(module, exports, __webpack_require__) { 49 | 50 | var __vue_exports__, __vue_options__ 51 | var __vue_styles__ = [] 52 | 53 | /* styles */ 54 | __vue_styles__.push(__webpack_require__(561) 55 | ) 56 | 57 | /* template */ 58 | var __vue_template__ = __webpack_require__(562) 59 | __vue_options__ = __vue_exports__ = __vue_exports__ || {} 60 | if ( 61 | typeof __vue_exports__.default === "object" || 62 | typeof __vue_exports__.default === "function" 63 | ) { 64 | if (Object.keys(__vue_exports__).some(function (key) { return key !== "default" && key !== "__esModule" })) {console.error("named exports are not supported in *.vue files.")} 65 | __vue_options__ = __vue_exports__ = __vue_exports__.default 66 | } 67 | if (typeof __vue_options__ === "function") { 68 | __vue_options__ = __vue_options__.options 69 | } 70 | __vue_options__.__file = "/Users/bobning/work/source/weex_fork/examples/vue/syntax/hello-world-3.vue" 71 | __vue_options__.render = __vue_template__.render 72 | __vue_options__.staticRenderFns = __vue_template__.staticRenderFns 73 | __vue_options__.style = __vue_options__.style || {} 74 | __vue_styles__.forEach(function (module) { 75 | for (var name in module) { 76 | __vue_options__.style[name] = module[name] 77 | } 78 | }) 79 | 80 | module.exports = __vue_exports__ 81 | module.exports.el = 'true' 82 | new Vue(module.exports) 83 | 84 | 85 | /***/ }, 86 | 87 | /***/ 561: 88 | /***/ function(module, exports) { 89 | 90 | module.exports = { 91 | "wrapper": { 92 | "alignItems": "center", 93 | "marginTop": 120 94 | }, 95 | "title": { 96 | "fontSize": 48 97 | }, 98 | "logo": { 99 | "width": 360, 100 | "height": 82 101 | } 102 | } 103 | 104 | /***/ }, 105 | 106 | /***/ 562: 107 | /***/ function(module, exports) { 108 | 109 | module.exports={render:function (){var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h; 110 | return _vm._m(0) 111 | },staticRenderFns: [function (){var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h; 112 | return _h('div', { 113 | staticClass: ["wrapper"] 114 | }, [_h('image', { 115 | staticClass: ["logo"], 116 | attrs: { 117 | "src": "https://alibaba.github.io/weex/img/weex_logo_blue@3x.png" 118 | } 119 | }), _h('text', { 120 | staticClass: ["title"] 121 | }, ["Hello World"])]) 122 | }]} 123 | module.exports.render._withStripped = true 124 | 125 | /***/ } 126 | 127 | /******/ }); -------------------------------------------------------------------------------- /playground/ios/bundlejs/vue/syntax/script-module.js: -------------------------------------------------------------------------------- 1 | // { "framework": "Vue" } 2 | 3 | /******/ (function(modules) { // webpackBootstrap 4 | /******/ // The module cache 5 | /******/ var installedModules = {}; 6 | 7 | /******/ // The require function 8 | /******/ function __webpack_require__(moduleId) { 9 | 10 | /******/ // Check if module is in cache 11 | /******/ if(installedModules[moduleId]) 12 | /******/ return installedModules[moduleId].exports; 13 | 14 | /******/ // Create a new module (and put it into the cache) 15 | /******/ var module = installedModules[moduleId] = { 16 | /******/ exports: {}, 17 | /******/ id: moduleId, 18 | /******/ loaded: false 19 | /******/ }; 20 | 21 | /******/ // Execute the module function 22 | /******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__); 23 | 24 | /******/ // Flag the module as loaded 25 | /******/ module.loaded = true; 26 | 27 | /******/ // Return the exports of the module 28 | /******/ return module.exports; 29 | /******/ } 30 | 31 | 32 | /******/ // expose the modules object (__webpack_modules__) 33 | /******/ __webpack_require__.m = modules; 34 | 35 | /******/ // expose the module cache 36 | /******/ __webpack_require__.c = installedModules; 37 | 38 | /******/ // __webpack_public_path__ 39 | /******/ __webpack_require__.p = ""; 40 | 41 | /******/ // Load entry module and return exports 42 | /******/ return __webpack_require__(0); 43 | /******/ }) 44 | /************************************************************************/ 45 | /******/ ({ 46 | 47 | /***/ 0: 48 | /***/ function(module, exports, __webpack_require__) { 49 | 50 | var __vue_exports__, __vue_options__ 51 | var __vue_styles__ = [] 52 | 53 | /* styles */ 54 | __vue_styles__.push(__webpack_require__(587) 55 | ) 56 | 57 | /* script */ 58 | __vue_exports__ = __webpack_require__(588) 59 | 60 | /* template */ 61 | var __vue_template__ = __webpack_require__(589) 62 | __vue_options__ = __vue_exports__ = __vue_exports__ || {} 63 | if ( 64 | typeof __vue_exports__.default === "object" || 65 | typeof __vue_exports__.default === "function" 66 | ) { 67 | if (Object.keys(__vue_exports__).some(function (key) { return key !== "default" && key !== "__esModule" })) {console.error("named exports are not supported in *.vue files.")} 68 | __vue_options__ = __vue_exports__ = __vue_exports__.default 69 | } 70 | if (typeof __vue_options__ === "function") { 71 | __vue_options__ = __vue_options__.options 72 | } 73 | __vue_options__.__file = "/Users/bobning/work/source/weex_fork/examples/vue/syntax/script-module.vue" 74 | __vue_options__.render = __vue_template__.render 75 | __vue_options__.staticRenderFns = __vue_template__.staticRenderFns 76 | __vue_options__.style = __vue_options__.style || {} 77 | __vue_styles__.forEach(function (module) { 78 | for (var name in module) { 79 | __vue_options__.style[name] = module[name] 80 | } 81 | }) 82 | 83 | module.exports = __vue_exports__ 84 | module.exports.el = 'true' 85 | new Vue(module.exports) 86 | 87 | 88 | /***/ }, 89 | 90 | /***/ 587: 91 | /***/ function(module, exports) { 92 | 93 | module.exports = { 94 | "btn": { 95 | "fontSize": 36, 96 | "textAlign": "center", 97 | "color": "#FFFFFF", 98 | "backgroundColor": "#808080", 99 | "padding": 20, 100 | "borderRadius": 5 101 | } 102 | } 103 | 104 | /***/ }, 105 | 106 | /***/ 588: 107 | /***/ function(module, exports) { 108 | 109 | 'use strict'; 110 | 111 | // 112 | // 113 | // 114 | // 115 | // 116 | // 117 | // 118 | // 119 | // 120 | // 121 | // 122 | // 123 | // 124 | // 125 | // 126 | 127 | var modal = __weex_require_module__('modal'); 128 | module.exports = { 129 | methods: { 130 | test: function test() { 131 | modal.toast({ 132 | message: 'Toast!', 133 | duration: 3 134 | }); 135 | } 136 | } 137 | }; 138 | 139 | /***/ }, 140 | 141 | /***/ 589: 142 | /***/ function(module, exports) { 143 | 144 | module.exports={render:function (){var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h; 145 | return _h('div', [_h('text', { 146 | staticClass: ["btn"], 147 | on: { 148 | "click": _vm.test 149 | } 150 | }, ["Toast!"])]) 151 | },staticRenderFns: []} 152 | module.exports.render._withStripped = true 153 | 154 | /***/ } 155 | 156 | /******/ }); -------------------------------------------------------------------------------- /playground/ios/bundlejs/vue/syntax/template-class.js: -------------------------------------------------------------------------------- 1 | // { "framework": "Vue" } 2 | 3 | /******/ (function(modules) { // webpackBootstrap 4 | /******/ // The module cache 5 | /******/ var installedModules = {}; 6 | 7 | /******/ // The require function 8 | /******/ function __webpack_require__(moduleId) { 9 | 10 | /******/ // Check if module is in cache 11 | /******/ if(installedModules[moduleId]) 12 | /******/ return installedModules[moduleId].exports; 13 | 14 | /******/ // Create a new module (and put it into the cache) 15 | /******/ var module = installedModules[moduleId] = { 16 | /******/ exports: {}, 17 | /******/ id: moduleId, 18 | /******/ loaded: false 19 | /******/ }; 20 | 21 | /******/ // Execute the module function 22 | /******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__); 23 | 24 | /******/ // Flag the module as loaded 25 | /******/ module.loaded = true; 26 | 27 | /******/ // Return the exports of the module 28 | /******/ return module.exports; 29 | /******/ } 30 | 31 | 32 | /******/ // expose the modules object (__webpack_modules__) 33 | /******/ __webpack_require__.m = modules; 34 | 35 | /******/ // expose the module cache 36 | /******/ __webpack_require__.c = installedModules; 37 | 38 | /******/ // __webpack_public_path__ 39 | /******/ __webpack_require__.p = ""; 40 | 41 | /******/ // Load entry module and return exports 42 | /******/ return __webpack_require__(0); 43 | /******/ }) 44 | /************************************************************************/ 45 | /******/ ({ 46 | 47 | /***/ 0: 48 | /***/ function(module, exports, __webpack_require__) { 49 | 50 | var __vue_exports__, __vue_options__ 51 | var __vue_styles__ = [] 52 | 53 | /* styles */ 54 | __vue_styles__.push(__webpack_require__(593) 55 | ) 56 | 57 | /* script */ 58 | __vue_exports__ = __webpack_require__(594) 59 | 60 | /* template */ 61 | var __vue_template__ = __webpack_require__(595) 62 | __vue_options__ = __vue_exports__ = __vue_exports__ || {} 63 | if ( 64 | typeof __vue_exports__.default === "object" || 65 | typeof __vue_exports__.default === "function" 66 | ) { 67 | if (Object.keys(__vue_exports__).some(function (key) { return key !== "default" && key !== "__esModule" })) {console.error("named exports are not supported in *.vue files.")} 68 | __vue_options__ = __vue_exports__ = __vue_exports__.default 69 | } 70 | if (typeof __vue_options__ === "function") { 71 | __vue_options__ = __vue_options__.options 72 | } 73 | __vue_options__.__file = "/Users/bobning/work/source/weex_fork/examples/vue/syntax/template-class.vue" 74 | __vue_options__.render = __vue_template__.render 75 | __vue_options__.staticRenderFns = __vue_template__.staticRenderFns 76 | __vue_options__.style = __vue_options__.style || {} 77 | __vue_styles__.forEach(function (module) { 78 | for (var name in module) { 79 | __vue_options__.style[name] = module[name] 80 | } 81 | }) 82 | 83 | module.exports = __vue_exports__ 84 | module.exports.el = 'true' 85 | new Vue(module.exports) 86 | 87 | 88 | /***/ }, 89 | 90 | /***/ 593: 91 | /***/ function(module, exports) { 92 | 93 | module.exports = { 94 | "a": { 95 | "fontSize": 48 96 | }, 97 | "b": { 98 | "color": "#ff0000" 99 | } 100 | } 101 | 102 | /***/ }, 103 | 104 | /***/ 594: 105 | /***/ function(module, exports) { 106 | 107 | 'use strict'; 108 | 109 | // 110 | // 111 | // 112 | // 113 | // 114 | // 115 | // 116 | // 117 | // 118 | // 119 | // 120 | // 121 | // 122 | // 123 | // 124 | // 125 | // 126 | 127 | module.exports = { 128 | data: { 129 | x: '' 130 | }, 131 | methods: { 132 | update: function update(e) { 133 | this.x = 'b'; 134 | console.log('x', this.x); 135 | } 136 | } 137 | }; 138 | 139 | /***/ }, 140 | 141 | /***/ 595: 142 | /***/ function(module, exports) { 143 | 144 | module.exports={render:function (){var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h; 145 | return _h('div', { 146 | on: { 147 | "click": _vm.update 148 | } 149 | }, [_h('text', { 150 | staticClass: ["a"] 151 | }, ["Hello"]), _h('text', { 152 | staticClass: ["b"] 153 | }, ["Hello"]), _h('text', { 154 | class: ['a', _vm.x] 155 | }, ["Hello"])]) 156 | },staticRenderFns: []} 157 | module.exports.render._withStripped = true 158 | 159 | /***/ } 160 | 161 | /******/ }); -------------------------------------------------------------------------------- /playground/ios/bundlejs/vue/syntax/template-style.js: -------------------------------------------------------------------------------- 1 | // { "framework": "Vue" } 2 | 3 | /******/ (function(modules) { // webpackBootstrap 4 | /******/ // The module cache 5 | /******/ var installedModules = {}; 6 | 7 | /******/ // The require function 8 | /******/ function __webpack_require__(moduleId) { 9 | 10 | /******/ // Check if module is in cache 11 | /******/ if(installedModules[moduleId]) 12 | /******/ return installedModules[moduleId].exports; 13 | 14 | /******/ // Create a new module (and put it into the cache) 15 | /******/ var module = installedModules[moduleId] = { 16 | /******/ exports: {}, 17 | /******/ id: moduleId, 18 | /******/ loaded: false 19 | /******/ }; 20 | 21 | /******/ // Execute the module function 22 | /******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__); 23 | 24 | /******/ // Flag the module as loaded 25 | /******/ module.loaded = true; 26 | 27 | /******/ // Return the exports of the module 28 | /******/ return module.exports; 29 | /******/ } 30 | 31 | 32 | /******/ // expose the modules object (__webpack_modules__) 33 | /******/ __webpack_require__.m = modules; 34 | 35 | /******/ // expose the module cache 36 | /******/ __webpack_require__.c = installedModules; 37 | 38 | /******/ // __webpack_public_path__ 39 | /******/ __webpack_require__.p = ""; 40 | 41 | /******/ // Load entry module and return exports 42 | /******/ return __webpack_require__(0); 43 | /******/ }) 44 | /************************************************************************/ 45 | /******/ ({ 46 | 47 | /***/ 0: 48 | /***/ function(module, exports, __webpack_require__) { 49 | 50 | var __vue_exports__, __vue_options__ 51 | var __vue_styles__ = [] 52 | 53 | /* script */ 54 | __vue_exports__ = __webpack_require__(613) 55 | 56 | /* template */ 57 | var __vue_template__ = __webpack_require__(614) 58 | __vue_options__ = __vue_exports__ = __vue_exports__ || {} 59 | if ( 60 | typeof __vue_exports__.default === "object" || 61 | typeof __vue_exports__.default === "function" 62 | ) { 63 | if (Object.keys(__vue_exports__).some(function (key) { return key !== "default" && key !== "__esModule" })) {console.error("named exports are not supported in *.vue files.")} 64 | __vue_options__ = __vue_exports__ = __vue_exports__.default 65 | } 66 | if (typeof __vue_options__ === "function") { 67 | __vue_options__ = __vue_options__.options 68 | } 69 | __vue_options__.__file = "/Users/bobning/work/source/weex_fork/examples/vue/syntax/template-style.vue" 70 | __vue_options__.render = __vue_template__.render 71 | __vue_options__.staticRenderFns = __vue_template__.staticRenderFns 72 | __vue_options__.style = __vue_options__.style || {} 73 | __vue_styles__.forEach(function (module) { 74 | for (var name in module) { 75 | __vue_options__.style[name] = module[name] 76 | } 77 | }) 78 | 79 | module.exports = __vue_exports__ 80 | module.exports.el = 'true' 81 | new Vue(module.exports) 82 | 83 | 84 | /***/ }, 85 | 86 | /***/ 613: 87 | /***/ function(module, exports) { 88 | 89 | 'use strict'; 90 | 91 | // 92 | // 93 | // 94 | // 95 | // 96 | // 97 | // 98 | // 99 | // 100 | // 101 | // 102 | 103 | module.exports = { 104 | data: function data() { 105 | return { 106 | size: 32, 107 | color: '#ff0000' 108 | }; 109 | }, 110 | methods: { 111 | update: function update(e) { 112 | this.size = 48; 113 | console.log('this.size', this.size); 114 | } 115 | } 116 | }; 117 | 118 | /***/ }, 119 | 120 | /***/ 614: 121 | /***/ function(module, exports) { 122 | 123 | module.exports={render:function (){var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h; 124 | return _h('div', { 125 | on: { 126 | "click": _vm.update 127 | } 128 | }, [_h('text', { 129 | staticStyle: { 130 | fontSize: "48px", 131 | color: "#0000ff" 132 | } 133 | }, ["Hello"]), _h('text', { 134 | style: { 135 | fontSize: _vm.size, 136 | color: _vm.color 137 | } 138 | }, ["Hello"])]) 139 | },staticRenderFns: []} 140 | module.exports.render._withStripped = true 141 | 142 | /***/ } 143 | 144 | /******/ }); -------------------------------------------------------------------------------- /playground/ios/weex.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/weexteam/picker-for-Apache-Weex/9c29f07cd221f6e83e0a0f05388e3a2b40d2010b/playground/ios/weex.png -------------------------------------------------------------------------------- /playground/ios/weex@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/weexteam/picker-for-Apache-Weex/9c29f07cd221f6e83e0a0f05388e3a2b40d2010b/playground/ios/weex@2x.png -------------------------------------------------------------------------------- /start: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | # called by native 3 | THIS_DIR=$(dirname "$0") 4 | pushd "$THIS_DIR" 5 | 6 | npm run build 7 | npm run serve & 8 | npm run dev:examples 9 | 10 | popd 11 | -------------------------------------------------------------------------------- /start-web: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | # called by native 3 | THIS_DIR=$(dirname "$0") 4 | pushd "$THIS_DIR" 5 | 6 | npm run build 7 | npm run serve & 8 | npm run dev:examples:web 9 | 10 | popd 11 | --------------------------------------------------------------------------------