devtools icon indicating copy to clipboard operation
devtools copied to clipboard

v6.1.4 Find components... 不能按组件的name正常查找

Open dfaglory opened this issue 3 years ago • 2 comments

Version

6.1.4

Browser and OS info

win10 edge 100.0.1185.50

Steps to reproduce

我的理解,Find components 是按照组件的name进行查找,这里应该使用goods进行查找。但是我发现如果 vue-router 配置的路由的name和组件的name不一致,则无法正确通过name查找到组件。另外,该问题在6.0.0 beta21中,是正常的

vue file

<script setup name="Goods">

router file
router = 
{
    path: 'Goods/Common',
    name: 'GoodsCommon',
    code: 'GoodsCommon',
    component: () => import('/@/views/enterprise/goods/goods.vue'),
},

vue v 3.2.21 vue-router v 4.0.12

What is expected?

z222

What is actually happening?

z111


dfaglory avatar Apr 24 '22 02:04 dfaglory

Please provide a runnable reproduction. Thanks!

Akryum avatar May 08 '22 12:05 Akryum

Please provide a runnable reproduction. Thanks!

I rechecked the code. This problem actually comes from keep alive tag <keep-alive :include="[]"> If you use <keep-alive> is ok If you use <keep-alive :include="[]"> is error

This is an example

git clone https://github.com/dfaglory/vuedevtools-bug-20220602.git npm install npm run serve

Z1 Z2 Z3 Z4

dfaglory avatar Jun 04 '22 02:06 dfaglory