Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
S
SuperMan
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
1
Issues
1
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
罗超
SuperMan
Commits
44476ec3
Commit
44476ec3
authored
Jun 22, 2020
by
zhengke
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改
parent
e0c92f41
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
43 additions
and
4 deletions
+43
-4
App.vue
src/App.vue
+1
-1
WebSiteEdit.vue
src/components/WebSet/WebSiteEdit.vue
+42
-3
No files found.
src/App.vue
View file @
44476ec3
...
...
@@ -173,7 +173,7 @@ export default {
}
</
script
>
<
style
>
@import
"//at.alicdn.com/t/font_635492_
2ir29znz8xp
.css"
;
@import
"//at.alicdn.com/t/font_635492_
erhq7cu6ne6
.css"
;
@import
"./assets/css/Semibold.css"
;
@import
"./assets/css/global/config.css"
;
@import
"./assets/css/fileIcon.css"
;
...
...
src/components/WebSet/WebSiteEdit.vue
View file @
44476ec3
...
...
@@ -152,7 +152,18 @@
font-size
:
14px
;
margin-left
:
20px
;
}
.ui-sortable-handle
{
display
:
flex
;
align-items
:
center
;
justify-content
:
center
;
width
:
40px
;
flex-basis
:
40px
;
background-color
:
#eee
;
cursor
:
move
;
}
.ui-sortable-handle
i
{
font-size
:
25px
;
}
</
style
>
<
template
>
<div
class=
"WebSiteEdit"
>
...
...
@@ -175,9 +186,14 @@
</div>
<div
class=
"WebSite_right"
>
<div
class=
"WebSite_right_preview"
>
<div
v-for=
"(item,index) in dataList"
:key=
"index"
>
<div
v-for=
"(item,index) in dataList"
draggable=
"true"
@
dragstart=
"handleDragStart($event, item)"
@
dragover
.
prevent=
"handleDragOver($event, item)"
@
dragenter=
"handleDragEnter($event, item)"
@
dragend=
"handleDragEnd($event, item)"
:key=
"index"
>
<div
class=
"diy-component-preview"
>
<div
class=
"WebSite_item"
>
<div
class=
"ui-sortable-handle"
>
<i
class=
"iconfont icon-Arrowsdowntopmove"
></i>
</div>
<div
class=
"temp-img"
>
<img
v-if=
"item.plugData&&item.plugData.CoverImg"
:src=
"item.plugData.CoverImg"
alt=
""
/>
</div>
...
...
@@ -235,7 +251,8 @@
<!-- 挑选自有行程 段落链接 -->
<b2blinkdialog
v-if=
"currentEditItem.Id=='b2b_LinkP'"
:plugData=
"currentEditItemData"
></b2blinkdialog>
<!-- 挑选自有行程 图片链接 -->
<linkpicturedialog
v-if=
"currentEditItem.Id=='b2b_LinkPicture'"
:plugData=
"currentEditItemData"
></linkpicturedialog>
<linkpicturedialog
v-if=
"currentEditItem.Id=='b2b_LinkPicture'"
:plugData=
"currentEditItemData"
>
</linkpicturedialog>
<!-- 搜寻区块 banner -->
<bannerdialog
v-if=
"currentEditItem.Id=='search_b'"
:plugData=
"currentEditItemData"
></bannerdialog>
<!-- 搜寻区块 轮播淡出 -->
...
...
@@ -288,6 +305,7 @@
currentEditItemData
:
{},
//当前编号的插件
currentEditItem
:
{},
dragging
:
null
};
},
created
()
{},
...
...
@@ -311,6 +329,27 @@
otherdialog
},
methods
:
{
handleDragStart
(
e
,
item
)
{
this
.
dragging
=
item
;
},
handleDragEnd
(
e
,
item
)
{
this
.
dragging
=
null
},
//首先把div变成可以放置的元素,即重写dragenter/dragover
handleDragOver
(
e
)
{
e
.
dataTransfer
.
dropEffect
=
'move'
// e.dataTransfer.dropEffect="move";//在dragenter中针对放置目标来设置!
},
handleDragEnter
(
e
,
item
)
{
e
.
dataTransfer
.
effectAllowed
=
"move"
//为需要移动的元素设置dragstart事件
if
(
item
===
this
.
dragging
)
{
return
}
const
newItems
=
[...
this
.
dataList
]
const
src
=
newItems
.
indexOf
(
this
.
dragging
)
const
dst
=
newItems
.
indexOf
(
item
)
newItems
.
splice
(
dst
,
0
,
...
newItems
.
splice
(
src
,
1
))
this
.
dataList
=
newItems
},
//显示弹窗
showDialog
(
item
)
{
this
.
isShowDialog
=
true
;
...
...
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