|
@@ -151,9 +151,6 @@ const setHeight = () => {
|
|
|
onMounted(async () => {
|
|
|
await getTree()
|
|
|
setHeight();
|
|
|
- if (bomList.value.length > 0) {
|
|
|
- emits('success', bomList.value[0].id)
|
|
|
- }
|
|
|
window.addEventListener('resize', setHeight);
|
|
|
});
|
|
|
|
|
@@ -285,6 +282,9 @@ const getTree = async () => {
|
|
|
// bomList.value = []
|
|
|
// bomList.value.push(...handleTree(res))
|
|
|
bomList.value = handleTree(res)
|
|
|
+ if (bomList.value.length > 0) {
|
|
|
+ emits('success', bomList.value[0].id)
|
|
|
+ }
|
|
|
})
|
|
|
})
|
|
|
}
|