Giter Site home page Giter Site logo

Comments (2)

InfernalAzazel avatar InfernalAzazel commented on September 27, 2024

警告信息

[Vue Router warn]: Component "default" in record with path "/home" is defined using "defineAsyncComponent()". Write "() => import('./MyPage.vue')" instead of "defineAsyncComponent(() => import('./MyPage.vue'))".
warn @ vue-router.mjs:35
extractComponentsGuards @ vue-router.mjs:2054
navigate @ vue-router.mjs:3204
pushWithRedirect @ vue-router.mjs:3145
push @ vue-router.mjs:3080
handleMenuItemClick @ menu.ts:132
handleClick @ menu-item.vue:89
createElementBlock.onClick._cache.<computed>._cache.<computed> @ menu-item.vue:10
callWithErrorHandling @ runtime-core.esm-bundler.js:155
callWithAsyncErrorHandling @ runtime-core.esm-bundler.js:164
invoker @ runtime-dom.esm-bundler.js:369
vue-router.mjs:35 [Vue Router warn]: Component "default" in record with path "/" is defined using "defineAsyncComponent()". Write "() => import('./MyPage.vue')" instead of "defineAsyncComponent(() => import('./MyPage.vue'))".
warn @ vue-router.mjs:35
extractComponentsGuards @ vue-router.mjs:2054
navigate @ vue-router.mjs:3204
pushWithRedirect @ vue-router.mjs:3145
push @ vue-router.mjs:3080
handleMenuItemClick @ menu.ts:132
handleClick @ menu-item.vue:89
createElementBlock.onClick._cache.<computed>._cache.<computed> @ menu-item.vue:10
callWithErrorHandling @ runtime-core.esm-bundler.js:155
callWithAsyncErrorHandling @ runtime-core.esm-bundler.js:164
invoker @ runtime-dom.esm-bundler.js:369
vue-router.mjs:35 [Vue Router warn]: Component "default" in record with path "/" is a function that does not return a Promise. If you were passing a functional component, make sure to add a "displayName" to the component. This will break in production if not fixed.
warn @ vue-router.mjs:35
extractComponentsGuards @ vue-router.mjs:2073
(匿名) @ vue-router.mjs:3260
Promise.then(异步)
navigate @ vue-router.mjs:3255
pushWithRedirect @ vue-router.mjs:3145
push @ vue-router.mjs:3080
handleMenuItemClick @ menu.ts:132
handleClick @ menu-item.vue:89
createElementBlock.onClick._cache.<computed>._cache.<computed> @ menu-item.vue:10
callWithErrorHandling @ runtime-core.esm-bundler.js:155
callWithAsyncErrorHandling @ runtime-core.esm-bundler.js:164
invoker @ runtime-dom.esm-bundler.js:369
vue-router.mjs:35 [Vue Router warn]: Component "default" in record with path "/bug" is a function that does not return a Promise. If you were passing a functional component, make sure to add a "displayName" to the component. This will break in production if not fixed.

from element-pro-components.

tolking avatar tolking commented on September 27, 2024

你两个path都是 path: '/',,肯定会报错。

建议去 vue-route 的文档看下 path 和 redirect

-path: '/',
- redirect: '/bug',
+ path: '/bug',

from element-pro-components.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.