1.0.8 • Published 1 year ago

a-picker v1.0.8

Weekly downloads
-
License
-
Repository
-
Last release
1 year ago

zc-picker

一款模拟安卓选择的picker选择器,适配移动端和pc端,可进行触摸操作。

image-20230330102527456

demo展示案例

主要功能

✅年份选择

✅年月选择

✅年月日选择

✅自定义选择器

安装

npm i a-picker

使用

import APicker from "a-picker";
Vue.use(APicker);
 <el-button type="primary" @click="show = true">打开选择器</el-button>
      
    <a-picker
      v-model="selctedText"
      @select="select"
      :type="pickerSelct"
      :options="pickerOption"
      :visiable.sync="show"
   / >

参数说明

image-20230330111200909

Attributes

参数说明类型可选值默认值
value / v-model选中项绑定值string
options可选项数据源,custom时候生效,键名为label,value,array
type选择器类型 (year/month/date/自定义custom) (年份/年+月/年+月+日/自定义)string
visiable打开选择器组件,使用.sync修饰string
rangerange 日期范围,以-分割, 仅在时间起作用, start,endarray"2020-01-01", "2099-12-31"
type选择器类型 (year/month/date/自定义custom) (年份/年+月/年+月+日/自定义)stringyear/month/date/custom
spiltText选择之间的文本,如不需要可以设为空array"年", "月", "日"
titleNamepicker中间的标题,控制是否展示日期日期

Events

事件名称说明回调参数
select当选中节点变化时触发,(label,value)返回当选择的选中值和选中值对应的value,某些情况下可能会用到
1.0.8

1 year ago

1.0.7

1 year ago

1.0.6

1 year ago

1.0.5

1 year ago

1.0.4

1 year ago

1.0.3

1 year ago

1.0.2

1 year ago

1.0.1

1 year ago