|
@@ -18,15 +18,14 @@
|
|
|
<div v-if="isSVG" v-html="img" class="img"></div>
|
|
|
<img v-else :src="img" alt="" class="img">
|
|
|
</template>
|
|
|
- {{ content() }}
|
|
|
+ {{ content }}
|
|
|
</div>
|
|
|
</template>
|
|
|
|
|
|
<script setup>
|
|
|
-import { ref, onMounted, onUnmounted } from 'vue';
|
|
|
+import { ref, onMounted, onUnmounted, computed } from 'vue';
|
|
|
import { useViewerStore } from '@/stores/modules/viewer'
|
|
|
import { useDocumentStore } from '@/stores/modules/document'
|
|
|
-import { computed } from 'vue'
|
|
|
import core from '@/core'
|
|
|
const useViewer = useViewerStore()
|
|
|
const useDocument = useDocumentStore()
|
|
@@ -67,13 +66,13 @@ const updateState = () => {
|
|
|
activeState.value = initialState;
|
|
|
};
|
|
|
|
|
|
-const content = () => {
|
|
|
+const content = computed(() => {
|
|
|
if (stateOptions.getContent instanceof Function) {
|
|
|
return stateOptions.getContent(stateOptions);
|
|
|
} else {
|
|
|
return stateOptions.getContent;
|
|
|
}
|
|
|
-};
|
|
|
+});
|
|
|
|
|
|
if (mount) {
|
|
|
onMounted(() => {
|