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>` </span>`
return html 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 = { const elemToHtmlConf = {
type: 'attachment', // type type: 'attachment', // type
elemToHtml: attachmentToHtml, elemToHtml: attachmentToHtml,
} }
const elemToHtmlConftwo = { const elemToHtmlConftwo = {
type: 'attachmenttwo', // type type: 'attachmenttwo', // type
elemToHtml: attachmentToHtml, elemToHtml: attachmentToHtmltwo,
} }
const elemToHtmlConfmodule = { // JS const elemToHtmlConfmodule = { // JS
elemsToHtml: [elemToHtmlConf, elemToHtmlConftwo /* 其他元素... */] // elemToHtml elemsToHtml: [elemToHtmlConf, elemToHtmlConftwo /* 其他元素... */] // elemToHtml

View File

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