Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@weex-project/weex-picker

Package Overview
Dependencies
Maintainers
1
Versions
6
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@weex-project/weex-picker

weex picker extend

  • 0.1.1
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

weex-picker

weex-picker是一个weex插件,可以通过weexpack快速集成,可以丰富weex功能

  • 支持的weexpack版本: >= 0.2.0
  • 支持的WeexSDK版本: >= 0.14.0
  • 支持的Vuev版本: 2.x

weex-picker仅支持weex的web端的picker功能,如无需picker功能,无需引入.

Examples

  npm run build:examples:web
  npm run serve

打开 localhost:12580 查看例子.

How to use

  • Step 1
  npm install  weex-picker --save-dev
  • Step 2

    你需要在引入weex-vue-render之后进行模块注册,具体可参考根目录下的./playground/browser/plugininstall.js

  let picker = require('weex-picker');
  if (window.Weex) {
    Weex.install(picker);
  } else if (window.weex) {
    weex.install(picker);
  }
  • Step 3
  const picker = weex.requireModule('picker');
  picker.pick({
			items: [1, 2, 3, 4],
			height: "500px"
	}, function(ret) {
			var result = ret.result;
			if (result == 'success') {
				self.normalpickData = ret.data;
			}
	f})

API Configuration

pickOptions

  • confirmCallback 确定按钮点击回调函数
  • cancelCallback 取消按钮点击回调函数
  • data 数据项(例:[1,2,3,4])
  • formateResult 结果格式化函数
  • cancelTitle 取消文本
  • confirmTitle 确认文本
  • cancelTitleColor 取消文本颜色
  • confirmTitleColor 确认文本颜色
  • height picker高度
  • textColor 文本项颜色
  • selectionColor 选中文本颜色

pickTimeOptions

  • value 默认时间(例:12:00)

##pickDateOptions

API具体可查看Pickday Configuration

Keywords

FAQs

Package last updated on 20 Jun 2017

Did you know?

Socket

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
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc