YouKeChuanMei_VUE/src/views/mediaLibrary/linkMediaForm.vue
2025-10-13 16:10:17 +08:00

26 lines
707 B
Vue

<template>
<div class="app-container">
<media-form ref="mediaFormRef" />
</div>
</template>
<script setup name="Post">
import { onMounted, ref } from 'vue';
import { useBackgroundStore } from '@/store/modules/background'
import otherbg from '@/assets/images/otherbg.png'
import mediaForm from "./mediaForm.vue";
const bgStore = useBackgroundStore()
const route = useRoute()
const mediaFormRef = ref(null)
// 初始化
onMounted(() => {
bgStore.setBgImage(otherbg)
const _mediaId = route.params && route.params.mediaId
if (_mediaId) {
console.log('接收id', _mediaId)
mediaFormRef.value.linkInitForm('编辑媒体信息', { id: _mediaId })
}
});
</script>