|
@@ -5,7 +5,9 @@
|
|
|
:tag-sid="tag.sid"
|
|
|
@mouseleave.prevent="onMouseLeave($event, tag)"
|
|
|
:style="{
|
|
|
- transform: `translate3d(${tag.x}px,${tag.y}px,0)`,
|
|
|
+ // transform: `translate3d(${tag.x}px,${tag.y}px,0)`,
|
|
|
+ left: `${tag.x}px`,
|
|
|
+ top: `${tag.y}px`,
|
|
|
'z-index': isShowTag(tag) ? 1 : 0,
|
|
|
}"
|
|
|
:class="{
|
|
@@ -23,6 +25,7 @@
|
|
|
class="trans"
|
|
|
:class="{
|
|
|
active: isShowTag(tag),
|
|
|
+ fixed: isMobile,
|
|
|
}"
|
|
|
>
|
|
|
<template v-if="tag && !showLayer">
|
|
@@ -138,15 +141,16 @@
|
|
|
onMounted(async () => {
|
|
|
const app = await useApp();
|
|
|
app.TagManager.on('loaded', (data: any) => {
|
|
|
- console.log('data', data);
|
|
|
+ console.log('tag-data', data);
|
|
|
sceneStore.loadTags(data);
|
|
|
});
|
|
|
watchEffect(() => {
|
|
|
if (tags.value?.length) {
|
|
|
app.TagManager.load(tags.value);
|
|
|
+ console.log('TagManager-load', tags.value);
|
|
|
app.TagManager.updatePosition(tags.value);
|
|
|
}
|
|
|
- if (currentTag.value) {
|
|
|
+ if (currentTag.value?.sid) {
|
|
|
//用 watch deep由于object prop过多会引起loop
|
|
|
if (unref(isMobile)) {
|
|
|
focusTag(currentTag.value);
|
|
@@ -211,7 +215,7 @@
|
|
|
};
|
|
|
|
|
|
let position = isMobile.value ? 'center' : 'left';
|
|
|
- // console.log('app.TagManager', app.TagManager, position, params);
|
|
|
+ console.warn('app.TagManager', typeof app.TagManager.focus, position, params);
|
|
|
app.TagManager.focus(params, 'board', position);
|
|
|
} catch (err) {}
|
|
|
}, 300);
|