Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
C
confucius
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
罗超
confucius
Commits
56604e40
Commit
56604e40
authored
Jan 14, 2021
by
罗超
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改
parent
bd98ae83
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
37 additions
and
9 deletions
+37
-9
app-attachment.vue
src/components/attachment/app-attachment.vue
+12
-6
UeEditor.vue
src/components/editor/UeEditor.vue
+25
-3
No files found.
src/components/attachment/app-attachment.vue
View file @
56604e40
<
style
scoped
>
<
style
>
.el-dialog__wrapper
{
z-index
:
99999
!important
;
}
.cloud_Table
{
text-align
:
center
;
}
</
style
>
<
template
id=
"app-attachment"
>
<div
class=
"app-attachment"
style=
"z-index:99999"
>
<el-dialog
class=
"app-attachment-dialog"
style=
"width:1000px;height:800px;margin:0 auto;"
<el-dialog
class=
"app-attachment-dialog"
style=
"width:1000px;height:800px;margin:0 auto;
z-index:99999
"
:title=
"title ? title : '选择文件'"
:visible
.
sync=
"dialogVisible"
@
opened=
"dialogOpened"
:close-on-click-modal=
"false"
>
<el-tabs
v-model=
"activeName"
@
tab-click=
"handleClick"
>
<el-tab-pane
label=
"本地文件"
name=
"first"
>
<el-upload
class=
"
avatar-uploader
"
action=
""
:accept=
"accept"
:show-file-list=
"false"
<el-upload
class=
"
upload-demo
"
action=
""
:accept=
"accept"
:show-file-list=
"false"
:http-request=
"UploadAttachment"
:multiple=
"uploadMultple"
>
<div
class=
"app-upload"
flex=
"main:center cross:center"
style=
"width:
100px; height: 100px
;"
>
<i
class=
"el-icon-upload"
></i>
<div
class=
"app-upload"
flex=
"main:center cross:center"
style=
"width:
200px; height: 120px;font-size:67px;border:1px dashed #d1d1d1
;"
>
<i
class=
"el-icon-upload"
style=
"font-size:64px;"
></i>
</div>
</el-upload>
</el-tab-pane>
<el-tab-pane
label=
"云盘文件"
name=
"second"
>
<table
style=
"width:100%"
>
<table
style=
"width:100%"
class=
"cloud_Table"
>
<tr>
<th
width=
"8%"
>
选择
...
...
src/components/editor/UeEditor.vue
View file @
56604e40
<
style
>
</
style
>
<
template
id=
"app-rich-text"
>
<div
class=
"app-rich-text"
>
<textarea
style=
"width: 100%"
:id=
"id"
></textarea>
<app-attachment
v-show=
"attachmentDialogVisible"
style=
"height:0"
:uploadMultple=
"uploadMultple"
<app-attachment
v-show=
"attachmentDialogVisible"
style=
"height:0
;
"
:uploadMultple=
"uploadMultple"
:openDialog=
"attachmentDialogVisible"
:chooseMultple=
"chooseMultple"
@
closed=
"attachmentClosed"
@
selected=
"attachmentSelected"
:uploadType=
"uploadType"
>
</app-attachment>
...
...
@@ -90,8 +92,28 @@
attachmentSelected
(
e
)
{
if
(
e
.
length
)
{
let
html
=
''
;
for
(
let
i
in
e
)
{
html
+=
'<img src="'
+
e
[
i
].
fileUrl
+
'" style="max-width: 100%;">'
;
if
(
this
.
uploadType
==
1
){
for
(
let
i
in
e
)
{
html
+=
'<img src="'
+
e
[
i
].
fileUrl
+
'" style="max-width: 100%;">'
;
}
}
if
(
this
.
uploadType
==
2
){
console
.
log
(
e
,
'eeee'
);
for
(
let
i
in
e
){
html
+=
`<span style="display:-webkit-box;margin-top:10px;background: #F7F8FA;padding: 14px 16px;max-width: 572px;
overflow: hidden;cursor:pointer;-webkit-box-align: center;text-align:left;" :name="
${
e
[
i
].
fileName
}
">
<img src="http://mooc2-ans.chaoxing.com/images/questionbank/icon/txt.png"
style="width:42px; height:42px; overflow:hidden; margin-right:14px;border-radius:4px;">
${
e
[
i
].
fileName
}
</span>`
}
// html +=
//
<
span
type
=
"txt"
name
=
"新建文本文档 (2).txt"
contenteditable
=
"false"
style
=
" display: -webkit-box;-webkit-box-align: center;margin-top:10px;background:#F7F8FA;padding:14px 16px;max-width:572px;zoom:1;overflow:hidden;cursor:pointer;position: relative;"
><
img
src
=
"http://mooc2-ans.chaoxing.com/images/questionbank/icon/txt.png"
style
=
" width:42px; height:42px; overflow:hidden; margin-right:14px;border-radius:4px;"
><
span
style
=
" display:block;min-height:42px; display:table-cell; vertical-align:middle;display:-webkit-box; -webkit-box-pack:center; -webkit-box-orient:vertical; display:-moz-box; -moz-box-pack:center; -moz-box-orient:vertical;"
>
//
<
span
style
=
"-webkit-box-flex:1; width:510px
\
0; display:block; display:-webkit-box; -webkit-box-pack:center; -webkit-box-orient:vertical; display:-moz-box; -moz-box-pack:center; -moz-box-orient:vertical;"
>
//
<
span
style
=
" padding-right:72px; padding-right:0
\
9; font-size:14px; color:#181E33; line-height:20px; display:block; overflow:hidden; white-space:nowrap; text-overflow:ellipsis;"
>
新建文本文档
(
2
).
txt
<
/span
>
//
<
span
style
=
" display:block; padding-right:72px; padding-right:0
\
9; line-height:18px; margin-top:4px; font-size:12px; color:#A8A8B3; overflow:hidden; white-space:nowrap; text-overflow:ellipsis;"
><
/span
>
//
<
/span
>
//
<
/span
>
}
this
.
ue
.
execCommand
(
'inserthtml'
,
html
);
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment