[add] 文档库和文档拆分模块的详情页
This commit is contained in:
@@ -259,6 +259,12 @@ export default {
|
||||
disabled: {
|
||||
type: Boolean,
|
||||
default: false
|
||||
},
|
||||
extraParams: {
|
||||
type: Object,
|
||||
default: () => {
|
||||
return {}
|
||||
}
|
||||
}
|
||||
},
|
||||
data () {
|
||||
|
||||
@@ -36,16 +36,16 @@
|
||||
{{text}}
|
||||
</span>
|
||||
</span>
|
||||
<!-- <span slot="urlClick" slot-scope="text,record">-->
|
||||
<!-- <a class="text" :title="text" @click="urlClick(text)">-->
|
||||
<!-- {{text}}-->
|
||||
<!-- </a>-->
|
||||
<!-- </span>-->
|
||||
<!-- <span slot="detailText" slot-scope="text,record">-->
|
||||
<!-- <span class="text" :title="text">-->
|
||||
<!-- {{text}}-->
|
||||
<!-- </span>-->
|
||||
<!-- </span>-->
|
||||
<span slot="urlClick" slot-scope="text">
|
||||
<a class="text" :title="text" @click="urlClick(text)">
|
||||
{{text}}
|
||||
</a>
|
||||
</span>
|
||||
<span slot="detailText" slot-scope="text">
|
||||
<span class="text" :title="text">
|
||||
{{text}}
|
||||
</span>
|
||||
</span>
|
||||
</a-table>
|
||||
</div>
|
||||
</template>
|
||||
@@ -337,6 +337,21 @@ export default {
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
<style scoped lang="less">
|
||||
.text {
|
||||
margin-right: 10px;
|
||||
}
|
||||
|
||||
.textName {
|
||||
width: 100%;
|
||||
overflow: hidden;
|
||||
display: -webkit-box;
|
||||
text-overflow: ellipsis;
|
||||
/*! autoprefixer: off */
|
||||
-webkit-box-orient: vertical;
|
||||
-webkit-line-clamp: 1;
|
||||
/*! autoprefixer: on;*/
|
||||
text-justify: inter-ideograph;
|
||||
word-break: break-all;
|
||||
}
|
||||
</style>
|
||||
|
||||
@@ -0,0 +1,96 @@
|
||||
<template>
|
||||
<div>
|
||||
<script id="editor" type="text/plain" ></script>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import '@/../public/ueditor/ueditor.config.js'
|
||||
import '@/../public/ueditor/ueditor.all.js'
|
||||
import '@/../public/ueditor/lang/zh-cn/zh-cn.js'
|
||||
import '@/../public/ueditor/lang/en/en.js'
|
||||
|
||||
export default {
|
||||
name: 'UEditor',
|
||||
data () {
|
||||
return {
|
||||
editor: null
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
getUEContent () {
|
||||
return this.editor.getContent()
|
||||
},
|
||||
getContentTxt () {
|
||||
return this.editor.getContentTxt()
|
||||
},
|
||||
setContent (content) {
|
||||
return this.editor.ready(() => {
|
||||
this.editor.setContent(content, true)
|
||||
})
|
||||
},
|
||||
// 清空内容
|
||||
execCommand (content) {
|
||||
return this.editor.execCommand('cleardoc')
|
||||
},
|
||||
getContentLength () {
|
||||
return this.editor.getContentLength()
|
||||
}
|
||||
},
|
||||
props: {
|
||||
id: {
|
||||
type: String
|
||||
},
|
||||
config: {
|
||||
type: Object
|
||||
},
|
||||
fontfamily: {
|
||||
type: String,
|
||||
default: ''
|
||||
},
|
||||
fontsize: {
|
||||
type: String,
|
||||
default: ''
|
||||
},
|
||||
bold: {
|
||||
type: Boolean,
|
||||
default: false
|
||||
},
|
||||
content: {
|
||||
type: String,
|
||||
default: ''
|
||||
}
|
||||
},
|
||||
mounted () {
|
||||
UEDITOR_CONFIG.UEDITOR_HOME_URL = '../../public/ueditor/'
|
||||
// 初始化UE
|
||||
this.editor = UE.delEditor('editor')
|
||||
this.editor = UE.getEditor('editor', this.config)
|
||||
const _this = this
|
||||
UE.getEditor('editor').addListener('blur', function (editor) {
|
||||
_this.$emit('editor-onChange', _this.getUEContent())
|
||||
})
|
||||
UE.getEditor('editor').ready(function () {
|
||||
if (_this.fontfamily !== '') {
|
||||
UE.getEditor('editor').execCommand('fontfamily', _this.fontfamily)
|
||||
}
|
||||
if (_this.content !== '') {
|
||||
UE.getEditor('editor').setContent(_this.content)
|
||||
}
|
||||
if (_this.fontsize !== '') {
|
||||
UE.getEditor('editor').execCommand('fontsize', _this.fontsize)
|
||||
}
|
||||
if (_this.bold) {
|
||||
UE.getEditor('editor').execCommand('bold')
|
||||
}
|
||||
})
|
||||
},
|
||||
destoryed () {
|
||||
this.editor.destory()
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
|
||||
</style>
|
||||
Reference in New Issue
Block a user