首页 > Windows开发 > 详细

weex APIs

时间:2016-07-03 21:27:58      阅读:283      评论:0      收藏:0      [点我收藏+]

1.通过这个$vm()上下文访问这些api在脚本的方法

<script>
module.exports = {
    methods: {
        somemethod: function() {
            this.$vm(someId);
        }
    }
}
</script>

1.1 $(id)

已过时, 使用 $vm .

1.2 $el(id)

返回元素引用的特定的id

1.3 $getConfig()

获取当前全局环境变量和配置信息

  • config(object): the object of config.
  • bundleUrl(string): the url of bundle.
  • debug(boolean): if is debug mode.
  • env(object): a object of envrioment.
    • weexVersion(string): a version of weex sdk.
    • appName(string): a name of app.
    • appVersion(string): a version of app.
    • platform(string): the platform, one of iOSAndroid and Web.
    • osVersion(string): the version of os.
    • deviceModel(string): the model of device. native only
    • deviceWidth(number): the width of device, default is 750.
    • deviceHeight(number): the height of device.

 

weex APIs

原文:http://www.cnblogs.com/Jsonlu/p/5638714.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!