196

在vue项目中 如何定义全局变量 全局函数

 6 years ago
source link: https://juejin.im/post/59eddbfe6fb9a0450908abb4
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
写在前面: 如题,在项目中,经常有些函数和变量是需要复用,比如说网站服务器地址,从后台拿到的:用户的登录token,用户的地址信息等,这时候就需要设置一波全局变量和全局函数,这两个设置不太难,而且有一些共通之处,可能有一些朋友对此不太了解,所以随便写出来分享一

About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK