Socket
Socket
Sign inDemoInstall

ucar-weex

Package Overview
Dependencies
208
Maintainers
1
Versions
19
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    ucar-weex

Weex expand


Version published
Maintainers
1
Install size
9.43 MB
Created

Readme

Source

ucar-weex

weex 的增强框架

介绍

  • Utils: Utils
  • Router: 路由部分 push() ,pop()
  • Bridge: postGlobalEvent() ,sendScheme

开始

// 引入 ucar-weex
import uweex from 'weex-ext'

//常用utils
uweex.utils.isString('xx');

//发送全局事件
uweex.bridge.postGlobalEvent('test', {key: '你好'});

//接收全局事件
uweex.bridge.addEventListener('test',(e)=>{
    
})
//注销全局事件
uweex.bridge.removeEventListener('test')

//打开新的页面
let options = {
    url: item.page,
    param: {
        'KEY_INDEX': 'VALUE_INDEX'
    },
    navBar:{
        backgroundColor: '#000000',
    }
};
uweex.router.push(options,() => {
    
})

//关闭当前页面
uweex.router.pop()

//打开指定页面
uweex.router.popTo({index:-1,tagCode:"pageb",param:{test:'testB'}},() => {} );

Keywords

FAQs

Last updated on 21 Sep 2017

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc