From edc88551c377ff8626c28af1bea2e81ee6d89721 Mon Sep 17 00:00:00 2001 From: chenjiahan Date: Sun, 17 Jan 2021 15:21:40 +0800 Subject: [PATCH] chore(Picker): simplify code --- src/picker/index.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/picker/index.js b/src/picker/index.js index 8c8fef500..ce434b8ec 100644 --- a/src/picker/index.js +++ b/src/picker/index.js @@ -45,10 +45,11 @@ export default createComponent({ const formattedColumns = ref([]); const { text: textKey, values: valuesKey, children: childrenKey } = { - text: props.valueKey, // 向下兼容 + // compatible with valueKey prop + text: props.valueKey, values: 'values', children: 'children', - ...(props.columnsFieldNames || {}), + ...props.columnsFieldNames, }; const { children, linkChildren } = useChildren(PICKER_KEY);