![Oracle Drags Its Feet in the JavaScript Trademark Dispute](https://cdn.sanity.io/images/cgdhsj6q/production/919c3b22c24f93884c548d60cbb338e819ff2435-1024x1024.webp?w=400&fit=max&auto=format)
Security News
Oracle Drags Its Feet in the JavaScript Trademark Dispute
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
@weex-project/weex-picker
Advanced tools
weex-picker是一个weex插件,可以通过weexpack快速集成,可以丰富weex功能
weex-picker仅支持weex的web端的picker功能,如无需picker功能,无需引入.
npm run build:examples
npm run serve
打开 localhost:12580 查看例子.
npm install @weex-project/weex-picker --save-dev
步骤 2
你需要在引入weex-vue-render
之后进行模块注册,具体可参考根目录下的./playground/browser/plugininstall.js
目前模块的注册加入了源码中,请保证在weex环境加载之后引入
<script src="../../../node_modules/vue/dist/vue.runtime.js"></script>
<script src="../../../node_modules/weex-vue-render/dist/index.js"></script>
<script src="../../../node_modules/@weex-project/weex-picker/js/build/index.js"></script>
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;
}
})
以下为 picker 相关的 API,用于数据选择,日期选择,时间选择。
pick(options, callback[options])
调用单选 picker
options {Object}
:调用单选 picker 选项
index {number}
:默认选中的选项items {array}
:picker 数据源callback {function (ret)}
:执行完读取操作后的回调函数。ret {Object}
为 callback
函数的参数,有两个属性:
result {string}
:结果三种类型 success
, cancel
, error
data {number}
:选择的选项,仅成功确认时候存在。pickDate(options, callback[options])
调用 date picker
options {Object}
:调用 date picker 选项,更多选项可查看Pickday Configuration
value {string}
:必选,date picker 选中的值,date 的字符串格式为yyyy-MM-dd
max {string}
:可选,date 的最大值min {string}
:可选,date 的最小值callback {function (ret)}
:执行完读取操作后的回调函数。ret {Object}
为 callback
函数的参数,有两个属性:
result {string}
:结果三种类型 success
, cancel
, error
data {string}
:选择的值 date 的字符,格式为 yyyy-MM-dd
, 仅成功确认的时候存在。pickTime(options, callback[options])
调用 time picker
options {Object}
:调用 time picker 选项
value {string}
:必选,time 格式为 HH:mm
callback {function (ret)}
:执行完读取操作后的回调函数。ret {Object}
为 callback
函数的参数,有两个属性:
result {string}
:结果三种类型 success
, cancel
, error
data {string}
:time 格式为 HH:mm
, 仅成功确认的时候存在。
FAQs
weex picker extend
The npm package @weex-project/weex-picker receives a total of 6 weekly downloads. As such, @weex-project/weex-picker popularity was classified as not popular.
We found that @weex-project/weex-picker demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 11 open source maintainers collaborating on the project.
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.
Security News
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
Security News
The Linux Foundation is warning open source developers that compliance with global sanctions is mandatory, highlighting legal risks and restrictions on contributions.
Security News
Maven Central now validates Sigstore signatures, making it easier for developers to verify the provenance of Java packages.