Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
W
WidgetUI
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
1
Merge Requests
1
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
WuFeiyang
WidgetUI
Commits
014b9681
Commit
014b9681
authored
5 years ago
by
WuFeiyang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
去掉拖拽
parent
322d7f48
Pipeline
#33
failed with stages
Changes
1
Pipelines
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
30 deletions
+3
-30
src/App.vue
src/App.vue
+3
-30
No files found.
src/App.vue
View file @
014b9681
...
...
@@ -17,31 +17,9 @@
<button
v-on:click=
"addWidget(availableWidget)"
>
{{
availableWidget
}}
</button>
</div>
</div>
-->
<!--
<div
v-for=
"(widget,index) in widgetList"
:key=
"index"
>
<div
v-for=
"(widget,index) in widgetList"
:key=
"index"
>
<component
:is=
"widget.widgetComponentName"
:ref=
"widget.ref"
></component>
</div>
-->
<grid-layout
:layout.sync=
"layout"
:col-num=
"12"
:row-height=
"30"
:is-draggable=
"true"
:is-resizable=
"true"
:is-mirrored=
"false"
:vertical-compact=
"true"
:margin=
"[10, 10]"
:use-css-transforms=
"true"
>
<grid-item
v-for=
"(widget) in widgetList"
:x=
"layout[Number(widget.ref)].x"
:y=
"layout[Number(widget.ref)].y"
:w=
"layout[Number(widget.ref)].w"
:h=
"layout[Number(widget.ref)].h"
:i=
"layout[Number(widget.ref)].i"
:key=
"layout[Number(widget.ref)].i"
>
<component
:is=
"widget.widgetComponentName"
:ref=
"widget.ref"
></component>
</grid-item>
</grid-layout>
</div>
</div>
</
template
>
...
...
@@ -51,7 +29,6 @@
<
script
lang=
"ts"
>
import
{
Component
,
Vue
}
from
"
vue-property-decorator
"
;
import
axios
from
"
axios
"
;
import
{
GridItemData
,
GridLayout
,
GridItem
}
from
'
vue-grid-layout
'
;
import
{
WidgetRef
}
from
"
./models/WidgetRef
"
;
import
{
WidgetConfig
,
AllWidgetConfig
}
from
"
./models/WidgetConfig
"
;
...
...
@@ -71,14 +48,11 @@ import Config from "./components/Config/Config.vue";
Status
,
WaveView
,
Method
,
Config
,
GridLayout
,
GridItem
Config
}
})
export
default
class
App
extends
Vue
{
widgetList
:
WidgetRef
[]
=
[];
layout
:
GridItemData
[]
=
[];
fileName
:
string
=
"
config.json
"
;
private
lastWidgetIndex
:
number
=
0
;
isShowAddWidget
:
Boolean
=
false
;
...
...
@@ -173,7 +147,6 @@ export default class App extends Vue {
var
newWidget
=
new
WidgetRef
();
newWidget
.
widgetComponentName
=
widgetName
;
newWidget
.
ref
=
this
.
lastWidgetIndex
.
toString
();
this
.
layout
[
this
.
lastWidgetIndex
]
=
{
"
x
"
:
0
,
"
y
"
:
this
.
lastWidgetIndex
*
4
,
"
w
"
:
4
,
"
h
"
:
4
,
"
i
"
:
newWidget
.
ref
},
this
.
lastWidgetIndex
++
;
this
.
widgetList
=
[...
this
.
widgetList
,
newWidget
];
}
...
...
This diff is collapsed.
Click to expand it.
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