mirror of
https://gitee.com/vant-contrib/vant.git
synced 2025-04-24 18:36:51 +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 dataType = computed(() => {
|
||||||
const firstColumn = props.columns[0];
|
const firstColumn = props.columns[0];
|
||||||
if (typeof firstColumn === 'string') {
|
if (firstColumn && typeof firstColumn !== 'string') {
|
||||||
return 'text';
|
|
||||||
}
|
|
||||||
if (childrenKey in firstColumn) {
|
if (childrenKey in firstColumn) {
|
||||||
return 'cascade';
|
return 'cascade';
|
||||||
}
|
}
|
||||||
|
if (valuesKey in firstColumn) {
|
||||||
return 'object';
|
return 'object';
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return 'text';
|
||||||
});
|
});
|
||||||
|
|
||||||
const formatCascade = () => {
|
const formatCascade = () => {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user