Vue router routing introduction

const address = () => import("@/views/member/address")
 import Address from "page/member/address"

what is the difference between the above two ways of introduction

Jun.05,2021

an asynchronous Synchronize
the first is to execute the method to return a promise component to get
the second direct import component module


above is the asynchronous load route


.
const address = () => import('@/views/member/address')

is equivalent to

cost address = function(){
    return import('@/views/member/address')
}

he doesn't import it himself unless you execute address () .


the first one is asynchronous loading, and the second is the introduction of

by Synchronize.

the method of calling is also different

the first one needs address (). Then (add = > {/ * so use * /})

second normal use

MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1e563bf-453b3.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1e563bf-453b3.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?