Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
F
finance-manage
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
finance-oa
finance-manage
Commits
441da7ec
Commit
441da7ec
authored
Apr 01, 2020
by
RuoYi
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
添加handle控制允许拖动的元素
parent
992a6348
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
1 deletion
+2
-1
ruoyi-ui/src/views/tool/gen/editTable.vue
ruoyi-ui/src/views/tool/gen/editTable.vue
+2
-1
No files found.
ruoyi-ui/src/views/tool/gen/editTable.vue
View file @
441da7ec
...
@@ -6,7 +6,7 @@
...
@@ -6,7 +6,7 @@
</el-tab-pane>
</el-tab-pane>
<el-tab-pane
label=
"字段信息"
name=
"cloum"
>
<el-tab-pane
label=
"字段信息"
name=
"cloum"
>
<el-table
ref=
"dragTable"
:data=
"cloumns"
row-key=
"columnId"
:max-height=
"tableHeight"
>
<el-table
ref=
"dragTable"
:data=
"cloumns"
row-key=
"columnId"
:max-height=
"tableHeight"
>
<el-table-column
label=
"序号"
type=
"index"
min-width=
"5%"
/>
<el-table-column
label=
"序号"
type=
"index"
min-width=
"5%"
class-name=
"allowDrag"
/>
<el-table-column
<el-table-column
label=
"字段列名"
label=
"字段列名"
prop=
"columnName"
prop=
"columnName"
...
@@ -203,6 +203,7 @@ export default {
...
@@ -203,6 +203,7 @@ export default {
mounted
()
{
mounted
()
{
const
el
=
this
.
$refs
.
dragTable
.
$el
.
querySelectorAll
(
"
.el-table__body-wrapper > table > tbody
"
)[
0
];
const
el
=
this
.
$refs
.
dragTable
.
$el
.
querySelectorAll
(
"
.el-table__body-wrapper > table > tbody
"
)[
0
];
const
sortable
=
Sortable
.
create
(
el
,
{
const
sortable
=
Sortable
.
create
(
el
,
{
handle
:
"
.allowDrag
"
,
onEnd
:
evt
=>
{
onEnd
:
evt
=>
{
const
targetRow
=
this
.
cloumns
.
splice
(
evt
.
oldIndex
,
1
)[
0
];
const
targetRow
=
this
.
cloumns
.
splice
(
evt
.
oldIndex
,
1
)[
0
];
this
.
cloumns
.
splice
(
evt
.
newIndex
,
0
,
targetRow
);
this
.
cloumns
.
splice
(
evt
.
newIndex
,
0
,
targetRow
);
...
...
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