修改
This commit is contained in:
parent
e19b3f3a63
commit
47e076f78c
@ -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
|
||||||
|
|||||||
@ -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]
|
||||||
},
|
},
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user