|
@@ -134,7 +134,7 @@
|
|
</template>
|
|
</template>
|
|
|
|
|
|
<script setup>
|
|
<script setup>
|
|
-import { onMounted, ref, watch } from 'vue'
|
|
|
|
|
|
+import { onActivated, onMounted, ref, watch } from 'vue'
|
|
import { useAppStore } from '~src/store'
|
|
import { useAppStore } from '~src/store'
|
|
import { useRoute, useRouter } from 'vue-router'
|
|
import { useRoute, useRouter } from 'vue-router'
|
|
import WbsTree from './components/WbsTree.vue'
|
|
import WbsTree from './components/WbsTree.vue'
|
|
@@ -193,10 +193,12 @@ const TreeExpandedKeys = ref([])
|
|
const TreeCurrentNodeKey = ref(getStoreValue('TreeCurrentNodeKey') || '')
|
|
const TreeCurrentNodeKey = ref(getStoreValue('TreeCurrentNodeKey') || '')
|
|
|
|
|
|
//渲染完成
|
|
//渲染完成
|
|
-onMounted(() => {
|
|
|
|
|
|
+// onMounted(() => {
|
|
|
|
+// initMounted()
|
|
|
|
+// })
|
|
|
|
+onActivated(()=>{
|
|
initMounted()
|
|
initMounted()
|
|
})
|
|
})
|
|
-
|
|
|
|
const initMounted = () => {
|
|
const initMounted = () => {
|
|
console.log('onMounted')
|
|
console.log('onMounted')
|
|
const nodeKey = TreeCurrentNodeKey.value
|
|
const nodeKey = TreeCurrentNodeKey.value
|