mirror of
https://gitee.com/vant-contrib/vant.git
synced 2025-04-24 02:16:12 +08:00
chore(Picker): remove DEFAULT_ITEM_HEIGHT var
This commit is contained in:
parent
91b47d64e6
commit
812a35079c
@ -1,5 +1,5 @@
|
|||||||
import { ref, watch, computed } from 'vue';
|
import { ref, watch, computed } from 'vue';
|
||||||
import { pickerProps, PICKER_KEY, DEFAULT_ITEM_HEIGHT } from './shared';
|
import { pickerProps, PICKER_KEY } from './shared';
|
||||||
|
|
||||||
// Utils
|
// Utils
|
||||||
import { unitToPx, preventDefault, createNamespace } from '../utils';
|
import { unitToPx, preventDefault, createNamespace } from '../utils';
|
||||||
@ -45,9 +45,7 @@ export default createComponent({
|
|||||||
|
|
||||||
linkChildren();
|
linkChildren();
|
||||||
|
|
||||||
const itemHeight = computed(() =>
|
const itemHeight = computed(() => unitToPx(props.itemHeight));
|
||||||
props.itemHeight ? unitToPx(props.itemHeight) : DEFAULT_ITEM_HEIGHT
|
|
||||||
);
|
|
||||||
|
|
||||||
const dataType = computed(() => {
|
const dataType = computed(() => {
|
||||||
const { columns } = props;
|
const { columns } = props;
|
||||||
|
@ -10,16 +10,17 @@ export type SharedPickerProps = {
|
|||||||
|
|
||||||
export const PICKER_KEY = 'vanPicker';
|
export const PICKER_KEY = 'vanPicker';
|
||||||
|
|
||||||
export const DEFAULT_ITEM_HEIGHT = 44;
|
|
||||||
|
|
||||||
export const pickerProps = {
|
export const pickerProps = {
|
||||||
title: String,
|
title: String,
|
||||||
loading: Boolean,
|
loading: Boolean,
|
||||||
readonly: Boolean,
|
readonly: Boolean,
|
||||||
allowHtml: Boolean,
|
allowHtml: Boolean,
|
||||||
itemHeight: [Number, String],
|
|
||||||
cancelButtonText: String,
|
cancelButtonText: String,
|
||||||
confirmButtonText: String,
|
confirmButtonText: String,
|
||||||
|
itemHeight: {
|
||||||
|
type: [Number, String],
|
||||||
|
default: 44,
|
||||||
|
},
|
||||||
showToolbar: {
|
showToolbar: {
|
||||||
type: Boolean,
|
type: Boolean,
|
||||||
default: true,
|
default: true,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user