|
@@ -32,7 +32,7 @@
|
|
|
</template>
|
|
|
|
|
|
<script setup>
|
|
|
-import { watchEffect, ref, computed } from "vue";
|
|
|
+import { watchEffect, ref, computed, watch, unref } from "vue";
|
|
|
import subHeader from "../components/subHeader";
|
|
|
import sideMenu from "../components/sideMenu";
|
|
|
import heroSubTitle from "../components/heroSubTitle";
|
|
@@ -41,7 +41,7 @@ import { useCollectStore } from "../store/collect";
|
|
|
const collectStore = useCollectStore();
|
|
|
const entity = computed(() => collectStore.entity);
|
|
|
const files = computed(() => collectStore.files);
|
|
|
-const title = ref("collect-detail");
|
|
|
+// const title = ref("collect-detail");
|
|
|
const props = defineProps({
|
|
|
id: {
|
|
|
type: [String, Number],
|
|
@@ -51,10 +51,12 @@ const props = defineProps({
|
|
|
});
|
|
|
|
|
|
watchEffect(() => {
|
|
|
- document.title = title.value;
|
|
|
if (props.id) {
|
|
|
collectStore.getDetail(props.id);
|
|
|
}
|
|
|
+ if (unref(entity).name) {
|
|
|
+ document.title = unref(entity).name;
|
|
|
+ }
|
|
|
});
|
|
|
</script>
|
|
|
|