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
Sep 17, 2019
by
WuFeiyang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
去掉拖拽
parent
322d7f48
Pipeline
#33
failed with stages
Changes
1
Pipelines
1
Hide 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 @@
...
@@ -17,31 +17,9 @@
<button
v-on:click=
"addWidget(availableWidget)"
>
{{
availableWidget
}}
</button>
<button
v-on:click=
"addWidget(availableWidget)"
>
{{
availableWidget
}}
</button>
</div>
</div>
</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>
<component
:is=
"widget.widgetComponentName"
:ref=
"widget.ref"
></component>
</div>
-->
</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
>
</
template
>
...
@@ -51,7 +29,6 @@
...
@@ -51,7 +29,6 @@
<
script
lang=
"ts"
>
<
script
lang=
"ts"
>
import
{
Component
,
Vue
}
from
"
vue-property-decorator
"
;
import
{
Component
,
Vue
}
from
"
vue-property-decorator
"
;
import
axios
from
"
axios
"
;
import
axios
from
"
axios
"
;
import
{
GridItemData
,
GridLayout
,
GridItem
}
from
'
vue-grid-layout
'
;
import
{
WidgetRef
}
from
"
./models/WidgetRef
"
;
import
{
WidgetRef
}
from
"
./models/WidgetRef
"
;
import
{
WidgetConfig
,
AllWidgetConfig
}
from
"
./models/WidgetConfig
"
;
import
{
WidgetConfig
,
AllWidgetConfig
}
from
"
./models/WidgetConfig
"
;
...
@@ -71,14 +48,11 @@ import Config from "./components/Config/Config.vue";
...
@@ -71,14 +48,11 @@ import Config from "./components/Config/Config.vue";
Status
,
Status
,
WaveView
,
WaveView
,
Method
,
Method
,
Config
,
Config
GridLayout
,
GridItem
}
}
})
})
export
default
class
App
extends
Vue
{
export
default
class
App
extends
Vue
{
widgetList
:
WidgetRef
[]
=
[];
widgetList
:
WidgetRef
[]
=
[];
layout
:
GridItemData
[]
=
[];
fileName
:
string
=
"
config.json
"
;
fileName
:
string
=
"
config.json
"
;
private
lastWidgetIndex
:
number
=
0
;
private
lastWidgetIndex
:
number
=
0
;
isShowAddWidget
:
Boolean
=
false
;
isShowAddWidget
:
Boolean
=
false
;
...
@@ -173,7 +147,6 @@ export default class App extends Vue {
...
@@ -173,7 +147,6 @@ export default class App extends Vue {
var
newWidget
=
new
WidgetRef
();
var
newWidget
=
new
WidgetRef
();
newWidget
.
widgetComponentName
=
widgetName
;
newWidget
.
widgetComponentName
=
widgetName
;
newWidget
.
ref
=
this
.
lastWidgetIndex
.
toString
();
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
.
lastWidgetIndex
++
;
this
.
widgetList
=
[...
this
.
widgetList
,
newWidget
];
this
.
widgetList
=
[...
this
.
widgetList
,
newWidget
];
}
}
...
...
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