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
2a494077
Commit
2a494077
authored
1 year ago
by
Julian
Browse files
Options
Downloads
Patches
Plain Diff
Create example for multipleItemsY
parent
1f8f4f1a
No related branches found
No related tags found
1 merge request
!11
Overlapping items in a column
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
example/src/App.vue
+8
-0
8 additions, 0 deletions
example/src/App.vue
example/src/Example9MultipleItemsY.vue
+62
-0
62 additions, 0 deletions
example/src/Example9MultipleItemsY.vue
with
70 additions
and
0 deletions
example/src/App.vue
+
8
−
0
View file @
2a494077
...
...
@@ -7,6 +7,7 @@ import Example5Colors from "./Example5Colors.vue";
import
Example6Disabled
from
"
./Example6Disabled.vue
"
;
import
Example7DisabledItems
from
"
./Example7DisabledItems.vue
"
;
import
Example8Responsive
from
"
./Example8Responsive.vue
"
;
import
Example9MultipleItemsY
from
"
./Example9MultipleItemsY.vue
"
;
</
script
>
<
template
>
...
...
@@ -88,6 +89,13 @@ import Example8Responsive from "./Example8Responsive.vue";
<h2>
Example 8:
</h2>
<p>
The grid is responsive. Try resizing it below:
</p>
<example8-responsive></example8-responsive>
<h2>
Example 9:
</h2>
<p>
Grid with multiple items per slot (overlaps only in y direction possible,
width of every item has to be
<kbd>
1
</kbd>
)
</p>
<example9-multiple-items-y
/>
</div>
</
template
>
...
...
This diff is collapsed.
Click to expand it.
example/src/Example9MultipleItemsY.vue
0 → 100644
+
62
−
0
View file @
2a494077
<
script
>
import
{
defineComponent
}
from
"
vue
"
;
export
default
defineComponent
({
name
:
"
Example9MultipleItemsY
"
,
data
()
{
return
{
items
:
[
{
x
:
1
,
y
:
4
,
w
:
1
,
h
:
1
,
key
:
"
item 1
"
},
{
x
:
1
,
y
:
1
,
w
:
1
,
h
:
1
,
key
:
"
item 2
"
},
{
x
:
1
,
y
:
2
,
w
:
1
,
h
:
2
,
key
:
"
item 3
"
},
{
x
:
1
,
y
:
3
,
w
:
1
,
h
:
1
,
key
:
"
item 4
"
},
{
x
:
1
,
y
:
4
,
w
:
1
,
h
:
2
,
key
:
"
item 5
"
},
{
x
:
1
,
y
:
2
,
w
:
1
,
h
:
3
,
key
:
"
item 6
"
},
{
x
:
2
,
y
:
2
,
w
:
1
,
h
:
3
,
key
:
"
item 7
"
},
{
x
:
2
,
y
:
1
,
w
:
1
,
h
:
3
,
key
:
"
item 8
"
},
{
x
:
2
,
y
:
4
,
w
:
1
,
h
:
2
,
key
:
"
item 9
"
},
{
x
:
2
,
y
:
7
,
w
:
1
,
h
:
3
,
key
:
"
item 10
"
},
{
x
:
2
,
y
:
3
,
w
:
1
,
h
:
1
,
key
:
"
item 11
"
},
],
};
},
});
</
script
>
<
template
>
<div
class=
"parent"
>
<drag-grid
v-model=
"items"
:cols=
"2"
:rows=
"8"
class=
"grid"
multiple-items-y
>
<template
#item
="
{ key }">
<div
class=
"item"
>
{{
key
}}
</div>
</
template
>
</drag-grid>
</div>
</template>
<
style
scoped
>
.parent
{
min-height
:
600px
;
}
.grid
{
border
:
#97fa56
2px
solid
;
width
:
clamp
(
20vw
,
500px
,
80vw
);
aspect-ratio
:
1
;
}
.item
{
background
:
#325442
;
color
:
#97fa56
;
border
:
#97fa56
2px
dotted
;
width
:
100%
;
height
:
100%
;
}
</
style
>
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