mirror of
https://gitee.com/vant-contrib/vant.git
synced 2025-04-06 03:57:59 +08:00
fix(Picker): failed to render text type (#8138)
This commit is contained in:
parent
7355b610e1
commit
ba69a212ba
@ -75,13 +75,15 @@ export default createComponent({
|
||||
|
||||
const dataType = computed(() => {
|
||||
const firstColumn = props.columns[0];
|
||||
if (typeof firstColumn === 'string') {
|
||||
return 'text';
|
||||
if (firstColumn && typeof firstColumn !== 'string') {
|
||||
if (childrenKey in firstColumn) {
|
||||
return 'cascade';
|
||||
}
|
||||
if (valuesKey in firstColumn) {
|
||||
return 'object';
|
||||
}
|
||||
}
|
||||
if (childrenKey in firstColumn) {
|
||||
return 'cascade';
|
||||
}
|
||||
return 'object';
|
||||
return 'text';
|
||||
});
|
||||
|
||||
const formatCascade = () => {
|
||||
|
Loading…
x
Reference in New Issue
Block a user