Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

断点debugger位置错乱了 #17

Open
hpy0826 opened this issue May 26, 2023 · 3 comments
Open

断点debugger位置错乱了 #17

hpy0826 opened this issue May 26, 2023 · 3 comments

Comments

@hpy0826
Copy link

hpy0826 commented May 26, 2023

No description provided.

@chenxch
Copy link
Owner

chenxch commented May 26, 2023

请提供一下相关信息,例如vue版本,如果可以的话最好提供一个可以复现的demo

@hpy0826
Copy link
Author

hpy0826 commented May 26, 2023

版本如下:
"vite": "^4.2.1",
"vite-plugin-compression": "^0.5.1",
 "unplugin-vue-setup-extend-plus": "^1.0.0",
 "vue": "^3.2.47",

下图为debugger位置和谷歌浏览器中断点的位置
image
image

@hpy0826
Copy link
Author

hpy0826 commented May 26, 2023

文件类型只要是tsx的就会出问题了
image

<template>
    <div class="sysMenus-container" @click="updateCol()">
    </div>
</template>
  
<script setup lang="tsx" name="sysMenusIndex">
import { ref } from "vue";



const updateCol = (row?: any, prop?: string, oldValue?: string, newValue?: string, undo?: () => void) => {
    // setTimeout(() => {
    //   undo();
    // }, 2000);
    debugger;
};



const each = function <T extends { [key: string]: any }>(items: Array<T>, childrenField: string, callBack: (item: T) => void) {
    items.forEach(item => {
        if (item[childrenField]) {
            each(item[childrenField], childrenField, callBack);
        }
        callBack(item);
    });
};




</script>
  
<style scoped>
.sysMenus-container {
    width: 100px;
    height: 100px;
    background-color: red;
}
</style>

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants