mirror of
https://gitee.com/wot-design-uni/wot-design-uni.git
synced 2025-12-06 09:08:51 +08:00
feat: ✨ wd-picker-view 添加 item-height 属性
Co-authored-by: zhujihui <zhujihui@primecare.group>
This commit is contained in:
parent
8efad6d340
commit
8d84508165
@ -144,6 +144,7 @@ const filter = (type, values) => {
|
||||
| loading | 加载中 | boolean | - | false | - |
|
||||
| loading-color | 加载的颜色,只能使用十六进制的色值写法,且不能使用缩写 | string | - | #4D80F0 | - |
|
||||
| columns-height | picker内部滚筒高 | number | - | 231 | - |
|
||||
| item-height | picker item的高度 | number | - | 35 | - |
|
||||
| formatter | 自定义弹出层选项文案的格式化函数,返回一个字符串 | function | - | - | - |
|
||||
| filter | 自定义过滤选项的函数,返回列的选项数组 | function | - | - | - |
|
||||
| minDate | 最小日期,13 位的时间戳 | `timestamp` | - | 当前日期 - 10年 | - |
|
||||
|
||||
@ -289,6 +289,7 @@ const displayFormatTabLabel = (items) => {
|
||||
| loading | 加载中 | boolean | - | false | - |
|
||||
| loading-color | 加载的颜色,只能使用十六进制的色值写法,且不能使用缩写 | string | - | #4D80F0 | - |
|
||||
| columns-height | picker内部滚筒高 | number | - | 231 | - |
|
||||
| item-height | picker item的高度 | number | - | 35 | - |
|
||||
| title | 弹出层标题 | string | - | - | - |
|
||||
| cancel-button-text | 取消按钮文案 | string | - | 取消 | - |
|
||||
| confirm-button-text | 确认按钮文案 | string | - | 完成 | - |
|
||||
|
||||
@ -21,6 +21,10 @@ export const datetimePickerViewProps = {
|
||||
* picker内部滚筒高
|
||||
*/
|
||||
columnsHeight: makeNumberProp(217),
|
||||
/**
|
||||
* picker item的高度
|
||||
*/
|
||||
itemHeight: makeNumberProp(35),
|
||||
/**
|
||||
* 选项的key
|
||||
*/
|
||||
|
||||
@ -7,6 +7,7 @@
|
||||
v-model="pickerValue"
|
||||
:columns="columns"
|
||||
:columns-height="columnsHeight"
|
||||
:item-height="itemHeight"
|
||||
:columnChange="columnChange"
|
||||
:loading="loading"
|
||||
:loading-color="loadingColor"
|
||||
|
||||
@ -30,6 +30,10 @@ export const pickerViewProps = {
|
||||
* picker内部滚筒高
|
||||
*/
|
||||
columnsHeight: makeNumberProp(217),
|
||||
/**
|
||||
* picker item的高度
|
||||
*/
|
||||
itemHeight: makeNumberProp(35),
|
||||
/**
|
||||
* 选项对象中,value对应的 key
|
||||
*/
|
||||
|
||||
@ -52,7 +52,6 @@ const props = defineProps(pickerViewProps)
|
||||
const emit = defineEmits(['change', 'pickstart', 'pickend', 'update:modelValue'])
|
||||
|
||||
const formatColumns = ref<ColumnItem[][]>([]) // 格式化后的列数据
|
||||
const itemHeight = ref<number>(35)
|
||||
const selectedIndex = ref<Array<number>>([]) // 格式化之后,每列选中的下标集合
|
||||
|
||||
watch(
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user