Skip to content

Commit

Permalink
fix: remove this and references
Browse files Browse the repository at this point in the history
  • Loading branch information
swaprenge committed Dec 24, 2020
1 parent ec75afb commit 8afe1af
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 8 deletions.
4 changes: 2 additions & 2 deletions src/components/examples/AllowIgnore.vue
Original file line number Diff line number Diff line change
Expand Up @@ -47,11 +47,11 @@
setup() {
// Event Log
const eventLog = ref([]);
const eventsDiv = ref(null);
watch(
eventLog,
() => {
const eventsDiv = this.$refs.eventsDiv;
const eventsDiv = eventsDiv.value;
eventsDiv.scrollTop = eventsDiv.scrollHeight;
},
{
Expand Down
9 changes: 5 additions & 4 deletions src/components/examples/DragFromOutside.vue
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,7 @@
// Mouse X Y
const mouseXY = { x: null, y: null };
const gridlayout = ref(null);
const colNum = undefined;
onMounted(() => {
document.addEventListener(
Expand Down Expand Up @@ -115,8 +116,8 @@
layout.value.findIndex((item) => item.i === 'drop') === -1
) {
layout.value.push({
x: (layout.value.length * 2) % (this.colNum || 12),
y: layout.value.length + (this.colNum || 12), // puts it at the bottom
x: (layout.value.length * 2) % (colNum || 12),
y: layout.value.length + (colNum || 12), // puts it at the bottom
w: 1,
h: 1,
i: 'drop',
Expand Down Expand Up @@ -205,9 +206,9 @@
h: 1,
i: DragPos.i,
});
this.$refs.gridLayout.dragEvent('dragend', DragPos.i, DragPos.x,DragPos.y,1,1);
gridLayout.value.dragEvent('dragend', DragPos.i, DragPos.x,DragPos.y,1,1);
try {
this.$refs.gridLayout.$children[layout.value.length].$refs.item.style.display="block";
gridLayout.value.$children[layout.value.length].$refs.item.style.display="block";
} catch {
}
*/
Expand Down
4 changes: 2 additions & 2 deletions src/components/examples/MultipleGrids.vue
Original file line number Diff line number Diff line change
Expand Up @@ -65,11 +65,11 @@
setup() {
// Event Log
const eventLog = ref([]);
const eventsDiv = ref(null);
watch(
eventLog,
() => {
const eventsDiv = this.$refs.eventsDiv;
const eventsDiv = eventsDiv.value;
eventsDiv.scrollTop = eventsDiv.scrollHeight;
},
{
Expand Down

0 comments on commit 8afe1af

Please sign in to comment.