Auto Commit

上级 91731d91
...@@ -8,7 +8,8 @@ ...@@ -8,7 +8,8 @@
}, },
"dependencies": { "dependencies": {
"guess": "^1.0.2", "guess": "^1.0.2",
"vue": "^3.2.37" "vue": "^3.2.37",
"vue-router": "^4.2.2"
}, },
"devDependencies": { "devDependencies": {
"@vitejs/plugin-vue": "^3.0.1", "@vitejs/plugin-vue": "^3.0.1",
......
...@@ -15,12 +15,6 @@ nextTick(() => { ...@@ -15,12 +15,6 @@ nextTick(() => {
if(isWebPlatform()) initDrag() if(isWebPlatform()) initDrag()
else initDrag1() else initDrag1()
}) })
/*
注意事项:
1. 父元素的宽高、元素在其内内移动。
2. 拖拽和点击事件的冲突解决、使用时间戳
3. 图片拖拽时候不可拖拽、阻止默认事件
* */
//pc端 //pc端
let time = 0 let time = 0
...@@ -129,13 +123,12 @@ const isWebPlatform = ()=> { ...@@ -129,13 +123,12 @@ const isWebPlatform = ()=> {
<style scoped> <style scoped>
.drag { .drag {
width: 50%; width: 300px;
height: 50vh; height: 400px;
border: solid 1px pink; border: solid 1px pink;
margin: 0 auto; margin: 0 auto;
position: relative; position: relative;
} }
.drag-box { .drag-box {
width: 50px; width: 50px;
height: 50px; height: 50px;
......
...@@ -3,4 +3,6 @@ import App from './App.vue' ...@@ -3,4 +3,6 @@ import App from './App.vue'
import './assets/main.css' import './assets/main.css'
createApp(App).mount('#app') import router from './router/router'
createApp(App).mount('#app').use(router)
import { createRouter, createWebHistory } from 'vue-router'
const router = createRouter({
history: createWebHistory(import.meta.env.BASE_URL),
routes: [
]
})
export default router
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册