Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
V
vue-draggable-grid
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Model registry
Operate
Terraform modules
Monitor
Service Desk
Analyze
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
AlekSIS®
Libraries
vue-draggable-grid
Commits
0e6cb863
Commit
0e6cb863
authored
2 years ago
by
Julian
Browse files
Options
Downloads
Patches
Plain Diff
Make data of example 4 a function
parent
193777ff
No related branches found
No related tags found
1 merge request
!2
Resolve "Implement basic functionality"
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
example/src/App.vue
+50
-15
50 additions, 15 deletions
example/src/App.vue
with
50 additions
and
15 deletions
example/src/App.vue
+
50
−
15
View file @
0e6cb863
...
...
@@ -74,18 +74,34 @@ import NumberCounter from "./components/NumberCounter.vue";
</drag-grid>
</div>
<div
class=
"ttt-container"
>
<label>
Lesson 1 has length: {{ lesson1Length }}
<input
type=
"range"
v-model=
"lesson1Length"
min=
"1"
max=
"5"
step=
"1"
/>
</label>
<label>
Lesson grid has width: {{ lesson1Cols }}
<input
type=
"range"
v-model=
"lesson1Cols"
min=
"2"
max=
"5"
step=
"1"
/>
</label>
<label>
Lesson grid has height: {{ lesson1Rows }}
<input
type=
"range"
v-model=
"lesson1Rows"
min=
"6"
max=
"10"
step=
"1"
/>
</label>
<div>
<label>
Lesson 1 has length: {{ lesson1Length }}
<input
type=
"range"
v-model=
"lesson1Length"
min=
"1"
max=
"5"
step=
"1"
/>
</label>
<input
type=
"text"
v-model=
"lessonData.lesson1"
/>
</div>
<div>
<label>
Lesson grid has width: {{ lesson1Cols }}
<input
type=
"range"
v-model=
"lesson1Cols"
min=
"2"
max=
"5"
step=
"1"
/>
</label>
<input
type=
"text"
v-model=
"lessonData.lesson2"
/>
</div>
<div>
<label>
Lesson grid has height: {{ lesson1Rows }}
<input
type=
"range"
v-model=
"lesson1Rows"
min=
"6"
max=
"10"
step=
"1"
/>
<input
type=
"text"
v-model=
"lessonData.lesson3.inside"
/>
<input
type=
"text"
v-model=
"lessonData.lesson3.outside"
/>
</label>
</div>
<drag-grid
:value=
"lessons1"
...
...
@@ -207,6 +223,14 @@ export default {
lesson3X
:
-
1
,
lesson3Y
:
-
1
,
lesson3inPlan
:
false
,
lessonData
:
{
lesson1
:
"
Nothing
"
,
lesson2
:
"
Hallo
"
,
lesson3
:
{
inside
:
"
This is lesson 3 inside the plan
"
,
outside
:
"
This is lesson3 outside of the plan
"
,
},
},
};
},
computed
:
{
...
...
@@ -222,7 +246,9 @@ export default {
w
:
1
,
h
:
this
.
lesson1Length
,
key
:
"
lesson1
"
,
data
:
{},
data
:
{
text
:
this
.
lessonData
.
lesson1
,
},
},
{
x
:
(
grid
)
=>
{
...
...
@@ -234,7 +260,9 @@ export default {
w
:
1
,
h
:
parseInt
(
this
.
lesson1Length
)
+
1
,
key
:
"
lesson2
"
,
data
:
{},
data
:
{
text
:
this
.
lessonData
.
lesson2
,
},
},
{
x
:
(
grid
)
=>
{
...
...
@@ -252,7 +280,14 @@ export default {
w
:
1
,
h
:
parseInt
(
this
.
lesson1Length
)
+
1
,
key
:
"
lesson3
"
,
data
:
{},
data
:
(
grid
)
=>
{
return
{
text
:
grid
.
gridId
===
"
lesson-storage
"
?
this
.
lessonData
.
lesson3
.
outside
:
this
.
lessonData
.
lesson3
.
inside
,
};
},
},
];
},
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment