Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
Chatopera OpenSource
/
ferry_web
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Members
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
beea0349
authored
Aug 17, 2020
by
lyl_task
Committed by
GitHub
Aug 17, 2020
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #4 from lanyulei/dev
fix bug.
parents
82d79cf5
0800854f
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
12 deletions
src/components/VueFormMaking/components/WidgetForm.vue
src/components/VueFormMaking/components/WidgetForm.vue
View file @
beea0349
...
@@ -286,40 +286,40 @@ export default {
...
@@ -286,40 +286,40 @@ export default {
// 防止布局元素的嵌套拖拽
// 防止布局元素的嵌套拖拽
if
(
item
.
className
.
indexOf
(
'data-grid'
)
>=
0
)
{
if
(
item
.
className
.
indexOf
(
'data-grid'
)
>=
0
)
{
// 如果是列表中拖拽的元素需要还原到原来位置
// 如果是列表中拖拽的元素需要还原到原来位置
item
.
tagName
===
'DIV'
&&
this
.
data
.
list
.
splice
(
oldIndex
,
0
,
row
.
columns
.
list
[
newIndex
])
item
.
tagName
===
'DIV'
&&
this
.
data
.
list
.
splice
(
oldIndex
,
0
,
row
.
columns
[
colIndex
]
.
list
[
newIndex
])
row
.
columns
.
list
.
splice
(
newIndex
,
1
)
row
.
columns
[
colIndex
]
.
list
.
splice
(
newIndex
,
1
)
return
false
return
false
}
}
const
key
=
Date
.
parse
(
new
Date
())
+
'_'
+
Math
.
ceil
(
Math
.
random
()
*
99999
)
const
key
=
Date
.
parse
(
new
Date
())
+
'_'
+
Math
.
ceil
(
Math
.
random
()
*
99999
)
this
.
$set
(
row
.
columns
.
list
,
newIndex
,
{
this
.
$set
(
row
.
columns
[
colIndex
]
.
list
,
newIndex
,
{
...
row
.
columns
.
list
[
newIndex
],
...
row
.
columns
[
colIndex
]
.
list
[
newIndex
],
options
:
{
options
:
{
...
row
.
columns
.
list
[
newIndex
].
options
,
...
row
.
columns
[
colIndex
]
.
list
[
newIndex
].
options
,
remoteFunc
:
'func_'
+
key
remoteFunc
:
'func_'
+
key
},
},
key
,
key
,
// 绑定键值
// 绑定键值
model
:
row
.
columns
.
list
[
newIndex
].
type
+
'_'
+
key
,
model
:
row
.
columns
[
colIndex
]
.
list
[
newIndex
].
type
+
'_'
+
key
,
rules
:
[]
rules
:
[]
})
})
if
(
row
.
columns
.
list
[
newIndex
].
type
===
'radio'
||
row
.
columns
.
list
[
newIndex
].
type
===
'checkbox'
||
row
.
columns
.
list
[
newIndex
].
type
===
'select'
)
{
if
(
row
.
columns
[
colIndex
].
list
[
newIndex
].
type
===
'radio'
||
row
.
columns
[
colIndex
].
list
[
newIndex
].
type
===
'checkbox'
||
row
.
columns
[
colIndex
]
.
list
[
newIndex
].
type
===
'select'
)
{
this
.
$set
(
row
.
columns
.
list
,
newIndex
,
{
this
.
$set
(
row
.
columns
[
colIndex
]
.
list
,
newIndex
,
{
...
row
.
columns
.
list
[
newIndex
],
...
row
.
columns
[
colIndex
]
.
list
[
newIndex
],
options
:
{
options
:
{
...
row
.
columns
.
list
[
newIndex
].
options
,
...
row
.
columns
[
colIndex
]
.
list
[
newIndex
].
options
,
options
:
row
.
columns
.
list
[
newIndex
].
options
.
options
.
map
(
item
=>
({
options
:
row
.
columns
[
colIndex
]
.
list
[
newIndex
].
options
.
options
.
map
(
item
=>
({
...
item
...
item
}))
}))
}
}
})
})
}
}
this
.
selectWidget
=
row
.
columns
.
list
[
newIndex
]
this
.
selectWidget
=
row
.
columns
[
colIndex
]
.
list
[
newIndex
]
},
},
handleWidgetDelete
(
index
)
{
handleWidgetDelete
(
index
)
{
if
(
this
.
data
.
list
.
length
-
1
===
index
)
{
if
(
this
.
data
.
list
.
length
-
1
===
index
)
{
...
...
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