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
48139478
Commit
48139478
authored
Jun 22, 2020
by
zhengke
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改
parent
96074263
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
16 deletions
+6
-16
WebSiteEdit.vue
src/components/WebSet/WebSiteEdit.vue
+6
-16
No files found.
src/components/WebSet/WebSiteEdit.vue
View file @
48139478
...
@@ -177,10 +177,7 @@
...
@@ -177,10 +177,7 @@
</el-select>
</el-select>
<div
class=
"temp-list-wrap"
>
<div
class=
"temp-list-wrap"
>
<div
v-for=
"(subItem,subIndex) in detailsList"
class=
"temp-list-item"
:key=
"subIndex"
<div
v-for=
"(subItem,subIndex) in detailsList"
class=
"temp-list-item"
:key=
"subIndex"
draggable=
"true"
@
dragstart=
"dragLeftStart($event,subItem)"
@
dragover=
"onDragover($event,subItem)"
>
draggable=
"true"
@
dragstart=
"dragLeftStart($event,subItem)"
>
<!--
<div
v-for=
"(subItem,subIndex) in detailsList"
class=
"temp-list-item"
:key=
"subIndex"
draggable=
"true"
@
dragstart=
"dragLeftStart($event,subItem)"
@
click=
"AddData(subItem)"
>
-->
<img
v-if=
"subItem.TemplateData&&subItem.TemplateData.CoverImg"
:src=
"subItem.TemplateData.CoverImg"
<img
v-if=
"subItem.TemplateData&&subItem.TemplateData.CoverImg"
:src=
"subItem.TemplateData.CoverImg"
:alt=
"subItem.SubTemplateName"
/>
:alt=
"subItem.SubTemplateName"
/>
<div
class=
"temp-font"
>
{{
subItem
.
SubTemplateName
}}
</div>
<div
class=
"temp-font"
>
{{
subItem
.
SubTemplateName
}}
</div>
...
@@ -189,13 +186,9 @@
...
@@ -189,13 +186,9 @@
</div>
</div>
<div
class=
"WebSite_right"
>
<div
class=
"WebSite_right"
>
<div
class=
"WebSite_right_preview"
>
<div
class=
"WebSite_right_preview"
>
<!--
<div
v-for=
"(item,index) in dataList"
draggable=
"true"
@
dragstart=
"handleDragStart($event, item)"
<div
v-for=
"(item,index) in dataList"
draggable=
"true"
@
drop=
"drop($event,index)"
@
dragstart=
"handleDragStart($event, item)"
@
dragover
.
prevent=
"handleDragOver($event, item)"
@
dragenter=
"handleDragEnter($event, item)"
@
dragend=
"handleDragEnd($event, item)"
:key=
"index"
>
-->
<div
v-for=
"(item,index) in dataList"
draggable=
"true"
@
drop=
"drop($event,index)"
@
dragover=
"allowDrop($event)"
@
dragstart=
"handleDragStart($event, item)"
@
dragover
.
prevent=
"handleDragOver($event, item)"
@
dragenter=
"handleDragEnter($event, item)"
@
dragover
.
prevent=
"handleDragOver($event, item)"
@
dragenter=
"handleDragEnter($event, item)"
@
dragend=
"handleDragEnd($event, item)"
:key=
"index"
>
@
dragend=
"handleDragEnd($event, item)"
:key=
"index"
>
<div
class=
"diy-component-preview"
>
<div
class=
"diy-component-preview"
>
<div
class=
"WebSite_item"
>
<div
class=
"WebSite_item"
>
<div
class=
"ui-sortable-handle"
>
<div
class=
"ui-sortable-handle"
>
...
@@ -340,6 +333,7 @@
...
@@ -340,6 +333,7 @@
otherdialog
otherdialog
},
},
methods
:
{
methods
:
{
//右边上下拖动开始
handleDragStart
(
e
,
item
)
{
handleDragStart
(
e
,
item
)
{
if
(
this
.
isDraggable
){
if
(
this
.
isDraggable
){
this
.
dragging
=
item
;
this
.
dragging
=
item
;
...
@@ -369,6 +363,7 @@
...
@@ -369,6 +363,7 @@
this
.
dataList
=
newItems
this
.
dataList
=
newItems
}
}
},
},
//右边上下拖动结束
//显示弹窗
//显示弹窗
showDialog
(
item
)
{
showDialog
(
item
)
{
this
.
isShowDialog
=
true
;
this
.
isShowDialog
=
true
;
...
@@ -397,7 +392,7 @@
...
@@ -397,7 +392,7 @@
};
};
this
.
dataList
.
push
(
obj
);
this
.
dataList
.
push
(
obj
);
},
},
//从左拖动到右边开始
dragLeftStart
(
ev
,
item
){
dragLeftStart
(
ev
,
item
){
this
.
isDraggable
=
false
;
this
.
isDraggable
=
false
;
var
obj
=
{
var
obj
=
{
...
@@ -407,12 +402,7 @@
...
@@ -407,12 +402,7 @@
};
};
this
.
dragObj
=
obj
;
this
.
dragObj
=
obj
;
},
},
onDragover
(
ev
){
//从左拖动到右边结束
ev
.
stopPropagation
();
},
allowDrop
(
ev
){
ev
.
preventDefault
();
},
drop
(
ev
,
index
){
drop
(
ev
,
index
){
if
(
!
this
.
isDraggable
){
if
(
!
this
.
isDraggable
){
this
.
dataList
.
splice
(
index
,
0
,
this
.
dragObj
);
this
.
dataList
.
splice
(
index
,
0
,
this
.
dragObj
);
...
...
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