From 1e83035dab748c311ae2d207950bf219da2bcb11 Mon Sep 17 00:00:00 2001 From: QingHuan <53939074+RJQingHuan@users.noreply.github.com> Date: Sat, 9 Mar 2024 09:47:06 +0800 Subject: [PATCH] =?UTF-8?q?fix(picker):=20=E4=BF=AE=E5=A4=8Dts=E7=B1=BB?= =?UTF-8?q?=E5=9E=8B=E9=94=99=E8=AF=AF=20(#241)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- packages/nutui/components/picker/picker.ts | 4 ++-- packages/nutui/components/picker/use-picker.ts | 1 + packages/nutui/components/pickercolumn/types.ts | 2 +- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/packages/nutui/components/picker/picker.ts b/packages/nutui/components/picker/picker.ts index 1ae59055..8a04b920 100644 --- a/packages/nutui/components/picker/picker.ts +++ b/packages/nutui/components/picker/picker.ts @@ -8,7 +8,7 @@ export const pickerProps = { /** * @description 默认选中项 */ - modelValue: makeArrayProp<(string | number)[]>([]), + modelValue: makeArrayProp<(string | number)>([]), /** * @description 设置标题 */ @@ -24,7 +24,7 @@ export const pickerProps = { /** * @description 对象数组,配置每一列显示的数据 */ - columns: makeArrayProp<(PickerOption | PickerOption[])[]>([]), + columns: makeArrayProp<(PickerOption | PickerOption[])>([]), /** * @description 是否开启3D效果 */ diff --git a/packages/nutui/components/picker/use-picker.ts b/packages/nutui/components/picker/use-picker.ts index f9e0ae93..c386a45a 100644 --- a/packages/nutui/components/picker/use-picker.ts +++ b/packages/nutui/components/picker/use-picker.ts @@ -7,6 +7,7 @@ const DEFAULT_FILED_NAMES = { text: 'text', value: 'value', children: 'children', + className: '', } export const componentName = `${PREFIX}-picker` diff --git a/packages/nutui/components/pickercolumn/types.ts b/packages/nutui/components/pickercolumn/types.ts index de41fe30..2e910cbc 100644 --- a/packages/nutui/components/pickercolumn/types.ts +++ b/packages/nutui/components/pickercolumn/types.ts @@ -27,5 +27,5 @@ export interface PickerFieldNames { text?: string value?: string children?: string - className: string + className?: string }