|
|
@@ -42,6 +42,7 @@ const treeSelectOptionCover = <T>(
|
|
|
);
|
|
|
|
|
|
const getTreePath = (options: TreeOption[], value: string): null | string[] => {
|
|
|
+
|
|
|
for (const option of options) {
|
|
|
if (option.value === value) {
|
|
|
return [option.value];
|
|
|
@@ -123,7 +124,7 @@ export const useTreeSelect = <T>(
|
|
|
const path = computed({
|
|
|
get: () => getTreePath(options.value, props.modelValue)!,
|
|
|
set: (path) => {
|
|
|
- console.log("path", path);
|
|
|
+ console.log("path", path, props);
|
|
|
update(path ? path[path.length - 1] : "");
|
|
|
},
|
|
|
});
|