You can access these apis through this
(Vm) context in script methods.
e.g.
<script> module.exports = { methods: { somemethod: function() { this.$vm('someId'); } } } </script>
Deprecated, please use $vm
instead.
Return the element referenced by specific id.
id
(string): the unique identifier.Return the vm object referenced by specific id.
id
(string): the unique identifier.vm
(Vm): a Vm object referenced.Get the current global environment variables and configuration information.
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 iOS
, Android
and Web
.osVersion
(string): the version of os.deviceModel
(string): the model of device. native onlydeviceWidth
(number): the width of device, in pixels.deviceHeight
(number): the height of device, in pixels.Deprecated, please use require('@weex-module/module')[method](...args)
instead. See modules for more information