mirror of
https://gitee.com/vant-contrib/vant.git
synced 2025-04-06 03:57:59 +08:00
chore(Picker): simplify code
This commit is contained in:
parent
05f420e266
commit
edc88551c3
@ -45,10 +45,11 @@ export default createComponent({
|
|||||||
const formattedColumns = ref([]);
|
const formattedColumns = ref([]);
|
||||||
|
|
||||||
const { text: textKey, values: valuesKey, children: childrenKey } = {
|
const { text: textKey, values: valuesKey, children: childrenKey } = {
|
||||||
text: props.valueKey, // 向下兼容
|
// compatible with valueKey prop
|
||||||
|
text: props.valueKey,
|
||||||
values: 'values',
|
values: 'values',
|
||||||
children: 'children',
|
children: 'children',
|
||||||
...(props.columnsFieldNames || {}),
|
...props.columnsFieldNames,
|
||||||
};
|
};
|
||||||
|
|
||||||
const { children, linkChildren } = useChildren(PICKER_KEY);
|
const { children, linkChildren } = useChildren(PICKER_KEY);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user