添加教程下载 和调整作品详情
This commit is contained in:
@@ -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
18
src/tool/mount.js
Normal 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);
|
||||
}
|
||||
Reference in New Issue
Block a user