|
|
@@ -16,7 +16,7 @@
|
|
|
</div>
|
|
|
</template>
|
|
|
<script setup>
|
|
|
-import { ref, onMounted, onBeforeUnmount, computed, inject } from 'vue'
|
|
|
+import { ref, onMounted, onBeforeUnmount, computed, inject, watch } from 'vue'
|
|
|
|
|
|
import TagMsg from './content/TagMsg.vue'
|
|
|
import Comment from './content/Comment.vue'
|
|
|
@@ -47,7 +47,16 @@ const setShow = data => {
|
|
|
slideHeigt.value = document.querySelector('.left-item').offsetHeight
|
|
|
})
|
|
|
}
|
|
|
-onMounted(() => {
|
|
|
+
|
|
|
+watch(
|
|
|
+ () => notify.value,
|
|
|
+ (val, old) => {
|
|
|
+ if (val) {
|
|
|
+ goFocusTag()
|
|
|
+ }
|
|
|
+ }
|
|
|
+)
|
|
|
+const goFocusTag = () => {
|
|
|
if (window.kankan) {
|
|
|
window.kankan.TagManager.focusTag(notify.value.sid, {
|
|
|
direction: 'left',
|
|
|
@@ -62,6 +71,9 @@ onMounted(() => {
|
|
|
sdk.scene.comeToTag(new THREE.Vector3(pos.x, pos.y, pos.z))
|
|
|
})
|
|
|
}
|
|
|
+}
|
|
|
+onMounted(() => {
|
|
|
+ goFocusTag()
|
|
|
onResize()
|
|
|
window.addEventListener('resize', onResize)
|
|
|
})
|