提交 47091b80 编写于 作者: 璃白.'s avatar 璃白. 🌻

feat:隐藏上传视频按钮

上级 83e93d0b
此差异已折叠。
......@@ -415,28 +415,25 @@ export function preventDefault(id) {
return;
}
export async function renderVideo(id, html) {
const virtualDom = document.createElement("div");
virtualDom.innerHTML = html;
document.body.appendChild(virtualDom);
const videoList = Array.from(virtualDom.getElementsByTagName("video"));
// export async function renderVideo(id, html) {
// const virtualDom = document.createElement("div");
// virtualDom.innerHTML = html;
// document.body.appendChild(virtualDom);
// const videoList = Array.from(virtualDom.getElementsByTagName("video"));
const newHtml = await new Promise((resolve, rej) => {
videoList.forEach(item => {
console.log(item);
item.setAttribute("controls", "controls");
});
setTimeout(() => {
const newHtml = virtualDom.innerHTML;
resolve(newHtml);
// document.body.removeChild(virtualDom);
}, 5000);
});
console.log(newHtml);
// if (newHtml) {
return newHtml;
// }
}
// const newHtml = await new Promise((resolve, rej) => {
// videoList.forEach(item => {
// console.log(item);
// item.setAttribute("controls", "controls");
// });
// setTimeout(() => {
// const newHtml = virtualDom.innerHTML;
// resolve(newHtml);
// document.body.removeChild(virtualDom);
// }, 5000);
// });
// return newHtml;
// }
// 获取方法参数名
export function getParameterName(fn) {
......
......@@ -39,10 +39,10 @@ export default {
// 链接转换为卡片
const { vDom, links } = getLinkTags(this.id, cleanHtml);
const { callUserList, userHtml } = addLinkTarget(cleanHtml);
const videoHtml = await renderVideo(this.id, userHtml);
// const videoHtml = await renderVideo(this.id, userHtml);
this.$emit("callUserList", callUserList);
this.$emit("getFilteredTags", filteredTags);
this.$emit("update:html", videoHtml);
this.$emit("update:html", userHtml);
if (links.length) this.$emit("renderLinksHtml", { vDom, links });
},
rerender() {
......
......@@ -237,13 +237,13 @@ export default {
startStr: "",
endStr: ""
},
{
name: "video",
icon: "shipin",
tip: "上传视频",
startStr: "",
endStr: ""
},
// {
// name: "video",
// icon: "shipin",
// tip: "上传视频",
// startStr: "",
// endStr: ""
// },
{
name: "task",
icon: "renwu",
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册