chore(Picker): simplify code

This commit is contained in:
chenjiahan 2021-01-17 15:21:40 +08:00
parent 05f420e266
commit edc88551c3

View File

@ -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);