This commit is contained in:
2024-04-03 14:32:07 +08:00
parent e19b3f3a63
commit 47e076f78c
2 changed files with 20 additions and 3 deletions

View File

@ -477,13 +477,31 @@ function attachmentToHtml(elem, childrenHtml) { // JS 语法
</span>`
return html
}
function attachmentToHtmltwo(elem, childrenHtml) { // JS
//
const { link = '', fileName = '', fileSpan = '' } = elem
// HTML
const html = `
<span data-w-e-type="attachmenttwo"
data-w-e-is-void
data-w-e-is-inline
data-link="${link}"
data-fileSpan="${fileSpan}",
data-fileName="${fileName}">
<span class="path-tag-wrap">
<span>${fileName}</span>
<span>${fileSpan}</span>
</span>
</span>`
return html
}
const elemToHtmlConf = {
type: 'attachment', // type
elemToHtml: attachmentToHtml,
}
const elemToHtmlConftwo = {
type: 'attachmenttwo', // type
elemToHtml: attachmentToHtml,
elemToHtml: attachmentToHtmltwo,
}
const elemToHtmlConfmodule = { // JS
elemsToHtml: [elemToHtmlConf, elemToHtmlConftwo /* 其他元素... */] // elemToHtml

View File

@ -338,8 +338,7 @@ export default {
beforeDestroy() {
this.wangeditorshow = false
},
watch: {
},
watch: {},
mounted() {
this.form = this.lists[0].list[0]
},