-
Notifications
You must be signed in to change notification settings - Fork 51
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #132 from nicholaszuccarelli/vue3-unfinished
Fix Vue3 bug with class and style bindings on elements
- Loading branch information
Showing
10 changed files
with
91 additions
and
18 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,6 @@ | ||
<template> | ||
<component | ||
:is="tag" | ||
v-bind="$attrs" | ||
:class="cssClasses" | ||
> | ||
<slot v-bind="$slots['default'] || {}" /> | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,85 @@ | ||
<template> | ||
<Page class="wrapper"> | ||
<div class="thebox"> | ||
<DropList | ||
:items="items" | ||
column | ||
class="droplist" | ||
@reorder="$event.apply(items)" | ||
> | ||
<template #item="{item, index}"> | ||
<Drag | ||
:key="item" | ||
handle=".handle" | ||
> | ||
<div | ||
class="component" | ||
:class="{'handle': item !== 1}" | ||
:style="item === 1 ? 'height: 500px;' : 'height: 250px;'" | ||
> | ||
<h1>{{ item }}</h1> | ||
</div> | ||
|
||
<template #drag-image /> | ||
</Drag> | ||
</template> | ||
|
||
<template #feedback /> | ||
</DropList> | ||
</div> | ||
</Page> | ||
</template> | ||
|
||
<script> | ||
import Page from './components/scaffold/Page'; | ||
import DropList from '../lib/src/components/DropList'; | ||
import Drag from '../lib/src/components/Drag'; | ||
import '../lib/src/js/DragImagesManager.js'; | ||
export default { | ||
name: 'App', | ||
components: { | ||
Page, | ||
DropList, | ||
Drag | ||
}, | ||
data () { | ||
return { | ||
items: [0, 1], | ||
}; | ||
}, | ||
methods: { | ||
func (e) { | ||
console.log(e); | ||
}, | ||
}, | ||
}; | ||
</script> | ||
|
||
<style> | ||
.thebox { | ||
margin: 200px; | ||
height: 1024px; | ||
width: 800px; | ||
padding: 16px; | ||
border-radius: 8px; | ||
border: 2px solid black; | ||
} | ||
.thebox > .droplist { | ||
height: 100%; | ||
display: flex; | ||
flex-direction: column; | ||
justify-content: space-between; | ||
} | ||
.component { | ||
width: 100%; | ||
} | ||
.component.handle { | ||
border: 2px dashed orangered; | ||
cursor: move; | ||
} | ||
</style> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters