Skip to content

Commit

Permalink
refactor: 删除useDraggable
Browse files Browse the repository at this point in the history
  • Loading branch information
jsxiaosi committed Jan 20, 2022
1 parent 9b005ad commit 49c173f
Showing 1 changed file with 0 additions and 12 deletions.
12 changes: 0 additions & 12 deletions src/views/guide/index.vue
Original file line number Diff line number Diff line change
@@ -1,9 +1,6 @@
<template>
<div class="page-container">
<el-button type="primary" @click="handleIntro">引导页</el-button>
<div ref="el" :style="style" style="position: fixed; z-index: 99999">
Drag me! I am at {{ x }}, {{ y }}
</div>
</div>
</template>

Expand All @@ -14,15 +11,6 @@
prevLabel: '单独设置的上一步',
});
};
import { useDraggable } from '@vueuse/core';
import { ref } from 'vue';
const el = ref<HTMLElement | null>(null);
// `style` will be a helper computed for `left: ?px; top: ?px;`
const { x, y, style } = useDraggable(el, {
initialValue: { x: 40, y: 40 },
});
</script>

<style scoped lang="scss">
Expand Down

0 comments on commit 49c173f

Please sign in to comment.