添加教程下载 和调整作品详情

This commit is contained in:
X1627315083
2024-07-08 16:07:04 +08:00
parent b6cb8e9bf0
commit dbf891bdf7
13 changed files with 191 additions and 16 deletions

View File

@@ -31,7 +31,7 @@ let httpIp = process.env.NODE_ENV == 'development' ? "" : "";
axios.defaults.baseURL = httpIp; //配置接口地址
// console.log(axios.defaults.baseURL);
axios.defaults.baseURL = process.env.VUE_APP_BASE_URL; //配置接口地址
// axios.defaults.baseURL = process.env.VUE_APP_BASE_URL; //配置接口地址
// 创建取消令牌
const CancelToken = axios.CancelToken;

18
src/tool/mount.js Normal file
View File

@@ -0,0 +1,18 @@
import { createApp } from "vue";
import scaleVideo from "@/component/HomePage/scaleVideo.vue";
// 使用vue3的createApp,以及mount,unmount方法创建挂载实例
export default function showViewVideo(options) {
// 创建一个节点,并将组件挂载上去
const mountNode = document.createElement("div");
document.body.appendChild(mountNode);
const glearVideo = createApp(scaleVideo, {
...options,
visible: true,
remove() {
glearVideo.unmount(); //创建完后要进行销毁
document.body.removeChild(mountNode);
},
});
console.log(glearVideo.mount(mountNode));
return glearVideo.mount(mountNode);
}