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
9374568a
Commit
9374568a
authored
1 year ago
by
Julian
Browse files
Options
Downloads
Patches
Plain Diff
Write docs for the multipleItemsY feature
parent
cc4c5998
No related branches found
Branches containing commit
No related tags found
1 merge request
!11
Overlapping items in a column
Pipeline
#141882
passed
1 year ago
Stage: test
Changes
3
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
docs/.vuepress/config.js
+1
-0
1 addition, 0 deletions
docs/.vuepress/config.js
docs/examples/MultipleItemsY.md
+14
-0
14 additions, 0 deletions
docs/examples/MultipleItemsY.md
docs/guide/index.md
+14
-0
14 additions, 0 deletions
docs/guide/index.md
with
29 additions
and
0 deletions
docs/.vuepress/config.js
+
1
−
0
View file @
9374568a
...
...
@@ -15,6 +15,7 @@ module.exports = {
"
/examples/Disabled.md
"
,
"
/examples/DisabledItems.md
"
,
"
/examples/Responsive.md
"
,
"
/examples/MultipleItemsY.md
"
,
],
},
],
...
...
This diff is collapsed.
Click to expand it.
docs/examples/MultipleItemsY.md
0 → 100644
+
14
−
0
View file @
9374568a
# Example 9: Multiple Items per field
Grid with multiple items per slot (overlaps only in y direction possible,
width of every item has to be
`1`
). The items are placed in the grid automatically.
To allow this behaviour, the grid component has to receive the prop
`multiple-items-y`
with the value
`true`
.
<ClientOnly>
<script
setup
>
import Example9MultipleItemsY from "../../example/src/Example9MultipleItemsY.vue";
</script>
<Example9MultipleItemsY
/>
</ClientOnly>
This diff is collapsed.
Click to expand it.
docs/guide/index.md
+
14
−
0
View file @
9374568a
...
...
@@ -244,3 +244,17 @@ Examples for such a mechanism can be found in Examples 4 and 5.
:::
To handle movements from one grid to another, the attributes
`gridId`
and
`originGridId`
of the event will help.
## Overlapping grid items
If two items overlap, the one which is defined later in the array will be on top of the other one.
They cannot be dragged.
If you want to have overlapping items which can be dragged, there exists the
`multipleItemsY`
prop.
If this is set to
`true`
, items can be dragged on top of each other. The items will be stacked horizontally.
This is useful for e.g. a calendar-like frontend.
::: danger
If
`multipleItemsY`
is set to
`true`
, the
`w`
property of all items has to be set to
`1`
.
Otherwise, this will lead to unexpected behaviour.
:::
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